From 6ef38ffa1753d70a8a9d2c162bb6046471d6e353 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Wed, 25 Feb 2026 12:01:08 +0000 Subject: [PATCH 1/2] feat: Add API fields related to GKE Pods and Network Policies PiperOrigin-RevId: 875021492 Source-Link: https://github.com/googleapis/googleapis/commit/69bf99a9d0910fa86c3c5867ea357aa004dfcc55 Source-Link: https://github.com/googleapis/googleapis-gen/commit/e2b09e59915b5d125c7c07c4402261feeb5b20bc Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLW5ldHdvcmtfbWFuYWdlbWVudC12MS8uT3dsQm90LnlhbWwiLCJoIjoiZTJiMDllNTk5MTViNWQxMjVjN2MwN2M0NDAyMjYxZmVlYjViMjBiYyJ9 --- .../.gitignore | 22 + .../.repo-metadata.json | 17 + .../.rubocop.yml | 33 + .../.toys.rb | 28 + .../.yardopts | 12 + .../AUTHENTICATION.md | 122 + .../CHANGELOG.md | 2 + .../Gemfile | 11 + .../LICENSE.md | 201 ++ .../README.md | 153 + .../Rakefile | 169 ++ .../gapic_metadata.json | 126 + ...google-cloud-network_management-v1.gemspec | 30 + .../lib/google-cloud-network_management-v1.rb | 21 + .../lib/google/cloud/network_management/v1.rb | 47 + .../v1/bindings_override.rb | 124 + .../v1/organization_vpc_flow_logs_service.rb | 59 + .../client.rb | 1002 +++++++ .../credentials.rb | 47 + .../operations.rb | 841 ++++++ .../paths.rb | 110 + .../rest.rb | 57 + .../rest/client.rb | 933 ++++++ .../rest/operations.rb | 954 ++++++ .../rest/service_stub.rb | 388 +++ .../v1/reachability_service.rb | 63 + .../v1/reachability_service/client.rb | 1111 +++++++ .../v1/reachability_service/credentials.rb | 47 + .../v1/reachability_service/operations.rb | 841 ++++++ .../v1/reachability_service/paths.rb | 64 + .../v1/reachability_service/rest.rb | 61 + .../v1/reachability_service/rest/client.rb | 1035 +++++++ .../reachability_service/rest/operations.rb | 954 ++++++ .../reachability_service/rest/service_stub.rb | 450 +++ .../cloud/network_management/v1/rest.rb | 40 + .../cloud/network_management/v1/version.rb | 28 + .../v1/vpc_flow_logs_service.rb | 58 + .../v1/vpc_flow_logs_service/client.rb | 1225 ++++++++ .../v1/vpc_flow_logs_service/credentials.rb | 47 + .../v1/vpc_flow_logs_service/operations.rb | 841 ++++++ .../v1/vpc_flow_logs_service/paths.rb | 110 + .../v1/vpc_flow_logs_service/rest.rb | 56 + .../v1/vpc_flow_logs_service/rest/client.rb | 1142 ++++++++ .../vpc_flow_logs_service/rest/operations.rb | 954 ++++++ .../rest/service_stub.rb | 510 ++++ .../v1/connectivity_test_pb.rb | 66 + .../networkmanagement/v1/reachability_pb.rb | 62 + .../v1/reachability_services_pb.rb | 100 + .../cloud/networkmanagement/v1/trace_pb.rb | 107 + .../v1/vpc_flow_logs_config_pb.rb | 54 + .../networkmanagement/v1/vpc_flow_logs_pb.rb | 63 + .../v1/vpc_flow_logs_services_pb.rb | 144 + .../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 ++ .../networkmanagement/v1/connectivity_test.rb | 490 ++++ .../networkmanagement/v1/reachability.rb | 174 ++ .../cloud/networkmanagement/v1/trace.rb | 2610 +++++++++++++++++ .../networkmanagement/v1/vpc_flow_logs.rb | 224 ++ .../v1/vpc_flow_logs_config.rb | 312 ++ .../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 + .../proto_docs/google/type/expr.rb | 75 + .../snippets/Gemfile | 32 + .../create_vpc_flow_logs_config.rb | 54 + .../delete_vpc_flow_logs_config.rb | 54 + .../get_vpc_flow_logs_config.rb | 47 + .../list_vpc_flow_logs_configs.rb | 51 + .../update_vpc_flow_logs_config.rb | 54 + .../create_connectivity_test.rb | 54 + .../delete_connectivity_test.rb | 54 + .../get_connectivity_test.rb | 47 + .../list_connectivity_tests.rb | 51 + .../rerun_connectivity_test.rb | 54 + .../update_connectivity_test.rb | 54 + ...ata_google.cloud.networkmanagement.v1.json | 735 +++++ .../create_vpc_flow_logs_config.rb | 54 + .../delete_vpc_flow_logs_config.rb | 54 + .../get_vpc_flow_logs_config.rb | 47 + .../list_vpc_flow_logs_configs.rb | 51 + .../query_org_vpc_flow_logs_configs.rb | 51 + .../show_effective_flow_logs_configs.rb | 51 + .../update_vpc_flow_logs_config.rb | 54 + ...n_vpc_flow_logs_service_operations_test.rb | 400 +++ ...zation_vpc_flow_logs_service_paths_test.rb | 82 + ...ization_vpc_flow_logs_service_rest_test.rb | 376 +++ ...organization_vpc_flow_logs_service_test.rb | 442 +++ .../reachability_service_operations_test.rb | 400 +++ .../v1/reachability_service_paths_test.rb | 67 + .../v1/reachability_service_rest_test.rb | 430 +++ .../v1/reachability_service_test.rb | 505 ++++ .../vpc_flow_logs_service_operations_test.rb | 400 +++ .../v1/vpc_flow_logs_service_paths_test.rb | 82 + .../v1/vpc_flow_logs_service_rest_test.rb | 491 ++++ .../v1/vpc_flow_logs_service_test.rb | 582 ++++ .../test/helper.rb | 25 + 104 files changed, 27432 insertions(+) create mode 100644 owl-bot-staging/google-cloud-network_management-v1/.gitignore create mode 100644 owl-bot-staging/google-cloud-network_management-v1/.repo-metadata.json create mode 100644 owl-bot-staging/google-cloud-network_management-v1/.rubocop.yml create mode 100644 owl-bot-staging/google-cloud-network_management-v1/.toys.rb create mode 100644 owl-bot-staging/google-cloud-network_management-v1/.yardopts create mode 100644 owl-bot-staging/google-cloud-network_management-v1/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-cloud-network_management-v1/CHANGELOG.md create mode 100644 owl-bot-staging/google-cloud-network_management-v1/Gemfile create mode 100644 owl-bot-staging/google-cloud-network_management-v1/LICENSE.md create mode 100644 owl-bot-staging/google-cloud-network_management-v1/README.md create mode 100644 owl-bot-staging/google-cloud-network_management-v1/Rakefile create mode 100644 owl-bot-staging/google-cloud-network_management-v1/gapic_metadata.json create mode 100644 owl-bot-staging/google-cloud-network_management-v1/google-cloud-network_management-v1.gemspec create mode 100644 owl-bot-staging/google-cloud-network_management-v1/lib/google-cloud-network_management-v1.rb create mode 100644 owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1.rb create mode 100644 owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/bindings_override.rb create mode 100644 owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/organization_vpc_flow_logs_service.rb create mode 100644 owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/organization_vpc_flow_logs_service/client.rb create mode 100644 owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/organization_vpc_flow_logs_service/credentials.rb create mode 100644 owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/organization_vpc_flow_logs_service/operations.rb create mode 100644 owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/organization_vpc_flow_logs_service/paths.rb create mode 100644 owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/organization_vpc_flow_logs_service/rest.rb create mode 100644 owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/organization_vpc_flow_logs_service/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/organization_vpc_flow_logs_service/rest/operations.rb create mode 100644 owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/organization_vpc_flow_logs_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/reachability_service.rb create mode 100644 owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/reachability_service/client.rb create mode 100644 owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/reachability_service/credentials.rb create mode 100644 owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/reachability_service/operations.rb create mode 100644 owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/reachability_service/paths.rb create mode 100644 owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/reachability_service/rest.rb create mode 100644 owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/reachability_service/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/reachability_service/rest/operations.rb create mode 100644 owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/reachability_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/rest.rb create mode 100644 owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/version.rb create mode 100644 owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/vpc_flow_logs_service.rb create mode 100644 owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/vpc_flow_logs_service/client.rb create mode 100644 owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/vpc_flow_logs_service/credentials.rb create mode 100644 owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/vpc_flow_logs_service/operations.rb create mode 100644 owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/vpc_flow_logs_service/paths.rb create mode 100644 owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/vpc_flow_logs_service/rest.rb create mode 100644 owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/vpc_flow_logs_service/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/vpc_flow_logs_service/rest/operations.rb create mode 100644 owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/vpc_flow_logs_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/networkmanagement/v1/connectivity_test_pb.rb create mode 100644 owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/networkmanagement/v1/reachability_pb.rb create mode 100644 owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/networkmanagement/v1/reachability_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/networkmanagement/v1/trace_pb.rb create mode 100644 owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/networkmanagement/v1/vpc_flow_logs_config_pb.rb create mode 100644 owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/networkmanagement/v1/vpc_flow_logs_pb.rb create mode 100644 owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/networkmanagement/v1/vpc_flow_logs_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-network_management-v1/proto_docs/README.md create mode 100644 owl-bot-staging/google-cloud-network_management-v1/proto_docs/google/api/client.rb create mode 100644 owl-bot-staging/google-cloud-network_management-v1/proto_docs/google/api/field_behavior.rb create mode 100644 owl-bot-staging/google-cloud-network_management-v1/proto_docs/google/api/field_info.rb create mode 100644 owl-bot-staging/google-cloud-network_management-v1/proto_docs/google/api/launch_stage.rb create mode 100644 owl-bot-staging/google-cloud-network_management-v1/proto_docs/google/api/resource.rb create mode 100644 owl-bot-staging/google-cloud-network_management-v1/proto_docs/google/cloud/networkmanagement/v1/connectivity_test.rb create mode 100644 owl-bot-staging/google-cloud-network_management-v1/proto_docs/google/cloud/networkmanagement/v1/reachability.rb create mode 100644 owl-bot-staging/google-cloud-network_management-v1/proto_docs/google/cloud/networkmanagement/v1/trace.rb create mode 100644 owl-bot-staging/google-cloud-network_management-v1/proto_docs/google/cloud/networkmanagement/v1/vpc_flow_logs.rb create mode 100644 owl-bot-staging/google-cloud-network_management-v1/proto_docs/google/cloud/networkmanagement/v1/vpc_flow_logs_config.rb create mode 100644 owl-bot-staging/google-cloud-network_management-v1/proto_docs/google/longrunning/operations.rb create mode 100644 owl-bot-staging/google-cloud-network_management-v1/proto_docs/google/protobuf/any.rb create mode 100644 owl-bot-staging/google-cloud-network_management-v1/proto_docs/google/protobuf/duration.rb create mode 100644 owl-bot-staging/google-cloud-network_management-v1/proto_docs/google/protobuf/empty.rb create mode 100644 owl-bot-staging/google-cloud-network_management-v1/proto_docs/google/protobuf/field_mask.rb create mode 100644 owl-bot-staging/google-cloud-network_management-v1/proto_docs/google/protobuf/timestamp.rb create mode 100644 owl-bot-staging/google-cloud-network_management-v1/proto_docs/google/rpc/status.rb create mode 100644 owl-bot-staging/google-cloud-network_management-v1/proto_docs/google/type/expr.rb create mode 100644 owl-bot-staging/google-cloud-network_management-v1/snippets/Gemfile create mode 100644 owl-bot-staging/google-cloud-network_management-v1/snippets/organization_vpc_flow_logs_service/create_vpc_flow_logs_config.rb create mode 100644 owl-bot-staging/google-cloud-network_management-v1/snippets/organization_vpc_flow_logs_service/delete_vpc_flow_logs_config.rb create mode 100644 owl-bot-staging/google-cloud-network_management-v1/snippets/organization_vpc_flow_logs_service/get_vpc_flow_logs_config.rb create mode 100644 owl-bot-staging/google-cloud-network_management-v1/snippets/organization_vpc_flow_logs_service/list_vpc_flow_logs_configs.rb create mode 100644 owl-bot-staging/google-cloud-network_management-v1/snippets/organization_vpc_flow_logs_service/update_vpc_flow_logs_config.rb create mode 100644 owl-bot-staging/google-cloud-network_management-v1/snippets/reachability_service/create_connectivity_test.rb create mode 100644 owl-bot-staging/google-cloud-network_management-v1/snippets/reachability_service/delete_connectivity_test.rb create mode 100644 owl-bot-staging/google-cloud-network_management-v1/snippets/reachability_service/get_connectivity_test.rb create mode 100644 owl-bot-staging/google-cloud-network_management-v1/snippets/reachability_service/list_connectivity_tests.rb create mode 100644 owl-bot-staging/google-cloud-network_management-v1/snippets/reachability_service/rerun_connectivity_test.rb create mode 100644 owl-bot-staging/google-cloud-network_management-v1/snippets/reachability_service/update_connectivity_test.rb create mode 100644 owl-bot-staging/google-cloud-network_management-v1/snippets/snippet_metadata_google.cloud.networkmanagement.v1.json create mode 100644 owl-bot-staging/google-cloud-network_management-v1/snippets/vpc_flow_logs_service/create_vpc_flow_logs_config.rb create mode 100644 owl-bot-staging/google-cloud-network_management-v1/snippets/vpc_flow_logs_service/delete_vpc_flow_logs_config.rb create mode 100644 owl-bot-staging/google-cloud-network_management-v1/snippets/vpc_flow_logs_service/get_vpc_flow_logs_config.rb create mode 100644 owl-bot-staging/google-cloud-network_management-v1/snippets/vpc_flow_logs_service/list_vpc_flow_logs_configs.rb create mode 100644 owl-bot-staging/google-cloud-network_management-v1/snippets/vpc_flow_logs_service/query_org_vpc_flow_logs_configs.rb create mode 100644 owl-bot-staging/google-cloud-network_management-v1/snippets/vpc_flow_logs_service/show_effective_flow_logs_configs.rb create mode 100644 owl-bot-staging/google-cloud-network_management-v1/snippets/vpc_flow_logs_service/update_vpc_flow_logs_config.rb create mode 100644 owl-bot-staging/google-cloud-network_management-v1/test/google/cloud/network_management/v1/organization_vpc_flow_logs_service_operations_test.rb create mode 100644 owl-bot-staging/google-cloud-network_management-v1/test/google/cloud/network_management/v1/organization_vpc_flow_logs_service_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-network_management-v1/test/google/cloud/network_management/v1/organization_vpc_flow_logs_service_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-network_management-v1/test/google/cloud/network_management/v1/organization_vpc_flow_logs_service_test.rb create mode 100644 owl-bot-staging/google-cloud-network_management-v1/test/google/cloud/network_management/v1/reachability_service_operations_test.rb create mode 100644 owl-bot-staging/google-cloud-network_management-v1/test/google/cloud/network_management/v1/reachability_service_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-network_management-v1/test/google/cloud/network_management/v1/reachability_service_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-network_management-v1/test/google/cloud/network_management/v1/reachability_service_test.rb create mode 100644 owl-bot-staging/google-cloud-network_management-v1/test/google/cloud/network_management/v1/vpc_flow_logs_service_operations_test.rb create mode 100644 owl-bot-staging/google-cloud-network_management-v1/test/google/cloud/network_management/v1/vpc_flow_logs_service_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-network_management-v1/test/google/cloud/network_management/v1/vpc_flow_logs_service_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-network_management-v1/test/google/cloud/network_management/v1/vpc_flow_logs_service_test.rb create mode 100644 owl-bot-staging/google-cloud-network_management-v1/test/helper.rb diff --git a/owl-bot-staging/google-cloud-network_management-v1/.gitignore b/owl-bot-staging/google-cloud-network_management-v1/.gitignore new file mode 100644 index 000000000000..0135b6bc6cfc --- /dev/null +++ b/owl-bot-staging/google-cloud-network_management-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-network_management-v1/.repo-metadata.json b/owl-bot-staging/google-cloud-network_management-v1/.repo-metadata.json new file mode 100644 index 000000000000..e77f1d9cf88e --- /dev/null +++ b/owl-bot-staging/google-cloud-network_management-v1/.repo-metadata.json @@ -0,0 +1,17 @@ +{ + "api_id": "networkmanagement.googleapis.com", + "api_shortname": "networkmanagement", + "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-network_management-v1/latest", + "distribution_name": "google-cloud-network_management-v1", + "is_cloud": true, + "language": "ruby", + "name": "networkmanagement", + "name_pretty": "Network Management V1 API", + "product_documentation": "https://cloud.google.com/network-intelligence-center/docs/connectivity-tests/reference/networkmanagement/rest", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "The Network Management API provides a collection of network performance monitoring and diagnostic capabilities. Note that google-cloud-network_management-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-network_management instead. See the readme for more details.", + "ruby-cloud-product-url": "https://cloud.google.com/network-intelligence-center/docs/connectivity-tests/reference/networkmanagement/rest", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-cloud-network_management-v1/.rubocop.yml b/owl-bot-staging/google-cloud-network_management-v1/.rubocop.yml new file mode 100644 index 000000000000..d9210d1d63c6 --- /dev/null +++ b/owl-bot-staging/google-cloud-network_management-v1/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-cloud-network_management-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-network_management-v1.rb" diff --git a/owl-bot-staging/google-cloud-network_management-v1/.toys.rb b/owl-bot-staging/google-cloud-network_management-v1/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-cloud-network_management-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-network_management-v1/.yardopts b/owl-bot-staging/google-cloud-network_management-v1/.yardopts new file mode 100644 index 000000000000..f79479aa57af --- /dev/null +++ b/owl-bot-staging/google-cloud-network_management-v1/.yardopts @@ -0,0 +1,12 @@ +--no-private +--title="Network Management 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-network_management-v1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-network_management-v1/AUTHENTICATION.md new file mode 100644 index 000000000000..df8ce97a88d6 --- /dev/null +++ b/owl-bot-staging/google-cloud-network_management-v1/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-cloud-network_management-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-network_management-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/network_management/v1" + +client = ::Google::Cloud::NetworkManagement::V1::ReachabilityService::Client.new do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/cloud/network_management/v1" + +::Google::Cloud::NetworkManagement::V1::ReachabilityService::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Cloud::NetworkManagement::V1::ReachabilityService::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-network_management-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/network_management/v1" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Cloud::NetworkManagement::V1::ReachabilityService::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-network_management-v1/CHANGELOG.md b/owl-bot-staging/google-cloud-network_management-v1/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-cloud-network_management-v1/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-cloud-network_management-v1/Gemfile b/owl-bot-staging/google-cloud-network_management-v1/Gemfile new file mode 100644 index 000000000000..6442df18fa2f --- /dev/null +++ b/owl-bot-staging/google-cloud-network_management-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-network_management-v1/LICENSE.md b/owl-bot-staging/google-cloud-network_management-v1/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-cloud-network_management-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-network_management-v1/README.md b/owl-bot-staging/google-cloud-network_management-v1/README.md new file mode 100644 index 000000000000..0d5e68b51b8d --- /dev/null +++ b/owl-bot-staging/google-cloud-network_management-v1/README.md @@ -0,0 +1,153 @@ +# Ruby Client for the Network Management V1 API + +The Network Management API provides a collection of network performance monitoring and diagnostic capabilities. + + +https://github.com/googleapis/google-cloud-ruby + +This gem is a _versioned_ client. It provides basic client classes for a +specific version of the Network Management V1 API. Most users should consider using +the main client gem, +[google-cloud-network_management](https://rubygems.org/gems/google-cloud-network_management). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-cloud-network_management-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/networkmanagement.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## Quick Start + +```ruby +require "google/cloud/network_management/v1" + +client = ::Google::Cloud::NetworkManagement::V1::ReachabilityService::Client.new +request = ::Google::Cloud::NetworkManagement::V1::ListConnectivityTestsRequest.new # (request fields as keyword arguments...) +response = client.list_connectivity_tests request +``` + +View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-network_management-v1/latest) +for class and method documentation. + +See also the [Product Documentation](https://cloud.google.com/network-intelligence-center/docs/connectivity-tests/reference/networkmanagement/rest) +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/network_management/v1" +require "logger" + +client = ::Google::Cloud::NetworkManagement::V1::ReachabilityService::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-network_management`, +and lower-level _versioned_ client libraries with names such as +`google-cloud-network_management-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-network_management`. +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-network_management-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-network_management-v1/Rakefile b/owl-bot-staging/google-cloud-network_management-v1/Rakefile new file mode 100644 index 000000000000..f6e41fc4e5a1 --- /dev/null +++ b/owl-bot-staging/google-cloud-network_management-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-network_management-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/network_management/v1/reachability_service/credentials" + ::Google::Cloud::NetworkManagement::V1::ReachabilityService::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-network_management-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-network_management-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-network_management-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-network_management-v1 gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-cloud-network_management-v1" + header "google-cloud-network_management-v1 rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-cloud-network_management-v1 yard", "*" + Rake::Task[:yard].invoke + header "google-cloud-network_management-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-network_management-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-network_management-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-network_management-v1/gapic_metadata.json b/owl-bot-staging/google-cloud-network_management-v1/gapic_metadata.json new file mode 100644 index 000000000000..47dcb121adc7 --- /dev/null +++ b/owl-bot-staging/google-cloud-network_management-v1/gapic_metadata.json @@ -0,0 +1,126 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "ruby", + "protoPackage": "google.cloud.networkmanagement.v1", + "libraryPackage": "::Google::Cloud::NetworkManagement::V1", + "services": { + "ReachabilityService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::NetworkManagement::V1::ReachabilityService::Client", + "rpcs": { + "ListConnectivityTests": { + "methods": [ + "list_connectivity_tests" + ] + }, + "GetConnectivityTest": { + "methods": [ + "get_connectivity_test" + ] + }, + "CreateConnectivityTest": { + "methods": [ + "create_connectivity_test" + ] + }, + "UpdateConnectivityTest": { + "methods": [ + "update_connectivity_test" + ] + }, + "RerunConnectivityTest": { + "methods": [ + "rerun_connectivity_test" + ] + }, + "DeleteConnectivityTest": { + "methods": [ + "delete_connectivity_test" + ] + } + } + } + } + }, + "VpcFlowLogsService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::NetworkManagement::V1::VpcFlowLogsService::Client", + "rpcs": { + "ListVpcFlowLogsConfigs": { + "methods": [ + "list_vpc_flow_logs_configs" + ] + }, + "GetVpcFlowLogsConfig": { + "methods": [ + "get_vpc_flow_logs_config" + ] + }, + "CreateVpcFlowLogsConfig": { + "methods": [ + "create_vpc_flow_logs_config" + ] + }, + "UpdateVpcFlowLogsConfig": { + "methods": [ + "update_vpc_flow_logs_config" + ] + }, + "DeleteVpcFlowLogsConfig": { + "methods": [ + "delete_vpc_flow_logs_config" + ] + }, + "QueryOrgVpcFlowLogsConfigs": { + "methods": [ + "query_org_vpc_flow_logs_configs" + ] + }, + "ShowEffectiveFlowLogsConfigs": { + "methods": [ + "show_effective_flow_logs_configs" + ] + } + } + } + } + }, + "OrganizationVpcFlowLogsService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::NetworkManagement::V1::OrganizationVpcFlowLogsService::Client", + "rpcs": { + "ListVpcFlowLogsConfigs": { + "methods": [ + "list_vpc_flow_logs_configs" + ] + }, + "GetVpcFlowLogsConfig": { + "methods": [ + "get_vpc_flow_logs_config" + ] + }, + "CreateVpcFlowLogsConfig": { + "methods": [ + "create_vpc_flow_logs_config" + ] + }, + "UpdateVpcFlowLogsConfig": { + "methods": [ + "update_vpc_flow_logs_config" + ] + }, + "DeleteVpcFlowLogsConfig": { + "methods": [ + "delete_vpc_flow_logs_config" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-cloud-network_management-v1/google-cloud-network_management-v1.gemspec b/owl-bot-staging/google-cloud-network_management-v1/google-cloud-network_management-v1.gemspec new file mode 100644 index 000000000000..dc189a3bd4d3 --- /dev/null +++ b/owl-bot-staging/google-cloud-network_management-v1/google-cloud-network_management-v1.gemspec @@ -0,0 +1,30 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/cloud/network_management/v1/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-cloud-network_management-v1" + gem.version = Google::Cloud::NetworkManagement::V1::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "The Network Management API provides a collection of network performance monitoring and diagnostic capabilities. Note that google-cloud-network_management-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-network_management instead. See the readme for more details." + gem.summary = "The Network Management API provides a collection of network performance monitoring and diagnostic capabilities." + 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" + gem.add_dependency "google-iam-v1", "~> 1.3" +end diff --git a/owl-bot-staging/google-cloud-network_management-v1/lib/google-cloud-network_management-v1.rb b/owl-bot-staging/google-cloud-network_management-v1/lib/google-cloud-network_management-v1.rb new file mode 100644 index 000000000000..fc0e794a1e58 --- /dev/null +++ b/owl-bot-staging/google-cloud-network_management-v1/lib/google-cloud-network_management-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/network_management/v1" diff --git a/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1.rb b/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1.rb new file mode 100644 index 000000000000..0a43718af857 --- /dev/null +++ b/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1.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 "google/cloud/network_management/v1/reachability_service" +require "google/cloud/network_management/v1/vpc_flow_logs_service" +require "google/cloud/network_management/v1/organization_vpc_flow_logs_service" +require "google/cloud/network_management/v1/version" + +module Google + module Cloud + module NetworkManagement + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/cloud/network_management/v1" + # client = ::Google::Cloud::NetworkManagement::V1::ReachabilityService::Client.new + # + # @example Load this package, including all its services, and instantiate a REST client + # + # require "google/cloud/network_management/v1" + # client = ::Google::Cloud::NetworkManagement::V1::ReachabilityService::Rest::Client.new + # + module V1 + end + end + end +end + +helper_path = ::File.join __dir__, "v1", "_helpers.rb" +require "google/cloud/network_management/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/bindings_override.rb b/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/bindings_override.rb new file mode 100644 index 000000000000..80b6802699fa --- /dev/null +++ b/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/bindings_override.rb @@ -0,0 +1,124 @@ +# 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 NetworkManagement + ## + # @example Loading just the REST part of this package, including all its services, and instantiating a REST client + # + # require "google/cloud/network_management/v1/rest" + # client = ::Google::Cloud::NetworkManagement::V1::ReachabilityService::Rest::Client.new + # + module V1 + ## + # @private + # Initialize the mixin bindings configuration + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "NetworkManagement"] + 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 + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/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 + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :get, + uri_template: "/v1/{name}/locations", + matches: [ + ["name", %r{^organizations/[^/]+/?$}, false] + ], + body: nil + ) + ] + default_config.bindings_override["google.iam.v1.IAMPolicy.GetIamPolicy"] = [ + + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :get, + uri_template: "/v1/{resource}:getIamPolicy", + matches: [ + ["resource", %r{^projects/[^/]+/locations/global/connectivityTests/[^/]+/?$}, false] + ], + body: nil + ) + ] + default_config.bindings_override["google.iam.v1.IAMPolicy.SetIamPolicy"] = [ + + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :post, + uri_template: "/v1/{resource}:setIamPolicy", + matches: [ + ["resource", %r{^projects/[^/]+/locations/global/connectivityTests/[^/]+/?$}, false] + ], + body: "*" + ) + ] + default_config.bindings_override["google.iam.v1.IAMPolicy.TestIamPermissions"] = [ + + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :post, + uri_template: "/v1/{resource}:testIamPermissions", + matches: [ + ["resource", %r{^projects/[^/]+/locations/global/connectivityTests/[^/]+/?$}, false] + ], + body: "*" + ) + ] + default_config + end + yield @configure if block_given? + @configure + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/organization_vpc_flow_logs_service.rb b/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/organization_vpc_flow_logs_service.rb new file mode 100644 index 000000000000..6686a8eb90ba --- /dev/null +++ b/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/organization_vpc_flow_logs_service.rb @@ -0,0 +1,59 @@ +# 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/network_management/v1/version" + +require "google/cloud/network_management/v1/organization_vpc_flow_logs_service/credentials" +require "google/cloud/network_management/v1/organization_vpc_flow_logs_service/paths" +require "google/cloud/network_management/v1/organization_vpc_flow_logs_service/operations" +require "google/cloud/network_management/v1/organization_vpc_flow_logs_service/client" +require "google/cloud/network_management/v1/organization_vpc_flow_logs_service/rest" + +module Google + module Cloud + module NetworkManagement + module V1 + ## + # The VPC Flow Logs organization service in the Google Cloud Network Management + # API provides organization level configurations that generate Flow Logs. The + # service and the configuration resources created using this service are + # global. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/network_management/v1/organization_vpc_flow_logs_service" + # client = ::Google::Cloud::NetworkManagement::V1::OrganizationVpcFlowLogsService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/network_management/v1/organization_vpc_flow_logs_service/rest" + # client = ::Google::Cloud::NetworkManagement::V1::OrganizationVpcFlowLogsService::Rest::Client.new + # + module OrganizationVpcFlowLogsService + end + end + end + end +end + +helper_path = ::File.join __dir__, "organization_vpc_flow_logs_service", "helpers.rb" +require "google/cloud/network_management/v1/organization_vpc_flow_logs_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/organization_vpc_flow_logs_service/client.rb b/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/organization_vpc_flow_logs_service/client.rb new file mode 100644 index 000000000000..05e9b74f6152 --- /dev/null +++ b/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/organization_vpc_flow_logs_service/client.rb @@ -0,0 +1,1002 @@ +# 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/networkmanagement/v1/vpc_flow_logs_pb" +require "google/cloud/location" +require "google/iam/v1" + +module Google + module Cloud + module NetworkManagement + module V1 + module OrganizationVpcFlowLogsService + ## + # Client for the OrganizationVpcFlowLogsService service. + # + # The VPC Flow Logs organization service in the Google Cloud Network Management + # API provides organization level configurations that generate Flow Logs. The + # service and the configuration resources created using this service are + # global. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "networkmanagement.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :organization_vpc_flow_logs_service_stub + + ## + # Configure the OrganizationVpcFlowLogsService Client class. + # + # See {::Google::Cloud::NetworkManagement::V1::OrganizationVpcFlowLogsService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all OrganizationVpcFlowLogsService clients + # ::Google::Cloud::NetworkManagement::V1::OrganizationVpcFlowLogsService::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", "NetworkManagement", "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 OrganizationVpcFlowLogsService 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::NetworkManagement::V1::OrganizationVpcFlowLogsService::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 + @organization_vpc_flow_logs_service_stub.universe_domain + end + + ## + # Create a new OrganizationVpcFlowLogsService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::NetworkManagement::V1::OrganizationVpcFlowLogsService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::NetworkManagement::V1::OrganizationVpcFlowLogsService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the OrganizationVpcFlowLogsService 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/networkmanagement/v1/vpc_flow_logs_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 + + @organization_vpc_flow_logs_service_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::NetworkManagement::V1::OrganizationVpcFlowLogsService::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 + ) + + @organization_vpc_flow_logs_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 = @organization_vpc_flow_logs_service_stub.endpoint + config.universe_domain = @organization_vpc_flow_logs_service_stub.universe_domain + config.logger = @organization_vpc_flow_logs_service_stub.logger if config.respond_to? :logger= + end + + @iam_policy_client = Google::Iam::V1::IAMPolicy::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @organization_vpc_flow_logs_service_stub.endpoint + config.universe_domain = @organization_vpc_flow_logs_service_stub.universe_domain + config.logger = @organization_vpc_flow_logs_service_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::NetworkManagement::V1::OrganizationVpcFlowLogsService::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 + + ## + # Get the associated client for mix-in of the IAMPolicy. + # + # @return [Google::Iam::V1::IAMPolicy::Client] + # + attr_reader :iam_policy_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @organization_vpc_flow_logs_service_stub.logger + end + + # Service calls + + ## + # Lists all `VpcFlowLogsConfigs` in a given organization. + # + # @overload list_vpc_flow_logs_configs(request, options = nil) + # Pass arguments to `list_vpc_flow_logs_configs` via a request object, either of type + # {::Google::Cloud::NetworkManagement::V1::ListVpcFlowLogsConfigsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkManagement::V1::ListVpcFlowLogsConfigsRequest, ::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_vpc_flow_logs_configs(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_vpc_flow_logs_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. The parent resource of the VpcFlowLogsConfig, + # in one of the following formats: + # + # - For project-level resources: `projects/{project_id}/locations/global` + # + # - For organization-level resources: + # `organizations/{organization_id}/locations/global` + # @param page_size [::Integer] + # Optional. Number of `VpcFlowLogsConfigs` to return. + # @param page_token [::String] + # Optional. Page token from an earlier query, as returned in + # `next_page_token`. + # @param filter [::String] + # Optional. Lists the `VpcFlowLogsConfigs` that match the filter expression. + # A filter expression must use the supported [CEL logic operators] + # (https://cloud.google.com/vpc/docs/about-flow-logs-records#supported_cel_logic_operators). + # @param order_by [::String] + # Optional. Field to use to sort the list. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::NetworkManagement::V1::VpcFlowLogsConfig>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::NetworkManagement::V1::VpcFlowLogsConfig>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/network_management/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkManagement::V1::OrganizationVpcFlowLogsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkManagement::V1::ListVpcFlowLogsConfigsRequest.new + # + # # Call the list_vpc_flow_logs_configs method. + # result = client.list_vpc_flow_logs_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::NetworkManagement::V1::VpcFlowLogsConfig. + # p item + # end + # + def list_vpc_flow_logs_configs request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkManagement::V1::ListVpcFlowLogsConfigsRequest + + # 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_vpc_flow_logs_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::NetworkManagement::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_vpc_flow_logs_configs.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_vpc_flow_logs_configs.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @organization_vpc_flow_logs_service_stub.call_rpc :list_vpc_flow_logs_configs, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @organization_vpc_flow_logs_service_stub, :list_vpc_flow_logs_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 + + ## + # Gets the details of a specific `VpcFlowLogsConfig`. + # + # @overload get_vpc_flow_logs_config(request, options = nil) + # Pass arguments to `get_vpc_flow_logs_config` via a request object, either of type + # {::Google::Cloud::NetworkManagement::V1::GetVpcFlowLogsConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkManagement::V1::GetVpcFlowLogsConfigRequest, ::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_vpc_flow_logs_config(name: nil) + # Pass arguments to `get_vpc_flow_logs_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. The resource name of the VpcFlowLogsConfig, + # in one of the following formats: + # + # - For project-level resources: + # `projects/{project_id}/locations/global/vpcFlowLogsConfigs/{vpc_flow_logs_config_id}` + # + # - For organization-level resources: + # `organizations/{organization_id}/locations/global/vpcFlowLogsConfigs/{vpc_flow_logs_config_id}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::NetworkManagement::V1::VpcFlowLogsConfig] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::NetworkManagement::V1::VpcFlowLogsConfig] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/network_management/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkManagement::V1::OrganizationVpcFlowLogsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkManagement::V1::GetVpcFlowLogsConfigRequest.new + # + # # Call the get_vpc_flow_logs_config method. + # result = client.get_vpc_flow_logs_config request + # + # # The returned object is of type Google::Cloud::NetworkManagement::V1::VpcFlowLogsConfig. + # p result + # + def get_vpc_flow_logs_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkManagement::V1::GetVpcFlowLogsConfigRequest + + # 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_vpc_flow_logs_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::NetworkManagement::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_vpc_flow_logs_config.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_vpc_flow_logs_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @organization_vpc_flow_logs_service_stub.call_rpc :get_vpc_flow_logs_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 + + ## + # Creates a new `VpcFlowLogsConfig`. + # If a configuration with the exact same settings already exists (even if the + # ID is different), the creation fails. + # Notes: + # + # 1. Creating a configuration with `state=DISABLED` will fail + # 2. The following fields are not considered as settings for the purpose + # of the check mentioned above, therefore - creating another configuration + # with the same fields but different values for the following fields will + # fail as well: + # * name + # * create_time + # * update_time + # * labels + # * description + # + # @overload create_vpc_flow_logs_config(request, options = nil) + # Pass arguments to `create_vpc_flow_logs_config` via a request object, either of type + # {::Google::Cloud::NetworkManagement::V1::CreateVpcFlowLogsConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkManagement::V1::CreateVpcFlowLogsConfigRequest, ::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_vpc_flow_logs_config(parent: nil, vpc_flow_logs_config_id: nil, vpc_flow_logs_config: nil) + # Pass arguments to `create_vpc_flow_logs_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. The parent resource of the VpcFlowLogsConfig to create, + # in one of the following formats: + # + # - For project-level resources: `projects/{project_id}/locations/global` + # + # - For organization-level resources: + # `organizations/{organization_id}/locations/global` + # @param vpc_flow_logs_config_id [::String] + # Required. ID of the `VpcFlowLogsConfig`. + # @param vpc_flow_logs_config [::Google::Cloud::NetworkManagement::V1::VpcFlowLogsConfig, ::Hash] + # Required. A `VpcFlowLogsConfig` 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/network_management/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkManagement::V1::OrganizationVpcFlowLogsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkManagement::V1::CreateVpcFlowLogsConfigRequest.new + # + # # Call the create_vpc_flow_logs_config method. + # result = client.create_vpc_flow_logs_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_vpc_flow_logs_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkManagement::V1::CreateVpcFlowLogsConfigRequest + + # 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_vpc_flow_logs_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::NetworkManagement::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_vpc_flow_logs_config.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_vpc_flow_logs_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @organization_vpc_flow_logs_service_stub.call_rpc :create_vpc_flow_logs_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 + + ## + # Updates an existing `VpcFlowLogsConfig`. + # If a configuration with the exact same settings already exists (even if the + # ID is different), the creation fails. + # Notes: + # + # 1. Updating a configuration with `state=DISABLED` will fail + # 2. The following fields are not considered as settings for the purpose + # of the check mentioned above, therefore - updating another configuration + # with the same fields but different values for the following fields will + # fail as well: + # * name + # * create_time + # * update_time + # * labels + # * description + # + # @overload update_vpc_flow_logs_config(request, options = nil) + # Pass arguments to `update_vpc_flow_logs_config` via a request object, either of type + # {::Google::Cloud::NetworkManagement::V1::UpdateVpcFlowLogsConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkManagement::V1::UpdateVpcFlowLogsConfigRequest, ::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_vpc_flow_logs_config(update_mask: nil, vpc_flow_logs_config: nil) + # Pass arguments to `update_vpc_flow_logs_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 update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. Mask of fields to update. At least one path must be supplied in + # this field. + # For example, to change the state of the configuration to ENABLED, specify + # `update_mask` = `"state"`, and the `vpc_flow_logs_config` would be: + # `vpc_flow_logs_config = { + # name = + # "projects/my-project/locations/global/vpcFlowLogsConfigs/my-config" + # state = "ENABLED" }` + # @param vpc_flow_logs_config [::Google::Cloud::NetworkManagement::V1::VpcFlowLogsConfig, ::Hash] + # Required. Only fields specified in update_mask are updated. + # + # @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/network_management/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkManagement::V1::OrganizationVpcFlowLogsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkManagement::V1::UpdateVpcFlowLogsConfigRequest.new + # + # # Call the update_vpc_flow_logs_config method. + # result = client.update_vpc_flow_logs_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_vpc_flow_logs_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkManagement::V1::UpdateVpcFlowLogsConfigRequest + + # 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_vpc_flow_logs_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::NetworkManagement::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.vpc_flow_logs_config&.name + header_params["vpc_flow_logs_config.name"] = request.vpc_flow_logs_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_vpc_flow_logs_config.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_vpc_flow_logs_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @organization_vpc_flow_logs_service_stub.call_rpc :update_vpc_flow_logs_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 specific `VpcFlowLogsConfig`. + # + # @overload delete_vpc_flow_logs_config(request, options = nil) + # Pass arguments to `delete_vpc_flow_logs_config` via a request object, either of type + # {::Google::Cloud::NetworkManagement::V1::DeleteVpcFlowLogsConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkManagement::V1::DeleteVpcFlowLogsConfigRequest, ::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_vpc_flow_logs_config(name: nil) + # Pass arguments to `delete_vpc_flow_logs_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. The resource name of the VpcFlowLogsConfig, + # in one of the following formats: + # + # - For a project-level resource: + # `projects/{project_id}/locations/global/vpcFlowLogsConfigs/{vpc_flow_logs_config_id}` + # + # - For an organization-level resource: + # `organizations/{organization_id}/locations/global/vpcFlowLogsConfigs/{vpc_flow_logs_config_id}` + # + # @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/network_management/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkManagement::V1::OrganizationVpcFlowLogsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkManagement::V1::DeleteVpcFlowLogsConfigRequest.new + # + # # Call the delete_vpc_flow_logs_config method. + # result = client.delete_vpc_flow_logs_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_vpc_flow_logs_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkManagement::V1::DeleteVpcFlowLogsConfigRequest + + # 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_vpc_flow_logs_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::NetworkManagement::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_vpc_flow_logs_config.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_vpc_flow_logs_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @organization_vpc_flow_logs_service_stub.call_rpc :delete_vpc_flow_logs_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 + + ## + # Configuration class for the OrganizationVpcFlowLogsService API. + # + # This class represents the configuration for OrganizationVpcFlowLogsService, + # 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::NetworkManagement::V1::OrganizationVpcFlowLogsService::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_vpc_flow_logs_configs to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::NetworkManagement::V1::OrganizationVpcFlowLogsService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_vpc_flow_logs_configs.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::NetworkManagement::V1::OrganizationVpcFlowLogsService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_vpc_flow_logs_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::NetworkManagement::V1::OrganizationVpcFlowLogsService::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 = "networkmanagement.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 OrganizationVpcFlowLogsService 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_vpc_flow_logs_configs` + # @return [::Gapic::Config::Method] + # + attr_reader :list_vpc_flow_logs_configs + ## + # RPC-specific configuration for `get_vpc_flow_logs_config` + # @return [::Gapic::Config::Method] + # + attr_reader :get_vpc_flow_logs_config + ## + # RPC-specific configuration for `create_vpc_flow_logs_config` + # @return [::Gapic::Config::Method] + # + attr_reader :create_vpc_flow_logs_config + ## + # RPC-specific configuration for `update_vpc_flow_logs_config` + # @return [::Gapic::Config::Method] + # + attr_reader :update_vpc_flow_logs_config + ## + # RPC-specific configuration for `delete_vpc_flow_logs_config` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_vpc_flow_logs_config + + # @private + def initialize parent_rpcs = nil + list_vpc_flow_logs_configs_config = parent_rpcs.list_vpc_flow_logs_configs if parent_rpcs.respond_to? :list_vpc_flow_logs_configs + @list_vpc_flow_logs_configs = ::Gapic::Config::Method.new list_vpc_flow_logs_configs_config + get_vpc_flow_logs_config_config = parent_rpcs.get_vpc_flow_logs_config if parent_rpcs.respond_to? :get_vpc_flow_logs_config + @get_vpc_flow_logs_config = ::Gapic::Config::Method.new get_vpc_flow_logs_config_config + create_vpc_flow_logs_config_config = parent_rpcs.create_vpc_flow_logs_config if parent_rpcs.respond_to? :create_vpc_flow_logs_config + @create_vpc_flow_logs_config = ::Gapic::Config::Method.new create_vpc_flow_logs_config_config + update_vpc_flow_logs_config_config = parent_rpcs.update_vpc_flow_logs_config if parent_rpcs.respond_to? :update_vpc_flow_logs_config + @update_vpc_flow_logs_config = ::Gapic::Config::Method.new update_vpc_flow_logs_config_config + delete_vpc_flow_logs_config_config = parent_rpcs.delete_vpc_flow_logs_config if parent_rpcs.respond_to? :delete_vpc_flow_logs_config + @delete_vpc_flow_logs_config = ::Gapic::Config::Method.new delete_vpc_flow_logs_config_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/organization_vpc_flow_logs_service/credentials.rb b/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/organization_vpc_flow_logs_service/credentials.rb new file mode 100644 index 000000000000..7c78a19679d1 --- /dev/null +++ b/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/organization_vpc_flow_logs_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 NetworkManagement + module V1 + module OrganizationVpcFlowLogsService + # Credentials for the OrganizationVpcFlowLogsService 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-network_management-v1/lib/google/cloud/network_management/v1/organization_vpc_flow_logs_service/operations.rb b/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/organization_vpc_flow_logs_service/operations.rb new file mode 100644 index 000000000000..f24a717b9035 --- /dev/null +++ b/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/organization_vpc_flow_logs_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 NetworkManagement + module V1 + module OrganizationVpcFlowLogsService + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "networkmanagement.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the OrganizationVpcFlowLogsService 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 OrganizationVpcFlowLogsService 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::NetworkManagement::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::NetworkManagement::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::NetworkManagement::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::NetworkManagement::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::NetworkManagement::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 = "networkmanagement.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-network_management-v1/lib/google/cloud/network_management/v1/organization_vpc_flow_logs_service/paths.rb b/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/organization_vpc_flow_logs_service/paths.rb new file mode 100644 index 000000000000..ec6736715647 --- /dev/null +++ b/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/organization_vpc_flow_logs_service/paths.rb @@ -0,0 +1,110 @@ +# 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 NetworkManagement + module V1 + module OrganizationVpcFlowLogsService + # Path helper methods for the OrganizationVpcFlowLogsService API. + module Paths + ## + # 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 OrganizationLocation resource string. + # + # The resource will be in the following format: + # + # `organizations/{organization}/locations/{location}` + # + # @param organization [String] + # @param location [String] + # + # @return [::String] + def organization_location_path organization:, location: + raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" + + "organizations/#{organization}/locations/#{location}" + end + + ## + # Create a fully-qualified VpcFlowLogsConfig resource string. + # + # @overload vpc_flow_logs_config_path(project:, location:, vpc_flow_logs_config:) + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/vpcFlowLogsConfigs/{vpc_flow_logs_config}` + # + # @param project [String] + # @param location [String] + # @param vpc_flow_logs_config [String] + # + # @overload vpc_flow_logs_config_path(organization:, location:, vpc_flow_logs_config:) + # The resource will be in the following format: + # + # `organizations/{organization}/locations/{location}/vpcFlowLogsConfigs/{vpc_flow_logs_config}` + # + # @param organization [String] + # @param location [String] + # @param vpc_flow_logs_config [String] + # + # @return [::String] + def vpc_flow_logs_config_path **args + resources = { + "location:project:vpc_flow_logs_config" => (proc do |project:, location:, vpc_flow_logs_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}/vpcFlowLogsConfigs/#{vpc_flow_logs_config}" + end), + "location:organization:vpc_flow_logs_config" => (proc do |organization:, location:, vpc_flow_logs_config:| + raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "organizations/#{organization}/locations/#{location}/vpcFlowLogsConfigs/#{vpc_flow_logs_config}" + end) + } + + resource = resources[args.keys.sort.join(":")] + raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? + resource.call(**args) + end + + extend self + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/organization_vpc_flow_logs_service/rest.rb b/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/organization_vpc_flow_logs_service/rest.rb new file mode 100644 index 000000000000..443afce82eb8 --- /dev/null +++ b/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/organization_vpc_flow_logs_service/rest.rb @@ -0,0 +1,57 @@ +# 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/network_management/v1/version" +require "google/cloud/network_management/v1/bindings_override" + +require "google/cloud/network_management/v1/organization_vpc_flow_logs_service/credentials" +require "google/cloud/network_management/v1/organization_vpc_flow_logs_service/paths" +require "google/cloud/network_management/v1/organization_vpc_flow_logs_service/rest/operations" +require "google/cloud/network_management/v1/organization_vpc_flow_logs_service/rest/client" + +module Google + module Cloud + module NetworkManagement + module V1 + ## + # The VPC Flow Logs organization service in the Google Cloud Network Management + # API provides organization level configurations that generate Flow Logs. The + # service and the configuration resources created using this service are + # global. + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/network_management/v1/organization_vpc_flow_logs_service/rest" + # client = ::Google::Cloud::NetworkManagement::V1::OrganizationVpcFlowLogsService::Rest::Client.new + # + module OrganizationVpcFlowLogsService + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/network_management/v1/organization_vpc_flow_logs_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/organization_vpc_flow_logs_service/rest/client.rb b/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/organization_vpc_flow_logs_service/rest/client.rb new file mode 100644 index 000000000000..e6dad09ba975 --- /dev/null +++ b/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/organization_vpc_flow_logs_service/rest/client.rb @@ -0,0 +1,933 @@ +# 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/networkmanagement/v1/vpc_flow_logs_pb" +require "google/cloud/network_management/v1/organization_vpc_flow_logs_service/rest/service_stub" +require "google/cloud/location/rest" +require "google/iam/v1/rest" + +module Google + module Cloud + module NetworkManagement + module V1 + module OrganizationVpcFlowLogsService + module Rest + ## + # REST client for the OrganizationVpcFlowLogsService service. + # + # The VPC Flow Logs organization service in the Google Cloud Network Management + # API provides organization level configurations that generate Flow Logs. The + # service and the configuration resources created using this service are + # global. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "networkmanagement.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :organization_vpc_flow_logs_service_stub + + ## + # Configure the OrganizationVpcFlowLogsService Client class. + # + # See {::Google::Cloud::NetworkManagement::V1::OrganizationVpcFlowLogsService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all OrganizationVpcFlowLogsService clients + # ::Google::Cloud::NetworkManagement::V1::OrganizationVpcFlowLogsService::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", "NetworkManagement", "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 OrganizationVpcFlowLogsService 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::NetworkManagement::V1::OrganizationVpcFlowLogsService::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 + @organization_vpc_flow_logs_service_stub.universe_domain + end + + ## + # Create a new OrganizationVpcFlowLogsService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::NetworkManagement::V1::OrganizationVpcFlowLogsService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::NetworkManagement::V1::OrganizationVpcFlowLogsService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the OrganizationVpcFlowLogsService 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::NetworkManagement::V1::OrganizationVpcFlowLogsService::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 + + @organization_vpc_flow_logs_service_stub = ::Google::Cloud::NetworkManagement::V1::OrganizationVpcFlowLogsService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @organization_vpc_flow_logs_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 = @organization_vpc_flow_logs_service_stub.endpoint + config.universe_domain = @organization_vpc_flow_logs_service_stub.universe_domain + config.bindings_override = @config.bindings_override + config.logger = @organization_vpc_flow_logs_service_stub.logger if config.respond_to? :logger= + end + + @iam_policy_client = Google::Iam::V1::IAMPolicy::Rest::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @organization_vpc_flow_logs_service_stub.endpoint + config.universe_domain = @organization_vpc_flow_logs_service_stub.universe_domain + config.bindings_override = @config.bindings_override + config.logger = @organization_vpc_flow_logs_service_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::NetworkManagement::V1::OrganizationVpcFlowLogsService::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 + + ## + # Get the associated client for mix-in of the IAMPolicy. + # + # @return [Google::Iam::V1::IAMPolicy::Rest::Client] + # + attr_reader :iam_policy_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @organization_vpc_flow_logs_service_stub.logger + end + + # Service calls + + ## + # Lists all `VpcFlowLogsConfigs` in a given organization. + # + # @overload list_vpc_flow_logs_configs(request, options = nil) + # Pass arguments to `list_vpc_flow_logs_configs` via a request object, either of type + # {::Google::Cloud::NetworkManagement::V1::ListVpcFlowLogsConfigsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkManagement::V1::ListVpcFlowLogsConfigsRequest, ::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_vpc_flow_logs_configs(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_vpc_flow_logs_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. The parent resource of the VpcFlowLogsConfig, + # in one of the following formats: + # + # - For project-level resources: `projects/{project_id}/locations/global` + # + # - For organization-level resources: + # `organizations/{organization_id}/locations/global` + # @param page_size [::Integer] + # Optional. Number of `VpcFlowLogsConfigs` to return. + # @param page_token [::String] + # Optional. Page token from an earlier query, as returned in + # `next_page_token`. + # @param filter [::String] + # Optional. Lists the `VpcFlowLogsConfigs` that match the filter expression. + # A filter expression must use the supported [CEL logic operators] + # (https://cloud.google.com/vpc/docs/about-flow-logs-records#supported_cel_logic_operators). + # @param order_by [::String] + # Optional. Field to use to sort the list. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkManagement::V1::VpcFlowLogsConfig>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkManagement::V1::VpcFlowLogsConfig>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/network_management/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkManagement::V1::OrganizationVpcFlowLogsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkManagement::V1::ListVpcFlowLogsConfigsRequest.new + # + # # Call the list_vpc_flow_logs_configs method. + # result = client.list_vpc_flow_logs_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::NetworkManagement::V1::VpcFlowLogsConfig. + # p item + # end + # + def list_vpc_flow_logs_configs request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkManagement::V1::ListVpcFlowLogsConfigsRequest + + # 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_vpc_flow_logs_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::NetworkManagement::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_vpc_flow_logs_configs.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_vpc_flow_logs_configs.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @organization_vpc_flow_logs_service_stub.list_vpc_flow_logs_configs request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @organization_vpc_flow_logs_service_stub, :list_vpc_flow_logs_configs, "vpc_flow_logs_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 + + ## + # Gets the details of a specific `VpcFlowLogsConfig`. + # + # @overload get_vpc_flow_logs_config(request, options = nil) + # Pass arguments to `get_vpc_flow_logs_config` via a request object, either of type + # {::Google::Cloud::NetworkManagement::V1::GetVpcFlowLogsConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkManagement::V1::GetVpcFlowLogsConfigRequest, ::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_vpc_flow_logs_config(name: nil) + # Pass arguments to `get_vpc_flow_logs_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. The resource name of the VpcFlowLogsConfig, + # in one of the following formats: + # + # - For project-level resources: + # `projects/{project_id}/locations/global/vpcFlowLogsConfigs/{vpc_flow_logs_config_id}` + # + # - For organization-level resources: + # `organizations/{organization_id}/locations/global/vpcFlowLogsConfigs/{vpc_flow_logs_config_id}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::NetworkManagement::V1::VpcFlowLogsConfig] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::NetworkManagement::V1::VpcFlowLogsConfig] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/network_management/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkManagement::V1::OrganizationVpcFlowLogsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkManagement::V1::GetVpcFlowLogsConfigRequest.new + # + # # Call the get_vpc_flow_logs_config method. + # result = client.get_vpc_flow_logs_config request + # + # # The returned object is of type Google::Cloud::NetworkManagement::V1::VpcFlowLogsConfig. + # p result + # + def get_vpc_flow_logs_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkManagement::V1::GetVpcFlowLogsConfigRequest + + # 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_vpc_flow_logs_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::NetworkManagement::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_vpc_flow_logs_config.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_vpc_flow_logs_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @organization_vpc_flow_logs_service_stub.get_vpc_flow_logs_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 + + ## + # Creates a new `VpcFlowLogsConfig`. + # If a configuration with the exact same settings already exists (even if the + # ID is different), the creation fails. + # Notes: + # + # 1. Creating a configuration with `state=DISABLED` will fail + # 2. The following fields are not considered as settings for the purpose + # of the check mentioned above, therefore - creating another configuration + # with the same fields but different values for the following fields will + # fail as well: + # * name + # * create_time + # * update_time + # * labels + # * description + # + # @overload create_vpc_flow_logs_config(request, options = nil) + # Pass arguments to `create_vpc_flow_logs_config` via a request object, either of type + # {::Google::Cloud::NetworkManagement::V1::CreateVpcFlowLogsConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkManagement::V1::CreateVpcFlowLogsConfigRequest, ::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_vpc_flow_logs_config(parent: nil, vpc_flow_logs_config_id: nil, vpc_flow_logs_config: nil) + # Pass arguments to `create_vpc_flow_logs_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. The parent resource of the VpcFlowLogsConfig to create, + # in one of the following formats: + # + # - For project-level resources: `projects/{project_id}/locations/global` + # + # - For organization-level resources: + # `organizations/{organization_id}/locations/global` + # @param vpc_flow_logs_config_id [::String] + # Required. ID of the `VpcFlowLogsConfig`. + # @param vpc_flow_logs_config [::Google::Cloud::NetworkManagement::V1::VpcFlowLogsConfig, ::Hash] + # Required. A `VpcFlowLogsConfig` 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/network_management/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkManagement::V1::OrganizationVpcFlowLogsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkManagement::V1::CreateVpcFlowLogsConfigRequest.new + # + # # Call the create_vpc_flow_logs_config method. + # result = client.create_vpc_flow_logs_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_vpc_flow_logs_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkManagement::V1::CreateVpcFlowLogsConfigRequest + + # 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_vpc_flow_logs_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::NetworkManagement::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_vpc_flow_logs_config.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_vpc_flow_logs_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @organization_vpc_flow_logs_service_stub.create_vpc_flow_logs_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 + + ## + # Updates an existing `VpcFlowLogsConfig`. + # If a configuration with the exact same settings already exists (even if the + # ID is different), the creation fails. + # Notes: + # + # 1. Updating a configuration with `state=DISABLED` will fail + # 2. The following fields are not considered as settings for the purpose + # of the check mentioned above, therefore - updating another configuration + # with the same fields but different values for the following fields will + # fail as well: + # * name + # * create_time + # * update_time + # * labels + # * description + # + # @overload update_vpc_flow_logs_config(request, options = nil) + # Pass arguments to `update_vpc_flow_logs_config` via a request object, either of type + # {::Google::Cloud::NetworkManagement::V1::UpdateVpcFlowLogsConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkManagement::V1::UpdateVpcFlowLogsConfigRequest, ::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_vpc_flow_logs_config(update_mask: nil, vpc_flow_logs_config: nil) + # Pass arguments to `update_vpc_flow_logs_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 update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. Mask of fields to update. At least one path must be supplied in + # this field. + # For example, to change the state of the configuration to ENABLED, specify + # `update_mask` = `"state"`, and the `vpc_flow_logs_config` would be: + # `vpc_flow_logs_config = { + # name = + # "projects/my-project/locations/global/vpcFlowLogsConfigs/my-config" + # state = "ENABLED" }` + # @param vpc_flow_logs_config [::Google::Cloud::NetworkManagement::V1::VpcFlowLogsConfig, ::Hash] + # Required. Only fields specified in update_mask are updated. + # @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/network_management/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkManagement::V1::OrganizationVpcFlowLogsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkManagement::V1::UpdateVpcFlowLogsConfigRequest.new + # + # # Call the update_vpc_flow_logs_config method. + # result = client.update_vpc_flow_logs_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_vpc_flow_logs_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkManagement::V1::UpdateVpcFlowLogsConfigRequest + + # 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_vpc_flow_logs_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::NetworkManagement::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_vpc_flow_logs_config.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_vpc_flow_logs_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @organization_vpc_flow_logs_service_stub.update_vpc_flow_logs_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 specific `VpcFlowLogsConfig`. + # + # @overload delete_vpc_flow_logs_config(request, options = nil) + # Pass arguments to `delete_vpc_flow_logs_config` via a request object, either of type + # {::Google::Cloud::NetworkManagement::V1::DeleteVpcFlowLogsConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkManagement::V1::DeleteVpcFlowLogsConfigRequest, ::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_vpc_flow_logs_config(name: nil) + # Pass arguments to `delete_vpc_flow_logs_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. The resource name of the VpcFlowLogsConfig, + # in one of the following formats: + # + # - For a project-level resource: + # `projects/{project_id}/locations/global/vpcFlowLogsConfigs/{vpc_flow_logs_config_id}` + # + # - For an organization-level resource: + # `organizations/{organization_id}/locations/global/vpcFlowLogsConfigs/{vpc_flow_logs_config_id}` + # @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/network_management/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkManagement::V1::OrganizationVpcFlowLogsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkManagement::V1::DeleteVpcFlowLogsConfigRequest.new + # + # # Call the delete_vpc_flow_logs_config method. + # result = client.delete_vpc_flow_logs_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_vpc_flow_logs_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkManagement::V1::DeleteVpcFlowLogsConfigRequest + + # 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_vpc_flow_logs_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::NetworkManagement::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_vpc_flow_logs_config.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_vpc_flow_logs_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @organization_vpc_flow_logs_service_stub.delete_vpc_flow_logs_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 + + ## + # Configuration class for the OrganizationVpcFlowLogsService REST API. + # + # This class represents the configuration for OrganizationVpcFlowLogsService 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::NetworkManagement::V1::OrganizationVpcFlowLogsService::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_vpc_flow_logs_configs to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::NetworkManagement::V1::OrganizationVpcFlowLogsService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_vpc_flow_logs_configs.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::NetworkManagement::V1::OrganizationVpcFlowLogsService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_vpc_flow_logs_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 = "networkmanagement.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 OrganizationVpcFlowLogsService 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_vpc_flow_logs_configs` + # @return [::Gapic::Config::Method] + # + attr_reader :list_vpc_flow_logs_configs + ## + # RPC-specific configuration for `get_vpc_flow_logs_config` + # @return [::Gapic::Config::Method] + # + attr_reader :get_vpc_flow_logs_config + ## + # RPC-specific configuration for `create_vpc_flow_logs_config` + # @return [::Gapic::Config::Method] + # + attr_reader :create_vpc_flow_logs_config + ## + # RPC-specific configuration for `update_vpc_flow_logs_config` + # @return [::Gapic::Config::Method] + # + attr_reader :update_vpc_flow_logs_config + ## + # RPC-specific configuration for `delete_vpc_flow_logs_config` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_vpc_flow_logs_config + + # @private + def initialize parent_rpcs = nil + list_vpc_flow_logs_configs_config = parent_rpcs.list_vpc_flow_logs_configs if parent_rpcs.respond_to? :list_vpc_flow_logs_configs + @list_vpc_flow_logs_configs = ::Gapic::Config::Method.new list_vpc_flow_logs_configs_config + get_vpc_flow_logs_config_config = parent_rpcs.get_vpc_flow_logs_config if parent_rpcs.respond_to? :get_vpc_flow_logs_config + @get_vpc_flow_logs_config = ::Gapic::Config::Method.new get_vpc_flow_logs_config_config + create_vpc_flow_logs_config_config = parent_rpcs.create_vpc_flow_logs_config if parent_rpcs.respond_to? :create_vpc_flow_logs_config + @create_vpc_flow_logs_config = ::Gapic::Config::Method.new create_vpc_flow_logs_config_config + update_vpc_flow_logs_config_config = parent_rpcs.update_vpc_flow_logs_config if parent_rpcs.respond_to? :update_vpc_flow_logs_config + @update_vpc_flow_logs_config = ::Gapic::Config::Method.new update_vpc_flow_logs_config_config + delete_vpc_flow_logs_config_config = parent_rpcs.delete_vpc_flow_logs_config if parent_rpcs.respond_to? :delete_vpc_flow_logs_config + @delete_vpc_flow_logs_config = ::Gapic::Config::Method.new delete_vpc_flow_logs_config_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/organization_vpc_flow_logs_service/rest/operations.rb b/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/organization_vpc_flow_logs_service/rest/operations.rb new file mode 100644 index 000000000000..8a95f5bf3a64 --- /dev/null +++ b/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/organization_vpc_flow_logs_service/rest/operations.rb @@ -0,0 +1,954 @@ +# 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 NetworkManagement + module V1 + module OrganizationVpcFlowLogsService + module Rest + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "networkmanagement.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the OrganizationVpcFlowLogsService 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 OrganizationVpcFlowLogsService 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::NetworkManagement::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::NetworkManagement::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::NetworkManagement::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::NetworkManagement::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 = "networkmanagement.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/global/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}/operations", + matches: [ + ["name", %r{^organizations/[^/]+/locations/global/?$}, 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/global/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/locations/global/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/global/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/locations/global/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/global/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:cancel", + body: "*", + matches: [ + ["name", %r{^organizations/[^/]+/locations/global/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/organization_vpc_flow_logs_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/organization_vpc_flow_logs_service/rest/service_stub.rb new file mode 100644 index 000000000000..c9daa5a7f488 --- /dev/null +++ b/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/organization_vpc_flow_logs_service/rest/service_stub.rb @@ -0,0 +1,388 @@ +# 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/networkmanagement/v1/vpc_flow_logs_pb" + +module Google + module Cloud + module NetworkManagement + module V1 + module OrganizationVpcFlowLogsService + module Rest + ## + # REST service stub for the OrganizationVpcFlowLogsService 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_vpc_flow_logs_configs REST call + # + # @param request_pb [::Google::Cloud::NetworkManagement::V1::ListVpcFlowLogsConfigsRequest] + # 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::NetworkManagement::V1::ListVpcFlowLogsConfigsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::NetworkManagement::V1::ListVpcFlowLogsConfigsResponse] + # A result object deserialized from the server's reply + def list_vpc_flow_logs_configs request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_vpc_flow_logs_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_vpc_flow_logs_configs", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::NetworkManagement::V1::ListVpcFlowLogsConfigsResponse.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_vpc_flow_logs_config REST call + # + # @param request_pb [::Google::Cloud::NetworkManagement::V1::GetVpcFlowLogsConfigRequest] + # 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::NetworkManagement::V1::VpcFlowLogsConfig] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::NetworkManagement::V1::VpcFlowLogsConfig] + # A result object deserialized from the server's reply + def get_vpc_flow_logs_config request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_vpc_flow_logs_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_vpc_flow_logs_config", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::NetworkManagement::V1::VpcFlowLogsConfig.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_vpc_flow_logs_config REST call + # + # @param request_pb [::Google::Cloud::NetworkManagement::V1::CreateVpcFlowLogsConfigRequest] + # 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_vpc_flow_logs_config request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_vpc_flow_logs_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_vpc_flow_logs_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 update_vpc_flow_logs_config REST call + # + # @param request_pb [::Google::Cloud::NetworkManagement::V1::UpdateVpcFlowLogsConfigRequest] + # 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_vpc_flow_logs_config request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_vpc_flow_logs_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_vpc_flow_logs_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_vpc_flow_logs_config REST call + # + # @param request_pb [::Google::Cloud::NetworkManagement::V1::DeleteVpcFlowLogsConfigRequest] + # 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_vpc_flow_logs_config request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_vpc_flow_logs_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_vpc_flow_logs_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 + + ## + # @private + # + # GRPC transcoding helper method for the list_vpc_flow_logs_configs REST call + # + # @param request_pb [::Google::Cloud::NetworkManagement::V1::ListVpcFlowLogsConfigsRequest] + # 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_vpc_flow_logs_configs_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/vpcFlowLogsConfigs", + matches: [ + ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_vpc_flow_logs_config REST call + # + # @param request_pb [::Google::Cloud::NetworkManagement::V1::GetVpcFlowLogsConfigRequest] + # 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_vpc_flow_logs_config_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/locations/[^/]+/vpcFlowLogsConfigs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_vpc_flow_logs_config REST call + # + # @param request_pb [::Google::Cloud::NetworkManagement::V1::CreateVpcFlowLogsConfigRequest] + # 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_vpc_flow_logs_config_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/vpcFlowLogsConfigs", + body: "vpc_flow_logs_config", + matches: [ + ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_vpc_flow_logs_config REST call + # + # @param request_pb [::Google::Cloud::NetworkManagement::V1::UpdateVpcFlowLogsConfigRequest] + # 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_vpc_flow_logs_config_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{vpc_flow_logs_config.name}", + body: "vpc_flow_logs_config", + matches: [ + ["vpc_flow_logs_config.name", %r{^organizations/[^/]+/locations/[^/]+/vpcFlowLogsConfigs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_vpc_flow_logs_config REST call + # + # @param request_pb [::Google::Cloud::NetworkManagement::V1::DeleteVpcFlowLogsConfigRequest] + # 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_vpc_flow_logs_config_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/locations/[^/]+/vpcFlowLogsConfigs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/reachability_service.rb b/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/reachability_service.rb new file mode 100644 index 000000000000..9d50005b9ff4 --- /dev/null +++ b/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/reachability_service.rb @@ -0,0 +1,63 @@ +# 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/network_management/v1/version" + +require "google/cloud/network_management/v1/reachability_service/credentials" +require "google/cloud/network_management/v1/reachability_service/paths" +require "google/cloud/network_management/v1/reachability_service/operations" +require "google/cloud/network_management/v1/reachability_service/client" +require "google/cloud/network_management/v1/reachability_service/rest" + +module Google + module Cloud + module NetworkManagement + module V1 + ## + # The Reachability service in the Google Cloud Network Management API provides + # services that analyze the reachability within a single Google Virtual Private + # Cloud (VPC) network, between peered VPC networks, between VPC and on-premises + # networks, or between VPC networks and internet hosts. A reachability analysis + # is based on Google Cloud network configurations. + # + # You can use the analysis results to verify these configurations and + # to troubleshoot connectivity issues. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/network_management/v1/reachability_service" + # client = ::Google::Cloud::NetworkManagement::V1::ReachabilityService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/network_management/v1/reachability_service/rest" + # client = ::Google::Cloud::NetworkManagement::V1::ReachabilityService::Rest::Client.new + # + module ReachabilityService + end + end + end + end +end + +helper_path = ::File.join __dir__, "reachability_service", "helpers.rb" +require "google/cloud/network_management/v1/reachability_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/reachability_service/client.rb b/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/reachability_service/client.rb new file mode 100644 index 000000000000..f23d250e7e62 --- /dev/null +++ b/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/reachability_service/client.rb @@ -0,0 +1,1111 @@ +# 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/networkmanagement/v1/reachability_pb" +require "google/cloud/location" +require "google/iam/v1" + +module Google + module Cloud + module NetworkManagement + module V1 + module ReachabilityService + ## + # Client for the ReachabilityService service. + # + # The Reachability service in the Google Cloud Network Management API provides + # services that analyze the reachability within a single Google Virtual Private + # Cloud (VPC) network, between peered VPC networks, between VPC and on-premises + # networks, or between VPC networks and internet hosts. A reachability analysis + # is based on Google Cloud network configurations. + # + # You can use the analysis results to verify these configurations and + # to troubleshoot connectivity issues. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "networkmanagement.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :reachability_service_stub + + ## + # Configure the ReachabilityService Client class. + # + # See {::Google::Cloud::NetworkManagement::V1::ReachabilityService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all ReachabilityService clients + # ::Google::Cloud::NetworkManagement::V1::ReachabilityService::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", "NetworkManagement", "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.timeout = 60.0 + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the ReachabilityService 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::NetworkManagement::V1::ReachabilityService::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 + @reachability_service_stub.universe_domain + end + + ## + # Create a new ReachabilityService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::NetworkManagement::V1::ReachabilityService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::NetworkManagement::V1::ReachabilityService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the ReachabilityService 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/networkmanagement/v1/reachability_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 + + @reachability_service_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::NetworkManagement::V1::ReachabilityService::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 + ) + + @reachability_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 = @reachability_service_stub.endpoint + config.universe_domain = @reachability_service_stub.universe_domain + config.logger = @reachability_service_stub.logger if config.respond_to? :logger= + end + + @iam_policy_client = Google::Iam::V1::IAMPolicy::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @reachability_service_stub.endpoint + config.universe_domain = @reachability_service_stub.universe_domain + config.logger = @reachability_service_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::NetworkManagement::V1::ReachabilityService::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 + + ## + # Get the associated client for mix-in of the IAMPolicy. + # + # @return [Google::Iam::V1::IAMPolicy::Client] + # + attr_reader :iam_policy_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @reachability_service_stub.logger + end + + # Service calls + + ## + # Lists all Connectivity Tests owned by a project. + # + # @overload list_connectivity_tests(request, options = nil) + # Pass arguments to `list_connectivity_tests` via a request object, either of type + # {::Google::Cloud::NetworkManagement::V1::ListConnectivityTestsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkManagement::V1::ListConnectivityTestsRequest, ::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_connectivity_tests(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_connectivity_tests` 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 resource of the Connectivity Tests: + # `projects/{project_id}/locations/global` + # @param page_size [::Integer] + # Number of `ConnectivityTests` to return. + # @param page_token [::String] + # Page token from an earlier query, as returned in `next_page_token`. + # @param filter [::String] + # Lists the `ConnectivityTests` that match the filter expression. A filter + # expression filters the resources listed in the response. The expression + # must be of the form ` ` where operators: `<`, `>`, + # `<=`, + # `>=`, + # `!=`, `=`, `:` are supported (colon `:` represents a HAS operator which is + # roughly synonymous with equality). can refer to a proto or JSON + # field, or a synthetic field. Field names can be camelCase or snake_case. + # + # Examples: + # - Filter by name: + # name = "projects/proj-1/locations/global/connectivityTests/test-1 + # + # - Filter by labels: + # - Resources that have a key called `foo` + # labels.foo:* + # - Resources that have a key called `foo` whose value is `bar` + # labels.foo = bar + # @param order_by [::String] + # Field to use to sort the list. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::NetworkManagement::V1::ConnectivityTest>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::NetworkManagement::V1::ConnectivityTest>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/network_management/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkManagement::V1::ReachabilityService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkManagement::V1::ListConnectivityTestsRequest.new + # + # # Call the list_connectivity_tests method. + # result = client.list_connectivity_tests 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::NetworkManagement::V1::ConnectivityTest. + # p item + # end + # + def list_connectivity_tests request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkManagement::V1::ListConnectivityTestsRequest + + # 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_connectivity_tests.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::NetworkManagement::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_connectivity_tests.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_connectivity_tests.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @reachability_service_stub.call_rpc :list_connectivity_tests, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @reachability_service_stub, :list_connectivity_tests, 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 the details of a specific Connectivity Test. + # + # @overload get_connectivity_test(request, options = nil) + # Pass arguments to `get_connectivity_test` via a request object, either of type + # {::Google::Cloud::NetworkManagement::V1::GetConnectivityTestRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkManagement::V1::GetConnectivityTestRequest, ::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_connectivity_test(name: nil) + # Pass arguments to `get_connectivity_test` 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. `ConnectivityTest` resource name using the form: + # `projects/{project_id}/locations/global/connectivityTests/{test_id}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::NetworkManagement::V1::ConnectivityTest] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::NetworkManagement::V1::ConnectivityTest] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/network_management/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkManagement::V1::ReachabilityService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkManagement::V1::GetConnectivityTestRequest.new + # + # # Call the get_connectivity_test method. + # result = client.get_connectivity_test request + # + # # The returned object is of type Google::Cloud::NetworkManagement::V1::ConnectivityTest. + # p result + # + def get_connectivity_test request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkManagement::V1::GetConnectivityTestRequest + + # 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_connectivity_test.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::NetworkManagement::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_connectivity_test.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_connectivity_test.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @reachability_service_stub.call_rpc :get_connectivity_test, 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 Connectivity Test. + # After you create a test, the reachability analysis is performed as part + # of the long running operation, which completes when the analysis completes. + # + # If the endpoint specifications in `ConnectivityTest` are invalid + # (for example, containing non-existent resources in the network, or you + # don't have read permissions to the network configurations of listed + # projects), then the reachability result returns a value of `UNKNOWN`. + # + # If the endpoint specifications in `ConnectivityTest` are + # incomplete, the reachability result returns a value of + # AMBIGUOUS. For more information, + # see the Connectivity Test documentation. + # + # @overload create_connectivity_test(request, options = nil) + # Pass arguments to `create_connectivity_test` via a request object, either of type + # {::Google::Cloud::NetworkManagement::V1::CreateConnectivityTestRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkManagement::V1::CreateConnectivityTestRequest, ::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_connectivity_test(parent: nil, test_id: nil, resource: nil) + # Pass arguments to `create_connectivity_test` 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 resource of the Connectivity Test to create: + # `projects/{project_id}/locations/global` + # @param test_id [::String] + # Required. The logical name of the Connectivity Test in your project + # with the following restrictions: + # + # * Must contain only lowercase letters, numbers, and hyphens. + # * Must start with a letter. + # * Must be between 1-40 characters. + # * Must end with a number or a letter. + # * Must be unique within the customer project + # @param resource [::Google::Cloud::NetworkManagement::V1::ConnectivityTest, ::Hash] + # Required. A `ConnectivityTest` 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/network_management/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkManagement::V1::ReachabilityService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkManagement::V1::CreateConnectivityTestRequest.new + # + # # Call the create_connectivity_test method. + # result = client.create_connectivity_test 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_connectivity_test request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkManagement::V1::CreateConnectivityTestRequest + + # 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_connectivity_test.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::NetworkManagement::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_connectivity_test.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_connectivity_test.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @reachability_service_stub.call_rpc :create_connectivity_test, 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 configuration of an existing `ConnectivityTest`. + # After you update a test, the reachability analysis is performed as part + # of the long running operation, which completes when the analysis completes. + # The Reachability state in the test resource is updated with the new result. + # + # If the endpoint specifications in `ConnectivityTest` are invalid + # (for example, they contain non-existent resources in the network, or the + # user does not have read permissions to the network configurations of + # listed projects), then the reachability result returns a value of + # UNKNOWN. + # + # If the endpoint specifications in `ConnectivityTest` are incomplete, the + # reachability result returns a value of `AMBIGUOUS`. See the documentation + # in `ConnectivityTest` for more details. + # + # @overload update_connectivity_test(request, options = nil) + # Pass arguments to `update_connectivity_test` via a request object, either of type + # {::Google::Cloud::NetworkManagement::V1::UpdateConnectivityTestRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkManagement::V1::UpdateConnectivityTestRequest, ::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_connectivity_test(update_mask: nil, resource: nil) + # Pass arguments to `update_connectivity_test` 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. Mask of fields to update. At least one path must be supplied in + # this field. + # @param resource [::Google::Cloud::NetworkManagement::V1::ConnectivityTest, ::Hash] + # Required. Only fields specified in update_mask are updated. + # + # @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/network_management/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkManagement::V1::ReachabilityService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkManagement::V1::UpdateConnectivityTestRequest.new + # + # # Call the update_connectivity_test method. + # result = client.update_connectivity_test 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_connectivity_test request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkManagement::V1::UpdateConnectivityTestRequest + + # 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_connectivity_test.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::NetworkManagement::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.resource&.name + header_params["resource.name"] = request.resource.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_connectivity_test.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_connectivity_test.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @reachability_service_stub.call_rpc :update_connectivity_test, 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 + + ## + # Rerun an existing `ConnectivityTest`. + # After the user triggers the rerun, the reachability analysis is performed + # as part of the long running operation, which completes when the analysis + # completes. + # + # Even though the test configuration remains the same, the reachability + # result may change due to underlying network configuration changes. + # + # If the endpoint specifications in `ConnectivityTest` become invalid (for + # example, specified resources are deleted in the network, or you lost + # read permissions to the network configurations of listed projects), then + # the reachability result returns a value of `UNKNOWN`. + # + # @overload rerun_connectivity_test(request, options = nil) + # Pass arguments to `rerun_connectivity_test` via a request object, either of type + # {::Google::Cloud::NetworkManagement::V1::RerunConnectivityTestRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkManagement::V1::RerunConnectivityTestRequest, ::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 rerun_connectivity_test(name: nil) + # Pass arguments to `rerun_connectivity_test` 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. Connectivity Test resource name using the form: + # `projects/{project_id}/locations/global/connectivityTests/{test_id}` + # + # @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/network_management/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkManagement::V1::ReachabilityService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkManagement::V1::RerunConnectivityTestRequest.new + # + # # Call the rerun_connectivity_test method. + # result = client.rerun_connectivity_test 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 rerun_connectivity_test request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkManagement::V1::RerunConnectivityTestRequest + + # 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.rerun_connectivity_test.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::NetworkManagement::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.rerun_connectivity_test.timeout, + metadata: metadata, + retry_policy: @config.rpcs.rerun_connectivity_test.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @reachability_service_stub.call_rpc :rerun_connectivity_test, 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 specific `ConnectivityTest`. + # + # @overload delete_connectivity_test(request, options = nil) + # Pass arguments to `delete_connectivity_test` via a request object, either of type + # {::Google::Cloud::NetworkManagement::V1::DeleteConnectivityTestRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkManagement::V1::DeleteConnectivityTestRequest, ::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_connectivity_test(name: nil) + # Pass arguments to `delete_connectivity_test` 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. Connectivity Test resource name using the form: + # `projects/{project_id}/locations/global/connectivityTests/{test_id}` + # + # @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/network_management/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkManagement::V1::ReachabilityService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkManagement::V1::DeleteConnectivityTestRequest.new + # + # # Call the delete_connectivity_test method. + # result = client.delete_connectivity_test 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_connectivity_test request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkManagement::V1::DeleteConnectivityTestRequest + + # 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_connectivity_test.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::NetworkManagement::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_connectivity_test.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_connectivity_test.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @reachability_service_stub.call_rpc :delete_connectivity_test, 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 ReachabilityService API. + # + # This class represents the configuration for ReachabilityService, + # 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::NetworkManagement::V1::ReachabilityService::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_connectivity_tests to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::NetworkManagement::V1::ReachabilityService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_connectivity_tests.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::NetworkManagement::V1::ReachabilityService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_connectivity_tests.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::NetworkManagement::V1::ReachabilityService::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 = "networkmanagement.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 ReachabilityService 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_connectivity_tests` + # @return [::Gapic::Config::Method] + # + attr_reader :list_connectivity_tests + ## + # RPC-specific configuration for `get_connectivity_test` + # @return [::Gapic::Config::Method] + # + attr_reader :get_connectivity_test + ## + # RPC-specific configuration for `create_connectivity_test` + # @return [::Gapic::Config::Method] + # + attr_reader :create_connectivity_test + ## + # RPC-specific configuration for `update_connectivity_test` + # @return [::Gapic::Config::Method] + # + attr_reader :update_connectivity_test + ## + # RPC-specific configuration for `rerun_connectivity_test` + # @return [::Gapic::Config::Method] + # + attr_reader :rerun_connectivity_test + ## + # RPC-specific configuration for `delete_connectivity_test` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_connectivity_test + + # @private + def initialize parent_rpcs = nil + list_connectivity_tests_config = parent_rpcs.list_connectivity_tests if parent_rpcs.respond_to? :list_connectivity_tests + @list_connectivity_tests = ::Gapic::Config::Method.new list_connectivity_tests_config + get_connectivity_test_config = parent_rpcs.get_connectivity_test if parent_rpcs.respond_to? :get_connectivity_test + @get_connectivity_test = ::Gapic::Config::Method.new get_connectivity_test_config + create_connectivity_test_config = parent_rpcs.create_connectivity_test if parent_rpcs.respond_to? :create_connectivity_test + @create_connectivity_test = ::Gapic::Config::Method.new create_connectivity_test_config + update_connectivity_test_config = parent_rpcs.update_connectivity_test if parent_rpcs.respond_to? :update_connectivity_test + @update_connectivity_test = ::Gapic::Config::Method.new update_connectivity_test_config + rerun_connectivity_test_config = parent_rpcs.rerun_connectivity_test if parent_rpcs.respond_to? :rerun_connectivity_test + @rerun_connectivity_test = ::Gapic::Config::Method.new rerun_connectivity_test_config + delete_connectivity_test_config = parent_rpcs.delete_connectivity_test if parent_rpcs.respond_to? :delete_connectivity_test + @delete_connectivity_test = ::Gapic::Config::Method.new delete_connectivity_test_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/reachability_service/credentials.rb b/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/reachability_service/credentials.rb new file mode 100644 index 000000000000..93870a67c8fa --- /dev/null +++ b/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/reachability_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 NetworkManagement + module V1 + module ReachabilityService + # Credentials for the ReachabilityService 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-network_management-v1/lib/google/cloud/network_management/v1/reachability_service/operations.rb b/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/reachability_service/operations.rb new file mode 100644 index 000000000000..ea51bdee6d9f --- /dev/null +++ b/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/reachability_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 NetworkManagement + module V1 + module ReachabilityService + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "networkmanagement.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the ReachabilityService 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 ReachabilityService 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::NetworkManagement::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::NetworkManagement::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::NetworkManagement::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::NetworkManagement::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::NetworkManagement::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 = "networkmanagement.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-network_management-v1/lib/google/cloud/network_management/v1/reachability_service/paths.rb b/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/reachability_service/paths.rb new file mode 100644 index 000000000000..ee9e1848a3ce --- /dev/null +++ b/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/reachability_service/paths.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! + + +module Google + module Cloud + module NetworkManagement + module V1 + module ReachabilityService + # Path helper methods for the ReachabilityService API. + module Paths + ## + # Create a fully-qualified ConnectivityTest resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/global/connectivityTests/{test}` + # + # @param project [String] + # @param test [String] + # + # @return [::String] + def connectivity_test_path project:, test: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + + "projects/#{project}/locations/global/connectivityTests/#{test}" + end + + ## + # Create a fully-qualified Project resource string. + # + # The resource will be in the following format: + # + # `projects/{project}` + # + # @param project [String] + # + # @return [::String] + def project_path project: + "projects/#{project}" + end + + extend self + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/reachability_service/rest.rb b/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/reachability_service/rest.rb new file mode 100644 index 000000000000..d093c215e60f --- /dev/null +++ b/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/reachability_service/rest.rb @@ -0,0 +1,61 @@ +# 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/network_management/v1/version" +require "google/cloud/network_management/v1/bindings_override" + +require "google/cloud/network_management/v1/reachability_service/credentials" +require "google/cloud/network_management/v1/reachability_service/paths" +require "google/cloud/network_management/v1/reachability_service/rest/operations" +require "google/cloud/network_management/v1/reachability_service/rest/client" + +module Google + module Cloud + module NetworkManagement + module V1 + ## + # The Reachability service in the Google Cloud Network Management API provides + # services that analyze the reachability within a single Google Virtual Private + # Cloud (VPC) network, between peered VPC networks, between VPC and on-premises + # networks, or between VPC networks and internet hosts. A reachability analysis + # is based on Google Cloud network configurations. + # + # You can use the analysis results to verify these configurations and + # to troubleshoot connectivity issues. + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/network_management/v1/reachability_service/rest" + # client = ::Google::Cloud::NetworkManagement::V1::ReachabilityService::Rest::Client.new + # + module ReachabilityService + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/network_management/v1/reachability_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/reachability_service/rest/client.rb b/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/reachability_service/rest/client.rb new file mode 100644 index 000000000000..fec419e03b87 --- /dev/null +++ b/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/reachability_service/rest/client.rb @@ -0,0 +1,1035 @@ +# 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/networkmanagement/v1/reachability_pb" +require "google/cloud/network_management/v1/reachability_service/rest/service_stub" +require "google/cloud/location/rest" +require "google/iam/v1/rest" + +module Google + module Cloud + module NetworkManagement + module V1 + module ReachabilityService + module Rest + ## + # REST client for the ReachabilityService service. + # + # The Reachability service in the Google Cloud Network Management API provides + # services that analyze the reachability within a single Google Virtual Private + # Cloud (VPC) network, between peered VPC networks, between VPC and on-premises + # networks, or between VPC networks and internet hosts. A reachability analysis + # is based on Google Cloud network configurations. + # + # You can use the analysis results to verify these configurations and + # to troubleshoot connectivity issues. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "networkmanagement.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :reachability_service_stub + + ## + # Configure the ReachabilityService Client class. + # + # See {::Google::Cloud::NetworkManagement::V1::ReachabilityService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all ReachabilityService clients + # ::Google::Cloud::NetworkManagement::V1::ReachabilityService::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", "NetworkManagement", "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.timeout = 60.0 + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the ReachabilityService 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::NetworkManagement::V1::ReachabilityService::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 + @reachability_service_stub.universe_domain + end + + ## + # Create a new ReachabilityService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::NetworkManagement::V1::ReachabilityService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::NetworkManagement::V1::ReachabilityService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the ReachabilityService 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::NetworkManagement::V1::ReachabilityService::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 + + @reachability_service_stub = ::Google::Cloud::NetworkManagement::V1::ReachabilityService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @reachability_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 = @reachability_service_stub.endpoint + config.universe_domain = @reachability_service_stub.universe_domain + config.bindings_override = @config.bindings_override + config.logger = @reachability_service_stub.logger if config.respond_to? :logger= + end + + @iam_policy_client = Google::Iam::V1::IAMPolicy::Rest::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @reachability_service_stub.endpoint + config.universe_domain = @reachability_service_stub.universe_domain + config.bindings_override = @config.bindings_override + config.logger = @reachability_service_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::NetworkManagement::V1::ReachabilityService::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 + + ## + # Get the associated client for mix-in of the IAMPolicy. + # + # @return [Google::Iam::V1::IAMPolicy::Rest::Client] + # + attr_reader :iam_policy_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @reachability_service_stub.logger + end + + # Service calls + + ## + # Lists all Connectivity Tests owned by a project. + # + # @overload list_connectivity_tests(request, options = nil) + # Pass arguments to `list_connectivity_tests` via a request object, either of type + # {::Google::Cloud::NetworkManagement::V1::ListConnectivityTestsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkManagement::V1::ListConnectivityTestsRequest, ::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_connectivity_tests(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_connectivity_tests` 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 resource of the Connectivity Tests: + # `projects/{project_id}/locations/global` + # @param page_size [::Integer] + # Number of `ConnectivityTests` to return. + # @param page_token [::String] + # Page token from an earlier query, as returned in `next_page_token`. + # @param filter [::String] + # Lists the `ConnectivityTests` that match the filter expression. A filter + # expression filters the resources listed in the response. The expression + # must be of the form ` ` where operators: `<`, `>`, + # `<=`, + # `>=`, + # `!=`, `=`, `:` are supported (colon `:` represents a HAS operator which is + # roughly synonymous with equality). can refer to a proto or JSON + # field, or a synthetic field. Field names can be camelCase or snake_case. + # + # Examples: + # - Filter by name: + # name = "projects/proj-1/locations/global/connectivityTests/test-1 + # + # - Filter by labels: + # - Resources that have a key called `foo` + # labels.foo:* + # - Resources that have a key called `foo` whose value is `bar` + # labels.foo = bar + # @param order_by [::String] + # Field to use to sort the list. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkManagement::V1::ConnectivityTest>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkManagement::V1::ConnectivityTest>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/network_management/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkManagement::V1::ReachabilityService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkManagement::V1::ListConnectivityTestsRequest.new + # + # # Call the list_connectivity_tests method. + # result = client.list_connectivity_tests 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::NetworkManagement::V1::ConnectivityTest. + # p item + # end + # + def list_connectivity_tests request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkManagement::V1::ListConnectivityTestsRequest + + # 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_connectivity_tests.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::NetworkManagement::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_connectivity_tests.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_connectivity_tests.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @reachability_service_stub.list_connectivity_tests request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @reachability_service_stub, :list_connectivity_tests, "resources", 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 details of a specific Connectivity Test. + # + # @overload get_connectivity_test(request, options = nil) + # Pass arguments to `get_connectivity_test` via a request object, either of type + # {::Google::Cloud::NetworkManagement::V1::GetConnectivityTestRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkManagement::V1::GetConnectivityTestRequest, ::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_connectivity_test(name: nil) + # Pass arguments to `get_connectivity_test` 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. `ConnectivityTest` resource name using the form: + # `projects/{project_id}/locations/global/connectivityTests/{test_id}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::NetworkManagement::V1::ConnectivityTest] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::NetworkManagement::V1::ConnectivityTest] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/network_management/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkManagement::V1::ReachabilityService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkManagement::V1::GetConnectivityTestRequest.new + # + # # Call the get_connectivity_test method. + # result = client.get_connectivity_test request + # + # # The returned object is of type Google::Cloud::NetworkManagement::V1::ConnectivityTest. + # p result + # + def get_connectivity_test request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkManagement::V1::GetConnectivityTestRequest + + # 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_connectivity_test.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::NetworkManagement::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_connectivity_test.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_connectivity_test.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @reachability_service_stub.get_connectivity_test 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 Connectivity Test. + # After you create a test, the reachability analysis is performed as part + # of the long running operation, which completes when the analysis completes. + # + # If the endpoint specifications in `ConnectivityTest` are invalid + # (for example, containing non-existent resources in the network, or you + # don't have read permissions to the network configurations of listed + # projects), then the reachability result returns a value of `UNKNOWN`. + # + # If the endpoint specifications in `ConnectivityTest` are + # incomplete, the reachability result returns a value of + # AMBIGUOUS. For more information, + # see the Connectivity Test documentation. + # + # @overload create_connectivity_test(request, options = nil) + # Pass arguments to `create_connectivity_test` via a request object, either of type + # {::Google::Cloud::NetworkManagement::V1::CreateConnectivityTestRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkManagement::V1::CreateConnectivityTestRequest, ::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_connectivity_test(parent: nil, test_id: nil, resource: nil) + # Pass arguments to `create_connectivity_test` 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 resource of the Connectivity Test to create: + # `projects/{project_id}/locations/global` + # @param test_id [::String] + # Required. The logical name of the Connectivity Test in your project + # with the following restrictions: + # + # * Must contain only lowercase letters, numbers, and hyphens. + # * Must start with a letter. + # * Must be between 1-40 characters. + # * Must end with a number or a letter. + # * Must be unique within the customer project + # @param resource [::Google::Cloud::NetworkManagement::V1::ConnectivityTest, ::Hash] + # Required. A `ConnectivityTest` 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/network_management/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkManagement::V1::ReachabilityService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkManagement::V1::CreateConnectivityTestRequest.new + # + # # Call the create_connectivity_test method. + # result = client.create_connectivity_test 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_connectivity_test request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkManagement::V1::CreateConnectivityTestRequest + + # 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_connectivity_test.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::NetworkManagement::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_connectivity_test.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_connectivity_test.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @reachability_service_stub.create_connectivity_test 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 configuration of an existing `ConnectivityTest`. + # After you update a test, the reachability analysis is performed as part + # of the long running operation, which completes when the analysis completes. + # The Reachability state in the test resource is updated with the new result. + # + # If the endpoint specifications in `ConnectivityTest` are invalid + # (for example, they contain non-existent resources in the network, or the + # user does not have read permissions to the network configurations of + # listed projects), then the reachability result returns a value of + # UNKNOWN. + # + # If the endpoint specifications in `ConnectivityTest` are incomplete, the + # reachability result returns a value of `AMBIGUOUS`. See the documentation + # in `ConnectivityTest` for more details. + # + # @overload update_connectivity_test(request, options = nil) + # Pass arguments to `update_connectivity_test` via a request object, either of type + # {::Google::Cloud::NetworkManagement::V1::UpdateConnectivityTestRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkManagement::V1::UpdateConnectivityTestRequest, ::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_connectivity_test(update_mask: nil, resource: nil) + # Pass arguments to `update_connectivity_test` 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. Mask of fields to update. At least one path must be supplied in + # this field. + # @param resource [::Google::Cloud::NetworkManagement::V1::ConnectivityTest, ::Hash] + # Required. Only fields specified in update_mask are updated. + # @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/network_management/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkManagement::V1::ReachabilityService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkManagement::V1::UpdateConnectivityTestRequest.new + # + # # Call the update_connectivity_test method. + # result = client.update_connectivity_test 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_connectivity_test request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkManagement::V1::UpdateConnectivityTestRequest + + # 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_connectivity_test.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::NetworkManagement::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_connectivity_test.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_connectivity_test.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @reachability_service_stub.update_connectivity_test 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 + + ## + # Rerun an existing `ConnectivityTest`. + # After the user triggers the rerun, the reachability analysis is performed + # as part of the long running operation, which completes when the analysis + # completes. + # + # Even though the test configuration remains the same, the reachability + # result may change due to underlying network configuration changes. + # + # If the endpoint specifications in `ConnectivityTest` become invalid (for + # example, specified resources are deleted in the network, or you lost + # read permissions to the network configurations of listed projects), then + # the reachability result returns a value of `UNKNOWN`. + # + # @overload rerun_connectivity_test(request, options = nil) + # Pass arguments to `rerun_connectivity_test` via a request object, either of type + # {::Google::Cloud::NetworkManagement::V1::RerunConnectivityTestRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkManagement::V1::RerunConnectivityTestRequest, ::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 rerun_connectivity_test(name: nil) + # Pass arguments to `rerun_connectivity_test` 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. Connectivity Test resource name using the form: + # `projects/{project_id}/locations/global/connectivityTests/{test_id}` + # @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/network_management/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkManagement::V1::ReachabilityService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkManagement::V1::RerunConnectivityTestRequest.new + # + # # Call the rerun_connectivity_test method. + # result = client.rerun_connectivity_test 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 rerun_connectivity_test request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkManagement::V1::RerunConnectivityTestRequest + + # 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.rerun_connectivity_test.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::NetworkManagement::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.rerun_connectivity_test.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.rerun_connectivity_test.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @reachability_service_stub.rerun_connectivity_test 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 specific `ConnectivityTest`. + # + # @overload delete_connectivity_test(request, options = nil) + # Pass arguments to `delete_connectivity_test` via a request object, either of type + # {::Google::Cloud::NetworkManagement::V1::DeleteConnectivityTestRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkManagement::V1::DeleteConnectivityTestRequest, ::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_connectivity_test(name: nil) + # Pass arguments to `delete_connectivity_test` 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. Connectivity Test resource name using the form: + # `projects/{project_id}/locations/global/connectivityTests/{test_id}` + # @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/network_management/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkManagement::V1::ReachabilityService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkManagement::V1::DeleteConnectivityTestRequest.new + # + # # Call the delete_connectivity_test method. + # result = client.delete_connectivity_test 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_connectivity_test request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkManagement::V1::DeleteConnectivityTestRequest + + # 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_connectivity_test.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::NetworkManagement::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_connectivity_test.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_connectivity_test.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @reachability_service_stub.delete_connectivity_test 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 + + ## + # Configuration class for the ReachabilityService REST API. + # + # This class represents the configuration for ReachabilityService 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::NetworkManagement::V1::ReachabilityService::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_connectivity_tests to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::NetworkManagement::V1::ReachabilityService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_connectivity_tests.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::NetworkManagement::V1::ReachabilityService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_connectivity_tests.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 = "networkmanagement.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 ReachabilityService 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_connectivity_tests` + # @return [::Gapic::Config::Method] + # + attr_reader :list_connectivity_tests + ## + # RPC-specific configuration for `get_connectivity_test` + # @return [::Gapic::Config::Method] + # + attr_reader :get_connectivity_test + ## + # RPC-specific configuration for `create_connectivity_test` + # @return [::Gapic::Config::Method] + # + attr_reader :create_connectivity_test + ## + # RPC-specific configuration for `update_connectivity_test` + # @return [::Gapic::Config::Method] + # + attr_reader :update_connectivity_test + ## + # RPC-specific configuration for `rerun_connectivity_test` + # @return [::Gapic::Config::Method] + # + attr_reader :rerun_connectivity_test + ## + # RPC-specific configuration for `delete_connectivity_test` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_connectivity_test + + # @private + def initialize parent_rpcs = nil + list_connectivity_tests_config = parent_rpcs.list_connectivity_tests if parent_rpcs.respond_to? :list_connectivity_tests + @list_connectivity_tests = ::Gapic::Config::Method.new list_connectivity_tests_config + get_connectivity_test_config = parent_rpcs.get_connectivity_test if parent_rpcs.respond_to? :get_connectivity_test + @get_connectivity_test = ::Gapic::Config::Method.new get_connectivity_test_config + create_connectivity_test_config = parent_rpcs.create_connectivity_test if parent_rpcs.respond_to? :create_connectivity_test + @create_connectivity_test = ::Gapic::Config::Method.new create_connectivity_test_config + update_connectivity_test_config = parent_rpcs.update_connectivity_test if parent_rpcs.respond_to? :update_connectivity_test + @update_connectivity_test = ::Gapic::Config::Method.new update_connectivity_test_config + rerun_connectivity_test_config = parent_rpcs.rerun_connectivity_test if parent_rpcs.respond_to? :rerun_connectivity_test + @rerun_connectivity_test = ::Gapic::Config::Method.new rerun_connectivity_test_config + delete_connectivity_test_config = parent_rpcs.delete_connectivity_test if parent_rpcs.respond_to? :delete_connectivity_test + @delete_connectivity_test = ::Gapic::Config::Method.new delete_connectivity_test_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/reachability_service/rest/operations.rb b/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/reachability_service/rest/operations.rb new file mode 100644 index 000000000000..74b21b1f8e80 --- /dev/null +++ b/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/reachability_service/rest/operations.rb @@ -0,0 +1,954 @@ +# 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 NetworkManagement + module V1 + module ReachabilityService + module Rest + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "networkmanagement.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the ReachabilityService 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 ReachabilityService 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::NetworkManagement::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::NetworkManagement::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::NetworkManagement::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::NetworkManagement::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 = "networkmanagement.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/global/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}/operations", + matches: [ + ["name", %r{^organizations/[^/]+/locations/global/?$}, 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/global/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/locations/global/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/global/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/locations/global/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/global/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:cancel", + body: "*", + matches: [ + ["name", %r{^organizations/[^/]+/locations/global/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/reachability_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/reachability_service/rest/service_stub.rb new file mode 100644 index 000000000000..d66fe06179d6 --- /dev/null +++ b/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/reachability_service/rest/service_stub.rb @@ -0,0 +1,450 @@ +# 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/networkmanagement/v1/reachability_pb" + +module Google + module Cloud + module NetworkManagement + module V1 + module ReachabilityService + module Rest + ## + # REST service stub for the ReachabilityService 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_connectivity_tests REST call + # + # @param request_pb [::Google::Cloud::NetworkManagement::V1::ListConnectivityTestsRequest] + # 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::NetworkManagement::V1::ListConnectivityTestsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::NetworkManagement::V1::ListConnectivityTestsResponse] + # A result object deserialized from the server's reply + def list_connectivity_tests request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_connectivity_tests_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_connectivity_tests", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::NetworkManagement::V1::ListConnectivityTestsResponse.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_connectivity_test REST call + # + # @param request_pb [::Google::Cloud::NetworkManagement::V1::GetConnectivityTestRequest] + # 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::NetworkManagement::V1::ConnectivityTest] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::NetworkManagement::V1::ConnectivityTest] + # A result object deserialized from the server's reply + def get_connectivity_test request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_connectivity_test_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_connectivity_test", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::NetworkManagement::V1::ConnectivityTest.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_connectivity_test REST call + # + # @param request_pb [::Google::Cloud::NetworkManagement::V1::CreateConnectivityTestRequest] + # 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_connectivity_test request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_connectivity_test_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_connectivity_test", + 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_connectivity_test REST call + # + # @param request_pb [::Google::Cloud::NetworkManagement::V1::UpdateConnectivityTestRequest] + # 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_connectivity_test request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_connectivity_test_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_connectivity_test", + 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 rerun_connectivity_test REST call + # + # @param request_pb [::Google::Cloud::NetworkManagement::V1::RerunConnectivityTestRequest] + # 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 rerun_connectivity_test request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_rerun_connectivity_test_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: "rerun_connectivity_test", + 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_connectivity_test REST call + # + # @param request_pb [::Google::Cloud::NetworkManagement::V1::DeleteConnectivityTestRequest] + # 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_connectivity_test request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_connectivity_test_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_connectivity_test", + 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 + + ## + # @private + # + # GRPC transcoding helper method for the list_connectivity_tests REST call + # + # @param request_pb [::Google::Cloud::NetworkManagement::V1::ListConnectivityTestsRequest] + # 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_connectivity_tests_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/connectivityTests", + matches: [ + ["parent", %r{^projects/[^/]+/locations/global/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_connectivity_test REST call + # + # @param request_pb [::Google::Cloud::NetworkManagement::V1::GetConnectivityTestRequest] + # 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_connectivity_test_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/global/connectivityTests/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_connectivity_test REST call + # + # @param request_pb [::Google::Cloud::NetworkManagement::V1::CreateConnectivityTestRequest] + # 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_connectivity_test_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/connectivityTests", + body: "resource", + matches: [ + ["parent", %r{^projects/[^/]+/locations/global/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_connectivity_test REST call + # + # @param request_pb [::Google::Cloud::NetworkManagement::V1::UpdateConnectivityTestRequest] + # 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_connectivity_test_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{resource.name}", + body: "resource", + matches: [ + ["resource.name", %r{^projects/[^/]+/locations/global/connectivityTests/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the rerun_connectivity_test REST call + # + # @param request_pb [::Google::Cloud::NetworkManagement::V1::RerunConnectivityTestRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_rerun_connectivity_test_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:rerun", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/global/connectivityTests/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_connectivity_test REST call + # + # @param request_pb [::Google::Cloud::NetworkManagement::V1::DeleteConnectivityTestRequest] + # 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_connectivity_test_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/global/connectivityTests/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/rest.rb b/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/rest.rb new file mode 100644 index 000000000000..e3c377c9a482 --- /dev/null +++ b/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/rest.rb @@ -0,0 +1,40 @@ +# 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/network_management/v1/reachability_service/rest" +require "google/cloud/network_management/v1/vpc_flow_logs_service/rest" +require "google/cloud/network_management/v1/organization_vpc_flow_logs_service/rest" +require "google/cloud/network_management/v1/bindings_override" +require "google/cloud/network_management/v1/version" + +module Google + module Cloud + module NetworkManagement + ## + # To load just the REST part of this package, including all its services, and instantiate a REST client: + # + # @example + # + # require "google/cloud/network_management/v1/rest" + # client = ::Google::Cloud::NetworkManagement::V1::ReachabilityService::Rest::Client.new + # + module V1 + end + end + end +end diff --git a/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/version.rb b/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/version.rb new file mode 100644 index 000000000000..8f8a91bfe247 --- /dev/null +++ b/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/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 NetworkManagement + module V1 + VERSION = "0.0.1" + end + end + end +end diff --git a/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/vpc_flow_logs_service.rb b/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/vpc_flow_logs_service.rb new file mode 100644 index 000000000000..c5857d9a447f --- /dev/null +++ b/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/vpc_flow_logs_service.rb @@ -0,0 +1,58 @@ +# 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/network_management/v1/version" + +require "google/cloud/network_management/v1/vpc_flow_logs_service/credentials" +require "google/cloud/network_management/v1/vpc_flow_logs_service/paths" +require "google/cloud/network_management/v1/vpc_flow_logs_service/operations" +require "google/cloud/network_management/v1/vpc_flow_logs_service/client" +require "google/cloud/network_management/v1/vpc_flow_logs_service/rest" + +module Google + module Cloud + module NetworkManagement + module V1 + ## + # The VPC Flow Logs service in the Google Cloud Network Management API provides + # configurations that generate Flow Logs. The service and the configuration + # resources created using this service are global. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/network_management/v1/vpc_flow_logs_service" + # client = ::Google::Cloud::NetworkManagement::V1::VpcFlowLogsService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/network_management/v1/vpc_flow_logs_service/rest" + # client = ::Google::Cloud::NetworkManagement::V1::VpcFlowLogsService::Rest::Client.new + # + module VpcFlowLogsService + end + end + end + end +end + +helper_path = ::File.join __dir__, "vpc_flow_logs_service", "helpers.rb" +require "google/cloud/network_management/v1/vpc_flow_logs_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/vpc_flow_logs_service/client.rb b/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/vpc_flow_logs_service/client.rb new file mode 100644 index 000000000000..2709af7e0233 --- /dev/null +++ b/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/vpc_flow_logs_service/client.rb @@ -0,0 +1,1225 @@ +# 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/networkmanagement/v1/vpc_flow_logs_pb" +require "google/cloud/location" +require "google/iam/v1" + +module Google + module Cloud + module NetworkManagement + module V1 + module VpcFlowLogsService + ## + # Client for the VpcFlowLogsService service. + # + # The VPC Flow Logs service in the Google Cloud Network Management API provides + # configurations that generate Flow Logs. The service and the configuration + # resources created using this service are global. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "networkmanagement.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :vpc_flow_logs_service_stub + + ## + # Configure the VpcFlowLogsService Client class. + # + # See {::Google::Cloud::NetworkManagement::V1::VpcFlowLogsService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all VpcFlowLogsService clients + # ::Google::Cloud::NetworkManagement::V1::VpcFlowLogsService::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", "NetworkManagement", "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 VpcFlowLogsService 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::NetworkManagement::V1::VpcFlowLogsService::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 + @vpc_flow_logs_service_stub.universe_domain + end + + ## + # Create a new VpcFlowLogsService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::NetworkManagement::V1::VpcFlowLogsService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::NetworkManagement::V1::VpcFlowLogsService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the VpcFlowLogsService 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/networkmanagement/v1/vpc_flow_logs_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 + + @vpc_flow_logs_service_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::NetworkManagement::V1::VpcFlowLogsService::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 + ) + + @vpc_flow_logs_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 = @vpc_flow_logs_service_stub.endpoint + config.universe_domain = @vpc_flow_logs_service_stub.universe_domain + config.logger = @vpc_flow_logs_service_stub.logger if config.respond_to? :logger= + end + + @iam_policy_client = Google::Iam::V1::IAMPolicy::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @vpc_flow_logs_service_stub.endpoint + config.universe_domain = @vpc_flow_logs_service_stub.universe_domain + config.logger = @vpc_flow_logs_service_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::NetworkManagement::V1::VpcFlowLogsService::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 + + ## + # Get the associated client for mix-in of the IAMPolicy. + # + # @return [Google::Iam::V1::IAMPolicy::Client] + # + attr_reader :iam_policy_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @vpc_flow_logs_service_stub.logger + end + + # Service calls + + ## + # Lists all `VpcFlowLogsConfigs` in a given project. + # + # @overload list_vpc_flow_logs_configs(request, options = nil) + # Pass arguments to `list_vpc_flow_logs_configs` via a request object, either of type + # {::Google::Cloud::NetworkManagement::V1::ListVpcFlowLogsConfigsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkManagement::V1::ListVpcFlowLogsConfigsRequest, ::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_vpc_flow_logs_configs(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_vpc_flow_logs_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. The parent resource of the VpcFlowLogsConfig, + # in one of the following formats: + # + # - For project-level resources: `projects/{project_id}/locations/global` + # + # - For organization-level resources: + # `organizations/{organization_id}/locations/global` + # @param page_size [::Integer] + # Optional. Number of `VpcFlowLogsConfigs` to return. + # @param page_token [::String] + # Optional. Page token from an earlier query, as returned in + # `next_page_token`. + # @param filter [::String] + # Optional. Lists the `VpcFlowLogsConfigs` that match the filter expression. + # A filter expression must use the supported [CEL logic operators] + # (https://cloud.google.com/vpc/docs/about-flow-logs-records#supported_cel_logic_operators). + # @param order_by [::String] + # Optional. Field to use to sort the list. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::NetworkManagement::V1::VpcFlowLogsConfig>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::NetworkManagement::V1::VpcFlowLogsConfig>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/network_management/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkManagement::V1::VpcFlowLogsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkManagement::V1::ListVpcFlowLogsConfigsRequest.new + # + # # Call the list_vpc_flow_logs_configs method. + # result = client.list_vpc_flow_logs_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::NetworkManagement::V1::VpcFlowLogsConfig. + # p item + # end + # + def list_vpc_flow_logs_configs request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkManagement::V1::ListVpcFlowLogsConfigsRequest + + # 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_vpc_flow_logs_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::NetworkManagement::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_vpc_flow_logs_configs.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_vpc_flow_logs_configs.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @vpc_flow_logs_service_stub.call_rpc :list_vpc_flow_logs_configs, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @vpc_flow_logs_service_stub, :list_vpc_flow_logs_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 + + ## + # Gets the details of a specific `VpcFlowLogsConfig`. + # + # @overload get_vpc_flow_logs_config(request, options = nil) + # Pass arguments to `get_vpc_flow_logs_config` via a request object, either of type + # {::Google::Cloud::NetworkManagement::V1::GetVpcFlowLogsConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkManagement::V1::GetVpcFlowLogsConfigRequest, ::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_vpc_flow_logs_config(name: nil) + # Pass arguments to `get_vpc_flow_logs_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. The resource name of the VpcFlowLogsConfig, + # in one of the following formats: + # + # - For project-level resources: + # `projects/{project_id}/locations/global/vpcFlowLogsConfigs/{vpc_flow_logs_config_id}` + # + # - For organization-level resources: + # `organizations/{organization_id}/locations/global/vpcFlowLogsConfigs/{vpc_flow_logs_config_id}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::NetworkManagement::V1::VpcFlowLogsConfig] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::NetworkManagement::V1::VpcFlowLogsConfig] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/network_management/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkManagement::V1::VpcFlowLogsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkManagement::V1::GetVpcFlowLogsConfigRequest.new + # + # # Call the get_vpc_flow_logs_config method. + # result = client.get_vpc_flow_logs_config request + # + # # The returned object is of type Google::Cloud::NetworkManagement::V1::VpcFlowLogsConfig. + # p result + # + def get_vpc_flow_logs_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkManagement::V1::GetVpcFlowLogsConfigRequest + + # 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_vpc_flow_logs_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::NetworkManagement::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_vpc_flow_logs_config.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_vpc_flow_logs_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @vpc_flow_logs_service_stub.call_rpc :get_vpc_flow_logs_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 + + ## + # Creates a new `VpcFlowLogsConfig`. + # If a configuration with the exact same settings already exists (even if the + # ID is different), the creation fails. + # Notes: + # + # 1. Creating a configuration with `state=DISABLED` will fail + # 2. The following fields are not considered as settings for the purpose + # of the check mentioned above, therefore - creating another configuration + # with the same fields but different values for the following fields will + # fail as well: + # * name + # * create_time + # * update_time + # * labels + # * description + # + # @overload create_vpc_flow_logs_config(request, options = nil) + # Pass arguments to `create_vpc_flow_logs_config` via a request object, either of type + # {::Google::Cloud::NetworkManagement::V1::CreateVpcFlowLogsConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkManagement::V1::CreateVpcFlowLogsConfigRequest, ::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_vpc_flow_logs_config(parent: nil, vpc_flow_logs_config_id: nil, vpc_flow_logs_config: nil) + # Pass arguments to `create_vpc_flow_logs_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. The parent resource of the VpcFlowLogsConfig to create, + # in one of the following formats: + # + # - For project-level resources: `projects/{project_id}/locations/global` + # + # - For organization-level resources: + # `organizations/{organization_id}/locations/global` + # @param vpc_flow_logs_config_id [::String] + # Required. ID of the `VpcFlowLogsConfig`. + # @param vpc_flow_logs_config [::Google::Cloud::NetworkManagement::V1::VpcFlowLogsConfig, ::Hash] + # Required. A `VpcFlowLogsConfig` 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/network_management/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkManagement::V1::VpcFlowLogsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkManagement::V1::CreateVpcFlowLogsConfigRequest.new + # + # # Call the create_vpc_flow_logs_config method. + # result = client.create_vpc_flow_logs_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_vpc_flow_logs_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkManagement::V1::CreateVpcFlowLogsConfigRequest + + # 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_vpc_flow_logs_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::NetworkManagement::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_vpc_flow_logs_config.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_vpc_flow_logs_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @vpc_flow_logs_service_stub.call_rpc :create_vpc_flow_logs_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 + + ## + # Updates an existing `VpcFlowLogsConfig`. + # If a configuration with the exact same settings already exists (even if the + # ID is different), the creation fails. + # Notes: + # + # 1. Updating a configuration with `state=DISABLED` will fail. + # 2. The following fields are not considered as settings for the purpose + # of the check mentioned above, therefore - updating another configuration + # with the same fields but different values for the following fields will + # fail as well: + # * name + # * create_time + # * update_time + # * labels + # * description + # + # @overload update_vpc_flow_logs_config(request, options = nil) + # Pass arguments to `update_vpc_flow_logs_config` via a request object, either of type + # {::Google::Cloud::NetworkManagement::V1::UpdateVpcFlowLogsConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkManagement::V1::UpdateVpcFlowLogsConfigRequest, ::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_vpc_flow_logs_config(update_mask: nil, vpc_flow_logs_config: nil) + # Pass arguments to `update_vpc_flow_logs_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 update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. Mask of fields to update. At least one path must be supplied in + # this field. + # For example, to change the state of the configuration to ENABLED, specify + # `update_mask` = `"state"`, and the `vpc_flow_logs_config` would be: + # `vpc_flow_logs_config = { + # name = + # "projects/my-project/locations/global/vpcFlowLogsConfigs/my-config" + # state = "ENABLED" }` + # @param vpc_flow_logs_config [::Google::Cloud::NetworkManagement::V1::VpcFlowLogsConfig, ::Hash] + # Required. Only fields specified in update_mask are updated. + # + # @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/network_management/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkManagement::V1::VpcFlowLogsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkManagement::V1::UpdateVpcFlowLogsConfigRequest.new + # + # # Call the update_vpc_flow_logs_config method. + # result = client.update_vpc_flow_logs_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_vpc_flow_logs_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkManagement::V1::UpdateVpcFlowLogsConfigRequest + + # 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_vpc_flow_logs_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::NetworkManagement::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.vpc_flow_logs_config&.name + header_params["vpc_flow_logs_config.name"] = request.vpc_flow_logs_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_vpc_flow_logs_config.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_vpc_flow_logs_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @vpc_flow_logs_service_stub.call_rpc :update_vpc_flow_logs_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 specific `VpcFlowLogsConfig`. + # + # @overload delete_vpc_flow_logs_config(request, options = nil) + # Pass arguments to `delete_vpc_flow_logs_config` via a request object, either of type + # {::Google::Cloud::NetworkManagement::V1::DeleteVpcFlowLogsConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkManagement::V1::DeleteVpcFlowLogsConfigRequest, ::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_vpc_flow_logs_config(name: nil) + # Pass arguments to `delete_vpc_flow_logs_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. The resource name of the VpcFlowLogsConfig, + # in one of the following formats: + # + # - For a project-level resource: + # `projects/{project_id}/locations/global/vpcFlowLogsConfigs/{vpc_flow_logs_config_id}` + # + # - For an organization-level resource: + # `organizations/{organization_id}/locations/global/vpcFlowLogsConfigs/{vpc_flow_logs_config_id}` + # + # @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/network_management/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkManagement::V1::VpcFlowLogsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkManagement::V1::DeleteVpcFlowLogsConfigRequest.new + # + # # Call the delete_vpc_flow_logs_config method. + # result = client.delete_vpc_flow_logs_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_vpc_flow_logs_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkManagement::V1::DeleteVpcFlowLogsConfigRequest + + # 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_vpc_flow_logs_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::NetworkManagement::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_vpc_flow_logs_config.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_vpc_flow_logs_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @vpc_flow_logs_service_stub.call_rpc :delete_vpc_flow_logs_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 + + ## + # QueryOrgVpcFlowLogsConfigs returns a list of all organization-level VPC + # Flow Logs configurations applicable to the specified project. + # + # @overload query_org_vpc_flow_logs_configs(request, options = nil) + # Pass arguments to `query_org_vpc_flow_logs_configs` via a request object, either of type + # {::Google::Cloud::NetworkManagement::V1::QueryOrgVpcFlowLogsConfigsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkManagement::V1::QueryOrgVpcFlowLogsConfigsRequest, ::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 query_org_vpc_flow_logs_configs(parent: nil, page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `query_org_vpc_flow_logs_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. The parent resource of the VpcFlowLogsConfig, specified in + # the following format: `projects/{project_id}/locations/global` + # @param page_size [::Integer] + # Optional. Number of `VpcFlowLogsConfigs` to return. + # @param page_token [::String] + # Optional. Page token from an earlier query, as returned in + # `next_page_token`. + # @param filter [::String] + # Optional. Lists the `VpcFlowLogsConfigs` that match the filter expression. + # A filter expression must use the supported [CEL logic operators] + # (https://cloud.google.com/vpc/docs/about-flow-logs-records#supported_cel_logic_operators). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::NetworkManagement::V1::VpcFlowLogsConfig>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::NetworkManagement::V1::VpcFlowLogsConfig>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/network_management/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkManagement::V1::VpcFlowLogsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkManagement::V1::QueryOrgVpcFlowLogsConfigsRequest.new + # + # # Call the query_org_vpc_flow_logs_configs method. + # result = client.query_org_vpc_flow_logs_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::NetworkManagement::V1::VpcFlowLogsConfig. + # p item + # end + # + def query_org_vpc_flow_logs_configs request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkManagement::V1::QueryOrgVpcFlowLogsConfigsRequest + + # 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.query_org_vpc_flow_logs_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::NetworkManagement::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.query_org_vpc_flow_logs_configs.timeout, + metadata: metadata, + retry_policy: @config.rpcs.query_org_vpc_flow_logs_configs.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @vpc_flow_logs_service_stub.call_rpc :query_org_vpc_flow_logs_configs, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @vpc_flow_logs_service_stub, :query_org_vpc_flow_logs_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 + + ## + # ShowEffectiveFlowLogsConfigs returns a list of all VPC Flow Logs + # configurations applicable to a specified resource. + # + # @overload show_effective_flow_logs_configs(request, options = nil) + # Pass arguments to `show_effective_flow_logs_configs` via a request object, either of type + # {::Google::Cloud::NetworkManagement::V1::ShowEffectiveFlowLogsConfigsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkManagement::V1::ShowEffectiveFlowLogsConfigsRequest, ::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 show_effective_flow_logs_configs(parent: nil, resource: nil, page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `show_effective_flow_logs_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. The parent resource of the VpcFlowLogsConfig, specified in + # the following format: `projects/{project_id}/locations/global` + # @param resource [::String] + # Required. The resource to get the effective VPC Flow Logs configuration + # for. The resource must belong to the same project as the parent. The + # resource must be a network, subnetwork, interconnect attachment, VPN + # tunnel, or a project. + # @param page_size [::Integer] + # Optional. Number of `EffectiveVpcFlowLogsConfigs` to return. Default is 30. + # @param page_token [::String] + # Optional. Page token from an earlier query, as returned in + # `next_page_token`. + # @param filter [::String] + # Optional. Lists the `EffectiveVpcFlowLogsConfigs` that match the filter + # expression. A filter expression must use the supported [CEL logic + # operators] + # (https://cloud.google.com/vpc/docs/about-flow-logs-records#supported_cel_logic_operators). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::NetworkManagement::V1::EffectiveVpcFlowLogsConfig>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::NetworkManagement::V1::EffectiveVpcFlowLogsConfig>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/network_management/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkManagement::V1::VpcFlowLogsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkManagement::V1::ShowEffectiveFlowLogsConfigsRequest.new + # + # # Call the show_effective_flow_logs_configs method. + # result = client.show_effective_flow_logs_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::NetworkManagement::V1::EffectiveVpcFlowLogsConfig. + # p item + # end + # + def show_effective_flow_logs_configs request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkManagement::V1::ShowEffectiveFlowLogsConfigsRequest + + # 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.show_effective_flow_logs_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::NetworkManagement::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.show_effective_flow_logs_configs.timeout, + metadata: metadata, + retry_policy: @config.rpcs.show_effective_flow_logs_configs.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @vpc_flow_logs_service_stub.call_rpc :show_effective_flow_logs_configs, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @vpc_flow_logs_service_stub, :show_effective_flow_logs_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 + + ## + # Configuration class for the VpcFlowLogsService API. + # + # This class represents the configuration for VpcFlowLogsService, + # 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::NetworkManagement::V1::VpcFlowLogsService::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_vpc_flow_logs_configs to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::NetworkManagement::V1::VpcFlowLogsService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_vpc_flow_logs_configs.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::NetworkManagement::V1::VpcFlowLogsService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_vpc_flow_logs_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::NetworkManagement::V1::VpcFlowLogsService::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 = "networkmanagement.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 VpcFlowLogsService 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_vpc_flow_logs_configs` + # @return [::Gapic::Config::Method] + # + attr_reader :list_vpc_flow_logs_configs + ## + # RPC-specific configuration for `get_vpc_flow_logs_config` + # @return [::Gapic::Config::Method] + # + attr_reader :get_vpc_flow_logs_config + ## + # RPC-specific configuration for `create_vpc_flow_logs_config` + # @return [::Gapic::Config::Method] + # + attr_reader :create_vpc_flow_logs_config + ## + # RPC-specific configuration for `update_vpc_flow_logs_config` + # @return [::Gapic::Config::Method] + # + attr_reader :update_vpc_flow_logs_config + ## + # RPC-specific configuration for `delete_vpc_flow_logs_config` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_vpc_flow_logs_config + ## + # RPC-specific configuration for `query_org_vpc_flow_logs_configs` + # @return [::Gapic::Config::Method] + # + attr_reader :query_org_vpc_flow_logs_configs + ## + # RPC-specific configuration for `show_effective_flow_logs_configs` + # @return [::Gapic::Config::Method] + # + attr_reader :show_effective_flow_logs_configs + + # @private + def initialize parent_rpcs = nil + list_vpc_flow_logs_configs_config = parent_rpcs.list_vpc_flow_logs_configs if parent_rpcs.respond_to? :list_vpc_flow_logs_configs + @list_vpc_flow_logs_configs = ::Gapic::Config::Method.new list_vpc_flow_logs_configs_config + get_vpc_flow_logs_config_config = parent_rpcs.get_vpc_flow_logs_config if parent_rpcs.respond_to? :get_vpc_flow_logs_config + @get_vpc_flow_logs_config = ::Gapic::Config::Method.new get_vpc_flow_logs_config_config + create_vpc_flow_logs_config_config = parent_rpcs.create_vpc_flow_logs_config if parent_rpcs.respond_to? :create_vpc_flow_logs_config + @create_vpc_flow_logs_config = ::Gapic::Config::Method.new create_vpc_flow_logs_config_config + update_vpc_flow_logs_config_config = parent_rpcs.update_vpc_flow_logs_config if parent_rpcs.respond_to? :update_vpc_flow_logs_config + @update_vpc_flow_logs_config = ::Gapic::Config::Method.new update_vpc_flow_logs_config_config + delete_vpc_flow_logs_config_config = parent_rpcs.delete_vpc_flow_logs_config if parent_rpcs.respond_to? :delete_vpc_flow_logs_config + @delete_vpc_flow_logs_config = ::Gapic::Config::Method.new delete_vpc_flow_logs_config_config + query_org_vpc_flow_logs_configs_config = parent_rpcs.query_org_vpc_flow_logs_configs if parent_rpcs.respond_to? :query_org_vpc_flow_logs_configs + @query_org_vpc_flow_logs_configs = ::Gapic::Config::Method.new query_org_vpc_flow_logs_configs_config + show_effective_flow_logs_configs_config = parent_rpcs.show_effective_flow_logs_configs if parent_rpcs.respond_to? :show_effective_flow_logs_configs + @show_effective_flow_logs_configs = ::Gapic::Config::Method.new show_effective_flow_logs_configs_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/vpc_flow_logs_service/credentials.rb b/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/vpc_flow_logs_service/credentials.rb new file mode 100644 index 000000000000..c68e48fec97d --- /dev/null +++ b/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/vpc_flow_logs_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 NetworkManagement + module V1 + module VpcFlowLogsService + # Credentials for the VpcFlowLogsService 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-network_management-v1/lib/google/cloud/network_management/v1/vpc_flow_logs_service/operations.rb b/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/vpc_flow_logs_service/operations.rb new file mode 100644 index 000000000000..c9ecd671bee7 --- /dev/null +++ b/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/vpc_flow_logs_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 NetworkManagement + module V1 + module VpcFlowLogsService + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "networkmanagement.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the VpcFlowLogsService 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 VpcFlowLogsService 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::NetworkManagement::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::NetworkManagement::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::NetworkManagement::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::NetworkManagement::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::NetworkManagement::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 = "networkmanagement.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-network_management-v1/lib/google/cloud/network_management/v1/vpc_flow_logs_service/paths.rb b/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/vpc_flow_logs_service/paths.rb new file mode 100644 index 000000000000..09614020a8c1 --- /dev/null +++ b/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/vpc_flow_logs_service/paths.rb @@ -0,0 +1,110 @@ +# 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 NetworkManagement + module V1 + module VpcFlowLogsService + # Path helper methods for the VpcFlowLogsService API. + module Paths + ## + # 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 OrganizationLocation resource string. + # + # The resource will be in the following format: + # + # `organizations/{organization}/locations/{location}` + # + # @param organization [String] + # @param location [String] + # + # @return [::String] + def organization_location_path organization:, location: + raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" + + "organizations/#{organization}/locations/#{location}" + end + + ## + # Create a fully-qualified VpcFlowLogsConfig resource string. + # + # @overload vpc_flow_logs_config_path(project:, location:, vpc_flow_logs_config:) + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/vpcFlowLogsConfigs/{vpc_flow_logs_config}` + # + # @param project [String] + # @param location [String] + # @param vpc_flow_logs_config [String] + # + # @overload vpc_flow_logs_config_path(organization:, location:, vpc_flow_logs_config:) + # The resource will be in the following format: + # + # `organizations/{organization}/locations/{location}/vpcFlowLogsConfigs/{vpc_flow_logs_config}` + # + # @param organization [String] + # @param location [String] + # @param vpc_flow_logs_config [String] + # + # @return [::String] + def vpc_flow_logs_config_path **args + resources = { + "location:project:vpc_flow_logs_config" => (proc do |project:, location:, vpc_flow_logs_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}/vpcFlowLogsConfigs/#{vpc_flow_logs_config}" + end), + "location:organization:vpc_flow_logs_config" => (proc do |organization:, location:, vpc_flow_logs_config:| + raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "organizations/#{organization}/locations/#{location}/vpcFlowLogsConfigs/#{vpc_flow_logs_config}" + end) + } + + resource = resources[args.keys.sort.join(":")] + raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? + resource.call(**args) + end + + extend self + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/vpc_flow_logs_service/rest.rb b/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/vpc_flow_logs_service/rest.rb new file mode 100644 index 000000000000..24bf8e874555 --- /dev/null +++ b/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/vpc_flow_logs_service/rest.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/rest" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/network_management/v1/version" +require "google/cloud/network_management/v1/bindings_override" + +require "google/cloud/network_management/v1/vpc_flow_logs_service/credentials" +require "google/cloud/network_management/v1/vpc_flow_logs_service/paths" +require "google/cloud/network_management/v1/vpc_flow_logs_service/rest/operations" +require "google/cloud/network_management/v1/vpc_flow_logs_service/rest/client" + +module Google + module Cloud + module NetworkManagement + module V1 + ## + # The VPC Flow Logs service in the Google Cloud Network Management API provides + # configurations that generate Flow Logs. The service and the configuration + # resources created using this service are global. + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/network_management/v1/vpc_flow_logs_service/rest" + # client = ::Google::Cloud::NetworkManagement::V1::VpcFlowLogsService::Rest::Client.new + # + module VpcFlowLogsService + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/network_management/v1/vpc_flow_logs_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/vpc_flow_logs_service/rest/client.rb b/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/vpc_flow_logs_service/rest/client.rb new file mode 100644 index 000000000000..ca91750d3348 --- /dev/null +++ b/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/vpc_flow_logs_service/rest/client.rb @@ -0,0 +1,1142 @@ +# 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/networkmanagement/v1/vpc_flow_logs_pb" +require "google/cloud/network_management/v1/vpc_flow_logs_service/rest/service_stub" +require "google/cloud/location/rest" +require "google/iam/v1/rest" + +module Google + module Cloud + module NetworkManagement + module V1 + module VpcFlowLogsService + module Rest + ## + # REST client for the VpcFlowLogsService service. + # + # The VPC Flow Logs service in the Google Cloud Network Management API provides + # configurations that generate Flow Logs. The service and the configuration + # resources created using this service are global. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "networkmanagement.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :vpc_flow_logs_service_stub + + ## + # Configure the VpcFlowLogsService Client class. + # + # See {::Google::Cloud::NetworkManagement::V1::VpcFlowLogsService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all VpcFlowLogsService clients + # ::Google::Cloud::NetworkManagement::V1::VpcFlowLogsService::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", "NetworkManagement", "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 VpcFlowLogsService 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::NetworkManagement::V1::VpcFlowLogsService::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 + @vpc_flow_logs_service_stub.universe_domain + end + + ## + # Create a new VpcFlowLogsService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::NetworkManagement::V1::VpcFlowLogsService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::NetworkManagement::V1::VpcFlowLogsService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the VpcFlowLogsService 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::NetworkManagement::V1::VpcFlowLogsService::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 + + @vpc_flow_logs_service_stub = ::Google::Cloud::NetworkManagement::V1::VpcFlowLogsService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @vpc_flow_logs_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 = @vpc_flow_logs_service_stub.endpoint + config.universe_domain = @vpc_flow_logs_service_stub.universe_domain + config.bindings_override = @config.bindings_override + config.logger = @vpc_flow_logs_service_stub.logger if config.respond_to? :logger= + end + + @iam_policy_client = Google::Iam::V1::IAMPolicy::Rest::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @vpc_flow_logs_service_stub.endpoint + config.universe_domain = @vpc_flow_logs_service_stub.universe_domain + config.bindings_override = @config.bindings_override + config.logger = @vpc_flow_logs_service_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::NetworkManagement::V1::VpcFlowLogsService::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 + + ## + # Get the associated client for mix-in of the IAMPolicy. + # + # @return [Google::Iam::V1::IAMPolicy::Rest::Client] + # + attr_reader :iam_policy_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @vpc_flow_logs_service_stub.logger + end + + # Service calls + + ## + # Lists all `VpcFlowLogsConfigs` in a given project. + # + # @overload list_vpc_flow_logs_configs(request, options = nil) + # Pass arguments to `list_vpc_flow_logs_configs` via a request object, either of type + # {::Google::Cloud::NetworkManagement::V1::ListVpcFlowLogsConfigsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkManagement::V1::ListVpcFlowLogsConfigsRequest, ::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_vpc_flow_logs_configs(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_vpc_flow_logs_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. The parent resource of the VpcFlowLogsConfig, + # in one of the following formats: + # + # - For project-level resources: `projects/{project_id}/locations/global` + # + # - For organization-level resources: + # `organizations/{organization_id}/locations/global` + # @param page_size [::Integer] + # Optional. Number of `VpcFlowLogsConfigs` to return. + # @param page_token [::String] + # Optional. Page token from an earlier query, as returned in + # `next_page_token`. + # @param filter [::String] + # Optional. Lists the `VpcFlowLogsConfigs` that match the filter expression. + # A filter expression must use the supported [CEL logic operators] + # (https://cloud.google.com/vpc/docs/about-flow-logs-records#supported_cel_logic_operators). + # @param order_by [::String] + # Optional. Field to use to sort the list. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkManagement::V1::VpcFlowLogsConfig>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkManagement::V1::VpcFlowLogsConfig>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/network_management/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkManagement::V1::VpcFlowLogsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkManagement::V1::ListVpcFlowLogsConfigsRequest.new + # + # # Call the list_vpc_flow_logs_configs method. + # result = client.list_vpc_flow_logs_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::NetworkManagement::V1::VpcFlowLogsConfig. + # p item + # end + # + def list_vpc_flow_logs_configs request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkManagement::V1::ListVpcFlowLogsConfigsRequest + + # 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_vpc_flow_logs_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::NetworkManagement::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_vpc_flow_logs_configs.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_vpc_flow_logs_configs.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @vpc_flow_logs_service_stub.list_vpc_flow_logs_configs request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @vpc_flow_logs_service_stub, :list_vpc_flow_logs_configs, "vpc_flow_logs_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 + + ## + # Gets the details of a specific `VpcFlowLogsConfig`. + # + # @overload get_vpc_flow_logs_config(request, options = nil) + # Pass arguments to `get_vpc_flow_logs_config` via a request object, either of type + # {::Google::Cloud::NetworkManagement::V1::GetVpcFlowLogsConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkManagement::V1::GetVpcFlowLogsConfigRequest, ::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_vpc_flow_logs_config(name: nil) + # Pass arguments to `get_vpc_flow_logs_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. The resource name of the VpcFlowLogsConfig, + # in one of the following formats: + # + # - For project-level resources: + # `projects/{project_id}/locations/global/vpcFlowLogsConfigs/{vpc_flow_logs_config_id}` + # + # - For organization-level resources: + # `organizations/{organization_id}/locations/global/vpcFlowLogsConfigs/{vpc_flow_logs_config_id}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::NetworkManagement::V1::VpcFlowLogsConfig] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::NetworkManagement::V1::VpcFlowLogsConfig] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/network_management/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkManagement::V1::VpcFlowLogsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkManagement::V1::GetVpcFlowLogsConfigRequest.new + # + # # Call the get_vpc_flow_logs_config method. + # result = client.get_vpc_flow_logs_config request + # + # # The returned object is of type Google::Cloud::NetworkManagement::V1::VpcFlowLogsConfig. + # p result + # + def get_vpc_flow_logs_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkManagement::V1::GetVpcFlowLogsConfigRequest + + # 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_vpc_flow_logs_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::NetworkManagement::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_vpc_flow_logs_config.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_vpc_flow_logs_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @vpc_flow_logs_service_stub.get_vpc_flow_logs_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 + + ## + # Creates a new `VpcFlowLogsConfig`. + # If a configuration with the exact same settings already exists (even if the + # ID is different), the creation fails. + # Notes: + # + # 1. Creating a configuration with `state=DISABLED` will fail + # 2. The following fields are not considered as settings for the purpose + # of the check mentioned above, therefore - creating another configuration + # with the same fields but different values for the following fields will + # fail as well: + # * name + # * create_time + # * update_time + # * labels + # * description + # + # @overload create_vpc_flow_logs_config(request, options = nil) + # Pass arguments to `create_vpc_flow_logs_config` via a request object, either of type + # {::Google::Cloud::NetworkManagement::V1::CreateVpcFlowLogsConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkManagement::V1::CreateVpcFlowLogsConfigRequest, ::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_vpc_flow_logs_config(parent: nil, vpc_flow_logs_config_id: nil, vpc_flow_logs_config: nil) + # Pass arguments to `create_vpc_flow_logs_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. The parent resource of the VpcFlowLogsConfig to create, + # in one of the following formats: + # + # - For project-level resources: `projects/{project_id}/locations/global` + # + # - For organization-level resources: + # `organizations/{organization_id}/locations/global` + # @param vpc_flow_logs_config_id [::String] + # Required. ID of the `VpcFlowLogsConfig`. + # @param vpc_flow_logs_config [::Google::Cloud::NetworkManagement::V1::VpcFlowLogsConfig, ::Hash] + # Required. A `VpcFlowLogsConfig` 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/network_management/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkManagement::V1::VpcFlowLogsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkManagement::V1::CreateVpcFlowLogsConfigRequest.new + # + # # Call the create_vpc_flow_logs_config method. + # result = client.create_vpc_flow_logs_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_vpc_flow_logs_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkManagement::V1::CreateVpcFlowLogsConfigRequest + + # 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_vpc_flow_logs_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::NetworkManagement::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_vpc_flow_logs_config.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_vpc_flow_logs_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @vpc_flow_logs_service_stub.create_vpc_flow_logs_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 + + ## + # Updates an existing `VpcFlowLogsConfig`. + # If a configuration with the exact same settings already exists (even if the + # ID is different), the creation fails. + # Notes: + # + # 1. Updating a configuration with `state=DISABLED` will fail. + # 2. The following fields are not considered as settings for the purpose + # of the check mentioned above, therefore - updating another configuration + # with the same fields but different values for the following fields will + # fail as well: + # * name + # * create_time + # * update_time + # * labels + # * description + # + # @overload update_vpc_flow_logs_config(request, options = nil) + # Pass arguments to `update_vpc_flow_logs_config` via a request object, either of type + # {::Google::Cloud::NetworkManagement::V1::UpdateVpcFlowLogsConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkManagement::V1::UpdateVpcFlowLogsConfigRequest, ::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_vpc_flow_logs_config(update_mask: nil, vpc_flow_logs_config: nil) + # Pass arguments to `update_vpc_flow_logs_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 update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. Mask of fields to update. At least one path must be supplied in + # this field. + # For example, to change the state of the configuration to ENABLED, specify + # `update_mask` = `"state"`, and the `vpc_flow_logs_config` would be: + # `vpc_flow_logs_config = { + # name = + # "projects/my-project/locations/global/vpcFlowLogsConfigs/my-config" + # state = "ENABLED" }` + # @param vpc_flow_logs_config [::Google::Cloud::NetworkManagement::V1::VpcFlowLogsConfig, ::Hash] + # Required. Only fields specified in update_mask are updated. + # @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/network_management/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkManagement::V1::VpcFlowLogsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkManagement::V1::UpdateVpcFlowLogsConfigRequest.new + # + # # Call the update_vpc_flow_logs_config method. + # result = client.update_vpc_flow_logs_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_vpc_flow_logs_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkManagement::V1::UpdateVpcFlowLogsConfigRequest + + # 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_vpc_flow_logs_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::NetworkManagement::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_vpc_flow_logs_config.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_vpc_flow_logs_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @vpc_flow_logs_service_stub.update_vpc_flow_logs_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 specific `VpcFlowLogsConfig`. + # + # @overload delete_vpc_flow_logs_config(request, options = nil) + # Pass arguments to `delete_vpc_flow_logs_config` via a request object, either of type + # {::Google::Cloud::NetworkManagement::V1::DeleteVpcFlowLogsConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkManagement::V1::DeleteVpcFlowLogsConfigRequest, ::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_vpc_flow_logs_config(name: nil) + # Pass arguments to `delete_vpc_flow_logs_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. The resource name of the VpcFlowLogsConfig, + # in one of the following formats: + # + # - For a project-level resource: + # `projects/{project_id}/locations/global/vpcFlowLogsConfigs/{vpc_flow_logs_config_id}` + # + # - For an organization-level resource: + # `organizations/{organization_id}/locations/global/vpcFlowLogsConfigs/{vpc_flow_logs_config_id}` + # @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/network_management/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkManagement::V1::VpcFlowLogsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkManagement::V1::DeleteVpcFlowLogsConfigRequest.new + # + # # Call the delete_vpc_flow_logs_config method. + # result = client.delete_vpc_flow_logs_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_vpc_flow_logs_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkManagement::V1::DeleteVpcFlowLogsConfigRequest + + # 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_vpc_flow_logs_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::NetworkManagement::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_vpc_flow_logs_config.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_vpc_flow_logs_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @vpc_flow_logs_service_stub.delete_vpc_flow_logs_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 + + ## + # QueryOrgVpcFlowLogsConfigs returns a list of all organization-level VPC + # Flow Logs configurations applicable to the specified project. + # + # @overload query_org_vpc_flow_logs_configs(request, options = nil) + # Pass arguments to `query_org_vpc_flow_logs_configs` via a request object, either of type + # {::Google::Cloud::NetworkManagement::V1::QueryOrgVpcFlowLogsConfigsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkManagement::V1::QueryOrgVpcFlowLogsConfigsRequest, ::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 query_org_vpc_flow_logs_configs(parent: nil, page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `query_org_vpc_flow_logs_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. The parent resource of the VpcFlowLogsConfig, specified in + # the following format: `projects/{project_id}/locations/global` + # @param page_size [::Integer] + # Optional. Number of `VpcFlowLogsConfigs` to return. + # @param page_token [::String] + # Optional. Page token from an earlier query, as returned in + # `next_page_token`. + # @param filter [::String] + # Optional. Lists the `VpcFlowLogsConfigs` that match the filter expression. + # A filter expression must use the supported [CEL logic operators] + # (https://cloud.google.com/vpc/docs/about-flow-logs-records#supported_cel_logic_operators). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkManagement::V1::VpcFlowLogsConfig>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkManagement::V1::VpcFlowLogsConfig>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/network_management/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkManagement::V1::VpcFlowLogsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkManagement::V1::QueryOrgVpcFlowLogsConfigsRequest.new + # + # # Call the query_org_vpc_flow_logs_configs method. + # result = client.query_org_vpc_flow_logs_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::NetworkManagement::V1::VpcFlowLogsConfig. + # p item + # end + # + def query_org_vpc_flow_logs_configs request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkManagement::V1::QueryOrgVpcFlowLogsConfigsRequest + + # 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.query_org_vpc_flow_logs_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::NetworkManagement::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.query_org_vpc_flow_logs_configs.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.query_org_vpc_flow_logs_configs.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @vpc_flow_logs_service_stub.query_org_vpc_flow_logs_configs request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @vpc_flow_logs_service_stub, :query_org_vpc_flow_logs_configs, "vpc_flow_logs_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 + + ## + # ShowEffectiveFlowLogsConfigs returns a list of all VPC Flow Logs + # configurations applicable to a specified resource. + # + # @overload show_effective_flow_logs_configs(request, options = nil) + # Pass arguments to `show_effective_flow_logs_configs` via a request object, either of type + # {::Google::Cloud::NetworkManagement::V1::ShowEffectiveFlowLogsConfigsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkManagement::V1::ShowEffectiveFlowLogsConfigsRequest, ::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 show_effective_flow_logs_configs(parent: nil, resource: nil, page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `show_effective_flow_logs_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. The parent resource of the VpcFlowLogsConfig, specified in + # the following format: `projects/{project_id}/locations/global` + # @param resource [::String] + # Required. The resource to get the effective VPC Flow Logs configuration + # for. The resource must belong to the same project as the parent. The + # resource must be a network, subnetwork, interconnect attachment, VPN + # tunnel, or a project. + # @param page_size [::Integer] + # Optional. Number of `EffectiveVpcFlowLogsConfigs` to return. Default is 30. + # @param page_token [::String] + # Optional. Page token from an earlier query, as returned in + # `next_page_token`. + # @param filter [::String] + # Optional. Lists the `EffectiveVpcFlowLogsConfigs` that match the filter + # expression. A filter expression must use the supported [CEL logic + # operators] + # (https://cloud.google.com/vpc/docs/about-flow-logs-records#supported_cel_logic_operators). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkManagement::V1::EffectiveVpcFlowLogsConfig>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkManagement::V1::EffectiveVpcFlowLogsConfig>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/network_management/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkManagement::V1::VpcFlowLogsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkManagement::V1::ShowEffectiveFlowLogsConfigsRequest.new + # + # # Call the show_effective_flow_logs_configs method. + # result = client.show_effective_flow_logs_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::NetworkManagement::V1::EffectiveVpcFlowLogsConfig. + # p item + # end + # + def show_effective_flow_logs_configs request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkManagement::V1::ShowEffectiveFlowLogsConfigsRequest + + # 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.show_effective_flow_logs_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::NetworkManagement::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.show_effective_flow_logs_configs.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.show_effective_flow_logs_configs.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @vpc_flow_logs_service_stub.show_effective_flow_logs_configs request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @vpc_flow_logs_service_stub, :show_effective_flow_logs_configs, "effective_flow_logs_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 + + ## + # Configuration class for the VpcFlowLogsService REST API. + # + # This class represents the configuration for VpcFlowLogsService 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::NetworkManagement::V1::VpcFlowLogsService::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_vpc_flow_logs_configs to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::NetworkManagement::V1::VpcFlowLogsService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_vpc_flow_logs_configs.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::NetworkManagement::V1::VpcFlowLogsService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_vpc_flow_logs_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 = "networkmanagement.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 VpcFlowLogsService 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_vpc_flow_logs_configs` + # @return [::Gapic::Config::Method] + # + attr_reader :list_vpc_flow_logs_configs + ## + # RPC-specific configuration for `get_vpc_flow_logs_config` + # @return [::Gapic::Config::Method] + # + attr_reader :get_vpc_flow_logs_config + ## + # RPC-specific configuration for `create_vpc_flow_logs_config` + # @return [::Gapic::Config::Method] + # + attr_reader :create_vpc_flow_logs_config + ## + # RPC-specific configuration for `update_vpc_flow_logs_config` + # @return [::Gapic::Config::Method] + # + attr_reader :update_vpc_flow_logs_config + ## + # RPC-specific configuration for `delete_vpc_flow_logs_config` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_vpc_flow_logs_config + ## + # RPC-specific configuration for `query_org_vpc_flow_logs_configs` + # @return [::Gapic::Config::Method] + # + attr_reader :query_org_vpc_flow_logs_configs + ## + # RPC-specific configuration for `show_effective_flow_logs_configs` + # @return [::Gapic::Config::Method] + # + attr_reader :show_effective_flow_logs_configs + + # @private + def initialize parent_rpcs = nil + list_vpc_flow_logs_configs_config = parent_rpcs.list_vpc_flow_logs_configs if parent_rpcs.respond_to? :list_vpc_flow_logs_configs + @list_vpc_flow_logs_configs = ::Gapic::Config::Method.new list_vpc_flow_logs_configs_config + get_vpc_flow_logs_config_config = parent_rpcs.get_vpc_flow_logs_config if parent_rpcs.respond_to? :get_vpc_flow_logs_config + @get_vpc_flow_logs_config = ::Gapic::Config::Method.new get_vpc_flow_logs_config_config + create_vpc_flow_logs_config_config = parent_rpcs.create_vpc_flow_logs_config if parent_rpcs.respond_to? :create_vpc_flow_logs_config + @create_vpc_flow_logs_config = ::Gapic::Config::Method.new create_vpc_flow_logs_config_config + update_vpc_flow_logs_config_config = parent_rpcs.update_vpc_flow_logs_config if parent_rpcs.respond_to? :update_vpc_flow_logs_config + @update_vpc_flow_logs_config = ::Gapic::Config::Method.new update_vpc_flow_logs_config_config + delete_vpc_flow_logs_config_config = parent_rpcs.delete_vpc_flow_logs_config if parent_rpcs.respond_to? :delete_vpc_flow_logs_config + @delete_vpc_flow_logs_config = ::Gapic::Config::Method.new delete_vpc_flow_logs_config_config + query_org_vpc_flow_logs_configs_config = parent_rpcs.query_org_vpc_flow_logs_configs if parent_rpcs.respond_to? :query_org_vpc_flow_logs_configs + @query_org_vpc_flow_logs_configs = ::Gapic::Config::Method.new query_org_vpc_flow_logs_configs_config + show_effective_flow_logs_configs_config = parent_rpcs.show_effective_flow_logs_configs if parent_rpcs.respond_to? :show_effective_flow_logs_configs + @show_effective_flow_logs_configs = ::Gapic::Config::Method.new show_effective_flow_logs_configs_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/vpc_flow_logs_service/rest/operations.rb b/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/vpc_flow_logs_service/rest/operations.rb new file mode 100644 index 000000000000..d5fdcbd481d1 --- /dev/null +++ b/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/vpc_flow_logs_service/rest/operations.rb @@ -0,0 +1,954 @@ +# 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 NetworkManagement + module V1 + module VpcFlowLogsService + module Rest + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "networkmanagement.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the VpcFlowLogsService 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 VpcFlowLogsService 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::NetworkManagement::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::NetworkManagement::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::NetworkManagement::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::NetworkManagement::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 = "networkmanagement.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/global/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}/operations", + matches: [ + ["name", %r{^organizations/[^/]+/locations/global/?$}, 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/global/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/locations/global/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/global/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/locations/global/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/global/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:cancel", + body: "*", + matches: [ + ["name", %r{^organizations/[^/]+/locations/global/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/vpc_flow_logs_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/vpc_flow_logs_service/rest/service_stub.rb new file mode 100644 index 000000000000..b528be315547 --- /dev/null +++ b/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/vpc_flow_logs_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/networkmanagement/v1/vpc_flow_logs_pb" + +module Google + module Cloud + module NetworkManagement + module V1 + module VpcFlowLogsService + module Rest + ## + # REST service stub for the VpcFlowLogsService 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_vpc_flow_logs_configs REST call + # + # @param request_pb [::Google::Cloud::NetworkManagement::V1::ListVpcFlowLogsConfigsRequest] + # 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::NetworkManagement::V1::ListVpcFlowLogsConfigsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::NetworkManagement::V1::ListVpcFlowLogsConfigsResponse] + # A result object deserialized from the server's reply + def list_vpc_flow_logs_configs request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_vpc_flow_logs_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_vpc_flow_logs_configs", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::NetworkManagement::V1::ListVpcFlowLogsConfigsResponse.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_vpc_flow_logs_config REST call + # + # @param request_pb [::Google::Cloud::NetworkManagement::V1::GetVpcFlowLogsConfigRequest] + # 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::NetworkManagement::V1::VpcFlowLogsConfig] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::NetworkManagement::V1::VpcFlowLogsConfig] + # A result object deserialized from the server's reply + def get_vpc_flow_logs_config request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_vpc_flow_logs_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_vpc_flow_logs_config", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::NetworkManagement::V1::VpcFlowLogsConfig.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_vpc_flow_logs_config REST call + # + # @param request_pb [::Google::Cloud::NetworkManagement::V1::CreateVpcFlowLogsConfigRequest] + # 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_vpc_flow_logs_config request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_vpc_flow_logs_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_vpc_flow_logs_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 update_vpc_flow_logs_config REST call + # + # @param request_pb [::Google::Cloud::NetworkManagement::V1::UpdateVpcFlowLogsConfigRequest] + # 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_vpc_flow_logs_config request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_vpc_flow_logs_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_vpc_flow_logs_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_vpc_flow_logs_config REST call + # + # @param request_pb [::Google::Cloud::NetworkManagement::V1::DeleteVpcFlowLogsConfigRequest] + # 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_vpc_flow_logs_config request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_vpc_flow_logs_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_vpc_flow_logs_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 query_org_vpc_flow_logs_configs REST call + # + # @param request_pb [::Google::Cloud::NetworkManagement::V1::QueryOrgVpcFlowLogsConfigsRequest] + # 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::NetworkManagement::V1::QueryOrgVpcFlowLogsConfigsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::NetworkManagement::V1::QueryOrgVpcFlowLogsConfigsResponse] + # A result object deserialized from the server's reply + def query_org_vpc_flow_logs_configs request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_query_org_vpc_flow_logs_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: "query_org_vpc_flow_logs_configs", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::NetworkManagement::V1::QueryOrgVpcFlowLogsConfigsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the show_effective_flow_logs_configs REST call + # + # @param request_pb [::Google::Cloud::NetworkManagement::V1::ShowEffectiveFlowLogsConfigsRequest] + # 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::NetworkManagement::V1::ShowEffectiveFlowLogsConfigsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::NetworkManagement::V1::ShowEffectiveFlowLogsConfigsResponse] + # A result object deserialized from the server's reply + def show_effective_flow_logs_configs request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_show_effective_flow_logs_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: "show_effective_flow_logs_configs", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::NetworkManagement::V1::ShowEffectiveFlowLogsConfigsResponse.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_vpc_flow_logs_configs REST call + # + # @param request_pb [::Google::Cloud::NetworkManagement::V1::ListVpcFlowLogsConfigsRequest] + # 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_vpc_flow_logs_configs_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/vpcFlowLogsConfigs", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_vpc_flow_logs_config REST call + # + # @param request_pb [::Google::Cloud::NetworkManagement::V1::GetVpcFlowLogsConfigRequest] + # 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_vpc_flow_logs_config_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/vpcFlowLogsConfigs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_vpc_flow_logs_config REST call + # + # @param request_pb [::Google::Cloud::NetworkManagement::V1::CreateVpcFlowLogsConfigRequest] + # 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_vpc_flow_logs_config_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/vpcFlowLogsConfigs", + body: "vpc_flow_logs_config", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_vpc_flow_logs_config REST call + # + # @param request_pb [::Google::Cloud::NetworkManagement::V1::UpdateVpcFlowLogsConfigRequest] + # 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_vpc_flow_logs_config_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{vpc_flow_logs_config.name}", + body: "vpc_flow_logs_config", + matches: [ + ["vpc_flow_logs_config.name", %r{^projects/[^/]+/locations/[^/]+/vpcFlowLogsConfigs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_vpc_flow_logs_config REST call + # + # @param request_pb [::Google::Cloud::NetworkManagement::V1::DeleteVpcFlowLogsConfigRequest] + # 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_vpc_flow_logs_config_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/vpcFlowLogsConfigs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the query_org_vpc_flow_logs_configs REST call + # + # @param request_pb [::Google::Cloud::NetworkManagement::V1::QueryOrgVpcFlowLogsConfigsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_query_org_vpc_flow_logs_configs_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/vpcFlowLogsConfigs:queryOrgVpcFlowLogsConfigs", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the show_effective_flow_logs_configs REST call + # + # @param request_pb [::Google::Cloud::NetworkManagement::V1::ShowEffectiveFlowLogsConfigsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_show_effective_flow_logs_configs_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/vpcFlowLogsConfigs:showEffectiveFlowLogsConfigs", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/networkmanagement/v1/connectivity_test_pb.rb b/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/networkmanagement/v1/connectivity_test_pb.rb new file mode 100644 index 000000000000..af52f0fdad6f --- /dev/null +++ b/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/networkmanagement/v1/connectivity_test_pb.rb @@ -0,0 +1,66 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/networkmanagement/v1/connectivity_test.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/cloud/networkmanagement/v1/trace_pb' +require 'google/protobuf/timestamp_pb' +require 'google/rpc/status_pb' + + +descriptor_data = "\n9google/cloud/networkmanagement/v1/connectivity_test.proto\x12!google.cloud.networkmanagement.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a-google/cloud/networkmanagement/v1/trace.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto\"\xae\x07\n\x10\x43onnectivityTest\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12@\n\x06source\x18\x03 \x01(\x0b\x32+.google.cloud.networkmanagement.v1.EndpointB\x03\xe0\x41\x02\x12\x45\n\x0b\x64\x65stination\x18\x04 \x01(\x0b\x32+.google.cloud.networkmanagement.v1.EndpointB\x03\xe0\x41\x02\x12\x10\n\x08protocol\x18\x05 \x01(\t\x12\x18\n\x10related_projects\x18\x06 \x03(\t\x12\x19\n\x0c\x64isplay_name\x18\x07 \x01(\tB\x03\xe0\x41\x03\x12O\n\x06labels\x18\x08 \x03(\x0b\x32?.google.cloud.networkmanagement.v1.ConnectivityTest.LabelsEntry\x12\x34\n\x0b\x63reate_time\x18\n \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x0b \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12Y\n\x14reachability_details\x18\x0c \x01(\x0b\x32\x36.google.cloud.networkmanagement.v1.ReachabilityDetailsB\x03\xe0\x41\x03\x12O\n\x0fprobing_details\x18\x0e \x01(\x0b\x32\x31.google.cloud.networkmanagement.v1.ProbingDetailsB\x03\xe0\x41\x03\x12\x12\n\nround_trip\x18\x0f \x01(\x08\x12`\n\x1breturn_reachability_details\x18\x10 \x01(\x0b\x32\x36.google.cloud.networkmanagement.v1.ReachabilityDetailsB\x03\xe0\x41\x03\x12\x1e\n\x16\x62ypass_firewall_checks\x18\x11 \x01(\x08\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:t\xea\x41q\n1networkmanagement.googleapis.com/ConnectivityTest\x12.google.cloud.networkmanagement.v1.ProbingDetails.EdgeLocation\x12\\\n\x0e\x65\x64ge_responses\x18\n \x03(\x0b\x32\x44.google.cloud.networkmanagement.v1.ProbingDetails.SingleEdgeResponse\x12\x1a\n\x12probed_all_devices\x18\x0b \x01(\x08\x1a)\n\x0c\x45\x64geLocation\x12\x19\n\x11metropolitan_area\x18\x01 \x01(\t\x1a\xf1\x02\n\x12SingleEdgeResponse\x12O\n\x06result\x18\x01 \x01(\x0e\x32?.google.cloud.networkmanagement.v1.ProbingDetails.ProbingResult\x12\x18\n\x10sent_probe_count\x18\x02 \x01(\x05\x12\x1e\n\x16successful_probe_count\x18\x03 \x01(\x05\x12O\n\x0fprobing_latency\x18\x04 \x01(\x0b\x32\x36.google.cloud.networkmanagement.v1.LatencyDistribution\x12\x63\n\x1b\x64\x65stination_egress_location\x18\x05 \x01(\x0b\x32>.google.cloud.networkmanagement.v1.ProbingDetails.EdgeLocation\x12\x1a\n\x12\x64\x65stination_router\x18\x06 \x01(\t\"\x80\x01\n\rProbingResult\x12\x1e\n\x1aPROBING_RESULT_UNSPECIFIED\x10\x00\x12\r\n\tREACHABLE\x10\x01\x12\x0f\n\x0bUNREACHABLE\x10\x02\x12\x1d\n\x19REACHABILITY_INCONSISTENT\x10\x03\x12\x10\n\x0cUNDETERMINED\x10\x04\"g\n\x11ProbingAbortCause\x12#\n\x1fPROBING_ABORT_CAUSE_UNSPECIFIED\x10\x00\x12\x15\n\x11PERMISSION_DENIED\x10\x01\x12\x16\n\x12NO_SOURCE_LOCATION\x10\x02\x42\xfd\x01\n%com.google.cloud.networkmanagement.v1B\x0eTestOuterClassP\x01ZScloud.google.com/go/networkmanagement/apiv1/networkmanagementpb;networkmanagementpb\xaa\x02!Google.Cloud.NetworkManagement.V1\xca\x02!Google\\Cloud\\NetworkManagement\\V1\xea\x02$Google::Cloud::NetworkManagement::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"], + ["google.cloud.networkmanagement.v1.Trace", "google/cloud/networkmanagement/v1/trace.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 NetworkManagement + module V1 + ConnectivityTest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.ConnectivityTest").msgclass + Endpoint = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.Endpoint").msgclass + Endpoint::CloudFunctionEndpoint = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint").msgclass + Endpoint::AppEngineVersionEndpoint = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint").msgclass + Endpoint::CloudRunRevisionEndpoint = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint").msgclass + Endpoint::NetworkType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.Endpoint.NetworkType").enummodule + Endpoint::ForwardingRuleTarget = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.Endpoint.ForwardingRuleTarget").enummodule + ReachabilityDetails = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.ReachabilityDetails").msgclass + ReachabilityDetails::Result = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.ReachabilityDetails.Result").enummodule + LatencyPercentile = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.LatencyPercentile").msgclass + LatencyDistribution = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.LatencyDistribution").msgclass + ProbingDetails = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.ProbingDetails").msgclass + ProbingDetails::EdgeLocation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.ProbingDetails.EdgeLocation").msgclass + ProbingDetails::SingleEdgeResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.ProbingDetails.SingleEdgeResponse").msgclass + ProbingDetails::ProbingResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.ProbingDetails.ProbingResult").enummodule + ProbingDetails::ProbingAbortCause = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.ProbingDetails.ProbingAbortCause").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/networkmanagement/v1/reachability_pb.rb b/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/networkmanagement/v1/reachability_pb.rb new file mode 100644 index 000000000000..492077f66e3f --- /dev/null +++ b/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/networkmanagement/v1/reachability_pb.rb @@ -0,0 +1,62 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/networkmanagement/v1/reachability.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/cloud/networkmanagement/v1/connectivity_test_pb' +require 'google/longrunning/operations_pb' +require 'google/protobuf/empty_pb' +require 'google/protobuf/field_mask_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n4google/cloud/networkmanagement/v1/reachability.proto\x12!google.cloud.networkmanagement.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x39google/cloud/networkmanagement/v1/connectivity_test.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xac\x01\n\x1cListConnectivityTestsRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+cloudresourcemanager.googleapis.com/Project\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x04 \x01(\t\x12\x10\n\x08order_by\x18\x05 \x01(\t\"\x95\x01\n\x1dListConnectivityTestsResponse\x12\x46\n\tresources\x18\x01 \x03(\x0b\x32\x33.google.cloud.networkmanagement.v1.ConnectivityTest\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"e\n\x1aGetConnectivityTestRequest\x12G\n\x04name\x18\x01 \x01(\tB9\xe0\x41\x02\xfa\x41\x33\n1networkmanagement.googleapis.com/ConnectivityTest\"\xc6\x01\n\x1d\x43reateConnectivityTestRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+cloudresourcemanager.googleapis.com/Project\x12\x14\n\x07test_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12J\n\x08resource\x18\x03 \x01(\x0b\x32\x33.google.cloud.networkmanagement.v1.ConnectivityTestB\x03\xe0\x41\x02\"\xa1\x01\n\x1dUpdateConnectivityTestRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12J\n\x08resource\x18\x02 \x01(\x0b\x32\x33.google.cloud.networkmanagement.v1.ConnectivityTestB\x03\xe0\x41\x02\"h\n\x1d\x44\x65leteConnectivityTestRequest\x12G\n\x04name\x18\x01 \x01(\tB9\xe0\x41\x02\xfa\x41\x33\n1networkmanagement.googleapis.com/ConnectivityTest\"g\n\x1cRerunConnectivityTestRequest\x12G\n\x04name\x18\x01 \x01(\tB9\xe0\x41\x02\xfa\x41\x33\n1networkmanagement.googleapis.com/ConnectivityTest\"\xd6\x01\n\x11OperationMetadata\x12/\n\x0b\x63reate_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x0e\n\x06target\x18\x03 \x01(\t\x12\x0c\n\x04verb\x18\x04 \x01(\t\x12\x15\n\rstatus_detail\x18\x05 \x01(\t\x12\x18\n\x10\x63\x61ncel_requested\x18\x06 \x01(\x08\x12\x13\n\x0b\x61pi_version\x18\x07 \x01(\t2\x96\r\n\x13ReachabilityService\x12\xe7\x01\n\x15ListConnectivityTests\x12?.google.cloud.networkmanagement.v1.ListConnectivityTestsRequest\x1a@.google.cloud.networkmanagement.v1.ListConnectivityTestsResponse\"K\xda\x41\x06parent\x82\xd3\xe4\x93\x02<\x12:/v1/{parent=projects/*/locations/global}/connectivityTests\x12\xd4\x01\n\x13GetConnectivityTest\x12=.google.cloud.networkmanagement.v1.GetConnectivityTestRequest\x1a\x33.google.cloud.networkmanagement.v1.ConnectivityTest\"I\xda\x41\x04name\x82\xd3\xe4\x93\x02<\x12:/v1/{name=projects/*/locations/global/connectivityTests/*}\x12\xac\x02\n\x16\x43reateConnectivityTest\x12@.google.cloud.networkmanagement.v1.CreateConnectivityTestRequest\x1a\x1d.google.longrunning.Operation\"\xb0\x01\xca\x41G\n2google.cloud.networkmanagement.v1.ConnectivityTest\x12\x11OperationMetadata\xda\x41\x17parent,test_id,resource\x82\xd3\xe4\x93\x02\x46\":/v1/{parent=projects/*/locations/global}/connectivityTests:\x08resource\x12\xb2\x02\n\x16UpdateConnectivityTest\x12@.google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest\x1a\x1d.google.longrunning.Operation\"\xb6\x01\xca\x41G\n2google.cloud.networkmanagement.v1.ConnectivityTest\x12\x11OperationMetadata\xda\x41\x14update_mask,resource\x82\xd3\xe4\x93\x02O2C/v1/{resource.name=projects/*/locations/global/connectivityTests/*}:\x08resource\x12\x8f\x02\n\x15RerunConnectivityTest\x12?.google.cloud.networkmanagement.v1.RerunConnectivityTestRequest\x1a\x1d.google.longrunning.Operation\"\x95\x01\xca\x41G\n2google.cloud.networkmanagement.v1.ConnectivityTest\x12\x11OperationMetadata\x82\xd3\xe4\x93\x02\x45\"@/v1/{name=projects/*/locations/global/connectivityTests/*}:rerun:\x01*\x12\xf1\x01\n\x16\x44\x65leteConnectivityTest\x12@.google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest\x1a\x1d.google.longrunning.Operation\"v\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02<*:/v1/{name=projects/*/locations/global/connectivityTests/*}\x1aT\xca\x41 networkmanagement.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\x87\x02\n%com.google.cloud.networkmanagement.v1B\x18ReachabilityServiceProtoP\x01ZScloud.google.com/go/networkmanagement/apiv1/networkmanagementpb;networkmanagementpb\xaa\x02!Google.Cloud.NetworkManagement.V1\xca\x02!Google\\Cloud\\NetworkManagement\\V1\xea\x02$Google::Cloud::NetworkManagement::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.cloud.networkmanagement.v1.ConnectivityTest", "google/cloud/networkmanagement/v1/connectivity_test.proto"], + ["google.protobuf.FieldMask", "google/protobuf/field_mask.proto"], + ["google.protobuf.Timestamp", "google/protobuf/timestamp.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 NetworkManagement + module V1 + ListConnectivityTestsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.ListConnectivityTestsRequest").msgclass + ListConnectivityTestsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.ListConnectivityTestsResponse").msgclass + GetConnectivityTestRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.GetConnectivityTestRequest").msgclass + CreateConnectivityTestRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.CreateConnectivityTestRequest").msgclass + UpdateConnectivityTestRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest").msgclass + DeleteConnectivityTestRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest").msgclass + RerunConnectivityTestRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.RerunConnectivityTestRequest").msgclass + OperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.OperationMetadata").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/networkmanagement/v1/reachability_services_pb.rb b/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/networkmanagement/v1/reachability_services_pb.rb new file mode 100644 index 000000000000..c548533e2859 --- /dev/null +++ b/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/networkmanagement/v1/reachability_services_pb.rb @@ -0,0 +1,100 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/cloud/networkmanagement/v1/reachability.proto for package 'Google.Cloud.NetworkManagement.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/networkmanagement/v1/reachability_pb' + +module Google + module Cloud + module NetworkManagement + module V1 + module ReachabilityService + # The Reachability service in Google Cloud Network Management API + # + # The Reachability service in the Google Cloud Network Management API provides + # services that analyze the reachability within a single Google Virtual Private + # Cloud (VPC) network, between peered VPC networks, between VPC and on-premises + # networks, or between VPC networks and internet hosts. A reachability analysis + # is based on Google Cloud network configurations. + # + # You can use the analysis results to verify these configurations and + # to troubleshoot connectivity issues. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.cloud.networkmanagement.v1.ReachabilityService' + + # Lists all Connectivity Tests owned by a project. + rpc :ListConnectivityTests, ::Google::Cloud::NetworkManagement::V1::ListConnectivityTestsRequest, ::Google::Cloud::NetworkManagement::V1::ListConnectivityTestsResponse + # Gets the details of a specific Connectivity Test. + rpc :GetConnectivityTest, ::Google::Cloud::NetworkManagement::V1::GetConnectivityTestRequest, ::Google::Cloud::NetworkManagement::V1::ConnectivityTest + # Creates a new Connectivity Test. + # After you create a test, the reachability analysis is performed as part + # of the long running operation, which completes when the analysis completes. + # + # If the endpoint specifications in `ConnectivityTest` are invalid + # (for example, containing non-existent resources in the network, or you + # don't have read permissions to the network configurations of listed + # projects), then the reachability result returns a value of `UNKNOWN`. + # + # If the endpoint specifications in `ConnectivityTest` are + # incomplete, the reachability result returns a value of + # AMBIGUOUS. For more information, + # see the Connectivity Test documentation. + rpc :CreateConnectivityTest, ::Google::Cloud::NetworkManagement::V1::CreateConnectivityTestRequest, ::Google::Longrunning::Operation + # Updates the configuration of an existing `ConnectivityTest`. + # After you update a test, the reachability analysis is performed as part + # of the long running operation, which completes when the analysis completes. + # The Reachability state in the test resource is updated with the new result. + # + # If the endpoint specifications in `ConnectivityTest` are invalid + # (for example, they contain non-existent resources in the network, or the + # user does not have read permissions to the network configurations of + # listed projects), then the reachability result returns a value of + # UNKNOWN. + # + # If the endpoint specifications in `ConnectivityTest` are incomplete, the + # reachability result returns a value of `AMBIGUOUS`. See the documentation + # in `ConnectivityTest` for more details. + rpc :UpdateConnectivityTest, ::Google::Cloud::NetworkManagement::V1::UpdateConnectivityTestRequest, ::Google::Longrunning::Operation + # Rerun an existing `ConnectivityTest`. + # After the user triggers the rerun, the reachability analysis is performed + # as part of the long running operation, which completes when the analysis + # completes. + # + # Even though the test configuration remains the same, the reachability + # result may change due to underlying network configuration changes. + # + # If the endpoint specifications in `ConnectivityTest` become invalid (for + # example, specified resources are deleted in the network, or you lost + # read permissions to the network configurations of listed projects), then + # the reachability result returns a value of `UNKNOWN`. + rpc :RerunConnectivityTest, ::Google::Cloud::NetworkManagement::V1::RerunConnectivityTestRequest, ::Google::Longrunning::Operation + # Deletes a specific `ConnectivityTest`. + rpc :DeleteConnectivityTest, ::Google::Cloud::NetworkManagement::V1::DeleteConnectivityTestRequest, ::Google::Longrunning::Operation + end + + Stub = Service.rpc_stub_class + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/networkmanagement/v1/trace_pb.rb b/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/networkmanagement/v1/trace_pb.rb new file mode 100644 index 000000000000..e686396d0c5c --- /dev/null +++ b/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/networkmanagement/v1/trace_pb.rb @@ -0,0 +1,107 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/networkmanagement/v1/trace.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/field_info_pb' + + +descriptor_data = "\n-google/cloud/networkmanagement/v1/trace.proto\x12!google.cloud.networkmanagement.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1bgoogle/api/field_info.proto\"\xa1\x01\n\x05Trace\x12\x46\n\rendpoint_info\x18\x01 \x01(\x0b\x32/.google.cloud.networkmanagement.v1.EndpointInfo\x12\x36\n\x05steps\x18\x02 \x03(\x0b\x32\'.google.cloud.networkmanagement.v1.Step\x12\x18\n\x10\x66orward_trace_id\x18\x04 \x01(\x05\"\xfd!\n\x04Step\x12\x13\n\x0b\x64\x65scription\x18\x01 \x01(\t\x12<\n\x05state\x18\x02 \x01(\x0e\x32-.google.cloud.networkmanagement.v1.Step.State\x12\x13\n\x0b\x63\x61uses_drop\x18\x03 \x01(\x08\x12\x12\n\nproject_id\x18\x04 \x01(\t\x12\x43\n\x08instance\x18\x05 \x01(\x0b\x32/.google.cloud.networkmanagement.v1.InstanceInfoH\x00\x12\x43\n\x08\x66irewall\x18\x06 \x01(\x0b\x32/.google.cloud.networkmanagement.v1.FirewallInfoH\x00\x12=\n\x05route\x18\x07 \x01(\x0b\x32,.google.cloud.networkmanagement.v1.RouteInfoH\x00\x12\x43\n\x08\x65ndpoint\x18\x08 \x01(\x0b\x32/.google.cloud.networkmanagement.v1.EndpointInfoH\x00\x12N\n\x0egoogle_service\x18\x18 \x01(\x0b\x32\x34.google.cloud.networkmanagement.v1.GoogleServiceInfoH\x00\x12P\n\x0f\x66orwarding_rule\x18\t \x01(\x0b\x32\x35.google.cloud.networkmanagement.v1.ForwardingRuleInfoH\x00\x12L\n\rhybrid_subnet\x18$ \x01(\x0b\x32\x33.google.cloud.networkmanagement.v1.HybridSubnetInfoH\x00\x12H\n\x0bvpn_gateway\x18\n \x01(\x0b\x32\x31.google.cloud.networkmanagement.v1.VpnGatewayInfoH\x00\x12\x46\n\nvpn_tunnel\x18\x0b \x01(\x0b\x32\x30.google.cloud.networkmanagement.v1.VpnTunnelInfoH\x00\x12`\n\x17interconnect_attachment\x18# \x01(\x0b\x32=.google.cloud.networkmanagement.v1.InterconnectAttachmentInfoH\x00\x12L\n\rvpc_connector\x18\x15 \x01(\x0b\x32\x33.google.cloud.networkmanagement.v1.VpcConnectorInfoH\x00\x12h\n\x1c\x64irect_vpc_egress_connection\x18! \x01(\x0b\x32@.google.cloud.networkmanagement.v1.DirectVpcEgressConnectionInfoH\x00\x12m\n\x1eserverless_external_connection\x18\" \x01(\x0b\x32\x43.google.cloud.networkmanagement.v1.ServerlessExternalConnectionInfoH\x00\x12\x41\n\x07\x64\x65liver\x18\x0c \x01(\x0b\x32..google.cloud.networkmanagement.v1.DeliverInfoH\x00\x12\x41\n\x07\x66orward\x18\r \x01(\x0b\x32..google.cloud.networkmanagement.v1.ForwardInfoH\x00\x12=\n\x05\x61\x62ort\x18\x0e \x01(\x0b\x32,.google.cloud.networkmanagement.v1.AbortInfoH\x00\x12;\n\x04\x64rop\x18\x0f \x01(\x0b\x32+.google.cloud.networkmanagement.v1.DropInfoH\x00\x12P\n\rload_balancer\x18\x10 \x01(\x0b\x32\x33.google.cloud.networkmanagement.v1.LoadBalancerInfoB\x02\x18\x01H\x00\x12\x41\n\x07network\x18\x11 \x01(\x0b\x32..google.cloud.networkmanagement.v1.NetworkInfoH\x00\x12\x46\n\ngke_master\x18\x12 \x01(\x0b\x32\x30.google.cloud.networkmanagement.v1.GKEMasterInfoH\x00\x12@\n\x07gke_pod\x18% \x01(\x0b\x32-.google.cloud.networkmanagement.v1.GkePodInfoH\x00\x12_\n\x17ip_masquerading_skipped\x18& \x01(\x0b\x32<.google.cloud.networkmanagement.v1.IpMasqueradingSkippedInfoH\x00\x12U\n\x12gke_network_policy\x18\' \x01(\x0b\x32\x37.google.cloud.networkmanagement.v1.GkeNetworkPolicyInfoH\x00\x12\x64\n\x1agke_network_policy_skipped\x18( \x01(\x0b\x32>.google.cloud.networkmanagement.v1.GkeNetworkPolicySkippedInfoH\x00\x12U\n\x12\x63loud_sql_instance\x18\x13 \x01(\x0b\x32\x37.google.cloud.networkmanagement.v1.CloudSQLInstanceInfoH\x00\x12N\n\x0eredis_instance\x18\x1e \x01(\x0b\x32\x34.google.cloud.networkmanagement.v1.RedisInstanceInfoH\x00\x12L\n\rredis_cluster\x18\x1f \x01(\x0b\x32\x33.google.cloud.networkmanagement.v1.RedisClusterInfoH\x00\x12N\n\x0e\x63loud_function\x18\x14 \x01(\x0b\x32\x34.google.cloud.networkmanagement.v1.CloudFunctionInfoH\x00\x12U\n\x12\x61pp_engine_version\x18\x16 \x01(\x0b\x32\x37.google.cloud.networkmanagement.v1.AppEngineVersionInfoH\x00\x12U\n\x12\x63loud_run_revision\x18\x17 \x01(\x0b\x32\x37.google.cloud.networkmanagement.v1.CloudRunRevisionInfoH\x00\x12\x39\n\x03nat\x18\x19 \x01(\x0b\x32*.google.cloud.networkmanagement.v1.NatInfoH\x00\x12R\n\x10proxy_connection\x18\x1a \x01(\x0b\x32\x36.google.cloud.networkmanagement.v1.ProxyConnectionInfoH\x00\x12`\n\x1aload_balancer_backend_info\x18\x1b \x01(\x0b\x32:.google.cloud.networkmanagement.v1.LoadBalancerBackendInfoH\x00\x12N\n\x0estorage_bucket\x18\x1c \x01(\x0b\x32\x34.google.cloud.networkmanagement.v1.StorageBucketInfoH\x00\x12N\n\x0eserverless_neg\x18\x1d \x01(\x0b\x32\x34.google.cloud.networkmanagement.v1.ServerlessNegInfoH\x00\x12]\n\x16ngfw_packet_inspection\x18* \x01(\x0b\x32;.google.cloud.networkmanagement.v1.NgfwPacketInspectionInfoH\x00\"\xb0\n\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x17\n\x13START_FROM_INSTANCE\x10\x01\x12\x17\n\x13START_FROM_INTERNET\x10\x02\x12\x1d\n\x19START_FROM_GOOGLE_SERVICE\x10\x1b\x12\x1e\n\x1aSTART_FROM_PRIVATE_NETWORK\x10\x03\x12\x19\n\x15START_FROM_GKE_MASTER\x10\x15\x12!\n\x1dSTART_FROM_CLOUD_SQL_INSTANCE\x10\x16\x12\x16\n\x12START_FROM_GKE_POD\x10\'\x12\x1d\n\x19START_FROM_REDIS_INSTANCE\x10 \x12\x1c\n\x18START_FROM_REDIS_CLUSTER\x10!\x12\x1d\n\x19START_FROM_CLOUD_FUNCTION\x10\x17\x12!\n\x1dSTART_FROM_APP_ENGINE_VERSION\x10\x19\x12!\n\x1dSTART_FROM_CLOUD_RUN_REVISION\x10\x1a\x12\x1d\n\x19START_FROM_STORAGE_BUCKET\x10\x1d\x12$\n START_FROM_PSC_PUBLISHED_SERVICE\x10\x1e\x12\x1d\n\x19START_FROM_SERVERLESS_NEG\x10\x1f\x12\x1f\n\x1b\x41PPLY_INGRESS_FIREWALL_RULE\x10\x04\x12\x1e\n\x1a\x41PPLY_EGRESS_FIREWALL_RULE\x10\x05\x12\x0f\n\x0b\x41PPLY_ROUTE\x10\x06\x12\x19\n\x15\x41PPLY_FORWARDING_RULE\x10\x07\x12!\n\x1d\x41NALYZE_LOAD_BALANCER_BACKEND\x10\x1c\x12\x15\n\x11SPOOFING_APPROVED\x10\x08\x12\x16\n\x12\x41RRIVE_AT_INSTANCE\x10\t\x12(\n ARRIVE_AT_INTERNAL_LOAD_BALANCER\x10\n\x1a\x02\x08\x01\x12(\n ARRIVE_AT_EXTERNAL_LOAD_BALANCER\x10\x0b\x1a\x02\x08\x01\x12\x1b\n\x17\x41RRIVE_AT_HYBRID_SUBNET\x10&\x12\x19\n\x15\x41RRIVE_AT_VPN_GATEWAY\x10\x0c\x12\x18\n\x14\x41RRIVE_AT_VPN_TUNNEL\x10\r\x12%\n!ARRIVE_AT_INTERCONNECT_ATTACHMENT\x10%\x12\x1b\n\x17\x41RRIVE_AT_VPC_CONNECTOR\x10\x18\x12\x15\n\x11\x41RRIVE_AT_GKE_POD\x10,\x12 \n\x1c\x44IRECT_VPC_EGRESS_CONNECTION\x10#\x12\"\n\x1eSERVERLESS_EXTERNAL_CONNECTION\x10$\x12\x1a\n\x16NGFW_PACKET_INSPECTION\x10/\x12\x07\n\x03NAT\x10\x0e\x12 \n\x1cSKIP_GKE_POD_IP_MASQUERADING\x10(\x12#\n\x1fSKIP_GKE_INGRESS_NETWORK_POLICY\x10)\x12\"\n\x1eSKIP_GKE_EGRESS_NETWORK_POLICY\x10*\x12$\n APPLY_INGRESS_GKE_NETWORK_POLICY\x10-\x12#\n\x1f\x41PPLY_EGRESS_GKE_NETWORK_POLICY\x10.\x12\x14\n\x10PROXY_CONNECTION\x10\x0f\x12\x0b\n\x07\x44\x45LIVER\x10\x10\x12\x08\n\x04\x44ROP\x10\x11\x12\x0b\n\x07\x46ORWARD\x10\x12\x12\t\n\x05\x41\x42ORT\x10\x13\x12\x1d\n\x19VIEWER_PERMISSION_MISSING\x10\x14\x42\x0b\n\tstep_info\"\xf7\x02\n\x0cInstanceInfo\x12\x14\n\x0c\x64isplay_name\x18\x01 \x01(\t\x12\x0b\n\x03uri\x18\x02 \x01(\t\x12\x11\n\tinterface\x18\x03 \x01(\t\x12\x13\n\x0bnetwork_uri\x18\x04 \x01(\t\x12\x13\n\x0binternal_ip\x18\x05 \x01(\t\x12\x13\n\x0b\x65xternal_ip\x18\x06 \x01(\t\x12\x14\n\x0cnetwork_tags\x18\x07 \x03(\t\x12\x1b\n\x0fservice_account\x18\x08 \x01(\tB\x02\x18\x01\x12\"\n\x1apsc_network_attachment_uri\x18\t \x01(\t\x12\x13\n\x07running\x18\n \x01(\x08\x42\x02\x18\x01\x12\x46\n\x06status\x18\x0b \x01(\x0e\x32\x36.google.cloud.networkmanagement.v1.InstanceInfo.Status\">\n\x06Status\x12\x16\n\x12STATUS_UNSPECIFIED\x10\x00\x12\x0b\n\x07RUNNING\x10\x01\x12\x0f\n\x0bNOT_RUNNING\x10\x02\"v\n\x0bNetworkInfo\x12\x14\n\x0c\x64isplay_name\x18\x01 \x01(\t\x12\x0b\n\x03uri\x18\x02 \x01(\t\x12\x1a\n\x12matched_subnet_uri\x18\x05 \x01(\t\x12\x18\n\x10matched_ip_range\x18\x04 \x01(\t\x12\x0e\n\x06region\x18\x06 \x01(\t\"\xaf\x07\n\x0c\x46irewallInfo\x12\x14\n\x0c\x64isplay_name\x18\x01 \x01(\t\x12\x0b\n\x03uri\x18\x02 \x01(\t\x12\x11\n\tdirection\x18\x03 \x01(\t\x12\x0e\n\x06\x61\x63tion\x18\x04 \x01(\t\x12\x10\n\x08priority\x18\x05 \x01(\x05\x12\x13\n\x0bnetwork_uri\x18\x06 \x01(\t\x12\x13\n\x0btarget_tags\x18\x07 \x03(\t\x12\x1f\n\x17target_service_accounts\x18\x08 \x03(\t\x12\x0e\n\x06policy\x18\t \x01(\t\x12\x12\n\npolicy_uri\x18\x0b \x01(\t\x12\\\n\x12\x66irewall_rule_type\x18\n \x01(\x0e\x32@.google.cloud.networkmanagement.v1.FirewallInfo.FirewallRuleType\x12\x17\n\x0fpolicy_priority\x18\x0c \x01(\x05\x12O\n\x0btarget_type\x18\r \x01(\x0e\x32:.google.cloud.networkmanagement.v1.FirewallInfo.TargetType\"\xbc\x03\n\x10\x46irewallRuleType\x12\"\n\x1e\x46IREWALL_RULE_TYPE_UNSPECIFIED\x10\x00\x12%\n!HIERARCHICAL_FIREWALL_POLICY_RULE\x10\x01\x12\x15\n\x11VPC_FIREWALL_RULE\x10\x02\x12\x1d\n\x19IMPLIED_VPC_FIREWALL_RULE\x10\x03\x12/\n+SERVERLESS_VPC_ACCESS_MANAGED_FIREWALL_RULE\x10\x04\x12 \n\x1cNETWORK_FIREWALL_POLICY_RULE\x10\x05\x12)\n%NETWORK_REGIONAL_FIREWALL_POLICY_RULE\x10\x06\x12\'\n#SYSTEM_NETWORK_FIREWALL_POLICY_RULE\x10\x07\x12\x30\n,SYSTEM_REGIONAL_NETWORK_FIREWALL_POLICY_RULE\x10\x08\x12$\n UNSUPPORTED_FIREWALL_POLICY_RULE\x10\x64\x12\x12\n\x0eTRACKING_STATE\x10\x65\x12\x14\n\x10\x41NALYSIS_SKIPPED\x10\x66\"Q\n\nTargetType\x12\x1b\n\x17TARGET_TYPE_UNSPECIFIED\x10\x00\x12\r\n\tINSTANCES\x10\x01\x12\x17\n\x13INTERNAL_MANAGED_LB\x10\x02\"\xec\x0b\n\tRouteInfo\x12J\n\nroute_type\x18\x08 \x01(\x0e\x32\x36.google.cloud.networkmanagement.v1.RouteInfo.RouteType\x12O\n\rnext_hop_type\x18\t \x01(\x0e\x32\x38.google.cloud.networkmanagement.v1.RouteInfo.NextHopType\x12P\n\x0broute_scope\x18\x0e \x01(\x0e\x32\x37.google.cloud.networkmanagement.v1.RouteInfo.RouteScopeB\x02\x18\x01\x12\x14\n\x0c\x64isplay_name\x18\x01 \x01(\t\x12\x0b\n\x03uri\x18\x02 \x01(\t\x12\x0e\n\x06region\x18\x13 \x01(\t\x12\x15\n\rdest_ip_range\x18\x03 \x01(\t\x12\x14\n\x08next_hop\x18\x04 \x01(\tB\x02\x18\x01\x12\x13\n\x0bnetwork_uri\x18\x05 \x01(\t\x12\x10\n\x08priority\x18\x06 \x01(\x05\x12\x15\n\rinstance_tags\x18\x07 \x03(\t\x12\x14\n\x0csrc_ip_range\x18\n \x01(\t\x12\x18\n\x10\x64\x65st_port_ranges\x18\x0b \x03(\t\x12\x17\n\x0fsrc_port_ranges\x18\x0c \x03(\t\x12\x11\n\tprotocols\x18\r \x03(\t\x12\x18\n\x0bncc_hub_uri\x18\x0f \x01(\tH\x00\x88\x01\x01\x12\x1a\n\rncc_spoke_uri\x18\x10 \x01(\tH\x01\x88\x01\x01\x12/\n\"advertised_route_source_router_uri\x18\x11 \x01(\tH\x02\x88\x01\x01\x12.\n\x1d\x61\x64vertised_route_next_hop_uri\x18\x12 \x01(\tB\x02\x18\x01H\x03\x88\x01\x01\x12\x14\n\x0cnext_hop_uri\x18\x14 \x01(\t\x12\x1c\n\x14next_hop_network_uri\x18\x15 \x01(\t\x12\x1d\n\x15originating_route_uri\x18\x16 \x01(\t\x12&\n\x1eoriginating_route_display_name\x18\x17 \x01(\t\x12\x19\n\x11ncc_hub_route_uri\x18\x18 \x01(\t\"\xab\x01\n\tRouteType\x12\x1a\n\x16ROUTE_TYPE_UNSPECIFIED\x10\x00\x12\n\n\x06SUBNET\x10\x01\x12\n\n\x06STATIC\x10\x02\x12\x0b\n\x07\x44YNAMIC\x10\x03\x12\x12\n\x0ePEERING_SUBNET\x10\x04\x12\x12\n\x0ePEERING_STATIC\x10\x05\x12\x13\n\x0fPEERING_DYNAMIC\x10\x06\x12\x10\n\x0cPOLICY_BASED\x10\x07\x12\x0e\n\nADVERTISED\x10\x65\"\xea\x02\n\x0bNextHopType\x12\x1d\n\x19NEXT_HOP_TYPE_UNSPECIFIED\x10\x00\x12\x0f\n\x0bNEXT_HOP_IP\x10\x01\x12\x15\n\x11NEXT_HOP_INSTANCE\x10\x02\x12\x14\n\x10NEXT_HOP_NETWORK\x10\x03\x12\x14\n\x10NEXT_HOP_PEERING\x10\x04\x12\x19\n\x15NEXT_HOP_INTERCONNECT\x10\x05\x12\x17\n\x13NEXT_HOP_VPN_TUNNEL\x10\x06\x12\x18\n\x14NEXT_HOP_VPN_GATEWAY\x10\x07\x12\x1d\n\x19NEXT_HOP_INTERNET_GATEWAY\x10\x08\x12\x16\n\x12NEXT_HOP_BLACKHOLE\x10\t\x12\x10\n\x0cNEXT_HOP_ILB\x10\n\x12\x1d\n\x19NEXT_HOP_ROUTER_APPLIANCE\x10\x0b\x12\x14\n\x10NEXT_HOP_NCC_HUB\x10\x0c\x12\x1c\n\x18SECURE_WEB_PROXY_GATEWAY\x10\r\"C\n\nRouteScope\x12\x1b\n\x17ROUTE_SCOPE_UNSPECIFIED\x10\x00\x12\x0b\n\x07NETWORK\x10\x01\x12\x0b\n\x07NCC_HUB\x10\x02\x42\x0e\n\x0c_ncc_hub_uriB\x10\n\x0e_ncc_spoke_uriB%\n#_advertised_route_source_router_uriB \n\x1e_advertised_route_next_hop_uri\"\xda\x02\n\x11GoogleServiceInfo\x12\x11\n\tsource_ip\x18\x01 \x01(\t\x12\x63\n\x13google_service_type\x18\x02 \x01(\x0e\x32\x46.google.cloud.networkmanagement.v1.GoogleServiceInfo.GoogleServiceType\"\xcc\x01\n\x11GoogleServiceType\x12#\n\x1fGOOGLE_SERVICE_TYPE_UNSPECIFIED\x10\x00\x12\x07\n\x03IAP\x10\x01\x12$\n GFE_PROXY_OR_HEALTH_CHECK_PROBER\x10\x02\x12\r\n\tCLOUD_DNS\x10\x03\x12\x0e\n\nGOOGLE_API\x10\x04\x12\x12\n\x0eGOOGLE_API_PSC\x10\x05\x12\x15\n\x11GOOGLE_API_VPC_SC\x10\x06\x12\x19\n\x15SERVERLESS_VPC_ACCESS\x10\x07\"\x8e\x02\n\x12\x46orwardingRuleInfo\x12\x14\n\x0c\x64isplay_name\x18\x01 \x01(\t\x12\x0b\n\x03uri\x18\x02 \x01(\t\x12\x18\n\x10matched_protocol\x18\x03 \x01(\t\x12\x1a\n\x12matched_port_range\x18\x06 \x01(\t\x12\x0b\n\x03vip\x18\x04 \x01(\t\x12\x0e\n\x06target\x18\x05 \x01(\t\x12\x13\n\x0bnetwork_uri\x18\x07 \x01(\t\x12\x0e\n\x06region\x18\x08 \x01(\t\x12\x1a\n\x12load_balancer_name\x18\t \x01(\t\x12\"\n\x1apsc_service_attachment_uri\x18\n \x01(\t\x12\x1d\n\x15psc_google_api_target\x18\x0b \x01(\t\"\xc2\x04\n\x10LoadBalancerInfo\x12`\n\x12load_balancer_type\x18\x01 \x01(\x0e\x32\x44.google.cloud.networkmanagement.v1.LoadBalancerInfo.LoadBalancerType\x12\x1c\n\x10health_check_uri\x18\x02 \x01(\tB\x02\x18\x01\x12H\n\x08\x62\x61\x63kends\x18\x03 \x03(\x0b\x32\x36.google.cloud.networkmanagement.v1.LoadBalancerBackend\x12U\n\x0c\x62\x61\x63kend_type\x18\x04 \x01(\x0e\x32?.google.cloud.networkmanagement.v1.LoadBalancerInfo.BackendType\x12\x13\n\x0b\x62\x61\x63kend_uri\x18\x05 \x01(\t\"\x8f\x01\n\x10LoadBalancerType\x12\"\n\x1eLOAD_BALANCER_TYPE_UNSPECIFIED\x10\x00\x12\x14\n\x10INTERNAL_TCP_UDP\x10\x01\x12\x13\n\x0fNETWORK_TCP_UDP\x10\x02\x12\x0e\n\nHTTP_PROXY\x10\x03\x12\r\n\tTCP_PROXY\x10\x04\x12\r\n\tSSL_PROXY\x10\x05\"f\n\x0b\x42\x61\x63kendType\x12\x1c\n\x18\x42\x41\x43KEND_TYPE_UNSPECIFIED\x10\x00\x12\x13\n\x0f\x42\x41\x43KEND_SERVICE\x10\x01\x12\x0f\n\x0bTARGET_POOL\x10\x02\x12\x13\n\x0fTARGET_INSTANCE\x10\x03\"\xf6\x02\n\x13LoadBalancerBackend\x12\x14\n\x0c\x64isplay_name\x18\x01 \x01(\t\x12\x0b\n\x03uri\x18\x02 \x01(\t\x12t\n\x1bhealth_check_firewall_state\x18\x03 \x01(\x0e\x32O.google.cloud.networkmanagement.v1.LoadBalancerBackend.HealthCheckFirewallState\x12,\n$health_check_allowing_firewall_rules\x18\x04 \x03(\t\x12,\n$health_check_blocking_firewall_rules\x18\x05 \x03(\t\"j\n\x18HealthCheckFirewallState\x12+\n\'HEALTH_CHECK_FIREWALL_STATE_UNSPECIFIED\x10\x00\x12\x0e\n\nCONFIGURED\x10\x01\x12\x11\n\rMISCONFIGURED\x10\x02\"E\n\x10HybridSubnetInfo\x12\x14\n\x0c\x64isplay_name\x18\x01 \x01(\t\x12\x0b\n\x03uri\x18\x02 \x01(\t\x12\x0e\n\x06region\x18\x03 \x01(\t\"\x84\x01\n\x0eVpnGatewayInfo\x12\x14\n\x0c\x64isplay_name\x18\x01 \x01(\t\x12\x0b\n\x03uri\x18\x02 \x01(\t\x12\x13\n\x0bnetwork_uri\x18\x03 \x01(\t\x12\x12\n\nip_address\x18\x04 \x01(\t\x12\x16\n\x0evpn_tunnel_uri\x18\x05 \x01(\t\x12\x0e\n\x06region\x18\x06 \x01(\t\"\xee\x02\n\rVpnTunnelInfo\x12\x14\n\x0c\x64isplay_name\x18\x01 \x01(\t\x12\x0b\n\x03uri\x18\x02 \x01(\t\x12\x16\n\x0esource_gateway\x18\x03 \x01(\t\x12\x16\n\x0eremote_gateway\x18\x04 \x01(\t\x12\x19\n\x11remote_gateway_ip\x18\x05 \x01(\t\x12\x19\n\x11source_gateway_ip\x18\x06 \x01(\t\x12\x13\n\x0bnetwork_uri\x18\x07 \x01(\t\x12\x0e\n\x06region\x18\x08 \x01(\t\x12R\n\x0crouting_type\x18\t \x01(\x0e\x32<.google.cloud.networkmanagement.v1.VpnTunnelInfo.RoutingType\"[\n\x0bRoutingType\x12\x1c\n\x18ROUTING_TYPE_UNSPECIFIED\x10\x00\x12\x0f\n\x0bROUTE_BASED\x10\x01\x12\x10\n\x0cPOLICY_BASED\x10\x02\x12\x0b\n\x07\x44YNAMIC\x10\x03\"\xeb\x02\n\x1aInterconnectAttachmentInfo\x12\x14\n\x0c\x64isplay_name\x18\x01 \x01(\t\x12\x0b\n\x03uri\x18\x02 \x01(\t\x12\x18\n\x10interconnect_uri\x18\x03 \x01(\t\x12\x0e\n\x06region\x18\x04 \x01(\t\x12\x18\n\x10\x63loud_router_uri\x18\x05 \x01(\t\x12P\n\x04type\x18\x06 \x01(\x0e\x32\x42.google.cloud.networkmanagement.v1.InterconnectAttachmentInfo.Type\x12\x32\n l2_attachment_matched_ip_address\x18\x07 \x01(\tB\x08\xe2\x8c\xcf\xd7\x08\x02\x08\x04\"`\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\r\n\tDEDICATED\x10\x01\x12\x0b\n\x07PARTNER\x10\x02\x12\x14\n\x10PARTNER_PROVIDER\x10\x03\x12\x10\n\x0cL2_DEDICATED\x10\x04\"\xd1\x01\n\x0c\x45ndpointInfo\x12\x11\n\tsource_ip\x18\x01 \x01(\t\x12\x16\n\x0e\x64\x65stination_ip\x18\x02 \x01(\t\x12\x10\n\x08protocol\x18\x03 \x01(\t\x12\x13\n\x0bsource_port\x18\x04 \x01(\x05\x12\x18\n\x10\x64\x65stination_port\x18\x05 \x01(\x05\x12\x1a\n\x12source_network_uri\x18\x06 \x01(\t\x12\x1f\n\x17\x64\x65stination_network_uri\x18\x07 \x01(\t\x12\x18\n\x10source_agent_uri\x18\x08 \x01(\t\"\xd4\x06\n\x0b\x44\x65liverInfo\x12\x45\n\x06target\x18\x01 \x01(\x0e\x32\x35.google.cloud.networkmanagement.v1.DeliverInfo.Target\x12\x14\n\x0cresource_uri\x18\x02 \x01(\t\x12\x1c\n\nip_address\x18\x03 \x01(\tB\x08\xe2\x8c\xcf\xd7\x08\x02\x08\x04\x12\x16\n\x0estorage_bucket\x18\x04 \x01(\t\x12\x1d\n\x15psc_google_api_target\x18\x05 \x01(\t\x12]\n\x13google_service_type\x18\x06 \x01(\x0e\x32@.google.cloud.networkmanagement.v1.DeliverInfo.GoogleServiceType\"\x84\x03\n\x06Target\x12\x16\n\x12TARGET_UNSPECIFIED\x10\x00\x12\x0c\n\x08INSTANCE\x10\x01\x12\x0c\n\x08INTERNET\x10\x02\x12\x0e\n\nGOOGLE_API\x10\x03\x12\x0e\n\nGKE_MASTER\x10\x04\x12\x16\n\x12\x43LOUD_SQL_INSTANCE\x10\x05\x12\x19\n\x15PSC_PUBLISHED_SERVICE\x10\x06\x12\x12\n\x0ePSC_GOOGLE_API\x10\x07\x12\x0e\n\nPSC_VPC_SC\x10\x08\x12\x12\n\x0eSERVERLESS_NEG\x10\t\x12\x12\n\x0eSTORAGE_BUCKET\x10\n\x12\x13\n\x0fPRIVATE_NETWORK\x10\x0b\x12\x12\n\x0e\x43LOUD_FUNCTION\x10\x0c\x12\x16\n\x12\x41PP_ENGINE_VERSION\x10\r\x12\x16\n\x12\x43LOUD_RUN_REVISION\x10\x0e\x12\x1a\n\x16GOOGLE_MANAGED_SERVICE\x10\x0f\x12\x12\n\x0eREDIS_INSTANCE\x10\x10\x12\x11\n\rREDIS_CLUSTER\x10\x11\x12\x0b\n\x07GKE_POD\x10\x13\"\xac\x01\n\x11GoogleServiceType\x12#\n\x1fGOOGLE_SERVICE_TYPE_UNSPECIFIED\x10\x00\x12\x07\n\x03IAP\x10\x01\x12$\n GFE_PROXY_OR_HEALTH_CHECK_PROBER\x10\x02\x12\r\n\tCLOUD_DNS\x10\x03\x12\x19\n\x15PRIVATE_GOOGLE_ACCESS\x10\x04\x12\x19\n\x15SERVERLESS_VPC_ACCESS\x10\x05\"\x89\x03\n\x0b\x46orwardInfo\x12\x45\n\x06target\x18\x01 \x01(\x0e\x32\x35.google.cloud.networkmanagement.v1.ForwardInfo.Target\x12\x14\n\x0cresource_uri\x18\x02 \x01(\t\x12\x1c\n\nip_address\x18\x03 \x01(\tB\x08\xe2\x8c\xcf\xd7\x08\x02\x08\x04\"\xfe\x01\n\x06Target\x12\x16\n\x12TARGET_UNSPECIFIED\x10\x00\x12\x0f\n\x0bPEERING_VPC\x10\x01\x12\x0f\n\x0bVPN_GATEWAY\x10\x02\x12\x10\n\x0cINTERCONNECT\x10\x03\x12\x12\n\nGKE_MASTER\x10\x04\x1a\x02\x08\x01\x12\"\n\x1eIMPORTED_CUSTOM_ROUTE_NEXT_HOP\x10\x05\x12\x1a\n\x12\x43LOUD_SQL_INSTANCE\x10\x06\x1a\x02\x08\x01\x12\x13\n\x0f\x41NOTHER_PROJECT\x10\x07\x12\x0b\n\x07NCC_HUB\x10\x08\x12\x14\n\x10ROUTER_APPLIANCE\x10\t\x12\x1c\n\x18SECURE_WEB_PROXY_GATEWAY\x10\n\"\x85\r\n\tAbortInfo\x12\x41\n\x05\x63\x61use\x18\x01 \x01(\x0e\x32\x32.google.cloud.networkmanagement.v1.AbortInfo.Cause\x12\x14\n\x0cresource_uri\x18\x02 \x01(\t\x12\x1c\n\nip_address\x18\x04 \x01(\tB\x08\xe2\x8c\xcf\xd7\x08\x02\x08\x04\x12#\n\x1bprojects_missing_permission\x18\x03 \x03(\t\"\xdb\x0b\n\x05\x43\x61use\x12\x15\n\x11\x43\x41USE_UNSPECIFIED\x10\x00\x12\x17\n\x0fUNKNOWN_NETWORK\x10\x01\x1a\x02\x08\x01\x12\x17\n\x0fUNKNOWN_PROJECT\x10\x03\x1a\x02\x08\x01\x12\x16\n\x0eNO_EXTERNAL_IP\x10\x07\x1a\x02\x08\x01\x12\x1e\n\x16UNINTENDED_DESTINATION\x10\x08\x1a\x02\x08\x01\x12!\n\x19SOURCE_ENDPOINT_NOT_FOUND\x10\x0b\x1a\x02\x08\x01\x12!\n\x19MISMATCHED_SOURCE_NETWORK\x10\x0c\x1a\x02\x08\x01\x12&\n\x1e\x44\x45STINATION_ENDPOINT_NOT_FOUND\x10\r\x1a\x02\x08\x01\x12&\n\x1eMISMATCHED_DESTINATION_NETWORK\x10\x0e\x1a\x02\x08\x01\x12\x0e\n\nUNKNOWN_IP\x10\x02\x12%\n!GOOGLE_MANAGED_SERVICE_UNKNOWN_IP\x10 \x12+\n\'SOURCE_IP_ADDRESS_NOT_IN_SOURCE_NETWORK\x10\x17\x12\x15\n\x11PERMISSION_DENIED\x10\x04\x12*\n&PERMISSION_DENIED_NO_CLOUD_NAT_CONFIGS\x10\x1c\x12-\n)PERMISSION_DENIED_NO_NEG_ENDPOINT_CONFIGS\x10\x1d\x12-\n)PERMISSION_DENIED_NO_CLOUD_ROUTER_CONFIGS\x10$\x12\x16\n\x12NO_SOURCE_LOCATION\x10\x05\x12\"\n\x1eNO_SOURCE_GCP_NETWORK_LOCATION\x10*\x12&\n\"NO_SOURCE_NON_GCP_NETWORK_LOCATION\x10+\x12\x1f\n\x1bNO_SOURCE_INTERNET_LOCATION\x10,\x12\x14\n\x10INVALID_ARGUMENT\x10\x06\x12\x12\n\x0eTRACE_TOO_LONG\x10\t\x12\x12\n\x0eINTERNAL_ERROR\x10\n\x12\x0f\n\x0bUNSUPPORTED\x10\x0f\x12\x19\n\x15MISMATCHED_IP_VERSION\x10\x10\x12&\n\"GKE_KONNECTIVITY_PROXY_UNSUPPORTED\x10\x11\x12\x1d\n\x19RESOURCE_CONFIG_NOT_FOUND\x10\x12\x12 \n\x1cVM_INSTANCE_CONFIG_NOT_FOUND\x10\x18\x12\x1c\n\x18NETWORK_CONFIG_NOT_FOUND\x10\x19\x12\x1d\n\x19\x46IREWALL_CONFIG_NOT_FOUND\x10\x1a\x12\x1a\n\x16ROUTE_CONFIG_NOT_FOUND\x10\x1b\x12\x31\n-GOOGLE_MANAGED_SERVICE_AMBIGUOUS_PSC_ENDPOINT\x10\x13\x12-\n)GOOGLE_MANAGED_SERVICE_AMBIGUOUS_ENDPOINT\x10\'\x12$\n SOURCE_PSC_CLOUD_SQL_UNSUPPORTED\x10\x14\x12)\n%SOURCE_EXTERNAL_CLOUD_SQL_UNSUPPORTED\x10-\x12$\n SOURCE_REDIS_CLUSTER_UNSUPPORTED\x10\"\x12%\n!SOURCE_REDIS_INSTANCE_UNSUPPORTED\x10#\x12&\n\"SOURCE_FORWARDING_RULE_UNSUPPORTED\x10\x15\x12\x1b\n\x17NON_ROUTABLE_IP_ADDRESS\x10\x16\x12+\n\'UNKNOWN_ISSUE_IN_GOOGLE_MANAGED_PROJECT\x10\x1e\x12-\n)UNSUPPORTED_GOOGLE_MANAGED_PROJECT_CONFIG\x10\x1f\x12\x1b\n\x17NO_SERVERLESS_IP_RANGES\x10%\x12 \n\x1cIP_VERSION_PROTOCOL_MISMATCH\x10(\x12%\n!GKE_POD_UNKNOWN_ENDPOINT_LOCATION\x10)\"\xb1\"\n\x08\x44ropInfo\x12@\n\x05\x63\x61use\x18\x01 \x01(\x0e\x32\x31.google.cloud.networkmanagement.v1.DropInfo.Cause\x12\x14\n\x0cresource_uri\x18\x02 \x01(\t\x12\x11\n\tsource_ip\x18\x03 \x01(\t\x12\x16\n\x0e\x64\x65stination_ip\x18\x04 \x01(\t\x12\x0e\n\x06region\x18\x05 \x01(\t\x12\x1f\n\x17source_geolocation_code\x18\x06 \x01(\t\x12$\n\x1c\x64\x65stination_geolocation_code\x18\x07 \x01(\t\"\xca \n\x05\x43\x61use\x12\x15\n\x11\x43\x41USE_UNSPECIFIED\x10\x00\x12\x1c\n\x18UNKNOWN_EXTERNAL_ADDRESS\x10\x01\x12\x19\n\x15\x46OREIGN_IP_DISALLOWED\x10\x02\x12\x11\n\rFIREWALL_RULE\x10\x03\x12\x0c\n\x08NO_ROUTE\x10\x04\x12\x13\n\x0fROUTE_BLACKHOLE\x10\x05\x12\x17\n\x13ROUTE_WRONG_NETWORK\x10\x06\x12*\n&ROUTE_NEXT_HOP_IP_ADDRESS_NOT_RESOLVED\x10*\x12%\n!ROUTE_NEXT_HOP_RESOURCE_NOT_FOUND\x10+\x12)\n%ROUTE_NEXT_HOP_INSTANCE_WRONG_NETWORK\x10\x31\x12*\n&ROUTE_NEXT_HOP_INSTANCE_NON_PRIMARY_IP\x10\x32\x12.\n*ROUTE_NEXT_HOP_FORWARDING_RULE_IP_MISMATCH\x10\x33\x12-\n)ROUTE_NEXT_HOP_VPN_TUNNEL_NOT_ESTABLISHED\x10\x34\x12/\n+ROUTE_NEXT_HOP_FORWARDING_RULE_TYPE_INVALID\x10\x35\x12\x32\n.NO_ROUTE_FROM_INTERNET_TO_PRIVATE_IPV6_ADDRESS\x10,\x12\x32\n.NO_ROUTE_FROM_INTERNET_TO_PRIVATE_IPV4_ADDRESS\x10m\x12>\n:NO_ROUTE_FROM_EXTERNAL_IPV6_SOURCE_TO_PRIVATE_IPV6_ADDRESS\x10\x62\x12&\n\"VPN_TUNNEL_LOCAL_SELECTOR_MISMATCH\x10-\x12\'\n#VPN_TUNNEL_REMOTE_SELECTOR_MISMATCH\x10.\x12\x1f\n\x1bPRIVATE_TRAFFIC_TO_INTERNET\x10\x07\x12$\n PRIVATE_GOOGLE_ACCESS_DISALLOWED\x10\x08\x12\x34\n0PRIVATE_GOOGLE_ACCESS_VIA_VPN_TUNNEL_UNSUPPORTED\x10/\x12\x17\n\x13NO_EXTERNAL_ADDRESS\x10\t\x12\x1c\n\x18UNKNOWN_INTERNAL_ADDRESS\x10\n\x12\x1c\n\x18\x46ORWARDING_RULE_MISMATCH\x10\x0b\x12 \n\x1c\x46ORWARDING_RULE_NO_INSTANCES\x10\x0c\x12\x38\n4FIREWALL_BLOCKING_LOAD_BALANCER_BACKEND_HEALTH_CHECK\x10\r\x12:\n6INGRESS_FIREWALL_TAGS_UNSUPPORTED_BY_DIRECT_VPC_EGRESS\x10U\x12\x18\n\x14INSTANCE_NOT_RUNNING\x10\x0e\x12\x1b\n\x17GKE_CLUSTER_NOT_RUNNING\x10\x1b\x12\x17\n\x13GKE_POD_NOT_RUNNING\x10g\x12\"\n\x1e\x43LOUD_SQL_INSTANCE_NOT_RUNNING\x10\x1c\x12\x1e\n\x1aREDIS_INSTANCE_NOT_RUNNING\x10\x44\x12\x1d\n\x19REDIS_CLUSTER_NOT_RUNNING\x10\x45\x12\x18\n\x14TRAFFIC_TYPE_BLOCKED\x10\x0f\x12\"\n\x1eGKE_MASTER_UNAUTHORIZED_ACCESS\x10\x10\x12*\n&CLOUD_SQL_INSTANCE_UNAUTHORIZED_ACCESS\x10\x11\x12\x1e\n\x1a\x44ROPPED_INSIDE_GKE_SERVICE\x10\x12\x12$\n DROPPED_INSIDE_CLOUD_SQL_SERVICE\x10\x13\x12%\n!GOOGLE_MANAGED_SERVICE_NO_PEERING\x10\x14\x12*\n&GOOGLE_MANAGED_SERVICE_NO_PSC_ENDPOINT\x10&\x12\x1c\n\x18GKE_PSC_ENDPOINT_MISSING\x10$\x12$\n CLOUD_SQL_INSTANCE_NO_IP_ADDRESS\x10\x15\x12%\n!GKE_CONTROL_PLANE_REGION_MISMATCH\x10\x1e\x12\x33\n/PUBLIC_GKE_CONTROL_PLANE_TO_PRIVATE_DESTINATION\x10\x1f\x12\x1e\n\x1aGKE_CONTROL_PLANE_NO_ROUTE\x10 \x12:\n6CLOUD_SQL_INSTANCE_NOT_CONFIGURED_FOR_EXTERNAL_TRAFFIC\x10!\x12\x34\n0PUBLIC_CLOUD_SQL_INSTANCE_TO_PRIVATE_DESTINATION\x10\"\x12\x1f\n\x1b\x43LOUD_SQL_INSTANCE_NO_ROUTE\x10#\x12 \n\x1c\x43LOUD_SQL_CONNECTOR_REQUIRED\x10?\x12\x1d\n\x19\x43LOUD_FUNCTION_NOT_ACTIVE\x10\x16\x12\x19\n\x15VPC_CONNECTOR_NOT_SET\x10\x17\x12\x1d\n\x19VPC_CONNECTOR_NOT_RUNNING\x10\x18\x12,\n(VPC_CONNECTOR_SERVERLESS_TRAFFIC_BLOCKED\x10<\x12.\n*VPC_CONNECTOR_HEALTH_CHECK_TRAFFIC_BLOCKED\x10=\x12#\n\x1f\x46ORWARDING_RULE_REGION_MISMATCH\x10\x19\x12\x1f\n\x1bPSC_CONNECTION_NOT_ACCEPTED\x10\x1a\x12-\n)PSC_ENDPOINT_ACCESSED_FROM_PEERED_NETWORK\x10)\x12.\n*PSC_NEG_PRODUCER_ENDPOINT_NO_GLOBAL_ACCESS\x10\x30\x12\x33\n/PSC_NEG_PRODUCER_FORWARDING_RULE_MULTIPLE_PORTS\x10\x36\x12!\n\x1d\x43LOUD_SQL_PSC_NEG_UNSUPPORTED\x10:\x12-\n)NO_NAT_SUBNETS_FOR_PSC_SERVICE_ATTACHMENT\x10\x39\x12#\n\x1fPSC_TRANSITIVITY_NOT_PROPAGATED\x10@\x12(\n$HYBRID_NEG_NON_DYNAMIC_ROUTE_MATCHED\x10\x37\x12.\n*HYBRID_NEG_NON_LOCAL_DYNAMIC_ROUTE_MATCHED\x10\x38\x12 \n\x1c\x43LOUD_RUN_REVISION_NOT_READY\x10\x1d\x12\'\n#DROPPED_INSIDE_PSC_SERVICE_PRODUCER\x10%\x12%\n!LOAD_BALANCER_HAS_NO_PROXY_SUBNET\x10\'\x12\x1a\n\x16\x43LOUD_NAT_NO_ADDRESSES\x10(\x12\x10\n\x0cROUTING_LOOP\x10;\x12)\n%DROPPED_INSIDE_GOOGLE_MANAGED_SERVICE\x10>\x12)\n%LOAD_BALANCER_BACKEND_INVALID_NETWORK\x10\x41\x12*\n&BACKEND_SERVICE_NAMED_PORT_NOT_DEFINED\x10\x42\x12\'\n#DESTINATION_IS_PRIVATE_NAT_IP_RANGE\x10\x43\x12)\n%DROPPED_INSIDE_REDIS_INSTANCE_SERVICE\x10\x46\x12#\n\x1fREDIS_INSTANCE_UNSUPPORTED_PORT\x10G\x12/\n+REDIS_INSTANCE_CONNECTING_FROM_PUPI_ADDRESS\x10H\x12\x32\n.REDIS_INSTANCE_NO_ROUTE_TO_DESTINATION_NETWORK\x10I\x12!\n\x1dREDIS_INSTANCE_NO_EXTERNAL_IP\x10J\x12\'\n#REDIS_INSTANCE_UNSUPPORTED_PROTOCOL\x10N\x12(\n$DROPPED_INSIDE_REDIS_CLUSTER_SERVICE\x10K\x12\"\n\x1eREDIS_CLUSTER_UNSUPPORTED_PORT\x10L\x12 \n\x1cREDIS_CLUSTER_NO_EXTERNAL_IP\x10M\x12&\n\"REDIS_CLUSTER_UNSUPPORTED_PROTOCOL\x10O\x12*\n&NO_ADVERTISED_ROUTE_TO_GCP_DESTINATION\x10P\x12*\n&NO_TRAFFIC_SELECTOR_TO_GCP_DESTINATION\x10Q\x12\x35\n1NO_KNOWN_ROUTE_FROM_PEERED_NETWORK_TO_DESTINATION\x10R\x12+\n\'PRIVATE_NAT_TO_PSC_ENDPOINT_UNSUPPORTED\x10S\x12\"\n\x1ePSC_PORT_MAPPING_PORT_MISMATCH\x10V\x12\x37\n3PSC_PORT_MAPPING_WITHOUT_PSC_CONNECTION_UNSUPPORTED\x10W\x12\x33\n/UNSUPPORTED_ROUTE_MATCHED_FOR_NAT64_DESTINATION\x10X\x12\x37\n3TRAFFIC_FROM_HYBRID_ENDPOINT_TO_INTERNET_DISALLOWED\x10Y\x12\x1d\n\x19NO_MATCHING_NAT64_GATEWAY\x10Z\x12$\n NO_CONFIGURED_PRIVATE_NAT64_RULE\x10k\x12-\n)LOAD_BALANCER_BACKEND_IP_VERSION_MISMATCH\x10`\x12\x32\n.NO_KNOWN_ROUTE_FROM_NCC_NETWORK_TO_DESTINATION\x10\x61\x12\"\n\x1e\x43LOUD_NAT_PROTOCOL_UNSUPPORTED\x10\x63\x12(\n$L2_INTERCONNECT_UNSUPPORTED_PROTOCOL\x10\x64\x12$\n L2_INTERCONNECT_UNSUPPORTED_PORT\x10\x65\x12+\n\'L2_INTERCONNECT_DESTINATION_IP_MISMATCH\x10\x66\x12.\n*NCC_ROUTE_WITHIN_HYBRID_SUBNET_UNSUPPORTED\x10h\x12!\n\x1dHYBRID_SUBNET_REGION_MISMATCH\x10i\x12\x1a\n\x16HYBRID_SUBNET_NO_ROUTE\x10j\x12\x16\n\x12GKE_NETWORK_POLICY\x10l\x12=\n9NO_VALID_ROUTE_FROM_GOOGLE_MANAGED_NETWORK_TO_DESTINATION\x10n\"\x81\x01\n\rGKEMasterInfo\x12\x13\n\x0b\x63luster_uri\x18\x02 \x01(\t\x12\x1b\n\x13\x63luster_network_uri\x18\x04 \x01(\t\x12\x13\n\x0binternal_ip\x18\x05 \x01(\t\x12\x13\n\x0b\x65xternal_ip\x18\x06 \x01(\t\x12\x14\n\x0c\x64ns_endpoint\x18\x07 \x01(\t\"P\n\nGkePodInfo\x12\x0f\n\x07pod_uri\x18\x01 \x01(\t\x12\x1c\n\nip_address\x18\x02 \x01(\tB\x08\xe2\x8c\xcf\xd7\x08\x02\x08\x04\x12\x13\n\x0bnetwork_uri\x18\x03 \x01(\t\"\xbf\x03\n\x19IpMasqueradingSkippedInfo\x12S\n\x06reason\x18\x01 \x01(\x0e\x32\x43.google.cloud.networkmanagement.v1.IpMasqueradingSkippedInfo.Reason\x12\x1c\n\x14non_masquerade_range\x18\x02 \x01(\t\"\xae\x02\n\x06Reason\x12\x16\n\x12REASON_UNSPECIFIED\x10\x00\x12\x35\n1DESTINATION_IP_IN_CONFIGURED_NON_MASQUERADE_RANGE\x10\x01\x12\x32\n.DESTINATION_IP_IN_DEFAULT_NON_MASQUERADE_RANGE\x10\x02\x12\x1c\n\x18\x44\x45STINATION_ON_SAME_NODE\x10\x03\x12\x19\n\x15\x44\x45\x46\x41ULT_SNAT_DISABLED\x10\x04\x12\x1c\n\x18NO_MASQUERADING_FOR_IPV6\x10\x05\x12#\n\x1fPOD_USES_NODE_NETWORK_NAMESPACE\x10\x06\x12%\n!NO_MASQUERADING_FOR_RETURN_PACKET\x10\x07\"\\\n\x14GkeNetworkPolicyInfo\x12\x14\n\x0c\x64isplay_name\x18\x01 \x01(\t\x12\x0b\n\x03uri\x18\x02 \x01(\t\x12\x11\n\tdirection\x18\x03 \x01(\t\x12\x0e\n\x06\x61\x63tion\x18\x04 \x01(\t\"\xde\x02\n\x1bGkeNetworkPolicySkippedInfo\x12U\n\x06reason\x18\x01 \x01(\x0e\x32\x45.google.cloud.networkmanagement.v1.GkeNetworkPolicySkippedInfo.Reason\"\xe7\x01\n\x06Reason\x12\x16\n\x12REASON_UNSPECIFIED\x10\x00\x12\x1b\n\x17NETWORK_POLICY_DISABLED\x10\x01\x12\x1f\n\x1bINGRESS_SOURCE_ON_SAME_NODE\x10\x02\x12*\n&EGRESS_FROM_NODE_NETWORK_NAMESPACE_POD\x10\x03\x12\x32\n.NETWORK_POLICY_NOT_APPLIED_TO_RESPONSE_TRAFFIC\x10\x04\x12\'\n#NETWORK_POLICY_ANALYSIS_UNSUPPORTED\x10\x64\"\x88\x01\n\x14\x43loudSQLInstanceInfo\x12\x14\n\x0c\x64isplay_name\x18\x01 \x01(\t\x12\x0b\n\x03uri\x18\x02 \x01(\t\x12\x13\n\x0bnetwork_uri\x18\x04 \x01(\t\x12\x13\n\x0binternal_ip\x18\x05 \x01(\t\x12\x13\n\x0b\x65xternal_ip\x18\x06 \x01(\t\x12\x0e\n\x06region\x18\x07 \x01(\t\"\x92\x01\n\x11RedisInstanceInfo\x12\x14\n\x0c\x64isplay_name\x18\x01 \x01(\t\x12\x0b\n\x03uri\x18\x02 \x01(\t\x12\x13\n\x0bnetwork_uri\x18\x03 \x01(\t\x12\x1b\n\x13primary_endpoint_ip\x18\x04 \x01(\t\x12\x18\n\x10read_endpoint_ip\x18\x05 \x01(\t\x12\x0e\n\x06region\x18\x06 \x01(\t\"\xbe\x01\n\x10RedisClusterInfo\x12\x14\n\x0c\x64isplay_name\x18\x01 \x01(\t\x12\x0b\n\x03uri\x18\x02 \x01(\t\x12\x13\n\x0bnetwork_uri\x18\x03 \x01(\t\x12/\n\x1d\x64iscovery_endpoint_ip_address\x18\x04 \x01(\tB\x08\xe2\x8c\xcf\xd7\x08\x02\x08\x04\x12/\n\x1dsecondary_endpoint_ip_address\x18\x05 \x01(\tB\x08\xe2\x8c\xcf\xd7\x08\x02\x08\x04\x12\x10\n\x08location\x18\x06 \x01(\t\"\\\n\x11\x43loudFunctionInfo\x12\x14\n\x0c\x64isplay_name\x18\x01 \x01(\t\x12\x0b\n\x03uri\x18\x02 \x01(\t\x12\x10\n\x08location\x18\x03 \x01(\t\x12\x12\n\nversion_id\x18\x04 \x01(\x03\"`\n\x14\x43loudRunRevisionInfo\x12\x14\n\x0c\x64isplay_name\x18\x01 \x01(\t\x12\x0b\n\x03uri\x18\x02 \x01(\t\x12\x10\n\x08location\x18\x04 \x01(\t\x12\x13\n\x0bservice_uri\x18\x05 \x01(\t\"_\n\x14\x41ppEngineVersionInfo\x12\x14\n\x0c\x64isplay_name\x18\x01 \x01(\t\x12\x0b\n\x03uri\x18\x02 \x01(\t\x12\x0f\n\x07runtime\x18\x03 \x01(\t\x12\x13\n\x0b\x65nvironment\x18\x04 \x01(\t\"G\n\x10VpcConnectorInfo\x12\x14\n\x0c\x64isplay_name\x18\x01 \x01(\t\x12\x0b\n\x03uri\x18\x02 \x01(\t\x12\x10\n\x08location\x18\x03 \x01(\t\"\xa8\x01\n\x1d\x44irectVpcEgressConnectionInfo\x12\x13\n\x0bnetwork_uri\x18\x01 \x01(\t\x12\x16\n\x0esubnetwork_uri\x18\x02 \x01(\t\x12#\n\x11selected_ip_range\x18\x03 \x01(\tB\x08\xe2\x8c\xcf\xd7\x08\x02\x08\x04\x12%\n\x13selected_ip_address\x18\x04 \x01(\tB\x08\xe2\x8c\xcf\xd7\x08\x02\x08\x04\x12\x0e\n\x06region\x18\x05 \x01(\t\"I\n ServerlessExternalConnectionInfo\x12%\n\x13selected_ip_address\x18\x01 \x01(\tB\x08\xe2\x8c\xcf\xd7\x08\x02\x08\x04\"\x91\x06\n\x07NatInfo\x12=\n\x04type\x18\x01 \x01(\x0e\x32/.google.cloud.networkmanagement.v1.NatInfo.Type\x12\x10\n\x08protocol\x18\x02 \x01(\t\x12\x13\n\x0bnetwork_uri\x18\x03 \x01(\t\x12\x15\n\rold_source_ip\x18\x04 \x01(\t\x12\x15\n\rnew_source_ip\x18\x05 \x01(\t\x12\x1a\n\x12old_destination_ip\x18\x06 \x01(\t\x12\x1a\n\x12new_destination_ip\x18\x07 \x01(\t\x12\x17\n\x0fold_source_port\x18\x08 \x01(\x05\x12\x17\n\x0fnew_source_port\x18\t \x01(\x05\x12\x1c\n\x14old_destination_port\x18\n \x01(\x05\x12\x1c\n\x14new_destination_port\x18\x0b \x01(\x05\x12\x12\n\nrouter_uri\x18\x0c \x01(\t\x12\x18\n\x10nat_gateway_name\x18\r \x01(\t\x12^\n\x16\x63loud_nat_gateway_type\x18\x0e \x01(\x0e\x32>.google.cloud.networkmanagement.v1.NatInfo.CloudNatGatewayType\"\x99\x01\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x18\n\x14INTERNAL_TO_EXTERNAL\x10\x01\x12\x18\n\x14\x45XTERNAL_TO_INTERNAL\x10\x02\x12\r\n\tCLOUD_NAT\x10\x03\x12\x1b\n\x17PRIVATE_SERVICE_CONNECT\x10\x04\x12\x1b\n\x17GKE_POD_IP_MASQUERADING\x10\x05\"\xa1\x01\n\x13\x43loudNatGatewayType\x12&\n\"CLOUD_NAT_GATEWAY_TYPE_UNSPECIFIED\x10\x00\x12\x10\n\x0cPUBLIC_NAT44\x10\x01\x12\x10\n\x0cPUBLIC_NAT64\x10\x02\x12\x13\n\x0fPRIVATE_NAT_NCC\x10\x03\x12\x16\n\x12PRIVATE_NAT_HYBRID\x10\x04\x12\x11\n\rPRIVATE_NAT64\x10\x05\"\xa4\x02\n\x13ProxyConnectionInfo\x12\x10\n\x08protocol\x18\x01 \x01(\t\x12\x15\n\rold_source_ip\x18\x02 \x01(\t\x12\x15\n\rnew_source_ip\x18\x03 \x01(\t\x12\x1a\n\x12old_destination_ip\x18\x04 \x01(\t\x12\x1a\n\x12new_destination_ip\x18\x05 \x01(\t\x12\x17\n\x0fold_source_port\x18\x06 \x01(\x05\x12\x17\n\x0fnew_source_port\x18\x07 \x01(\x05\x12\x1c\n\x14old_destination_port\x18\x08 \x01(\x05\x12\x1c\n\x14new_destination_port\x18\t \x01(\x05\x12\x12\n\nsubnet_uri\x18\n \x01(\t\x12\x13\n\x0bnetwork_uri\x18\x0b \x01(\t\"\xf2\x04\n\x17LoadBalancerBackendInfo\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0cinstance_uri\x18\x02 \x01(\t\x12\x1b\n\x13\x62\x61\x63kend_service_uri\x18\x03 \x01(\t\x12\x1a\n\x12instance_group_uri\x18\x04 \x01(\t\x12\"\n\x1anetwork_endpoint_group_uri\x18\x05 \x01(\t\x12\x1a\n\x12\x62\x61\x63kend_bucket_uri\x18\x08 \x01(\t\x12\"\n\x1apsc_service_attachment_uri\x18\t \x01(\t\x12\x1d\n\x15psc_google_api_target\x18\n \x01(\t\x12\x18\n\x10health_check_uri\x18\x06 \x01(\t\x12\x8c\x01\n#health_check_firewalls_config_state\x18\x07 \x01(\x0e\x32Z.google.cloud.networkmanagement.v1.LoadBalancerBackendInfo.HealthCheckFirewallsConfigStateB\x03\xe0\x41\x03\"\xcd\x01\n\x1fHealthCheckFirewallsConfigState\x12\x33\n/HEALTH_CHECK_FIREWALLS_CONFIG_STATE_UNSPECIFIED\x10\x00\x12\x18\n\x14\x46IREWALLS_CONFIGURED\x10\x01\x12\"\n\x1e\x46IREWALLS_PARTIALLY_CONFIGURED\x10\x02\x12\x1c\n\x18\x46IREWALLS_NOT_CONFIGURED\x10\x03\x12\x19\n\x15\x46IREWALLS_UNSUPPORTED\x10\x04\"#\n\x11StorageBucketInfo\x12\x0e\n\x06\x62ucket\x18\x01 \x01(\t\"$\n\x11ServerlessNegInfo\x12\x0f\n\x07neg_uri\x18\x01 \x01(\t\">\n\x18NgfwPacketInspectionInfo\x12\"\n\x1asecurity_profile_group_uri\x18\x01 \x01(\t*\xf6\x02\n\x10LoadBalancerType\x12\"\n\x1eLOAD_BALANCER_TYPE_UNSPECIFIED\x10\x00\x12 \n\x1cHTTPS_ADVANCED_LOAD_BALANCER\x10\x01\x12\x17\n\x13HTTPS_LOAD_BALANCER\x10\x02\x12 \n\x1cREGIONAL_HTTPS_LOAD_BALANCER\x10\x03\x12 \n\x1cINTERNAL_HTTPS_LOAD_BALANCER\x10\x04\x12\x1b\n\x17SSL_PROXY_LOAD_BALANCER\x10\x05\x12\x1b\n\x17TCP_PROXY_LOAD_BALANCER\x10\x06\x12$\n INTERNAL_TCP_PROXY_LOAD_BALANCER\x10\x07\x12\x19\n\x15NETWORK_LOAD_BALANCER\x10\x08\x12 \n\x1cLEGACY_NETWORK_LOAD_BALANCER\x10\t\x12\"\n\x1eTCP_UDP_INTERNAL_LOAD_BALANCER\x10\nB\xf9\x01\n%com.google.cloud.networkmanagement.v1B\nTraceProtoP\x01ZScloud.google.com/go/networkmanagement/apiv1/networkmanagementpb;networkmanagementpb\xaa\x02!Google.Cloud.NetworkManagement.V1\xca\x02!Google\\Cloud\\NetworkManagement\\V1\xea\x02$Google::Cloud::NetworkManagement::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 = [ + ] + 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 NetworkManagement + module V1 + Trace = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.Trace").msgclass + Step = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.Step").msgclass + Step::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.Step.State").enummodule + InstanceInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.InstanceInfo").msgclass + InstanceInfo::Status = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.InstanceInfo.Status").enummodule + NetworkInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.NetworkInfo").msgclass + FirewallInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.FirewallInfo").msgclass + FirewallInfo::FirewallRuleType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.FirewallInfo.FirewallRuleType").enummodule + FirewallInfo::TargetType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.FirewallInfo.TargetType").enummodule + RouteInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.RouteInfo").msgclass + RouteInfo::RouteType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.RouteInfo.RouteType").enummodule + RouteInfo::NextHopType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.RouteInfo.NextHopType").enummodule + RouteInfo::RouteScope = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.RouteInfo.RouteScope").enummodule + GoogleServiceInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.GoogleServiceInfo").msgclass + GoogleServiceInfo::GoogleServiceType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.GoogleServiceInfo.GoogleServiceType").enummodule + ForwardingRuleInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.ForwardingRuleInfo").msgclass + LoadBalancerInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.LoadBalancerInfo").msgclass + LoadBalancerInfo::LoadBalancerType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.LoadBalancerInfo.LoadBalancerType").enummodule + LoadBalancerInfo::BackendType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.LoadBalancerInfo.BackendType").enummodule + LoadBalancerBackend = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.LoadBalancerBackend").msgclass + LoadBalancerBackend::HealthCheckFirewallState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.LoadBalancerBackend.HealthCheckFirewallState").enummodule + HybridSubnetInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.HybridSubnetInfo").msgclass + VpnGatewayInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.VpnGatewayInfo").msgclass + VpnTunnelInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.VpnTunnelInfo").msgclass + VpnTunnelInfo::RoutingType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.VpnTunnelInfo.RoutingType").enummodule + InterconnectAttachmentInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.InterconnectAttachmentInfo").msgclass + InterconnectAttachmentInfo::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.InterconnectAttachmentInfo.Type").enummodule + EndpointInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.EndpointInfo").msgclass + DeliverInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.DeliverInfo").msgclass + DeliverInfo::Target = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.DeliverInfo.Target").enummodule + DeliverInfo::GoogleServiceType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.DeliverInfo.GoogleServiceType").enummodule + ForwardInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.ForwardInfo").msgclass + ForwardInfo::Target = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.ForwardInfo.Target").enummodule + AbortInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.AbortInfo").msgclass + AbortInfo::Cause = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.AbortInfo.Cause").enummodule + DropInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.DropInfo").msgclass + DropInfo::Cause = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.DropInfo.Cause").enummodule + GKEMasterInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.GKEMasterInfo").msgclass + GkePodInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.GkePodInfo").msgclass + IpMasqueradingSkippedInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.IpMasqueradingSkippedInfo").msgclass + IpMasqueradingSkippedInfo::Reason = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.IpMasqueradingSkippedInfo.Reason").enummodule + GkeNetworkPolicyInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.GkeNetworkPolicyInfo").msgclass + GkeNetworkPolicySkippedInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.GkeNetworkPolicySkippedInfo").msgclass + GkeNetworkPolicySkippedInfo::Reason = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.GkeNetworkPolicySkippedInfo.Reason").enummodule + CloudSQLInstanceInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.CloudSQLInstanceInfo").msgclass + RedisInstanceInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.RedisInstanceInfo").msgclass + RedisClusterInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.RedisClusterInfo").msgclass + CloudFunctionInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.CloudFunctionInfo").msgclass + CloudRunRevisionInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.CloudRunRevisionInfo").msgclass + AppEngineVersionInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.AppEngineVersionInfo").msgclass + VpcConnectorInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.VpcConnectorInfo").msgclass + DirectVpcEgressConnectionInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.DirectVpcEgressConnectionInfo").msgclass + ServerlessExternalConnectionInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.ServerlessExternalConnectionInfo").msgclass + NatInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.NatInfo").msgclass + NatInfo::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.NatInfo.Type").enummodule + NatInfo::CloudNatGatewayType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.NatInfo.CloudNatGatewayType").enummodule + ProxyConnectionInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.ProxyConnectionInfo").msgclass + LoadBalancerBackendInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.LoadBalancerBackendInfo").msgclass + LoadBalancerBackendInfo::HealthCheckFirewallsConfigState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.LoadBalancerBackendInfo.HealthCheckFirewallsConfigState").enummodule + StorageBucketInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.StorageBucketInfo").msgclass + ServerlessNegInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.ServerlessNegInfo").msgclass + NgfwPacketInspectionInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.NgfwPacketInspectionInfo").msgclass + LoadBalancerType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.LoadBalancerType").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/networkmanagement/v1/vpc_flow_logs_config_pb.rb b/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/networkmanagement/v1/vpc_flow_logs_config_pb.rb new file mode 100644 index 000000000000..da41bfc41277 --- /dev/null +++ b/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/networkmanagement/v1/vpc_flow_logs_config_pb.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/networkmanagement/v1/vpc_flow_logs_config.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n.google.cloud.networkmanagement.v1.GetVpcFlowLogsConfigRequest\x1a\x34.google.cloud.networkmanagement.v1.VpcFlowLogsConfig\"E\xda\x41\x04name\x82\xd3\xe4\x93\x02\x38\x12\x36/v1/{name=projects/*/locations/*/vpcFlowLogsConfigs/*}\x12\xd3\x02\n\x17\x43reateVpcFlowLogsConfig\x12\x41.google.cloud.networkmanagement.v1.CreateVpcFlowLogsConfigRequest\x1a\x1d.google.longrunning.Operation\"\xd5\x01\xca\x41H\n\x11VpcFlowLogsConfig\x12\x33google.cloud.networkmanagement.v1.OperationMetadata\xda\x41\x33parent,vpc_flow_logs_config,vpc_flow_logs_config_id\x82\xd3\xe4\x93\x02N\"6/v1/{parent=projects/*/locations/*}/vpcFlowLogsConfigs:\x14vpc_flow_logs_config\x12\xd5\x02\n\x17UpdateVpcFlowLogsConfig\x12\x41.google.cloud.networkmanagement.v1.UpdateVpcFlowLogsConfigRequest\x1a\x1d.google.longrunning.Operation\"\xd7\x01\xca\x41H\n\x11VpcFlowLogsConfig\x12\x33google.cloud.networkmanagement.v1.OperationMetadata\xda\x41 vpc_flow_logs_config,update_mask\x82\xd3\xe4\x93\x02\x63\x32K/v1/{vpc_flow_logs_config.name=projects/*/locations/*/vpcFlowLogsConfigs/*}:\x14vpc_flow_logs_config\x12\x92\x02\n\x17\x44\x65leteVpcFlowLogsConfig\x12\x41.google.cloud.networkmanagement.v1.DeleteVpcFlowLogsConfigRequest\x1a\x1d.google.longrunning.Operation\"\x94\x01\xca\x41L\n\x15google.protobuf.Empty\x12\x33google.cloud.networkmanagement.v1.OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x38*6/v1/{name=projects/*/locations/*/vpcFlowLogsConfigs/*}\x12\x84\x02\n\x1aQueryOrgVpcFlowLogsConfigs\x12\x44.google.cloud.networkmanagement.v1.QueryOrgVpcFlowLogsConfigsRequest\x1a\x45.google.cloud.networkmanagement.v1.QueryOrgVpcFlowLogsConfigsResponse\"Y\x82\xd3\xe4\x93\x02S\x12Q/v1/{parent=projects/*/locations/*}/vpcFlowLogsConfigs:queryOrgVpcFlowLogsConfigs\x12\x8c\x02\n\x1cShowEffectiveFlowLogsConfigs\x12\x46.google.cloud.networkmanagement.v1.ShowEffectiveFlowLogsConfigsRequest\x1aG.google.cloud.networkmanagement.v1.ShowEffectiveFlowLogsConfigsResponse\"[\x82\xd3\xe4\x93\x02U\x12S/v1/{parent=projects/*/locations/*}/vpcFlowLogsConfigs:showEffectiveFlowLogsConfigs\x1aT\xca\x41 networkmanagement.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platform2\x91\x0c\n\x1eOrganizationVpcFlowLogsService\x12\xeb\x01\n\x16ListVpcFlowLogsConfigs\x12@.google.cloud.networkmanagement.v1.ListVpcFlowLogsConfigsRequest\x1a\x41.google.cloud.networkmanagement.v1.ListVpcFlowLogsConfigsResponse\"L\xda\x41\x06parent\x82\xd3\xe4\x93\x02=\x12;/v1/{parent=organizations/*/locations/*}/vpcFlowLogsConfigs\x12\xd8\x01\n\x14GetVpcFlowLogsConfig\x12>.google.cloud.networkmanagement.v1.GetVpcFlowLogsConfigRequest\x1a\x34.google.cloud.networkmanagement.v1.VpcFlowLogsConfig\"J\xda\x41\x04name\x82\xd3\xe4\x93\x02=\x12;/v1/{name=organizations/*/locations/*/vpcFlowLogsConfigs/*}\x12\xd8\x02\n\x17\x43reateVpcFlowLogsConfig\x12\x41.google.cloud.networkmanagement.v1.CreateVpcFlowLogsConfigRequest\x1a\x1d.google.longrunning.Operation\"\xda\x01\xca\x41H\n\x11VpcFlowLogsConfig\x12\x33google.cloud.networkmanagement.v1.OperationMetadata\xda\x41\x33parent,vpc_flow_logs_config,vpc_flow_logs_config_id\x82\xd3\xe4\x93\x02S\";/v1/{parent=organizations/*/locations/*}/vpcFlowLogsConfigs:\x14vpc_flow_logs_config\x12\xda\x02\n\x17UpdateVpcFlowLogsConfig\x12\x41.google.cloud.networkmanagement.v1.UpdateVpcFlowLogsConfigRequest\x1a\x1d.google.longrunning.Operation\"\xdc\x01\xca\x41H\n\x11VpcFlowLogsConfig\x12\x33google.cloud.networkmanagement.v1.OperationMetadata\xda\x41 vpc_flow_logs_config,update_mask\x82\xd3\xe4\x93\x02h2P/v1/{vpc_flow_logs_config.name=organizations/*/locations/*/vpcFlowLogsConfigs/*}:\x14vpc_flow_logs_config\x12\x97\x02\n\x17\x44\x65leteVpcFlowLogsConfig\x12\x41.google.cloud.networkmanagement.v1.DeleteVpcFlowLogsConfigRequest\x1a\x1d.google.longrunning.Operation\"\x99\x01\xca\x41L\n\x15google.protobuf.Empty\x12\x33google.cloud.networkmanagement.v1.OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02=*;/v1/{name=organizations/*/locations/*/vpcFlowLogsConfigs/*}\x1aT\xca\x41 networkmanagement.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xff\x01\n%com.google.cloud.networkmanagement.v1B\x10VpcFlowLogsProtoP\x01ZScloud.google.com/go/networkmanagement/apiv1/networkmanagementpb;networkmanagementpb\xaa\x02!Google.Cloud.NetworkManagement.V1\xca\x02!Google\\Cloud\\NetworkManagement\\V1\xea\x02$Google::Cloud::NetworkManagement::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.cloud.networkmanagement.v1.VpcFlowLogsConfig", "google/cloud/networkmanagement/v1/vpc_flow_logs_config.proto"], + ["google.protobuf.FieldMask", "google/protobuf/field_mask.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 NetworkManagement + module V1 + ListVpcFlowLogsConfigsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.ListVpcFlowLogsConfigsRequest").msgclass + ListVpcFlowLogsConfigsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.ListVpcFlowLogsConfigsResponse").msgclass + GetVpcFlowLogsConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.GetVpcFlowLogsConfigRequest").msgclass + CreateVpcFlowLogsConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.CreateVpcFlowLogsConfigRequest").msgclass + UpdateVpcFlowLogsConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.UpdateVpcFlowLogsConfigRequest").msgclass + DeleteVpcFlowLogsConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.DeleteVpcFlowLogsConfigRequest").msgclass + QueryOrgVpcFlowLogsConfigsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.QueryOrgVpcFlowLogsConfigsRequest").msgclass + QueryOrgVpcFlowLogsConfigsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.QueryOrgVpcFlowLogsConfigsResponse").msgclass + ShowEffectiveFlowLogsConfigsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.ShowEffectiveFlowLogsConfigsRequest").msgclass + ShowEffectiveFlowLogsConfigsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.ShowEffectiveFlowLogsConfigsResponse").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/networkmanagement/v1/vpc_flow_logs_services_pb.rb b/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/networkmanagement/v1/vpc_flow_logs_services_pb.rb new file mode 100644 index 000000000000..0e83e1a525a0 --- /dev/null +++ b/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/networkmanagement/v1/vpc_flow_logs_services_pb.rb @@ -0,0 +1,144 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/cloud/networkmanagement/v1/vpc_flow_logs.proto for package 'Google.Cloud.NetworkManagement.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/networkmanagement/v1/vpc_flow_logs_pb' + +module Google + module Cloud + module NetworkManagement + module V1 + module VpcFlowLogsService + # The VPC Flow Logs service in the Google Cloud Network Management API provides + # configurations that generate Flow Logs. The service and the configuration + # resources created using this service are global. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.cloud.networkmanagement.v1.VpcFlowLogsService' + + # Lists all `VpcFlowLogsConfigs` in a given project. + rpc :ListVpcFlowLogsConfigs, ::Google::Cloud::NetworkManagement::V1::ListVpcFlowLogsConfigsRequest, ::Google::Cloud::NetworkManagement::V1::ListVpcFlowLogsConfigsResponse + # Gets the details of a specific `VpcFlowLogsConfig`. + rpc :GetVpcFlowLogsConfig, ::Google::Cloud::NetworkManagement::V1::GetVpcFlowLogsConfigRequest, ::Google::Cloud::NetworkManagement::V1::VpcFlowLogsConfig + # Creates a new `VpcFlowLogsConfig`. + # If a configuration with the exact same settings already exists (even if the + # ID is different), the creation fails. + # Notes: + # + # 1. Creating a configuration with `state=DISABLED` will fail + # 2. The following fields are not considered as settings for the purpose + # of the check mentioned above, therefore - creating another configuration + # with the same fields but different values for the following fields will + # fail as well: + # * name + # * create_time + # * update_time + # * labels + # * description + rpc :CreateVpcFlowLogsConfig, ::Google::Cloud::NetworkManagement::V1::CreateVpcFlowLogsConfigRequest, ::Google::Longrunning::Operation + # Updates an existing `VpcFlowLogsConfig`. + # If a configuration with the exact same settings already exists (even if the + # ID is different), the creation fails. + # Notes: + # + # 1. Updating a configuration with `state=DISABLED` will fail. + # 2. The following fields are not considered as settings for the purpose + # of the check mentioned above, therefore - updating another configuration + # with the same fields but different values for the following fields will + # fail as well: + # * name + # * create_time + # * update_time + # * labels + # * description + rpc :UpdateVpcFlowLogsConfig, ::Google::Cloud::NetworkManagement::V1::UpdateVpcFlowLogsConfigRequest, ::Google::Longrunning::Operation + # Deletes a specific `VpcFlowLogsConfig`. + rpc :DeleteVpcFlowLogsConfig, ::Google::Cloud::NetworkManagement::V1::DeleteVpcFlowLogsConfigRequest, ::Google::Longrunning::Operation + # QueryOrgVpcFlowLogsConfigs returns a list of all organization-level VPC + # Flow Logs configurations applicable to the specified project. + rpc :QueryOrgVpcFlowLogsConfigs, ::Google::Cloud::NetworkManagement::V1::QueryOrgVpcFlowLogsConfigsRequest, ::Google::Cloud::NetworkManagement::V1::QueryOrgVpcFlowLogsConfigsResponse + # ShowEffectiveFlowLogsConfigs returns a list of all VPC Flow Logs + # configurations applicable to a specified resource. + rpc :ShowEffectiveFlowLogsConfigs, ::Google::Cloud::NetworkManagement::V1::ShowEffectiveFlowLogsConfigsRequest, ::Google::Cloud::NetworkManagement::V1::ShowEffectiveFlowLogsConfigsResponse + end + + Stub = Service.rpc_stub_class + end + module OrganizationVpcFlowLogsService + # The VPC Flow Logs organization service in the Google Cloud Network Management + # API provides organization level configurations that generate Flow Logs. The + # service and the configuration resources created using this service are + # global. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.cloud.networkmanagement.v1.OrganizationVpcFlowLogsService' + + # Lists all `VpcFlowLogsConfigs` in a given organization. + rpc :ListVpcFlowLogsConfigs, ::Google::Cloud::NetworkManagement::V1::ListVpcFlowLogsConfigsRequest, ::Google::Cloud::NetworkManagement::V1::ListVpcFlowLogsConfigsResponse + # Gets the details of a specific `VpcFlowLogsConfig`. + rpc :GetVpcFlowLogsConfig, ::Google::Cloud::NetworkManagement::V1::GetVpcFlowLogsConfigRequest, ::Google::Cloud::NetworkManagement::V1::VpcFlowLogsConfig + # Creates a new `VpcFlowLogsConfig`. + # If a configuration with the exact same settings already exists (even if the + # ID is different), the creation fails. + # Notes: + # + # 1. Creating a configuration with `state=DISABLED` will fail + # 2. The following fields are not considered as settings for the purpose + # of the check mentioned above, therefore - creating another configuration + # with the same fields but different values for the following fields will + # fail as well: + # * name + # * create_time + # * update_time + # * labels + # * description + rpc :CreateVpcFlowLogsConfig, ::Google::Cloud::NetworkManagement::V1::CreateVpcFlowLogsConfigRequest, ::Google::Longrunning::Operation + # Updates an existing `VpcFlowLogsConfig`. + # If a configuration with the exact same settings already exists (even if the + # ID is different), the creation fails. + # Notes: + # + # 1. Updating a configuration with `state=DISABLED` will fail + # 2. The following fields are not considered as settings for the purpose + # of the check mentioned above, therefore - updating another configuration + # with the same fields but different values for the following fields will + # fail as well: + # * name + # * create_time + # * update_time + # * labels + # * description + rpc :UpdateVpcFlowLogsConfig, ::Google::Cloud::NetworkManagement::V1::UpdateVpcFlowLogsConfigRequest, ::Google::Longrunning::Operation + # Deletes a specific `VpcFlowLogsConfig`. + rpc :DeleteVpcFlowLogsConfig, ::Google::Cloud::NetworkManagement::V1::DeleteVpcFlowLogsConfigRequest, ::Google::Longrunning::Operation + end + + Stub = Service.rpc_stub_class + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-network_management-v1/proto_docs/README.md b/owl-bot-staging/google-cloud-network_management-v1/proto_docs/README.md new file mode 100644 index 000000000000..45230be2e5e4 --- /dev/null +++ b/owl-bot-staging/google-cloud-network_management-v1/proto_docs/README.md @@ -0,0 +1,4 @@ +# Network Management 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-network_management-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-network_management-v1/proto_docs/google/api/client.rb new file mode 100644 index 000000000000..d59ba51a5612 --- /dev/null +++ b/owl-bot-staging/google-cloud-network_management-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-network_management-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-network_management-v1/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..582be187d115 --- /dev/null +++ b/owl-bot-staging/google-cloud-network_management-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-network_management-v1/proto_docs/google/api/field_info.rb b/owl-bot-staging/google-cloud-network_management-v1/proto_docs/google/api/field_info.rb new file mode 100644 index 000000000000..0f5acf0a5538 --- /dev/null +++ b/owl-bot-staging/google-cloud-network_management-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-network_management-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-network_management-v1/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..9392a413fb1b --- /dev/null +++ b/owl-bot-staging/google-cloud-network_management-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-network_management-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-network_management-v1/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..25dec4847ac1 --- /dev/null +++ b/owl-bot-staging/google-cloud-network_management-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-network_management-v1/proto_docs/google/cloud/networkmanagement/v1/connectivity_test.rb b/owl-bot-staging/google-cloud-network_management-v1/proto_docs/google/cloud/networkmanagement/v1/connectivity_test.rb new file mode 100644 index 000000000000..a7325b8fa62a --- /dev/null +++ b/owl-bot-staging/google-cloud-network_management-v1/proto_docs/google/cloud/networkmanagement/v1/connectivity_test.rb @@ -0,0 +1,490 @@ +# 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 NetworkManagement + module V1 + # A Connectivity Test for a network reachability analysis. + # @!attribute [rw] name + # @return [::String] + # Identifier. Unique name of the resource using the form: + # `projects/{project_id}/locations/global/connectivityTests/{test_id}` + # @!attribute [rw] description + # @return [::String] + # The user-supplied description of the Connectivity Test. + # Maximum of 512 characters. + # @!attribute [rw] source + # @return [::Google::Cloud::NetworkManagement::V1::Endpoint] + # Required. Source specification of the Connectivity Test. + # + # You can use a combination of source IP address, URI of a supported + # endpoint, project ID, or VPC network to identify the source location. + # + # Reachability analysis might proceed even if the source location is + # ambiguous. However, the test result might include endpoints or use a source + # that you don't intend to test. + # @!attribute [rw] destination + # @return [::Google::Cloud::NetworkManagement::V1::Endpoint] + # Required. Destination specification of the Connectivity Test. + # + # You can use a combination of destination IP address, URI of a supported + # endpoint, project ID, or VPC network to identify the destination location. + # + # Reachability analysis proceeds even if the destination location is + # ambiguous. However, the test result might include endpoints or use a + # destination that you don't intend to test. + # @!attribute [rw] protocol + # @return [::String] + # IP Protocol of the test. When not provided, "TCP" is assumed. + # @!attribute [rw] related_projects + # @return [::Array<::String>] + # Other projects that may be relevant for reachability analysis. + # This is applicable to scenarios where a test can cross project boundaries. + # @!attribute [r] display_name + # @return [::String] + # Output only. The display name of a Connectivity Test. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Resource labels to represent user-provided metadata. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time the test was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time the test's configuration was updated. + # @!attribute [r] reachability_details + # @return [::Google::Cloud::NetworkManagement::V1::ReachabilityDetails] + # Output only. The reachability details of this test from the latest run. + # The details are updated when creating a new test, updating an + # existing test, or triggering a one-time rerun of an existing test. + # @!attribute [r] probing_details + # @return [::Google::Cloud::NetworkManagement::V1::ProbingDetails] + # Output only. The probing details of this test from the latest run, present + # for applicable tests only. The details are updated when creating a new + # test, updating an existing test, or triggering a one-time rerun of an + # existing test. + # @!attribute [rw] round_trip + # @return [::Boolean] + # Whether run analysis for the return path from destination to source. + # Default value is false. + # @!attribute [r] return_reachability_details + # @return [::Google::Cloud::NetworkManagement::V1::ReachabilityDetails] + # Output only. The reachability details of this test from the latest run for + # the return path. The details are updated when creating a new test, + # updating an existing test, or triggering a one-time rerun of an existing + # test. + # @!attribute [rw] bypass_firewall_checks + # @return [::Boolean] + # Whether the analysis should skip firewall checking. Default value is false. + class ConnectivityTest + 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 + end + + # Source or destination of the Connectivity Test. + # @!attribute [rw] ip_address + # @return [::String] + # The IP address of the endpoint, which can be an external or internal IP. + # @!attribute [rw] port + # @return [::Integer] + # The IP protocol port of the endpoint. + # Only applicable when protocol is TCP or UDP. + # @!attribute [rw] instance + # @return [::String] + # A Compute Engine instance URI. + # @!attribute [rw] forwarding_rule + # @return [::String] + # A forwarding rule and its corresponding IP address represent the frontend + # configuration of a Google Cloud load balancer. Forwarding rules are also + # used for protocol forwarding, Private Service Connect and other network + # services to provide forwarding information in the control plane. Applicable + # only to destination endpoint. Format: + # `projects/{project}/global/forwardingRules/{id}` or + # `projects/{project}/regions/{region}/forwardingRules/{id}` + # @!attribute [r] forwarding_rule_target + # @return [::Google::Cloud::NetworkManagement::V1::Endpoint::ForwardingRuleTarget] + # Output only. Specifies the type of the target of the forwarding rule. + # @!attribute [r] load_balancer_id + # @return [::String] + # Output only. ID of the load balancer the forwarding rule points to. Empty + # for forwarding rules not related to load balancers. + # @!attribute [r] load_balancer_type + # @return [::Google::Cloud::NetworkManagement::V1::LoadBalancerType] + # Output only. Type of the load balancer the forwarding rule points to. + # @!attribute [rw] gke_master_cluster + # @return [::String] + # A cluster URI for [Google Kubernetes Engine cluster control + # plane](https://cloud.google.com/kubernetes-engine/docs/concepts/cluster-architecture). + # @!attribute [rw] fqdn + # @return [::String] + # DNS endpoint of [Google Kubernetes Engine cluster control + # plane](https://cloud.google.com/kubernetes-engine/docs/concepts/cluster-architecture). + # Requires gke_master_cluster to be set, can't be used simultaneoulsly with + # ip_address or network. Applicable only to destination endpoint. + # @!attribute [rw] cloud_sql_instance + # @return [::String] + # A [Cloud SQL](https://cloud.google.com/sql) instance URI. + # @!attribute [rw] redis_instance + # @return [::String] + # A [Redis Instance](https://cloud.google.com/memorystore/docs/redis) URI. + # Applicable only to destination endpoint. + # @!attribute [rw] redis_cluster + # @return [::String] + # A [Redis Cluster](https://cloud.google.com/memorystore/docs/cluster) URI. + # Applicable only to destination endpoint. + # @!attribute [rw] gke_pod + # @return [::String] + # A [GKE Pod](https://cloud.google.com/kubernetes-engine/docs/concepts/pod) + # URI. + # @!attribute [rw] cloud_function + # @return [::Google::Cloud::NetworkManagement::V1::Endpoint::CloudFunctionEndpoint] + # A [Cloud Function](https://cloud.google.com/functions). Applicable only to + # source endpoint. + # @!attribute [rw] app_engine_version + # @return [::Google::Cloud::NetworkManagement::V1::Endpoint::AppEngineVersionEndpoint] + # An [App Engine](https://cloud.google.com/appengine) [service + # version](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions). + # Applicable only to source endpoint. + # @!attribute [rw] cloud_run_revision + # @return [::Google::Cloud::NetworkManagement::V1::Endpoint::CloudRunRevisionEndpoint] + # A [Cloud Run](https://cloud.google.com/run) + # [revision](https://cloud.google.com/run/docs/reference/rest/v1/namespaces.revisions/get) + # Applicable only to source endpoint. + # @!attribute [rw] network + # @return [::String] + # A VPC network URI. For source endpoints, used according to the + # `network_type`. For destination endpoints, used only when the source is an + # external IP address endpoint, and the destination is an internal IP address + # endpoint. + # @!attribute [rw] network_type + # @return [::Google::Cloud::NetworkManagement::V1::Endpoint::NetworkType] + # For source endpoints, type of the network where the endpoint is located. + # Not relevant for destination endpoints. + # @!attribute [rw] project_id + # @return [::String] + # For source endpoints, endpoint project ID. Used according to the + # `network_type`. Not relevant for destination endpoints. + class Endpoint + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Wrapper for Cloud Function attributes. + # @!attribute [rw] uri + # @return [::String] + # A [Cloud Function](https://cloud.google.com/functions) name. + class CloudFunctionEndpoint + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Wrapper for the App Engine service version attributes. + # @!attribute [rw] uri + # @return [::String] + # An [App Engine](https://cloud.google.com/appengine) [service + # version](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions) + # name. + class AppEngineVersionEndpoint + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Wrapper for Cloud Run revision attributes. + # @!attribute [rw] uri + # @return [::String] + # A [Cloud Run](https://cloud.google.com/run) + # [revision](https://cloud.google.com/run/docs/reference/rest/v1/namespaces.revisions/get) + # URI. The format is: + # projects/\\{project}/locations/\\{location}/revisions/\\{revision} + # @!attribute [r] service_uri + # @return [::String] + # Output only. The URI of the Cloud Run service that the revision belongs + # to. The format is: + # projects/\\{project}/locations/\\{location}/services/\\{service} + class CloudRunRevisionEndpoint + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The type of the network of the IP address endpoint. Relevant for the source + # IP address endpoints. + module NetworkType + # Unspecified. The test will analyze all possible IP address locations. + # This might take longer and produce inaccurate or ambiguous results, so + # prefer specifying an explicit network type. + # + # The `project_id` field should be set to the project where the GCP + # endpoint is located, or where the non-GCP endpoint should be reachable + # from (via routes to non-GCP networks). The project might also be inferred + # from the Connectivity Test project or other projects referenced in the + # request. + NETWORK_TYPE_UNSPECIFIED = 0 + + # A VPC network. Should be used for internal IP addresses in VPC networks. + # The `network` field should be set to the URI of this network. Only + # endpoints within this network will be considered. + GCP_NETWORK = 1 + + # A non-GCP network (for example, an on-premises network or another cloud + # provider network). Should be used for internal IP addresses outside of + # Google Cloud. The `network` field should be set to the URI of the VPC + # network containing a corresponding Cloud VPN tunnel, Cloud Interconnect + # VLAN attachment, or a router appliance instance. Only endpoints reachable + # from the provided VPC network via the routes to non-GCP networks will be + # considered. + NON_GCP_NETWORK = 2 + + # Internet. Should be used for internet-routable external IP addresses or + # IP addresses for global Google APIs and services. + INTERNET = 3 + end + + # Type of the target of a forwarding rule. + module ForwardingRuleTarget + # Forwarding rule target is unknown. + FORWARDING_RULE_TARGET_UNSPECIFIED = 0 + + # Compute Engine instance for protocol forwarding. + INSTANCE = 1 + + # Load Balancer. The specific type can be found from [load_balancer_type] + # [google.cloud.networkmanagement.v1.Endpoint.load_balancer_type]. + LOAD_BALANCER = 2 + + # Classic Cloud VPN Gateway. + VPN_GATEWAY = 3 + + # Forwarding Rule is a Private Service Connect endpoint. + PSC = 4 + end + end + + # Results of the configuration analysis from the last run of the test. + # @!attribute [rw] result + # @return [::Google::Cloud::NetworkManagement::V1::ReachabilityDetails::Result] + # The overall result of the test's configuration analysis. + # @!attribute [rw] verify_time + # @return [::Google::Protobuf::Timestamp] + # The time of the configuration analysis. + # @!attribute [rw] error + # @return [::Google::Rpc::Status] + # The details of a failure or a cancellation of reachability analysis. + # @!attribute [rw] traces + # @return [::Array<::Google::Cloud::NetworkManagement::V1::Trace>] + # Result may contain a list of traces if a test has multiple possible + # paths in the network, such as when destination endpoint is a load balancer + # with multiple backends. + class ReachabilityDetails + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The overall result of the test's configuration analysis. + module Result + # No result was specified. + RESULT_UNSPECIFIED = 0 + + # Possible scenarios are: + # + # * The configuration analysis determined that a packet originating from + # the source is expected to reach the destination. + # * The analysis didn't complete because the user lacks permission for + # some of the resources in the trace. However, at the time the user's + # permission became insufficient, the trace had been successful so far. + REACHABLE = 1 + + # A packet originating from the source is expected to be dropped before + # reaching the destination. + UNREACHABLE = 2 + + # The source and destination endpoints do not uniquely identify + # the test location in the network, and the reachability result contains + # multiple traces. For some traces, a packet could be delivered, and for + # others, it would not be. This result is also assigned to + # configuration analysis of return path if on its own it should be + # REACHABLE, but configuration analysis of forward path is AMBIGUOUS. + AMBIGUOUS = 4 + + # The configuration analysis did not complete. Possible reasons are: + # + # * A permissions error occurred--for example, the user might not have + # read permission for all of the resources named in the test. + # * An internal error occurred. + # * The analyzer received an invalid or unsupported argument or was unable + # to identify a known endpoint. + UNDETERMINED = 5 + end + end + + # Latency percentile rank and value. + # @!attribute [rw] percent + # @return [::Integer] + # Percentage of samples this data point applies to. + # @!attribute [rw] latency_micros + # @return [::Integer] + # percent-th percentile of latency observed, in microseconds. + # Fraction of percent/100 of samples have latency lower or + # equal to the value of this field. + class LatencyPercentile + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Describes measured latency distribution. + # @!attribute [rw] latency_percentiles + # @return [::Array<::Google::Cloud::NetworkManagement::V1::LatencyPercentile>] + # Representative latency percentiles. + class LatencyDistribution + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Results of active probing from the last run of the test. + # @!attribute [rw] result + # @return [::Google::Cloud::NetworkManagement::V1::ProbingDetails::ProbingResult] + # The overall result of active probing. + # @!attribute [rw] verify_time + # @return [::Google::Protobuf::Timestamp] + # The time that reachability was assessed through active probing. + # @!attribute [rw] error + # @return [::Google::Rpc::Status] + # Details about an internal failure or the cancellation of active probing. + # @!attribute [rw] abort_cause + # @return [::Google::Cloud::NetworkManagement::V1::ProbingDetails::ProbingAbortCause] + # The reason probing was aborted. + # @!attribute [rw] sent_probe_count + # @return [::Integer] + # Number of probes sent. + # @!attribute [rw] successful_probe_count + # @return [::Integer] + # Number of probes that reached the destination. + # @!attribute [rw] endpoint_info + # @return [::Google::Cloud::NetworkManagement::V1::EndpointInfo] + # The source and destination endpoints derived from the test input and used + # for active probing. + # @!attribute [rw] probing_latency + # @return [::Google::Cloud::NetworkManagement::V1::LatencyDistribution] + # Latency as measured by active probing in one direction: + # from the source to the destination endpoint. + # @!attribute [rw] destination_egress_location + # @return [::Google::Cloud::NetworkManagement::V1::ProbingDetails::EdgeLocation] + # The EdgeLocation from which a packet, destined to the internet, will egress + # the Google network. + # This will only be populated for a connectivity test which has an internet + # destination address. + # The absence of this field *must not* be used as an indication that the + # destination is part of the Google network. + # @!attribute [rw] edge_responses + # @return [::Array<::Google::Cloud::NetworkManagement::V1::ProbingDetails::SingleEdgeResponse>] + # Probing results for all edge devices. + # @!attribute [rw] probed_all_devices + # @return [::Boolean] + # Whether all relevant edge devices were probed. + class ProbingDetails + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Representation of a network edge location as per + # https://cloud.google.com/vpc/docs/edge-locations. + # @!attribute [rw] metropolitan_area + # @return [::String] + # Name of the metropolitan area. + class EdgeLocation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Probing results for a single edge device. + # @!attribute [rw] result + # @return [::Google::Cloud::NetworkManagement::V1::ProbingDetails::ProbingResult] + # The overall result of active probing for this egress device. + # @!attribute [rw] sent_probe_count + # @return [::Integer] + # Number of probes sent. + # @!attribute [rw] successful_probe_count + # @return [::Integer] + # Number of probes that reached the destination. + # @!attribute [rw] probing_latency + # @return [::Google::Cloud::NetworkManagement::V1::LatencyDistribution] + # Latency as measured by active probing in one direction: from the source + # to the destination endpoint. + # @!attribute [rw] destination_egress_location + # @return [::Google::Cloud::NetworkManagement::V1::ProbingDetails::EdgeLocation] + # The EdgeLocation from which a packet, destined to the internet, will + # egress the Google network. + # This will only be populated for a connectivity test which has an internet + # destination address. + # The absence of this field *must not* be used as an indication that the + # destination is part of the Google network. + # @!attribute [rw] destination_router + # @return [::String] + # Router name in the format '\\{router}.\\{metroshard}'. For example: + # pf01.aaa01, pr02.aaa01. + class SingleEdgeResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Overall probing result of the test. + module ProbingResult + # No result was specified. + PROBING_RESULT_UNSPECIFIED = 0 + + # At least 95% of packets reached the destination. + REACHABLE = 1 + + # No packets reached the destination. + UNREACHABLE = 2 + + # Less than 95% of packets reached the destination. + REACHABILITY_INCONSISTENT = 3 + + # Reachability could not be determined. Possible reasons are: + # * The user lacks permission to access some of the network resources + # required to run the test. + # * No valid source endpoint could be derived from the request. + # * An internal error occurred. + UNDETERMINED = 4 + end + + # Abort cause types. + module ProbingAbortCause + # No reason was specified. + PROBING_ABORT_CAUSE_UNSPECIFIED = 0 + + # The user lacks permission to access some of the + # network resources required to run the test. + PERMISSION_DENIED = 1 + + # No valid source endpoint could be derived from the request. + NO_SOURCE_LOCATION = 2 + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-network_management-v1/proto_docs/google/cloud/networkmanagement/v1/reachability.rb b/owl-bot-staging/google-cloud-network_management-v1/proto_docs/google/cloud/networkmanagement/v1/reachability.rb new file mode 100644 index 000000000000..a24703a951fc --- /dev/null +++ b/owl-bot-staging/google-cloud-network_management-v1/proto_docs/google/cloud/networkmanagement/v1/reachability.rb @@ -0,0 +1,174 @@ +# 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 NetworkManagement + module V1 + # Request for the `ListConnectivityTests` method. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource of the Connectivity Tests: + # `projects/{project_id}/locations/global` + # @!attribute [rw] page_size + # @return [::Integer] + # Number of `ConnectivityTests` to return. + # @!attribute [rw] page_token + # @return [::String] + # Page token from an earlier query, as returned in `next_page_token`. + # @!attribute [rw] filter + # @return [::String] + # Lists the `ConnectivityTests` that match the filter expression. A filter + # expression filters the resources listed in the response. The expression + # must be of the form ` ` where operators: `<`, `>`, + # `<=`, + # `>=`, + # `!=`, `=`, `:` are supported (colon `:` represents a HAS operator which is + # roughly synonymous with equality). can refer to a proto or JSON + # field, or a synthetic field. Field names can be camelCase or snake_case. + # + # Examples: + # - Filter by name: + # name = "projects/proj-1/locations/global/connectivityTests/test-1 + # + # - Filter by labels: + # - Resources that have a key called `foo` + # labels.foo:* + # - Resources that have a key called `foo` whose value is `bar` + # labels.foo = bar + # @!attribute [rw] order_by + # @return [::String] + # Field to use to sort the list. + class ListConnectivityTestsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response for the `ListConnectivityTests` method. + # @!attribute [rw] resources + # @return [::Array<::Google::Cloud::NetworkManagement::V1::ConnectivityTest>] + # List of Connectivity Tests. + # @!attribute [rw] next_page_token + # @return [::String] + # Page token to fetch the next set of Connectivity Tests. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Locations that could not be reached (when querying all locations with `-`). + class ListConnectivityTestsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for the `GetConnectivityTest` method. + # @!attribute [rw] name + # @return [::String] + # Required. `ConnectivityTest` resource name using the form: + # `projects/{project_id}/locations/global/connectivityTests/{test_id}` + class GetConnectivityTestRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for the `CreateConnectivityTest` method. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource of the Connectivity Test to create: + # `projects/{project_id}/locations/global` + # @!attribute [rw] test_id + # @return [::String] + # Required. The logical name of the Connectivity Test in your project + # with the following restrictions: + # + # * Must contain only lowercase letters, numbers, and hyphens. + # * Must start with a letter. + # * Must be between 1-40 characters. + # * Must end with a number or a letter. + # * Must be unique within the customer project + # @!attribute [rw] resource + # @return [::Google::Cloud::NetworkManagement::V1::ConnectivityTest] + # Required. A `ConnectivityTest` resource + class CreateConnectivityTestRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for the `UpdateConnectivityTest` method. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. Mask of fields to update. At least one path must be supplied in + # this field. + # @!attribute [rw] resource + # @return [::Google::Cloud::NetworkManagement::V1::ConnectivityTest] + # Required. Only fields specified in update_mask are updated. + class UpdateConnectivityTestRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for the `DeleteConnectivityTest` method. + # @!attribute [rw] name + # @return [::String] + # Required. Connectivity Test resource name using the form: + # `projects/{project_id}/locations/global/connectivityTests/{test_id}` + class DeleteConnectivityTestRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for the `RerunConnectivityTest` method. + # @!attribute [rw] name + # @return [::String] + # Required. Connectivity Test resource name using the form: + # `projects/{project_id}/locations/global/connectivityTests/{test_id}` + class RerunConnectivityTestRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Metadata describing an {::Google::Longrunning::Operation Operation} + # @!attribute [rw] create_time + # @return [::Google::Protobuf::Timestamp] + # The time the operation was created. + # @!attribute [rw] end_time + # @return [::Google::Protobuf::Timestamp] + # The time the operation finished running. + # @!attribute [rw] target + # @return [::String] + # Target of the operation - for example + # projects/project-1/locations/global/connectivityTests/test-1 + # @!attribute [rw] verb + # @return [::String] + # Name of the verb executed by the operation. + # @!attribute [rw] status_detail + # @return [::String] + # Human-readable status of the operation, if any. + # @!attribute [rw] cancel_requested + # @return [::Boolean] + # Specifies if cancellation was requested for the operation. + # @!attribute [rw] api_version + # @return [::String] + # API version. + class OperationMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-network_management-v1/proto_docs/google/cloud/networkmanagement/v1/trace.rb b/owl-bot-staging/google-cloud-network_management-v1/proto_docs/google/cloud/networkmanagement/v1/trace.rb new file mode 100644 index 000000000000..3b57f1f7a95c --- /dev/null +++ b/owl-bot-staging/google-cloud-network_management-v1/proto_docs/google/cloud/networkmanagement/v1/trace.rb @@ -0,0 +1,2610 @@ +# 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 NetworkManagement + module V1 + # Trace represents one simulated packet forwarding path. + # + # * Each trace contains multiple ordered steps. + # * Each step is in a particular state with associated configuration. + # * State is categorized as final or non-final states. + # * Each final state has a reason associated. + # * Each trace must end with a final state (the last step). + # ``` + # |---------------------Trace----------------------| + # Step1(State) Step2(State) --- StepN(State(final)) + # ``` + # @!attribute [rw] endpoint_info + # @return [::Google::Cloud::NetworkManagement::V1::EndpointInfo] + # Derived from the source and destination endpoints definition specified by + # user request, and validated by the data plane model. + # If there are multiple traces starting from different source locations, then + # the endpoint_info may be different between traces. + # @!attribute [rw] steps + # @return [::Array<::Google::Cloud::NetworkManagement::V1::Step>] + # A trace of a test contains multiple steps from the initial state to the + # final state (delivered, dropped, forwarded, or aborted). + # + # The steps are ordered by the processing sequence within the simulated + # network state machine. It is critical to preserve the order of the steps + # and avoid reordering or sorting them. + # @!attribute [rw] forward_trace_id + # @return [::Integer] + # ID of trace. For forward traces, this ID is unique for each trace. For + # return traces, it matches ID of associated forward trace. A single forward + # trace can be associated with none, one or more than one return trace. + class Trace + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A simulated forwarding path is composed of multiple steps. + # Each step has a well-defined state and an associated configuration. + # @!attribute [rw] description + # @return [::String] + # A description of the step. Usually this is a summary of the state. + # @!attribute [rw] state + # @return [::Google::Cloud::NetworkManagement::V1::Step::State] + # Each step is in one of the pre-defined states. + # @!attribute [rw] causes_drop + # @return [::Boolean] + # This is a step that leads to the final state Drop. + # @!attribute [rw] project_id + # @return [::String] + # Project ID that contains the configuration this step is validating. + # @!attribute [rw] instance + # @return [::Google::Cloud::NetworkManagement::V1::InstanceInfo] + # Display information of a Compute Engine instance. + # + # Note: The following fields are mutually exclusive: `instance`, `firewall`, `route`, `endpoint`, `google_service`, `forwarding_rule`, `hybrid_subnet`, `vpn_gateway`, `vpn_tunnel`, `interconnect_attachment`, `vpc_connector`, `direct_vpc_egress_connection`, `serverless_external_connection`, `deliver`, `forward`, `abort`, `drop`, `load_balancer`, `network`, `gke_master`, `gke_pod`, `ip_masquerading_skipped`, `gke_network_policy`, `gke_network_policy_skipped`, `cloud_sql_instance`, `redis_instance`, `redis_cluster`, `cloud_function`, `app_engine_version`, `cloud_run_revision`, `nat`, `proxy_connection`, `load_balancer_backend_info`, `storage_bucket`, `serverless_neg`, `ngfw_packet_inspection`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] firewall + # @return [::Google::Cloud::NetworkManagement::V1::FirewallInfo] + # Display information of a Compute Engine firewall rule. + # + # Note: The following fields are mutually exclusive: `firewall`, `instance`, `route`, `endpoint`, `google_service`, `forwarding_rule`, `hybrid_subnet`, `vpn_gateway`, `vpn_tunnel`, `interconnect_attachment`, `vpc_connector`, `direct_vpc_egress_connection`, `serverless_external_connection`, `deliver`, `forward`, `abort`, `drop`, `load_balancer`, `network`, `gke_master`, `gke_pod`, `ip_masquerading_skipped`, `gke_network_policy`, `gke_network_policy_skipped`, `cloud_sql_instance`, `redis_instance`, `redis_cluster`, `cloud_function`, `app_engine_version`, `cloud_run_revision`, `nat`, `proxy_connection`, `load_balancer_backend_info`, `storage_bucket`, `serverless_neg`, `ngfw_packet_inspection`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] route + # @return [::Google::Cloud::NetworkManagement::V1::RouteInfo] + # Display information of a Compute Engine route. + # + # Note: The following fields are mutually exclusive: `route`, `instance`, `firewall`, `endpoint`, `google_service`, `forwarding_rule`, `hybrid_subnet`, `vpn_gateway`, `vpn_tunnel`, `interconnect_attachment`, `vpc_connector`, `direct_vpc_egress_connection`, `serverless_external_connection`, `deliver`, `forward`, `abort`, `drop`, `load_balancer`, `network`, `gke_master`, `gke_pod`, `ip_masquerading_skipped`, `gke_network_policy`, `gke_network_policy_skipped`, `cloud_sql_instance`, `redis_instance`, `redis_cluster`, `cloud_function`, `app_engine_version`, `cloud_run_revision`, `nat`, `proxy_connection`, `load_balancer_backend_info`, `storage_bucket`, `serverless_neg`, `ngfw_packet_inspection`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] endpoint + # @return [::Google::Cloud::NetworkManagement::V1::EndpointInfo] + # Display information of the source and destination under analysis. + # The endpoint information in an intermediate state may differ with the + # initial input, as it might be modified by state like NAT, + # or Connection Proxy. + # + # Note: The following fields are mutually exclusive: `endpoint`, `instance`, `firewall`, `route`, `google_service`, `forwarding_rule`, `hybrid_subnet`, `vpn_gateway`, `vpn_tunnel`, `interconnect_attachment`, `vpc_connector`, `direct_vpc_egress_connection`, `serverless_external_connection`, `deliver`, `forward`, `abort`, `drop`, `load_balancer`, `network`, `gke_master`, `gke_pod`, `ip_masquerading_skipped`, `gke_network_policy`, `gke_network_policy_skipped`, `cloud_sql_instance`, `redis_instance`, `redis_cluster`, `cloud_function`, `app_engine_version`, `cloud_run_revision`, `nat`, `proxy_connection`, `load_balancer_backend_info`, `storage_bucket`, `serverless_neg`, `ngfw_packet_inspection`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] google_service + # @return [::Google::Cloud::NetworkManagement::V1::GoogleServiceInfo] + # Display information of a Google service + # + # Note: The following fields are mutually exclusive: `google_service`, `instance`, `firewall`, `route`, `endpoint`, `forwarding_rule`, `hybrid_subnet`, `vpn_gateway`, `vpn_tunnel`, `interconnect_attachment`, `vpc_connector`, `direct_vpc_egress_connection`, `serverless_external_connection`, `deliver`, `forward`, `abort`, `drop`, `load_balancer`, `network`, `gke_master`, `gke_pod`, `ip_masquerading_skipped`, `gke_network_policy`, `gke_network_policy_skipped`, `cloud_sql_instance`, `redis_instance`, `redis_cluster`, `cloud_function`, `app_engine_version`, `cloud_run_revision`, `nat`, `proxy_connection`, `load_balancer_backend_info`, `storage_bucket`, `serverless_neg`, `ngfw_packet_inspection`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] forwarding_rule + # @return [::Google::Cloud::NetworkManagement::V1::ForwardingRuleInfo] + # Display information of a Compute Engine forwarding rule. + # + # Note: The following fields are mutually exclusive: `forwarding_rule`, `instance`, `firewall`, `route`, `endpoint`, `google_service`, `hybrid_subnet`, `vpn_gateway`, `vpn_tunnel`, `interconnect_attachment`, `vpc_connector`, `direct_vpc_egress_connection`, `serverless_external_connection`, `deliver`, `forward`, `abort`, `drop`, `load_balancer`, `network`, `gke_master`, `gke_pod`, `ip_masquerading_skipped`, `gke_network_policy`, `gke_network_policy_skipped`, `cloud_sql_instance`, `redis_instance`, `redis_cluster`, `cloud_function`, `app_engine_version`, `cloud_run_revision`, `nat`, `proxy_connection`, `load_balancer_backend_info`, `storage_bucket`, `serverless_neg`, `ngfw_packet_inspection`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] hybrid_subnet + # @return [::Google::Cloud::NetworkManagement::V1::HybridSubnetInfo] + # Display information of a hybrid subnet. + # + # Note: The following fields are mutually exclusive: `hybrid_subnet`, `instance`, `firewall`, `route`, `endpoint`, `google_service`, `forwarding_rule`, `vpn_gateway`, `vpn_tunnel`, `interconnect_attachment`, `vpc_connector`, `direct_vpc_egress_connection`, `serverless_external_connection`, `deliver`, `forward`, `abort`, `drop`, `load_balancer`, `network`, `gke_master`, `gke_pod`, `ip_masquerading_skipped`, `gke_network_policy`, `gke_network_policy_skipped`, `cloud_sql_instance`, `redis_instance`, `redis_cluster`, `cloud_function`, `app_engine_version`, `cloud_run_revision`, `nat`, `proxy_connection`, `load_balancer_backend_info`, `storage_bucket`, `serverless_neg`, `ngfw_packet_inspection`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] vpn_gateway + # @return [::Google::Cloud::NetworkManagement::V1::VpnGatewayInfo] + # Display information of a Compute Engine VPN gateway. + # + # Note: The following fields are mutually exclusive: `vpn_gateway`, `instance`, `firewall`, `route`, `endpoint`, `google_service`, `forwarding_rule`, `hybrid_subnet`, `vpn_tunnel`, `interconnect_attachment`, `vpc_connector`, `direct_vpc_egress_connection`, `serverless_external_connection`, `deliver`, `forward`, `abort`, `drop`, `load_balancer`, `network`, `gke_master`, `gke_pod`, `ip_masquerading_skipped`, `gke_network_policy`, `gke_network_policy_skipped`, `cloud_sql_instance`, `redis_instance`, `redis_cluster`, `cloud_function`, `app_engine_version`, `cloud_run_revision`, `nat`, `proxy_connection`, `load_balancer_backend_info`, `storage_bucket`, `serverless_neg`, `ngfw_packet_inspection`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] vpn_tunnel + # @return [::Google::Cloud::NetworkManagement::V1::VpnTunnelInfo] + # Display information of a Compute Engine VPN tunnel. + # + # Note: The following fields are mutually exclusive: `vpn_tunnel`, `instance`, `firewall`, `route`, `endpoint`, `google_service`, `forwarding_rule`, `hybrid_subnet`, `vpn_gateway`, `interconnect_attachment`, `vpc_connector`, `direct_vpc_egress_connection`, `serverless_external_connection`, `deliver`, `forward`, `abort`, `drop`, `load_balancer`, `network`, `gke_master`, `gke_pod`, `ip_masquerading_skipped`, `gke_network_policy`, `gke_network_policy_skipped`, `cloud_sql_instance`, `redis_instance`, `redis_cluster`, `cloud_function`, `app_engine_version`, `cloud_run_revision`, `nat`, `proxy_connection`, `load_balancer_backend_info`, `storage_bucket`, `serverless_neg`, `ngfw_packet_inspection`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] interconnect_attachment + # @return [::Google::Cloud::NetworkManagement::V1::InterconnectAttachmentInfo] + # Display information of an interconnect attachment. + # + # Note: The following fields are mutually exclusive: `interconnect_attachment`, `instance`, `firewall`, `route`, `endpoint`, `google_service`, `forwarding_rule`, `hybrid_subnet`, `vpn_gateway`, `vpn_tunnel`, `vpc_connector`, `direct_vpc_egress_connection`, `serverless_external_connection`, `deliver`, `forward`, `abort`, `drop`, `load_balancer`, `network`, `gke_master`, `gke_pod`, `ip_masquerading_skipped`, `gke_network_policy`, `gke_network_policy_skipped`, `cloud_sql_instance`, `redis_instance`, `redis_cluster`, `cloud_function`, `app_engine_version`, `cloud_run_revision`, `nat`, `proxy_connection`, `load_balancer_backend_info`, `storage_bucket`, `serverless_neg`, `ngfw_packet_inspection`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] vpc_connector + # @return [::Google::Cloud::NetworkManagement::V1::VpcConnectorInfo] + # Display information of a VPC connector. + # + # Note: The following fields are mutually exclusive: `vpc_connector`, `instance`, `firewall`, `route`, `endpoint`, `google_service`, `forwarding_rule`, `hybrid_subnet`, `vpn_gateway`, `vpn_tunnel`, `interconnect_attachment`, `direct_vpc_egress_connection`, `serverless_external_connection`, `deliver`, `forward`, `abort`, `drop`, `load_balancer`, `network`, `gke_master`, `gke_pod`, `ip_masquerading_skipped`, `gke_network_policy`, `gke_network_policy_skipped`, `cloud_sql_instance`, `redis_instance`, `redis_cluster`, `cloud_function`, `app_engine_version`, `cloud_run_revision`, `nat`, `proxy_connection`, `load_balancer_backend_info`, `storage_bucket`, `serverless_neg`, `ngfw_packet_inspection`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] direct_vpc_egress_connection + # @return [::Google::Cloud::NetworkManagement::V1::DirectVpcEgressConnectionInfo] + # Display information of a serverless direct VPC egress connection. + # + # Note: The following fields are mutually exclusive: `direct_vpc_egress_connection`, `instance`, `firewall`, `route`, `endpoint`, `google_service`, `forwarding_rule`, `hybrid_subnet`, `vpn_gateway`, `vpn_tunnel`, `interconnect_attachment`, `vpc_connector`, `serverless_external_connection`, `deliver`, `forward`, `abort`, `drop`, `load_balancer`, `network`, `gke_master`, `gke_pod`, `ip_masquerading_skipped`, `gke_network_policy`, `gke_network_policy_skipped`, `cloud_sql_instance`, `redis_instance`, `redis_cluster`, `cloud_function`, `app_engine_version`, `cloud_run_revision`, `nat`, `proxy_connection`, `load_balancer_backend_info`, `storage_bucket`, `serverless_neg`, `ngfw_packet_inspection`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] serverless_external_connection + # @return [::Google::Cloud::NetworkManagement::V1::ServerlessExternalConnectionInfo] + # Display information of a serverless public (external) connection. + # + # Note: The following fields are mutually exclusive: `serverless_external_connection`, `instance`, `firewall`, `route`, `endpoint`, `google_service`, `forwarding_rule`, `hybrid_subnet`, `vpn_gateway`, `vpn_tunnel`, `interconnect_attachment`, `vpc_connector`, `direct_vpc_egress_connection`, `deliver`, `forward`, `abort`, `drop`, `load_balancer`, `network`, `gke_master`, `gke_pod`, `ip_masquerading_skipped`, `gke_network_policy`, `gke_network_policy_skipped`, `cloud_sql_instance`, `redis_instance`, `redis_cluster`, `cloud_function`, `app_engine_version`, `cloud_run_revision`, `nat`, `proxy_connection`, `load_balancer_backend_info`, `storage_bucket`, `serverless_neg`, `ngfw_packet_inspection`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] deliver + # @return [::Google::Cloud::NetworkManagement::V1::DeliverInfo] + # Display information of the final state "deliver" and reason. + # + # Note: The following fields are mutually exclusive: `deliver`, `instance`, `firewall`, `route`, `endpoint`, `google_service`, `forwarding_rule`, `hybrid_subnet`, `vpn_gateway`, `vpn_tunnel`, `interconnect_attachment`, `vpc_connector`, `direct_vpc_egress_connection`, `serverless_external_connection`, `forward`, `abort`, `drop`, `load_balancer`, `network`, `gke_master`, `gke_pod`, `ip_masquerading_skipped`, `gke_network_policy`, `gke_network_policy_skipped`, `cloud_sql_instance`, `redis_instance`, `redis_cluster`, `cloud_function`, `app_engine_version`, `cloud_run_revision`, `nat`, `proxy_connection`, `load_balancer_backend_info`, `storage_bucket`, `serverless_neg`, `ngfw_packet_inspection`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] forward + # @return [::Google::Cloud::NetworkManagement::V1::ForwardInfo] + # Display information of the final state "forward" and reason. + # + # Note: The following fields are mutually exclusive: `forward`, `instance`, `firewall`, `route`, `endpoint`, `google_service`, `forwarding_rule`, `hybrid_subnet`, `vpn_gateway`, `vpn_tunnel`, `interconnect_attachment`, `vpc_connector`, `direct_vpc_egress_connection`, `serverless_external_connection`, `deliver`, `abort`, `drop`, `load_balancer`, `network`, `gke_master`, `gke_pod`, `ip_masquerading_skipped`, `gke_network_policy`, `gke_network_policy_skipped`, `cloud_sql_instance`, `redis_instance`, `redis_cluster`, `cloud_function`, `app_engine_version`, `cloud_run_revision`, `nat`, `proxy_connection`, `load_balancer_backend_info`, `storage_bucket`, `serverless_neg`, `ngfw_packet_inspection`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] abort + # @return [::Google::Cloud::NetworkManagement::V1::AbortInfo] + # Display information of the final state "abort" and reason. + # + # Note: The following fields are mutually exclusive: `abort`, `instance`, `firewall`, `route`, `endpoint`, `google_service`, `forwarding_rule`, `hybrid_subnet`, `vpn_gateway`, `vpn_tunnel`, `interconnect_attachment`, `vpc_connector`, `direct_vpc_egress_connection`, `serverless_external_connection`, `deliver`, `forward`, `drop`, `load_balancer`, `network`, `gke_master`, `gke_pod`, `ip_masquerading_skipped`, `gke_network_policy`, `gke_network_policy_skipped`, `cloud_sql_instance`, `redis_instance`, `redis_cluster`, `cloud_function`, `app_engine_version`, `cloud_run_revision`, `nat`, `proxy_connection`, `load_balancer_backend_info`, `storage_bucket`, `serverless_neg`, `ngfw_packet_inspection`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] drop + # @return [::Google::Cloud::NetworkManagement::V1::DropInfo] + # Display information of the final state "drop" and reason. + # + # Note: The following fields are mutually exclusive: `drop`, `instance`, `firewall`, `route`, `endpoint`, `google_service`, `forwarding_rule`, `hybrid_subnet`, `vpn_gateway`, `vpn_tunnel`, `interconnect_attachment`, `vpc_connector`, `direct_vpc_egress_connection`, `serverless_external_connection`, `deliver`, `forward`, `abort`, `load_balancer`, `network`, `gke_master`, `gke_pod`, `ip_masquerading_skipped`, `gke_network_policy`, `gke_network_policy_skipped`, `cloud_sql_instance`, `redis_instance`, `redis_cluster`, `cloud_function`, `app_engine_version`, `cloud_run_revision`, `nat`, `proxy_connection`, `load_balancer_backend_info`, `storage_bucket`, `serverless_neg`, `ngfw_packet_inspection`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] load_balancer + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::Google::Cloud::NetworkManagement::V1::LoadBalancerInfo] + # Display information of the load balancers. Deprecated in favor of the + # `load_balancer_backend_info` field, not used in new tests. + # + # Note: The following fields are mutually exclusive: `load_balancer`, `instance`, `firewall`, `route`, `endpoint`, `google_service`, `forwarding_rule`, `hybrid_subnet`, `vpn_gateway`, `vpn_tunnel`, `interconnect_attachment`, `vpc_connector`, `direct_vpc_egress_connection`, `serverless_external_connection`, `deliver`, `forward`, `abort`, `drop`, `network`, `gke_master`, `gke_pod`, `ip_masquerading_skipped`, `gke_network_policy`, `gke_network_policy_skipped`, `cloud_sql_instance`, `redis_instance`, `redis_cluster`, `cloud_function`, `app_engine_version`, `cloud_run_revision`, `nat`, `proxy_connection`, `load_balancer_backend_info`, `storage_bucket`, `serverless_neg`, `ngfw_packet_inspection`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] network + # @return [::Google::Cloud::NetworkManagement::V1::NetworkInfo] + # Display information of a Google Cloud network. + # + # Note: The following fields are mutually exclusive: `network`, `instance`, `firewall`, `route`, `endpoint`, `google_service`, `forwarding_rule`, `hybrid_subnet`, `vpn_gateway`, `vpn_tunnel`, `interconnect_attachment`, `vpc_connector`, `direct_vpc_egress_connection`, `serverless_external_connection`, `deliver`, `forward`, `abort`, `drop`, `load_balancer`, `gke_master`, `gke_pod`, `ip_masquerading_skipped`, `gke_network_policy`, `gke_network_policy_skipped`, `cloud_sql_instance`, `redis_instance`, `redis_cluster`, `cloud_function`, `app_engine_version`, `cloud_run_revision`, `nat`, `proxy_connection`, `load_balancer_backend_info`, `storage_bucket`, `serverless_neg`, `ngfw_packet_inspection`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] gke_master + # @return [::Google::Cloud::NetworkManagement::V1::GKEMasterInfo] + # Display information of a Google Kubernetes Engine cluster master. + # + # Note: The following fields are mutually exclusive: `gke_master`, `instance`, `firewall`, `route`, `endpoint`, `google_service`, `forwarding_rule`, `hybrid_subnet`, `vpn_gateway`, `vpn_tunnel`, `interconnect_attachment`, `vpc_connector`, `direct_vpc_egress_connection`, `serverless_external_connection`, `deliver`, `forward`, `abort`, `drop`, `load_balancer`, `network`, `gke_pod`, `ip_masquerading_skipped`, `gke_network_policy`, `gke_network_policy_skipped`, `cloud_sql_instance`, `redis_instance`, `redis_cluster`, `cloud_function`, `app_engine_version`, `cloud_run_revision`, `nat`, `proxy_connection`, `load_balancer_backend_info`, `storage_bucket`, `serverless_neg`, `ngfw_packet_inspection`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] gke_pod + # @return [::Google::Cloud::NetworkManagement::V1::GkePodInfo] + # Display information of a Google Kubernetes Engine Pod. + # + # Note: The following fields are mutually exclusive: `gke_pod`, `instance`, `firewall`, `route`, `endpoint`, `google_service`, `forwarding_rule`, `hybrid_subnet`, `vpn_gateway`, `vpn_tunnel`, `interconnect_attachment`, `vpc_connector`, `direct_vpc_egress_connection`, `serverless_external_connection`, `deliver`, `forward`, `abort`, `drop`, `load_balancer`, `network`, `gke_master`, `ip_masquerading_skipped`, `gke_network_policy`, `gke_network_policy_skipped`, `cloud_sql_instance`, `redis_instance`, `redis_cluster`, `cloud_function`, `app_engine_version`, `cloud_run_revision`, `nat`, `proxy_connection`, `load_balancer_backend_info`, `storage_bucket`, `serverless_neg`, `ngfw_packet_inspection`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] ip_masquerading_skipped + # @return [::Google::Cloud::NetworkManagement::V1::IpMasqueradingSkippedInfo] + # Display information of the reason why GKE Pod IP masquerading was + # skipped. + # + # Note: The following fields are mutually exclusive: `ip_masquerading_skipped`, `instance`, `firewall`, `route`, `endpoint`, `google_service`, `forwarding_rule`, `hybrid_subnet`, `vpn_gateway`, `vpn_tunnel`, `interconnect_attachment`, `vpc_connector`, `direct_vpc_egress_connection`, `serverless_external_connection`, `deliver`, `forward`, `abort`, `drop`, `load_balancer`, `network`, `gke_master`, `gke_pod`, `gke_network_policy`, `gke_network_policy_skipped`, `cloud_sql_instance`, `redis_instance`, `redis_cluster`, `cloud_function`, `app_engine_version`, `cloud_run_revision`, `nat`, `proxy_connection`, `load_balancer_backend_info`, `storage_bucket`, `serverless_neg`, `ngfw_packet_inspection`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] gke_network_policy + # @return [::Google::Cloud::NetworkManagement::V1::GkeNetworkPolicyInfo] + # Display information of a GKE Network Policy. + # + # Note: The following fields are mutually exclusive: `gke_network_policy`, `instance`, `firewall`, `route`, `endpoint`, `google_service`, `forwarding_rule`, `hybrid_subnet`, `vpn_gateway`, `vpn_tunnel`, `interconnect_attachment`, `vpc_connector`, `direct_vpc_egress_connection`, `serverless_external_connection`, `deliver`, `forward`, `abort`, `drop`, `load_balancer`, `network`, `gke_master`, `gke_pod`, `ip_masquerading_skipped`, `gke_network_policy_skipped`, `cloud_sql_instance`, `redis_instance`, `redis_cluster`, `cloud_function`, `app_engine_version`, `cloud_run_revision`, `nat`, `proxy_connection`, `load_balancer_backend_info`, `storage_bucket`, `serverless_neg`, `ngfw_packet_inspection`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] gke_network_policy_skipped + # @return [::Google::Cloud::NetworkManagement::V1::GkeNetworkPolicySkippedInfo] + # Display information of the reason why GKE Network Policy evaluation was + # skipped. + # + # Note: The following fields are mutually exclusive: `gke_network_policy_skipped`, `instance`, `firewall`, `route`, `endpoint`, `google_service`, `forwarding_rule`, `hybrid_subnet`, `vpn_gateway`, `vpn_tunnel`, `interconnect_attachment`, `vpc_connector`, `direct_vpc_egress_connection`, `serverless_external_connection`, `deliver`, `forward`, `abort`, `drop`, `load_balancer`, `network`, `gke_master`, `gke_pod`, `ip_masquerading_skipped`, `gke_network_policy`, `cloud_sql_instance`, `redis_instance`, `redis_cluster`, `cloud_function`, `app_engine_version`, `cloud_run_revision`, `nat`, `proxy_connection`, `load_balancer_backend_info`, `storage_bucket`, `serverless_neg`, `ngfw_packet_inspection`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] cloud_sql_instance + # @return [::Google::Cloud::NetworkManagement::V1::CloudSQLInstanceInfo] + # Display information of a Cloud SQL instance. + # + # Note: The following fields are mutually exclusive: `cloud_sql_instance`, `instance`, `firewall`, `route`, `endpoint`, `google_service`, `forwarding_rule`, `hybrid_subnet`, `vpn_gateway`, `vpn_tunnel`, `interconnect_attachment`, `vpc_connector`, `direct_vpc_egress_connection`, `serverless_external_connection`, `deliver`, `forward`, `abort`, `drop`, `load_balancer`, `network`, `gke_master`, `gke_pod`, `ip_masquerading_skipped`, `gke_network_policy`, `gke_network_policy_skipped`, `redis_instance`, `redis_cluster`, `cloud_function`, `app_engine_version`, `cloud_run_revision`, `nat`, `proxy_connection`, `load_balancer_backend_info`, `storage_bucket`, `serverless_neg`, `ngfw_packet_inspection`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] redis_instance + # @return [::Google::Cloud::NetworkManagement::V1::RedisInstanceInfo] + # Display information of a Redis Instance. + # + # Note: The following fields are mutually exclusive: `redis_instance`, `instance`, `firewall`, `route`, `endpoint`, `google_service`, `forwarding_rule`, `hybrid_subnet`, `vpn_gateway`, `vpn_tunnel`, `interconnect_attachment`, `vpc_connector`, `direct_vpc_egress_connection`, `serverless_external_connection`, `deliver`, `forward`, `abort`, `drop`, `load_balancer`, `network`, `gke_master`, `gke_pod`, `ip_masquerading_skipped`, `gke_network_policy`, `gke_network_policy_skipped`, `cloud_sql_instance`, `redis_cluster`, `cloud_function`, `app_engine_version`, `cloud_run_revision`, `nat`, `proxy_connection`, `load_balancer_backend_info`, `storage_bucket`, `serverless_neg`, `ngfw_packet_inspection`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] redis_cluster + # @return [::Google::Cloud::NetworkManagement::V1::RedisClusterInfo] + # Display information of a Redis Cluster. + # + # Note: The following fields are mutually exclusive: `redis_cluster`, `instance`, `firewall`, `route`, `endpoint`, `google_service`, `forwarding_rule`, `hybrid_subnet`, `vpn_gateway`, `vpn_tunnel`, `interconnect_attachment`, `vpc_connector`, `direct_vpc_egress_connection`, `serverless_external_connection`, `deliver`, `forward`, `abort`, `drop`, `load_balancer`, `network`, `gke_master`, `gke_pod`, `ip_masquerading_skipped`, `gke_network_policy`, `gke_network_policy_skipped`, `cloud_sql_instance`, `redis_instance`, `cloud_function`, `app_engine_version`, `cloud_run_revision`, `nat`, `proxy_connection`, `load_balancer_backend_info`, `storage_bucket`, `serverless_neg`, `ngfw_packet_inspection`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] cloud_function + # @return [::Google::Cloud::NetworkManagement::V1::CloudFunctionInfo] + # Display information of a Cloud Function. + # + # Note: The following fields are mutually exclusive: `cloud_function`, `instance`, `firewall`, `route`, `endpoint`, `google_service`, `forwarding_rule`, `hybrid_subnet`, `vpn_gateway`, `vpn_tunnel`, `interconnect_attachment`, `vpc_connector`, `direct_vpc_egress_connection`, `serverless_external_connection`, `deliver`, `forward`, `abort`, `drop`, `load_balancer`, `network`, `gke_master`, `gke_pod`, `ip_masquerading_skipped`, `gke_network_policy`, `gke_network_policy_skipped`, `cloud_sql_instance`, `redis_instance`, `redis_cluster`, `app_engine_version`, `cloud_run_revision`, `nat`, `proxy_connection`, `load_balancer_backend_info`, `storage_bucket`, `serverless_neg`, `ngfw_packet_inspection`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] app_engine_version + # @return [::Google::Cloud::NetworkManagement::V1::AppEngineVersionInfo] + # Display information of an App Engine service version. + # + # Note: The following fields are mutually exclusive: `app_engine_version`, `instance`, `firewall`, `route`, `endpoint`, `google_service`, `forwarding_rule`, `hybrid_subnet`, `vpn_gateway`, `vpn_tunnel`, `interconnect_attachment`, `vpc_connector`, `direct_vpc_egress_connection`, `serverless_external_connection`, `deliver`, `forward`, `abort`, `drop`, `load_balancer`, `network`, `gke_master`, `gke_pod`, `ip_masquerading_skipped`, `gke_network_policy`, `gke_network_policy_skipped`, `cloud_sql_instance`, `redis_instance`, `redis_cluster`, `cloud_function`, `cloud_run_revision`, `nat`, `proxy_connection`, `load_balancer_backend_info`, `storage_bucket`, `serverless_neg`, `ngfw_packet_inspection`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] cloud_run_revision + # @return [::Google::Cloud::NetworkManagement::V1::CloudRunRevisionInfo] + # Display information of a Cloud Run revision. + # + # Note: The following fields are mutually exclusive: `cloud_run_revision`, `instance`, `firewall`, `route`, `endpoint`, `google_service`, `forwarding_rule`, `hybrid_subnet`, `vpn_gateway`, `vpn_tunnel`, `interconnect_attachment`, `vpc_connector`, `direct_vpc_egress_connection`, `serverless_external_connection`, `deliver`, `forward`, `abort`, `drop`, `load_balancer`, `network`, `gke_master`, `gke_pod`, `ip_masquerading_skipped`, `gke_network_policy`, `gke_network_policy_skipped`, `cloud_sql_instance`, `redis_instance`, `redis_cluster`, `cloud_function`, `app_engine_version`, `nat`, `proxy_connection`, `load_balancer_backend_info`, `storage_bucket`, `serverless_neg`, `ngfw_packet_inspection`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] nat + # @return [::Google::Cloud::NetworkManagement::V1::NatInfo] + # Display information of a NAT. + # + # Note: The following fields are mutually exclusive: `nat`, `instance`, `firewall`, `route`, `endpoint`, `google_service`, `forwarding_rule`, `hybrid_subnet`, `vpn_gateway`, `vpn_tunnel`, `interconnect_attachment`, `vpc_connector`, `direct_vpc_egress_connection`, `serverless_external_connection`, `deliver`, `forward`, `abort`, `drop`, `load_balancer`, `network`, `gke_master`, `gke_pod`, `ip_masquerading_skipped`, `gke_network_policy`, `gke_network_policy_skipped`, `cloud_sql_instance`, `redis_instance`, `redis_cluster`, `cloud_function`, `app_engine_version`, `cloud_run_revision`, `proxy_connection`, `load_balancer_backend_info`, `storage_bucket`, `serverless_neg`, `ngfw_packet_inspection`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] proxy_connection + # @return [::Google::Cloud::NetworkManagement::V1::ProxyConnectionInfo] + # Display information of a ProxyConnection. + # + # Note: The following fields are mutually exclusive: `proxy_connection`, `instance`, `firewall`, `route`, `endpoint`, `google_service`, `forwarding_rule`, `hybrid_subnet`, `vpn_gateway`, `vpn_tunnel`, `interconnect_attachment`, `vpc_connector`, `direct_vpc_egress_connection`, `serverless_external_connection`, `deliver`, `forward`, `abort`, `drop`, `load_balancer`, `network`, `gke_master`, `gke_pod`, `ip_masquerading_skipped`, `gke_network_policy`, `gke_network_policy_skipped`, `cloud_sql_instance`, `redis_instance`, `redis_cluster`, `cloud_function`, `app_engine_version`, `cloud_run_revision`, `nat`, `load_balancer_backend_info`, `storage_bucket`, `serverless_neg`, `ngfw_packet_inspection`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] load_balancer_backend_info + # @return [::Google::Cloud::NetworkManagement::V1::LoadBalancerBackendInfo] + # Display information of a specific load balancer backend. + # + # Note: The following fields are mutually exclusive: `load_balancer_backend_info`, `instance`, `firewall`, `route`, `endpoint`, `google_service`, `forwarding_rule`, `hybrid_subnet`, `vpn_gateway`, `vpn_tunnel`, `interconnect_attachment`, `vpc_connector`, `direct_vpc_egress_connection`, `serverless_external_connection`, `deliver`, `forward`, `abort`, `drop`, `load_balancer`, `network`, `gke_master`, `gke_pod`, `ip_masquerading_skipped`, `gke_network_policy`, `gke_network_policy_skipped`, `cloud_sql_instance`, `redis_instance`, `redis_cluster`, `cloud_function`, `app_engine_version`, `cloud_run_revision`, `nat`, `proxy_connection`, `storage_bucket`, `serverless_neg`, `ngfw_packet_inspection`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] storage_bucket + # @return [::Google::Cloud::NetworkManagement::V1::StorageBucketInfo] + # Display information of a Storage Bucket. Used only for return traces. + # + # Note: The following fields are mutually exclusive: `storage_bucket`, `instance`, `firewall`, `route`, `endpoint`, `google_service`, `forwarding_rule`, `hybrid_subnet`, `vpn_gateway`, `vpn_tunnel`, `interconnect_attachment`, `vpc_connector`, `direct_vpc_egress_connection`, `serverless_external_connection`, `deliver`, `forward`, `abort`, `drop`, `load_balancer`, `network`, `gke_master`, `gke_pod`, `ip_masquerading_skipped`, `gke_network_policy`, `gke_network_policy_skipped`, `cloud_sql_instance`, `redis_instance`, `redis_cluster`, `cloud_function`, `app_engine_version`, `cloud_run_revision`, `nat`, `proxy_connection`, `load_balancer_backend_info`, `serverless_neg`, `ngfw_packet_inspection`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] serverless_neg + # @return [::Google::Cloud::NetworkManagement::V1::ServerlessNegInfo] + # Display information of a Serverless network endpoint group backend. Used + # only for return traces. + # + # Note: The following fields are mutually exclusive: `serverless_neg`, `instance`, `firewall`, `route`, `endpoint`, `google_service`, `forwarding_rule`, `hybrid_subnet`, `vpn_gateway`, `vpn_tunnel`, `interconnect_attachment`, `vpc_connector`, `direct_vpc_egress_connection`, `serverless_external_connection`, `deliver`, `forward`, `abort`, `drop`, `load_balancer`, `network`, `gke_master`, `gke_pod`, `ip_masquerading_skipped`, `gke_network_policy`, `gke_network_policy_skipped`, `cloud_sql_instance`, `redis_instance`, `redis_cluster`, `cloud_function`, `app_engine_version`, `cloud_run_revision`, `nat`, `proxy_connection`, `load_balancer_backend_info`, `storage_bucket`, `ngfw_packet_inspection`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] ngfw_packet_inspection + # @return [::Google::Cloud::NetworkManagement::V1::NgfwPacketInspectionInfo] + # Display information of a layer 7 packet inspection by the firewall. + # + # Note: The following fields are mutually exclusive: `ngfw_packet_inspection`, `instance`, `firewall`, `route`, `endpoint`, `google_service`, `forwarding_rule`, `hybrid_subnet`, `vpn_gateway`, `vpn_tunnel`, `interconnect_attachment`, `vpc_connector`, `direct_vpc_egress_connection`, `serverless_external_connection`, `deliver`, `forward`, `abort`, `drop`, `load_balancer`, `network`, `gke_master`, `gke_pod`, `ip_masquerading_skipped`, `gke_network_policy`, `gke_network_policy_skipped`, `cloud_sql_instance`, `redis_instance`, `redis_cluster`, `cloud_function`, `app_engine_version`, `cloud_run_revision`, `nat`, `proxy_connection`, `load_balancer_backend_info`, `storage_bucket`, `serverless_neg`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class Step + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Type of states that are defined in the network state machine. + # Each step in the packet trace is in a specific state. + module State + # Unspecified state. + STATE_UNSPECIFIED = 0 + + # Initial state: packet originating from a Compute Engine instance. + # An InstanceInfo is populated with starting instance information. + START_FROM_INSTANCE = 1 + + # Initial state: packet originating from the internet. + # The endpoint information is populated. + START_FROM_INTERNET = 2 + + # Initial state: packet originating from a Google service. + # The google_service information is populated. + START_FROM_GOOGLE_SERVICE = 27 + + # Initial state: packet originating from a VPC or on-premises network + # with internal source IP. + # If the source is a VPC network visible to the user, a NetworkInfo + # is populated with details of the network. + START_FROM_PRIVATE_NETWORK = 3 + + # Initial state: packet originating from a Google Kubernetes Engine cluster + # master. A GKEMasterInfo is populated with starting instance information. + START_FROM_GKE_MASTER = 21 + + # Initial state: packet originating from a Cloud SQL instance. + # A CloudSQLInstanceInfo is populated with starting instance information. + START_FROM_CLOUD_SQL_INSTANCE = 22 + + # Initial state: packet originating from a Google Kubernetes Engine Pod. + # A GkePodInfo is populated with starting Pod information. + START_FROM_GKE_POD = 39 + + # Initial state: packet originating from a Redis instance. + # A RedisInstanceInfo is populated with starting instance information. + START_FROM_REDIS_INSTANCE = 32 + + # Initial state: packet originating from a Redis Cluster. + # A RedisClusterInfo is populated with starting Cluster information. + START_FROM_REDIS_CLUSTER = 33 + + # Initial state: packet originating from a Cloud Function. + # A CloudFunctionInfo is populated with starting function information. + START_FROM_CLOUD_FUNCTION = 23 + + # Initial state: packet originating from an App Engine service version. + # An AppEngineVersionInfo is populated with starting version information. + START_FROM_APP_ENGINE_VERSION = 25 + + # Initial state: packet originating from a Cloud Run revision. + # A CloudRunRevisionInfo is populated with starting revision information. + START_FROM_CLOUD_RUN_REVISION = 26 + + # Initial state: packet originating from a Storage Bucket. Used only for + # return traces. + # The storage_bucket information is populated. + START_FROM_STORAGE_BUCKET = 29 + + # Initial state: packet originating from a published service that uses + # Private Service Connect. Used only for return traces. + START_FROM_PSC_PUBLISHED_SERVICE = 30 + + # Initial state: packet originating from a serverless network endpoint + # group backend. Used only for return traces. + # The serverless_neg information is populated. + START_FROM_SERVERLESS_NEG = 31 + + # Config checking state: verify ingress firewall rule. + APPLY_INGRESS_FIREWALL_RULE = 4 + + # Config checking state: verify egress firewall rule. + APPLY_EGRESS_FIREWALL_RULE = 5 + + # Config checking state: verify route. + APPLY_ROUTE = 6 + + # Config checking state: match forwarding rule. + APPLY_FORWARDING_RULE = 7 + + # Config checking state: verify load balancer backend configuration. + ANALYZE_LOAD_BALANCER_BACKEND = 28 + + # Config checking state: packet sent or received under foreign IP + # address and allowed. + SPOOFING_APPROVED = 8 + + # Forwarding state: arriving at a Compute Engine instance. + ARRIVE_AT_INSTANCE = 9 + + # Forwarding state: arriving at a Compute Engine internal load balancer. + ARRIVE_AT_INTERNAL_LOAD_BALANCER = 10 + + # Forwarding state: arriving at a Compute Engine external load balancer. + ARRIVE_AT_EXTERNAL_LOAD_BALANCER = 11 + + # Forwarding state: arriving at a hybrid subnet. Appropriate routing + # configuration will be determined here. + ARRIVE_AT_HYBRID_SUBNET = 38 + + # Forwarding state: arriving at a Cloud VPN gateway. + ARRIVE_AT_VPN_GATEWAY = 12 + + # Forwarding state: arriving at a Cloud VPN tunnel. + ARRIVE_AT_VPN_TUNNEL = 13 + + # Forwarding state: arriving at an interconnect attachment. + ARRIVE_AT_INTERCONNECT_ATTACHMENT = 37 + + # Forwarding state: arriving at a VPC connector. + ARRIVE_AT_VPC_CONNECTOR = 24 + + # Forwarding state: arriving at a GKE Pod. + ARRIVE_AT_GKE_POD = 44 + + # Forwarding state: for packets originating from a serverless endpoint + # forwarded through Direct VPC egress. + DIRECT_VPC_EGRESS_CONNECTION = 35 + + # Forwarding state: for packets originating from a serverless endpoint + # forwarded through public (external) connectivity. + SERVERLESS_EXTERNAL_CONNECTION = 36 + + # Forwarding state: Layer 7 packet inspection by the firewall endpoint + # based on the configured security profile group. + NGFW_PACKET_INSPECTION = 47 + + # Transition state: packet header translated. The `nat` field is populated + # with the translation information. + NAT = 14 + + # Transition state: GKE Pod IP masquerading is skipped. The + # `ip_masquerading_skipped` field is populated with the reason. + SKIP_GKE_POD_IP_MASQUERADING = 40 + + # Transition state: GKE Ingress Network Policy is skipped. The + # `gke_network_policy_skipped` field is populated with the reason. + SKIP_GKE_INGRESS_NETWORK_POLICY = 41 + + # Transition state: GKE Egress Network Policy is skipped. The + # `gke_network_policy_skipped` field is populated with the reason. + SKIP_GKE_EGRESS_NETWORK_POLICY = 42 + + # Config checking state: verify ingress GKE network policy. + APPLY_INGRESS_GKE_NETWORK_POLICY = 45 + + # Config checking state: verify egress GKE network policy. + APPLY_EGRESS_GKE_NETWORK_POLICY = 46 + + # Transition state: original connection is terminated and a new proxied + # connection is initiated. + PROXY_CONNECTION = 15 + + # Final state: packet could be delivered. + DELIVER = 16 + + # Final state: packet could be dropped. + DROP = 17 + + # Final state: packet could be forwarded to a network with an unknown + # configuration. + FORWARD = 18 + + # Final state: analysis is aborted. + ABORT = 19 + + # Special state: viewer of the test result does not have permission to + # see the configuration in this step. + VIEWER_PERMISSION_MISSING = 20 + end + end + + # For display only. Metadata associated with a Compute Engine instance. + # @!attribute [rw] display_name + # @return [::String] + # Name of a Compute Engine instance. + # @!attribute [rw] uri + # @return [::String] + # URI of a Compute Engine instance. + # @!attribute [rw] interface + # @return [::String] + # Name of the network interface of a Compute Engine instance. + # @!attribute [rw] network_uri + # @return [::String] + # URI of a Compute Engine network. + # @!attribute [rw] internal_ip + # @return [::String] + # Internal IP address of the network interface. + # @!attribute [rw] external_ip + # @return [::String] + # External IP address of the network interface. + # @!attribute [rw] network_tags + # @return [::Array<::String>] + # Network tags configured on the instance. + # @!attribute [rw] service_account + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::String] + # Service account authorized for the instance. + # @!attribute [rw] psc_network_attachment_uri + # @return [::String] + # URI of the PSC network attachment the NIC is attached to (if relevant). + # @!attribute [rw] running + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::Boolean] + # Indicates whether the Compute Engine instance is running. + # Deprecated: use the `status` field instead. + # @!attribute [rw] status + # @return [::Google::Cloud::NetworkManagement::V1::InstanceInfo::Status] + # The status of the instance. + class InstanceInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The status of the instance. We treat all states other than "RUNNING" as + # not running. + module Status + # Default unspecified value. + STATUS_UNSPECIFIED = 0 + + # The instance is running. + RUNNING = 1 + + # The instance has any status other than "RUNNING". + NOT_RUNNING = 2 + end + end + + # For display only. Metadata associated with a Compute Engine network. + # @!attribute [rw] display_name + # @return [::String] + # Name of a Compute Engine network. + # @!attribute [rw] uri + # @return [::String] + # URI of a Compute Engine network. + # @!attribute [rw] matched_subnet_uri + # @return [::String] + # URI of the subnet matching the source IP address of the test. + # @!attribute [rw] matched_ip_range + # @return [::String] + # The IP range of the subnet matching the source IP address of the test. + # @!attribute [rw] region + # @return [::String] + # The region of the subnet matching the source IP address of the test. + class NetworkInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # For display only. Metadata associated with a VPC firewall rule, an implied + # VPC firewall rule, or a firewall policy rule. + # @!attribute [rw] display_name + # @return [::String] + # The display name of the firewall rule. This field might be empty for + # firewall policy rules. + # @!attribute [rw] uri + # @return [::String] + # The URI of the firewall rule. This field is not applicable to implied + # VPC firewall rules. + # @!attribute [rw] direction + # @return [::String] + # Possible values: INGRESS, EGRESS + # @!attribute [rw] action + # @return [::String] + # Possible values: ALLOW, DENY, APPLY_SECURITY_PROFILE_GROUP + # @!attribute [rw] priority + # @return [::Integer] + # The priority of the firewall rule. + # @!attribute [rw] network_uri + # @return [::String] + # The URI of the VPC network that the firewall rule is associated with. + # This field is not applicable to hierarchical firewall policy rules. + # @!attribute [rw] target_tags + # @return [::Array<::String>] + # The target tags defined by the VPC firewall rule. This field is not + # applicable to firewall policy rules. + # @!attribute [rw] target_service_accounts + # @return [::Array<::String>] + # The target service accounts specified by the firewall rule. + # @!attribute [rw] policy + # @return [::String] + # The name of the firewall policy that this rule is associated with. + # This field is not applicable to VPC firewall rules and implied VPC firewall + # rules. + # @!attribute [rw] policy_uri + # @return [::String] + # The URI of the firewall policy that this rule is associated with. + # This field is not applicable to VPC firewall rules and implied VPC firewall + # rules. + # @!attribute [rw] firewall_rule_type + # @return [::Google::Cloud::NetworkManagement::V1::FirewallInfo::FirewallRuleType] + # The firewall rule's type. + # @!attribute [rw] policy_priority + # @return [::Integer] + # The priority of the firewall policy that this rule is associated with. + # This field is not applicable to VPC firewall rules and implied VPC firewall + # rules. + # @!attribute [rw] target_type + # @return [::Google::Cloud::NetworkManagement::V1::FirewallInfo::TargetType] + # Target type of the firewall rule. + class FirewallInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The firewall rule's type. + module FirewallRuleType + # Unspecified type. + FIREWALL_RULE_TYPE_UNSPECIFIED = 0 + + # Hierarchical firewall policy rule. For details, see + # [Hierarchical firewall policies + # overview](https://cloud.google.com/vpc/docs/firewall-policies). + HIERARCHICAL_FIREWALL_POLICY_RULE = 1 + + # VPC firewall rule. For details, see + # [VPC firewall rules + # overview](https://cloud.google.com/vpc/docs/firewalls). + VPC_FIREWALL_RULE = 2 + + # Implied VPC firewall rule. For details, see + # [Implied + # rules](https://cloud.google.com/vpc/docs/firewalls#default_firewall_rules). + IMPLIED_VPC_FIREWALL_RULE = 3 + + # Implicit firewall rules that are managed by serverless VPC access to + # allow ingress access. They are not visible in the Google Cloud console. + # For details, see [VPC connector's implicit + # rules](https://cloud.google.com/functions/docs/networking/connecting-vpc#restrict-access). + SERVERLESS_VPC_ACCESS_MANAGED_FIREWALL_RULE = 4 + + # User-defined global network firewall policy rule. + # For details, see [Network firewall + # policies](https://cloud.google.com/vpc/docs/network-firewall-policies). + NETWORK_FIREWALL_POLICY_RULE = 5 + + # User-defined regional network firewall policy rule. + # For details, see [Regional network firewall + # policies](https://cloud.google.com/firewall/docs/regional-firewall-policies). + NETWORK_REGIONAL_FIREWALL_POLICY_RULE = 6 + + # System-defined global network firewall policy rule. + SYSTEM_NETWORK_FIREWALL_POLICY_RULE = 7 + + # System-defined regional network firewall policy rule. + SYSTEM_REGIONAL_NETWORK_FIREWALL_POLICY_RULE = 8 + + # Firewall policy rule containing attributes not yet supported in + # Connectivity tests. Firewall analysis is skipped if such a rule can + # potentially be matched. Please see the [list of unsupported + # configurations](https://cloud.google.com/network-intelligence-center/docs/connectivity-tests/concepts/overview#unsupported-configs). + UNSUPPORTED_FIREWALL_POLICY_RULE = 100 + + # Tracking state for response traffic created when request traffic goes + # through allow firewall rule. + # For details, see [firewall rules + # specifications](https://cloud.google.com/firewall/docs/firewalls#specifications) + TRACKING_STATE = 101 + + # Firewall analysis was skipped due to executing Connectivity Test in the + # BypassFirewallChecks mode + ANALYSIS_SKIPPED = 102 + end + + # Target type of the firewall rule. + module TargetType + # Target type is not specified. In this case we treat the rule as applying + # to INSTANCES target type. + TARGET_TYPE_UNSPECIFIED = 0 + + # Firewall rule applies to instances. + INSTANCES = 1 + + # Firewall rule applies to internal managed load balancers. + INTERNAL_MANAGED_LB = 2 + end + end + + # For display only. Metadata associated with a Compute Engine route. + # @!attribute [rw] route_type + # @return [::Google::Cloud::NetworkManagement::V1::RouteInfo::RouteType] + # Type of route. + # @!attribute [rw] next_hop_type + # @return [::Google::Cloud::NetworkManagement::V1::RouteInfo::NextHopType] + # Type of next hop. + # @!attribute [rw] route_scope + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::Google::Cloud::NetworkManagement::V1::RouteInfo::RouteScope] + # Indicates where route is applicable. Deprecated, routes with NCC_HUB scope + # are not included in the trace in new tests. + # @!attribute [rw] display_name + # @return [::String] + # Name of a route. + # @!attribute [rw] uri + # @return [::String] + # URI of a route. SUBNET, STATIC, PEERING_SUBNET (only for peering network) + # and POLICY_BASED routes only. + # @!attribute [rw] region + # @return [::String] + # Region of the route. DYNAMIC, PEERING_DYNAMIC, POLICY_BASED and ADVERTISED + # routes only. If set for POLICY_BASED route, this is a region of VLAN + # attachments for Cloud Interconnect the route applies to. + # @!attribute [rw] dest_ip_range + # @return [::String] + # Destination IP range of the route. + # @!attribute [rw] next_hop + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::String] + # String type of the next hop of the route (for example, "VPN tunnel"). + # Deprecated in favor of the next_hop_type and next_hop_uri fields, not used + # in new tests. + # @!attribute [rw] network_uri + # @return [::String] + # URI of a VPC network where route is located. + # @!attribute [rw] priority + # @return [::Integer] + # Priority of the route. + # @!attribute [rw] instance_tags + # @return [::Array<::String>] + # Instance tags of the route. + # @!attribute [rw] src_ip_range + # @return [::String] + # Source IP address range of the route. POLICY_BASED routes only. + # @!attribute [rw] dest_port_ranges + # @return [::Array<::String>] + # Destination port ranges of the route. POLICY_BASED routes only. + # @!attribute [rw] src_port_ranges + # @return [::Array<::String>] + # Source port ranges of the route. POLICY_BASED routes only. + # @!attribute [rw] protocols + # @return [::Array<::String>] + # Protocols of the route. POLICY_BASED routes only. + # @!attribute [rw] ncc_hub_uri + # @return [::String] + # URI of the NCC Hub the route is advertised by. PEERING_SUBNET and + # PEERING_DYNAMIC routes that are advertised by NCC Hub only. + # @!attribute [rw] ncc_spoke_uri + # @return [::String] + # URI of the destination NCC Spoke. PEERING_SUBNET and PEERING_DYNAMIC routes + # that are advertised by NCC Hub only. + # @!attribute [rw] advertised_route_source_router_uri + # @return [::String] + # For ADVERTISED dynamic routes, the URI of the Cloud Router that advertised + # the corresponding IP prefix. + # @!attribute [rw] advertised_route_next_hop_uri + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::String] + # For ADVERTISED routes, the URI of their next hop, i.e. the URI of the + # hybrid endpoint (VPN tunnel, Interconnect attachment, NCC router appliance) + # the advertised prefix is advertised through, or URI of the source peered + # network. Deprecated in favor of the next_hop_uri field, not used in new + # tests. + # @!attribute [rw] next_hop_uri + # @return [::String] + # URI of the next hop resource. + # @!attribute [rw] next_hop_network_uri + # @return [::String] + # URI of a VPC network where the next hop resource is located. + # @!attribute [rw] originating_route_uri + # @return [::String] + # For PEERING_SUBNET and PEERING_STATIC routes, the URI of the originating + # SUBNET/STATIC route. + # @!attribute [rw] originating_route_display_name + # @return [::String] + # For PEERING_SUBNET, PEERING_STATIC and PEERING_DYNAMIC routes, the name of + # the originating SUBNET/STATIC/DYNAMIC route. + # @!attribute [rw] ncc_hub_route_uri + # @return [::String] + # For PEERING_SUBNET and PEERING_DYNAMIC routes that are advertised by NCC + # Hub, the URI of the corresponding route in NCC Hub's routing table. + class RouteInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Type of route: + module RouteType + # Unspecified type. Default value. + ROUTE_TYPE_UNSPECIFIED = 0 + + # Route is a subnet route automatically created by the system. + SUBNET = 1 + + # Static route created by the user, including the default route to the + # internet. + STATIC = 2 + + # Dynamic route exchanged between BGP peers. + DYNAMIC = 3 + + # A subnet route received from peering network or NCC Hub. + PEERING_SUBNET = 4 + + # A static route received from peering network. + PEERING_STATIC = 5 + + # A dynamic route received from peering network or NCC Hub. + PEERING_DYNAMIC = 6 + + # Policy based route. + POLICY_BASED = 7 + + # Advertised route. Synthetic route which is used to transition from the + # StartFromPrivateNetwork state in Connectivity tests. + ADVERTISED = 101 + end + + # Type of next hop: + module NextHopType + # Unspecified type. Default value. + NEXT_HOP_TYPE_UNSPECIFIED = 0 + + # Next hop is an IP address. + NEXT_HOP_IP = 1 + + # Next hop is a Compute Engine instance. + NEXT_HOP_INSTANCE = 2 + + # Next hop is a VPC network gateway. + NEXT_HOP_NETWORK = 3 + + # Next hop is a peering VPC. This scenario only happens when the user + # doesn't have permissions to the project where the next hop resource is + # located. + NEXT_HOP_PEERING = 4 + + # Next hop is an interconnect. + NEXT_HOP_INTERCONNECT = 5 + + # Next hop is a VPN tunnel. + NEXT_HOP_VPN_TUNNEL = 6 + + # Next hop is a VPN gateway. This scenario only happens when tracing + # connectivity from an on-premises network to Google Cloud through a VPN. + # The analysis simulates a packet departing from the on-premises network + # through a VPN tunnel and arriving at a Cloud VPN gateway. + NEXT_HOP_VPN_GATEWAY = 7 + + # Next hop is an internet gateway. + NEXT_HOP_INTERNET_GATEWAY = 8 + + # Next hop is blackhole; that is, the next hop either does not exist or is + # unusable. + NEXT_HOP_BLACKHOLE = 9 + + # Next hop is the forwarding rule of an Internal Load Balancer. + NEXT_HOP_ILB = 10 + + # Next hop is a + # [router appliance + # instance](https://cloud.google.com/network-connectivity/docs/network-connectivity-center/concepts/ra-overview). + NEXT_HOP_ROUTER_APPLIANCE = 11 + + # Next hop is an NCC hub. This scenario only happens when the user doesn't + # have permissions to the project where the next hop resource is located. + NEXT_HOP_NCC_HUB = 12 + + # Next hop is Secure Web Proxy Gateway. + SECURE_WEB_PROXY_GATEWAY = 13 + end + + # Indicates where routes are applicable. + module RouteScope + # Unspecified scope. Default value. + ROUTE_SCOPE_UNSPECIFIED = 0 + + # Route is applicable to packets in Network. + NETWORK = 1 + + # Route is applicable to packets using NCC Hub's routing table. + NCC_HUB = 2 + end + end + + # For display only. Details of a Google Service sending packets to a + # VPC network. Although the source IP might be a publicly routable address, + # some Google Services use special routes within Google production + # infrastructure to reach Compute Engine Instances. + # https://cloud.google.com/vpc/docs/routes#special_return_paths + # @!attribute [rw] source_ip + # @return [::String] + # Source IP address. + # @!attribute [rw] google_service_type + # @return [::Google::Cloud::NetworkManagement::V1::GoogleServiceInfo::GoogleServiceType] + # Recognized type of a Google Service. + class GoogleServiceInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Recognized type of a Google Service. + module GoogleServiceType + # Unspecified Google Service. + GOOGLE_SERVICE_TYPE_UNSPECIFIED = 0 + + # Identity aware proxy. + # https://cloud.google.com/iap/docs/using-tcp-forwarding + IAP = 1 + + # One of two services sharing IP ranges: + # * Load Balancer proxy + # * Centralized Health Check prober + # https://cloud.google.com/load-balancing/docs/firewall-rules + GFE_PROXY_OR_HEALTH_CHECK_PROBER = 2 + + # Connectivity from Cloud DNS to forwarding targets or alternate name + # servers that use private routing. + # https://cloud.google.com/dns/docs/zones/forwarding-zones#firewall-rules + # https://cloud.google.com/dns/docs/policies#firewall-rules + CLOUD_DNS = 3 + + # private.googleapis.com and restricted.googleapis.com + GOOGLE_API = 4 + + # Google API via Private Service Connect. + # https://cloud.google.com/vpc/docs/configure-private-service-connect-apis + GOOGLE_API_PSC = 5 + + # Google API via VPC Service Controls. + # https://cloud.google.com/vpc/docs/configure-private-service-connect-apis + GOOGLE_API_VPC_SC = 6 + + # Google API via Serverless VPC Access. + # https://cloud.google.com/vpc/docs/serverless-vpc-access + SERVERLESS_VPC_ACCESS = 7 + end + end + + # For display only. Metadata associated with a Compute Engine forwarding rule. + # @!attribute [rw] display_name + # @return [::String] + # Name of the forwarding rule. + # @!attribute [rw] uri + # @return [::String] + # URI of the forwarding rule. + # @!attribute [rw] matched_protocol + # @return [::String] + # Protocol defined in the forwarding rule that matches the packet. + # @!attribute [rw] matched_port_range + # @return [::String] + # Port range defined in the forwarding rule that matches the packet. + # @!attribute [rw] vip + # @return [::String] + # VIP of the forwarding rule. + # @!attribute [rw] target + # @return [::String] + # Target type of the forwarding rule. + # @!attribute [rw] network_uri + # @return [::String] + # Network URI. + # @!attribute [rw] region + # @return [::String] + # Region of the forwarding rule. Set only for regional forwarding rules. + # @!attribute [rw] load_balancer_name + # @return [::String] + # Name of the load balancer the forwarding rule belongs to. Empty for + # forwarding rules not related to load balancers (like PSC forwarding rules). + # @!attribute [rw] psc_service_attachment_uri + # @return [::String] + # URI of the PSC service attachment this forwarding rule targets (if + # applicable). + # @!attribute [rw] psc_google_api_target + # @return [::String] + # PSC Google API target this forwarding rule targets (if applicable). + class ForwardingRuleInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # For display only. Metadata associated with a load balancer. + # @!attribute [rw] load_balancer_type + # @return [::Google::Cloud::NetworkManagement::V1::LoadBalancerInfo::LoadBalancerType] + # Type of the load balancer. + # @!attribute [rw] health_check_uri + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::String] + # URI of the health check for the load balancer. Deprecated and no longer + # populated as different load balancer backends might have different health + # checks. + # @!attribute [rw] backends + # @return [::Array<::Google::Cloud::NetworkManagement::V1::LoadBalancerBackend>] + # Information for the loadbalancer backends. + # @!attribute [rw] backend_type + # @return [::Google::Cloud::NetworkManagement::V1::LoadBalancerInfo::BackendType] + # Type of load balancer's backend configuration. + # @!attribute [rw] backend_uri + # @return [::String] + # Backend configuration URI. + class LoadBalancerInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The type definition for a load balancer: + module LoadBalancerType + # Type is unspecified. + LOAD_BALANCER_TYPE_UNSPECIFIED = 0 + + # Internal TCP/UDP load balancer. + INTERNAL_TCP_UDP = 1 + + # Network TCP/UDP load balancer. + NETWORK_TCP_UDP = 2 + + # HTTP(S) proxy load balancer. + HTTP_PROXY = 3 + + # TCP proxy load balancer. + TCP_PROXY = 4 + + # SSL proxy load balancer. + SSL_PROXY = 5 + end + + # The type definition for a load balancer backend configuration: + module BackendType + # Type is unspecified. + BACKEND_TYPE_UNSPECIFIED = 0 + + # Backend Service as the load balancer's backend. + BACKEND_SERVICE = 1 + + # Target Pool as the load balancer's backend. + TARGET_POOL = 2 + + # Target Instance as the load balancer's backend. + TARGET_INSTANCE = 3 + end + end + + # For display only. Metadata associated with a specific load balancer backend. + # @!attribute [rw] display_name + # @return [::String] + # Name of a Compute Engine instance or network endpoint. + # @!attribute [rw] uri + # @return [::String] + # URI of a Compute Engine instance or network endpoint. + # @!attribute [rw] health_check_firewall_state + # @return [::Google::Cloud::NetworkManagement::V1::LoadBalancerBackend::HealthCheckFirewallState] + # State of the health check firewall configuration. + # @!attribute [rw] health_check_allowing_firewall_rules + # @return [::Array<::String>] + # A list of firewall rule URIs allowing probes from health check IP ranges. + # @!attribute [rw] health_check_blocking_firewall_rules + # @return [::Array<::String>] + # A list of firewall rule URIs blocking probes from health check IP ranges. + class LoadBalancerBackend + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # State of a health check firewall configuration: + module HealthCheckFirewallState + # State is unspecified. Default state if not populated. + HEALTH_CHECK_FIREWALL_STATE_UNSPECIFIED = 0 + + # There are configured firewall rules to allow health check probes to the + # backend. + CONFIGURED = 1 + + # There are firewall rules configured to allow partial health check ranges + # or block all health check ranges. + # If a health check probe is sent from denied IP ranges, + # the health check to the backend will fail. Then, the backend will be + # marked unhealthy and will not receive traffic sent to the load balancer. + MISCONFIGURED = 2 + end + end + + # For display only. Metadata associated with a hybrid subnet. + # @!attribute [rw] display_name + # @return [::String] + # Name of a hybrid subnet. + # @!attribute [rw] uri + # @return [::String] + # URI of a hybrid subnet. + # @!attribute [rw] region + # @return [::String] + # Name of a Google Cloud region where the hybrid subnet is configured. + class HybridSubnetInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # For display only. Metadata associated with a Compute Engine VPN gateway. + # @!attribute [rw] display_name + # @return [::String] + # Name of a VPN gateway. + # @!attribute [rw] uri + # @return [::String] + # URI of a VPN gateway. + # @!attribute [rw] network_uri + # @return [::String] + # URI of a Compute Engine network where the VPN gateway is configured. + # @!attribute [rw] ip_address + # @return [::String] + # IP address of the VPN gateway. + # @!attribute [rw] vpn_tunnel_uri + # @return [::String] + # A VPN tunnel that is associated with this VPN gateway. + # There may be multiple VPN tunnels configured on a VPN gateway, and only + # the one relevant to the test is displayed. + # @!attribute [rw] region + # @return [::String] + # Name of a Google Cloud region where this VPN gateway is configured. + class VpnGatewayInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # For display only. Metadata associated with a Compute Engine VPN tunnel. + # @!attribute [rw] display_name + # @return [::String] + # Name of a VPN tunnel. + # @!attribute [rw] uri + # @return [::String] + # URI of a VPN tunnel. + # @!attribute [rw] source_gateway + # @return [::String] + # URI of the VPN gateway at local end of the tunnel. + # @!attribute [rw] remote_gateway + # @return [::String] + # URI of a VPN gateway at remote end of the tunnel. + # @!attribute [rw] remote_gateway_ip + # @return [::String] + # Remote VPN gateway's IP address. + # @!attribute [rw] source_gateway_ip + # @return [::String] + # Local VPN gateway's IP address. + # @!attribute [rw] network_uri + # @return [::String] + # URI of a Compute Engine network where the VPN tunnel is configured. + # @!attribute [rw] region + # @return [::String] + # Name of a Google Cloud region where this VPN tunnel is configured. + # @!attribute [rw] routing_type + # @return [::Google::Cloud::NetworkManagement::V1::VpnTunnelInfo::RoutingType] + # Type of the routing policy. + class VpnTunnelInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Types of VPN routing policy. For details, refer to [Networks and Tunnel + # routing](https://cloud.google.com/network-connectivity/docs/vpn/concepts/choosing-networks-routing/). + module RoutingType + # Unspecified type. Default value. + ROUTING_TYPE_UNSPECIFIED = 0 + + # Route based VPN. + ROUTE_BASED = 1 + + # Policy based routing. + POLICY_BASED = 2 + + # Dynamic (BGP) routing. + DYNAMIC = 3 + end + end + + # For display only. Metadata associated with an Interconnect attachment. + # @!attribute [rw] display_name + # @return [::String] + # Name of an Interconnect attachment. + # @!attribute [rw] uri + # @return [::String] + # URI of an Interconnect attachment. + # @!attribute [rw] interconnect_uri + # @return [::String] + # URI of the Interconnect where the Interconnect attachment is + # configured. + # @!attribute [rw] region + # @return [::String] + # Name of a Google Cloud region where the Interconnect attachment is + # configured. + # @!attribute [rw] cloud_router_uri + # @return [::String] + # URI of the Cloud Router to be used for dynamic routing. + # @!attribute [rw] type + # @return [::Google::Cloud::NetworkManagement::V1::InterconnectAttachmentInfo::Type] + # The type of interconnect attachment this is. + # @!attribute [rw] l2_attachment_matched_ip_address + # @return [::String] + # Appliance IP address that was matched for L2_DEDICATED attachments. + class InterconnectAttachmentInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # What type of interconnect attachment this is. + module Type + # Unspecified type. + TYPE_UNSPECIFIED = 0 + + # Attachment to a dedicated interconnect. + DEDICATED = 1 + + # Attachment to a partner interconnect, created by the customer. + PARTNER = 2 + + # Attachment to a partner interconnect, created by the partner. + PARTNER_PROVIDER = 3 + + # Attachment to a L2 interconnect, created by the customer. + L2_DEDICATED = 4 + end + end + + # For display only. The specification of the endpoints for the test. + # EndpointInfo is derived from source and destination Endpoint and validated + # by the backend data plane model. + # @!attribute [rw] source_ip + # @return [::String] + # Source IP address. + # @!attribute [rw] destination_ip + # @return [::String] + # Destination IP address. + # @!attribute [rw] protocol + # @return [::String] + # IP protocol in string format, for example: "TCP", "UDP", "ICMP". + # @!attribute [rw] source_port + # @return [::Integer] + # Source port. Only valid when protocol is TCP or UDP. + # @!attribute [rw] destination_port + # @return [::Integer] + # Destination port. Only valid when protocol is TCP or UDP. + # @!attribute [rw] source_network_uri + # @return [::String] + # URI of the network where this packet originates from. + # @!attribute [rw] destination_network_uri + # @return [::String] + # URI of the network where this packet is sent to. + # @!attribute [rw] source_agent_uri + # @return [::String] + # URI of the source telemetry agent this packet originates from. + class EndpointInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Details of the final state "deliver" and associated resource. + # @!attribute [rw] target + # @return [::Google::Cloud::NetworkManagement::V1::DeliverInfo::Target] + # Target type where the packet is delivered to. + # @!attribute [rw] resource_uri + # @return [::String] + # URI of the resource that the packet is delivered to. + # @!attribute [rw] ip_address + # @return [::String] + # IP address of the target (if applicable). + # @!attribute [rw] storage_bucket + # @return [::String] + # Name of the Cloud Storage Bucket the packet is delivered to (if + # applicable). + # @!attribute [rw] psc_google_api_target + # @return [::String] + # PSC Google API target the packet is delivered to (if applicable). + # @!attribute [rw] google_service_type + # @return [::Google::Cloud::NetworkManagement::V1::DeliverInfo::GoogleServiceType] + # Recognized type of a Google Service the packet is delivered to (if + # applicable). + class DeliverInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Deliver target types: + module Target + # Target not specified. + TARGET_UNSPECIFIED = 0 + + # Target is a Compute Engine instance. + INSTANCE = 1 + + # Target is the internet. + INTERNET = 2 + + # Target is a Google API. + GOOGLE_API = 3 + + # Target is a Google Kubernetes Engine cluster master. + GKE_MASTER = 4 + + # Target is a Cloud SQL instance. + CLOUD_SQL_INSTANCE = 5 + + # Target is a published service that uses [Private Service + # Connect](https://cloud.google.com/vpc/docs/configure-private-service-connect-services). + PSC_PUBLISHED_SERVICE = 6 + + # Target is Google APIs that use [Private Service + # Connect](https://cloud.google.com/vpc/docs/configure-private-service-connect-apis). + PSC_GOOGLE_API = 7 + + # Target is a VPC-SC that uses [Private Service + # Connect](https://cloud.google.com/vpc/docs/configure-private-service-connect-apis). + PSC_VPC_SC = 8 + + # Target is a serverless network endpoint group. + SERVERLESS_NEG = 9 + + # Target is a Cloud Storage bucket. + STORAGE_BUCKET = 10 + + # Target is a private network. Used only for return traces. + PRIVATE_NETWORK = 11 + + # Target is a Cloud Function. Used only for return traces. + CLOUD_FUNCTION = 12 + + # Target is a App Engine service version. Used only for return traces. + APP_ENGINE_VERSION = 13 + + # Target is a Cloud Run revision. Used only for return traces. + CLOUD_RUN_REVISION = 14 + + # Target is a Google-managed service. Used only for return traces. + GOOGLE_MANAGED_SERVICE = 15 + + # Target is a Redis Instance. + REDIS_INSTANCE = 16 + + # Target is a Redis Cluster. + REDIS_CLUSTER = 17 + + # Target is a GKE Pod. + GKE_POD = 19 + end + + # Recognized type of a Google Service. + module GoogleServiceType + # Unspecified Google Service. + GOOGLE_SERVICE_TYPE_UNSPECIFIED = 0 + + # Identity aware proxy. + # https://cloud.google.com/iap/docs/using-tcp-forwarding + IAP = 1 + + # One of two services sharing IP ranges: + # * Load Balancer proxy + # * Centralized Health Check prober + # https://cloud.google.com/load-balancing/docs/firewall-rules + GFE_PROXY_OR_HEALTH_CHECK_PROBER = 2 + + # Connectivity from Cloud DNS to forwarding targets or alternate name + # servers that use private routing. + # https://cloud.google.com/dns/docs/zones/forwarding-zones#firewall-rules + # https://cloud.google.com/dns/docs/policies#firewall-rules + CLOUD_DNS = 3 + + # private.googleapis.com and restricted.googleapis.com + PRIVATE_GOOGLE_ACCESS = 4 + + # Google API via Private Service Connect. + # https://cloud.google.com/vpc/docs/configure-private-service-connect-apis + # Google API via Serverless VPC Access. + # https://cloud.google.com/vpc/docs/serverless-vpc-access + SERVERLESS_VPC_ACCESS = 5 + end + end + + # Details of the final state "forward" and associated resource. + # @!attribute [rw] target + # @return [::Google::Cloud::NetworkManagement::V1::ForwardInfo::Target] + # Target type where this packet is forwarded to. + # @!attribute [rw] resource_uri + # @return [::String] + # URI of the resource that the packet is forwarded to. + # @!attribute [rw] ip_address + # @return [::String] + # IP address of the target (if applicable). + class ForwardInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Forward target types. + module Target + # Target not specified. + TARGET_UNSPECIFIED = 0 + + # Forwarded to a VPC peering network. + PEERING_VPC = 1 + + # Forwarded to a Cloud VPN gateway. + VPN_GATEWAY = 2 + + # Forwarded to a Cloud Interconnect connection. + INTERCONNECT = 3 + + # Forwarded to a Google Kubernetes Engine Container cluster master. + GKE_MASTER = 4 + + # Forwarded to the next hop of a custom route imported from a peering VPC. + IMPORTED_CUSTOM_ROUTE_NEXT_HOP = 5 + + # Forwarded to a Cloud SQL instance. + CLOUD_SQL_INSTANCE = 6 + + # Forwarded to a VPC network in another project. + ANOTHER_PROJECT = 7 + + # Forwarded to an NCC Hub. + NCC_HUB = 8 + + # Forwarded to a router appliance. + ROUTER_APPLIANCE = 9 + + # Forwarded to a Secure Web Proxy Gateway. + SECURE_WEB_PROXY_GATEWAY = 10 + end + end + + # Details of the final state "abort" and associated resource. + # @!attribute [rw] cause + # @return [::Google::Cloud::NetworkManagement::V1::AbortInfo::Cause] + # Causes that the analysis is aborted. + # @!attribute [rw] resource_uri + # @return [::String] + # URI of the resource that caused the abort. + # @!attribute [rw] ip_address + # @return [::String] + # IP address that caused the abort. + # @!attribute [rw] projects_missing_permission + # @return [::Array<::String>] + # List of project IDs the user specified in the request but lacks access to. + # In this case, analysis is aborted with the PERMISSION_DENIED cause. + class AbortInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Abort cause types: + module Cause + # Cause is unspecified. + CAUSE_UNSPECIFIED = 0 + + # Aborted due to unknown network. Deprecated, not used in the new tests. + UNKNOWN_NETWORK = 1 + + # Aborted because no project information can be derived from the test + # input. Deprecated, not used in the new tests. + UNKNOWN_PROJECT = 3 + + # Aborted because traffic is sent from a public IP to an instance without + # an external IP. Deprecated, not used in the new tests. + NO_EXTERNAL_IP = 7 + + # Aborted because none of the traces matches destination information + # specified in the input test request. Deprecated, not used in the new + # tests. + UNINTENDED_DESTINATION = 8 + + # Aborted because the source endpoint could not be found. Deprecated, not + # used in the new tests. + SOURCE_ENDPOINT_NOT_FOUND = 11 + + # Aborted because the source network does not match the source endpoint. + # Deprecated, not used in the new tests. + MISMATCHED_SOURCE_NETWORK = 12 + + # Aborted because the destination endpoint could not be found. Deprecated, + # not used in the new tests. + DESTINATION_ENDPOINT_NOT_FOUND = 13 + + # Aborted because the destination network does not match the destination + # endpoint. Deprecated, not used in the new tests. + MISMATCHED_DESTINATION_NETWORK = 14 + + # Aborted because no endpoint with the packet's destination IP address is + # found. + UNKNOWN_IP = 2 + + # Aborted because no endpoint with the packet's destination IP is found in + # the Google-managed project. + GOOGLE_MANAGED_SERVICE_UNKNOWN_IP = 32 + + # Aborted because the source IP address doesn't belong to any of the + # subnets of the source VPC network. + SOURCE_IP_ADDRESS_NOT_IN_SOURCE_NETWORK = 23 + + # Aborted because user lacks permission to access all or part of the + # network configurations required to run the test. + PERMISSION_DENIED = 4 + + # Aborted because user lacks permission to access Cloud NAT configs + # required to run the test. + PERMISSION_DENIED_NO_CLOUD_NAT_CONFIGS = 28 + + # Aborted because user lacks permission to access Network endpoint group + # endpoint configs required to run the test. + PERMISSION_DENIED_NO_NEG_ENDPOINT_CONFIGS = 29 + + # Aborted because user lacks permission to access Cloud Router configs + # required to run the test. + PERMISSION_DENIED_NO_CLOUD_ROUTER_CONFIGS = 36 + + # Aborted because no valid source or destination endpoint can be derived + # from the test request. + NO_SOURCE_LOCATION = 5 + + # Aborted because the source IP address is not contained within the subnet + # ranges of the provided VPC network. + NO_SOURCE_GCP_NETWORK_LOCATION = 42 + + # Aborted because the source IP address is not contained within the + # destination ranges of the routes towards non-GCP networks in the provided + # VPC network. + NO_SOURCE_NON_GCP_NETWORK_LOCATION = 43 + + # Aborted because the source IP address can't be resolved as an Internet + # IP address. + NO_SOURCE_INTERNET_LOCATION = 44 + + # Aborted because the source or destination endpoint specified in + # the request is invalid. Some examples: + # - The request might contain malformed resource URI, project ID, or IP + # address. + # - The request might contain inconsistent information (for example, the + # request might include both the instance and the network, but the instance + # might not have a NIC in that network). + INVALID_ARGUMENT = 6 + + # Aborted because the number of steps in the trace exceeds a certain + # limit. It might be caused by a routing loop. + TRACE_TOO_LONG = 9 + + # Aborted due to internal server error. + INTERNAL_ERROR = 10 + + # Aborted because the test scenario is not supported. + UNSUPPORTED = 15 + + # Aborted because the source and destination resources have no common IP + # version. + MISMATCHED_IP_VERSION = 16 + + # Aborted because the connection between the control plane and the node of + # the source cluster is initiated by the node and managed by the + # Konnectivity proxy. + GKE_KONNECTIVITY_PROXY_UNSUPPORTED = 17 + + # Aborted because expected resource configuration was missing. + RESOURCE_CONFIG_NOT_FOUND = 18 + + # Aborted because expected VM instance configuration was missing. + VM_INSTANCE_CONFIG_NOT_FOUND = 24 + + # Aborted because expected network configuration was missing. + NETWORK_CONFIG_NOT_FOUND = 25 + + # Aborted because expected firewall configuration was missing. + FIREWALL_CONFIG_NOT_FOUND = 26 + + # Aborted because expected route configuration was missing. + ROUTE_CONFIG_NOT_FOUND = 27 + + # Aborted because PSC endpoint selection for the Google-managed service + # is ambiguous (several PSC endpoints satisfy test input). + GOOGLE_MANAGED_SERVICE_AMBIGUOUS_PSC_ENDPOINT = 19 + + # Aborted because endpoint selection for the Google-managed service is + # ambiguous (several endpoints satisfy test input). + GOOGLE_MANAGED_SERVICE_AMBIGUOUS_ENDPOINT = 39 + + # Aborted because tests with a PSC-based Cloud SQL instance as a source are + # not supported. + SOURCE_PSC_CLOUD_SQL_UNSUPPORTED = 20 + + # Aborted because tests with the external database as a source are not + # supported. In such replication scenarios, the connection is initiated by + # the Cloud SQL replica instance. + SOURCE_EXTERNAL_CLOUD_SQL_UNSUPPORTED = 45 + + # Aborted because tests with a Redis Cluster as a source are not supported. + SOURCE_REDIS_CLUSTER_UNSUPPORTED = 34 + + # Aborted because tests with a Redis Instance as a source are not + # supported. + SOURCE_REDIS_INSTANCE_UNSUPPORTED = 35 + + # Aborted because tests with a forwarding rule as a source are not + # supported. + SOURCE_FORWARDING_RULE_UNSUPPORTED = 21 + + # Aborted because one of the endpoints is a non-routable IP address + # (loopback, link-local, etc). + NON_ROUTABLE_IP_ADDRESS = 22 + + # Aborted due to an unknown issue in the Google-managed project. + UNKNOWN_ISSUE_IN_GOOGLE_MANAGED_PROJECT = 30 + + # Aborted due to an unsupported configuration of the Google-managed + # project. + UNSUPPORTED_GOOGLE_MANAGED_PROJECT_CONFIG = 31 + + # Aborted because the source endpoint is a Cloud Run revision with direct + # VPC access enabled, but there are no reserved serverless IP ranges. + NO_SERVERLESS_IP_RANGES = 37 + + # Aborted because the used protocol is not supported for the used IP + # version. + IP_VERSION_PROTOCOL_MISMATCH = 40 + + # Aborted because selected GKE Pod endpoint location is unknown. This is + # often the case for "Pending" Pods, which don't have assigned IP addresses + # yet. + GKE_POD_UNKNOWN_ENDPOINT_LOCATION = 41 + end + end + + # Details of the final state "drop" and associated resource. + # @!attribute [rw] cause + # @return [::Google::Cloud::NetworkManagement::V1::DropInfo::Cause] + # Cause that the packet is dropped. + # @!attribute [rw] resource_uri + # @return [::String] + # URI of the resource that caused the drop. + # @!attribute [rw] source_ip + # @return [::String] + # Source IP address of the dropped packet (if relevant). + # @!attribute [rw] destination_ip + # @return [::String] + # Destination IP address of the dropped packet (if relevant). + # @!attribute [rw] region + # @return [::String] + # Region of the dropped packet (if relevant). + # @!attribute [rw] source_geolocation_code + # @return [::String] + # Geolocation (region code) of the source IP address (if relevant). + # @!attribute [rw] destination_geolocation_code + # @return [::String] + # Geolocation (region code) of the destination IP address (if relevant). + class DropInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Drop cause types: + module Cause + # Cause is unspecified. + CAUSE_UNSPECIFIED = 0 + + # Destination external address cannot be resolved to a known target. If + # the address is used in a Google Cloud project, provide the project ID + # as test input. + UNKNOWN_EXTERNAL_ADDRESS = 1 + + # A Compute Engine instance can only send or receive a packet with a + # foreign IP address if ip_forward is enabled. + FOREIGN_IP_DISALLOWED = 2 + + # Dropped due to a firewall rule, unless allowed due to connection + # tracking. + FIREWALL_RULE = 3 + + # Dropped due to no matching routes. + NO_ROUTE = 4 + + # Dropped due to invalid route. Route's next hop is a blackhole. + ROUTE_BLACKHOLE = 5 + + # Packet is sent to a wrong (unintended) network. Example: you trace a + # packet from VM1:Network1 to VM2:Network2, however, the route configured + # in Network1 sends the packet destined for VM2's IP address to Network3. + ROUTE_WRONG_NETWORK = 6 + + # Route's next hop IP address cannot be resolved to a GCP resource. + ROUTE_NEXT_HOP_IP_ADDRESS_NOT_RESOLVED = 42 + + # Route's next hop resource is not found. + ROUTE_NEXT_HOP_RESOURCE_NOT_FOUND = 43 + + # Route's next hop instance doesn't have a NIC in the route's network. + ROUTE_NEXT_HOP_INSTANCE_WRONG_NETWORK = 49 + + # Route's next hop IP address is not a primary IP address of the next hop + # instance. + ROUTE_NEXT_HOP_INSTANCE_NON_PRIMARY_IP = 50 + + # Route's next hop forwarding rule doesn't match next hop IP address. + ROUTE_NEXT_HOP_FORWARDING_RULE_IP_MISMATCH = 51 + + # Route's next hop VPN tunnel is down (does not have valid IKE SAs). + ROUTE_NEXT_HOP_VPN_TUNNEL_NOT_ESTABLISHED = 52 + + # Route's next hop forwarding rule type is invalid (it's not a forwarding + # rule of the internal passthrough load balancer). + ROUTE_NEXT_HOP_FORWARDING_RULE_TYPE_INVALID = 53 + + # Packet is sent from the Internet to the private IPv6 address. + NO_ROUTE_FROM_INTERNET_TO_PRIVATE_IPV6_ADDRESS = 44 + + # Packet is sent from the Internet to the private IPv4 address. + NO_ROUTE_FROM_INTERNET_TO_PRIVATE_IPV4_ADDRESS = 109 + + # Packet is sent from the external IPv6 source address of an instance to + # the private IPv6 address of an instance. + NO_ROUTE_FROM_EXTERNAL_IPV6_SOURCE_TO_PRIVATE_IPV6_ADDRESS = 98 + + # The packet does not match a policy-based VPN tunnel local selector. + VPN_TUNNEL_LOCAL_SELECTOR_MISMATCH = 45 + + # The packet does not match a policy-based VPN tunnel remote selector. + VPN_TUNNEL_REMOTE_SELECTOR_MISMATCH = 46 + + # Packet with internal destination address sent to the internet gateway. + PRIVATE_TRAFFIC_TO_INTERNET = 7 + + # Endpoint with only an internal IP address tries to access Google API and + # services, but Private Google Access is not enabled in the subnet or is + # not applicable. + PRIVATE_GOOGLE_ACCESS_DISALLOWED = 8 + + # Source endpoint tries to access Google API and services through the VPN + # tunnel to another network, but Private Google Access needs to be enabled + # in the source endpoint network. + PRIVATE_GOOGLE_ACCESS_VIA_VPN_TUNNEL_UNSUPPORTED = 47 + + # Endpoint with only an internal IP address tries to access external hosts, + # but there is no matching Cloud NAT gateway in the subnet. + NO_EXTERNAL_ADDRESS = 9 + + # Destination internal address cannot be resolved to a known target. If + # this is a shared VPC scenario, verify if the service project ID is + # provided as test input. Otherwise, verify if the IP address is being + # used in the project. + UNKNOWN_INTERNAL_ADDRESS = 10 + + # Forwarding rule's protocol and ports do not match the packet header. + FORWARDING_RULE_MISMATCH = 11 + + # Forwarding rule does not have backends configured. + FORWARDING_RULE_NO_INSTANCES = 12 + + # Firewalls block the health check probes to the backends and cause + # the backends to be unavailable for traffic from the load balancer. + # For more details, see [Health check firewall + # rules](https://cloud.google.com/load-balancing/docs/health-checks#firewall_rules). + FIREWALL_BLOCKING_LOAD_BALANCER_BACKEND_HEALTH_CHECK = 13 + + # Matching ingress firewall rules by network tags for packets sent via + # serverless VPC direct egress is unsupported. Behavior is undefined. + # https://cloud.google.com/run/docs/configuring/vpc-direct-vpc#limitations + INGRESS_FIREWALL_TAGS_UNSUPPORTED_BY_DIRECT_VPC_EGRESS = 85 + + # Packet is sent from or to a Compute Engine instance that is not in a + # running state. + INSTANCE_NOT_RUNNING = 14 + + # Packet sent from or to a GKE cluster that is not in running state. + GKE_CLUSTER_NOT_RUNNING = 27 + + # Packet sent from or to a GKE Pod that is not in running state. + GKE_POD_NOT_RUNNING = 103 + + # Packet sent from or to a Cloud SQL instance that is not in running state. + CLOUD_SQL_INSTANCE_NOT_RUNNING = 28 + + # Packet sent from or to a Redis Instance that is not in running state. + REDIS_INSTANCE_NOT_RUNNING = 68 + + # Packet sent from or to a Redis Cluster that is not in running state. + REDIS_CLUSTER_NOT_RUNNING = 69 + + # The type of traffic is blocked and the user cannot configure a firewall + # rule to enable it. See [Always blocked + # traffic](https://cloud.google.com/vpc/docs/firewalls#blockedtraffic) for + # more details. + TRAFFIC_TYPE_BLOCKED = 15 + + # Access to Google Kubernetes Engine cluster master's endpoint is not + # authorized. See [Access to the cluster + # endpoints](https://cloud.google.com/kubernetes-engine/docs/how-to/private-clusters#access_to_the_cluster_endpoints) + # for more details. + GKE_MASTER_UNAUTHORIZED_ACCESS = 16 + + # Access to the Cloud SQL instance endpoint is not authorized. + # See [Authorizing with authorized + # networks](https://cloud.google.com/sql/docs/mysql/authorize-networks) for + # more details. + CLOUD_SQL_INSTANCE_UNAUTHORIZED_ACCESS = 17 + + # Packet was dropped inside Google Kubernetes Engine Service. + DROPPED_INSIDE_GKE_SERVICE = 18 + + # Packet was dropped inside Cloud SQL Service. + DROPPED_INSIDE_CLOUD_SQL_SERVICE = 19 + + # Packet was dropped because there is no peering between the originating + # network and the Google Managed Services Network. + GOOGLE_MANAGED_SERVICE_NO_PEERING = 20 + + # Packet was dropped because the Google-managed service uses Private + # Service Connect (PSC), but the PSC endpoint is not found in the project. + GOOGLE_MANAGED_SERVICE_NO_PSC_ENDPOINT = 38 + + # Packet was dropped because the GKE cluster uses Private Service Connect + # (PSC), but the PSC endpoint is not found in the project. + GKE_PSC_ENDPOINT_MISSING = 36 + + # Packet was dropped because the Cloud SQL instance has neither a private + # nor a public IP address. + CLOUD_SQL_INSTANCE_NO_IP_ADDRESS = 21 + + # Packet was dropped because a GKE cluster private endpoint is + # unreachable from a region different from the cluster's region. + GKE_CONTROL_PLANE_REGION_MISMATCH = 30 + + # Packet sent from a public GKE cluster control plane to a private + # IP address. + PUBLIC_GKE_CONTROL_PLANE_TO_PRIVATE_DESTINATION = 31 + + # Packet was dropped because there is no route from a GKE cluster + # control plane to a destination network. + GKE_CONTROL_PLANE_NO_ROUTE = 32 + + # Packet sent from a Cloud SQL instance to an external IP address is not + # allowed. The Cloud SQL instance is not configured to send packets to + # external IP addresses. + CLOUD_SQL_INSTANCE_NOT_CONFIGURED_FOR_EXTERNAL_TRAFFIC = 33 + + # Packet sent from a Cloud SQL instance with only a public IP address to a + # private IP address. + PUBLIC_CLOUD_SQL_INSTANCE_TO_PRIVATE_DESTINATION = 34 + + # Packet was dropped because there is no route from a Cloud SQL + # instance to a destination network. + CLOUD_SQL_INSTANCE_NO_ROUTE = 35 + + # Packet was dropped because the Cloud SQL instance requires all + # connections to use Cloud SQL connectors and to target the Cloud SQL proxy + # port (3307). + CLOUD_SQL_CONNECTOR_REQUIRED = 63 + + # Packet could be dropped because the Cloud Function is not in an active + # status. + CLOUD_FUNCTION_NOT_ACTIVE = 22 + + # Packet could be dropped because no VPC connector is set. + VPC_CONNECTOR_NOT_SET = 23 + + # Packet could be dropped because the VPC connector is not in a running + # state. + VPC_CONNECTOR_NOT_RUNNING = 24 + + # Packet could be dropped because the traffic from the serverless service + # to the VPC connector is not allowed. + VPC_CONNECTOR_SERVERLESS_TRAFFIC_BLOCKED = 60 + + # Packet could be dropped because the health check traffic to the VPC + # connector is not allowed. + VPC_CONNECTOR_HEALTH_CHECK_TRAFFIC_BLOCKED = 61 + + # Packet could be dropped because it was sent from a different region + # to a regional forwarding without global access. + FORWARDING_RULE_REGION_MISMATCH = 25 + + # The Private Service Connect endpoint is in a project that is not approved + # to connect to the service. + PSC_CONNECTION_NOT_ACCEPTED = 26 + + # The packet is sent to the Private Service Connect endpoint over the + # peering, but [it's not + # supported](https://cloud.google.com/vpc/docs/configure-private-service-connect-services#on-premises). + PSC_ENDPOINT_ACCESSED_FROM_PEERED_NETWORK = 41 + + # The packet is sent to the Private Service Connect backend (network + # endpoint group), but the producer PSC forwarding rule does not have + # global access enabled. + PSC_NEG_PRODUCER_ENDPOINT_NO_GLOBAL_ACCESS = 48 + + # The packet is sent to the Private Service Connect backend (network + # endpoint group), but the producer PSC forwarding rule has multiple ports + # specified. + PSC_NEG_PRODUCER_FORWARDING_RULE_MULTIPLE_PORTS = 54 + + # The packet is sent to the Private Service Connect backend (network + # endpoint group) targeting a Cloud SQL service attachment, but this + # configuration is not supported. + CLOUD_SQL_PSC_NEG_UNSUPPORTED = 58 + + # No NAT subnets are defined for the PSC service attachment. + NO_NAT_SUBNETS_FOR_PSC_SERVICE_ATTACHMENT = 57 + + # PSC endpoint is accessed via NCC, but PSC transitivity configuration is + # not yet propagated. + PSC_TRANSITIVITY_NOT_PROPAGATED = 64 + + # The packet sent from the hybrid NEG proxy matches a non-dynamic route, + # but such a configuration is not supported. + HYBRID_NEG_NON_DYNAMIC_ROUTE_MATCHED = 55 + + # The packet sent from the hybrid NEG proxy matches a dynamic route with a + # next hop in a different region, but such a configuration is not + # supported. + HYBRID_NEG_NON_LOCAL_DYNAMIC_ROUTE_MATCHED = 56 + + # Packet sent from a Cloud Run revision that is not ready. + CLOUD_RUN_REVISION_NOT_READY = 29 + + # Packet was dropped inside Private Service Connect service producer. + DROPPED_INSIDE_PSC_SERVICE_PRODUCER = 37 + + # Packet sent to a load balancer, which requires a proxy-only subnet and + # the subnet is not found. + LOAD_BALANCER_HAS_NO_PROXY_SUBNET = 39 + + # Packet sent to Cloud Nat without active NAT IPs. + CLOUD_NAT_NO_ADDRESSES = 40 + + # Packet is stuck in a routing loop. + ROUTING_LOOP = 59 + + # Packet is dropped inside a Google-managed service due to being delivered + # in return trace to an endpoint that doesn't match the endpoint the packet + # was sent from in forward trace. Used only for return traces. + DROPPED_INSIDE_GOOGLE_MANAGED_SERVICE = 62 + + # Packet is dropped due to a load balancer backend instance not having a + # network interface in the network expected by the load balancer. + LOAD_BALANCER_BACKEND_INVALID_NETWORK = 65 + + # Packet is dropped due to a backend service named port not being defined + # on the instance group level. + BACKEND_SERVICE_NAMED_PORT_NOT_DEFINED = 66 + + # Packet is dropped due to a destination IP range being part of a Private + # NAT IP range. + DESTINATION_IS_PRIVATE_NAT_IP_RANGE = 67 + + # Generic drop cause for a packet being dropped inside a Redis Instance + # service project. + DROPPED_INSIDE_REDIS_INSTANCE_SERVICE = 70 + + # Packet is dropped due to an unsupported port being used to connect to a + # Redis Instance. Port 6379 should be used to connect to a Redis Instance. + REDIS_INSTANCE_UNSUPPORTED_PORT = 71 + + # Packet is dropped due to connecting from PUPI address to a PSA based + # Redis Instance. + REDIS_INSTANCE_CONNECTING_FROM_PUPI_ADDRESS = 72 + + # Packet is dropped due to no route to the destination network. + REDIS_INSTANCE_NO_ROUTE_TO_DESTINATION_NETWORK = 73 + + # Redis Instance does not have an external IP address. + REDIS_INSTANCE_NO_EXTERNAL_IP = 74 + + # Packet is dropped due to an unsupported protocol being used to connect to + # a Redis Instance. Only TCP connections are accepted by a Redis Instance. + REDIS_INSTANCE_UNSUPPORTED_PROTOCOL = 78 + + # Generic drop cause for a packet being dropped inside a Redis Cluster + # service project. + DROPPED_INSIDE_REDIS_CLUSTER_SERVICE = 75 + + # Packet is dropped due to an unsupported port being used to connect to a + # Redis Cluster. Ports 6379 and 11000 to 13047 should be used to connect to + # a Redis Cluster. + REDIS_CLUSTER_UNSUPPORTED_PORT = 76 + + # Redis Cluster does not have an external IP address. + REDIS_CLUSTER_NO_EXTERNAL_IP = 77 + + # Packet is dropped due to an unsupported protocol being used to connect to + # a Redis Cluster. Only TCP connections are accepted by a Redis Cluster. + REDIS_CLUSTER_UNSUPPORTED_PROTOCOL = 79 + + # Packet from the non-GCP (on-prem) or unknown GCP network is dropped due + # to the destination IP address not belonging to any IP prefix advertised + # via BGP by the Cloud Router. + NO_ADVERTISED_ROUTE_TO_GCP_DESTINATION = 80 + + # Packet from the non-GCP (on-prem) or unknown GCP network is dropped due + # to the destination IP address not belonging to any IP prefix included to + # the local traffic selector of the VPN tunnel. + NO_TRAFFIC_SELECTOR_TO_GCP_DESTINATION = 81 + + # Packet from the unknown peered network is dropped due to no known route + # from the source network to the destination IP address. + NO_KNOWN_ROUTE_FROM_PEERED_NETWORK_TO_DESTINATION = 82 + + # Sending packets processed by the Private NAT Gateways to the Private + # Service Connect endpoints is not supported. + PRIVATE_NAT_TO_PSC_ENDPOINT_UNSUPPORTED = 83 + + # Packet is sent to the PSC port mapping service, but its destination port + # does not match any port mapping rules. + PSC_PORT_MAPPING_PORT_MISMATCH = 86 + + # Sending packets directly to the PSC port mapping service without going + # through the PSC connection is not supported. + PSC_PORT_MAPPING_WITHOUT_PSC_CONNECTION_UNSUPPORTED = 87 + + # Packet with destination IP address within the reserved NAT64 range is + # dropped due to matching a route of an unsupported type. + UNSUPPORTED_ROUTE_MATCHED_FOR_NAT64_DESTINATION = 88 + + # Packet could be dropped because hybrid endpoint like a VPN gateway or + # Interconnect is not allowed to send traffic to the Internet. + TRAFFIC_FROM_HYBRID_ENDPOINT_TO_INTERNET_DISALLOWED = 89 + + # Packet with destination IP address within the reserved NAT64 range is + # dropped due to no matching NAT gateway in the subnet. + NO_MATCHING_NAT64_GATEWAY = 90 + + # Packet is dropped due to matching a Private NAT64 gateway with no rules + # for source IPv6 addresses. + NO_CONFIGURED_PRIVATE_NAT64_RULE = 107 + + # Packet is dropped due to being sent to a backend of a passthrough load + # balancer that doesn't use the same IP version as the frontend. + LOAD_BALANCER_BACKEND_IP_VERSION_MISMATCH = 96 + + # Packet from the unknown NCC network is dropped due to no known route + # from the source network to the destination IP address. + NO_KNOWN_ROUTE_FROM_NCC_NETWORK_TO_DESTINATION = 97 + + # Packet is dropped by Cloud NAT due to using an unsupported protocol. + CLOUD_NAT_PROTOCOL_UNSUPPORTED = 99 + + # Packet is dropped due to using an unsupported protocol (any other than + # UDP) for L2 Interconnect. + L2_INTERCONNECT_UNSUPPORTED_PROTOCOL = 100 + + # Packet is dropped due to using an unsupported port (any other than + # 6081) for L2 Interconnect. + L2_INTERCONNECT_UNSUPPORTED_PORT = 101 + + # Packet is dropped due to destination IP not matching the appliance + # mapping IPs configured on the L2 Interconnect attachment. + L2_INTERCONNECT_DESTINATION_IP_MISMATCH = 102 + + # Packet could be dropped because it matches a route associated with an NCC + # spoke in the hybrid subnet context, but such a configuration is not + # supported. + NCC_ROUTE_WITHIN_HYBRID_SUBNET_UNSUPPORTED = 104 + + # Packet is dropped because the region of the hybrid subnet is different + # from the region of the next hop of the route matched within this hybrid + # subnet. + HYBRID_SUBNET_REGION_MISMATCH = 105 + + # Packet is dropped because no matching route was found in the hybrid + # subnet. + HYBRID_SUBNET_NO_ROUTE = 106 + + # Packet is dropped by GKE Network Policy. + GKE_NETWORK_POLICY = 108 + + # Packet is dropped because there is no valid matching route from the + # network of the Google-managed service to the destination. + NO_VALID_ROUTE_FROM_GOOGLE_MANAGED_NETWORK_TO_DESTINATION = 110 + end + end + + # For display only. Metadata associated with a Google Kubernetes Engine (GKE) + # cluster master. + # @!attribute [rw] cluster_uri + # @return [::String] + # URI of a GKE cluster. + # @!attribute [rw] cluster_network_uri + # @return [::String] + # URI of a GKE cluster network. + # @!attribute [rw] internal_ip + # @return [::String] + # Internal IP address of a GKE cluster control plane. + # @!attribute [rw] external_ip + # @return [::String] + # External IP address of a GKE cluster control plane. + # @!attribute [rw] dns_endpoint + # @return [::String] + # DNS endpoint of a GKE cluster control plane. + class GKEMasterInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # For display only. Metadata associated with a Google Kubernetes Engine (GKE) + # Pod. + # @!attribute [rw] pod_uri + # @return [::String] + # URI of a GKE Pod. + # For Pods in regional Clusters, the URI format is: + # `projects/{project}/locations/{location}/clusters/{cluster}/k8s/namespaces/{namespace}/pods/{pod}` + # For Pods in zonal Clusters, the URI format is: + # `projects/{project}/zones/{zone}/clusters/{cluster}/k8s/namespaces/{namespace}/pods/{pod}` + # @!attribute [rw] ip_address + # @return [::String] + # IP address of a GKE Pod. If the Pod is dual-stack, this is the IP address + # relevant to the trace. + # @!attribute [rw] network_uri + # @return [::String] + # URI of the network containing the GKE Pod. + class GkePodInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # For display only. Contains information about why IP masquerading was skipped + # for the packet. + # @!attribute [rw] reason + # @return [::Google::Cloud::NetworkManagement::V1::IpMasqueradingSkippedInfo::Reason] + # Reason why IP masquerading was not applied. + # @!attribute [rw] non_masquerade_range + # @return [::String] + # The matched non-masquerade IP range. Only set if reason is + # DESTINATION_IP_IN_CONFIGURED_NON_MASQUERADE_RANGE or + # DESTINATION_IP_IN_DEFAULT_NON_MASQUERADE_RANGE. + class IpMasqueradingSkippedInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Reason why IP masquerading was skipped. + module Reason + # Unused default value. + REASON_UNSPECIFIED = 0 + + # Masquerading not applied because destination IP is in one of configured + # non-masquerade ranges. + DESTINATION_IP_IN_CONFIGURED_NON_MASQUERADE_RANGE = 1 + + # Masquerading not applied because destination IP is in one of default + # non-masquerade ranges. + DESTINATION_IP_IN_DEFAULT_NON_MASQUERADE_RANGE = 2 + + # Masquerading not applied because destination is on the same Node. + DESTINATION_ON_SAME_NODE = 3 + + # Masquerading not applied because ip-masq-agent doesn't exist and default + # SNAT is disabled. + DEFAULT_SNAT_DISABLED = 4 + + # Masquerading not applied because the packet's IP version is IPv6. + NO_MASQUERADING_FOR_IPV6 = 5 + + # Masquerading not applied because the source Pod uses the host Node's + # network namespace, including the Node's IP address. + POD_USES_NODE_NETWORK_NAMESPACE = 6 + + # Masquerading not applied because the packet is a return packet. + NO_MASQUERADING_FOR_RETURN_PACKET = 7 + end + end + + # For display only. Metadata associated with a GKE Network Policy. + # @!attribute [rw] display_name + # @return [::String] + # The name of the Network Policy. + # @!attribute [rw] uri + # @return [::String] + # The URI of the Network Policy. + # Format for a Network Policy in a zonal cluster: + # `projects//zones//clusters//k8s/namespaces//networking.k8s.io/networkpolicies/` + # Format for a Network Policy in a regional cluster: + # `projects//locations//clusters//k8s/namespaces//networking.k8s.io/networkpolicies/` + # @!attribute [rw] direction + # @return [::String] + # Possible values: INGRESS, EGRESS + # @!attribute [rw] action + # @return [::String] + # Possible values: ALLOW, DENY + class GkeNetworkPolicyInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # For display only. Contains information about why GKE Network Policy + # evaluation was skipped. + # @!attribute [rw] reason + # @return [::Google::Cloud::NetworkManagement::V1::GkeNetworkPolicySkippedInfo::Reason] + # Reason why Network Policy evaluation was skipped. + class GkeNetworkPolicySkippedInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + module Reason + # Unused default value. + REASON_UNSPECIFIED = 0 + + # Network Policy is disabled on the cluster. + NETWORK_POLICY_DISABLED = 1 + + # Ingress traffic to a Pod from a source on the same Node is always + # allowed. + INGRESS_SOURCE_ON_SAME_NODE = 2 + + # Egress traffic from a Pod that uses the Node's network namespace is not + # subject to Network Policy. + EGRESS_FROM_NODE_NETWORK_NAMESPACE_POD = 3 + + # Network Policy is not applied to response traffic. This is because GKE + # Network Policy evaluation is stateful in both GKE Dataplane V2 (eBPF) and + # legacy (iptables) implementations. + NETWORK_POLICY_NOT_APPLIED_TO_RESPONSE_TRAFFIC = 4 + + # Network Policy evaluation is currently not supported for clusters with + # FQDN Network Policies enabled. + NETWORK_POLICY_ANALYSIS_UNSUPPORTED = 100 + end + end + + # For display only. Metadata associated with a Cloud SQL instance. + # @!attribute [rw] display_name + # @return [::String] + # Name of a Cloud SQL instance. + # @!attribute [rw] uri + # @return [::String] + # URI of a Cloud SQL instance. + # @!attribute [rw] network_uri + # @return [::String] + # URI of a Cloud SQL instance network or empty string if the instance does + # not have one. + # @!attribute [rw] internal_ip + # @return [::String] + # Internal IP address of a Cloud SQL instance. + # @!attribute [rw] external_ip + # @return [::String] + # External IP address of a Cloud SQL instance. + # @!attribute [rw] region + # @return [::String] + # Region in which the Cloud SQL instance is running. + class CloudSQLInstanceInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # For display only. Metadata associated with a Cloud Redis Instance. + # @!attribute [rw] display_name + # @return [::String] + # Name of a Cloud Redis Instance. + # @!attribute [rw] uri + # @return [::String] + # URI of a Cloud Redis Instance. + # @!attribute [rw] network_uri + # @return [::String] + # URI of a Cloud Redis Instance network. + # @!attribute [rw] primary_endpoint_ip + # @return [::String] + # Primary endpoint IP address of a Cloud Redis Instance. + # @!attribute [rw] read_endpoint_ip + # @return [::String] + # Read endpoint IP address of a Cloud Redis Instance (if applicable). + # @!attribute [rw] region + # @return [::String] + # Region in which the Cloud Redis Instance is defined. + class RedisInstanceInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # For display only. Metadata associated with a Redis Cluster. + # @!attribute [rw] display_name + # @return [::String] + # Name of a Redis Cluster. + # @!attribute [rw] uri + # @return [::String] + # URI of a Redis Cluster in format + # "projects/\\{project_id}/locations/\\{location}/clusters/\\{cluster_id}" + # @!attribute [rw] network_uri + # @return [::String] + # URI of the network containing the Redis Cluster endpoints in format + # "projects/\\{project_id}/global/networks/\\{network_id}". + # @!attribute [rw] discovery_endpoint_ip_address + # @return [::String] + # Discovery endpoint IP address of a Redis Cluster. + # @!attribute [rw] secondary_endpoint_ip_address + # @return [::String] + # Secondary endpoint IP address of a Redis Cluster. + # @!attribute [rw] location + # @return [::String] + # Name of the region in which the Redis Cluster is defined. For example, + # "us-central1". + class RedisClusterInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # For display only. Metadata associated with a Cloud Function. + # @!attribute [rw] display_name + # @return [::String] + # Name of a Cloud Function. + # @!attribute [rw] uri + # @return [::String] + # URI of a Cloud Function. + # @!attribute [rw] location + # @return [::String] + # Location in which the Cloud Function is deployed. + # @!attribute [rw] version_id + # @return [::Integer] + # Latest successfully deployed version id of the Cloud Function. + class CloudFunctionInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # For display only. Metadata associated with a Cloud Run revision. + # @!attribute [rw] display_name + # @return [::String] + # Name of a Cloud Run revision. + # @!attribute [rw] uri + # @return [::String] + # URI of a Cloud Run revision. + # @!attribute [rw] location + # @return [::String] + # Location in which this revision is deployed. + # @!attribute [rw] service_uri + # @return [::String] + # URI of Cloud Run service this revision belongs to. + class CloudRunRevisionInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # For display only. Metadata associated with an App Engine version. + # @!attribute [rw] display_name + # @return [::String] + # Name of an App Engine version. + # @!attribute [rw] uri + # @return [::String] + # URI of an App Engine version. + # @!attribute [rw] runtime + # @return [::String] + # Runtime of the App Engine version. + # @!attribute [rw] environment + # @return [::String] + # App Engine execution environment for a version. + class AppEngineVersionInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # For display only. Metadata associated with a VPC connector. + # @!attribute [rw] display_name + # @return [::String] + # Name of a VPC connector. + # @!attribute [rw] uri + # @return [::String] + # URI of a VPC connector. + # @!attribute [rw] location + # @return [::String] + # Location in which the VPC connector is deployed. + class VpcConnectorInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # For display only. Metadata associated with a serverless direct VPC egress + # connection. + # @!attribute [rw] network_uri + # @return [::String] + # URI of direct access network. + # @!attribute [rw] subnetwork_uri + # @return [::String] + # URI of direct access subnetwork. + # @!attribute [rw] selected_ip_range + # @return [::String] + # Selected IP range. + # @!attribute [rw] selected_ip_address + # @return [::String] + # Selected starting IP address, from the selected IP range. + # @!attribute [rw] region + # @return [::String] + # Region in which the Direct VPC egress is deployed. + class DirectVpcEgressConnectionInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # For display only. Metadata associated with a serverless public connection. + # @!attribute [rw] selected_ip_address + # @return [::String] + # Selected starting IP address, from the Google dynamic address pool. + class ServerlessExternalConnectionInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # For display only. Metadata associated with NAT. + # @!attribute [rw] type + # @return [::Google::Cloud::NetworkManagement::V1::NatInfo::Type] + # Type of NAT. + # @!attribute [rw] protocol + # @return [::String] + # IP protocol in string format, for example: "TCP", "UDP", "ICMP". + # @!attribute [rw] network_uri + # @return [::String] + # URI of the network where NAT translation takes place. + # @!attribute [rw] old_source_ip + # @return [::String] + # Source IP address before NAT translation. + # @!attribute [rw] new_source_ip + # @return [::String] + # Source IP address after NAT translation. + # @!attribute [rw] old_destination_ip + # @return [::String] + # Destination IP address before NAT translation. + # @!attribute [rw] new_destination_ip + # @return [::String] + # Destination IP address after NAT translation. + # @!attribute [rw] old_source_port + # @return [::Integer] + # Source port before NAT translation. Only valid when protocol is TCP or UDP. + # @!attribute [rw] new_source_port + # @return [::Integer] + # Source port after NAT translation. Only valid when protocol is TCP or UDP. + # @!attribute [rw] old_destination_port + # @return [::Integer] + # Destination port before NAT translation. Only valid when protocol is TCP or + # UDP. + # @!attribute [rw] new_destination_port + # @return [::Integer] + # Destination port after NAT translation. Only valid when protocol is TCP or + # UDP. + # @!attribute [rw] router_uri + # @return [::String] + # Uri of the Cloud Router. Only valid when type is CLOUD_NAT. + # @!attribute [rw] nat_gateway_name + # @return [::String] + # The name of Cloud NAT Gateway. Only valid when type is CLOUD_NAT. + # @!attribute [rw] cloud_nat_gateway_type + # @return [::Google::Cloud::NetworkManagement::V1::NatInfo::CloudNatGatewayType] + # Type of Cloud NAT gateway. Only valid when `type` is CLOUD_NAT. + class NatInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Types of NAT. + module Type + # Type is unspecified. + TYPE_UNSPECIFIED = 0 + + # From Compute Engine instance's internal address to external address. + INTERNAL_TO_EXTERNAL = 1 + + # From Compute Engine instance's external address to internal address. + EXTERNAL_TO_INTERNAL = 2 + + # Cloud NAT Gateway. + CLOUD_NAT = 3 + + # Private service connect NAT. + PRIVATE_SERVICE_CONNECT = 4 + + # GKE Pod IP address masquerading. + GKE_POD_IP_MASQUERADING = 5 + end + + # Types of Cloud NAT gateway. + module CloudNatGatewayType + # Type is unspecified. + CLOUD_NAT_GATEWAY_TYPE_UNSPECIFIED = 0 + + # Public NAT gateway. + PUBLIC_NAT44 = 1 + + # Public NAT64 gateway. + PUBLIC_NAT64 = 2 + + # Private NAT gateway for NCC. + PRIVATE_NAT_NCC = 3 + + # Private NAT gateway for hybrid connectivity. + PRIVATE_NAT_HYBRID = 4 + + # Private NAT64 gateway. + PRIVATE_NAT64 = 5 + end + end + + # For display only. Metadata associated with ProxyConnection. + # @!attribute [rw] protocol + # @return [::String] + # IP protocol in string format, for example: "TCP", "UDP", "ICMP". + # @!attribute [rw] old_source_ip + # @return [::String] + # Source IP address of an original connection. + # @!attribute [rw] new_source_ip + # @return [::String] + # Source IP address of a new connection. + # @!attribute [rw] old_destination_ip + # @return [::String] + # Destination IP address of an original connection + # @!attribute [rw] new_destination_ip + # @return [::String] + # Destination IP address of a new connection. + # @!attribute [rw] old_source_port + # @return [::Integer] + # Source port of an original connection. Only valid when protocol is TCP or + # UDP. + # @!attribute [rw] new_source_port + # @return [::Integer] + # Source port of a new connection. Only valid when protocol is TCP or UDP. + # @!attribute [rw] old_destination_port + # @return [::Integer] + # Destination port of an original connection. Only valid when protocol is TCP + # or UDP. + # @!attribute [rw] new_destination_port + # @return [::Integer] + # Destination port of a new connection. Only valid when protocol is TCP or + # UDP. + # @!attribute [rw] subnet_uri + # @return [::String] + # Uri of proxy subnet. + # @!attribute [rw] network_uri + # @return [::String] + # URI of the network where connection is proxied. + class ProxyConnectionInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # For display only. Metadata associated with the load balancer backend. + # @!attribute [rw] name + # @return [::String] + # Display name of the backend. For example, it might be an instance name for + # the instance group backends, or an IP address and port for zonal network + # endpoint group backends. + # @!attribute [rw] instance_uri + # @return [::String] + # URI of the backend instance (if applicable). Populated for instance group + # backends, and zonal NEG backends. + # @!attribute [rw] backend_service_uri + # @return [::String] + # URI of the backend service this backend belongs to (if applicable). + # @!attribute [rw] instance_group_uri + # @return [::String] + # URI of the instance group this backend belongs to (if applicable). + # @!attribute [rw] network_endpoint_group_uri + # @return [::String] + # URI of the network endpoint group this backend belongs to (if applicable). + # @!attribute [rw] backend_bucket_uri + # @return [::String] + # URI of the backend bucket this backend targets (if applicable). + # @!attribute [rw] psc_service_attachment_uri + # @return [::String] + # URI of the PSC service attachment this PSC NEG backend targets (if + # applicable). + # @!attribute [rw] psc_google_api_target + # @return [::String] + # PSC Google API target this PSC NEG backend targets (if applicable). + # @!attribute [rw] health_check_uri + # @return [::String] + # URI of the health check attached to this backend (if applicable). + # @!attribute [r] health_check_firewalls_config_state + # @return [::Google::Cloud::NetworkManagement::V1::LoadBalancerBackendInfo::HealthCheckFirewallsConfigState] + # Output only. Health check firewalls configuration state for the backend. + # This is a result of the static firewall analysis (verifying that health + # check traffic from required IP ranges to the backend is allowed or not). + # The backend might still be unhealthy even if these firewalls are + # configured. Please refer to the documentation for more information: + # https://cloud.google.com/load-balancing/docs/firewall-rules + class LoadBalancerBackendInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Health check firewalls configuration state enum. + module HealthCheckFirewallsConfigState + # Configuration state unspecified. It usually means that the backend has + # no health check attached, or there was an unexpected configuration error + # preventing Connectivity tests from verifying health check configuration. + HEALTH_CHECK_FIREWALLS_CONFIG_STATE_UNSPECIFIED = 0 + + # Firewall rules (policies) allowing health check traffic from all required + # IP ranges to the backend are configured. + FIREWALLS_CONFIGURED = 1 + + # Firewall rules (policies) allow health check traffic only from a part of + # required IP ranges. + FIREWALLS_PARTIALLY_CONFIGURED = 2 + + # Firewall rules (policies) deny health check traffic from all required + # IP ranges to the backend. + FIREWALLS_NOT_CONFIGURED = 3 + + # The network contains firewall rules of unsupported types, so Connectivity + # tests were not able to verify health check configuration status. Please + # refer to the documentation for the list of unsupported configurations: + # https://cloud.google.com/network-intelligence-center/docs/connectivity-tests/concepts/overview#unsupported-configs + FIREWALLS_UNSUPPORTED = 4 + end + end + + # For display only. Metadata associated with Storage Bucket. + # @!attribute [rw] bucket + # @return [::String] + # Cloud Storage Bucket name. + class StorageBucketInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # For display only. Metadata associated with the serverless network endpoint + # group backend. + # @!attribute [rw] neg_uri + # @return [::String] + # URI of the serverless network endpoint group. + class ServerlessNegInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # For display only. Metadata associated with a layer 7 packet inspection by the + # firewall. + # @!attribute [rw] security_profile_group_uri + # @return [::String] + # URI of the security profile group associated with this firewall packet + # inspection. + class NgfwPacketInspectionInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Type of a load balancer. For more information, see [Summary of Google Cloud + # load + # balancers](https://cloud.google.com/load-balancing/docs/load-balancing-overview#summary-of-google-cloud-load-balancers). + module LoadBalancerType + # Forwarding rule points to a different target than a load balancer or a + # load balancer type is unknown. + LOAD_BALANCER_TYPE_UNSPECIFIED = 0 + + # Global external HTTP(S) load balancer. + HTTPS_ADVANCED_LOAD_BALANCER = 1 + + # Global external HTTP(S) load balancer (classic) + HTTPS_LOAD_BALANCER = 2 + + # Regional external HTTP(S) load balancer. + REGIONAL_HTTPS_LOAD_BALANCER = 3 + + # Internal HTTP(S) load balancer. + INTERNAL_HTTPS_LOAD_BALANCER = 4 + + # External SSL proxy load balancer. + SSL_PROXY_LOAD_BALANCER = 5 + + # External TCP proxy load balancer. + TCP_PROXY_LOAD_BALANCER = 6 + + # Internal regional TCP proxy load balancer. + INTERNAL_TCP_PROXY_LOAD_BALANCER = 7 + + # External TCP/UDP Network load balancer. + NETWORK_LOAD_BALANCER = 8 + + # Target-pool based external TCP/UDP Network load balancer. + LEGACY_NETWORK_LOAD_BALANCER = 9 + + # Internal TCP/UDP load balancer. + TCP_UDP_INTERNAL_LOAD_BALANCER = 10 + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-network_management-v1/proto_docs/google/cloud/networkmanagement/v1/vpc_flow_logs.rb b/owl-bot-staging/google-cloud-network_management-v1/proto_docs/google/cloud/networkmanagement/v1/vpc_flow_logs.rb new file mode 100644 index 000000000000..c3babe144944 --- /dev/null +++ b/owl-bot-staging/google-cloud-network_management-v1/proto_docs/google/cloud/networkmanagement/v1/vpc_flow_logs.rb @@ -0,0 +1,224 @@ +# 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 NetworkManagement + module V1 + # Request for the `ListVpcFlowLogsConfigs` method. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource of the VpcFlowLogsConfig, + # in one of the following formats: + # + # - For project-level resources: `projects/{project_id}/locations/global` + # + # - For organization-level resources: + # `organizations/{organization_id}/locations/global` + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. Number of `VpcFlowLogsConfigs` to return. + # @!attribute [rw] page_token + # @return [::String] + # Optional. Page token from an earlier query, as returned in + # `next_page_token`. + # @!attribute [rw] filter + # @return [::String] + # Optional. Lists the `VpcFlowLogsConfigs` that match the filter expression. + # A filter expression must use the supported [CEL logic operators] + # (https://cloud.google.com/vpc/docs/about-flow-logs-records#supported_cel_logic_operators). + # @!attribute [rw] order_by + # @return [::String] + # Optional. Field to use to sort the list. + class ListVpcFlowLogsConfigsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response for the `ListVpcFlowLogsConfigs` method. + # @!attribute [rw] vpc_flow_logs_configs + # @return [::Array<::Google::Cloud::NetworkManagement::V1::VpcFlowLogsConfig>] + # List of VPC Flow Log configurations. + # @!attribute [rw] next_page_token + # @return [::String] + # Page token to fetch the next set of configurations. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Locations that could not be reached (when querying all locations with `-`). + class ListVpcFlowLogsConfigsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for the `GetVpcFlowLogsConfig` method. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the VpcFlowLogsConfig, + # in one of the following formats: + # + # - For project-level resources: + # `projects/{project_id}/locations/global/vpcFlowLogsConfigs/{vpc_flow_logs_config_id}` + # + # - For organization-level resources: + # `organizations/{organization_id}/locations/global/vpcFlowLogsConfigs/{vpc_flow_logs_config_id}` + class GetVpcFlowLogsConfigRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for the `CreateVpcFlowLogsConfig` method. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource of the VpcFlowLogsConfig to create, + # in one of the following formats: + # + # - For project-level resources: `projects/{project_id}/locations/global` + # + # - For organization-level resources: + # `organizations/{organization_id}/locations/global` + # @!attribute [rw] vpc_flow_logs_config_id + # @return [::String] + # Required. ID of the `VpcFlowLogsConfig`. + # @!attribute [rw] vpc_flow_logs_config + # @return [::Google::Cloud::NetworkManagement::V1::VpcFlowLogsConfig] + # Required. A `VpcFlowLogsConfig` resource + class CreateVpcFlowLogsConfigRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for the `UpdateVpcFlowLogsConfig` method. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. Mask of fields to update. At least one path must be supplied in + # this field. + # For example, to change the state of the configuration to ENABLED, specify + # `update_mask` = `"state"`, and the `vpc_flow_logs_config` would be: + # `vpc_flow_logs_config = { + # name = + # "projects/my-project/locations/global/vpcFlowLogsConfigs/my-config" + # state = "ENABLED" }` + # @!attribute [rw] vpc_flow_logs_config + # @return [::Google::Cloud::NetworkManagement::V1::VpcFlowLogsConfig] + # Required. Only fields specified in update_mask are updated. + class UpdateVpcFlowLogsConfigRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for the `DeleteVpcFlowLogsConfig` method. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the VpcFlowLogsConfig, + # in one of the following formats: + # + # - For a project-level resource: + # `projects/{project_id}/locations/global/vpcFlowLogsConfigs/{vpc_flow_logs_config_id}` + # + # - For an organization-level resource: + # `organizations/{organization_id}/locations/global/vpcFlowLogsConfigs/{vpc_flow_logs_config_id}` + class DeleteVpcFlowLogsConfigRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for the `QueryOrgVpcFlowLogsConfigs` method. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource of the VpcFlowLogsConfig, specified in + # the following format: `projects/{project_id}/locations/global` + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. Number of `VpcFlowLogsConfigs` to return. + # @!attribute [rw] page_token + # @return [::String] + # Optional. Page token from an earlier query, as returned in + # `next_page_token`. + # @!attribute [rw] filter + # @return [::String] + # Optional. Lists the `VpcFlowLogsConfigs` that match the filter expression. + # A filter expression must use the supported [CEL logic operators] + # (https://cloud.google.com/vpc/docs/about-flow-logs-records#supported_cel_logic_operators). + class QueryOrgVpcFlowLogsConfigsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response for the `QueryVpcFlowLogsConfigs` method. + # @!attribute [rw] vpc_flow_logs_configs + # @return [::Array<::Google::Cloud::NetworkManagement::V1::VpcFlowLogsConfig>] + # List of VPC Flow Log configurations. + # @!attribute [rw] next_page_token + # @return [::String] + # Page token to fetch the next set of configurations. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Locations that could not be reached (when querying all locations with `-`). + class QueryOrgVpcFlowLogsConfigsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for the `ShowEffectiveFlowLogsConfigs` method. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource of the VpcFlowLogsConfig, specified in + # the following format: `projects/{project_id}/locations/global` + # @!attribute [rw] resource + # @return [::String] + # Required. The resource to get the effective VPC Flow Logs configuration + # for. The resource must belong to the same project as the parent. The + # resource must be a network, subnetwork, interconnect attachment, VPN + # tunnel, or a project. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. Number of `EffectiveVpcFlowLogsConfigs` to return. Default is 30. + # @!attribute [rw] page_token + # @return [::String] + # Optional. Page token from an earlier query, as returned in + # `next_page_token`. + # @!attribute [rw] filter + # @return [::String] + # Optional. Lists the `EffectiveVpcFlowLogsConfigs` that match the filter + # expression. A filter expression must use the supported [CEL logic + # operators] + # (https://cloud.google.com/vpc/docs/about-flow-logs-records#supported_cel_logic_operators). + class ShowEffectiveFlowLogsConfigsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response for the `ShowEffectiveFlowLogsConfigs` method. + # @!attribute [rw] effective_flow_logs_configs + # @return [::Array<::Google::Cloud::NetworkManagement::V1::EffectiveVpcFlowLogsConfig>] + # List of Effective Vpc Flow Logs configurations. + # @!attribute [rw] next_page_token + # @return [::String] + # Page token to fetch the next set of configurations. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Locations that could not be reached (when querying all locations with `-`). + class ShowEffectiveFlowLogsConfigsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-network_management-v1/proto_docs/google/cloud/networkmanagement/v1/vpc_flow_logs_config.rb b/owl-bot-staging/google-cloud-network_management-v1/proto_docs/google/cloud/networkmanagement/v1/vpc_flow_logs_config.rb new file mode 100644 index 000000000000..16d28d0a49dc --- /dev/null +++ b/owl-bot-staging/google-cloud-network_management-v1/proto_docs/google/cloud/networkmanagement/v1/vpc_flow_logs_config.rb @@ -0,0 +1,312 @@ +# 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 NetworkManagement + module V1 + # A configuration to generate VPC Flow Logs. + # @!attribute [rw] name + # @return [::String] + # Identifier. Unique name of the configuration. The name can have one of the + # following forms: + # + # - For project-level configurations: + # `projects/{project_id}/locations/global/vpcFlowLogsConfigs/{vpc_flow_logs_config_id}` + # + # - For organization-level configurations: + # `organizations/{organization_id}/locations/global/vpcFlowLogsConfigs/{vpc_flow_logs_config_id}` + # @!attribute [rw] description + # @return [::String] + # Optional. The user-supplied description of the VPC Flow Logs configuration. + # Maximum of 512 characters. + # @!attribute [rw] state + # @return [::Google::Cloud::NetworkManagement::V1::VpcFlowLogsConfig::State] + # Optional. The state of the VPC Flow Log configuration. Default value is + # ENABLED. When creating a new configuration, it must be enabled. Setting + # state=DISABLED will pause the log generation for this config. + # @!attribute [rw] aggregation_interval + # @return [::Google::Cloud::NetworkManagement::V1::VpcFlowLogsConfig::AggregationInterval] + # Optional. The aggregation interval for the logs. Default value is + # INTERVAL_5_SEC. + # @!attribute [rw] flow_sampling + # @return [::Float] + # Optional. The value of the field must be in (0, 1]. The sampling rate of + # VPC Flow Logs where 1.0 means all collected logs are reported. Setting the + # sampling rate to 0.0 is not allowed. If you want to disable VPC Flow Logs, + # use the state field instead. Default value is 1.0. + # @!attribute [rw] metadata + # @return [::Google::Cloud::NetworkManagement::V1::VpcFlowLogsConfig::Metadata] + # Optional. Configures whether all, none or a subset of metadata fields + # should be added to the reported VPC flow logs. Default value is + # INCLUDE_ALL_METADATA. + # @!attribute [rw] metadata_fields + # @return [::Array<::String>] + # Optional. Custom metadata fields to include in the reported VPC flow logs. + # Can only be specified if "metadata" was set to CUSTOM_METADATA. + # @!attribute [rw] filter_expr + # @return [::String] + # Optional. Export filter used to define which VPC Flow Logs should be + # logged. + # @!attribute [rw] cross_project_metadata + # @return [::Google::Cloud::NetworkManagement::V1::VpcFlowLogsConfig::CrossProjectMetadata] + # Optional. Determines whether to include cross project annotations in the + # logs. This field is available only for organization configurations. If not + # specified in org configs will be set to CROSS_PROJECT_METADATA_ENABLED. + # @!attribute [r] target_resource_state + # @return [::Google::Cloud::NetworkManagement::V1::VpcFlowLogsConfig::TargetResourceState] + # Output only. Describes the state of the configured target resource for + # diagnostic purposes. + # @!attribute [rw] network + # @return [::String] + # Traffic will be logged from VMs, VPN tunnels and Interconnect Attachments + # within the network. + # Format: projects/\\{project_id}/global/networks/\\{name} + # + # Note: The following fields are mutually exclusive: `network`, `subnet`, `interconnect_attachment`, `vpn_tunnel`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] subnet + # @return [::String] + # Traffic will be logged from VMs within the subnetwork. + # Format: projects/\\{project_id}/regions/\\{region}/subnetworks/\\{name} + # + # Note: The following fields are mutually exclusive: `subnet`, `network`, `interconnect_attachment`, `vpn_tunnel`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] interconnect_attachment + # @return [::String] + # Traffic will be logged from the Interconnect Attachment. + # Format: + # projects/\\{project_id}/regions/\\{region}/interconnectAttachments/\\{name} + # + # Note: The following fields are mutually exclusive: `interconnect_attachment`, `network`, `subnet`, `vpn_tunnel`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] vpn_tunnel + # @return [::String] + # Traffic will be logged from the VPN Tunnel. + # Format: projects/\\{project_id}/regions/\\{region}/vpnTunnels/\\{name} + # + # Note: The following fields are mutually exclusive: `vpn_tunnel`, `network`, `subnet`, `interconnect_attachment`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. Resource labels to represent user-provided metadata. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time the config was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time the config was updated. + class VpcFlowLogsConfig + 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 + + # Determines whether this configuration will be generating logs. + module State + # If not specified, will default to ENABLED. + STATE_UNSPECIFIED = 0 + + # When ENABLED, this configuration will generate logs. + ENABLED = 1 + + # When DISABLED, this configuration will not generate logs. + DISABLED = 2 + end + + # Toggles the aggregation interval for collecting flow logs by 5-tuple. + module AggregationInterval + # If not specified, will default to INTERVAL_5_SEC. + AGGREGATION_INTERVAL_UNSPECIFIED = 0 + + # Aggregate logs in 5s intervals. + INTERVAL_5_SEC = 1 + + # Aggregate logs in 30s intervals. + INTERVAL_30_SEC = 2 + + # Aggregate logs in 1m intervals. + INTERVAL_1_MIN = 3 + + # Aggregate logs in 5m intervals. + INTERVAL_5_MIN = 4 + + # Aggregate logs in 10m intervals. + INTERVAL_10_MIN = 5 + + # Aggregate logs in 15m intervals. + INTERVAL_15_MIN = 6 + end + + # Configures which log fields would be included. + module Metadata + # If not specified, will default to INCLUDE_ALL_METADATA. + METADATA_UNSPECIFIED = 0 + + # Include all metadata fields. + INCLUDE_ALL_METADATA = 1 + + # Exclude all metadata fields. + EXCLUDE_ALL_METADATA = 2 + + # Include only custom fields (specified in metadata_fields). + CUSTOM_METADATA = 3 + end + + # Determines whether to include cross project annotations in the logs. + # Project configurations will always have CROSS_PROJECT_METADATA_DISABLED. + module CrossProjectMetadata + # If not specified, the default is CROSS_PROJECT_METADATA_ENABLED. + CROSS_PROJECT_METADATA_UNSPECIFIED = 0 + + # When CROSS_PROJECT_METADATA_ENABLED, metadata from other projects will be + # included in the logs. + CROSS_PROJECT_METADATA_ENABLED = 1 + + # When CROSS_PROJECT_METADATA_DISABLED, metadata from other projects will + # not be included in the logs. + CROSS_PROJECT_METADATA_DISABLED = 2 + end + + # Output only. Indicates whether the target resource exists, for diagnostic + # purposes. + module TargetResourceState + # Unspecified target resource state. + TARGET_RESOURCE_STATE_UNSPECIFIED = 0 + + # Indicates that the target resource exists. + TARGET_RESOURCE_EXISTS = 1 + + # Indicates that the target resource does not exist. + TARGET_RESOURCE_DOES_NOT_EXIST = 2 + end + end + + # A configuration to generate a response for GetEffectiveVpcFlowLogsConfig + # request. + # @!attribute [rw] name + # @return [::String] + # Unique name of the configuration. The name can have one of the following + # forms: + # + # - For project-level configurations: + # `projects/{project_id}/locations/global/vpcFlowLogsConfigs/{vpc_flow_logs_config_id}` + # + # - For organization-level configurations: + # `organizations/{organization_id}/locations/global/vpcFlowLogsConfigs/{vpc_flow_logs_config_id}` + # + # - For a Compute config, the name will be the path of the subnet: + # `projects/{project_id}/regions/{region}/subnetworks/{subnet_id}` + # @!attribute [rw] state + # @return [::Google::Cloud::NetworkManagement::V1::VpcFlowLogsConfig::State] + # The state of the VPC Flow Log configuration. Default value is ENABLED. + # When creating a new configuration, it must be enabled. + # Setting state=DISABLED will pause the log generation for this config. + # @!attribute [rw] aggregation_interval + # @return [::Google::Cloud::NetworkManagement::V1::VpcFlowLogsConfig::AggregationInterval] + # The aggregation interval for the logs. Default value is INTERVAL_5_SEC. + # @!attribute [rw] flow_sampling + # @return [::Float] + # The value of the field must be in (0, 1]. The sampling rate of VPC Flow + # Logs where 1.0 means all collected logs are reported. + # Setting the sampling rate to 0.0 is not allowed. If you want to disable VPC + # Flow Logs, use the state field instead. + # Default value is 1.0. + # @!attribute [rw] metadata + # @return [::Google::Cloud::NetworkManagement::V1::VpcFlowLogsConfig::Metadata] + # Configures whether all, none or a subset of metadata fields should be + # added to the reported VPC flow logs. + # Default value is INCLUDE_ALL_METADATA. + # @!attribute [rw] metadata_fields + # @return [::Array<::String>] + # Custom metadata fields to include in the reported VPC flow logs. + # Can only be specified if "metadata" was set to CUSTOM_METADATA. + # @!attribute [rw] filter_expr + # @return [::String] + # Export filter used to define which VPC Flow Logs should be logged. + # @!attribute [rw] cross_project_metadata + # @return [::Google::Cloud::NetworkManagement::V1::VpcFlowLogsConfig::CrossProjectMetadata] + # Determines whether to include cross project annotations in the logs. + # This field is available only for organization configurations. If not + # specified in org configs will be set to CROSS_PROJECT_METADATA_ENABLED. + # @!attribute [rw] network + # @return [::String] + # Traffic will be logged from VMs, VPN tunnels and Interconnect Attachments + # within the network. + # Format: projects/\\{project_id}/global/networks/\\{name} + # + # Note: The following fields are mutually exclusive: `network`, `subnet`, `interconnect_attachment`, `vpn_tunnel`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] subnet + # @return [::String] + # Traffic will be logged from VMs within the subnetwork. + # Format: projects/\\{project_id}/regions/\\{region}/subnetworks/\\{name} + # + # Note: The following fields are mutually exclusive: `subnet`, `network`, `interconnect_attachment`, `vpn_tunnel`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] interconnect_attachment + # @return [::String] + # Traffic will be logged from the Interconnect Attachment. + # Format: + # projects/\\{project_id}/regions/\\{region}/interconnectAttachments/\\{name} + # + # Note: The following fields are mutually exclusive: `interconnect_attachment`, `network`, `subnet`, `vpn_tunnel`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] vpn_tunnel + # @return [::String] + # Traffic will be logged from the VPN Tunnel. + # Format: projects/\\{project_id}/regions/\\{region}/vpnTunnels/\\{name} + # + # Note: The following fields are mutually exclusive: `vpn_tunnel`, `network`, `subnet`, `interconnect_attachment`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] scope + # @return [::Google::Cloud::NetworkManagement::V1::EffectiveVpcFlowLogsConfig::Scope] + # Specifies the scope of the config (e.g., SUBNET, NETWORK, ORGANIZATION..). + class EffectiveVpcFlowLogsConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The scope for this flow log configuration. + module Scope + # Scope is unspecified. + SCOPE_UNSPECIFIED = 0 + + # Target resource is a subnet (Network Management API). + SUBNET = 1 + + # Target resource is a subnet, and the config originates from the Compute + # API. + COMPUTE_API_SUBNET = 2 + + # Target resource is a network. + NETWORK = 3 + + # Target resource is a VPN tunnel. + VPN_TUNNEL = 4 + + # Target resource is an interconnect attachment. + INTERCONNECT_ATTACHMENT = 5 + + # Configuration applies to an entire organization. + ORGANIZATION = 6 + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-network_management-v1/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-cloud-network_management-v1/proto_docs/google/longrunning/operations.rb new file mode 100644 index 000000000000..7a757f512165 --- /dev/null +++ b/owl-bot-staging/google-cloud-network_management-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-network_management-v1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-network_management-v1/proto_docs/google/protobuf/any.rb new file mode 100644 index 000000000000..58691995f02e --- /dev/null +++ b/owl-bot-staging/google-cloud-network_management-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-network_management-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-network_management-v1/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..ea59f1f91daf --- /dev/null +++ b/owl-bot-staging/google-cloud-network_management-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-network_management-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-network_management-v1/proto_docs/google/protobuf/empty.rb new file mode 100644 index 000000000000..83e4481834a6 --- /dev/null +++ b/owl-bot-staging/google-cloud-network_management-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-network_management-v1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-network_management-v1/proto_docs/google/protobuf/field_mask.rb new file mode 100644 index 000000000000..7f3ffc78601a --- /dev/null +++ b/owl-bot-staging/google-cloud-network_management-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-network_management-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-network_management-v1/proto_docs/google/protobuf/timestamp.rb new file mode 100644 index 000000000000..74352be9c58c --- /dev/null +++ b/owl-bot-staging/google-cloud-network_management-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-network_management-v1/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-network_management-v1/proto_docs/google/rpc/status.rb new file mode 100644 index 000000000000..c1a1c07eb2db --- /dev/null +++ b/owl-bot-staging/google-cloud-network_management-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-network_management-v1/proto_docs/google/type/expr.rb b/owl-bot-staging/google-cloud-network_management-v1/proto_docs/google/type/expr.rb new file mode 100644 index 000000000000..53e7733b6592 --- /dev/null +++ b/owl-bot-staging/google-cloud-network_management-v1/proto_docs/google/type/expr.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! + + +module Google + module Type + # Represents a textual expression in the Common Expression Language (CEL) + # syntax. CEL is a C-like expression language. The syntax and semantics of CEL + # are documented at https://github.com/google/cel-spec. + # + # Example (Comparison): + # + # title: "Summary size limit" + # description: "Determines if a summary is less than 100 chars" + # expression: "document.summary.size() < 100" + # + # Example (Equality): + # + # title: "Requestor is owner" + # description: "Determines if requestor is the document owner" + # expression: "document.owner == request.auth.claims.email" + # + # Example (Logic): + # + # title: "Public documents" + # description: "Determine whether the document should be publicly visible" + # expression: "document.type != 'private' && document.type != 'internal'" + # + # Example (Data Manipulation): + # + # title: "Notification string" + # description: "Create a notification string with a timestamp." + # expression: "'New message received at ' + string(document.create_time)" + # + # The exact variables and functions that may be referenced within an expression + # are determined by the service that evaluates it. See the service + # documentation for additional information. + # @!attribute [rw] expression + # @return [::String] + # Textual representation of an expression in Common Expression Language + # syntax. + # @!attribute [rw] title + # @return [::String] + # Optional. Title for the expression, i.e. a short string describing + # its purpose. This can be used e.g. in UIs which allow to enter the + # expression. + # @!attribute [rw] description + # @return [::String] + # Optional. Description of the expression. This is a longer text which + # describes the expression, e.g. when hovered over it in a UI. + # @!attribute [rw] location + # @return [::String] + # Optional. String indicating the location of the expression for error + # reporting, e.g. a file name and a position in the file. + class Expr + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-network_management-v1/snippets/Gemfile b/owl-bot-staging/google-cloud-network_management-v1/snippets/Gemfile new file mode 100644 index 000000000000..0b6ee465b655 --- /dev/null +++ b/owl-bot-staging/google-cloud-network_management-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-network_management-v1", path: "../" +else + gem "google-cloud-network_management-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-network_management-v1/snippets/organization_vpc_flow_logs_service/create_vpc_flow_logs_config.rb b/owl-bot-staging/google-cloud-network_management-v1/snippets/organization_vpc_flow_logs_service/create_vpc_flow_logs_config.rb new file mode 100644 index 000000000000..9c633e926631 --- /dev/null +++ b/owl-bot-staging/google-cloud-network_management-v1/snippets/organization_vpc_flow_logs_service/create_vpc_flow_logs_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 networkmanagement_v1_generated_OrganizationVpcFlowLogsService_CreateVpcFlowLogsConfig_sync] +require "google/cloud/network_management/v1" + +## +# Snippet for the create_vpc_flow_logs_config call in the OrganizationVpcFlowLogsService 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::NetworkManagement::V1::OrganizationVpcFlowLogsService::Client#create_vpc_flow_logs_config. +# +def create_vpc_flow_logs_config + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::NetworkManagement::V1::OrganizationVpcFlowLogsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::NetworkManagement::V1::CreateVpcFlowLogsConfigRequest.new + + # Call the create_vpc_flow_logs_config method. + result = client.create_vpc_flow_logs_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 networkmanagement_v1_generated_OrganizationVpcFlowLogsService_CreateVpcFlowLogsConfig_sync] diff --git a/owl-bot-staging/google-cloud-network_management-v1/snippets/organization_vpc_flow_logs_service/delete_vpc_flow_logs_config.rb b/owl-bot-staging/google-cloud-network_management-v1/snippets/organization_vpc_flow_logs_service/delete_vpc_flow_logs_config.rb new file mode 100644 index 000000000000..9fcc13f907b3 --- /dev/null +++ b/owl-bot-staging/google-cloud-network_management-v1/snippets/organization_vpc_flow_logs_service/delete_vpc_flow_logs_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 networkmanagement_v1_generated_OrganizationVpcFlowLogsService_DeleteVpcFlowLogsConfig_sync] +require "google/cloud/network_management/v1" + +## +# Snippet for the delete_vpc_flow_logs_config call in the OrganizationVpcFlowLogsService 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::NetworkManagement::V1::OrganizationVpcFlowLogsService::Client#delete_vpc_flow_logs_config. +# +def delete_vpc_flow_logs_config + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::NetworkManagement::V1::OrganizationVpcFlowLogsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::NetworkManagement::V1::DeleteVpcFlowLogsConfigRequest.new + + # Call the delete_vpc_flow_logs_config method. + result = client.delete_vpc_flow_logs_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 networkmanagement_v1_generated_OrganizationVpcFlowLogsService_DeleteVpcFlowLogsConfig_sync] diff --git a/owl-bot-staging/google-cloud-network_management-v1/snippets/organization_vpc_flow_logs_service/get_vpc_flow_logs_config.rb b/owl-bot-staging/google-cloud-network_management-v1/snippets/organization_vpc_flow_logs_service/get_vpc_flow_logs_config.rb new file mode 100644 index 000000000000..a6d8ebf8ef55 --- /dev/null +++ b/owl-bot-staging/google-cloud-network_management-v1/snippets/organization_vpc_flow_logs_service/get_vpc_flow_logs_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 networkmanagement_v1_generated_OrganizationVpcFlowLogsService_GetVpcFlowLogsConfig_sync] +require "google/cloud/network_management/v1" + +## +# Snippet for the get_vpc_flow_logs_config call in the OrganizationVpcFlowLogsService 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::NetworkManagement::V1::OrganizationVpcFlowLogsService::Client#get_vpc_flow_logs_config. +# +def get_vpc_flow_logs_config + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::NetworkManagement::V1::OrganizationVpcFlowLogsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::NetworkManagement::V1::GetVpcFlowLogsConfigRequest.new + + # Call the get_vpc_flow_logs_config method. + result = client.get_vpc_flow_logs_config request + + # The returned object is of type Google::Cloud::NetworkManagement::V1::VpcFlowLogsConfig. + p result +end +# [END networkmanagement_v1_generated_OrganizationVpcFlowLogsService_GetVpcFlowLogsConfig_sync] diff --git a/owl-bot-staging/google-cloud-network_management-v1/snippets/organization_vpc_flow_logs_service/list_vpc_flow_logs_configs.rb b/owl-bot-staging/google-cloud-network_management-v1/snippets/organization_vpc_flow_logs_service/list_vpc_flow_logs_configs.rb new file mode 100644 index 000000000000..8510a07760fe --- /dev/null +++ b/owl-bot-staging/google-cloud-network_management-v1/snippets/organization_vpc_flow_logs_service/list_vpc_flow_logs_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 networkmanagement_v1_generated_OrganizationVpcFlowLogsService_ListVpcFlowLogsConfigs_sync] +require "google/cloud/network_management/v1" + +## +# Snippet for the list_vpc_flow_logs_configs call in the OrganizationVpcFlowLogsService 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::NetworkManagement::V1::OrganizationVpcFlowLogsService::Client#list_vpc_flow_logs_configs. +# +def list_vpc_flow_logs_configs + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::NetworkManagement::V1::OrganizationVpcFlowLogsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::NetworkManagement::V1::ListVpcFlowLogsConfigsRequest.new + + # Call the list_vpc_flow_logs_configs method. + result = client.list_vpc_flow_logs_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::NetworkManagement::V1::VpcFlowLogsConfig. + p item + end +end +# [END networkmanagement_v1_generated_OrganizationVpcFlowLogsService_ListVpcFlowLogsConfigs_sync] diff --git a/owl-bot-staging/google-cloud-network_management-v1/snippets/organization_vpc_flow_logs_service/update_vpc_flow_logs_config.rb b/owl-bot-staging/google-cloud-network_management-v1/snippets/organization_vpc_flow_logs_service/update_vpc_flow_logs_config.rb new file mode 100644 index 000000000000..20a60a6ebea7 --- /dev/null +++ b/owl-bot-staging/google-cloud-network_management-v1/snippets/organization_vpc_flow_logs_service/update_vpc_flow_logs_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 networkmanagement_v1_generated_OrganizationVpcFlowLogsService_UpdateVpcFlowLogsConfig_sync] +require "google/cloud/network_management/v1" + +## +# Snippet for the update_vpc_flow_logs_config call in the OrganizationVpcFlowLogsService 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::NetworkManagement::V1::OrganizationVpcFlowLogsService::Client#update_vpc_flow_logs_config. +# +def update_vpc_flow_logs_config + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::NetworkManagement::V1::OrganizationVpcFlowLogsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::NetworkManagement::V1::UpdateVpcFlowLogsConfigRequest.new + + # Call the update_vpc_flow_logs_config method. + result = client.update_vpc_flow_logs_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 networkmanagement_v1_generated_OrganizationVpcFlowLogsService_UpdateVpcFlowLogsConfig_sync] diff --git a/owl-bot-staging/google-cloud-network_management-v1/snippets/reachability_service/create_connectivity_test.rb b/owl-bot-staging/google-cloud-network_management-v1/snippets/reachability_service/create_connectivity_test.rb new file mode 100644 index 000000000000..21c2e041f623 --- /dev/null +++ b/owl-bot-staging/google-cloud-network_management-v1/snippets/reachability_service/create_connectivity_test.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 networkmanagement_v1_generated_ReachabilityService_CreateConnectivityTest_sync] +require "google/cloud/network_management/v1" + +## +# Snippet for the create_connectivity_test call in the ReachabilityService 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::NetworkManagement::V1::ReachabilityService::Client#create_connectivity_test. +# +def create_connectivity_test + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::NetworkManagement::V1::ReachabilityService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::NetworkManagement::V1::CreateConnectivityTestRequest.new + + # Call the create_connectivity_test method. + result = client.create_connectivity_test 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 networkmanagement_v1_generated_ReachabilityService_CreateConnectivityTest_sync] diff --git a/owl-bot-staging/google-cloud-network_management-v1/snippets/reachability_service/delete_connectivity_test.rb b/owl-bot-staging/google-cloud-network_management-v1/snippets/reachability_service/delete_connectivity_test.rb new file mode 100644 index 000000000000..df1eedcd48ca --- /dev/null +++ b/owl-bot-staging/google-cloud-network_management-v1/snippets/reachability_service/delete_connectivity_test.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 networkmanagement_v1_generated_ReachabilityService_DeleteConnectivityTest_sync] +require "google/cloud/network_management/v1" + +## +# Snippet for the delete_connectivity_test call in the ReachabilityService 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::NetworkManagement::V1::ReachabilityService::Client#delete_connectivity_test. +# +def delete_connectivity_test + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::NetworkManagement::V1::ReachabilityService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::NetworkManagement::V1::DeleteConnectivityTestRequest.new + + # Call the delete_connectivity_test method. + result = client.delete_connectivity_test 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 networkmanagement_v1_generated_ReachabilityService_DeleteConnectivityTest_sync] diff --git a/owl-bot-staging/google-cloud-network_management-v1/snippets/reachability_service/get_connectivity_test.rb b/owl-bot-staging/google-cloud-network_management-v1/snippets/reachability_service/get_connectivity_test.rb new file mode 100644 index 000000000000..b30a43f9af1a --- /dev/null +++ b/owl-bot-staging/google-cloud-network_management-v1/snippets/reachability_service/get_connectivity_test.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 networkmanagement_v1_generated_ReachabilityService_GetConnectivityTest_sync] +require "google/cloud/network_management/v1" + +## +# Snippet for the get_connectivity_test call in the ReachabilityService 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::NetworkManagement::V1::ReachabilityService::Client#get_connectivity_test. +# +def get_connectivity_test + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::NetworkManagement::V1::ReachabilityService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::NetworkManagement::V1::GetConnectivityTestRequest.new + + # Call the get_connectivity_test method. + result = client.get_connectivity_test request + + # The returned object is of type Google::Cloud::NetworkManagement::V1::ConnectivityTest. + p result +end +# [END networkmanagement_v1_generated_ReachabilityService_GetConnectivityTest_sync] diff --git a/owl-bot-staging/google-cloud-network_management-v1/snippets/reachability_service/list_connectivity_tests.rb b/owl-bot-staging/google-cloud-network_management-v1/snippets/reachability_service/list_connectivity_tests.rb new file mode 100644 index 000000000000..1cfcb6d7a3b9 --- /dev/null +++ b/owl-bot-staging/google-cloud-network_management-v1/snippets/reachability_service/list_connectivity_tests.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 networkmanagement_v1_generated_ReachabilityService_ListConnectivityTests_sync] +require "google/cloud/network_management/v1" + +## +# Snippet for the list_connectivity_tests call in the ReachabilityService 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::NetworkManagement::V1::ReachabilityService::Client#list_connectivity_tests. +# +def list_connectivity_tests + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::NetworkManagement::V1::ReachabilityService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::NetworkManagement::V1::ListConnectivityTestsRequest.new + + # Call the list_connectivity_tests method. + result = client.list_connectivity_tests 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::NetworkManagement::V1::ConnectivityTest. + p item + end +end +# [END networkmanagement_v1_generated_ReachabilityService_ListConnectivityTests_sync] diff --git a/owl-bot-staging/google-cloud-network_management-v1/snippets/reachability_service/rerun_connectivity_test.rb b/owl-bot-staging/google-cloud-network_management-v1/snippets/reachability_service/rerun_connectivity_test.rb new file mode 100644 index 000000000000..83f2373fa75f --- /dev/null +++ b/owl-bot-staging/google-cloud-network_management-v1/snippets/reachability_service/rerun_connectivity_test.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 networkmanagement_v1_generated_ReachabilityService_RerunConnectivityTest_sync] +require "google/cloud/network_management/v1" + +## +# Snippet for the rerun_connectivity_test call in the ReachabilityService 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::NetworkManagement::V1::ReachabilityService::Client#rerun_connectivity_test. +# +def rerun_connectivity_test + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::NetworkManagement::V1::ReachabilityService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::NetworkManagement::V1::RerunConnectivityTestRequest.new + + # Call the rerun_connectivity_test method. + result = client.rerun_connectivity_test 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 networkmanagement_v1_generated_ReachabilityService_RerunConnectivityTest_sync] diff --git a/owl-bot-staging/google-cloud-network_management-v1/snippets/reachability_service/update_connectivity_test.rb b/owl-bot-staging/google-cloud-network_management-v1/snippets/reachability_service/update_connectivity_test.rb new file mode 100644 index 000000000000..46f847fcd050 --- /dev/null +++ b/owl-bot-staging/google-cloud-network_management-v1/snippets/reachability_service/update_connectivity_test.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 networkmanagement_v1_generated_ReachabilityService_UpdateConnectivityTest_sync] +require "google/cloud/network_management/v1" + +## +# Snippet for the update_connectivity_test call in the ReachabilityService 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::NetworkManagement::V1::ReachabilityService::Client#update_connectivity_test. +# +def update_connectivity_test + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::NetworkManagement::V1::ReachabilityService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::NetworkManagement::V1::UpdateConnectivityTestRequest.new + + # Call the update_connectivity_test method. + result = client.update_connectivity_test 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 networkmanagement_v1_generated_ReachabilityService_UpdateConnectivityTest_sync] diff --git a/owl-bot-staging/google-cloud-network_management-v1/snippets/snippet_metadata_google.cloud.networkmanagement.v1.json b/owl-bot-staging/google-cloud-network_management-v1/snippets/snippet_metadata_google.cloud.networkmanagement.v1.json new file mode 100644 index 000000000000..eb7362dd7c3f --- /dev/null +++ b/owl-bot-staging/google-cloud-network_management-v1/snippets/snippet_metadata_google.cloud.networkmanagement.v1.json @@ -0,0 +1,735 @@ +{ + "client_library": { + "name": "google-cloud-network_management-v1", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.cloud.networkmanagement.v1", + "version": "v1" + } + ] + }, + "snippets": [ + { + "region_tag": "networkmanagement_v1_generated_ReachabilityService_ListConnectivityTests_sync", + "title": "Snippet for the list_connectivity_tests call in the ReachabilityService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkManagement::V1::ReachabilityService::Client#list_connectivity_tests.", + "file": "reachability_service/list_connectivity_tests.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_connectivity_tests", + "full_name": "::Google::Cloud::NetworkManagement::V1::ReachabilityService::Client#list_connectivity_tests", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::NetworkManagement::V1::ListConnectivityTestsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::NetworkManagement::V1::ListConnectivityTestsResponse", + "client": { + "short_name": "ReachabilityService::Client", + "full_name": "::Google::Cloud::NetworkManagement::V1::ReachabilityService::Client" + }, + "method": { + "short_name": "ListConnectivityTests", + "full_name": "google.cloud.networkmanagement.v1.ReachabilityService.ListConnectivityTests", + "service": { + "short_name": "ReachabilityService", + "full_name": "google.cloud.networkmanagement.v1.ReachabilityService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "networkmanagement_v1_generated_ReachabilityService_GetConnectivityTest_sync", + "title": "Snippet for the get_connectivity_test call in the ReachabilityService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkManagement::V1::ReachabilityService::Client#get_connectivity_test.", + "file": "reachability_service/get_connectivity_test.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_connectivity_test", + "full_name": "::Google::Cloud::NetworkManagement::V1::ReachabilityService::Client#get_connectivity_test", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::NetworkManagement::V1::GetConnectivityTestRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::NetworkManagement::V1::ConnectivityTest", + "client": { + "short_name": "ReachabilityService::Client", + "full_name": "::Google::Cloud::NetworkManagement::V1::ReachabilityService::Client" + }, + "method": { + "short_name": "GetConnectivityTest", + "full_name": "google.cloud.networkmanagement.v1.ReachabilityService.GetConnectivityTest", + "service": { + "short_name": "ReachabilityService", + "full_name": "google.cloud.networkmanagement.v1.ReachabilityService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "networkmanagement_v1_generated_ReachabilityService_CreateConnectivityTest_sync", + "title": "Snippet for the create_connectivity_test call in the ReachabilityService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkManagement::V1::ReachabilityService::Client#create_connectivity_test.", + "file": "reachability_service/create_connectivity_test.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_connectivity_test", + "full_name": "::Google::Cloud::NetworkManagement::V1::ReachabilityService::Client#create_connectivity_test", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::NetworkManagement::V1::CreateConnectivityTestRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "ReachabilityService::Client", + "full_name": "::Google::Cloud::NetworkManagement::V1::ReachabilityService::Client" + }, + "method": { + "short_name": "CreateConnectivityTest", + "full_name": "google.cloud.networkmanagement.v1.ReachabilityService.CreateConnectivityTest", + "service": { + "short_name": "ReachabilityService", + "full_name": "google.cloud.networkmanagement.v1.ReachabilityService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "networkmanagement_v1_generated_ReachabilityService_UpdateConnectivityTest_sync", + "title": "Snippet for the update_connectivity_test call in the ReachabilityService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkManagement::V1::ReachabilityService::Client#update_connectivity_test.", + "file": "reachability_service/update_connectivity_test.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_connectivity_test", + "full_name": "::Google::Cloud::NetworkManagement::V1::ReachabilityService::Client#update_connectivity_test", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::NetworkManagement::V1::UpdateConnectivityTestRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "ReachabilityService::Client", + "full_name": "::Google::Cloud::NetworkManagement::V1::ReachabilityService::Client" + }, + "method": { + "short_name": "UpdateConnectivityTest", + "full_name": "google.cloud.networkmanagement.v1.ReachabilityService.UpdateConnectivityTest", + "service": { + "short_name": "ReachabilityService", + "full_name": "google.cloud.networkmanagement.v1.ReachabilityService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "networkmanagement_v1_generated_ReachabilityService_RerunConnectivityTest_sync", + "title": "Snippet for the rerun_connectivity_test call in the ReachabilityService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkManagement::V1::ReachabilityService::Client#rerun_connectivity_test.", + "file": "reachability_service/rerun_connectivity_test.rb", + "language": "RUBY", + "client_method": { + "short_name": "rerun_connectivity_test", + "full_name": "::Google::Cloud::NetworkManagement::V1::ReachabilityService::Client#rerun_connectivity_test", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::NetworkManagement::V1::RerunConnectivityTestRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "ReachabilityService::Client", + "full_name": "::Google::Cloud::NetworkManagement::V1::ReachabilityService::Client" + }, + "method": { + "short_name": "RerunConnectivityTest", + "full_name": "google.cloud.networkmanagement.v1.ReachabilityService.RerunConnectivityTest", + "service": { + "short_name": "ReachabilityService", + "full_name": "google.cloud.networkmanagement.v1.ReachabilityService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "networkmanagement_v1_generated_ReachabilityService_DeleteConnectivityTest_sync", + "title": "Snippet for the delete_connectivity_test call in the ReachabilityService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkManagement::V1::ReachabilityService::Client#delete_connectivity_test.", + "file": "reachability_service/delete_connectivity_test.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_connectivity_test", + "full_name": "::Google::Cloud::NetworkManagement::V1::ReachabilityService::Client#delete_connectivity_test", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::NetworkManagement::V1::DeleteConnectivityTestRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "ReachabilityService::Client", + "full_name": "::Google::Cloud::NetworkManagement::V1::ReachabilityService::Client" + }, + "method": { + "short_name": "DeleteConnectivityTest", + "full_name": "google.cloud.networkmanagement.v1.ReachabilityService.DeleteConnectivityTest", + "service": { + "short_name": "ReachabilityService", + "full_name": "google.cloud.networkmanagement.v1.ReachabilityService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "networkmanagement_v1_generated_VpcFlowLogsService_ListVpcFlowLogsConfigs_sync", + "title": "Snippet for the list_vpc_flow_logs_configs call in the VpcFlowLogsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkManagement::V1::VpcFlowLogsService::Client#list_vpc_flow_logs_configs.", + "file": "vpc_flow_logs_service/list_vpc_flow_logs_configs.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_vpc_flow_logs_configs", + "full_name": "::Google::Cloud::NetworkManagement::V1::VpcFlowLogsService::Client#list_vpc_flow_logs_configs", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::NetworkManagement::V1::ListVpcFlowLogsConfigsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::NetworkManagement::V1::ListVpcFlowLogsConfigsResponse", + "client": { + "short_name": "VpcFlowLogsService::Client", + "full_name": "::Google::Cloud::NetworkManagement::V1::VpcFlowLogsService::Client" + }, + "method": { + "short_name": "ListVpcFlowLogsConfigs", + "full_name": "google.cloud.networkmanagement.v1.VpcFlowLogsService.ListVpcFlowLogsConfigs", + "service": { + "short_name": "VpcFlowLogsService", + "full_name": "google.cloud.networkmanagement.v1.VpcFlowLogsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "networkmanagement_v1_generated_VpcFlowLogsService_GetVpcFlowLogsConfig_sync", + "title": "Snippet for the get_vpc_flow_logs_config call in the VpcFlowLogsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkManagement::V1::VpcFlowLogsService::Client#get_vpc_flow_logs_config.", + "file": "vpc_flow_logs_service/get_vpc_flow_logs_config.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_vpc_flow_logs_config", + "full_name": "::Google::Cloud::NetworkManagement::V1::VpcFlowLogsService::Client#get_vpc_flow_logs_config", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::NetworkManagement::V1::GetVpcFlowLogsConfigRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::NetworkManagement::V1::VpcFlowLogsConfig", + "client": { + "short_name": "VpcFlowLogsService::Client", + "full_name": "::Google::Cloud::NetworkManagement::V1::VpcFlowLogsService::Client" + }, + "method": { + "short_name": "GetVpcFlowLogsConfig", + "full_name": "google.cloud.networkmanagement.v1.VpcFlowLogsService.GetVpcFlowLogsConfig", + "service": { + "short_name": "VpcFlowLogsService", + "full_name": "google.cloud.networkmanagement.v1.VpcFlowLogsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "networkmanagement_v1_generated_VpcFlowLogsService_CreateVpcFlowLogsConfig_sync", + "title": "Snippet for the create_vpc_flow_logs_config call in the VpcFlowLogsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkManagement::V1::VpcFlowLogsService::Client#create_vpc_flow_logs_config.", + "file": "vpc_flow_logs_service/create_vpc_flow_logs_config.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_vpc_flow_logs_config", + "full_name": "::Google::Cloud::NetworkManagement::V1::VpcFlowLogsService::Client#create_vpc_flow_logs_config", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::NetworkManagement::V1::CreateVpcFlowLogsConfigRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "VpcFlowLogsService::Client", + "full_name": "::Google::Cloud::NetworkManagement::V1::VpcFlowLogsService::Client" + }, + "method": { + "short_name": "CreateVpcFlowLogsConfig", + "full_name": "google.cloud.networkmanagement.v1.VpcFlowLogsService.CreateVpcFlowLogsConfig", + "service": { + "short_name": "VpcFlowLogsService", + "full_name": "google.cloud.networkmanagement.v1.VpcFlowLogsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "networkmanagement_v1_generated_VpcFlowLogsService_UpdateVpcFlowLogsConfig_sync", + "title": "Snippet for the update_vpc_flow_logs_config call in the VpcFlowLogsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkManagement::V1::VpcFlowLogsService::Client#update_vpc_flow_logs_config.", + "file": "vpc_flow_logs_service/update_vpc_flow_logs_config.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_vpc_flow_logs_config", + "full_name": "::Google::Cloud::NetworkManagement::V1::VpcFlowLogsService::Client#update_vpc_flow_logs_config", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::NetworkManagement::V1::UpdateVpcFlowLogsConfigRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "VpcFlowLogsService::Client", + "full_name": "::Google::Cloud::NetworkManagement::V1::VpcFlowLogsService::Client" + }, + "method": { + "short_name": "UpdateVpcFlowLogsConfig", + "full_name": "google.cloud.networkmanagement.v1.VpcFlowLogsService.UpdateVpcFlowLogsConfig", + "service": { + "short_name": "VpcFlowLogsService", + "full_name": "google.cloud.networkmanagement.v1.VpcFlowLogsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "networkmanagement_v1_generated_VpcFlowLogsService_DeleteVpcFlowLogsConfig_sync", + "title": "Snippet for the delete_vpc_flow_logs_config call in the VpcFlowLogsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkManagement::V1::VpcFlowLogsService::Client#delete_vpc_flow_logs_config.", + "file": "vpc_flow_logs_service/delete_vpc_flow_logs_config.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_vpc_flow_logs_config", + "full_name": "::Google::Cloud::NetworkManagement::V1::VpcFlowLogsService::Client#delete_vpc_flow_logs_config", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::NetworkManagement::V1::DeleteVpcFlowLogsConfigRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "VpcFlowLogsService::Client", + "full_name": "::Google::Cloud::NetworkManagement::V1::VpcFlowLogsService::Client" + }, + "method": { + "short_name": "DeleteVpcFlowLogsConfig", + "full_name": "google.cloud.networkmanagement.v1.VpcFlowLogsService.DeleteVpcFlowLogsConfig", + "service": { + "short_name": "VpcFlowLogsService", + "full_name": "google.cloud.networkmanagement.v1.VpcFlowLogsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "networkmanagement_v1_generated_VpcFlowLogsService_QueryOrgVpcFlowLogsConfigs_sync", + "title": "Snippet for the query_org_vpc_flow_logs_configs call in the VpcFlowLogsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkManagement::V1::VpcFlowLogsService::Client#query_org_vpc_flow_logs_configs.", + "file": "vpc_flow_logs_service/query_org_vpc_flow_logs_configs.rb", + "language": "RUBY", + "client_method": { + "short_name": "query_org_vpc_flow_logs_configs", + "full_name": "::Google::Cloud::NetworkManagement::V1::VpcFlowLogsService::Client#query_org_vpc_flow_logs_configs", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::NetworkManagement::V1::QueryOrgVpcFlowLogsConfigsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::NetworkManagement::V1::QueryOrgVpcFlowLogsConfigsResponse", + "client": { + "short_name": "VpcFlowLogsService::Client", + "full_name": "::Google::Cloud::NetworkManagement::V1::VpcFlowLogsService::Client" + }, + "method": { + "short_name": "QueryOrgVpcFlowLogsConfigs", + "full_name": "google.cloud.networkmanagement.v1.VpcFlowLogsService.QueryOrgVpcFlowLogsConfigs", + "service": { + "short_name": "VpcFlowLogsService", + "full_name": "google.cloud.networkmanagement.v1.VpcFlowLogsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "networkmanagement_v1_generated_VpcFlowLogsService_ShowEffectiveFlowLogsConfigs_sync", + "title": "Snippet for the show_effective_flow_logs_configs call in the VpcFlowLogsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkManagement::V1::VpcFlowLogsService::Client#show_effective_flow_logs_configs.", + "file": "vpc_flow_logs_service/show_effective_flow_logs_configs.rb", + "language": "RUBY", + "client_method": { + "short_name": "show_effective_flow_logs_configs", + "full_name": "::Google::Cloud::NetworkManagement::V1::VpcFlowLogsService::Client#show_effective_flow_logs_configs", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::NetworkManagement::V1::ShowEffectiveFlowLogsConfigsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::NetworkManagement::V1::ShowEffectiveFlowLogsConfigsResponse", + "client": { + "short_name": "VpcFlowLogsService::Client", + "full_name": "::Google::Cloud::NetworkManagement::V1::VpcFlowLogsService::Client" + }, + "method": { + "short_name": "ShowEffectiveFlowLogsConfigs", + "full_name": "google.cloud.networkmanagement.v1.VpcFlowLogsService.ShowEffectiveFlowLogsConfigs", + "service": { + "short_name": "VpcFlowLogsService", + "full_name": "google.cloud.networkmanagement.v1.VpcFlowLogsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "networkmanagement_v1_generated_OrganizationVpcFlowLogsService_ListVpcFlowLogsConfigs_sync", + "title": "Snippet for the list_vpc_flow_logs_configs call in the OrganizationVpcFlowLogsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkManagement::V1::OrganizationVpcFlowLogsService::Client#list_vpc_flow_logs_configs.", + "file": "organization_vpc_flow_logs_service/list_vpc_flow_logs_configs.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_vpc_flow_logs_configs", + "full_name": "::Google::Cloud::NetworkManagement::V1::OrganizationVpcFlowLogsService::Client#list_vpc_flow_logs_configs", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::NetworkManagement::V1::ListVpcFlowLogsConfigsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::NetworkManagement::V1::ListVpcFlowLogsConfigsResponse", + "client": { + "short_name": "OrganizationVpcFlowLogsService::Client", + "full_name": "::Google::Cloud::NetworkManagement::V1::OrganizationVpcFlowLogsService::Client" + }, + "method": { + "short_name": "ListVpcFlowLogsConfigs", + "full_name": "google.cloud.networkmanagement.v1.OrganizationVpcFlowLogsService.ListVpcFlowLogsConfigs", + "service": { + "short_name": "OrganizationVpcFlowLogsService", + "full_name": "google.cloud.networkmanagement.v1.OrganizationVpcFlowLogsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "networkmanagement_v1_generated_OrganizationVpcFlowLogsService_GetVpcFlowLogsConfig_sync", + "title": "Snippet for the get_vpc_flow_logs_config call in the OrganizationVpcFlowLogsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkManagement::V1::OrganizationVpcFlowLogsService::Client#get_vpc_flow_logs_config.", + "file": "organization_vpc_flow_logs_service/get_vpc_flow_logs_config.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_vpc_flow_logs_config", + "full_name": "::Google::Cloud::NetworkManagement::V1::OrganizationVpcFlowLogsService::Client#get_vpc_flow_logs_config", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::NetworkManagement::V1::GetVpcFlowLogsConfigRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::NetworkManagement::V1::VpcFlowLogsConfig", + "client": { + "short_name": "OrganizationVpcFlowLogsService::Client", + "full_name": "::Google::Cloud::NetworkManagement::V1::OrganizationVpcFlowLogsService::Client" + }, + "method": { + "short_name": "GetVpcFlowLogsConfig", + "full_name": "google.cloud.networkmanagement.v1.OrganizationVpcFlowLogsService.GetVpcFlowLogsConfig", + "service": { + "short_name": "OrganizationVpcFlowLogsService", + "full_name": "google.cloud.networkmanagement.v1.OrganizationVpcFlowLogsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "networkmanagement_v1_generated_OrganizationVpcFlowLogsService_CreateVpcFlowLogsConfig_sync", + "title": "Snippet for the create_vpc_flow_logs_config call in the OrganizationVpcFlowLogsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkManagement::V1::OrganizationVpcFlowLogsService::Client#create_vpc_flow_logs_config.", + "file": "organization_vpc_flow_logs_service/create_vpc_flow_logs_config.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_vpc_flow_logs_config", + "full_name": "::Google::Cloud::NetworkManagement::V1::OrganizationVpcFlowLogsService::Client#create_vpc_flow_logs_config", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::NetworkManagement::V1::CreateVpcFlowLogsConfigRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "OrganizationVpcFlowLogsService::Client", + "full_name": "::Google::Cloud::NetworkManagement::V1::OrganizationVpcFlowLogsService::Client" + }, + "method": { + "short_name": "CreateVpcFlowLogsConfig", + "full_name": "google.cloud.networkmanagement.v1.OrganizationVpcFlowLogsService.CreateVpcFlowLogsConfig", + "service": { + "short_name": "OrganizationVpcFlowLogsService", + "full_name": "google.cloud.networkmanagement.v1.OrganizationVpcFlowLogsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "networkmanagement_v1_generated_OrganizationVpcFlowLogsService_UpdateVpcFlowLogsConfig_sync", + "title": "Snippet for the update_vpc_flow_logs_config call in the OrganizationVpcFlowLogsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkManagement::V1::OrganizationVpcFlowLogsService::Client#update_vpc_flow_logs_config.", + "file": "organization_vpc_flow_logs_service/update_vpc_flow_logs_config.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_vpc_flow_logs_config", + "full_name": "::Google::Cloud::NetworkManagement::V1::OrganizationVpcFlowLogsService::Client#update_vpc_flow_logs_config", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::NetworkManagement::V1::UpdateVpcFlowLogsConfigRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "OrganizationVpcFlowLogsService::Client", + "full_name": "::Google::Cloud::NetworkManagement::V1::OrganizationVpcFlowLogsService::Client" + }, + "method": { + "short_name": "UpdateVpcFlowLogsConfig", + "full_name": "google.cloud.networkmanagement.v1.OrganizationVpcFlowLogsService.UpdateVpcFlowLogsConfig", + "service": { + "short_name": "OrganizationVpcFlowLogsService", + "full_name": "google.cloud.networkmanagement.v1.OrganizationVpcFlowLogsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "networkmanagement_v1_generated_OrganizationVpcFlowLogsService_DeleteVpcFlowLogsConfig_sync", + "title": "Snippet for the delete_vpc_flow_logs_config call in the OrganizationVpcFlowLogsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkManagement::V1::OrganizationVpcFlowLogsService::Client#delete_vpc_flow_logs_config.", + "file": "organization_vpc_flow_logs_service/delete_vpc_flow_logs_config.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_vpc_flow_logs_config", + "full_name": "::Google::Cloud::NetworkManagement::V1::OrganizationVpcFlowLogsService::Client#delete_vpc_flow_logs_config", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::NetworkManagement::V1::DeleteVpcFlowLogsConfigRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "OrganizationVpcFlowLogsService::Client", + "full_name": "::Google::Cloud::NetworkManagement::V1::OrganizationVpcFlowLogsService::Client" + }, + "method": { + "short_name": "DeleteVpcFlowLogsConfig", + "full_name": "google.cloud.networkmanagement.v1.OrganizationVpcFlowLogsService.DeleteVpcFlowLogsConfig", + "service": { + "short_name": "OrganizationVpcFlowLogsService", + "full_name": "google.cloud.networkmanagement.v1.OrganizationVpcFlowLogsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + } + ] +} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-network_management-v1/snippets/vpc_flow_logs_service/create_vpc_flow_logs_config.rb b/owl-bot-staging/google-cloud-network_management-v1/snippets/vpc_flow_logs_service/create_vpc_flow_logs_config.rb new file mode 100644 index 000000000000..30a78d9aed8c --- /dev/null +++ b/owl-bot-staging/google-cloud-network_management-v1/snippets/vpc_flow_logs_service/create_vpc_flow_logs_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 networkmanagement_v1_generated_VpcFlowLogsService_CreateVpcFlowLogsConfig_sync] +require "google/cloud/network_management/v1" + +## +# Snippet for the create_vpc_flow_logs_config call in the VpcFlowLogsService 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::NetworkManagement::V1::VpcFlowLogsService::Client#create_vpc_flow_logs_config. +# +def create_vpc_flow_logs_config + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::NetworkManagement::V1::VpcFlowLogsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::NetworkManagement::V1::CreateVpcFlowLogsConfigRequest.new + + # Call the create_vpc_flow_logs_config method. + result = client.create_vpc_flow_logs_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 networkmanagement_v1_generated_VpcFlowLogsService_CreateVpcFlowLogsConfig_sync] diff --git a/owl-bot-staging/google-cloud-network_management-v1/snippets/vpc_flow_logs_service/delete_vpc_flow_logs_config.rb b/owl-bot-staging/google-cloud-network_management-v1/snippets/vpc_flow_logs_service/delete_vpc_flow_logs_config.rb new file mode 100644 index 000000000000..51c13a0ef243 --- /dev/null +++ b/owl-bot-staging/google-cloud-network_management-v1/snippets/vpc_flow_logs_service/delete_vpc_flow_logs_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 networkmanagement_v1_generated_VpcFlowLogsService_DeleteVpcFlowLogsConfig_sync] +require "google/cloud/network_management/v1" + +## +# Snippet for the delete_vpc_flow_logs_config call in the VpcFlowLogsService 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::NetworkManagement::V1::VpcFlowLogsService::Client#delete_vpc_flow_logs_config. +# +def delete_vpc_flow_logs_config + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::NetworkManagement::V1::VpcFlowLogsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::NetworkManagement::V1::DeleteVpcFlowLogsConfigRequest.new + + # Call the delete_vpc_flow_logs_config method. + result = client.delete_vpc_flow_logs_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 networkmanagement_v1_generated_VpcFlowLogsService_DeleteVpcFlowLogsConfig_sync] diff --git a/owl-bot-staging/google-cloud-network_management-v1/snippets/vpc_flow_logs_service/get_vpc_flow_logs_config.rb b/owl-bot-staging/google-cloud-network_management-v1/snippets/vpc_flow_logs_service/get_vpc_flow_logs_config.rb new file mode 100644 index 000000000000..8d8c03008f82 --- /dev/null +++ b/owl-bot-staging/google-cloud-network_management-v1/snippets/vpc_flow_logs_service/get_vpc_flow_logs_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 networkmanagement_v1_generated_VpcFlowLogsService_GetVpcFlowLogsConfig_sync] +require "google/cloud/network_management/v1" + +## +# Snippet for the get_vpc_flow_logs_config call in the VpcFlowLogsService 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::NetworkManagement::V1::VpcFlowLogsService::Client#get_vpc_flow_logs_config. +# +def get_vpc_flow_logs_config + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::NetworkManagement::V1::VpcFlowLogsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::NetworkManagement::V1::GetVpcFlowLogsConfigRequest.new + + # Call the get_vpc_flow_logs_config method. + result = client.get_vpc_flow_logs_config request + + # The returned object is of type Google::Cloud::NetworkManagement::V1::VpcFlowLogsConfig. + p result +end +# [END networkmanagement_v1_generated_VpcFlowLogsService_GetVpcFlowLogsConfig_sync] diff --git a/owl-bot-staging/google-cloud-network_management-v1/snippets/vpc_flow_logs_service/list_vpc_flow_logs_configs.rb b/owl-bot-staging/google-cloud-network_management-v1/snippets/vpc_flow_logs_service/list_vpc_flow_logs_configs.rb new file mode 100644 index 000000000000..9587077a8704 --- /dev/null +++ b/owl-bot-staging/google-cloud-network_management-v1/snippets/vpc_flow_logs_service/list_vpc_flow_logs_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 networkmanagement_v1_generated_VpcFlowLogsService_ListVpcFlowLogsConfigs_sync] +require "google/cloud/network_management/v1" + +## +# Snippet for the list_vpc_flow_logs_configs call in the VpcFlowLogsService 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::NetworkManagement::V1::VpcFlowLogsService::Client#list_vpc_flow_logs_configs. +# +def list_vpc_flow_logs_configs + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::NetworkManagement::V1::VpcFlowLogsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::NetworkManagement::V1::ListVpcFlowLogsConfigsRequest.new + + # Call the list_vpc_flow_logs_configs method. + result = client.list_vpc_flow_logs_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::NetworkManagement::V1::VpcFlowLogsConfig. + p item + end +end +# [END networkmanagement_v1_generated_VpcFlowLogsService_ListVpcFlowLogsConfigs_sync] diff --git a/owl-bot-staging/google-cloud-network_management-v1/snippets/vpc_flow_logs_service/query_org_vpc_flow_logs_configs.rb b/owl-bot-staging/google-cloud-network_management-v1/snippets/vpc_flow_logs_service/query_org_vpc_flow_logs_configs.rb new file mode 100644 index 000000000000..549bd301b646 --- /dev/null +++ b/owl-bot-staging/google-cloud-network_management-v1/snippets/vpc_flow_logs_service/query_org_vpc_flow_logs_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 networkmanagement_v1_generated_VpcFlowLogsService_QueryOrgVpcFlowLogsConfigs_sync] +require "google/cloud/network_management/v1" + +## +# Snippet for the query_org_vpc_flow_logs_configs call in the VpcFlowLogsService 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::NetworkManagement::V1::VpcFlowLogsService::Client#query_org_vpc_flow_logs_configs. +# +def query_org_vpc_flow_logs_configs + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::NetworkManagement::V1::VpcFlowLogsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::NetworkManagement::V1::QueryOrgVpcFlowLogsConfigsRequest.new + + # Call the query_org_vpc_flow_logs_configs method. + result = client.query_org_vpc_flow_logs_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::NetworkManagement::V1::VpcFlowLogsConfig. + p item + end +end +# [END networkmanagement_v1_generated_VpcFlowLogsService_QueryOrgVpcFlowLogsConfigs_sync] diff --git a/owl-bot-staging/google-cloud-network_management-v1/snippets/vpc_flow_logs_service/show_effective_flow_logs_configs.rb b/owl-bot-staging/google-cloud-network_management-v1/snippets/vpc_flow_logs_service/show_effective_flow_logs_configs.rb new file mode 100644 index 000000000000..a1bacbc41c68 --- /dev/null +++ b/owl-bot-staging/google-cloud-network_management-v1/snippets/vpc_flow_logs_service/show_effective_flow_logs_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 networkmanagement_v1_generated_VpcFlowLogsService_ShowEffectiveFlowLogsConfigs_sync] +require "google/cloud/network_management/v1" + +## +# Snippet for the show_effective_flow_logs_configs call in the VpcFlowLogsService 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::NetworkManagement::V1::VpcFlowLogsService::Client#show_effective_flow_logs_configs. +# +def show_effective_flow_logs_configs + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::NetworkManagement::V1::VpcFlowLogsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::NetworkManagement::V1::ShowEffectiveFlowLogsConfigsRequest.new + + # Call the show_effective_flow_logs_configs method. + result = client.show_effective_flow_logs_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::NetworkManagement::V1::EffectiveVpcFlowLogsConfig. + p item + end +end +# [END networkmanagement_v1_generated_VpcFlowLogsService_ShowEffectiveFlowLogsConfigs_sync] diff --git a/owl-bot-staging/google-cloud-network_management-v1/snippets/vpc_flow_logs_service/update_vpc_flow_logs_config.rb b/owl-bot-staging/google-cloud-network_management-v1/snippets/vpc_flow_logs_service/update_vpc_flow_logs_config.rb new file mode 100644 index 000000000000..7b75358df2b0 --- /dev/null +++ b/owl-bot-staging/google-cloud-network_management-v1/snippets/vpc_flow_logs_service/update_vpc_flow_logs_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 networkmanagement_v1_generated_VpcFlowLogsService_UpdateVpcFlowLogsConfig_sync] +require "google/cloud/network_management/v1" + +## +# Snippet for the update_vpc_flow_logs_config call in the VpcFlowLogsService 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::NetworkManagement::V1::VpcFlowLogsService::Client#update_vpc_flow_logs_config. +# +def update_vpc_flow_logs_config + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::NetworkManagement::V1::VpcFlowLogsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::NetworkManagement::V1::UpdateVpcFlowLogsConfigRequest.new + + # Call the update_vpc_flow_logs_config method. + result = client.update_vpc_flow_logs_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 networkmanagement_v1_generated_VpcFlowLogsService_UpdateVpcFlowLogsConfig_sync] diff --git a/owl-bot-staging/google-cloud-network_management-v1/test/google/cloud/network_management/v1/organization_vpc_flow_logs_service_operations_test.rb b/owl-bot-staging/google-cloud-network_management-v1/test/google/cloud/network_management/v1/organization_vpc_flow_logs_service_operations_test.rb new file mode 100644 index 000000000000..a448fb1f440a --- /dev/null +++ b/owl-bot-staging/google-cloud-network_management-v1/test/google/cloud/network_management/v1/organization_vpc_flow_logs_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/networkmanagement/v1/vpc_flow_logs_pb" +require "google/cloud/networkmanagement/v1/vpc_flow_logs_services_pb" +require "google/cloud/network_management/v1/organization_vpc_flow_logs_service" + +class ::Google::Cloud::NetworkManagement::V1::OrganizationVpcFlowLogsService::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::NetworkManagement::V1::OrganizationVpcFlowLogsService::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::NetworkManagement::V1::OrganizationVpcFlowLogsService::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::NetworkManagement::V1::OrganizationVpcFlowLogsService::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::NetworkManagement::V1::OrganizationVpcFlowLogsService::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::NetworkManagement::V1::OrganizationVpcFlowLogsService::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::NetworkManagement::V1::OrganizationVpcFlowLogsService::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::NetworkManagement::V1::OrganizationVpcFlowLogsService::Operations::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-network_management-v1/test/google/cloud/network_management/v1/organization_vpc_flow_logs_service_paths_test.rb b/owl-bot-staging/google-cloud-network_management-v1/test/google/cloud/network_management/v1/organization_vpc_flow_logs_service_paths_test.rb new file mode 100644 index 000000000000..11252bd84220 --- /dev/null +++ b/owl-bot-staging/google-cloud-network_management-v1/test/google/cloud/network_management/v1/organization_vpc_flow_logs_service_paths_test.rb @@ -0,0 +1,82 @@ +# 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/network_management/v1/organization_vpc_flow_logs_service" + +class ::Google::Cloud::NetworkManagement::V1::OrganizationVpcFlowLogsService::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_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::NetworkManagement::V1::OrganizationVpcFlowLogsService::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_organization_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::NetworkManagement::V1::OrganizationVpcFlowLogsService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.organization_location_path organization: "value0", location: "value1" + assert_equal "organizations/value0/locations/value1", path + end + end + + def test_vpc_flow_logs_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::NetworkManagement::V1::OrganizationVpcFlowLogsService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.vpc_flow_logs_config_path project: "value0", location: "value1", vpc_flow_logs_config: "value2" + assert_equal "projects/value0/locations/value1/vpcFlowLogsConfigs/value2", path + + path = client.vpc_flow_logs_config_path organization: "value0", location: "value1", vpc_flow_logs_config: "value2" + assert_equal "organizations/value0/locations/value1/vpcFlowLogsConfigs/value2", path + end + end +end diff --git a/owl-bot-staging/google-cloud-network_management-v1/test/google/cloud/network_management/v1/organization_vpc_flow_logs_service_rest_test.rb b/owl-bot-staging/google-cloud-network_management-v1/test/google/cloud/network_management/v1/organization_vpc_flow_logs_service_rest_test.rb new file mode 100644 index 000000000000..ec569eb321c0 --- /dev/null +++ b/owl-bot-staging/google-cloud-network_management-v1/test/google/cloud/network_management/v1/organization_vpc_flow_logs_service_rest_test.rb @@ -0,0 +1,376 @@ +# 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/networkmanagement/v1/vpc_flow_logs_pb" +require "google/cloud/network_management/v1/organization_vpc_flow_logs_service/rest" + + +class ::Google::Cloud::NetworkManagement::V1::OrganizationVpcFlowLogsService::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_vpc_flow_logs_configs + # Create test objects. + client_result = ::Google::Cloud::NetworkManagement::V1::ListVpcFlowLogsConfigsResponse.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_vpc_flow_logs_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::NetworkManagement::V1::OrganizationVpcFlowLogsService::Rest::ServiceStub.stub :transcode_list_vpc_flow_logs_configs_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_vpc_flow_logs_configs_client_stub do + # Create client + client = ::Google::Cloud::NetworkManagement::V1::OrganizationVpcFlowLogsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_vpc_flow_logs_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_vpc_flow_logs_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_vpc_flow_logs_configs ::Google::Cloud::NetworkManagement::V1::ListVpcFlowLogsConfigsRequest.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_vpc_flow_logs_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_vpc_flow_logs_configs(::Google::Cloud::NetworkManagement::V1::ListVpcFlowLogsConfigsRequest.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_vpc_flow_logs_configs_client_stub.call_count + end + end + end + + def test_get_vpc_flow_logs_config + # Create test objects. + client_result = ::Google::Cloud::NetworkManagement::V1::VpcFlowLogsConfig.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_vpc_flow_logs_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::NetworkManagement::V1::OrganizationVpcFlowLogsService::Rest::ServiceStub.stub :transcode_get_vpc_flow_logs_config_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_vpc_flow_logs_config_client_stub do + # Create client + client = ::Google::Cloud::NetworkManagement::V1::OrganizationVpcFlowLogsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_vpc_flow_logs_config({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_vpc_flow_logs_config name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_vpc_flow_logs_config ::Google::Cloud::NetworkManagement::V1::GetVpcFlowLogsConfigRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_vpc_flow_logs_config({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_vpc_flow_logs_config(::Google::Cloud::NetworkManagement::V1::GetVpcFlowLogsConfigRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_vpc_flow_logs_config_client_stub.call_count + end + end + end + + def test_create_vpc_flow_logs_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" + vpc_flow_logs_config_id = "hello world" + vpc_flow_logs_config = {} + + create_vpc_flow_logs_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::NetworkManagement::V1::OrganizationVpcFlowLogsService::Rest::ServiceStub.stub :transcode_create_vpc_flow_logs_config_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_vpc_flow_logs_config_client_stub do + # Create client + client = ::Google::Cloud::NetworkManagement::V1::OrganizationVpcFlowLogsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_vpc_flow_logs_config({ parent: parent, vpc_flow_logs_config_id: vpc_flow_logs_config_id, vpc_flow_logs_config: vpc_flow_logs_config }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_vpc_flow_logs_config parent: parent, vpc_flow_logs_config_id: vpc_flow_logs_config_id, vpc_flow_logs_config: vpc_flow_logs_config do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_vpc_flow_logs_config ::Google::Cloud::NetworkManagement::V1::CreateVpcFlowLogsConfigRequest.new(parent: parent, vpc_flow_logs_config_id: vpc_flow_logs_config_id, vpc_flow_logs_config: vpc_flow_logs_config) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_vpc_flow_logs_config({ parent: parent, vpc_flow_logs_config_id: vpc_flow_logs_config_id, vpc_flow_logs_config: vpc_flow_logs_config }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_vpc_flow_logs_config(::Google::Cloud::NetworkManagement::V1::CreateVpcFlowLogsConfigRequest.new(parent: parent, vpc_flow_logs_config_id: vpc_flow_logs_config_id, vpc_flow_logs_config: vpc_flow_logs_config), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_vpc_flow_logs_config_client_stub.call_count + end + end + end + + def test_update_vpc_flow_logs_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. + update_mask = {} + vpc_flow_logs_config = {} + + update_vpc_flow_logs_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::NetworkManagement::V1::OrganizationVpcFlowLogsService::Rest::ServiceStub.stub :transcode_update_vpc_flow_logs_config_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_vpc_flow_logs_config_client_stub do + # Create client + client = ::Google::Cloud::NetworkManagement::V1::OrganizationVpcFlowLogsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_vpc_flow_logs_config({ update_mask: update_mask, vpc_flow_logs_config: vpc_flow_logs_config }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_vpc_flow_logs_config update_mask: update_mask, vpc_flow_logs_config: vpc_flow_logs_config do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_vpc_flow_logs_config ::Google::Cloud::NetworkManagement::V1::UpdateVpcFlowLogsConfigRequest.new(update_mask: update_mask, vpc_flow_logs_config: vpc_flow_logs_config) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_vpc_flow_logs_config({ update_mask: update_mask, vpc_flow_logs_config: vpc_flow_logs_config }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_vpc_flow_logs_config(::Google::Cloud::NetworkManagement::V1::UpdateVpcFlowLogsConfigRequest.new(update_mask: update_mask, vpc_flow_logs_config: vpc_flow_logs_config), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_vpc_flow_logs_config_client_stub.call_count + end + end + end + + def test_delete_vpc_flow_logs_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" + + delete_vpc_flow_logs_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::NetworkManagement::V1::OrganizationVpcFlowLogsService::Rest::ServiceStub.stub :transcode_delete_vpc_flow_logs_config_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_vpc_flow_logs_config_client_stub do + # Create client + client = ::Google::Cloud::NetworkManagement::V1::OrganizationVpcFlowLogsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_vpc_flow_logs_config({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_vpc_flow_logs_config name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_vpc_flow_logs_config ::Google::Cloud::NetworkManagement::V1::DeleteVpcFlowLogsConfigRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_vpc_flow_logs_config({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_vpc_flow_logs_config(::Google::Cloud::NetworkManagement::V1::DeleteVpcFlowLogsConfigRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_vpc_flow_logs_config_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::NetworkManagement::V1::OrganizationVpcFlowLogsService::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::NetworkManagement::V1::OrganizationVpcFlowLogsService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-network_management-v1/test/google/cloud/network_management/v1/organization_vpc_flow_logs_service_test.rb b/owl-bot-staging/google-cloud-network_management-v1/test/google/cloud/network_management/v1/organization_vpc_flow_logs_service_test.rb new file mode 100644 index 000000000000..ba373a39ecfb --- /dev/null +++ b/owl-bot-staging/google-cloud-network_management-v1/test/google/cloud/network_management/v1/organization_vpc_flow_logs_service_test.rb @@ -0,0 +1,442 @@ +# 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/networkmanagement/v1/vpc_flow_logs_pb" +require "google/cloud/network_management/v1/organization_vpc_flow_logs_service" + +class ::Google::Cloud::NetworkManagement::V1::OrganizationVpcFlowLogsService::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_vpc_flow_logs_configs + # Create GRPC objects. + grpc_response = ::Google::Cloud::NetworkManagement::V1::ListVpcFlowLogsConfigsResponse.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_vpc_flow_logs_configs_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_vpc_flow_logs_configs, name + assert_kind_of ::Google::Cloud::NetworkManagement::V1::ListVpcFlowLogsConfigsRequest, 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_vpc_flow_logs_configs_client_stub do + # Create client + client = ::Google::Cloud::NetworkManagement::V1::OrganizationVpcFlowLogsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_vpc_flow_logs_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_vpc_flow_logs_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_vpc_flow_logs_configs ::Google::Cloud::NetworkManagement::V1::ListVpcFlowLogsConfigsRequest.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_vpc_flow_logs_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_vpc_flow_logs_configs(::Google::Cloud::NetworkManagement::V1::ListVpcFlowLogsConfigsRequest.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_vpc_flow_logs_configs_client_stub.call_rpc_count + end + end + + def test_get_vpc_flow_logs_config + # Create GRPC objects. + grpc_response = ::Google::Cloud::NetworkManagement::V1::VpcFlowLogsConfig.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_vpc_flow_logs_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_vpc_flow_logs_config, name + assert_kind_of ::Google::Cloud::NetworkManagement::V1::GetVpcFlowLogsConfigRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_vpc_flow_logs_config_client_stub do + # Create client + client = ::Google::Cloud::NetworkManagement::V1::OrganizationVpcFlowLogsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_vpc_flow_logs_config({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_vpc_flow_logs_config name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_vpc_flow_logs_config ::Google::Cloud::NetworkManagement::V1::GetVpcFlowLogsConfigRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_vpc_flow_logs_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_vpc_flow_logs_config(::Google::Cloud::NetworkManagement::V1::GetVpcFlowLogsConfigRequest.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_vpc_flow_logs_config_client_stub.call_rpc_count + end + end + + def test_create_vpc_flow_logs_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" + vpc_flow_logs_config_id = "hello world" + vpc_flow_logs_config = {} + + create_vpc_flow_logs_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_vpc_flow_logs_config, name + assert_kind_of ::Google::Cloud::NetworkManagement::V1::CreateVpcFlowLogsConfigRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["vpc_flow_logs_config_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::NetworkManagement::V1::VpcFlowLogsConfig), request["vpc_flow_logs_config"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_vpc_flow_logs_config_client_stub do + # Create client + client = ::Google::Cloud::NetworkManagement::V1::OrganizationVpcFlowLogsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_vpc_flow_logs_config({ parent: parent, vpc_flow_logs_config_id: vpc_flow_logs_config_id, vpc_flow_logs_config: vpc_flow_logs_config }) 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_vpc_flow_logs_config parent: parent, vpc_flow_logs_config_id: vpc_flow_logs_config_id, vpc_flow_logs_config: vpc_flow_logs_config 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_vpc_flow_logs_config ::Google::Cloud::NetworkManagement::V1::CreateVpcFlowLogsConfigRequest.new(parent: parent, vpc_flow_logs_config_id: vpc_flow_logs_config_id, vpc_flow_logs_config: vpc_flow_logs_config) 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_vpc_flow_logs_config({ parent: parent, vpc_flow_logs_config_id: vpc_flow_logs_config_id, vpc_flow_logs_config: vpc_flow_logs_config }, 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_vpc_flow_logs_config(::Google::Cloud::NetworkManagement::V1::CreateVpcFlowLogsConfigRequest.new(parent: parent, vpc_flow_logs_config_id: vpc_flow_logs_config_id, vpc_flow_logs_config: vpc_flow_logs_config), 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_vpc_flow_logs_config_client_stub.call_rpc_count + end + end + + def test_update_vpc_flow_logs_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. + update_mask = {} + vpc_flow_logs_config = {} + + update_vpc_flow_logs_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_vpc_flow_logs_config, name + assert_kind_of ::Google::Cloud::NetworkManagement::V1::UpdateVpcFlowLogsConfigRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::NetworkManagement::V1::VpcFlowLogsConfig), request["vpc_flow_logs_config"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_vpc_flow_logs_config_client_stub do + # Create client + client = ::Google::Cloud::NetworkManagement::V1::OrganizationVpcFlowLogsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_vpc_flow_logs_config({ update_mask: update_mask, vpc_flow_logs_config: vpc_flow_logs_config }) 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_vpc_flow_logs_config update_mask: update_mask, vpc_flow_logs_config: vpc_flow_logs_config 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_vpc_flow_logs_config ::Google::Cloud::NetworkManagement::V1::UpdateVpcFlowLogsConfigRequest.new(update_mask: update_mask, vpc_flow_logs_config: vpc_flow_logs_config) 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_vpc_flow_logs_config({ update_mask: update_mask, vpc_flow_logs_config: vpc_flow_logs_config }, 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_vpc_flow_logs_config(::Google::Cloud::NetworkManagement::V1::UpdateVpcFlowLogsConfigRequest.new(update_mask: update_mask, vpc_flow_logs_config: vpc_flow_logs_config), 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_vpc_flow_logs_config_client_stub.call_rpc_count + end + end + + def test_delete_vpc_flow_logs_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" + + delete_vpc_flow_logs_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_vpc_flow_logs_config, name + assert_kind_of ::Google::Cloud::NetworkManagement::V1::DeleteVpcFlowLogsConfigRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_vpc_flow_logs_config_client_stub do + # Create client + client = ::Google::Cloud::NetworkManagement::V1::OrganizationVpcFlowLogsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_vpc_flow_logs_config({ 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_vpc_flow_logs_config 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_vpc_flow_logs_config ::Google::Cloud::NetworkManagement::V1::DeleteVpcFlowLogsConfigRequest.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_vpc_flow_logs_config({ 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_vpc_flow_logs_config(::Google::Cloud::NetworkManagement::V1::DeleteVpcFlowLogsConfigRequest.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_vpc_flow_logs_config_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::NetworkManagement::V1::OrganizationVpcFlowLogsService::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::NetworkManagement::V1::OrganizationVpcFlowLogsService::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::NetworkManagement::V1::OrganizationVpcFlowLogsService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::NetworkManagement::V1::OrganizationVpcFlowLogsService::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::NetworkManagement::V1::OrganizationVpcFlowLogsService::Client.new do |config| + config.credentials = grpc_channel + end + end + + assert_kind_of ::Google::Cloud::NetworkManagement::V1::OrganizationVpcFlowLogsService::Operations, client.operations_client + end +end diff --git a/owl-bot-staging/google-cloud-network_management-v1/test/google/cloud/network_management/v1/reachability_service_operations_test.rb b/owl-bot-staging/google-cloud-network_management-v1/test/google/cloud/network_management/v1/reachability_service_operations_test.rb new file mode 100644 index 000000000000..eb836b0f3ceb --- /dev/null +++ b/owl-bot-staging/google-cloud-network_management-v1/test/google/cloud/network_management/v1/reachability_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/networkmanagement/v1/reachability_pb" +require "google/cloud/networkmanagement/v1/reachability_services_pb" +require "google/cloud/network_management/v1/reachability_service" + +class ::Google::Cloud::NetworkManagement::V1::ReachabilityService::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::NetworkManagement::V1::ReachabilityService::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::NetworkManagement::V1::ReachabilityService::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::NetworkManagement::V1::ReachabilityService::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::NetworkManagement::V1::ReachabilityService::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::NetworkManagement::V1::ReachabilityService::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::NetworkManagement::V1::ReachabilityService::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::NetworkManagement::V1::ReachabilityService::Operations::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-network_management-v1/test/google/cloud/network_management/v1/reachability_service_paths_test.rb b/owl-bot-staging/google-cloud-network_management-v1/test/google/cloud/network_management/v1/reachability_service_paths_test.rb new file mode 100644 index 000000000000..9c92881d643a --- /dev/null +++ b/owl-bot-staging/google-cloud-network_management-v1/test/google/cloud/network_management/v1/reachability_service_paths_test.rb @@ -0,0 +1,67 @@ +# 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/network_management/v1/reachability_service" + +class ::Google::Cloud::NetworkManagement::V1::ReachabilityService::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_connectivity_test_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::NetworkManagement::V1::ReachabilityService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.connectivity_test_path project: "value0", test: "value1" + assert_equal "projects/value0/locations/global/connectivityTests/value1", path + end + end + + def test_project_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::NetworkManagement::V1::ReachabilityService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.project_path project: "value0" + assert_equal "projects/value0", path + end + end +end diff --git a/owl-bot-staging/google-cloud-network_management-v1/test/google/cloud/network_management/v1/reachability_service_rest_test.rb b/owl-bot-staging/google-cloud-network_management-v1/test/google/cloud/network_management/v1/reachability_service_rest_test.rb new file mode 100644 index 000000000000..1169e991f13c --- /dev/null +++ b/owl-bot-staging/google-cloud-network_management-v1/test/google/cloud/network_management/v1/reachability_service_rest_test.rb @@ -0,0 +1,430 @@ +# 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/networkmanagement/v1/reachability_pb" +require "google/cloud/network_management/v1/reachability_service/rest" + + +class ::Google::Cloud::NetworkManagement::V1::ReachabilityService::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_connectivity_tests + # Create test objects. + client_result = ::Google::Cloud::NetworkManagement::V1::ListConnectivityTestsResponse.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_connectivity_tests_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::NetworkManagement::V1::ReachabilityService::Rest::ServiceStub.stub :transcode_list_connectivity_tests_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_connectivity_tests_client_stub do + # Create client + client = ::Google::Cloud::NetworkManagement::V1::ReachabilityService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_connectivity_tests({ 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_connectivity_tests 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_connectivity_tests ::Google::Cloud::NetworkManagement::V1::ListConnectivityTestsRequest.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_connectivity_tests({ 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_connectivity_tests(::Google::Cloud::NetworkManagement::V1::ListConnectivityTestsRequest.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_connectivity_tests_client_stub.call_count + end + end + end + + def test_get_connectivity_test + # Create test objects. + client_result = ::Google::Cloud::NetworkManagement::V1::ConnectivityTest.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_connectivity_test_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::NetworkManagement::V1::ReachabilityService::Rest::ServiceStub.stub :transcode_get_connectivity_test_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_connectivity_test_client_stub do + # Create client + client = ::Google::Cloud::NetworkManagement::V1::ReachabilityService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_connectivity_test({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_connectivity_test name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_connectivity_test ::Google::Cloud::NetworkManagement::V1::GetConnectivityTestRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_connectivity_test({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_connectivity_test(::Google::Cloud::NetworkManagement::V1::GetConnectivityTestRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_connectivity_test_client_stub.call_count + end + end + end + + def test_create_connectivity_test + # 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" + test_id = "hello world" + resource = {} + + create_connectivity_test_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::NetworkManagement::V1::ReachabilityService::Rest::ServiceStub.stub :transcode_create_connectivity_test_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_connectivity_test_client_stub do + # Create client + client = ::Google::Cloud::NetworkManagement::V1::ReachabilityService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_connectivity_test({ parent: parent, test_id: test_id, resource: resource }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_connectivity_test parent: parent, test_id: test_id, resource: resource do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_connectivity_test ::Google::Cloud::NetworkManagement::V1::CreateConnectivityTestRequest.new(parent: parent, test_id: test_id, resource: resource) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_connectivity_test({ parent: parent, test_id: test_id, resource: resource }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_connectivity_test(::Google::Cloud::NetworkManagement::V1::CreateConnectivityTestRequest.new(parent: parent, test_id: test_id, resource: resource), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_connectivity_test_client_stub.call_count + end + end + end + + def test_update_connectivity_test + # 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 = {} + resource = {} + + update_connectivity_test_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::NetworkManagement::V1::ReachabilityService::Rest::ServiceStub.stub :transcode_update_connectivity_test_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_connectivity_test_client_stub do + # Create client + client = ::Google::Cloud::NetworkManagement::V1::ReachabilityService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_connectivity_test({ update_mask: update_mask, resource: resource }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_connectivity_test update_mask: update_mask, resource: resource do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_connectivity_test ::Google::Cloud::NetworkManagement::V1::UpdateConnectivityTestRequest.new(update_mask: update_mask, resource: resource) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_connectivity_test({ update_mask: update_mask, resource: resource }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_connectivity_test(::Google::Cloud::NetworkManagement::V1::UpdateConnectivityTestRequest.new(update_mask: update_mask, resource: resource), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_connectivity_test_client_stub.call_count + end + end + end + + def test_rerun_connectivity_test + # 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" + + rerun_connectivity_test_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::NetworkManagement::V1::ReachabilityService::Rest::ServiceStub.stub :transcode_rerun_connectivity_test_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, rerun_connectivity_test_client_stub do + # Create client + client = ::Google::Cloud::NetworkManagement::V1::ReachabilityService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.rerun_connectivity_test({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.rerun_connectivity_test name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.rerun_connectivity_test ::Google::Cloud::NetworkManagement::V1::RerunConnectivityTestRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.rerun_connectivity_test({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.rerun_connectivity_test(::Google::Cloud::NetworkManagement::V1::RerunConnectivityTestRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, rerun_connectivity_test_client_stub.call_count + end + end + end + + def test_delete_connectivity_test + # 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_connectivity_test_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::NetworkManagement::V1::ReachabilityService::Rest::ServiceStub.stub :transcode_delete_connectivity_test_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_connectivity_test_client_stub do + # Create client + client = ::Google::Cloud::NetworkManagement::V1::ReachabilityService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_connectivity_test({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_connectivity_test name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_connectivity_test ::Google::Cloud::NetworkManagement::V1::DeleteConnectivityTestRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_connectivity_test({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_connectivity_test(::Google::Cloud::NetworkManagement::V1::DeleteConnectivityTestRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_connectivity_test_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::NetworkManagement::V1::ReachabilityService::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::NetworkManagement::V1::ReachabilityService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-network_management-v1/test/google/cloud/network_management/v1/reachability_service_test.rb b/owl-bot-staging/google-cloud-network_management-v1/test/google/cloud/network_management/v1/reachability_service_test.rb new file mode 100644 index 000000000000..02b05bd128af --- /dev/null +++ b/owl-bot-staging/google-cloud-network_management-v1/test/google/cloud/network_management/v1/reachability_service_test.rb @@ -0,0 +1,505 @@ +# 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/networkmanagement/v1/reachability_pb" +require "google/cloud/network_management/v1/reachability_service" + +class ::Google::Cloud::NetworkManagement::V1::ReachabilityService::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_connectivity_tests + # Create GRPC objects. + grpc_response = ::Google::Cloud::NetworkManagement::V1::ListConnectivityTestsResponse.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_connectivity_tests_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_connectivity_tests, name + assert_kind_of ::Google::Cloud::NetworkManagement::V1::ListConnectivityTestsRequest, 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_connectivity_tests_client_stub do + # Create client + client = ::Google::Cloud::NetworkManagement::V1::ReachabilityService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_connectivity_tests({ 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_connectivity_tests 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_connectivity_tests ::Google::Cloud::NetworkManagement::V1::ListConnectivityTestsRequest.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_connectivity_tests({ 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_connectivity_tests(::Google::Cloud::NetworkManagement::V1::ListConnectivityTestsRequest.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_connectivity_tests_client_stub.call_rpc_count + end + end + + def test_get_connectivity_test + # Create GRPC objects. + grpc_response = ::Google::Cloud::NetworkManagement::V1::ConnectivityTest.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_connectivity_test_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_connectivity_test, name + assert_kind_of ::Google::Cloud::NetworkManagement::V1::GetConnectivityTestRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_connectivity_test_client_stub do + # Create client + client = ::Google::Cloud::NetworkManagement::V1::ReachabilityService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_connectivity_test({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_connectivity_test name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_connectivity_test ::Google::Cloud::NetworkManagement::V1::GetConnectivityTestRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_connectivity_test({ 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_connectivity_test(::Google::Cloud::NetworkManagement::V1::GetConnectivityTestRequest.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_connectivity_test_client_stub.call_rpc_count + end + end + + def test_create_connectivity_test + # 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" + test_id = "hello world" + resource = {} + + create_connectivity_test_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_connectivity_test, name + assert_kind_of ::Google::Cloud::NetworkManagement::V1::CreateConnectivityTestRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["test_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::NetworkManagement::V1::ConnectivityTest), request["resource"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_connectivity_test_client_stub do + # Create client + client = ::Google::Cloud::NetworkManagement::V1::ReachabilityService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_connectivity_test({ parent: parent, test_id: test_id, resource: resource }) 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_connectivity_test parent: parent, test_id: test_id, resource: resource 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_connectivity_test ::Google::Cloud::NetworkManagement::V1::CreateConnectivityTestRequest.new(parent: parent, test_id: test_id, resource: resource) 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_connectivity_test({ parent: parent, test_id: test_id, resource: resource }, 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_connectivity_test(::Google::Cloud::NetworkManagement::V1::CreateConnectivityTestRequest.new(parent: parent, test_id: test_id, resource: resource), 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_connectivity_test_client_stub.call_rpc_count + end + end + + def test_update_connectivity_test + # 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 = {} + resource = {} + + update_connectivity_test_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_connectivity_test, name + assert_kind_of ::Google::Cloud::NetworkManagement::V1::UpdateConnectivityTestRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::NetworkManagement::V1::ConnectivityTest), request["resource"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_connectivity_test_client_stub do + # Create client + client = ::Google::Cloud::NetworkManagement::V1::ReachabilityService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_connectivity_test({ update_mask: update_mask, resource: resource }) 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_connectivity_test update_mask: update_mask, resource: resource 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_connectivity_test ::Google::Cloud::NetworkManagement::V1::UpdateConnectivityTestRequest.new(update_mask: update_mask, resource: resource) 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_connectivity_test({ update_mask: update_mask, resource: resource }, 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_connectivity_test(::Google::Cloud::NetworkManagement::V1::UpdateConnectivityTestRequest.new(update_mask: update_mask, resource: resource), 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_connectivity_test_client_stub.call_rpc_count + end + end + + def test_rerun_connectivity_test + # 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" + + rerun_connectivity_test_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :rerun_connectivity_test, name + assert_kind_of ::Google::Cloud::NetworkManagement::V1::RerunConnectivityTestRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, rerun_connectivity_test_client_stub do + # Create client + client = ::Google::Cloud::NetworkManagement::V1::ReachabilityService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.rerun_connectivity_test({ 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.rerun_connectivity_test 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.rerun_connectivity_test ::Google::Cloud::NetworkManagement::V1::RerunConnectivityTestRequest.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.rerun_connectivity_test({ 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.rerun_connectivity_test(::Google::Cloud::NetworkManagement::V1::RerunConnectivityTestRequest.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, rerun_connectivity_test_client_stub.call_rpc_count + end + end + + def test_delete_connectivity_test + # 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_connectivity_test_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_connectivity_test, name + assert_kind_of ::Google::Cloud::NetworkManagement::V1::DeleteConnectivityTestRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_connectivity_test_client_stub do + # Create client + client = ::Google::Cloud::NetworkManagement::V1::ReachabilityService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_connectivity_test({ 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_connectivity_test 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_connectivity_test ::Google::Cloud::NetworkManagement::V1::DeleteConnectivityTestRequest.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_connectivity_test({ 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_connectivity_test(::Google::Cloud::NetworkManagement::V1::DeleteConnectivityTestRequest.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_connectivity_test_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::NetworkManagement::V1::ReachabilityService::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::NetworkManagement::V1::ReachabilityService::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::NetworkManagement::V1::ReachabilityService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::NetworkManagement::V1::ReachabilityService::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::NetworkManagement::V1::ReachabilityService::Client.new do |config| + config.credentials = grpc_channel + end + end + + assert_kind_of ::Google::Cloud::NetworkManagement::V1::ReachabilityService::Operations, client.operations_client + end +end diff --git a/owl-bot-staging/google-cloud-network_management-v1/test/google/cloud/network_management/v1/vpc_flow_logs_service_operations_test.rb b/owl-bot-staging/google-cloud-network_management-v1/test/google/cloud/network_management/v1/vpc_flow_logs_service_operations_test.rb new file mode 100644 index 000000000000..3d255398170b --- /dev/null +++ b/owl-bot-staging/google-cloud-network_management-v1/test/google/cloud/network_management/v1/vpc_flow_logs_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/networkmanagement/v1/vpc_flow_logs_pb" +require "google/cloud/networkmanagement/v1/vpc_flow_logs_services_pb" +require "google/cloud/network_management/v1/vpc_flow_logs_service" + +class ::Google::Cloud::NetworkManagement::V1::VpcFlowLogsService::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::NetworkManagement::V1::VpcFlowLogsService::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::NetworkManagement::V1::VpcFlowLogsService::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::NetworkManagement::V1::VpcFlowLogsService::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::NetworkManagement::V1::VpcFlowLogsService::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::NetworkManagement::V1::VpcFlowLogsService::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::NetworkManagement::V1::VpcFlowLogsService::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::NetworkManagement::V1::VpcFlowLogsService::Operations::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-network_management-v1/test/google/cloud/network_management/v1/vpc_flow_logs_service_paths_test.rb b/owl-bot-staging/google-cloud-network_management-v1/test/google/cloud/network_management/v1/vpc_flow_logs_service_paths_test.rb new file mode 100644 index 000000000000..75de4e917967 --- /dev/null +++ b/owl-bot-staging/google-cloud-network_management-v1/test/google/cloud/network_management/v1/vpc_flow_logs_service_paths_test.rb @@ -0,0 +1,82 @@ +# 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/network_management/v1/vpc_flow_logs_service" + +class ::Google::Cloud::NetworkManagement::V1::VpcFlowLogsService::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_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::NetworkManagement::V1::VpcFlowLogsService::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_organization_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::NetworkManagement::V1::VpcFlowLogsService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.organization_location_path organization: "value0", location: "value1" + assert_equal "organizations/value0/locations/value1", path + end + end + + def test_vpc_flow_logs_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::NetworkManagement::V1::VpcFlowLogsService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.vpc_flow_logs_config_path project: "value0", location: "value1", vpc_flow_logs_config: "value2" + assert_equal "projects/value0/locations/value1/vpcFlowLogsConfigs/value2", path + + path = client.vpc_flow_logs_config_path organization: "value0", location: "value1", vpc_flow_logs_config: "value2" + assert_equal "organizations/value0/locations/value1/vpcFlowLogsConfigs/value2", path + end + end +end diff --git a/owl-bot-staging/google-cloud-network_management-v1/test/google/cloud/network_management/v1/vpc_flow_logs_service_rest_test.rb b/owl-bot-staging/google-cloud-network_management-v1/test/google/cloud/network_management/v1/vpc_flow_logs_service_rest_test.rb new file mode 100644 index 000000000000..6cfad29d0daa --- /dev/null +++ b/owl-bot-staging/google-cloud-network_management-v1/test/google/cloud/network_management/v1/vpc_flow_logs_service_rest_test.rb @@ -0,0 +1,491 @@ +# 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/networkmanagement/v1/vpc_flow_logs_pb" +require "google/cloud/network_management/v1/vpc_flow_logs_service/rest" + + +class ::Google::Cloud::NetworkManagement::V1::VpcFlowLogsService::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_vpc_flow_logs_configs + # Create test objects. + client_result = ::Google::Cloud::NetworkManagement::V1::ListVpcFlowLogsConfigsResponse.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_vpc_flow_logs_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::NetworkManagement::V1::VpcFlowLogsService::Rest::ServiceStub.stub :transcode_list_vpc_flow_logs_configs_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_vpc_flow_logs_configs_client_stub do + # Create client + client = ::Google::Cloud::NetworkManagement::V1::VpcFlowLogsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_vpc_flow_logs_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_vpc_flow_logs_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_vpc_flow_logs_configs ::Google::Cloud::NetworkManagement::V1::ListVpcFlowLogsConfigsRequest.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_vpc_flow_logs_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_vpc_flow_logs_configs(::Google::Cloud::NetworkManagement::V1::ListVpcFlowLogsConfigsRequest.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_vpc_flow_logs_configs_client_stub.call_count + end + end + end + + def test_get_vpc_flow_logs_config + # Create test objects. + client_result = ::Google::Cloud::NetworkManagement::V1::VpcFlowLogsConfig.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_vpc_flow_logs_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::NetworkManagement::V1::VpcFlowLogsService::Rest::ServiceStub.stub :transcode_get_vpc_flow_logs_config_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_vpc_flow_logs_config_client_stub do + # Create client + client = ::Google::Cloud::NetworkManagement::V1::VpcFlowLogsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_vpc_flow_logs_config({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_vpc_flow_logs_config name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_vpc_flow_logs_config ::Google::Cloud::NetworkManagement::V1::GetVpcFlowLogsConfigRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_vpc_flow_logs_config({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_vpc_flow_logs_config(::Google::Cloud::NetworkManagement::V1::GetVpcFlowLogsConfigRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_vpc_flow_logs_config_client_stub.call_count + end + end + end + + def test_create_vpc_flow_logs_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" + vpc_flow_logs_config_id = "hello world" + vpc_flow_logs_config = {} + + create_vpc_flow_logs_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::NetworkManagement::V1::VpcFlowLogsService::Rest::ServiceStub.stub :transcode_create_vpc_flow_logs_config_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_vpc_flow_logs_config_client_stub do + # Create client + client = ::Google::Cloud::NetworkManagement::V1::VpcFlowLogsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_vpc_flow_logs_config({ parent: parent, vpc_flow_logs_config_id: vpc_flow_logs_config_id, vpc_flow_logs_config: vpc_flow_logs_config }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_vpc_flow_logs_config parent: parent, vpc_flow_logs_config_id: vpc_flow_logs_config_id, vpc_flow_logs_config: vpc_flow_logs_config do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_vpc_flow_logs_config ::Google::Cloud::NetworkManagement::V1::CreateVpcFlowLogsConfigRequest.new(parent: parent, vpc_flow_logs_config_id: vpc_flow_logs_config_id, vpc_flow_logs_config: vpc_flow_logs_config) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_vpc_flow_logs_config({ parent: parent, vpc_flow_logs_config_id: vpc_flow_logs_config_id, vpc_flow_logs_config: vpc_flow_logs_config }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_vpc_flow_logs_config(::Google::Cloud::NetworkManagement::V1::CreateVpcFlowLogsConfigRequest.new(parent: parent, vpc_flow_logs_config_id: vpc_flow_logs_config_id, vpc_flow_logs_config: vpc_flow_logs_config), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_vpc_flow_logs_config_client_stub.call_count + end + end + end + + def test_update_vpc_flow_logs_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. + update_mask = {} + vpc_flow_logs_config = {} + + update_vpc_flow_logs_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::NetworkManagement::V1::VpcFlowLogsService::Rest::ServiceStub.stub :transcode_update_vpc_flow_logs_config_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_vpc_flow_logs_config_client_stub do + # Create client + client = ::Google::Cloud::NetworkManagement::V1::VpcFlowLogsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_vpc_flow_logs_config({ update_mask: update_mask, vpc_flow_logs_config: vpc_flow_logs_config }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_vpc_flow_logs_config update_mask: update_mask, vpc_flow_logs_config: vpc_flow_logs_config do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_vpc_flow_logs_config ::Google::Cloud::NetworkManagement::V1::UpdateVpcFlowLogsConfigRequest.new(update_mask: update_mask, vpc_flow_logs_config: vpc_flow_logs_config) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_vpc_flow_logs_config({ update_mask: update_mask, vpc_flow_logs_config: vpc_flow_logs_config }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_vpc_flow_logs_config(::Google::Cloud::NetworkManagement::V1::UpdateVpcFlowLogsConfigRequest.new(update_mask: update_mask, vpc_flow_logs_config: vpc_flow_logs_config), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_vpc_flow_logs_config_client_stub.call_count + end + end + end + + def test_delete_vpc_flow_logs_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" + + delete_vpc_flow_logs_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::NetworkManagement::V1::VpcFlowLogsService::Rest::ServiceStub.stub :transcode_delete_vpc_flow_logs_config_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_vpc_flow_logs_config_client_stub do + # Create client + client = ::Google::Cloud::NetworkManagement::V1::VpcFlowLogsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_vpc_flow_logs_config({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_vpc_flow_logs_config name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_vpc_flow_logs_config ::Google::Cloud::NetworkManagement::V1::DeleteVpcFlowLogsConfigRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_vpc_flow_logs_config({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_vpc_flow_logs_config(::Google::Cloud::NetworkManagement::V1::DeleteVpcFlowLogsConfigRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_vpc_flow_logs_config_client_stub.call_count + end + end + end + + def test_query_org_vpc_flow_logs_configs + # Create test objects. + client_result = ::Google::Cloud::NetworkManagement::V1::QueryOrgVpcFlowLogsConfigsResponse.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" + + query_org_vpc_flow_logs_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::NetworkManagement::V1::VpcFlowLogsService::Rest::ServiceStub.stub :transcode_query_org_vpc_flow_logs_configs_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, query_org_vpc_flow_logs_configs_client_stub do + # Create client + client = ::Google::Cloud::NetworkManagement::V1::VpcFlowLogsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.query_org_vpc_flow_logs_configs({ 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.query_org_vpc_flow_logs_configs 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.query_org_vpc_flow_logs_configs ::Google::Cloud::NetworkManagement::V1::QueryOrgVpcFlowLogsConfigsRequest.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.query_org_vpc_flow_logs_configs({ 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.query_org_vpc_flow_logs_configs(::Google::Cloud::NetworkManagement::V1::QueryOrgVpcFlowLogsConfigsRequest.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, query_org_vpc_flow_logs_configs_client_stub.call_count + end + end + end + + def test_show_effective_flow_logs_configs + # Create test objects. + client_result = ::Google::Cloud::NetworkManagement::V1::ShowEffectiveFlowLogsConfigsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + resource = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + + show_effective_flow_logs_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::NetworkManagement::V1::VpcFlowLogsService::Rest::ServiceStub.stub :transcode_show_effective_flow_logs_configs_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, show_effective_flow_logs_configs_client_stub do + # Create client + client = ::Google::Cloud::NetworkManagement::V1::VpcFlowLogsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.show_effective_flow_logs_configs({ parent: parent, resource: resource, 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.show_effective_flow_logs_configs parent: parent, resource: resource, 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.show_effective_flow_logs_configs ::Google::Cloud::NetworkManagement::V1::ShowEffectiveFlowLogsConfigsRequest.new(parent: parent, resource: resource, 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.show_effective_flow_logs_configs({ parent: parent, resource: resource, 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.show_effective_flow_logs_configs(::Google::Cloud::NetworkManagement::V1::ShowEffectiveFlowLogsConfigsRequest.new(parent: parent, resource: resource, 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, show_effective_flow_logs_configs_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::NetworkManagement::V1::VpcFlowLogsService::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::NetworkManagement::V1::VpcFlowLogsService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-network_management-v1/test/google/cloud/network_management/v1/vpc_flow_logs_service_test.rb b/owl-bot-staging/google-cloud-network_management-v1/test/google/cloud/network_management/v1/vpc_flow_logs_service_test.rb new file mode 100644 index 000000000000..4f6704b39236 --- /dev/null +++ b/owl-bot-staging/google-cloud-network_management-v1/test/google/cloud/network_management/v1/vpc_flow_logs_service_test.rb @@ -0,0 +1,582 @@ +# 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/networkmanagement/v1/vpc_flow_logs_pb" +require "google/cloud/network_management/v1/vpc_flow_logs_service" + +class ::Google::Cloud::NetworkManagement::V1::VpcFlowLogsService::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_vpc_flow_logs_configs + # Create GRPC objects. + grpc_response = ::Google::Cloud::NetworkManagement::V1::ListVpcFlowLogsConfigsResponse.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_vpc_flow_logs_configs_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_vpc_flow_logs_configs, name + assert_kind_of ::Google::Cloud::NetworkManagement::V1::ListVpcFlowLogsConfigsRequest, 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_vpc_flow_logs_configs_client_stub do + # Create client + client = ::Google::Cloud::NetworkManagement::V1::VpcFlowLogsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_vpc_flow_logs_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_vpc_flow_logs_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_vpc_flow_logs_configs ::Google::Cloud::NetworkManagement::V1::ListVpcFlowLogsConfigsRequest.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_vpc_flow_logs_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_vpc_flow_logs_configs(::Google::Cloud::NetworkManagement::V1::ListVpcFlowLogsConfigsRequest.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_vpc_flow_logs_configs_client_stub.call_rpc_count + end + end + + def test_get_vpc_flow_logs_config + # Create GRPC objects. + grpc_response = ::Google::Cloud::NetworkManagement::V1::VpcFlowLogsConfig.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_vpc_flow_logs_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_vpc_flow_logs_config, name + assert_kind_of ::Google::Cloud::NetworkManagement::V1::GetVpcFlowLogsConfigRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_vpc_flow_logs_config_client_stub do + # Create client + client = ::Google::Cloud::NetworkManagement::V1::VpcFlowLogsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_vpc_flow_logs_config({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_vpc_flow_logs_config name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_vpc_flow_logs_config ::Google::Cloud::NetworkManagement::V1::GetVpcFlowLogsConfigRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_vpc_flow_logs_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_vpc_flow_logs_config(::Google::Cloud::NetworkManagement::V1::GetVpcFlowLogsConfigRequest.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_vpc_flow_logs_config_client_stub.call_rpc_count + end + end + + def test_create_vpc_flow_logs_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" + vpc_flow_logs_config_id = "hello world" + vpc_flow_logs_config = {} + + create_vpc_flow_logs_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_vpc_flow_logs_config, name + assert_kind_of ::Google::Cloud::NetworkManagement::V1::CreateVpcFlowLogsConfigRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["vpc_flow_logs_config_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::NetworkManagement::V1::VpcFlowLogsConfig), request["vpc_flow_logs_config"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_vpc_flow_logs_config_client_stub do + # Create client + client = ::Google::Cloud::NetworkManagement::V1::VpcFlowLogsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_vpc_flow_logs_config({ parent: parent, vpc_flow_logs_config_id: vpc_flow_logs_config_id, vpc_flow_logs_config: vpc_flow_logs_config }) 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_vpc_flow_logs_config parent: parent, vpc_flow_logs_config_id: vpc_flow_logs_config_id, vpc_flow_logs_config: vpc_flow_logs_config 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_vpc_flow_logs_config ::Google::Cloud::NetworkManagement::V1::CreateVpcFlowLogsConfigRequest.new(parent: parent, vpc_flow_logs_config_id: vpc_flow_logs_config_id, vpc_flow_logs_config: vpc_flow_logs_config) 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_vpc_flow_logs_config({ parent: parent, vpc_flow_logs_config_id: vpc_flow_logs_config_id, vpc_flow_logs_config: vpc_flow_logs_config }, 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_vpc_flow_logs_config(::Google::Cloud::NetworkManagement::V1::CreateVpcFlowLogsConfigRequest.new(parent: parent, vpc_flow_logs_config_id: vpc_flow_logs_config_id, vpc_flow_logs_config: vpc_flow_logs_config), 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_vpc_flow_logs_config_client_stub.call_rpc_count + end + end + + def test_update_vpc_flow_logs_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. + update_mask = {} + vpc_flow_logs_config = {} + + update_vpc_flow_logs_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_vpc_flow_logs_config, name + assert_kind_of ::Google::Cloud::NetworkManagement::V1::UpdateVpcFlowLogsConfigRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::NetworkManagement::V1::VpcFlowLogsConfig), request["vpc_flow_logs_config"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_vpc_flow_logs_config_client_stub do + # Create client + client = ::Google::Cloud::NetworkManagement::V1::VpcFlowLogsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_vpc_flow_logs_config({ update_mask: update_mask, vpc_flow_logs_config: vpc_flow_logs_config }) 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_vpc_flow_logs_config update_mask: update_mask, vpc_flow_logs_config: vpc_flow_logs_config 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_vpc_flow_logs_config ::Google::Cloud::NetworkManagement::V1::UpdateVpcFlowLogsConfigRequest.new(update_mask: update_mask, vpc_flow_logs_config: vpc_flow_logs_config) 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_vpc_flow_logs_config({ update_mask: update_mask, vpc_flow_logs_config: vpc_flow_logs_config }, 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_vpc_flow_logs_config(::Google::Cloud::NetworkManagement::V1::UpdateVpcFlowLogsConfigRequest.new(update_mask: update_mask, vpc_flow_logs_config: vpc_flow_logs_config), 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_vpc_flow_logs_config_client_stub.call_rpc_count + end + end + + def test_delete_vpc_flow_logs_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" + + delete_vpc_flow_logs_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_vpc_flow_logs_config, name + assert_kind_of ::Google::Cloud::NetworkManagement::V1::DeleteVpcFlowLogsConfigRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_vpc_flow_logs_config_client_stub do + # Create client + client = ::Google::Cloud::NetworkManagement::V1::VpcFlowLogsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_vpc_flow_logs_config({ 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_vpc_flow_logs_config 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_vpc_flow_logs_config ::Google::Cloud::NetworkManagement::V1::DeleteVpcFlowLogsConfigRequest.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_vpc_flow_logs_config({ 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_vpc_flow_logs_config(::Google::Cloud::NetworkManagement::V1::DeleteVpcFlowLogsConfigRequest.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_vpc_flow_logs_config_client_stub.call_rpc_count + end + end + + def test_query_org_vpc_flow_logs_configs + # Create GRPC objects. + grpc_response = ::Google::Cloud::NetworkManagement::V1::QueryOrgVpcFlowLogsConfigsResponse.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" + + query_org_vpc_flow_logs_configs_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :query_org_vpc_flow_logs_configs, name + assert_kind_of ::Google::Cloud::NetworkManagement::V1::QueryOrgVpcFlowLogsConfigsRequest, 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, query_org_vpc_flow_logs_configs_client_stub do + # Create client + client = ::Google::Cloud::NetworkManagement::V1::VpcFlowLogsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.query_org_vpc_flow_logs_configs({ 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.query_org_vpc_flow_logs_configs 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.query_org_vpc_flow_logs_configs ::Google::Cloud::NetworkManagement::V1::QueryOrgVpcFlowLogsConfigsRequest.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.query_org_vpc_flow_logs_configs({ 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.query_org_vpc_flow_logs_configs(::Google::Cloud::NetworkManagement::V1::QueryOrgVpcFlowLogsConfigsRequest.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, query_org_vpc_flow_logs_configs_client_stub.call_rpc_count + end + end + + def test_show_effective_flow_logs_configs + # Create GRPC objects. + grpc_response = ::Google::Cloud::NetworkManagement::V1::ShowEffectiveFlowLogsConfigsResponse.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" + resource = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + + show_effective_flow_logs_configs_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :show_effective_flow_logs_configs, name + assert_kind_of ::Google::Cloud::NetworkManagement::V1::ShowEffectiveFlowLogsConfigsRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["resource"] + 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, show_effective_flow_logs_configs_client_stub do + # Create client + client = ::Google::Cloud::NetworkManagement::V1::VpcFlowLogsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.show_effective_flow_logs_configs({ parent: parent, resource: resource, 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.show_effective_flow_logs_configs parent: parent, resource: resource, 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.show_effective_flow_logs_configs ::Google::Cloud::NetworkManagement::V1::ShowEffectiveFlowLogsConfigsRequest.new(parent: parent, resource: resource, 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.show_effective_flow_logs_configs({ parent: parent, resource: resource, 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.show_effective_flow_logs_configs(::Google::Cloud::NetworkManagement::V1::ShowEffectiveFlowLogsConfigsRequest.new(parent: parent, resource: resource, 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, show_effective_flow_logs_configs_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::NetworkManagement::V1::VpcFlowLogsService::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::NetworkManagement::V1::VpcFlowLogsService::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::NetworkManagement::V1::VpcFlowLogsService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::NetworkManagement::V1::VpcFlowLogsService::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::NetworkManagement::V1::VpcFlowLogsService::Client.new do |config| + config.credentials = grpc_channel + end + end + + assert_kind_of ::Google::Cloud::NetworkManagement::V1::VpcFlowLogsService::Operations, client.operations_client + end +end diff --git a/owl-bot-staging/google-cloud-network_management-v1/test/helper.rb b/owl-bot-staging/google-cloud-network_management-v1/test/helper.rb new file mode 100644 index 000000000000..f0e715458fa2 --- /dev/null +++ b/owl-bot-staging/google-cloud-network_management-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 feea959391556f5ee2d0fa893b485e98db23a331 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Wed, 25 Feb 2026 12:04:29 +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 --- .../cloud/networkmanagement/v1/trace_pb.rb | 6 +- .../cloud/networkmanagement/v1/trace.rb | 178 +- .../.gitignore | 22 - .../.repo-metadata.json | 17 - .../.rubocop.yml | 33 - .../.toys.rb | 28 - .../.yardopts | 12 - .../AUTHENTICATION.md | 122 - .../CHANGELOG.md | 2 - .../Gemfile | 11 - .../LICENSE.md | 201 -- .../README.md | 153 - .../Rakefile | 169 -- .../gapic_metadata.json | 126 - ...google-cloud-network_management-v1.gemspec | 30 - .../lib/google-cloud-network_management-v1.rb | 21 - .../lib/google/cloud/network_management/v1.rb | 47 - .../v1/bindings_override.rb | 124 - .../v1/organization_vpc_flow_logs_service.rb | 59 - .../client.rb | 1002 ------- .../credentials.rb | 47 - .../operations.rb | 841 ------ .../paths.rb | 110 - .../rest.rb | 57 - .../rest/client.rb | 933 ------ .../rest/operations.rb | 954 ------ .../rest/service_stub.rb | 388 --- .../v1/reachability_service.rb | 63 - .../v1/reachability_service/client.rb | 1111 ------- .../v1/reachability_service/credentials.rb | 47 - .../v1/reachability_service/operations.rb | 841 ------ .../v1/reachability_service/paths.rb | 64 - .../v1/reachability_service/rest.rb | 61 - .../v1/reachability_service/rest/client.rb | 1035 ------- .../reachability_service/rest/operations.rb | 954 ------ .../reachability_service/rest/service_stub.rb | 450 --- .../cloud/network_management/v1/rest.rb | 40 - .../cloud/network_management/v1/version.rb | 28 - .../v1/vpc_flow_logs_service.rb | 58 - .../v1/vpc_flow_logs_service/client.rb | 1225 -------- .../v1/vpc_flow_logs_service/credentials.rb | 47 - .../v1/vpc_flow_logs_service/operations.rb | 841 ------ .../v1/vpc_flow_logs_service/paths.rb | 110 - .../v1/vpc_flow_logs_service/rest.rb | 56 - .../v1/vpc_flow_logs_service/rest/client.rb | 1142 -------- .../vpc_flow_logs_service/rest/operations.rb | 954 ------ .../rest/service_stub.rb | 510 ---- .../v1/connectivity_test_pb.rb | 66 - .../networkmanagement/v1/reachability_pb.rb | 62 - .../v1/reachability_services_pb.rb | 100 - .../cloud/networkmanagement/v1/trace_pb.rb | 107 - .../v1/vpc_flow_logs_config_pb.rb | 54 - .../networkmanagement/v1/vpc_flow_logs_pb.rb | 63 - .../v1/vpc_flow_logs_services_pb.rb | 144 - .../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 -- .../networkmanagement/v1/connectivity_test.rb | 490 ---- .../networkmanagement/v1/reachability.rb | 174 -- .../cloud/networkmanagement/v1/trace.rb | 2610 ----------------- .../networkmanagement/v1/vpc_flow_logs.rb | 224 -- .../v1/vpc_flow_logs_config.rb | 312 -- .../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 - .../proto_docs/google/type/expr.rb | 75 - .../snippets/Gemfile | 32 - .../create_vpc_flow_logs_config.rb | 54 - .../delete_vpc_flow_logs_config.rb | 54 - .../get_vpc_flow_logs_config.rb | 47 - .../list_vpc_flow_logs_configs.rb | 51 - .../update_vpc_flow_logs_config.rb | 54 - .../create_connectivity_test.rb | 54 - .../delete_connectivity_test.rb | 54 - .../get_connectivity_test.rb | 47 - .../list_connectivity_tests.rb | 51 - .../rerun_connectivity_test.rb | 54 - .../update_connectivity_test.rb | 54 - ...ata_google.cloud.networkmanagement.v1.json | 735 ----- .../create_vpc_flow_logs_config.rb | 54 - .../delete_vpc_flow_logs_config.rb | 54 - .../get_vpc_flow_logs_config.rb | 47 - .../list_vpc_flow_logs_configs.rb | 51 - .../query_org_vpc_flow_logs_configs.rb | 51 - .../show_effective_flow_logs_configs.rb | 51 - .../update_vpc_flow_logs_config.rb | 54 - ...n_vpc_flow_logs_service_operations_test.rb | 400 --- ...zation_vpc_flow_logs_service_paths_test.rb | 82 - ...ization_vpc_flow_logs_service_rest_test.rb | 376 --- ...organization_vpc_flow_logs_service_test.rb | 442 --- .../reachability_service_operations_test.rb | 400 --- .../v1/reachability_service_paths_test.rb | 67 - .../v1/reachability_service_rest_test.rb | 430 --- .../v1/reachability_service_test.rb | 505 ---- .../vpc_flow_logs_service_operations_test.rb | 400 --- .../v1/vpc_flow_logs_service_paths_test.rb | 82 - .../v1/vpc_flow_logs_service_rest_test.rb | 491 ---- .../v1/vpc_flow_logs_service_test.rb | 582 ---- .../test/helper.rb | 25 - 106 files changed, 150 insertions(+), 27466 deletions(-) delete mode 100644 owl-bot-staging/google-cloud-network_management-v1/.gitignore delete mode 100644 owl-bot-staging/google-cloud-network_management-v1/.repo-metadata.json delete mode 100644 owl-bot-staging/google-cloud-network_management-v1/.rubocop.yml delete mode 100644 owl-bot-staging/google-cloud-network_management-v1/.toys.rb delete mode 100644 owl-bot-staging/google-cloud-network_management-v1/.yardopts delete mode 100644 owl-bot-staging/google-cloud-network_management-v1/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-cloud-network_management-v1/CHANGELOG.md delete mode 100644 owl-bot-staging/google-cloud-network_management-v1/Gemfile delete mode 100644 owl-bot-staging/google-cloud-network_management-v1/LICENSE.md delete mode 100644 owl-bot-staging/google-cloud-network_management-v1/README.md delete mode 100644 owl-bot-staging/google-cloud-network_management-v1/Rakefile delete mode 100644 owl-bot-staging/google-cloud-network_management-v1/gapic_metadata.json delete mode 100644 owl-bot-staging/google-cloud-network_management-v1/google-cloud-network_management-v1.gemspec delete mode 100644 owl-bot-staging/google-cloud-network_management-v1/lib/google-cloud-network_management-v1.rb delete mode 100644 owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1.rb delete mode 100644 owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/bindings_override.rb delete mode 100644 owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/organization_vpc_flow_logs_service.rb delete mode 100644 owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/organization_vpc_flow_logs_service/client.rb delete mode 100644 owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/organization_vpc_flow_logs_service/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/organization_vpc_flow_logs_service/operations.rb delete mode 100644 owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/organization_vpc_flow_logs_service/paths.rb delete mode 100644 owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/organization_vpc_flow_logs_service/rest.rb delete mode 100644 owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/organization_vpc_flow_logs_service/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/organization_vpc_flow_logs_service/rest/operations.rb delete mode 100644 owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/organization_vpc_flow_logs_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/reachability_service.rb delete mode 100644 owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/reachability_service/client.rb delete mode 100644 owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/reachability_service/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/reachability_service/operations.rb delete mode 100644 owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/reachability_service/paths.rb delete mode 100644 owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/reachability_service/rest.rb delete mode 100644 owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/reachability_service/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/reachability_service/rest/operations.rb delete mode 100644 owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/reachability_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/rest.rb delete mode 100644 owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/version.rb delete mode 100644 owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/vpc_flow_logs_service.rb delete mode 100644 owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/vpc_flow_logs_service/client.rb delete mode 100644 owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/vpc_flow_logs_service/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/vpc_flow_logs_service/operations.rb delete mode 100644 owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/vpc_flow_logs_service/paths.rb delete mode 100644 owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/vpc_flow_logs_service/rest.rb delete mode 100644 owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/vpc_flow_logs_service/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/vpc_flow_logs_service/rest/operations.rb delete mode 100644 owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/vpc_flow_logs_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/networkmanagement/v1/connectivity_test_pb.rb delete mode 100644 owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/networkmanagement/v1/reachability_pb.rb delete mode 100644 owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/networkmanagement/v1/reachability_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/networkmanagement/v1/trace_pb.rb delete mode 100644 owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/networkmanagement/v1/vpc_flow_logs_config_pb.rb delete mode 100644 owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/networkmanagement/v1/vpc_flow_logs_pb.rb delete mode 100644 owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/networkmanagement/v1/vpc_flow_logs_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-network_management-v1/proto_docs/README.md delete mode 100644 owl-bot-staging/google-cloud-network_management-v1/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-cloud-network_management-v1/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-cloud-network_management-v1/proto_docs/google/api/field_info.rb delete mode 100644 owl-bot-staging/google-cloud-network_management-v1/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-cloud-network_management-v1/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-cloud-network_management-v1/proto_docs/google/cloud/networkmanagement/v1/connectivity_test.rb delete mode 100644 owl-bot-staging/google-cloud-network_management-v1/proto_docs/google/cloud/networkmanagement/v1/reachability.rb delete mode 100644 owl-bot-staging/google-cloud-network_management-v1/proto_docs/google/cloud/networkmanagement/v1/trace.rb delete mode 100644 owl-bot-staging/google-cloud-network_management-v1/proto_docs/google/cloud/networkmanagement/v1/vpc_flow_logs.rb delete mode 100644 owl-bot-staging/google-cloud-network_management-v1/proto_docs/google/cloud/networkmanagement/v1/vpc_flow_logs_config.rb delete mode 100644 owl-bot-staging/google-cloud-network_management-v1/proto_docs/google/longrunning/operations.rb delete mode 100644 owl-bot-staging/google-cloud-network_management-v1/proto_docs/google/protobuf/any.rb delete mode 100644 owl-bot-staging/google-cloud-network_management-v1/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-cloud-network_management-v1/proto_docs/google/protobuf/empty.rb delete mode 100644 owl-bot-staging/google-cloud-network_management-v1/proto_docs/google/protobuf/field_mask.rb delete mode 100644 owl-bot-staging/google-cloud-network_management-v1/proto_docs/google/protobuf/timestamp.rb delete mode 100644 owl-bot-staging/google-cloud-network_management-v1/proto_docs/google/rpc/status.rb delete mode 100644 owl-bot-staging/google-cloud-network_management-v1/proto_docs/google/type/expr.rb delete mode 100644 owl-bot-staging/google-cloud-network_management-v1/snippets/Gemfile delete mode 100644 owl-bot-staging/google-cloud-network_management-v1/snippets/organization_vpc_flow_logs_service/create_vpc_flow_logs_config.rb delete mode 100644 owl-bot-staging/google-cloud-network_management-v1/snippets/organization_vpc_flow_logs_service/delete_vpc_flow_logs_config.rb delete mode 100644 owl-bot-staging/google-cloud-network_management-v1/snippets/organization_vpc_flow_logs_service/get_vpc_flow_logs_config.rb delete mode 100644 owl-bot-staging/google-cloud-network_management-v1/snippets/organization_vpc_flow_logs_service/list_vpc_flow_logs_configs.rb delete mode 100644 owl-bot-staging/google-cloud-network_management-v1/snippets/organization_vpc_flow_logs_service/update_vpc_flow_logs_config.rb delete mode 100644 owl-bot-staging/google-cloud-network_management-v1/snippets/reachability_service/create_connectivity_test.rb delete mode 100644 owl-bot-staging/google-cloud-network_management-v1/snippets/reachability_service/delete_connectivity_test.rb delete mode 100644 owl-bot-staging/google-cloud-network_management-v1/snippets/reachability_service/get_connectivity_test.rb delete mode 100644 owl-bot-staging/google-cloud-network_management-v1/snippets/reachability_service/list_connectivity_tests.rb delete mode 100644 owl-bot-staging/google-cloud-network_management-v1/snippets/reachability_service/rerun_connectivity_test.rb delete mode 100644 owl-bot-staging/google-cloud-network_management-v1/snippets/reachability_service/update_connectivity_test.rb delete mode 100644 owl-bot-staging/google-cloud-network_management-v1/snippets/snippet_metadata_google.cloud.networkmanagement.v1.json delete mode 100644 owl-bot-staging/google-cloud-network_management-v1/snippets/vpc_flow_logs_service/create_vpc_flow_logs_config.rb delete mode 100644 owl-bot-staging/google-cloud-network_management-v1/snippets/vpc_flow_logs_service/delete_vpc_flow_logs_config.rb delete mode 100644 owl-bot-staging/google-cloud-network_management-v1/snippets/vpc_flow_logs_service/get_vpc_flow_logs_config.rb delete mode 100644 owl-bot-staging/google-cloud-network_management-v1/snippets/vpc_flow_logs_service/list_vpc_flow_logs_configs.rb delete mode 100644 owl-bot-staging/google-cloud-network_management-v1/snippets/vpc_flow_logs_service/query_org_vpc_flow_logs_configs.rb delete mode 100644 owl-bot-staging/google-cloud-network_management-v1/snippets/vpc_flow_logs_service/show_effective_flow_logs_configs.rb delete mode 100644 owl-bot-staging/google-cloud-network_management-v1/snippets/vpc_flow_logs_service/update_vpc_flow_logs_config.rb delete mode 100644 owl-bot-staging/google-cloud-network_management-v1/test/google/cloud/network_management/v1/organization_vpc_flow_logs_service_operations_test.rb delete mode 100644 owl-bot-staging/google-cloud-network_management-v1/test/google/cloud/network_management/v1/organization_vpc_flow_logs_service_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-network_management-v1/test/google/cloud/network_management/v1/organization_vpc_flow_logs_service_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-network_management-v1/test/google/cloud/network_management/v1/organization_vpc_flow_logs_service_test.rb delete mode 100644 owl-bot-staging/google-cloud-network_management-v1/test/google/cloud/network_management/v1/reachability_service_operations_test.rb delete mode 100644 owl-bot-staging/google-cloud-network_management-v1/test/google/cloud/network_management/v1/reachability_service_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-network_management-v1/test/google/cloud/network_management/v1/reachability_service_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-network_management-v1/test/google/cloud/network_management/v1/reachability_service_test.rb delete mode 100644 owl-bot-staging/google-cloud-network_management-v1/test/google/cloud/network_management/v1/vpc_flow_logs_service_operations_test.rb delete mode 100644 owl-bot-staging/google-cloud-network_management-v1/test/google/cloud/network_management/v1/vpc_flow_logs_service_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-network_management-v1/test/google/cloud/network_management/v1/vpc_flow_logs_service_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-network_management-v1/test/google/cloud/network_management/v1/vpc_flow_logs_service_test.rb delete mode 100644 owl-bot-staging/google-cloud-network_management-v1/test/helper.rb diff --git a/google-cloud-network_management-v1/lib/google/cloud/networkmanagement/v1/trace_pb.rb b/google-cloud-network_management-v1/lib/google/cloud/networkmanagement/v1/trace_pb.rb index dfd343ca8c0b..e686396d0c5c 100644 --- a/google-cloud-network_management-v1/lib/google/cloud/networkmanagement/v1/trace_pb.rb +++ b/google-cloud-network_management-v1/lib/google/cloud/networkmanagement/v1/trace_pb.rb @@ -8,7 +8,7 @@ require 'google/api/field_info_pb' -descriptor_data = "\n-google/cloud/networkmanagement/v1/trace.proto\x12!google.cloud.networkmanagement.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1bgoogle/api/field_info.proto\"\xa1\x01\n\x05Trace\x12\x46\n\rendpoint_info\x18\x01 \x01(\x0b\x32/.google.cloud.networkmanagement.v1.EndpointInfo\x12\x36\n\x05steps\x18\x02 \x03(\x0b\x32\'.google.cloud.networkmanagement.v1.Step\x12\x18\n\x10\x66orward_trace_id\x18\x04 \x01(\x05\"\x9a\x1e\n\x04Step\x12\x13\n\x0b\x64\x65scription\x18\x01 \x01(\t\x12<\n\x05state\x18\x02 \x01(\x0e\x32-.google.cloud.networkmanagement.v1.Step.State\x12\x13\n\x0b\x63\x61uses_drop\x18\x03 \x01(\x08\x12\x12\n\nproject_id\x18\x04 \x01(\t\x12\x43\n\x08instance\x18\x05 \x01(\x0b\x32/.google.cloud.networkmanagement.v1.InstanceInfoH\x00\x12\x43\n\x08\x66irewall\x18\x06 \x01(\x0b\x32/.google.cloud.networkmanagement.v1.FirewallInfoH\x00\x12=\n\x05route\x18\x07 \x01(\x0b\x32,.google.cloud.networkmanagement.v1.RouteInfoH\x00\x12\x43\n\x08\x65ndpoint\x18\x08 \x01(\x0b\x32/.google.cloud.networkmanagement.v1.EndpointInfoH\x00\x12N\n\x0egoogle_service\x18\x18 \x01(\x0b\x32\x34.google.cloud.networkmanagement.v1.GoogleServiceInfoH\x00\x12P\n\x0f\x66orwarding_rule\x18\t \x01(\x0b\x32\x35.google.cloud.networkmanagement.v1.ForwardingRuleInfoH\x00\x12L\n\rhybrid_subnet\x18$ \x01(\x0b\x32\x33.google.cloud.networkmanagement.v1.HybridSubnetInfoH\x00\x12H\n\x0bvpn_gateway\x18\n \x01(\x0b\x32\x31.google.cloud.networkmanagement.v1.VpnGatewayInfoH\x00\x12\x46\n\nvpn_tunnel\x18\x0b \x01(\x0b\x32\x30.google.cloud.networkmanagement.v1.VpnTunnelInfoH\x00\x12`\n\x17interconnect_attachment\x18# \x01(\x0b\x32=.google.cloud.networkmanagement.v1.InterconnectAttachmentInfoH\x00\x12L\n\rvpc_connector\x18\x15 \x01(\x0b\x32\x33.google.cloud.networkmanagement.v1.VpcConnectorInfoH\x00\x12h\n\x1c\x64irect_vpc_egress_connection\x18! \x01(\x0b\x32@.google.cloud.networkmanagement.v1.DirectVpcEgressConnectionInfoH\x00\x12m\n\x1eserverless_external_connection\x18\" \x01(\x0b\x32\x43.google.cloud.networkmanagement.v1.ServerlessExternalConnectionInfoH\x00\x12\x41\n\x07\x64\x65liver\x18\x0c \x01(\x0b\x32..google.cloud.networkmanagement.v1.DeliverInfoH\x00\x12\x41\n\x07\x66orward\x18\r \x01(\x0b\x32..google.cloud.networkmanagement.v1.ForwardInfoH\x00\x12=\n\x05\x61\x62ort\x18\x0e \x01(\x0b\x32,.google.cloud.networkmanagement.v1.AbortInfoH\x00\x12;\n\x04\x64rop\x18\x0f \x01(\x0b\x32+.google.cloud.networkmanagement.v1.DropInfoH\x00\x12P\n\rload_balancer\x18\x10 \x01(\x0b\x32\x33.google.cloud.networkmanagement.v1.LoadBalancerInfoB\x02\x18\x01H\x00\x12\x41\n\x07network\x18\x11 \x01(\x0b\x32..google.cloud.networkmanagement.v1.NetworkInfoH\x00\x12\x46\n\ngke_master\x18\x12 \x01(\x0b\x32\x30.google.cloud.networkmanagement.v1.GKEMasterInfoH\x00\x12@\n\x07gke_pod\x18% \x01(\x0b\x32-.google.cloud.networkmanagement.v1.GkePodInfoH\x00\x12_\n\x17ip_masquerading_skipped\x18& \x01(\x0b\x32<.google.cloud.networkmanagement.v1.IpMasqueradingSkippedInfoH\x00\x12U\n\x12\x63loud_sql_instance\x18\x13 \x01(\x0b\x32\x37.google.cloud.networkmanagement.v1.CloudSQLInstanceInfoH\x00\x12N\n\x0eredis_instance\x18\x1e \x01(\x0b\x32\x34.google.cloud.networkmanagement.v1.RedisInstanceInfoH\x00\x12L\n\rredis_cluster\x18\x1f \x01(\x0b\x32\x33.google.cloud.networkmanagement.v1.RedisClusterInfoH\x00\x12N\n\x0e\x63loud_function\x18\x14 \x01(\x0b\x32\x34.google.cloud.networkmanagement.v1.CloudFunctionInfoH\x00\x12U\n\x12\x61pp_engine_version\x18\x16 \x01(\x0b\x32\x37.google.cloud.networkmanagement.v1.AppEngineVersionInfoH\x00\x12U\n\x12\x63loud_run_revision\x18\x17 \x01(\x0b\x32\x37.google.cloud.networkmanagement.v1.CloudRunRevisionInfoH\x00\x12\x39\n\x03nat\x18\x19 \x01(\x0b\x32*.google.cloud.networkmanagement.v1.NatInfoH\x00\x12R\n\x10proxy_connection\x18\x1a \x01(\x0b\x32\x36.google.cloud.networkmanagement.v1.ProxyConnectionInfoH\x00\x12`\n\x1aload_balancer_backend_info\x18\x1b \x01(\x0b\x32:.google.cloud.networkmanagement.v1.LoadBalancerBackendInfoH\x00\x12N\n\x0estorage_bucket\x18\x1c \x01(\x0b\x32\x34.google.cloud.networkmanagement.v1.StorageBucketInfoH\x00\x12N\n\x0eserverless_neg\x18\x1d \x01(\x0b\x32\x34.google.cloud.networkmanagement.v1.ServerlessNegInfoH\x00\"\xe9\x08\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x17\n\x13START_FROM_INSTANCE\x10\x01\x12\x17\n\x13START_FROM_INTERNET\x10\x02\x12\x1d\n\x19START_FROM_GOOGLE_SERVICE\x10\x1b\x12\x1e\n\x1aSTART_FROM_PRIVATE_NETWORK\x10\x03\x12\x19\n\x15START_FROM_GKE_MASTER\x10\x15\x12!\n\x1dSTART_FROM_CLOUD_SQL_INSTANCE\x10\x16\x12\x16\n\x12START_FROM_GKE_POD\x10\'\x12\x1d\n\x19START_FROM_REDIS_INSTANCE\x10 \x12\x1c\n\x18START_FROM_REDIS_CLUSTER\x10!\x12\x1d\n\x19START_FROM_CLOUD_FUNCTION\x10\x17\x12!\n\x1dSTART_FROM_APP_ENGINE_VERSION\x10\x19\x12!\n\x1dSTART_FROM_CLOUD_RUN_REVISION\x10\x1a\x12\x1d\n\x19START_FROM_STORAGE_BUCKET\x10\x1d\x12$\n START_FROM_PSC_PUBLISHED_SERVICE\x10\x1e\x12\x1d\n\x19START_FROM_SERVERLESS_NEG\x10\x1f\x12\x1f\n\x1b\x41PPLY_INGRESS_FIREWALL_RULE\x10\x04\x12\x1e\n\x1a\x41PPLY_EGRESS_FIREWALL_RULE\x10\x05\x12\x0f\n\x0b\x41PPLY_ROUTE\x10\x06\x12\x19\n\x15\x41PPLY_FORWARDING_RULE\x10\x07\x12!\n\x1d\x41NALYZE_LOAD_BALANCER_BACKEND\x10\x1c\x12\x15\n\x11SPOOFING_APPROVED\x10\x08\x12\x16\n\x12\x41RRIVE_AT_INSTANCE\x10\t\x12(\n ARRIVE_AT_INTERNAL_LOAD_BALANCER\x10\n\x1a\x02\x08\x01\x12(\n ARRIVE_AT_EXTERNAL_LOAD_BALANCER\x10\x0b\x1a\x02\x08\x01\x12\x1b\n\x17\x41RRIVE_AT_HYBRID_SUBNET\x10&\x12\x19\n\x15\x41RRIVE_AT_VPN_GATEWAY\x10\x0c\x12\x18\n\x14\x41RRIVE_AT_VPN_TUNNEL\x10\r\x12%\n!ARRIVE_AT_INTERCONNECT_ATTACHMENT\x10%\x12\x1b\n\x17\x41RRIVE_AT_VPC_CONNECTOR\x10\x18\x12 \n\x1c\x44IRECT_VPC_EGRESS_CONNECTION\x10#\x12\"\n\x1eSERVERLESS_EXTERNAL_CONNECTION\x10$\x12\x07\n\x03NAT\x10\x0e\x12 \n\x1cSKIP_GKE_POD_IP_MASQUERADING\x10(\x12\x14\n\x10PROXY_CONNECTION\x10\x0f\x12\x0b\n\x07\x44\x45LIVER\x10\x10\x12\x08\n\x04\x44ROP\x10\x11\x12\x0b\n\x07\x46ORWARD\x10\x12\x12\t\n\x05\x41\x42ORT\x10\x13\x12\x1d\n\x19VIEWER_PERMISSION_MISSING\x10\x14\x42\x0b\n\tstep_info\"\xf7\x02\n\x0cInstanceInfo\x12\x14\n\x0c\x64isplay_name\x18\x01 \x01(\t\x12\x0b\n\x03uri\x18\x02 \x01(\t\x12\x11\n\tinterface\x18\x03 \x01(\t\x12\x13\n\x0bnetwork_uri\x18\x04 \x01(\t\x12\x13\n\x0binternal_ip\x18\x05 \x01(\t\x12\x13\n\x0b\x65xternal_ip\x18\x06 \x01(\t\x12\x14\n\x0cnetwork_tags\x18\x07 \x03(\t\x12\x1b\n\x0fservice_account\x18\x08 \x01(\tB\x02\x18\x01\x12\"\n\x1apsc_network_attachment_uri\x18\t \x01(\t\x12\x13\n\x07running\x18\n \x01(\x08\x42\x02\x18\x01\x12\x46\n\x06status\x18\x0b \x01(\x0e\x32\x36.google.cloud.networkmanagement.v1.InstanceInfo.Status\">\n\x06Status\x12\x16\n\x12STATUS_UNSPECIFIED\x10\x00\x12\x0b\n\x07RUNNING\x10\x01\x12\x0f\n\x0bNOT_RUNNING\x10\x02\"v\n\x0bNetworkInfo\x12\x14\n\x0c\x64isplay_name\x18\x01 \x01(\t\x12\x0b\n\x03uri\x18\x02 \x01(\t\x12\x1a\n\x12matched_subnet_uri\x18\x05 \x01(\t\x12\x18\n\x10matched_ip_range\x18\x04 \x01(\t\x12\x0e\n\x06region\x18\x06 \x01(\t\"\xaf\x07\n\x0c\x46irewallInfo\x12\x14\n\x0c\x64isplay_name\x18\x01 \x01(\t\x12\x0b\n\x03uri\x18\x02 \x01(\t\x12\x11\n\tdirection\x18\x03 \x01(\t\x12\x0e\n\x06\x61\x63tion\x18\x04 \x01(\t\x12\x10\n\x08priority\x18\x05 \x01(\x05\x12\x13\n\x0bnetwork_uri\x18\x06 \x01(\t\x12\x13\n\x0btarget_tags\x18\x07 \x03(\t\x12\x1f\n\x17target_service_accounts\x18\x08 \x03(\t\x12\x0e\n\x06policy\x18\t \x01(\t\x12\x12\n\npolicy_uri\x18\x0b \x01(\t\x12\\\n\x12\x66irewall_rule_type\x18\n \x01(\x0e\x32@.google.cloud.networkmanagement.v1.FirewallInfo.FirewallRuleType\x12\x17\n\x0fpolicy_priority\x18\x0c \x01(\x05\x12O\n\x0btarget_type\x18\r \x01(\x0e\x32:.google.cloud.networkmanagement.v1.FirewallInfo.TargetType\"\xbc\x03\n\x10\x46irewallRuleType\x12\"\n\x1e\x46IREWALL_RULE_TYPE_UNSPECIFIED\x10\x00\x12%\n!HIERARCHICAL_FIREWALL_POLICY_RULE\x10\x01\x12\x15\n\x11VPC_FIREWALL_RULE\x10\x02\x12\x1d\n\x19IMPLIED_VPC_FIREWALL_RULE\x10\x03\x12/\n+SERVERLESS_VPC_ACCESS_MANAGED_FIREWALL_RULE\x10\x04\x12 \n\x1cNETWORK_FIREWALL_POLICY_RULE\x10\x05\x12)\n%NETWORK_REGIONAL_FIREWALL_POLICY_RULE\x10\x06\x12\'\n#SYSTEM_NETWORK_FIREWALL_POLICY_RULE\x10\x07\x12\x30\n,SYSTEM_REGIONAL_NETWORK_FIREWALL_POLICY_RULE\x10\x08\x12$\n UNSUPPORTED_FIREWALL_POLICY_RULE\x10\x64\x12\x12\n\x0eTRACKING_STATE\x10\x65\x12\x14\n\x10\x41NALYSIS_SKIPPED\x10\x66\"Q\n\nTargetType\x12\x1b\n\x17TARGET_TYPE_UNSPECIFIED\x10\x00\x12\r\n\tINSTANCES\x10\x01\x12\x17\n\x13INTERNAL_MANAGED_LB\x10\x02\"\xec\x0b\n\tRouteInfo\x12J\n\nroute_type\x18\x08 \x01(\x0e\x32\x36.google.cloud.networkmanagement.v1.RouteInfo.RouteType\x12O\n\rnext_hop_type\x18\t \x01(\x0e\x32\x38.google.cloud.networkmanagement.v1.RouteInfo.NextHopType\x12P\n\x0broute_scope\x18\x0e \x01(\x0e\x32\x37.google.cloud.networkmanagement.v1.RouteInfo.RouteScopeB\x02\x18\x01\x12\x14\n\x0c\x64isplay_name\x18\x01 \x01(\t\x12\x0b\n\x03uri\x18\x02 \x01(\t\x12\x0e\n\x06region\x18\x13 \x01(\t\x12\x15\n\rdest_ip_range\x18\x03 \x01(\t\x12\x14\n\x08next_hop\x18\x04 \x01(\tB\x02\x18\x01\x12\x13\n\x0bnetwork_uri\x18\x05 \x01(\t\x12\x10\n\x08priority\x18\x06 \x01(\x05\x12\x15\n\rinstance_tags\x18\x07 \x03(\t\x12\x14\n\x0csrc_ip_range\x18\n \x01(\t\x12\x18\n\x10\x64\x65st_port_ranges\x18\x0b \x03(\t\x12\x17\n\x0fsrc_port_ranges\x18\x0c \x03(\t\x12\x11\n\tprotocols\x18\r \x03(\t\x12\x18\n\x0bncc_hub_uri\x18\x0f \x01(\tH\x00\x88\x01\x01\x12\x1a\n\rncc_spoke_uri\x18\x10 \x01(\tH\x01\x88\x01\x01\x12/\n\"advertised_route_source_router_uri\x18\x11 \x01(\tH\x02\x88\x01\x01\x12.\n\x1d\x61\x64vertised_route_next_hop_uri\x18\x12 \x01(\tB\x02\x18\x01H\x03\x88\x01\x01\x12\x14\n\x0cnext_hop_uri\x18\x14 \x01(\t\x12\x1c\n\x14next_hop_network_uri\x18\x15 \x01(\t\x12\x1d\n\x15originating_route_uri\x18\x16 \x01(\t\x12&\n\x1eoriginating_route_display_name\x18\x17 \x01(\t\x12\x19\n\x11ncc_hub_route_uri\x18\x18 \x01(\t\"\xab\x01\n\tRouteType\x12\x1a\n\x16ROUTE_TYPE_UNSPECIFIED\x10\x00\x12\n\n\x06SUBNET\x10\x01\x12\n\n\x06STATIC\x10\x02\x12\x0b\n\x07\x44YNAMIC\x10\x03\x12\x12\n\x0ePEERING_SUBNET\x10\x04\x12\x12\n\x0ePEERING_STATIC\x10\x05\x12\x13\n\x0fPEERING_DYNAMIC\x10\x06\x12\x10\n\x0cPOLICY_BASED\x10\x07\x12\x0e\n\nADVERTISED\x10\x65\"\xea\x02\n\x0bNextHopType\x12\x1d\n\x19NEXT_HOP_TYPE_UNSPECIFIED\x10\x00\x12\x0f\n\x0bNEXT_HOP_IP\x10\x01\x12\x15\n\x11NEXT_HOP_INSTANCE\x10\x02\x12\x14\n\x10NEXT_HOP_NETWORK\x10\x03\x12\x14\n\x10NEXT_HOP_PEERING\x10\x04\x12\x19\n\x15NEXT_HOP_INTERCONNECT\x10\x05\x12\x17\n\x13NEXT_HOP_VPN_TUNNEL\x10\x06\x12\x18\n\x14NEXT_HOP_VPN_GATEWAY\x10\x07\x12\x1d\n\x19NEXT_HOP_INTERNET_GATEWAY\x10\x08\x12\x16\n\x12NEXT_HOP_BLACKHOLE\x10\t\x12\x10\n\x0cNEXT_HOP_ILB\x10\n\x12\x1d\n\x19NEXT_HOP_ROUTER_APPLIANCE\x10\x0b\x12\x14\n\x10NEXT_HOP_NCC_HUB\x10\x0c\x12\x1c\n\x18SECURE_WEB_PROXY_GATEWAY\x10\r\"C\n\nRouteScope\x12\x1b\n\x17ROUTE_SCOPE_UNSPECIFIED\x10\x00\x12\x0b\n\x07NETWORK\x10\x01\x12\x0b\n\x07NCC_HUB\x10\x02\x42\x0e\n\x0c_ncc_hub_uriB\x10\n\x0e_ncc_spoke_uriB%\n#_advertised_route_source_router_uriB \n\x1e_advertised_route_next_hop_uri\"\xda\x02\n\x11GoogleServiceInfo\x12\x11\n\tsource_ip\x18\x01 \x01(\t\x12\x63\n\x13google_service_type\x18\x02 \x01(\x0e\x32\x46.google.cloud.networkmanagement.v1.GoogleServiceInfo.GoogleServiceType\"\xcc\x01\n\x11GoogleServiceType\x12#\n\x1fGOOGLE_SERVICE_TYPE_UNSPECIFIED\x10\x00\x12\x07\n\x03IAP\x10\x01\x12$\n GFE_PROXY_OR_HEALTH_CHECK_PROBER\x10\x02\x12\r\n\tCLOUD_DNS\x10\x03\x12\x0e\n\nGOOGLE_API\x10\x04\x12\x12\n\x0eGOOGLE_API_PSC\x10\x05\x12\x15\n\x11GOOGLE_API_VPC_SC\x10\x06\x12\x19\n\x15SERVERLESS_VPC_ACCESS\x10\x07\"\x8e\x02\n\x12\x46orwardingRuleInfo\x12\x14\n\x0c\x64isplay_name\x18\x01 \x01(\t\x12\x0b\n\x03uri\x18\x02 \x01(\t\x12\x18\n\x10matched_protocol\x18\x03 \x01(\t\x12\x1a\n\x12matched_port_range\x18\x06 \x01(\t\x12\x0b\n\x03vip\x18\x04 \x01(\t\x12\x0e\n\x06target\x18\x05 \x01(\t\x12\x13\n\x0bnetwork_uri\x18\x07 \x01(\t\x12\x0e\n\x06region\x18\x08 \x01(\t\x12\x1a\n\x12load_balancer_name\x18\t \x01(\t\x12\"\n\x1apsc_service_attachment_uri\x18\n \x01(\t\x12\x1d\n\x15psc_google_api_target\x18\x0b \x01(\t\"\xc2\x04\n\x10LoadBalancerInfo\x12`\n\x12load_balancer_type\x18\x01 \x01(\x0e\x32\x44.google.cloud.networkmanagement.v1.LoadBalancerInfo.LoadBalancerType\x12\x1c\n\x10health_check_uri\x18\x02 \x01(\tB\x02\x18\x01\x12H\n\x08\x62\x61\x63kends\x18\x03 \x03(\x0b\x32\x36.google.cloud.networkmanagement.v1.LoadBalancerBackend\x12U\n\x0c\x62\x61\x63kend_type\x18\x04 \x01(\x0e\x32?.google.cloud.networkmanagement.v1.LoadBalancerInfo.BackendType\x12\x13\n\x0b\x62\x61\x63kend_uri\x18\x05 \x01(\t\"\x8f\x01\n\x10LoadBalancerType\x12\"\n\x1eLOAD_BALANCER_TYPE_UNSPECIFIED\x10\x00\x12\x14\n\x10INTERNAL_TCP_UDP\x10\x01\x12\x13\n\x0fNETWORK_TCP_UDP\x10\x02\x12\x0e\n\nHTTP_PROXY\x10\x03\x12\r\n\tTCP_PROXY\x10\x04\x12\r\n\tSSL_PROXY\x10\x05\"f\n\x0b\x42\x61\x63kendType\x12\x1c\n\x18\x42\x41\x43KEND_TYPE_UNSPECIFIED\x10\x00\x12\x13\n\x0f\x42\x41\x43KEND_SERVICE\x10\x01\x12\x0f\n\x0bTARGET_POOL\x10\x02\x12\x13\n\x0fTARGET_INSTANCE\x10\x03\"\xf6\x02\n\x13LoadBalancerBackend\x12\x14\n\x0c\x64isplay_name\x18\x01 \x01(\t\x12\x0b\n\x03uri\x18\x02 \x01(\t\x12t\n\x1bhealth_check_firewall_state\x18\x03 \x01(\x0e\x32O.google.cloud.networkmanagement.v1.LoadBalancerBackend.HealthCheckFirewallState\x12,\n$health_check_allowing_firewall_rules\x18\x04 \x03(\t\x12,\n$health_check_blocking_firewall_rules\x18\x05 \x03(\t\"j\n\x18HealthCheckFirewallState\x12+\n\'HEALTH_CHECK_FIREWALL_STATE_UNSPECIFIED\x10\x00\x12\x0e\n\nCONFIGURED\x10\x01\x12\x11\n\rMISCONFIGURED\x10\x02\"E\n\x10HybridSubnetInfo\x12\x14\n\x0c\x64isplay_name\x18\x01 \x01(\t\x12\x0b\n\x03uri\x18\x02 \x01(\t\x12\x0e\n\x06region\x18\x03 \x01(\t\"\x84\x01\n\x0eVpnGatewayInfo\x12\x14\n\x0c\x64isplay_name\x18\x01 \x01(\t\x12\x0b\n\x03uri\x18\x02 \x01(\t\x12\x13\n\x0bnetwork_uri\x18\x03 \x01(\t\x12\x12\n\nip_address\x18\x04 \x01(\t\x12\x16\n\x0evpn_tunnel_uri\x18\x05 \x01(\t\x12\x0e\n\x06region\x18\x06 \x01(\t\"\xee\x02\n\rVpnTunnelInfo\x12\x14\n\x0c\x64isplay_name\x18\x01 \x01(\t\x12\x0b\n\x03uri\x18\x02 \x01(\t\x12\x16\n\x0esource_gateway\x18\x03 \x01(\t\x12\x16\n\x0eremote_gateway\x18\x04 \x01(\t\x12\x19\n\x11remote_gateway_ip\x18\x05 \x01(\t\x12\x19\n\x11source_gateway_ip\x18\x06 \x01(\t\x12\x13\n\x0bnetwork_uri\x18\x07 \x01(\t\x12\x0e\n\x06region\x18\x08 \x01(\t\x12R\n\x0crouting_type\x18\t \x01(\x0e\x32<.google.cloud.networkmanagement.v1.VpnTunnelInfo.RoutingType\"[\n\x0bRoutingType\x12\x1c\n\x18ROUTING_TYPE_UNSPECIFIED\x10\x00\x12\x0f\n\x0bROUTE_BASED\x10\x01\x12\x10\n\x0cPOLICY_BASED\x10\x02\x12\x0b\n\x07\x44YNAMIC\x10\x03\"\xeb\x02\n\x1aInterconnectAttachmentInfo\x12\x14\n\x0c\x64isplay_name\x18\x01 \x01(\t\x12\x0b\n\x03uri\x18\x02 \x01(\t\x12\x18\n\x10interconnect_uri\x18\x03 \x01(\t\x12\x0e\n\x06region\x18\x04 \x01(\t\x12\x18\n\x10\x63loud_router_uri\x18\x05 \x01(\t\x12P\n\x04type\x18\x06 \x01(\x0e\x32\x42.google.cloud.networkmanagement.v1.InterconnectAttachmentInfo.Type\x12\x32\n l2_attachment_matched_ip_address\x18\x07 \x01(\tB\x08\xe2\x8c\xcf\xd7\x08\x02\x08\x04\"`\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\r\n\tDEDICATED\x10\x01\x12\x0b\n\x07PARTNER\x10\x02\x12\x14\n\x10PARTNER_PROVIDER\x10\x03\x12\x10\n\x0cL2_DEDICATED\x10\x04\"\xd1\x01\n\x0c\x45ndpointInfo\x12\x11\n\tsource_ip\x18\x01 \x01(\t\x12\x16\n\x0e\x64\x65stination_ip\x18\x02 \x01(\t\x12\x10\n\x08protocol\x18\x03 \x01(\t\x12\x13\n\x0bsource_port\x18\x04 \x01(\x05\x12\x18\n\x10\x64\x65stination_port\x18\x05 \x01(\x05\x12\x1a\n\x12source_network_uri\x18\x06 \x01(\t\x12\x1f\n\x17\x64\x65stination_network_uri\x18\x07 \x01(\t\x12\x18\n\x10source_agent_uri\x18\x08 \x01(\t\"\xd4\x06\n\x0b\x44\x65liverInfo\x12\x45\n\x06target\x18\x01 \x01(\x0e\x32\x35.google.cloud.networkmanagement.v1.DeliverInfo.Target\x12\x14\n\x0cresource_uri\x18\x02 \x01(\t\x12\x1c\n\nip_address\x18\x03 \x01(\tB\x08\xe2\x8c\xcf\xd7\x08\x02\x08\x04\x12\x16\n\x0estorage_bucket\x18\x04 \x01(\t\x12\x1d\n\x15psc_google_api_target\x18\x05 \x01(\t\x12]\n\x13google_service_type\x18\x06 \x01(\x0e\x32@.google.cloud.networkmanagement.v1.DeliverInfo.GoogleServiceType\"\x84\x03\n\x06Target\x12\x16\n\x12TARGET_UNSPECIFIED\x10\x00\x12\x0c\n\x08INSTANCE\x10\x01\x12\x0c\n\x08INTERNET\x10\x02\x12\x0e\n\nGOOGLE_API\x10\x03\x12\x0e\n\nGKE_MASTER\x10\x04\x12\x16\n\x12\x43LOUD_SQL_INSTANCE\x10\x05\x12\x19\n\x15PSC_PUBLISHED_SERVICE\x10\x06\x12\x12\n\x0ePSC_GOOGLE_API\x10\x07\x12\x0e\n\nPSC_VPC_SC\x10\x08\x12\x12\n\x0eSERVERLESS_NEG\x10\t\x12\x12\n\x0eSTORAGE_BUCKET\x10\n\x12\x13\n\x0fPRIVATE_NETWORK\x10\x0b\x12\x12\n\x0e\x43LOUD_FUNCTION\x10\x0c\x12\x16\n\x12\x41PP_ENGINE_VERSION\x10\r\x12\x16\n\x12\x43LOUD_RUN_REVISION\x10\x0e\x12\x1a\n\x16GOOGLE_MANAGED_SERVICE\x10\x0f\x12\x12\n\x0eREDIS_INSTANCE\x10\x10\x12\x11\n\rREDIS_CLUSTER\x10\x11\x12\x0b\n\x07GKE_POD\x10\x13\"\xac\x01\n\x11GoogleServiceType\x12#\n\x1fGOOGLE_SERVICE_TYPE_UNSPECIFIED\x10\x00\x12\x07\n\x03IAP\x10\x01\x12$\n GFE_PROXY_OR_HEALTH_CHECK_PROBER\x10\x02\x12\r\n\tCLOUD_DNS\x10\x03\x12\x19\n\x15PRIVATE_GOOGLE_ACCESS\x10\x04\x12\x19\n\x15SERVERLESS_VPC_ACCESS\x10\x05\"\x89\x03\n\x0b\x46orwardInfo\x12\x45\n\x06target\x18\x01 \x01(\x0e\x32\x35.google.cloud.networkmanagement.v1.ForwardInfo.Target\x12\x14\n\x0cresource_uri\x18\x02 \x01(\t\x12\x1c\n\nip_address\x18\x03 \x01(\tB\x08\xe2\x8c\xcf\xd7\x08\x02\x08\x04\"\xfe\x01\n\x06Target\x12\x16\n\x12TARGET_UNSPECIFIED\x10\x00\x12\x0f\n\x0bPEERING_VPC\x10\x01\x12\x0f\n\x0bVPN_GATEWAY\x10\x02\x12\x10\n\x0cINTERCONNECT\x10\x03\x12\x12\n\nGKE_MASTER\x10\x04\x1a\x02\x08\x01\x12\"\n\x1eIMPORTED_CUSTOM_ROUTE_NEXT_HOP\x10\x05\x12\x1a\n\x12\x43LOUD_SQL_INSTANCE\x10\x06\x1a\x02\x08\x01\x12\x13\n\x0f\x41NOTHER_PROJECT\x10\x07\x12\x0b\n\x07NCC_HUB\x10\x08\x12\x14\n\x10ROUTER_APPLIANCE\x10\t\x12\x1c\n\x18SECURE_WEB_PROXY_GATEWAY\x10\n\"\x85\r\n\tAbortInfo\x12\x41\n\x05\x63\x61use\x18\x01 \x01(\x0e\x32\x32.google.cloud.networkmanagement.v1.AbortInfo.Cause\x12\x14\n\x0cresource_uri\x18\x02 \x01(\t\x12\x1c\n\nip_address\x18\x04 \x01(\tB\x08\xe2\x8c\xcf\xd7\x08\x02\x08\x04\x12#\n\x1bprojects_missing_permission\x18\x03 \x03(\t\"\xdb\x0b\n\x05\x43\x61use\x12\x15\n\x11\x43\x41USE_UNSPECIFIED\x10\x00\x12\x17\n\x0fUNKNOWN_NETWORK\x10\x01\x1a\x02\x08\x01\x12\x17\n\x0fUNKNOWN_PROJECT\x10\x03\x1a\x02\x08\x01\x12\x16\n\x0eNO_EXTERNAL_IP\x10\x07\x1a\x02\x08\x01\x12\x1e\n\x16UNINTENDED_DESTINATION\x10\x08\x1a\x02\x08\x01\x12!\n\x19SOURCE_ENDPOINT_NOT_FOUND\x10\x0b\x1a\x02\x08\x01\x12!\n\x19MISMATCHED_SOURCE_NETWORK\x10\x0c\x1a\x02\x08\x01\x12&\n\x1e\x44\x45STINATION_ENDPOINT_NOT_FOUND\x10\r\x1a\x02\x08\x01\x12&\n\x1eMISMATCHED_DESTINATION_NETWORK\x10\x0e\x1a\x02\x08\x01\x12\x0e\n\nUNKNOWN_IP\x10\x02\x12%\n!GOOGLE_MANAGED_SERVICE_UNKNOWN_IP\x10 \x12+\n\'SOURCE_IP_ADDRESS_NOT_IN_SOURCE_NETWORK\x10\x17\x12\x15\n\x11PERMISSION_DENIED\x10\x04\x12*\n&PERMISSION_DENIED_NO_CLOUD_NAT_CONFIGS\x10\x1c\x12-\n)PERMISSION_DENIED_NO_NEG_ENDPOINT_CONFIGS\x10\x1d\x12-\n)PERMISSION_DENIED_NO_CLOUD_ROUTER_CONFIGS\x10$\x12\x16\n\x12NO_SOURCE_LOCATION\x10\x05\x12\"\n\x1eNO_SOURCE_GCP_NETWORK_LOCATION\x10*\x12&\n\"NO_SOURCE_NON_GCP_NETWORK_LOCATION\x10+\x12\x1f\n\x1bNO_SOURCE_INTERNET_LOCATION\x10,\x12\x14\n\x10INVALID_ARGUMENT\x10\x06\x12\x12\n\x0eTRACE_TOO_LONG\x10\t\x12\x12\n\x0eINTERNAL_ERROR\x10\n\x12\x0f\n\x0bUNSUPPORTED\x10\x0f\x12\x19\n\x15MISMATCHED_IP_VERSION\x10\x10\x12&\n\"GKE_KONNECTIVITY_PROXY_UNSUPPORTED\x10\x11\x12\x1d\n\x19RESOURCE_CONFIG_NOT_FOUND\x10\x12\x12 \n\x1cVM_INSTANCE_CONFIG_NOT_FOUND\x10\x18\x12\x1c\n\x18NETWORK_CONFIG_NOT_FOUND\x10\x19\x12\x1d\n\x19\x46IREWALL_CONFIG_NOT_FOUND\x10\x1a\x12\x1a\n\x16ROUTE_CONFIG_NOT_FOUND\x10\x1b\x12\x31\n-GOOGLE_MANAGED_SERVICE_AMBIGUOUS_PSC_ENDPOINT\x10\x13\x12-\n)GOOGLE_MANAGED_SERVICE_AMBIGUOUS_ENDPOINT\x10\'\x12$\n SOURCE_PSC_CLOUD_SQL_UNSUPPORTED\x10\x14\x12)\n%SOURCE_EXTERNAL_CLOUD_SQL_UNSUPPORTED\x10-\x12$\n SOURCE_REDIS_CLUSTER_UNSUPPORTED\x10\"\x12%\n!SOURCE_REDIS_INSTANCE_UNSUPPORTED\x10#\x12&\n\"SOURCE_FORWARDING_RULE_UNSUPPORTED\x10\x15\x12\x1b\n\x17NON_ROUTABLE_IP_ADDRESS\x10\x16\x12+\n\'UNKNOWN_ISSUE_IN_GOOGLE_MANAGED_PROJECT\x10\x1e\x12-\n)UNSUPPORTED_GOOGLE_MANAGED_PROJECT_CONFIG\x10\x1f\x12\x1b\n\x17NO_SERVERLESS_IP_RANGES\x10%\x12 \n\x1cIP_VERSION_PROTOCOL_MISMATCH\x10(\x12%\n!GKE_POD_UNKNOWN_ENDPOINT_LOCATION\x10)\"\xda!\n\x08\x44ropInfo\x12@\n\x05\x63\x61use\x18\x01 \x01(\x0e\x32\x31.google.cloud.networkmanagement.v1.DropInfo.Cause\x12\x14\n\x0cresource_uri\x18\x02 \x01(\t\x12\x11\n\tsource_ip\x18\x03 \x01(\t\x12\x16\n\x0e\x64\x65stination_ip\x18\x04 \x01(\t\x12\x0e\n\x06region\x18\x05 \x01(\t\x12\x1f\n\x17source_geolocation_code\x18\x06 \x01(\t\x12$\n\x1c\x64\x65stination_geolocation_code\x18\x07 \x01(\t\"\xf3\x1f\n\x05\x43\x61use\x12\x15\n\x11\x43\x41USE_UNSPECIFIED\x10\x00\x12\x1c\n\x18UNKNOWN_EXTERNAL_ADDRESS\x10\x01\x12\x19\n\x15\x46OREIGN_IP_DISALLOWED\x10\x02\x12\x11\n\rFIREWALL_RULE\x10\x03\x12\x0c\n\x08NO_ROUTE\x10\x04\x12\x13\n\x0fROUTE_BLACKHOLE\x10\x05\x12\x17\n\x13ROUTE_WRONG_NETWORK\x10\x06\x12*\n&ROUTE_NEXT_HOP_IP_ADDRESS_NOT_RESOLVED\x10*\x12%\n!ROUTE_NEXT_HOP_RESOURCE_NOT_FOUND\x10+\x12)\n%ROUTE_NEXT_HOP_INSTANCE_WRONG_NETWORK\x10\x31\x12*\n&ROUTE_NEXT_HOP_INSTANCE_NON_PRIMARY_IP\x10\x32\x12.\n*ROUTE_NEXT_HOP_FORWARDING_RULE_IP_MISMATCH\x10\x33\x12-\n)ROUTE_NEXT_HOP_VPN_TUNNEL_NOT_ESTABLISHED\x10\x34\x12/\n+ROUTE_NEXT_HOP_FORWARDING_RULE_TYPE_INVALID\x10\x35\x12\x32\n.NO_ROUTE_FROM_INTERNET_TO_PRIVATE_IPV6_ADDRESS\x10,\x12\x32\n.NO_ROUTE_FROM_INTERNET_TO_PRIVATE_IPV4_ADDRESS\x10m\x12>\n:NO_ROUTE_FROM_EXTERNAL_IPV6_SOURCE_TO_PRIVATE_IPV6_ADDRESS\x10\x62\x12&\n\"VPN_TUNNEL_LOCAL_SELECTOR_MISMATCH\x10-\x12\'\n#VPN_TUNNEL_REMOTE_SELECTOR_MISMATCH\x10.\x12\x1f\n\x1bPRIVATE_TRAFFIC_TO_INTERNET\x10\x07\x12$\n PRIVATE_GOOGLE_ACCESS_DISALLOWED\x10\x08\x12\x34\n0PRIVATE_GOOGLE_ACCESS_VIA_VPN_TUNNEL_UNSUPPORTED\x10/\x12\x17\n\x13NO_EXTERNAL_ADDRESS\x10\t\x12\x1c\n\x18UNKNOWN_INTERNAL_ADDRESS\x10\n\x12\x1c\n\x18\x46ORWARDING_RULE_MISMATCH\x10\x0b\x12 \n\x1c\x46ORWARDING_RULE_NO_INSTANCES\x10\x0c\x12\x38\n4FIREWALL_BLOCKING_LOAD_BALANCER_BACKEND_HEALTH_CHECK\x10\r\x12:\n6INGRESS_FIREWALL_TAGS_UNSUPPORTED_BY_DIRECT_VPC_EGRESS\x10U\x12\x18\n\x14INSTANCE_NOT_RUNNING\x10\x0e\x12\x1b\n\x17GKE_CLUSTER_NOT_RUNNING\x10\x1b\x12\x17\n\x13GKE_POD_NOT_RUNNING\x10g\x12\"\n\x1e\x43LOUD_SQL_INSTANCE_NOT_RUNNING\x10\x1c\x12\x1e\n\x1aREDIS_INSTANCE_NOT_RUNNING\x10\x44\x12\x1d\n\x19REDIS_CLUSTER_NOT_RUNNING\x10\x45\x12\x18\n\x14TRAFFIC_TYPE_BLOCKED\x10\x0f\x12\"\n\x1eGKE_MASTER_UNAUTHORIZED_ACCESS\x10\x10\x12*\n&CLOUD_SQL_INSTANCE_UNAUTHORIZED_ACCESS\x10\x11\x12\x1e\n\x1a\x44ROPPED_INSIDE_GKE_SERVICE\x10\x12\x12$\n DROPPED_INSIDE_CLOUD_SQL_SERVICE\x10\x13\x12%\n!GOOGLE_MANAGED_SERVICE_NO_PEERING\x10\x14\x12*\n&GOOGLE_MANAGED_SERVICE_NO_PSC_ENDPOINT\x10&\x12\x1c\n\x18GKE_PSC_ENDPOINT_MISSING\x10$\x12$\n CLOUD_SQL_INSTANCE_NO_IP_ADDRESS\x10\x15\x12%\n!GKE_CONTROL_PLANE_REGION_MISMATCH\x10\x1e\x12\x33\n/PUBLIC_GKE_CONTROL_PLANE_TO_PRIVATE_DESTINATION\x10\x1f\x12\x1e\n\x1aGKE_CONTROL_PLANE_NO_ROUTE\x10 \x12:\n6CLOUD_SQL_INSTANCE_NOT_CONFIGURED_FOR_EXTERNAL_TRAFFIC\x10!\x12\x34\n0PUBLIC_CLOUD_SQL_INSTANCE_TO_PRIVATE_DESTINATION\x10\"\x12\x1f\n\x1b\x43LOUD_SQL_INSTANCE_NO_ROUTE\x10#\x12 \n\x1c\x43LOUD_SQL_CONNECTOR_REQUIRED\x10?\x12\x1d\n\x19\x43LOUD_FUNCTION_NOT_ACTIVE\x10\x16\x12\x19\n\x15VPC_CONNECTOR_NOT_SET\x10\x17\x12\x1d\n\x19VPC_CONNECTOR_NOT_RUNNING\x10\x18\x12,\n(VPC_CONNECTOR_SERVERLESS_TRAFFIC_BLOCKED\x10<\x12.\n*VPC_CONNECTOR_HEALTH_CHECK_TRAFFIC_BLOCKED\x10=\x12#\n\x1f\x46ORWARDING_RULE_REGION_MISMATCH\x10\x19\x12\x1f\n\x1bPSC_CONNECTION_NOT_ACCEPTED\x10\x1a\x12-\n)PSC_ENDPOINT_ACCESSED_FROM_PEERED_NETWORK\x10)\x12.\n*PSC_NEG_PRODUCER_ENDPOINT_NO_GLOBAL_ACCESS\x10\x30\x12\x33\n/PSC_NEG_PRODUCER_FORWARDING_RULE_MULTIPLE_PORTS\x10\x36\x12!\n\x1d\x43LOUD_SQL_PSC_NEG_UNSUPPORTED\x10:\x12-\n)NO_NAT_SUBNETS_FOR_PSC_SERVICE_ATTACHMENT\x10\x39\x12#\n\x1fPSC_TRANSITIVITY_NOT_PROPAGATED\x10@\x12(\n$HYBRID_NEG_NON_DYNAMIC_ROUTE_MATCHED\x10\x37\x12.\n*HYBRID_NEG_NON_LOCAL_DYNAMIC_ROUTE_MATCHED\x10\x38\x12 \n\x1c\x43LOUD_RUN_REVISION_NOT_READY\x10\x1d\x12\'\n#DROPPED_INSIDE_PSC_SERVICE_PRODUCER\x10%\x12%\n!LOAD_BALANCER_HAS_NO_PROXY_SUBNET\x10\'\x12\x1a\n\x16\x43LOUD_NAT_NO_ADDRESSES\x10(\x12\x10\n\x0cROUTING_LOOP\x10;\x12)\n%DROPPED_INSIDE_GOOGLE_MANAGED_SERVICE\x10>\x12)\n%LOAD_BALANCER_BACKEND_INVALID_NETWORK\x10\x41\x12*\n&BACKEND_SERVICE_NAMED_PORT_NOT_DEFINED\x10\x42\x12\'\n#DESTINATION_IS_PRIVATE_NAT_IP_RANGE\x10\x43\x12)\n%DROPPED_INSIDE_REDIS_INSTANCE_SERVICE\x10\x46\x12#\n\x1fREDIS_INSTANCE_UNSUPPORTED_PORT\x10G\x12/\n+REDIS_INSTANCE_CONNECTING_FROM_PUPI_ADDRESS\x10H\x12\x32\n.REDIS_INSTANCE_NO_ROUTE_TO_DESTINATION_NETWORK\x10I\x12!\n\x1dREDIS_INSTANCE_NO_EXTERNAL_IP\x10J\x12\'\n#REDIS_INSTANCE_UNSUPPORTED_PROTOCOL\x10N\x12(\n$DROPPED_INSIDE_REDIS_CLUSTER_SERVICE\x10K\x12\"\n\x1eREDIS_CLUSTER_UNSUPPORTED_PORT\x10L\x12 \n\x1cREDIS_CLUSTER_NO_EXTERNAL_IP\x10M\x12&\n\"REDIS_CLUSTER_UNSUPPORTED_PROTOCOL\x10O\x12*\n&NO_ADVERTISED_ROUTE_TO_GCP_DESTINATION\x10P\x12*\n&NO_TRAFFIC_SELECTOR_TO_GCP_DESTINATION\x10Q\x12\x35\n1NO_KNOWN_ROUTE_FROM_PEERED_NETWORK_TO_DESTINATION\x10R\x12+\n\'PRIVATE_NAT_TO_PSC_ENDPOINT_UNSUPPORTED\x10S\x12\"\n\x1ePSC_PORT_MAPPING_PORT_MISMATCH\x10V\x12\x37\n3PSC_PORT_MAPPING_WITHOUT_PSC_CONNECTION_UNSUPPORTED\x10W\x12\x33\n/UNSUPPORTED_ROUTE_MATCHED_FOR_NAT64_DESTINATION\x10X\x12\x37\n3TRAFFIC_FROM_HYBRID_ENDPOINT_TO_INTERNET_DISALLOWED\x10Y\x12\x1d\n\x19NO_MATCHING_NAT64_GATEWAY\x10Z\x12$\n NO_CONFIGURED_PRIVATE_NAT64_RULE\x10k\x12-\n)LOAD_BALANCER_BACKEND_IP_VERSION_MISMATCH\x10`\x12\x32\n.NO_KNOWN_ROUTE_FROM_NCC_NETWORK_TO_DESTINATION\x10\x61\x12\"\n\x1e\x43LOUD_NAT_PROTOCOL_UNSUPPORTED\x10\x63\x12(\n$L2_INTERCONNECT_UNSUPPORTED_PROTOCOL\x10\x64\x12$\n L2_INTERCONNECT_UNSUPPORTED_PORT\x10\x65\x12+\n\'L2_INTERCONNECT_DESTINATION_IP_MISMATCH\x10\x66\x12.\n*NCC_ROUTE_WITHIN_HYBRID_SUBNET_UNSUPPORTED\x10h\x12!\n\x1dHYBRID_SUBNET_REGION_MISMATCH\x10i\x12\x1a\n\x16HYBRID_SUBNET_NO_ROUTE\x10j\"\x81\x01\n\rGKEMasterInfo\x12\x13\n\x0b\x63luster_uri\x18\x02 \x01(\t\x12\x1b\n\x13\x63luster_network_uri\x18\x04 \x01(\t\x12\x13\n\x0binternal_ip\x18\x05 \x01(\t\x12\x13\n\x0b\x65xternal_ip\x18\x06 \x01(\t\x12\x14\n\x0c\x64ns_endpoint\x18\x07 \x01(\t\"P\n\nGkePodInfo\x12\x0f\n\x07pod_uri\x18\x01 \x01(\t\x12\x1c\n\nip_address\x18\x02 \x01(\tB\x08\xe2\x8c\xcf\xd7\x08\x02\x08\x04\x12\x13\n\x0bnetwork_uri\x18\x03 \x01(\t\"\xbf\x03\n\x19IpMasqueradingSkippedInfo\x12S\n\x06reason\x18\x01 \x01(\x0e\x32\x43.google.cloud.networkmanagement.v1.IpMasqueradingSkippedInfo.Reason\x12\x1c\n\x14non_masquerade_range\x18\x02 \x01(\t\"\xae\x02\n\x06Reason\x12\x16\n\x12REASON_UNSPECIFIED\x10\x00\x12\x35\n1DESTINATION_IP_IN_CONFIGURED_NON_MASQUERADE_RANGE\x10\x01\x12\x32\n.DESTINATION_IP_IN_DEFAULT_NON_MASQUERADE_RANGE\x10\x02\x12\x1c\n\x18\x44\x45STINATION_ON_SAME_NODE\x10\x03\x12\x19\n\x15\x44\x45\x46\x41ULT_SNAT_DISABLED\x10\x04\x12\x1c\n\x18NO_MASQUERADING_FOR_IPV6\x10\x05\x12#\n\x1fPOD_USES_NODE_NETWORK_NAMESPACE\x10\x06\x12%\n!NO_MASQUERADING_FOR_RETURN_PACKET\x10\x07\"\x88\x01\n\x14\x43loudSQLInstanceInfo\x12\x14\n\x0c\x64isplay_name\x18\x01 \x01(\t\x12\x0b\n\x03uri\x18\x02 \x01(\t\x12\x13\n\x0bnetwork_uri\x18\x04 \x01(\t\x12\x13\n\x0binternal_ip\x18\x05 \x01(\t\x12\x13\n\x0b\x65xternal_ip\x18\x06 \x01(\t\x12\x0e\n\x06region\x18\x07 \x01(\t\"\x92\x01\n\x11RedisInstanceInfo\x12\x14\n\x0c\x64isplay_name\x18\x01 \x01(\t\x12\x0b\n\x03uri\x18\x02 \x01(\t\x12\x13\n\x0bnetwork_uri\x18\x03 \x01(\t\x12\x1b\n\x13primary_endpoint_ip\x18\x04 \x01(\t\x12\x18\n\x10read_endpoint_ip\x18\x05 \x01(\t\x12\x0e\n\x06region\x18\x06 \x01(\t\"\xbe\x01\n\x10RedisClusterInfo\x12\x14\n\x0c\x64isplay_name\x18\x01 \x01(\t\x12\x0b\n\x03uri\x18\x02 \x01(\t\x12\x13\n\x0bnetwork_uri\x18\x03 \x01(\t\x12/\n\x1d\x64iscovery_endpoint_ip_address\x18\x04 \x01(\tB\x08\xe2\x8c\xcf\xd7\x08\x02\x08\x04\x12/\n\x1dsecondary_endpoint_ip_address\x18\x05 \x01(\tB\x08\xe2\x8c\xcf\xd7\x08\x02\x08\x04\x12\x10\n\x08location\x18\x06 \x01(\t\"\\\n\x11\x43loudFunctionInfo\x12\x14\n\x0c\x64isplay_name\x18\x01 \x01(\t\x12\x0b\n\x03uri\x18\x02 \x01(\t\x12\x10\n\x08location\x18\x03 \x01(\t\x12\x12\n\nversion_id\x18\x04 \x01(\x03\"`\n\x14\x43loudRunRevisionInfo\x12\x14\n\x0c\x64isplay_name\x18\x01 \x01(\t\x12\x0b\n\x03uri\x18\x02 \x01(\t\x12\x10\n\x08location\x18\x04 \x01(\t\x12\x13\n\x0bservice_uri\x18\x05 \x01(\t\"_\n\x14\x41ppEngineVersionInfo\x12\x14\n\x0c\x64isplay_name\x18\x01 \x01(\t\x12\x0b\n\x03uri\x18\x02 \x01(\t\x12\x0f\n\x07runtime\x18\x03 \x01(\t\x12\x13\n\x0b\x65nvironment\x18\x04 \x01(\t\"G\n\x10VpcConnectorInfo\x12\x14\n\x0c\x64isplay_name\x18\x01 \x01(\t\x12\x0b\n\x03uri\x18\x02 \x01(\t\x12\x10\n\x08location\x18\x03 \x01(\t\"\xa8\x01\n\x1d\x44irectVpcEgressConnectionInfo\x12\x13\n\x0bnetwork_uri\x18\x01 \x01(\t\x12\x16\n\x0esubnetwork_uri\x18\x02 \x01(\t\x12#\n\x11selected_ip_range\x18\x03 \x01(\tB\x08\xe2\x8c\xcf\xd7\x08\x02\x08\x04\x12%\n\x13selected_ip_address\x18\x04 \x01(\tB\x08\xe2\x8c\xcf\xd7\x08\x02\x08\x04\x12\x0e\n\x06region\x18\x05 \x01(\t\"I\n ServerlessExternalConnectionInfo\x12%\n\x13selected_ip_address\x18\x01 \x01(\tB\x08\xe2\x8c\xcf\xd7\x08\x02\x08\x04\"\x91\x06\n\x07NatInfo\x12=\n\x04type\x18\x01 \x01(\x0e\x32/.google.cloud.networkmanagement.v1.NatInfo.Type\x12\x10\n\x08protocol\x18\x02 \x01(\t\x12\x13\n\x0bnetwork_uri\x18\x03 \x01(\t\x12\x15\n\rold_source_ip\x18\x04 \x01(\t\x12\x15\n\rnew_source_ip\x18\x05 \x01(\t\x12\x1a\n\x12old_destination_ip\x18\x06 \x01(\t\x12\x1a\n\x12new_destination_ip\x18\x07 \x01(\t\x12\x17\n\x0fold_source_port\x18\x08 \x01(\x05\x12\x17\n\x0fnew_source_port\x18\t \x01(\x05\x12\x1c\n\x14old_destination_port\x18\n \x01(\x05\x12\x1c\n\x14new_destination_port\x18\x0b \x01(\x05\x12\x12\n\nrouter_uri\x18\x0c \x01(\t\x12\x18\n\x10nat_gateway_name\x18\r \x01(\t\x12^\n\x16\x63loud_nat_gateway_type\x18\x0e \x01(\x0e\x32>.google.cloud.networkmanagement.v1.NatInfo.CloudNatGatewayType\"\x99\x01\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x18\n\x14INTERNAL_TO_EXTERNAL\x10\x01\x12\x18\n\x14\x45XTERNAL_TO_INTERNAL\x10\x02\x12\r\n\tCLOUD_NAT\x10\x03\x12\x1b\n\x17PRIVATE_SERVICE_CONNECT\x10\x04\x12\x1b\n\x17GKE_POD_IP_MASQUERADING\x10\x05\"\xa1\x01\n\x13\x43loudNatGatewayType\x12&\n\"CLOUD_NAT_GATEWAY_TYPE_UNSPECIFIED\x10\x00\x12\x10\n\x0cPUBLIC_NAT44\x10\x01\x12\x10\n\x0cPUBLIC_NAT64\x10\x02\x12\x13\n\x0fPRIVATE_NAT_NCC\x10\x03\x12\x16\n\x12PRIVATE_NAT_HYBRID\x10\x04\x12\x11\n\rPRIVATE_NAT64\x10\x05\"\xa4\x02\n\x13ProxyConnectionInfo\x12\x10\n\x08protocol\x18\x01 \x01(\t\x12\x15\n\rold_source_ip\x18\x02 \x01(\t\x12\x15\n\rnew_source_ip\x18\x03 \x01(\t\x12\x1a\n\x12old_destination_ip\x18\x04 \x01(\t\x12\x1a\n\x12new_destination_ip\x18\x05 \x01(\t\x12\x17\n\x0fold_source_port\x18\x06 \x01(\x05\x12\x17\n\x0fnew_source_port\x18\x07 \x01(\x05\x12\x1c\n\x14old_destination_port\x18\x08 \x01(\x05\x12\x1c\n\x14new_destination_port\x18\t \x01(\x05\x12\x12\n\nsubnet_uri\x18\n \x01(\t\x12\x13\n\x0bnetwork_uri\x18\x0b \x01(\t\"\xf2\x04\n\x17LoadBalancerBackendInfo\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0cinstance_uri\x18\x02 \x01(\t\x12\x1b\n\x13\x62\x61\x63kend_service_uri\x18\x03 \x01(\t\x12\x1a\n\x12instance_group_uri\x18\x04 \x01(\t\x12\"\n\x1anetwork_endpoint_group_uri\x18\x05 \x01(\t\x12\x1a\n\x12\x62\x61\x63kend_bucket_uri\x18\x08 \x01(\t\x12\"\n\x1apsc_service_attachment_uri\x18\t \x01(\t\x12\x1d\n\x15psc_google_api_target\x18\n \x01(\t\x12\x18\n\x10health_check_uri\x18\x06 \x01(\t\x12\x8c\x01\n#health_check_firewalls_config_state\x18\x07 \x01(\x0e\x32Z.google.cloud.networkmanagement.v1.LoadBalancerBackendInfo.HealthCheckFirewallsConfigStateB\x03\xe0\x41\x03\"\xcd\x01\n\x1fHealthCheckFirewallsConfigState\x12\x33\n/HEALTH_CHECK_FIREWALLS_CONFIG_STATE_UNSPECIFIED\x10\x00\x12\x18\n\x14\x46IREWALLS_CONFIGURED\x10\x01\x12\"\n\x1e\x46IREWALLS_PARTIALLY_CONFIGURED\x10\x02\x12\x1c\n\x18\x46IREWALLS_NOT_CONFIGURED\x10\x03\x12\x19\n\x15\x46IREWALLS_UNSUPPORTED\x10\x04\"#\n\x11StorageBucketInfo\x12\x0e\n\x06\x62ucket\x18\x01 \x01(\t\"$\n\x11ServerlessNegInfo\x12\x0f\n\x07neg_uri\x18\x01 \x01(\t*\xf6\x02\n\x10LoadBalancerType\x12\"\n\x1eLOAD_BALANCER_TYPE_UNSPECIFIED\x10\x00\x12 \n\x1cHTTPS_ADVANCED_LOAD_BALANCER\x10\x01\x12\x17\n\x13HTTPS_LOAD_BALANCER\x10\x02\x12 \n\x1cREGIONAL_HTTPS_LOAD_BALANCER\x10\x03\x12 \n\x1cINTERNAL_HTTPS_LOAD_BALANCER\x10\x04\x12\x1b\n\x17SSL_PROXY_LOAD_BALANCER\x10\x05\x12\x1b\n\x17TCP_PROXY_LOAD_BALANCER\x10\x06\x12$\n INTERNAL_TCP_PROXY_LOAD_BALANCER\x10\x07\x12\x19\n\x15NETWORK_LOAD_BALANCER\x10\x08\x12 \n\x1cLEGACY_NETWORK_LOAD_BALANCER\x10\t\x12\"\n\x1eTCP_UDP_INTERNAL_LOAD_BALANCER\x10\nB\xf9\x01\n%com.google.cloud.networkmanagement.v1B\nTraceProtoP\x01ZScloud.google.com/go/networkmanagement/apiv1/networkmanagementpb;networkmanagementpb\xaa\x02!Google.Cloud.NetworkManagement.V1\xca\x02!Google\\Cloud\\NetworkManagement\\V1\xea\x02$Google::Cloud::NetworkManagement::V1b\x06proto3" +descriptor_data = "\n-google/cloud/networkmanagement/v1/trace.proto\x12!google.cloud.networkmanagement.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1bgoogle/api/field_info.proto\"\xa1\x01\n\x05Trace\x12\x46\n\rendpoint_info\x18\x01 \x01(\x0b\x32/.google.cloud.networkmanagement.v1.EndpointInfo\x12\x36\n\x05steps\x18\x02 \x03(\x0b\x32\'.google.cloud.networkmanagement.v1.Step\x12\x18\n\x10\x66orward_trace_id\x18\x04 \x01(\x05\"\xfd!\n\x04Step\x12\x13\n\x0b\x64\x65scription\x18\x01 \x01(\t\x12<\n\x05state\x18\x02 \x01(\x0e\x32-.google.cloud.networkmanagement.v1.Step.State\x12\x13\n\x0b\x63\x61uses_drop\x18\x03 \x01(\x08\x12\x12\n\nproject_id\x18\x04 \x01(\t\x12\x43\n\x08instance\x18\x05 \x01(\x0b\x32/.google.cloud.networkmanagement.v1.InstanceInfoH\x00\x12\x43\n\x08\x66irewall\x18\x06 \x01(\x0b\x32/.google.cloud.networkmanagement.v1.FirewallInfoH\x00\x12=\n\x05route\x18\x07 \x01(\x0b\x32,.google.cloud.networkmanagement.v1.RouteInfoH\x00\x12\x43\n\x08\x65ndpoint\x18\x08 \x01(\x0b\x32/.google.cloud.networkmanagement.v1.EndpointInfoH\x00\x12N\n\x0egoogle_service\x18\x18 \x01(\x0b\x32\x34.google.cloud.networkmanagement.v1.GoogleServiceInfoH\x00\x12P\n\x0f\x66orwarding_rule\x18\t \x01(\x0b\x32\x35.google.cloud.networkmanagement.v1.ForwardingRuleInfoH\x00\x12L\n\rhybrid_subnet\x18$ \x01(\x0b\x32\x33.google.cloud.networkmanagement.v1.HybridSubnetInfoH\x00\x12H\n\x0bvpn_gateway\x18\n \x01(\x0b\x32\x31.google.cloud.networkmanagement.v1.VpnGatewayInfoH\x00\x12\x46\n\nvpn_tunnel\x18\x0b \x01(\x0b\x32\x30.google.cloud.networkmanagement.v1.VpnTunnelInfoH\x00\x12`\n\x17interconnect_attachment\x18# \x01(\x0b\x32=.google.cloud.networkmanagement.v1.InterconnectAttachmentInfoH\x00\x12L\n\rvpc_connector\x18\x15 \x01(\x0b\x32\x33.google.cloud.networkmanagement.v1.VpcConnectorInfoH\x00\x12h\n\x1c\x64irect_vpc_egress_connection\x18! \x01(\x0b\x32@.google.cloud.networkmanagement.v1.DirectVpcEgressConnectionInfoH\x00\x12m\n\x1eserverless_external_connection\x18\" \x01(\x0b\x32\x43.google.cloud.networkmanagement.v1.ServerlessExternalConnectionInfoH\x00\x12\x41\n\x07\x64\x65liver\x18\x0c \x01(\x0b\x32..google.cloud.networkmanagement.v1.DeliverInfoH\x00\x12\x41\n\x07\x66orward\x18\r \x01(\x0b\x32..google.cloud.networkmanagement.v1.ForwardInfoH\x00\x12=\n\x05\x61\x62ort\x18\x0e \x01(\x0b\x32,.google.cloud.networkmanagement.v1.AbortInfoH\x00\x12;\n\x04\x64rop\x18\x0f \x01(\x0b\x32+.google.cloud.networkmanagement.v1.DropInfoH\x00\x12P\n\rload_balancer\x18\x10 \x01(\x0b\x32\x33.google.cloud.networkmanagement.v1.LoadBalancerInfoB\x02\x18\x01H\x00\x12\x41\n\x07network\x18\x11 \x01(\x0b\x32..google.cloud.networkmanagement.v1.NetworkInfoH\x00\x12\x46\n\ngke_master\x18\x12 \x01(\x0b\x32\x30.google.cloud.networkmanagement.v1.GKEMasterInfoH\x00\x12@\n\x07gke_pod\x18% \x01(\x0b\x32-.google.cloud.networkmanagement.v1.GkePodInfoH\x00\x12_\n\x17ip_masquerading_skipped\x18& \x01(\x0b\x32<.google.cloud.networkmanagement.v1.IpMasqueradingSkippedInfoH\x00\x12U\n\x12gke_network_policy\x18\' \x01(\x0b\x32\x37.google.cloud.networkmanagement.v1.GkeNetworkPolicyInfoH\x00\x12\x64\n\x1agke_network_policy_skipped\x18( \x01(\x0b\x32>.google.cloud.networkmanagement.v1.GkeNetworkPolicySkippedInfoH\x00\x12U\n\x12\x63loud_sql_instance\x18\x13 \x01(\x0b\x32\x37.google.cloud.networkmanagement.v1.CloudSQLInstanceInfoH\x00\x12N\n\x0eredis_instance\x18\x1e \x01(\x0b\x32\x34.google.cloud.networkmanagement.v1.RedisInstanceInfoH\x00\x12L\n\rredis_cluster\x18\x1f \x01(\x0b\x32\x33.google.cloud.networkmanagement.v1.RedisClusterInfoH\x00\x12N\n\x0e\x63loud_function\x18\x14 \x01(\x0b\x32\x34.google.cloud.networkmanagement.v1.CloudFunctionInfoH\x00\x12U\n\x12\x61pp_engine_version\x18\x16 \x01(\x0b\x32\x37.google.cloud.networkmanagement.v1.AppEngineVersionInfoH\x00\x12U\n\x12\x63loud_run_revision\x18\x17 \x01(\x0b\x32\x37.google.cloud.networkmanagement.v1.CloudRunRevisionInfoH\x00\x12\x39\n\x03nat\x18\x19 \x01(\x0b\x32*.google.cloud.networkmanagement.v1.NatInfoH\x00\x12R\n\x10proxy_connection\x18\x1a \x01(\x0b\x32\x36.google.cloud.networkmanagement.v1.ProxyConnectionInfoH\x00\x12`\n\x1aload_balancer_backend_info\x18\x1b \x01(\x0b\x32:.google.cloud.networkmanagement.v1.LoadBalancerBackendInfoH\x00\x12N\n\x0estorage_bucket\x18\x1c \x01(\x0b\x32\x34.google.cloud.networkmanagement.v1.StorageBucketInfoH\x00\x12N\n\x0eserverless_neg\x18\x1d \x01(\x0b\x32\x34.google.cloud.networkmanagement.v1.ServerlessNegInfoH\x00\x12]\n\x16ngfw_packet_inspection\x18* \x01(\x0b\x32;.google.cloud.networkmanagement.v1.NgfwPacketInspectionInfoH\x00\"\xb0\n\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x17\n\x13START_FROM_INSTANCE\x10\x01\x12\x17\n\x13START_FROM_INTERNET\x10\x02\x12\x1d\n\x19START_FROM_GOOGLE_SERVICE\x10\x1b\x12\x1e\n\x1aSTART_FROM_PRIVATE_NETWORK\x10\x03\x12\x19\n\x15START_FROM_GKE_MASTER\x10\x15\x12!\n\x1dSTART_FROM_CLOUD_SQL_INSTANCE\x10\x16\x12\x16\n\x12START_FROM_GKE_POD\x10\'\x12\x1d\n\x19START_FROM_REDIS_INSTANCE\x10 \x12\x1c\n\x18START_FROM_REDIS_CLUSTER\x10!\x12\x1d\n\x19START_FROM_CLOUD_FUNCTION\x10\x17\x12!\n\x1dSTART_FROM_APP_ENGINE_VERSION\x10\x19\x12!\n\x1dSTART_FROM_CLOUD_RUN_REVISION\x10\x1a\x12\x1d\n\x19START_FROM_STORAGE_BUCKET\x10\x1d\x12$\n START_FROM_PSC_PUBLISHED_SERVICE\x10\x1e\x12\x1d\n\x19START_FROM_SERVERLESS_NEG\x10\x1f\x12\x1f\n\x1b\x41PPLY_INGRESS_FIREWALL_RULE\x10\x04\x12\x1e\n\x1a\x41PPLY_EGRESS_FIREWALL_RULE\x10\x05\x12\x0f\n\x0b\x41PPLY_ROUTE\x10\x06\x12\x19\n\x15\x41PPLY_FORWARDING_RULE\x10\x07\x12!\n\x1d\x41NALYZE_LOAD_BALANCER_BACKEND\x10\x1c\x12\x15\n\x11SPOOFING_APPROVED\x10\x08\x12\x16\n\x12\x41RRIVE_AT_INSTANCE\x10\t\x12(\n ARRIVE_AT_INTERNAL_LOAD_BALANCER\x10\n\x1a\x02\x08\x01\x12(\n ARRIVE_AT_EXTERNAL_LOAD_BALANCER\x10\x0b\x1a\x02\x08\x01\x12\x1b\n\x17\x41RRIVE_AT_HYBRID_SUBNET\x10&\x12\x19\n\x15\x41RRIVE_AT_VPN_GATEWAY\x10\x0c\x12\x18\n\x14\x41RRIVE_AT_VPN_TUNNEL\x10\r\x12%\n!ARRIVE_AT_INTERCONNECT_ATTACHMENT\x10%\x12\x1b\n\x17\x41RRIVE_AT_VPC_CONNECTOR\x10\x18\x12\x15\n\x11\x41RRIVE_AT_GKE_POD\x10,\x12 \n\x1c\x44IRECT_VPC_EGRESS_CONNECTION\x10#\x12\"\n\x1eSERVERLESS_EXTERNAL_CONNECTION\x10$\x12\x1a\n\x16NGFW_PACKET_INSPECTION\x10/\x12\x07\n\x03NAT\x10\x0e\x12 \n\x1cSKIP_GKE_POD_IP_MASQUERADING\x10(\x12#\n\x1fSKIP_GKE_INGRESS_NETWORK_POLICY\x10)\x12\"\n\x1eSKIP_GKE_EGRESS_NETWORK_POLICY\x10*\x12$\n APPLY_INGRESS_GKE_NETWORK_POLICY\x10-\x12#\n\x1f\x41PPLY_EGRESS_GKE_NETWORK_POLICY\x10.\x12\x14\n\x10PROXY_CONNECTION\x10\x0f\x12\x0b\n\x07\x44\x45LIVER\x10\x10\x12\x08\n\x04\x44ROP\x10\x11\x12\x0b\n\x07\x46ORWARD\x10\x12\x12\t\n\x05\x41\x42ORT\x10\x13\x12\x1d\n\x19VIEWER_PERMISSION_MISSING\x10\x14\x42\x0b\n\tstep_info\"\xf7\x02\n\x0cInstanceInfo\x12\x14\n\x0c\x64isplay_name\x18\x01 \x01(\t\x12\x0b\n\x03uri\x18\x02 \x01(\t\x12\x11\n\tinterface\x18\x03 \x01(\t\x12\x13\n\x0bnetwork_uri\x18\x04 \x01(\t\x12\x13\n\x0binternal_ip\x18\x05 \x01(\t\x12\x13\n\x0b\x65xternal_ip\x18\x06 \x01(\t\x12\x14\n\x0cnetwork_tags\x18\x07 \x03(\t\x12\x1b\n\x0fservice_account\x18\x08 \x01(\tB\x02\x18\x01\x12\"\n\x1apsc_network_attachment_uri\x18\t \x01(\t\x12\x13\n\x07running\x18\n \x01(\x08\x42\x02\x18\x01\x12\x46\n\x06status\x18\x0b \x01(\x0e\x32\x36.google.cloud.networkmanagement.v1.InstanceInfo.Status\">\n\x06Status\x12\x16\n\x12STATUS_UNSPECIFIED\x10\x00\x12\x0b\n\x07RUNNING\x10\x01\x12\x0f\n\x0bNOT_RUNNING\x10\x02\"v\n\x0bNetworkInfo\x12\x14\n\x0c\x64isplay_name\x18\x01 \x01(\t\x12\x0b\n\x03uri\x18\x02 \x01(\t\x12\x1a\n\x12matched_subnet_uri\x18\x05 \x01(\t\x12\x18\n\x10matched_ip_range\x18\x04 \x01(\t\x12\x0e\n\x06region\x18\x06 \x01(\t\"\xaf\x07\n\x0c\x46irewallInfo\x12\x14\n\x0c\x64isplay_name\x18\x01 \x01(\t\x12\x0b\n\x03uri\x18\x02 \x01(\t\x12\x11\n\tdirection\x18\x03 \x01(\t\x12\x0e\n\x06\x61\x63tion\x18\x04 \x01(\t\x12\x10\n\x08priority\x18\x05 \x01(\x05\x12\x13\n\x0bnetwork_uri\x18\x06 \x01(\t\x12\x13\n\x0btarget_tags\x18\x07 \x03(\t\x12\x1f\n\x17target_service_accounts\x18\x08 \x03(\t\x12\x0e\n\x06policy\x18\t \x01(\t\x12\x12\n\npolicy_uri\x18\x0b \x01(\t\x12\\\n\x12\x66irewall_rule_type\x18\n \x01(\x0e\x32@.google.cloud.networkmanagement.v1.FirewallInfo.FirewallRuleType\x12\x17\n\x0fpolicy_priority\x18\x0c \x01(\x05\x12O\n\x0btarget_type\x18\r \x01(\x0e\x32:.google.cloud.networkmanagement.v1.FirewallInfo.TargetType\"\xbc\x03\n\x10\x46irewallRuleType\x12\"\n\x1e\x46IREWALL_RULE_TYPE_UNSPECIFIED\x10\x00\x12%\n!HIERARCHICAL_FIREWALL_POLICY_RULE\x10\x01\x12\x15\n\x11VPC_FIREWALL_RULE\x10\x02\x12\x1d\n\x19IMPLIED_VPC_FIREWALL_RULE\x10\x03\x12/\n+SERVERLESS_VPC_ACCESS_MANAGED_FIREWALL_RULE\x10\x04\x12 \n\x1cNETWORK_FIREWALL_POLICY_RULE\x10\x05\x12)\n%NETWORK_REGIONAL_FIREWALL_POLICY_RULE\x10\x06\x12\'\n#SYSTEM_NETWORK_FIREWALL_POLICY_RULE\x10\x07\x12\x30\n,SYSTEM_REGIONAL_NETWORK_FIREWALL_POLICY_RULE\x10\x08\x12$\n UNSUPPORTED_FIREWALL_POLICY_RULE\x10\x64\x12\x12\n\x0eTRACKING_STATE\x10\x65\x12\x14\n\x10\x41NALYSIS_SKIPPED\x10\x66\"Q\n\nTargetType\x12\x1b\n\x17TARGET_TYPE_UNSPECIFIED\x10\x00\x12\r\n\tINSTANCES\x10\x01\x12\x17\n\x13INTERNAL_MANAGED_LB\x10\x02\"\xec\x0b\n\tRouteInfo\x12J\n\nroute_type\x18\x08 \x01(\x0e\x32\x36.google.cloud.networkmanagement.v1.RouteInfo.RouteType\x12O\n\rnext_hop_type\x18\t \x01(\x0e\x32\x38.google.cloud.networkmanagement.v1.RouteInfo.NextHopType\x12P\n\x0broute_scope\x18\x0e \x01(\x0e\x32\x37.google.cloud.networkmanagement.v1.RouteInfo.RouteScopeB\x02\x18\x01\x12\x14\n\x0c\x64isplay_name\x18\x01 \x01(\t\x12\x0b\n\x03uri\x18\x02 \x01(\t\x12\x0e\n\x06region\x18\x13 \x01(\t\x12\x15\n\rdest_ip_range\x18\x03 \x01(\t\x12\x14\n\x08next_hop\x18\x04 \x01(\tB\x02\x18\x01\x12\x13\n\x0bnetwork_uri\x18\x05 \x01(\t\x12\x10\n\x08priority\x18\x06 \x01(\x05\x12\x15\n\rinstance_tags\x18\x07 \x03(\t\x12\x14\n\x0csrc_ip_range\x18\n \x01(\t\x12\x18\n\x10\x64\x65st_port_ranges\x18\x0b \x03(\t\x12\x17\n\x0fsrc_port_ranges\x18\x0c \x03(\t\x12\x11\n\tprotocols\x18\r \x03(\t\x12\x18\n\x0bncc_hub_uri\x18\x0f \x01(\tH\x00\x88\x01\x01\x12\x1a\n\rncc_spoke_uri\x18\x10 \x01(\tH\x01\x88\x01\x01\x12/\n\"advertised_route_source_router_uri\x18\x11 \x01(\tH\x02\x88\x01\x01\x12.\n\x1d\x61\x64vertised_route_next_hop_uri\x18\x12 \x01(\tB\x02\x18\x01H\x03\x88\x01\x01\x12\x14\n\x0cnext_hop_uri\x18\x14 \x01(\t\x12\x1c\n\x14next_hop_network_uri\x18\x15 \x01(\t\x12\x1d\n\x15originating_route_uri\x18\x16 \x01(\t\x12&\n\x1eoriginating_route_display_name\x18\x17 \x01(\t\x12\x19\n\x11ncc_hub_route_uri\x18\x18 \x01(\t\"\xab\x01\n\tRouteType\x12\x1a\n\x16ROUTE_TYPE_UNSPECIFIED\x10\x00\x12\n\n\x06SUBNET\x10\x01\x12\n\n\x06STATIC\x10\x02\x12\x0b\n\x07\x44YNAMIC\x10\x03\x12\x12\n\x0ePEERING_SUBNET\x10\x04\x12\x12\n\x0ePEERING_STATIC\x10\x05\x12\x13\n\x0fPEERING_DYNAMIC\x10\x06\x12\x10\n\x0cPOLICY_BASED\x10\x07\x12\x0e\n\nADVERTISED\x10\x65\"\xea\x02\n\x0bNextHopType\x12\x1d\n\x19NEXT_HOP_TYPE_UNSPECIFIED\x10\x00\x12\x0f\n\x0bNEXT_HOP_IP\x10\x01\x12\x15\n\x11NEXT_HOP_INSTANCE\x10\x02\x12\x14\n\x10NEXT_HOP_NETWORK\x10\x03\x12\x14\n\x10NEXT_HOP_PEERING\x10\x04\x12\x19\n\x15NEXT_HOP_INTERCONNECT\x10\x05\x12\x17\n\x13NEXT_HOP_VPN_TUNNEL\x10\x06\x12\x18\n\x14NEXT_HOP_VPN_GATEWAY\x10\x07\x12\x1d\n\x19NEXT_HOP_INTERNET_GATEWAY\x10\x08\x12\x16\n\x12NEXT_HOP_BLACKHOLE\x10\t\x12\x10\n\x0cNEXT_HOP_ILB\x10\n\x12\x1d\n\x19NEXT_HOP_ROUTER_APPLIANCE\x10\x0b\x12\x14\n\x10NEXT_HOP_NCC_HUB\x10\x0c\x12\x1c\n\x18SECURE_WEB_PROXY_GATEWAY\x10\r\"C\n\nRouteScope\x12\x1b\n\x17ROUTE_SCOPE_UNSPECIFIED\x10\x00\x12\x0b\n\x07NETWORK\x10\x01\x12\x0b\n\x07NCC_HUB\x10\x02\x42\x0e\n\x0c_ncc_hub_uriB\x10\n\x0e_ncc_spoke_uriB%\n#_advertised_route_source_router_uriB \n\x1e_advertised_route_next_hop_uri\"\xda\x02\n\x11GoogleServiceInfo\x12\x11\n\tsource_ip\x18\x01 \x01(\t\x12\x63\n\x13google_service_type\x18\x02 \x01(\x0e\x32\x46.google.cloud.networkmanagement.v1.GoogleServiceInfo.GoogleServiceType\"\xcc\x01\n\x11GoogleServiceType\x12#\n\x1fGOOGLE_SERVICE_TYPE_UNSPECIFIED\x10\x00\x12\x07\n\x03IAP\x10\x01\x12$\n GFE_PROXY_OR_HEALTH_CHECK_PROBER\x10\x02\x12\r\n\tCLOUD_DNS\x10\x03\x12\x0e\n\nGOOGLE_API\x10\x04\x12\x12\n\x0eGOOGLE_API_PSC\x10\x05\x12\x15\n\x11GOOGLE_API_VPC_SC\x10\x06\x12\x19\n\x15SERVERLESS_VPC_ACCESS\x10\x07\"\x8e\x02\n\x12\x46orwardingRuleInfo\x12\x14\n\x0c\x64isplay_name\x18\x01 \x01(\t\x12\x0b\n\x03uri\x18\x02 \x01(\t\x12\x18\n\x10matched_protocol\x18\x03 \x01(\t\x12\x1a\n\x12matched_port_range\x18\x06 \x01(\t\x12\x0b\n\x03vip\x18\x04 \x01(\t\x12\x0e\n\x06target\x18\x05 \x01(\t\x12\x13\n\x0bnetwork_uri\x18\x07 \x01(\t\x12\x0e\n\x06region\x18\x08 \x01(\t\x12\x1a\n\x12load_balancer_name\x18\t \x01(\t\x12\"\n\x1apsc_service_attachment_uri\x18\n \x01(\t\x12\x1d\n\x15psc_google_api_target\x18\x0b \x01(\t\"\xc2\x04\n\x10LoadBalancerInfo\x12`\n\x12load_balancer_type\x18\x01 \x01(\x0e\x32\x44.google.cloud.networkmanagement.v1.LoadBalancerInfo.LoadBalancerType\x12\x1c\n\x10health_check_uri\x18\x02 \x01(\tB\x02\x18\x01\x12H\n\x08\x62\x61\x63kends\x18\x03 \x03(\x0b\x32\x36.google.cloud.networkmanagement.v1.LoadBalancerBackend\x12U\n\x0c\x62\x61\x63kend_type\x18\x04 \x01(\x0e\x32?.google.cloud.networkmanagement.v1.LoadBalancerInfo.BackendType\x12\x13\n\x0b\x62\x61\x63kend_uri\x18\x05 \x01(\t\"\x8f\x01\n\x10LoadBalancerType\x12\"\n\x1eLOAD_BALANCER_TYPE_UNSPECIFIED\x10\x00\x12\x14\n\x10INTERNAL_TCP_UDP\x10\x01\x12\x13\n\x0fNETWORK_TCP_UDP\x10\x02\x12\x0e\n\nHTTP_PROXY\x10\x03\x12\r\n\tTCP_PROXY\x10\x04\x12\r\n\tSSL_PROXY\x10\x05\"f\n\x0b\x42\x61\x63kendType\x12\x1c\n\x18\x42\x41\x43KEND_TYPE_UNSPECIFIED\x10\x00\x12\x13\n\x0f\x42\x41\x43KEND_SERVICE\x10\x01\x12\x0f\n\x0bTARGET_POOL\x10\x02\x12\x13\n\x0fTARGET_INSTANCE\x10\x03\"\xf6\x02\n\x13LoadBalancerBackend\x12\x14\n\x0c\x64isplay_name\x18\x01 \x01(\t\x12\x0b\n\x03uri\x18\x02 \x01(\t\x12t\n\x1bhealth_check_firewall_state\x18\x03 \x01(\x0e\x32O.google.cloud.networkmanagement.v1.LoadBalancerBackend.HealthCheckFirewallState\x12,\n$health_check_allowing_firewall_rules\x18\x04 \x03(\t\x12,\n$health_check_blocking_firewall_rules\x18\x05 \x03(\t\"j\n\x18HealthCheckFirewallState\x12+\n\'HEALTH_CHECK_FIREWALL_STATE_UNSPECIFIED\x10\x00\x12\x0e\n\nCONFIGURED\x10\x01\x12\x11\n\rMISCONFIGURED\x10\x02\"E\n\x10HybridSubnetInfo\x12\x14\n\x0c\x64isplay_name\x18\x01 \x01(\t\x12\x0b\n\x03uri\x18\x02 \x01(\t\x12\x0e\n\x06region\x18\x03 \x01(\t\"\x84\x01\n\x0eVpnGatewayInfo\x12\x14\n\x0c\x64isplay_name\x18\x01 \x01(\t\x12\x0b\n\x03uri\x18\x02 \x01(\t\x12\x13\n\x0bnetwork_uri\x18\x03 \x01(\t\x12\x12\n\nip_address\x18\x04 \x01(\t\x12\x16\n\x0evpn_tunnel_uri\x18\x05 \x01(\t\x12\x0e\n\x06region\x18\x06 \x01(\t\"\xee\x02\n\rVpnTunnelInfo\x12\x14\n\x0c\x64isplay_name\x18\x01 \x01(\t\x12\x0b\n\x03uri\x18\x02 \x01(\t\x12\x16\n\x0esource_gateway\x18\x03 \x01(\t\x12\x16\n\x0eremote_gateway\x18\x04 \x01(\t\x12\x19\n\x11remote_gateway_ip\x18\x05 \x01(\t\x12\x19\n\x11source_gateway_ip\x18\x06 \x01(\t\x12\x13\n\x0bnetwork_uri\x18\x07 \x01(\t\x12\x0e\n\x06region\x18\x08 \x01(\t\x12R\n\x0crouting_type\x18\t \x01(\x0e\x32<.google.cloud.networkmanagement.v1.VpnTunnelInfo.RoutingType\"[\n\x0bRoutingType\x12\x1c\n\x18ROUTING_TYPE_UNSPECIFIED\x10\x00\x12\x0f\n\x0bROUTE_BASED\x10\x01\x12\x10\n\x0cPOLICY_BASED\x10\x02\x12\x0b\n\x07\x44YNAMIC\x10\x03\"\xeb\x02\n\x1aInterconnectAttachmentInfo\x12\x14\n\x0c\x64isplay_name\x18\x01 \x01(\t\x12\x0b\n\x03uri\x18\x02 \x01(\t\x12\x18\n\x10interconnect_uri\x18\x03 \x01(\t\x12\x0e\n\x06region\x18\x04 \x01(\t\x12\x18\n\x10\x63loud_router_uri\x18\x05 \x01(\t\x12P\n\x04type\x18\x06 \x01(\x0e\x32\x42.google.cloud.networkmanagement.v1.InterconnectAttachmentInfo.Type\x12\x32\n l2_attachment_matched_ip_address\x18\x07 \x01(\tB\x08\xe2\x8c\xcf\xd7\x08\x02\x08\x04\"`\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\r\n\tDEDICATED\x10\x01\x12\x0b\n\x07PARTNER\x10\x02\x12\x14\n\x10PARTNER_PROVIDER\x10\x03\x12\x10\n\x0cL2_DEDICATED\x10\x04\"\xd1\x01\n\x0c\x45ndpointInfo\x12\x11\n\tsource_ip\x18\x01 \x01(\t\x12\x16\n\x0e\x64\x65stination_ip\x18\x02 \x01(\t\x12\x10\n\x08protocol\x18\x03 \x01(\t\x12\x13\n\x0bsource_port\x18\x04 \x01(\x05\x12\x18\n\x10\x64\x65stination_port\x18\x05 \x01(\x05\x12\x1a\n\x12source_network_uri\x18\x06 \x01(\t\x12\x1f\n\x17\x64\x65stination_network_uri\x18\x07 \x01(\t\x12\x18\n\x10source_agent_uri\x18\x08 \x01(\t\"\xd4\x06\n\x0b\x44\x65liverInfo\x12\x45\n\x06target\x18\x01 \x01(\x0e\x32\x35.google.cloud.networkmanagement.v1.DeliverInfo.Target\x12\x14\n\x0cresource_uri\x18\x02 \x01(\t\x12\x1c\n\nip_address\x18\x03 \x01(\tB\x08\xe2\x8c\xcf\xd7\x08\x02\x08\x04\x12\x16\n\x0estorage_bucket\x18\x04 \x01(\t\x12\x1d\n\x15psc_google_api_target\x18\x05 \x01(\t\x12]\n\x13google_service_type\x18\x06 \x01(\x0e\x32@.google.cloud.networkmanagement.v1.DeliverInfo.GoogleServiceType\"\x84\x03\n\x06Target\x12\x16\n\x12TARGET_UNSPECIFIED\x10\x00\x12\x0c\n\x08INSTANCE\x10\x01\x12\x0c\n\x08INTERNET\x10\x02\x12\x0e\n\nGOOGLE_API\x10\x03\x12\x0e\n\nGKE_MASTER\x10\x04\x12\x16\n\x12\x43LOUD_SQL_INSTANCE\x10\x05\x12\x19\n\x15PSC_PUBLISHED_SERVICE\x10\x06\x12\x12\n\x0ePSC_GOOGLE_API\x10\x07\x12\x0e\n\nPSC_VPC_SC\x10\x08\x12\x12\n\x0eSERVERLESS_NEG\x10\t\x12\x12\n\x0eSTORAGE_BUCKET\x10\n\x12\x13\n\x0fPRIVATE_NETWORK\x10\x0b\x12\x12\n\x0e\x43LOUD_FUNCTION\x10\x0c\x12\x16\n\x12\x41PP_ENGINE_VERSION\x10\r\x12\x16\n\x12\x43LOUD_RUN_REVISION\x10\x0e\x12\x1a\n\x16GOOGLE_MANAGED_SERVICE\x10\x0f\x12\x12\n\x0eREDIS_INSTANCE\x10\x10\x12\x11\n\rREDIS_CLUSTER\x10\x11\x12\x0b\n\x07GKE_POD\x10\x13\"\xac\x01\n\x11GoogleServiceType\x12#\n\x1fGOOGLE_SERVICE_TYPE_UNSPECIFIED\x10\x00\x12\x07\n\x03IAP\x10\x01\x12$\n GFE_PROXY_OR_HEALTH_CHECK_PROBER\x10\x02\x12\r\n\tCLOUD_DNS\x10\x03\x12\x19\n\x15PRIVATE_GOOGLE_ACCESS\x10\x04\x12\x19\n\x15SERVERLESS_VPC_ACCESS\x10\x05\"\x89\x03\n\x0b\x46orwardInfo\x12\x45\n\x06target\x18\x01 \x01(\x0e\x32\x35.google.cloud.networkmanagement.v1.ForwardInfo.Target\x12\x14\n\x0cresource_uri\x18\x02 \x01(\t\x12\x1c\n\nip_address\x18\x03 \x01(\tB\x08\xe2\x8c\xcf\xd7\x08\x02\x08\x04\"\xfe\x01\n\x06Target\x12\x16\n\x12TARGET_UNSPECIFIED\x10\x00\x12\x0f\n\x0bPEERING_VPC\x10\x01\x12\x0f\n\x0bVPN_GATEWAY\x10\x02\x12\x10\n\x0cINTERCONNECT\x10\x03\x12\x12\n\nGKE_MASTER\x10\x04\x1a\x02\x08\x01\x12\"\n\x1eIMPORTED_CUSTOM_ROUTE_NEXT_HOP\x10\x05\x12\x1a\n\x12\x43LOUD_SQL_INSTANCE\x10\x06\x1a\x02\x08\x01\x12\x13\n\x0f\x41NOTHER_PROJECT\x10\x07\x12\x0b\n\x07NCC_HUB\x10\x08\x12\x14\n\x10ROUTER_APPLIANCE\x10\t\x12\x1c\n\x18SECURE_WEB_PROXY_GATEWAY\x10\n\"\x85\r\n\tAbortInfo\x12\x41\n\x05\x63\x61use\x18\x01 \x01(\x0e\x32\x32.google.cloud.networkmanagement.v1.AbortInfo.Cause\x12\x14\n\x0cresource_uri\x18\x02 \x01(\t\x12\x1c\n\nip_address\x18\x04 \x01(\tB\x08\xe2\x8c\xcf\xd7\x08\x02\x08\x04\x12#\n\x1bprojects_missing_permission\x18\x03 \x03(\t\"\xdb\x0b\n\x05\x43\x61use\x12\x15\n\x11\x43\x41USE_UNSPECIFIED\x10\x00\x12\x17\n\x0fUNKNOWN_NETWORK\x10\x01\x1a\x02\x08\x01\x12\x17\n\x0fUNKNOWN_PROJECT\x10\x03\x1a\x02\x08\x01\x12\x16\n\x0eNO_EXTERNAL_IP\x10\x07\x1a\x02\x08\x01\x12\x1e\n\x16UNINTENDED_DESTINATION\x10\x08\x1a\x02\x08\x01\x12!\n\x19SOURCE_ENDPOINT_NOT_FOUND\x10\x0b\x1a\x02\x08\x01\x12!\n\x19MISMATCHED_SOURCE_NETWORK\x10\x0c\x1a\x02\x08\x01\x12&\n\x1e\x44\x45STINATION_ENDPOINT_NOT_FOUND\x10\r\x1a\x02\x08\x01\x12&\n\x1eMISMATCHED_DESTINATION_NETWORK\x10\x0e\x1a\x02\x08\x01\x12\x0e\n\nUNKNOWN_IP\x10\x02\x12%\n!GOOGLE_MANAGED_SERVICE_UNKNOWN_IP\x10 \x12+\n\'SOURCE_IP_ADDRESS_NOT_IN_SOURCE_NETWORK\x10\x17\x12\x15\n\x11PERMISSION_DENIED\x10\x04\x12*\n&PERMISSION_DENIED_NO_CLOUD_NAT_CONFIGS\x10\x1c\x12-\n)PERMISSION_DENIED_NO_NEG_ENDPOINT_CONFIGS\x10\x1d\x12-\n)PERMISSION_DENIED_NO_CLOUD_ROUTER_CONFIGS\x10$\x12\x16\n\x12NO_SOURCE_LOCATION\x10\x05\x12\"\n\x1eNO_SOURCE_GCP_NETWORK_LOCATION\x10*\x12&\n\"NO_SOURCE_NON_GCP_NETWORK_LOCATION\x10+\x12\x1f\n\x1bNO_SOURCE_INTERNET_LOCATION\x10,\x12\x14\n\x10INVALID_ARGUMENT\x10\x06\x12\x12\n\x0eTRACE_TOO_LONG\x10\t\x12\x12\n\x0eINTERNAL_ERROR\x10\n\x12\x0f\n\x0bUNSUPPORTED\x10\x0f\x12\x19\n\x15MISMATCHED_IP_VERSION\x10\x10\x12&\n\"GKE_KONNECTIVITY_PROXY_UNSUPPORTED\x10\x11\x12\x1d\n\x19RESOURCE_CONFIG_NOT_FOUND\x10\x12\x12 \n\x1cVM_INSTANCE_CONFIG_NOT_FOUND\x10\x18\x12\x1c\n\x18NETWORK_CONFIG_NOT_FOUND\x10\x19\x12\x1d\n\x19\x46IREWALL_CONFIG_NOT_FOUND\x10\x1a\x12\x1a\n\x16ROUTE_CONFIG_NOT_FOUND\x10\x1b\x12\x31\n-GOOGLE_MANAGED_SERVICE_AMBIGUOUS_PSC_ENDPOINT\x10\x13\x12-\n)GOOGLE_MANAGED_SERVICE_AMBIGUOUS_ENDPOINT\x10\'\x12$\n SOURCE_PSC_CLOUD_SQL_UNSUPPORTED\x10\x14\x12)\n%SOURCE_EXTERNAL_CLOUD_SQL_UNSUPPORTED\x10-\x12$\n SOURCE_REDIS_CLUSTER_UNSUPPORTED\x10\"\x12%\n!SOURCE_REDIS_INSTANCE_UNSUPPORTED\x10#\x12&\n\"SOURCE_FORWARDING_RULE_UNSUPPORTED\x10\x15\x12\x1b\n\x17NON_ROUTABLE_IP_ADDRESS\x10\x16\x12+\n\'UNKNOWN_ISSUE_IN_GOOGLE_MANAGED_PROJECT\x10\x1e\x12-\n)UNSUPPORTED_GOOGLE_MANAGED_PROJECT_CONFIG\x10\x1f\x12\x1b\n\x17NO_SERVERLESS_IP_RANGES\x10%\x12 \n\x1cIP_VERSION_PROTOCOL_MISMATCH\x10(\x12%\n!GKE_POD_UNKNOWN_ENDPOINT_LOCATION\x10)\"\xb1\"\n\x08\x44ropInfo\x12@\n\x05\x63\x61use\x18\x01 \x01(\x0e\x32\x31.google.cloud.networkmanagement.v1.DropInfo.Cause\x12\x14\n\x0cresource_uri\x18\x02 \x01(\t\x12\x11\n\tsource_ip\x18\x03 \x01(\t\x12\x16\n\x0e\x64\x65stination_ip\x18\x04 \x01(\t\x12\x0e\n\x06region\x18\x05 \x01(\t\x12\x1f\n\x17source_geolocation_code\x18\x06 \x01(\t\x12$\n\x1c\x64\x65stination_geolocation_code\x18\x07 \x01(\t\"\xca \n\x05\x43\x61use\x12\x15\n\x11\x43\x41USE_UNSPECIFIED\x10\x00\x12\x1c\n\x18UNKNOWN_EXTERNAL_ADDRESS\x10\x01\x12\x19\n\x15\x46OREIGN_IP_DISALLOWED\x10\x02\x12\x11\n\rFIREWALL_RULE\x10\x03\x12\x0c\n\x08NO_ROUTE\x10\x04\x12\x13\n\x0fROUTE_BLACKHOLE\x10\x05\x12\x17\n\x13ROUTE_WRONG_NETWORK\x10\x06\x12*\n&ROUTE_NEXT_HOP_IP_ADDRESS_NOT_RESOLVED\x10*\x12%\n!ROUTE_NEXT_HOP_RESOURCE_NOT_FOUND\x10+\x12)\n%ROUTE_NEXT_HOP_INSTANCE_WRONG_NETWORK\x10\x31\x12*\n&ROUTE_NEXT_HOP_INSTANCE_NON_PRIMARY_IP\x10\x32\x12.\n*ROUTE_NEXT_HOP_FORWARDING_RULE_IP_MISMATCH\x10\x33\x12-\n)ROUTE_NEXT_HOP_VPN_TUNNEL_NOT_ESTABLISHED\x10\x34\x12/\n+ROUTE_NEXT_HOP_FORWARDING_RULE_TYPE_INVALID\x10\x35\x12\x32\n.NO_ROUTE_FROM_INTERNET_TO_PRIVATE_IPV6_ADDRESS\x10,\x12\x32\n.NO_ROUTE_FROM_INTERNET_TO_PRIVATE_IPV4_ADDRESS\x10m\x12>\n:NO_ROUTE_FROM_EXTERNAL_IPV6_SOURCE_TO_PRIVATE_IPV6_ADDRESS\x10\x62\x12&\n\"VPN_TUNNEL_LOCAL_SELECTOR_MISMATCH\x10-\x12\'\n#VPN_TUNNEL_REMOTE_SELECTOR_MISMATCH\x10.\x12\x1f\n\x1bPRIVATE_TRAFFIC_TO_INTERNET\x10\x07\x12$\n PRIVATE_GOOGLE_ACCESS_DISALLOWED\x10\x08\x12\x34\n0PRIVATE_GOOGLE_ACCESS_VIA_VPN_TUNNEL_UNSUPPORTED\x10/\x12\x17\n\x13NO_EXTERNAL_ADDRESS\x10\t\x12\x1c\n\x18UNKNOWN_INTERNAL_ADDRESS\x10\n\x12\x1c\n\x18\x46ORWARDING_RULE_MISMATCH\x10\x0b\x12 \n\x1c\x46ORWARDING_RULE_NO_INSTANCES\x10\x0c\x12\x38\n4FIREWALL_BLOCKING_LOAD_BALANCER_BACKEND_HEALTH_CHECK\x10\r\x12:\n6INGRESS_FIREWALL_TAGS_UNSUPPORTED_BY_DIRECT_VPC_EGRESS\x10U\x12\x18\n\x14INSTANCE_NOT_RUNNING\x10\x0e\x12\x1b\n\x17GKE_CLUSTER_NOT_RUNNING\x10\x1b\x12\x17\n\x13GKE_POD_NOT_RUNNING\x10g\x12\"\n\x1e\x43LOUD_SQL_INSTANCE_NOT_RUNNING\x10\x1c\x12\x1e\n\x1aREDIS_INSTANCE_NOT_RUNNING\x10\x44\x12\x1d\n\x19REDIS_CLUSTER_NOT_RUNNING\x10\x45\x12\x18\n\x14TRAFFIC_TYPE_BLOCKED\x10\x0f\x12\"\n\x1eGKE_MASTER_UNAUTHORIZED_ACCESS\x10\x10\x12*\n&CLOUD_SQL_INSTANCE_UNAUTHORIZED_ACCESS\x10\x11\x12\x1e\n\x1a\x44ROPPED_INSIDE_GKE_SERVICE\x10\x12\x12$\n DROPPED_INSIDE_CLOUD_SQL_SERVICE\x10\x13\x12%\n!GOOGLE_MANAGED_SERVICE_NO_PEERING\x10\x14\x12*\n&GOOGLE_MANAGED_SERVICE_NO_PSC_ENDPOINT\x10&\x12\x1c\n\x18GKE_PSC_ENDPOINT_MISSING\x10$\x12$\n CLOUD_SQL_INSTANCE_NO_IP_ADDRESS\x10\x15\x12%\n!GKE_CONTROL_PLANE_REGION_MISMATCH\x10\x1e\x12\x33\n/PUBLIC_GKE_CONTROL_PLANE_TO_PRIVATE_DESTINATION\x10\x1f\x12\x1e\n\x1aGKE_CONTROL_PLANE_NO_ROUTE\x10 \x12:\n6CLOUD_SQL_INSTANCE_NOT_CONFIGURED_FOR_EXTERNAL_TRAFFIC\x10!\x12\x34\n0PUBLIC_CLOUD_SQL_INSTANCE_TO_PRIVATE_DESTINATION\x10\"\x12\x1f\n\x1b\x43LOUD_SQL_INSTANCE_NO_ROUTE\x10#\x12 \n\x1c\x43LOUD_SQL_CONNECTOR_REQUIRED\x10?\x12\x1d\n\x19\x43LOUD_FUNCTION_NOT_ACTIVE\x10\x16\x12\x19\n\x15VPC_CONNECTOR_NOT_SET\x10\x17\x12\x1d\n\x19VPC_CONNECTOR_NOT_RUNNING\x10\x18\x12,\n(VPC_CONNECTOR_SERVERLESS_TRAFFIC_BLOCKED\x10<\x12.\n*VPC_CONNECTOR_HEALTH_CHECK_TRAFFIC_BLOCKED\x10=\x12#\n\x1f\x46ORWARDING_RULE_REGION_MISMATCH\x10\x19\x12\x1f\n\x1bPSC_CONNECTION_NOT_ACCEPTED\x10\x1a\x12-\n)PSC_ENDPOINT_ACCESSED_FROM_PEERED_NETWORK\x10)\x12.\n*PSC_NEG_PRODUCER_ENDPOINT_NO_GLOBAL_ACCESS\x10\x30\x12\x33\n/PSC_NEG_PRODUCER_FORWARDING_RULE_MULTIPLE_PORTS\x10\x36\x12!\n\x1d\x43LOUD_SQL_PSC_NEG_UNSUPPORTED\x10:\x12-\n)NO_NAT_SUBNETS_FOR_PSC_SERVICE_ATTACHMENT\x10\x39\x12#\n\x1fPSC_TRANSITIVITY_NOT_PROPAGATED\x10@\x12(\n$HYBRID_NEG_NON_DYNAMIC_ROUTE_MATCHED\x10\x37\x12.\n*HYBRID_NEG_NON_LOCAL_DYNAMIC_ROUTE_MATCHED\x10\x38\x12 \n\x1c\x43LOUD_RUN_REVISION_NOT_READY\x10\x1d\x12\'\n#DROPPED_INSIDE_PSC_SERVICE_PRODUCER\x10%\x12%\n!LOAD_BALANCER_HAS_NO_PROXY_SUBNET\x10\'\x12\x1a\n\x16\x43LOUD_NAT_NO_ADDRESSES\x10(\x12\x10\n\x0cROUTING_LOOP\x10;\x12)\n%DROPPED_INSIDE_GOOGLE_MANAGED_SERVICE\x10>\x12)\n%LOAD_BALANCER_BACKEND_INVALID_NETWORK\x10\x41\x12*\n&BACKEND_SERVICE_NAMED_PORT_NOT_DEFINED\x10\x42\x12\'\n#DESTINATION_IS_PRIVATE_NAT_IP_RANGE\x10\x43\x12)\n%DROPPED_INSIDE_REDIS_INSTANCE_SERVICE\x10\x46\x12#\n\x1fREDIS_INSTANCE_UNSUPPORTED_PORT\x10G\x12/\n+REDIS_INSTANCE_CONNECTING_FROM_PUPI_ADDRESS\x10H\x12\x32\n.REDIS_INSTANCE_NO_ROUTE_TO_DESTINATION_NETWORK\x10I\x12!\n\x1dREDIS_INSTANCE_NO_EXTERNAL_IP\x10J\x12\'\n#REDIS_INSTANCE_UNSUPPORTED_PROTOCOL\x10N\x12(\n$DROPPED_INSIDE_REDIS_CLUSTER_SERVICE\x10K\x12\"\n\x1eREDIS_CLUSTER_UNSUPPORTED_PORT\x10L\x12 \n\x1cREDIS_CLUSTER_NO_EXTERNAL_IP\x10M\x12&\n\"REDIS_CLUSTER_UNSUPPORTED_PROTOCOL\x10O\x12*\n&NO_ADVERTISED_ROUTE_TO_GCP_DESTINATION\x10P\x12*\n&NO_TRAFFIC_SELECTOR_TO_GCP_DESTINATION\x10Q\x12\x35\n1NO_KNOWN_ROUTE_FROM_PEERED_NETWORK_TO_DESTINATION\x10R\x12+\n\'PRIVATE_NAT_TO_PSC_ENDPOINT_UNSUPPORTED\x10S\x12\"\n\x1ePSC_PORT_MAPPING_PORT_MISMATCH\x10V\x12\x37\n3PSC_PORT_MAPPING_WITHOUT_PSC_CONNECTION_UNSUPPORTED\x10W\x12\x33\n/UNSUPPORTED_ROUTE_MATCHED_FOR_NAT64_DESTINATION\x10X\x12\x37\n3TRAFFIC_FROM_HYBRID_ENDPOINT_TO_INTERNET_DISALLOWED\x10Y\x12\x1d\n\x19NO_MATCHING_NAT64_GATEWAY\x10Z\x12$\n NO_CONFIGURED_PRIVATE_NAT64_RULE\x10k\x12-\n)LOAD_BALANCER_BACKEND_IP_VERSION_MISMATCH\x10`\x12\x32\n.NO_KNOWN_ROUTE_FROM_NCC_NETWORK_TO_DESTINATION\x10\x61\x12\"\n\x1e\x43LOUD_NAT_PROTOCOL_UNSUPPORTED\x10\x63\x12(\n$L2_INTERCONNECT_UNSUPPORTED_PROTOCOL\x10\x64\x12$\n L2_INTERCONNECT_UNSUPPORTED_PORT\x10\x65\x12+\n\'L2_INTERCONNECT_DESTINATION_IP_MISMATCH\x10\x66\x12.\n*NCC_ROUTE_WITHIN_HYBRID_SUBNET_UNSUPPORTED\x10h\x12!\n\x1dHYBRID_SUBNET_REGION_MISMATCH\x10i\x12\x1a\n\x16HYBRID_SUBNET_NO_ROUTE\x10j\x12\x16\n\x12GKE_NETWORK_POLICY\x10l\x12=\n9NO_VALID_ROUTE_FROM_GOOGLE_MANAGED_NETWORK_TO_DESTINATION\x10n\"\x81\x01\n\rGKEMasterInfo\x12\x13\n\x0b\x63luster_uri\x18\x02 \x01(\t\x12\x1b\n\x13\x63luster_network_uri\x18\x04 \x01(\t\x12\x13\n\x0binternal_ip\x18\x05 \x01(\t\x12\x13\n\x0b\x65xternal_ip\x18\x06 \x01(\t\x12\x14\n\x0c\x64ns_endpoint\x18\x07 \x01(\t\"P\n\nGkePodInfo\x12\x0f\n\x07pod_uri\x18\x01 \x01(\t\x12\x1c\n\nip_address\x18\x02 \x01(\tB\x08\xe2\x8c\xcf\xd7\x08\x02\x08\x04\x12\x13\n\x0bnetwork_uri\x18\x03 \x01(\t\"\xbf\x03\n\x19IpMasqueradingSkippedInfo\x12S\n\x06reason\x18\x01 \x01(\x0e\x32\x43.google.cloud.networkmanagement.v1.IpMasqueradingSkippedInfo.Reason\x12\x1c\n\x14non_masquerade_range\x18\x02 \x01(\t\"\xae\x02\n\x06Reason\x12\x16\n\x12REASON_UNSPECIFIED\x10\x00\x12\x35\n1DESTINATION_IP_IN_CONFIGURED_NON_MASQUERADE_RANGE\x10\x01\x12\x32\n.DESTINATION_IP_IN_DEFAULT_NON_MASQUERADE_RANGE\x10\x02\x12\x1c\n\x18\x44\x45STINATION_ON_SAME_NODE\x10\x03\x12\x19\n\x15\x44\x45\x46\x41ULT_SNAT_DISABLED\x10\x04\x12\x1c\n\x18NO_MASQUERADING_FOR_IPV6\x10\x05\x12#\n\x1fPOD_USES_NODE_NETWORK_NAMESPACE\x10\x06\x12%\n!NO_MASQUERADING_FOR_RETURN_PACKET\x10\x07\"\\\n\x14GkeNetworkPolicyInfo\x12\x14\n\x0c\x64isplay_name\x18\x01 \x01(\t\x12\x0b\n\x03uri\x18\x02 \x01(\t\x12\x11\n\tdirection\x18\x03 \x01(\t\x12\x0e\n\x06\x61\x63tion\x18\x04 \x01(\t\"\xde\x02\n\x1bGkeNetworkPolicySkippedInfo\x12U\n\x06reason\x18\x01 \x01(\x0e\x32\x45.google.cloud.networkmanagement.v1.GkeNetworkPolicySkippedInfo.Reason\"\xe7\x01\n\x06Reason\x12\x16\n\x12REASON_UNSPECIFIED\x10\x00\x12\x1b\n\x17NETWORK_POLICY_DISABLED\x10\x01\x12\x1f\n\x1bINGRESS_SOURCE_ON_SAME_NODE\x10\x02\x12*\n&EGRESS_FROM_NODE_NETWORK_NAMESPACE_POD\x10\x03\x12\x32\n.NETWORK_POLICY_NOT_APPLIED_TO_RESPONSE_TRAFFIC\x10\x04\x12\'\n#NETWORK_POLICY_ANALYSIS_UNSUPPORTED\x10\x64\"\x88\x01\n\x14\x43loudSQLInstanceInfo\x12\x14\n\x0c\x64isplay_name\x18\x01 \x01(\t\x12\x0b\n\x03uri\x18\x02 \x01(\t\x12\x13\n\x0bnetwork_uri\x18\x04 \x01(\t\x12\x13\n\x0binternal_ip\x18\x05 \x01(\t\x12\x13\n\x0b\x65xternal_ip\x18\x06 \x01(\t\x12\x0e\n\x06region\x18\x07 \x01(\t\"\x92\x01\n\x11RedisInstanceInfo\x12\x14\n\x0c\x64isplay_name\x18\x01 \x01(\t\x12\x0b\n\x03uri\x18\x02 \x01(\t\x12\x13\n\x0bnetwork_uri\x18\x03 \x01(\t\x12\x1b\n\x13primary_endpoint_ip\x18\x04 \x01(\t\x12\x18\n\x10read_endpoint_ip\x18\x05 \x01(\t\x12\x0e\n\x06region\x18\x06 \x01(\t\"\xbe\x01\n\x10RedisClusterInfo\x12\x14\n\x0c\x64isplay_name\x18\x01 \x01(\t\x12\x0b\n\x03uri\x18\x02 \x01(\t\x12\x13\n\x0bnetwork_uri\x18\x03 \x01(\t\x12/\n\x1d\x64iscovery_endpoint_ip_address\x18\x04 \x01(\tB\x08\xe2\x8c\xcf\xd7\x08\x02\x08\x04\x12/\n\x1dsecondary_endpoint_ip_address\x18\x05 \x01(\tB\x08\xe2\x8c\xcf\xd7\x08\x02\x08\x04\x12\x10\n\x08location\x18\x06 \x01(\t\"\\\n\x11\x43loudFunctionInfo\x12\x14\n\x0c\x64isplay_name\x18\x01 \x01(\t\x12\x0b\n\x03uri\x18\x02 \x01(\t\x12\x10\n\x08location\x18\x03 \x01(\t\x12\x12\n\nversion_id\x18\x04 \x01(\x03\"`\n\x14\x43loudRunRevisionInfo\x12\x14\n\x0c\x64isplay_name\x18\x01 \x01(\t\x12\x0b\n\x03uri\x18\x02 \x01(\t\x12\x10\n\x08location\x18\x04 \x01(\t\x12\x13\n\x0bservice_uri\x18\x05 \x01(\t\"_\n\x14\x41ppEngineVersionInfo\x12\x14\n\x0c\x64isplay_name\x18\x01 \x01(\t\x12\x0b\n\x03uri\x18\x02 \x01(\t\x12\x0f\n\x07runtime\x18\x03 \x01(\t\x12\x13\n\x0b\x65nvironment\x18\x04 \x01(\t\"G\n\x10VpcConnectorInfo\x12\x14\n\x0c\x64isplay_name\x18\x01 \x01(\t\x12\x0b\n\x03uri\x18\x02 \x01(\t\x12\x10\n\x08location\x18\x03 \x01(\t\"\xa8\x01\n\x1d\x44irectVpcEgressConnectionInfo\x12\x13\n\x0bnetwork_uri\x18\x01 \x01(\t\x12\x16\n\x0esubnetwork_uri\x18\x02 \x01(\t\x12#\n\x11selected_ip_range\x18\x03 \x01(\tB\x08\xe2\x8c\xcf\xd7\x08\x02\x08\x04\x12%\n\x13selected_ip_address\x18\x04 \x01(\tB\x08\xe2\x8c\xcf\xd7\x08\x02\x08\x04\x12\x0e\n\x06region\x18\x05 \x01(\t\"I\n ServerlessExternalConnectionInfo\x12%\n\x13selected_ip_address\x18\x01 \x01(\tB\x08\xe2\x8c\xcf\xd7\x08\x02\x08\x04\"\x91\x06\n\x07NatInfo\x12=\n\x04type\x18\x01 \x01(\x0e\x32/.google.cloud.networkmanagement.v1.NatInfo.Type\x12\x10\n\x08protocol\x18\x02 \x01(\t\x12\x13\n\x0bnetwork_uri\x18\x03 \x01(\t\x12\x15\n\rold_source_ip\x18\x04 \x01(\t\x12\x15\n\rnew_source_ip\x18\x05 \x01(\t\x12\x1a\n\x12old_destination_ip\x18\x06 \x01(\t\x12\x1a\n\x12new_destination_ip\x18\x07 \x01(\t\x12\x17\n\x0fold_source_port\x18\x08 \x01(\x05\x12\x17\n\x0fnew_source_port\x18\t \x01(\x05\x12\x1c\n\x14old_destination_port\x18\n \x01(\x05\x12\x1c\n\x14new_destination_port\x18\x0b \x01(\x05\x12\x12\n\nrouter_uri\x18\x0c \x01(\t\x12\x18\n\x10nat_gateway_name\x18\r \x01(\t\x12^\n\x16\x63loud_nat_gateway_type\x18\x0e \x01(\x0e\x32>.google.cloud.networkmanagement.v1.NatInfo.CloudNatGatewayType\"\x99\x01\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x18\n\x14INTERNAL_TO_EXTERNAL\x10\x01\x12\x18\n\x14\x45XTERNAL_TO_INTERNAL\x10\x02\x12\r\n\tCLOUD_NAT\x10\x03\x12\x1b\n\x17PRIVATE_SERVICE_CONNECT\x10\x04\x12\x1b\n\x17GKE_POD_IP_MASQUERADING\x10\x05\"\xa1\x01\n\x13\x43loudNatGatewayType\x12&\n\"CLOUD_NAT_GATEWAY_TYPE_UNSPECIFIED\x10\x00\x12\x10\n\x0cPUBLIC_NAT44\x10\x01\x12\x10\n\x0cPUBLIC_NAT64\x10\x02\x12\x13\n\x0fPRIVATE_NAT_NCC\x10\x03\x12\x16\n\x12PRIVATE_NAT_HYBRID\x10\x04\x12\x11\n\rPRIVATE_NAT64\x10\x05\"\xa4\x02\n\x13ProxyConnectionInfo\x12\x10\n\x08protocol\x18\x01 \x01(\t\x12\x15\n\rold_source_ip\x18\x02 \x01(\t\x12\x15\n\rnew_source_ip\x18\x03 \x01(\t\x12\x1a\n\x12old_destination_ip\x18\x04 \x01(\t\x12\x1a\n\x12new_destination_ip\x18\x05 \x01(\t\x12\x17\n\x0fold_source_port\x18\x06 \x01(\x05\x12\x17\n\x0fnew_source_port\x18\x07 \x01(\x05\x12\x1c\n\x14old_destination_port\x18\x08 \x01(\x05\x12\x1c\n\x14new_destination_port\x18\t \x01(\x05\x12\x12\n\nsubnet_uri\x18\n \x01(\t\x12\x13\n\x0bnetwork_uri\x18\x0b \x01(\t\"\xf2\x04\n\x17LoadBalancerBackendInfo\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0cinstance_uri\x18\x02 \x01(\t\x12\x1b\n\x13\x62\x61\x63kend_service_uri\x18\x03 \x01(\t\x12\x1a\n\x12instance_group_uri\x18\x04 \x01(\t\x12\"\n\x1anetwork_endpoint_group_uri\x18\x05 \x01(\t\x12\x1a\n\x12\x62\x61\x63kend_bucket_uri\x18\x08 \x01(\t\x12\"\n\x1apsc_service_attachment_uri\x18\t \x01(\t\x12\x1d\n\x15psc_google_api_target\x18\n \x01(\t\x12\x18\n\x10health_check_uri\x18\x06 \x01(\t\x12\x8c\x01\n#health_check_firewalls_config_state\x18\x07 \x01(\x0e\x32Z.google.cloud.networkmanagement.v1.LoadBalancerBackendInfo.HealthCheckFirewallsConfigStateB\x03\xe0\x41\x03\"\xcd\x01\n\x1fHealthCheckFirewallsConfigState\x12\x33\n/HEALTH_CHECK_FIREWALLS_CONFIG_STATE_UNSPECIFIED\x10\x00\x12\x18\n\x14\x46IREWALLS_CONFIGURED\x10\x01\x12\"\n\x1e\x46IREWALLS_PARTIALLY_CONFIGURED\x10\x02\x12\x1c\n\x18\x46IREWALLS_NOT_CONFIGURED\x10\x03\x12\x19\n\x15\x46IREWALLS_UNSUPPORTED\x10\x04\"#\n\x11StorageBucketInfo\x12\x0e\n\x06\x62ucket\x18\x01 \x01(\t\"$\n\x11ServerlessNegInfo\x12\x0f\n\x07neg_uri\x18\x01 \x01(\t\">\n\x18NgfwPacketInspectionInfo\x12\"\n\x1asecurity_profile_group_uri\x18\x01 \x01(\t*\xf6\x02\n\x10LoadBalancerType\x12\"\n\x1eLOAD_BALANCER_TYPE_UNSPECIFIED\x10\x00\x12 \n\x1cHTTPS_ADVANCED_LOAD_BALANCER\x10\x01\x12\x17\n\x13HTTPS_LOAD_BALANCER\x10\x02\x12 \n\x1cREGIONAL_HTTPS_LOAD_BALANCER\x10\x03\x12 \n\x1cINTERNAL_HTTPS_LOAD_BALANCER\x10\x04\x12\x1b\n\x17SSL_PROXY_LOAD_BALANCER\x10\x05\x12\x1b\n\x17TCP_PROXY_LOAD_BALANCER\x10\x06\x12$\n INTERNAL_TCP_PROXY_LOAD_BALANCER\x10\x07\x12\x19\n\x15NETWORK_LOAD_BALANCER\x10\x08\x12 \n\x1cLEGACY_NETWORK_LOAD_BALANCER\x10\t\x12\"\n\x1eTCP_UDP_INTERNAL_LOAD_BALANCER\x10\nB\xf9\x01\n%com.google.cloud.networkmanagement.v1B\nTraceProtoP\x01ZScloud.google.com/go/networkmanagement/apiv1/networkmanagementpb;networkmanagementpb\xaa\x02!Google.Cloud.NetworkManagement.V1\xca\x02!Google\\Cloud\\NetworkManagement\\V1\xea\x02$Google::Cloud::NetworkManagement::V1b\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool @@ -79,6 +79,9 @@ module V1 GkePodInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.GkePodInfo").msgclass IpMasqueradingSkippedInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.IpMasqueradingSkippedInfo").msgclass IpMasqueradingSkippedInfo::Reason = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.IpMasqueradingSkippedInfo.Reason").enummodule + GkeNetworkPolicyInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.GkeNetworkPolicyInfo").msgclass + GkeNetworkPolicySkippedInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.GkeNetworkPolicySkippedInfo").msgclass + GkeNetworkPolicySkippedInfo::Reason = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.GkeNetworkPolicySkippedInfo.Reason").enummodule CloudSQLInstanceInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.CloudSQLInstanceInfo").msgclass RedisInstanceInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.RedisInstanceInfo").msgclass RedisClusterInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.RedisClusterInfo").msgclass @@ -96,6 +99,7 @@ module V1 LoadBalancerBackendInfo::HealthCheckFirewallsConfigState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.LoadBalancerBackendInfo.HealthCheckFirewallsConfigState").enummodule StorageBucketInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.StorageBucketInfo").msgclass ServerlessNegInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.ServerlessNegInfo").msgclass + NgfwPacketInspectionInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.NgfwPacketInspectionInfo").msgclass LoadBalancerType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.LoadBalancerType").enummodule end end diff --git a/google-cloud-network_management-v1/proto_docs/google/cloud/networkmanagement/v1/trace.rb b/google-cloud-network_management-v1/proto_docs/google/cloud/networkmanagement/v1/trace.rb index 579edf1e472c..102040ca8fcf 100644 --- a/google-cloud-network_management-v1/proto_docs/google/cloud/networkmanagement/v1/trace.rb +++ b/google-cloud-network_management-v1/proto_docs/google/cloud/networkmanagement/v1/trace.rb @@ -74,17 +74,17 @@ class Trace # @return [::Google::Cloud::NetworkManagement::V1::InstanceInfo] # Display information of a Compute Engine instance. # - # Note: The following fields are mutually exclusive: `instance`, `firewall`, `route`, `endpoint`, `google_service`, `forwarding_rule`, `hybrid_subnet`, `vpn_gateway`, `vpn_tunnel`, `interconnect_attachment`, `vpc_connector`, `direct_vpc_egress_connection`, `serverless_external_connection`, `deliver`, `forward`, `abort`, `drop`, `load_balancer`, `network`, `gke_master`, `gke_pod`, `ip_masquerading_skipped`, `cloud_sql_instance`, `redis_instance`, `redis_cluster`, `cloud_function`, `app_engine_version`, `cloud_run_revision`, `nat`, `proxy_connection`, `load_balancer_backend_info`, `storage_bucket`, `serverless_neg`. 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: `instance`, `firewall`, `route`, `endpoint`, `google_service`, `forwarding_rule`, `hybrid_subnet`, `vpn_gateway`, `vpn_tunnel`, `interconnect_attachment`, `vpc_connector`, `direct_vpc_egress_connection`, `serverless_external_connection`, `deliver`, `forward`, `abort`, `drop`, `load_balancer`, `network`, `gke_master`, `gke_pod`, `ip_masquerading_skipped`, `gke_network_policy`, `gke_network_policy_skipped`, `cloud_sql_instance`, `redis_instance`, `redis_cluster`, `cloud_function`, `app_engine_version`, `cloud_run_revision`, `nat`, `proxy_connection`, `load_balancer_backend_info`, `storage_bucket`, `serverless_neg`, `ngfw_packet_inspection`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] firewall # @return [::Google::Cloud::NetworkManagement::V1::FirewallInfo] # Display information of a Compute Engine firewall rule. # - # Note: The following fields are mutually exclusive: `firewall`, `instance`, `route`, `endpoint`, `google_service`, `forwarding_rule`, `hybrid_subnet`, `vpn_gateway`, `vpn_tunnel`, `interconnect_attachment`, `vpc_connector`, `direct_vpc_egress_connection`, `serverless_external_connection`, `deliver`, `forward`, `abort`, `drop`, `load_balancer`, `network`, `gke_master`, `gke_pod`, `ip_masquerading_skipped`, `cloud_sql_instance`, `redis_instance`, `redis_cluster`, `cloud_function`, `app_engine_version`, `cloud_run_revision`, `nat`, `proxy_connection`, `load_balancer_backend_info`, `storage_bucket`, `serverless_neg`. 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: `firewall`, `instance`, `route`, `endpoint`, `google_service`, `forwarding_rule`, `hybrid_subnet`, `vpn_gateway`, `vpn_tunnel`, `interconnect_attachment`, `vpc_connector`, `direct_vpc_egress_connection`, `serverless_external_connection`, `deliver`, `forward`, `abort`, `drop`, `load_balancer`, `network`, `gke_master`, `gke_pod`, `ip_masquerading_skipped`, `gke_network_policy`, `gke_network_policy_skipped`, `cloud_sql_instance`, `redis_instance`, `redis_cluster`, `cloud_function`, `app_engine_version`, `cloud_run_revision`, `nat`, `proxy_connection`, `load_balancer_backend_info`, `storage_bucket`, `serverless_neg`, `ngfw_packet_inspection`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] route # @return [::Google::Cloud::NetworkManagement::V1::RouteInfo] # Display information of a Compute Engine route. # - # Note: The following fields are mutually exclusive: `route`, `instance`, `firewall`, `endpoint`, `google_service`, `forwarding_rule`, `hybrid_subnet`, `vpn_gateway`, `vpn_tunnel`, `interconnect_attachment`, `vpc_connector`, `direct_vpc_egress_connection`, `serverless_external_connection`, `deliver`, `forward`, `abort`, `drop`, `load_balancer`, `network`, `gke_master`, `gke_pod`, `ip_masquerading_skipped`, `cloud_sql_instance`, `redis_instance`, `redis_cluster`, `cloud_function`, `app_engine_version`, `cloud_run_revision`, `nat`, `proxy_connection`, `load_balancer_backend_info`, `storage_bucket`, `serverless_neg`. 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: `route`, `instance`, `firewall`, `endpoint`, `google_service`, `forwarding_rule`, `hybrid_subnet`, `vpn_gateway`, `vpn_tunnel`, `interconnect_attachment`, `vpc_connector`, `direct_vpc_egress_connection`, `serverless_external_connection`, `deliver`, `forward`, `abort`, `drop`, `load_balancer`, `network`, `gke_master`, `gke_pod`, `ip_masquerading_skipped`, `gke_network_policy`, `gke_network_policy_skipped`, `cloud_sql_instance`, `redis_instance`, `redis_cluster`, `cloud_function`, `app_engine_version`, `cloud_run_revision`, `nat`, `proxy_connection`, `load_balancer_backend_info`, `storage_bucket`, `serverless_neg`, `ngfw_packet_inspection`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] endpoint # @return [::Google::Cloud::NetworkManagement::V1::EndpointInfo] # Display information of the source and destination under analysis. @@ -92,156 +92,172 @@ class Trace # initial input, as it might be modified by state like NAT, # or Connection Proxy. # - # Note: The following fields are mutually exclusive: `endpoint`, `instance`, `firewall`, `route`, `google_service`, `forwarding_rule`, `hybrid_subnet`, `vpn_gateway`, `vpn_tunnel`, `interconnect_attachment`, `vpc_connector`, `direct_vpc_egress_connection`, `serverless_external_connection`, `deliver`, `forward`, `abort`, `drop`, `load_balancer`, `network`, `gke_master`, `gke_pod`, `ip_masquerading_skipped`, `cloud_sql_instance`, `redis_instance`, `redis_cluster`, `cloud_function`, `app_engine_version`, `cloud_run_revision`, `nat`, `proxy_connection`, `load_balancer_backend_info`, `storage_bucket`, `serverless_neg`. 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: `endpoint`, `instance`, `firewall`, `route`, `google_service`, `forwarding_rule`, `hybrid_subnet`, `vpn_gateway`, `vpn_tunnel`, `interconnect_attachment`, `vpc_connector`, `direct_vpc_egress_connection`, `serverless_external_connection`, `deliver`, `forward`, `abort`, `drop`, `load_balancer`, `network`, `gke_master`, `gke_pod`, `ip_masquerading_skipped`, `gke_network_policy`, `gke_network_policy_skipped`, `cloud_sql_instance`, `redis_instance`, `redis_cluster`, `cloud_function`, `app_engine_version`, `cloud_run_revision`, `nat`, `proxy_connection`, `load_balancer_backend_info`, `storage_bucket`, `serverless_neg`, `ngfw_packet_inspection`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] google_service # @return [::Google::Cloud::NetworkManagement::V1::GoogleServiceInfo] # Display information of a Google service # - # Note: The following fields are mutually exclusive: `google_service`, `instance`, `firewall`, `route`, `endpoint`, `forwarding_rule`, `hybrid_subnet`, `vpn_gateway`, `vpn_tunnel`, `interconnect_attachment`, `vpc_connector`, `direct_vpc_egress_connection`, `serverless_external_connection`, `deliver`, `forward`, `abort`, `drop`, `load_balancer`, `network`, `gke_master`, `gke_pod`, `ip_masquerading_skipped`, `cloud_sql_instance`, `redis_instance`, `redis_cluster`, `cloud_function`, `app_engine_version`, `cloud_run_revision`, `nat`, `proxy_connection`, `load_balancer_backend_info`, `storage_bucket`, `serverless_neg`. 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: `google_service`, `instance`, `firewall`, `route`, `endpoint`, `forwarding_rule`, `hybrid_subnet`, `vpn_gateway`, `vpn_tunnel`, `interconnect_attachment`, `vpc_connector`, `direct_vpc_egress_connection`, `serverless_external_connection`, `deliver`, `forward`, `abort`, `drop`, `load_balancer`, `network`, `gke_master`, `gke_pod`, `ip_masquerading_skipped`, `gke_network_policy`, `gke_network_policy_skipped`, `cloud_sql_instance`, `redis_instance`, `redis_cluster`, `cloud_function`, `app_engine_version`, `cloud_run_revision`, `nat`, `proxy_connection`, `load_balancer_backend_info`, `storage_bucket`, `serverless_neg`, `ngfw_packet_inspection`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] forwarding_rule # @return [::Google::Cloud::NetworkManagement::V1::ForwardingRuleInfo] # Display information of a Compute Engine forwarding rule. # - # Note: The following fields are mutually exclusive: `forwarding_rule`, `instance`, `firewall`, `route`, `endpoint`, `google_service`, `hybrid_subnet`, `vpn_gateway`, `vpn_tunnel`, `interconnect_attachment`, `vpc_connector`, `direct_vpc_egress_connection`, `serverless_external_connection`, `deliver`, `forward`, `abort`, `drop`, `load_balancer`, `network`, `gke_master`, `gke_pod`, `ip_masquerading_skipped`, `cloud_sql_instance`, `redis_instance`, `redis_cluster`, `cloud_function`, `app_engine_version`, `cloud_run_revision`, `nat`, `proxy_connection`, `load_balancer_backend_info`, `storage_bucket`, `serverless_neg`. 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: `forwarding_rule`, `instance`, `firewall`, `route`, `endpoint`, `google_service`, `hybrid_subnet`, `vpn_gateway`, `vpn_tunnel`, `interconnect_attachment`, `vpc_connector`, `direct_vpc_egress_connection`, `serverless_external_connection`, `deliver`, `forward`, `abort`, `drop`, `load_balancer`, `network`, `gke_master`, `gke_pod`, `ip_masquerading_skipped`, `gke_network_policy`, `gke_network_policy_skipped`, `cloud_sql_instance`, `redis_instance`, `redis_cluster`, `cloud_function`, `app_engine_version`, `cloud_run_revision`, `nat`, `proxy_connection`, `load_balancer_backend_info`, `storage_bucket`, `serverless_neg`, `ngfw_packet_inspection`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] hybrid_subnet # @return [::Google::Cloud::NetworkManagement::V1::HybridSubnetInfo] # Display information of a hybrid subnet. # - # Note: The following fields are mutually exclusive: `hybrid_subnet`, `instance`, `firewall`, `route`, `endpoint`, `google_service`, `forwarding_rule`, `vpn_gateway`, `vpn_tunnel`, `interconnect_attachment`, `vpc_connector`, `direct_vpc_egress_connection`, `serverless_external_connection`, `deliver`, `forward`, `abort`, `drop`, `load_balancer`, `network`, `gke_master`, `gke_pod`, `ip_masquerading_skipped`, `cloud_sql_instance`, `redis_instance`, `redis_cluster`, `cloud_function`, `app_engine_version`, `cloud_run_revision`, `nat`, `proxy_connection`, `load_balancer_backend_info`, `storage_bucket`, `serverless_neg`. 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: `hybrid_subnet`, `instance`, `firewall`, `route`, `endpoint`, `google_service`, `forwarding_rule`, `vpn_gateway`, `vpn_tunnel`, `interconnect_attachment`, `vpc_connector`, `direct_vpc_egress_connection`, `serverless_external_connection`, `deliver`, `forward`, `abort`, `drop`, `load_balancer`, `network`, `gke_master`, `gke_pod`, `ip_masquerading_skipped`, `gke_network_policy`, `gke_network_policy_skipped`, `cloud_sql_instance`, `redis_instance`, `redis_cluster`, `cloud_function`, `app_engine_version`, `cloud_run_revision`, `nat`, `proxy_connection`, `load_balancer_backend_info`, `storage_bucket`, `serverless_neg`, `ngfw_packet_inspection`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] vpn_gateway # @return [::Google::Cloud::NetworkManagement::V1::VpnGatewayInfo] # Display information of a Compute Engine VPN gateway. # - # Note: The following fields are mutually exclusive: `vpn_gateway`, `instance`, `firewall`, `route`, `endpoint`, `google_service`, `forwarding_rule`, `hybrid_subnet`, `vpn_tunnel`, `interconnect_attachment`, `vpc_connector`, `direct_vpc_egress_connection`, `serverless_external_connection`, `deliver`, `forward`, `abort`, `drop`, `load_balancer`, `network`, `gke_master`, `gke_pod`, `ip_masquerading_skipped`, `cloud_sql_instance`, `redis_instance`, `redis_cluster`, `cloud_function`, `app_engine_version`, `cloud_run_revision`, `nat`, `proxy_connection`, `load_balancer_backend_info`, `storage_bucket`, `serverless_neg`. 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: `vpn_gateway`, `instance`, `firewall`, `route`, `endpoint`, `google_service`, `forwarding_rule`, `hybrid_subnet`, `vpn_tunnel`, `interconnect_attachment`, `vpc_connector`, `direct_vpc_egress_connection`, `serverless_external_connection`, `deliver`, `forward`, `abort`, `drop`, `load_balancer`, `network`, `gke_master`, `gke_pod`, `ip_masquerading_skipped`, `gke_network_policy`, `gke_network_policy_skipped`, `cloud_sql_instance`, `redis_instance`, `redis_cluster`, `cloud_function`, `app_engine_version`, `cloud_run_revision`, `nat`, `proxy_connection`, `load_balancer_backend_info`, `storage_bucket`, `serverless_neg`, `ngfw_packet_inspection`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] vpn_tunnel # @return [::Google::Cloud::NetworkManagement::V1::VpnTunnelInfo] # Display information of a Compute Engine VPN tunnel. # - # Note: The following fields are mutually exclusive: `vpn_tunnel`, `instance`, `firewall`, `route`, `endpoint`, `google_service`, `forwarding_rule`, `hybrid_subnet`, `vpn_gateway`, `interconnect_attachment`, `vpc_connector`, `direct_vpc_egress_connection`, `serverless_external_connection`, `deliver`, `forward`, `abort`, `drop`, `load_balancer`, `network`, `gke_master`, `gke_pod`, `ip_masquerading_skipped`, `cloud_sql_instance`, `redis_instance`, `redis_cluster`, `cloud_function`, `app_engine_version`, `cloud_run_revision`, `nat`, `proxy_connection`, `load_balancer_backend_info`, `storage_bucket`, `serverless_neg`. 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: `vpn_tunnel`, `instance`, `firewall`, `route`, `endpoint`, `google_service`, `forwarding_rule`, `hybrid_subnet`, `vpn_gateway`, `interconnect_attachment`, `vpc_connector`, `direct_vpc_egress_connection`, `serverless_external_connection`, `deliver`, `forward`, `abort`, `drop`, `load_balancer`, `network`, `gke_master`, `gke_pod`, `ip_masquerading_skipped`, `gke_network_policy`, `gke_network_policy_skipped`, `cloud_sql_instance`, `redis_instance`, `redis_cluster`, `cloud_function`, `app_engine_version`, `cloud_run_revision`, `nat`, `proxy_connection`, `load_balancer_backend_info`, `storage_bucket`, `serverless_neg`, `ngfw_packet_inspection`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] interconnect_attachment # @return [::Google::Cloud::NetworkManagement::V1::InterconnectAttachmentInfo] # Display information of an interconnect attachment. # - # Note: The following fields are mutually exclusive: `interconnect_attachment`, `instance`, `firewall`, `route`, `endpoint`, `google_service`, `forwarding_rule`, `hybrid_subnet`, `vpn_gateway`, `vpn_tunnel`, `vpc_connector`, `direct_vpc_egress_connection`, `serverless_external_connection`, `deliver`, `forward`, `abort`, `drop`, `load_balancer`, `network`, `gke_master`, `gke_pod`, `ip_masquerading_skipped`, `cloud_sql_instance`, `redis_instance`, `redis_cluster`, `cloud_function`, `app_engine_version`, `cloud_run_revision`, `nat`, `proxy_connection`, `load_balancer_backend_info`, `storage_bucket`, `serverless_neg`. 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: `interconnect_attachment`, `instance`, `firewall`, `route`, `endpoint`, `google_service`, `forwarding_rule`, `hybrid_subnet`, `vpn_gateway`, `vpn_tunnel`, `vpc_connector`, `direct_vpc_egress_connection`, `serverless_external_connection`, `deliver`, `forward`, `abort`, `drop`, `load_balancer`, `network`, `gke_master`, `gke_pod`, `ip_masquerading_skipped`, `gke_network_policy`, `gke_network_policy_skipped`, `cloud_sql_instance`, `redis_instance`, `redis_cluster`, `cloud_function`, `app_engine_version`, `cloud_run_revision`, `nat`, `proxy_connection`, `load_balancer_backend_info`, `storage_bucket`, `serverless_neg`, `ngfw_packet_inspection`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] vpc_connector # @return [::Google::Cloud::NetworkManagement::V1::VpcConnectorInfo] # Display information of a VPC connector. # - # Note: The following fields are mutually exclusive: `vpc_connector`, `instance`, `firewall`, `route`, `endpoint`, `google_service`, `forwarding_rule`, `hybrid_subnet`, `vpn_gateway`, `vpn_tunnel`, `interconnect_attachment`, `direct_vpc_egress_connection`, `serverless_external_connection`, `deliver`, `forward`, `abort`, `drop`, `load_balancer`, `network`, `gke_master`, `gke_pod`, `ip_masquerading_skipped`, `cloud_sql_instance`, `redis_instance`, `redis_cluster`, `cloud_function`, `app_engine_version`, `cloud_run_revision`, `nat`, `proxy_connection`, `load_balancer_backend_info`, `storage_bucket`, `serverless_neg`. 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: `vpc_connector`, `instance`, `firewall`, `route`, `endpoint`, `google_service`, `forwarding_rule`, `hybrid_subnet`, `vpn_gateway`, `vpn_tunnel`, `interconnect_attachment`, `direct_vpc_egress_connection`, `serverless_external_connection`, `deliver`, `forward`, `abort`, `drop`, `load_balancer`, `network`, `gke_master`, `gke_pod`, `ip_masquerading_skipped`, `gke_network_policy`, `gke_network_policy_skipped`, `cloud_sql_instance`, `redis_instance`, `redis_cluster`, `cloud_function`, `app_engine_version`, `cloud_run_revision`, `nat`, `proxy_connection`, `load_balancer_backend_info`, `storage_bucket`, `serverless_neg`, `ngfw_packet_inspection`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] direct_vpc_egress_connection # @return [::Google::Cloud::NetworkManagement::V1::DirectVpcEgressConnectionInfo] # Display information of a serverless direct VPC egress connection. # - # Note: The following fields are mutually exclusive: `direct_vpc_egress_connection`, `instance`, `firewall`, `route`, `endpoint`, `google_service`, `forwarding_rule`, `hybrid_subnet`, `vpn_gateway`, `vpn_tunnel`, `interconnect_attachment`, `vpc_connector`, `serverless_external_connection`, `deliver`, `forward`, `abort`, `drop`, `load_balancer`, `network`, `gke_master`, `gke_pod`, `ip_masquerading_skipped`, `cloud_sql_instance`, `redis_instance`, `redis_cluster`, `cloud_function`, `app_engine_version`, `cloud_run_revision`, `nat`, `proxy_connection`, `load_balancer_backend_info`, `storage_bucket`, `serverless_neg`. 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: `direct_vpc_egress_connection`, `instance`, `firewall`, `route`, `endpoint`, `google_service`, `forwarding_rule`, `hybrid_subnet`, `vpn_gateway`, `vpn_tunnel`, `interconnect_attachment`, `vpc_connector`, `serverless_external_connection`, `deliver`, `forward`, `abort`, `drop`, `load_balancer`, `network`, `gke_master`, `gke_pod`, `ip_masquerading_skipped`, `gke_network_policy`, `gke_network_policy_skipped`, `cloud_sql_instance`, `redis_instance`, `redis_cluster`, `cloud_function`, `app_engine_version`, `cloud_run_revision`, `nat`, `proxy_connection`, `load_balancer_backend_info`, `storage_bucket`, `serverless_neg`, `ngfw_packet_inspection`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] serverless_external_connection # @return [::Google::Cloud::NetworkManagement::V1::ServerlessExternalConnectionInfo] # Display information of a serverless public (external) connection. # - # Note: The following fields are mutually exclusive: `serverless_external_connection`, `instance`, `firewall`, `route`, `endpoint`, `google_service`, `forwarding_rule`, `hybrid_subnet`, `vpn_gateway`, `vpn_tunnel`, `interconnect_attachment`, `vpc_connector`, `direct_vpc_egress_connection`, `deliver`, `forward`, `abort`, `drop`, `load_balancer`, `network`, `gke_master`, `gke_pod`, `ip_masquerading_skipped`, `cloud_sql_instance`, `redis_instance`, `redis_cluster`, `cloud_function`, `app_engine_version`, `cloud_run_revision`, `nat`, `proxy_connection`, `load_balancer_backend_info`, `storage_bucket`, `serverless_neg`. 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: `serverless_external_connection`, `instance`, `firewall`, `route`, `endpoint`, `google_service`, `forwarding_rule`, `hybrid_subnet`, `vpn_gateway`, `vpn_tunnel`, `interconnect_attachment`, `vpc_connector`, `direct_vpc_egress_connection`, `deliver`, `forward`, `abort`, `drop`, `load_balancer`, `network`, `gke_master`, `gke_pod`, `ip_masquerading_skipped`, `gke_network_policy`, `gke_network_policy_skipped`, `cloud_sql_instance`, `redis_instance`, `redis_cluster`, `cloud_function`, `app_engine_version`, `cloud_run_revision`, `nat`, `proxy_connection`, `load_balancer_backend_info`, `storage_bucket`, `serverless_neg`, `ngfw_packet_inspection`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] deliver # @return [::Google::Cloud::NetworkManagement::V1::DeliverInfo] # Display information of the final state "deliver" and reason. # - # Note: The following fields are mutually exclusive: `deliver`, `instance`, `firewall`, `route`, `endpoint`, `google_service`, `forwarding_rule`, `hybrid_subnet`, `vpn_gateway`, `vpn_tunnel`, `interconnect_attachment`, `vpc_connector`, `direct_vpc_egress_connection`, `serverless_external_connection`, `forward`, `abort`, `drop`, `load_balancer`, `network`, `gke_master`, `gke_pod`, `ip_masquerading_skipped`, `cloud_sql_instance`, `redis_instance`, `redis_cluster`, `cloud_function`, `app_engine_version`, `cloud_run_revision`, `nat`, `proxy_connection`, `load_balancer_backend_info`, `storage_bucket`, `serverless_neg`. 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: `deliver`, `instance`, `firewall`, `route`, `endpoint`, `google_service`, `forwarding_rule`, `hybrid_subnet`, `vpn_gateway`, `vpn_tunnel`, `interconnect_attachment`, `vpc_connector`, `direct_vpc_egress_connection`, `serverless_external_connection`, `forward`, `abort`, `drop`, `load_balancer`, `network`, `gke_master`, `gke_pod`, `ip_masquerading_skipped`, `gke_network_policy`, `gke_network_policy_skipped`, `cloud_sql_instance`, `redis_instance`, `redis_cluster`, `cloud_function`, `app_engine_version`, `cloud_run_revision`, `nat`, `proxy_connection`, `load_balancer_backend_info`, `storage_bucket`, `serverless_neg`, `ngfw_packet_inspection`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] forward # @return [::Google::Cloud::NetworkManagement::V1::ForwardInfo] # Display information of the final state "forward" and reason. # - # Note: The following fields are mutually exclusive: `forward`, `instance`, `firewall`, `route`, `endpoint`, `google_service`, `forwarding_rule`, `hybrid_subnet`, `vpn_gateway`, `vpn_tunnel`, `interconnect_attachment`, `vpc_connector`, `direct_vpc_egress_connection`, `serverless_external_connection`, `deliver`, `abort`, `drop`, `load_balancer`, `network`, `gke_master`, `gke_pod`, `ip_masquerading_skipped`, `cloud_sql_instance`, `redis_instance`, `redis_cluster`, `cloud_function`, `app_engine_version`, `cloud_run_revision`, `nat`, `proxy_connection`, `load_balancer_backend_info`, `storage_bucket`, `serverless_neg`. 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: `forward`, `instance`, `firewall`, `route`, `endpoint`, `google_service`, `forwarding_rule`, `hybrid_subnet`, `vpn_gateway`, `vpn_tunnel`, `interconnect_attachment`, `vpc_connector`, `direct_vpc_egress_connection`, `serverless_external_connection`, `deliver`, `abort`, `drop`, `load_balancer`, `network`, `gke_master`, `gke_pod`, `ip_masquerading_skipped`, `gke_network_policy`, `gke_network_policy_skipped`, `cloud_sql_instance`, `redis_instance`, `redis_cluster`, `cloud_function`, `app_engine_version`, `cloud_run_revision`, `nat`, `proxy_connection`, `load_balancer_backend_info`, `storage_bucket`, `serverless_neg`, `ngfw_packet_inspection`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] abort # @return [::Google::Cloud::NetworkManagement::V1::AbortInfo] # Display information of the final state "abort" and reason. # - # Note: The following fields are mutually exclusive: `abort`, `instance`, `firewall`, `route`, `endpoint`, `google_service`, `forwarding_rule`, `hybrid_subnet`, `vpn_gateway`, `vpn_tunnel`, `interconnect_attachment`, `vpc_connector`, `direct_vpc_egress_connection`, `serverless_external_connection`, `deliver`, `forward`, `drop`, `load_balancer`, `network`, `gke_master`, `gke_pod`, `ip_masquerading_skipped`, `cloud_sql_instance`, `redis_instance`, `redis_cluster`, `cloud_function`, `app_engine_version`, `cloud_run_revision`, `nat`, `proxy_connection`, `load_balancer_backend_info`, `storage_bucket`, `serverless_neg`. 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: `abort`, `instance`, `firewall`, `route`, `endpoint`, `google_service`, `forwarding_rule`, `hybrid_subnet`, `vpn_gateway`, `vpn_tunnel`, `interconnect_attachment`, `vpc_connector`, `direct_vpc_egress_connection`, `serverless_external_connection`, `deliver`, `forward`, `drop`, `load_balancer`, `network`, `gke_master`, `gke_pod`, `ip_masquerading_skipped`, `gke_network_policy`, `gke_network_policy_skipped`, `cloud_sql_instance`, `redis_instance`, `redis_cluster`, `cloud_function`, `app_engine_version`, `cloud_run_revision`, `nat`, `proxy_connection`, `load_balancer_backend_info`, `storage_bucket`, `serverless_neg`, `ngfw_packet_inspection`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] drop # @return [::Google::Cloud::NetworkManagement::V1::DropInfo] # Display information of the final state "drop" and reason. # - # Note: The following fields are mutually exclusive: `drop`, `instance`, `firewall`, `route`, `endpoint`, `google_service`, `forwarding_rule`, `hybrid_subnet`, `vpn_gateway`, `vpn_tunnel`, `interconnect_attachment`, `vpc_connector`, `direct_vpc_egress_connection`, `serverless_external_connection`, `deliver`, `forward`, `abort`, `load_balancer`, `network`, `gke_master`, `gke_pod`, `ip_masquerading_skipped`, `cloud_sql_instance`, `redis_instance`, `redis_cluster`, `cloud_function`, `app_engine_version`, `cloud_run_revision`, `nat`, `proxy_connection`, `load_balancer_backend_info`, `storage_bucket`, `serverless_neg`. 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: `drop`, `instance`, `firewall`, `route`, `endpoint`, `google_service`, `forwarding_rule`, `hybrid_subnet`, `vpn_gateway`, `vpn_tunnel`, `interconnect_attachment`, `vpc_connector`, `direct_vpc_egress_connection`, `serverless_external_connection`, `deliver`, `forward`, `abort`, `load_balancer`, `network`, `gke_master`, `gke_pod`, `ip_masquerading_skipped`, `gke_network_policy`, `gke_network_policy_skipped`, `cloud_sql_instance`, `redis_instance`, `redis_cluster`, `cloud_function`, `app_engine_version`, `cloud_run_revision`, `nat`, `proxy_connection`, `load_balancer_backend_info`, `storage_bucket`, `serverless_neg`, `ngfw_packet_inspection`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] load_balancer # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Google::Cloud::NetworkManagement::V1::LoadBalancerInfo] # Display information of the load balancers. Deprecated in favor of the # `load_balancer_backend_info` field, not used in new tests. # - # Note: The following fields are mutually exclusive: `load_balancer`, `instance`, `firewall`, `route`, `endpoint`, `google_service`, `forwarding_rule`, `hybrid_subnet`, `vpn_gateway`, `vpn_tunnel`, `interconnect_attachment`, `vpc_connector`, `direct_vpc_egress_connection`, `serverless_external_connection`, `deliver`, `forward`, `abort`, `drop`, `network`, `gke_master`, `gke_pod`, `ip_masquerading_skipped`, `cloud_sql_instance`, `redis_instance`, `redis_cluster`, `cloud_function`, `app_engine_version`, `cloud_run_revision`, `nat`, `proxy_connection`, `load_balancer_backend_info`, `storage_bucket`, `serverless_neg`. 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: `load_balancer`, `instance`, `firewall`, `route`, `endpoint`, `google_service`, `forwarding_rule`, `hybrid_subnet`, `vpn_gateway`, `vpn_tunnel`, `interconnect_attachment`, `vpc_connector`, `direct_vpc_egress_connection`, `serverless_external_connection`, `deliver`, `forward`, `abort`, `drop`, `network`, `gke_master`, `gke_pod`, `ip_masquerading_skipped`, `gke_network_policy`, `gke_network_policy_skipped`, `cloud_sql_instance`, `redis_instance`, `redis_cluster`, `cloud_function`, `app_engine_version`, `cloud_run_revision`, `nat`, `proxy_connection`, `load_balancer_backend_info`, `storage_bucket`, `serverless_neg`, `ngfw_packet_inspection`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] network # @return [::Google::Cloud::NetworkManagement::V1::NetworkInfo] # Display information of a Google Cloud network. # - # Note: The following fields are mutually exclusive: `network`, `instance`, `firewall`, `route`, `endpoint`, `google_service`, `forwarding_rule`, `hybrid_subnet`, `vpn_gateway`, `vpn_tunnel`, `interconnect_attachment`, `vpc_connector`, `direct_vpc_egress_connection`, `serverless_external_connection`, `deliver`, `forward`, `abort`, `drop`, `load_balancer`, `gke_master`, `gke_pod`, `ip_masquerading_skipped`, `cloud_sql_instance`, `redis_instance`, `redis_cluster`, `cloud_function`, `app_engine_version`, `cloud_run_revision`, `nat`, `proxy_connection`, `load_balancer_backend_info`, `storage_bucket`, `serverless_neg`. 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: `network`, `instance`, `firewall`, `route`, `endpoint`, `google_service`, `forwarding_rule`, `hybrid_subnet`, `vpn_gateway`, `vpn_tunnel`, `interconnect_attachment`, `vpc_connector`, `direct_vpc_egress_connection`, `serverless_external_connection`, `deliver`, `forward`, `abort`, `drop`, `load_balancer`, `gke_master`, `gke_pod`, `ip_masquerading_skipped`, `gke_network_policy`, `gke_network_policy_skipped`, `cloud_sql_instance`, `redis_instance`, `redis_cluster`, `cloud_function`, `app_engine_version`, `cloud_run_revision`, `nat`, `proxy_connection`, `load_balancer_backend_info`, `storage_bucket`, `serverless_neg`, `ngfw_packet_inspection`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] gke_master # @return [::Google::Cloud::NetworkManagement::V1::GKEMasterInfo] # Display information of a Google Kubernetes Engine cluster master. # - # Note: The following fields are mutually exclusive: `gke_master`, `instance`, `firewall`, `route`, `endpoint`, `google_service`, `forwarding_rule`, `hybrid_subnet`, `vpn_gateway`, `vpn_tunnel`, `interconnect_attachment`, `vpc_connector`, `direct_vpc_egress_connection`, `serverless_external_connection`, `deliver`, `forward`, `abort`, `drop`, `load_balancer`, `network`, `gke_pod`, `ip_masquerading_skipped`, `cloud_sql_instance`, `redis_instance`, `redis_cluster`, `cloud_function`, `app_engine_version`, `cloud_run_revision`, `nat`, `proxy_connection`, `load_balancer_backend_info`, `storage_bucket`, `serverless_neg`. 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: `gke_master`, `instance`, `firewall`, `route`, `endpoint`, `google_service`, `forwarding_rule`, `hybrid_subnet`, `vpn_gateway`, `vpn_tunnel`, `interconnect_attachment`, `vpc_connector`, `direct_vpc_egress_connection`, `serverless_external_connection`, `deliver`, `forward`, `abort`, `drop`, `load_balancer`, `network`, `gke_pod`, `ip_masquerading_skipped`, `gke_network_policy`, `gke_network_policy_skipped`, `cloud_sql_instance`, `redis_instance`, `redis_cluster`, `cloud_function`, `app_engine_version`, `cloud_run_revision`, `nat`, `proxy_connection`, `load_balancer_backend_info`, `storage_bucket`, `serverless_neg`, `ngfw_packet_inspection`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] gke_pod # @return [::Google::Cloud::NetworkManagement::V1::GkePodInfo] # Display information of a Google Kubernetes Engine Pod. # - # Note: The following fields are mutually exclusive: `gke_pod`, `instance`, `firewall`, `route`, `endpoint`, `google_service`, `forwarding_rule`, `hybrid_subnet`, `vpn_gateway`, `vpn_tunnel`, `interconnect_attachment`, `vpc_connector`, `direct_vpc_egress_connection`, `serverless_external_connection`, `deliver`, `forward`, `abort`, `drop`, `load_balancer`, `network`, `gke_master`, `ip_masquerading_skipped`, `cloud_sql_instance`, `redis_instance`, `redis_cluster`, `cloud_function`, `app_engine_version`, `cloud_run_revision`, `nat`, `proxy_connection`, `load_balancer_backend_info`, `storage_bucket`, `serverless_neg`. 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: `gke_pod`, `instance`, `firewall`, `route`, `endpoint`, `google_service`, `forwarding_rule`, `hybrid_subnet`, `vpn_gateway`, `vpn_tunnel`, `interconnect_attachment`, `vpc_connector`, `direct_vpc_egress_connection`, `serverless_external_connection`, `deliver`, `forward`, `abort`, `drop`, `load_balancer`, `network`, `gke_master`, `ip_masquerading_skipped`, `gke_network_policy`, `gke_network_policy_skipped`, `cloud_sql_instance`, `redis_instance`, `redis_cluster`, `cloud_function`, `app_engine_version`, `cloud_run_revision`, `nat`, `proxy_connection`, `load_balancer_backend_info`, `storage_bucket`, `serverless_neg`, `ngfw_packet_inspection`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] ip_masquerading_skipped # @return [::Google::Cloud::NetworkManagement::V1::IpMasqueradingSkippedInfo] # Display information of the reason why GKE Pod IP masquerading was # skipped. # - # Note: The following fields are mutually exclusive: `ip_masquerading_skipped`, `instance`, `firewall`, `route`, `endpoint`, `google_service`, `forwarding_rule`, `hybrid_subnet`, `vpn_gateway`, `vpn_tunnel`, `interconnect_attachment`, `vpc_connector`, `direct_vpc_egress_connection`, `serverless_external_connection`, `deliver`, `forward`, `abort`, `drop`, `load_balancer`, `network`, `gke_master`, `gke_pod`, `cloud_sql_instance`, `redis_instance`, `redis_cluster`, `cloud_function`, `app_engine_version`, `cloud_run_revision`, `nat`, `proxy_connection`, `load_balancer_backend_info`, `storage_bucket`, `serverless_neg`. 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: `ip_masquerading_skipped`, `instance`, `firewall`, `route`, `endpoint`, `google_service`, `forwarding_rule`, `hybrid_subnet`, `vpn_gateway`, `vpn_tunnel`, `interconnect_attachment`, `vpc_connector`, `direct_vpc_egress_connection`, `serverless_external_connection`, `deliver`, `forward`, `abort`, `drop`, `load_balancer`, `network`, `gke_master`, `gke_pod`, `gke_network_policy`, `gke_network_policy_skipped`, `cloud_sql_instance`, `redis_instance`, `redis_cluster`, `cloud_function`, `app_engine_version`, `cloud_run_revision`, `nat`, `proxy_connection`, `load_balancer_backend_info`, `storage_bucket`, `serverless_neg`, `ngfw_packet_inspection`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] gke_network_policy + # @return [::Google::Cloud::NetworkManagement::V1::GkeNetworkPolicyInfo] + # Display information of a GKE Network Policy. + # + # Note: The following fields are mutually exclusive: `gke_network_policy`, `instance`, `firewall`, `route`, `endpoint`, `google_service`, `forwarding_rule`, `hybrid_subnet`, `vpn_gateway`, `vpn_tunnel`, `interconnect_attachment`, `vpc_connector`, `direct_vpc_egress_connection`, `serverless_external_connection`, `deliver`, `forward`, `abort`, `drop`, `load_balancer`, `network`, `gke_master`, `gke_pod`, `ip_masquerading_skipped`, `gke_network_policy_skipped`, `cloud_sql_instance`, `redis_instance`, `redis_cluster`, `cloud_function`, `app_engine_version`, `cloud_run_revision`, `nat`, `proxy_connection`, `load_balancer_backend_info`, `storage_bucket`, `serverless_neg`, `ngfw_packet_inspection`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] gke_network_policy_skipped + # @return [::Google::Cloud::NetworkManagement::V1::GkeNetworkPolicySkippedInfo] + # Display information of the reason why GKE Network Policy evaluation was + # skipped. + # + # Note: The following fields are mutually exclusive: `gke_network_policy_skipped`, `instance`, `firewall`, `route`, `endpoint`, `google_service`, `forwarding_rule`, `hybrid_subnet`, `vpn_gateway`, `vpn_tunnel`, `interconnect_attachment`, `vpc_connector`, `direct_vpc_egress_connection`, `serverless_external_connection`, `deliver`, `forward`, `abort`, `drop`, `load_balancer`, `network`, `gke_master`, `gke_pod`, `ip_masquerading_skipped`, `gke_network_policy`, `cloud_sql_instance`, `redis_instance`, `redis_cluster`, `cloud_function`, `app_engine_version`, `cloud_run_revision`, `nat`, `proxy_connection`, `load_balancer_backend_info`, `storage_bucket`, `serverless_neg`, `ngfw_packet_inspection`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] cloud_sql_instance # @return [::Google::Cloud::NetworkManagement::V1::CloudSQLInstanceInfo] # Display information of a Cloud SQL instance. # - # Note: The following fields are mutually exclusive: `cloud_sql_instance`, `instance`, `firewall`, `route`, `endpoint`, `google_service`, `forwarding_rule`, `hybrid_subnet`, `vpn_gateway`, `vpn_tunnel`, `interconnect_attachment`, `vpc_connector`, `direct_vpc_egress_connection`, `serverless_external_connection`, `deliver`, `forward`, `abort`, `drop`, `load_balancer`, `network`, `gke_master`, `gke_pod`, `ip_masquerading_skipped`, `redis_instance`, `redis_cluster`, `cloud_function`, `app_engine_version`, `cloud_run_revision`, `nat`, `proxy_connection`, `load_balancer_backend_info`, `storage_bucket`, `serverless_neg`. 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: `cloud_sql_instance`, `instance`, `firewall`, `route`, `endpoint`, `google_service`, `forwarding_rule`, `hybrid_subnet`, `vpn_gateway`, `vpn_tunnel`, `interconnect_attachment`, `vpc_connector`, `direct_vpc_egress_connection`, `serverless_external_connection`, `deliver`, `forward`, `abort`, `drop`, `load_balancer`, `network`, `gke_master`, `gke_pod`, `ip_masquerading_skipped`, `gke_network_policy`, `gke_network_policy_skipped`, `redis_instance`, `redis_cluster`, `cloud_function`, `app_engine_version`, `cloud_run_revision`, `nat`, `proxy_connection`, `load_balancer_backend_info`, `storage_bucket`, `serverless_neg`, `ngfw_packet_inspection`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] redis_instance # @return [::Google::Cloud::NetworkManagement::V1::RedisInstanceInfo] # Display information of a Redis Instance. # - # Note: The following fields are mutually exclusive: `redis_instance`, `instance`, `firewall`, `route`, `endpoint`, `google_service`, `forwarding_rule`, `hybrid_subnet`, `vpn_gateway`, `vpn_tunnel`, `interconnect_attachment`, `vpc_connector`, `direct_vpc_egress_connection`, `serverless_external_connection`, `deliver`, `forward`, `abort`, `drop`, `load_balancer`, `network`, `gke_master`, `gke_pod`, `ip_masquerading_skipped`, `cloud_sql_instance`, `redis_cluster`, `cloud_function`, `app_engine_version`, `cloud_run_revision`, `nat`, `proxy_connection`, `load_balancer_backend_info`, `storage_bucket`, `serverless_neg`. 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: `redis_instance`, `instance`, `firewall`, `route`, `endpoint`, `google_service`, `forwarding_rule`, `hybrid_subnet`, `vpn_gateway`, `vpn_tunnel`, `interconnect_attachment`, `vpc_connector`, `direct_vpc_egress_connection`, `serverless_external_connection`, `deliver`, `forward`, `abort`, `drop`, `load_balancer`, `network`, `gke_master`, `gke_pod`, `ip_masquerading_skipped`, `gke_network_policy`, `gke_network_policy_skipped`, `cloud_sql_instance`, `redis_cluster`, `cloud_function`, `app_engine_version`, `cloud_run_revision`, `nat`, `proxy_connection`, `load_balancer_backend_info`, `storage_bucket`, `serverless_neg`, `ngfw_packet_inspection`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] redis_cluster # @return [::Google::Cloud::NetworkManagement::V1::RedisClusterInfo] # Display information of a Redis Cluster. # - # Note: The following fields are mutually exclusive: `redis_cluster`, `instance`, `firewall`, `route`, `endpoint`, `google_service`, `forwarding_rule`, `hybrid_subnet`, `vpn_gateway`, `vpn_tunnel`, `interconnect_attachment`, `vpc_connector`, `direct_vpc_egress_connection`, `serverless_external_connection`, `deliver`, `forward`, `abort`, `drop`, `load_balancer`, `network`, `gke_master`, `gke_pod`, `ip_masquerading_skipped`, `cloud_sql_instance`, `redis_instance`, `cloud_function`, `app_engine_version`, `cloud_run_revision`, `nat`, `proxy_connection`, `load_balancer_backend_info`, `storage_bucket`, `serverless_neg`. 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: `redis_cluster`, `instance`, `firewall`, `route`, `endpoint`, `google_service`, `forwarding_rule`, `hybrid_subnet`, `vpn_gateway`, `vpn_tunnel`, `interconnect_attachment`, `vpc_connector`, `direct_vpc_egress_connection`, `serverless_external_connection`, `deliver`, `forward`, `abort`, `drop`, `load_balancer`, `network`, `gke_master`, `gke_pod`, `ip_masquerading_skipped`, `gke_network_policy`, `gke_network_policy_skipped`, `cloud_sql_instance`, `redis_instance`, `cloud_function`, `app_engine_version`, `cloud_run_revision`, `nat`, `proxy_connection`, `load_balancer_backend_info`, `storage_bucket`, `serverless_neg`, `ngfw_packet_inspection`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] cloud_function # @return [::Google::Cloud::NetworkManagement::V1::CloudFunctionInfo] # Display information of a Cloud Function. # - # Note: The following fields are mutually exclusive: `cloud_function`, `instance`, `firewall`, `route`, `endpoint`, `google_service`, `forwarding_rule`, `hybrid_subnet`, `vpn_gateway`, `vpn_tunnel`, `interconnect_attachment`, `vpc_connector`, `direct_vpc_egress_connection`, `serverless_external_connection`, `deliver`, `forward`, `abort`, `drop`, `load_balancer`, `network`, `gke_master`, `gke_pod`, `ip_masquerading_skipped`, `cloud_sql_instance`, `redis_instance`, `redis_cluster`, `app_engine_version`, `cloud_run_revision`, `nat`, `proxy_connection`, `load_balancer_backend_info`, `storage_bucket`, `serverless_neg`. 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: `cloud_function`, `instance`, `firewall`, `route`, `endpoint`, `google_service`, `forwarding_rule`, `hybrid_subnet`, `vpn_gateway`, `vpn_tunnel`, `interconnect_attachment`, `vpc_connector`, `direct_vpc_egress_connection`, `serverless_external_connection`, `deliver`, `forward`, `abort`, `drop`, `load_balancer`, `network`, `gke_master`, `gke_pod`, `ip_masquerading_skipped`, `gke_network_policy`, `gke_network_policy_skipped`, `cloud_sql_instance`, `redis_instance`, `redis_cluster`, `app_engine_version`, `cloud_run_revision`, `nat`, `proxy_connection`, `load_balancer_backend_info`, `storage_bucket`, `serverless_neg`, `ngfw_packet_inspection`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] app_engine_version # @return [::Google::Cloud::NetworkManagement::V1::AppEngineVersionInfo] # Display information of an App Engine service version. # - # Note: The following fields are mutually exclusive: `app_engine_version`, `instance`, `firewall`, `route`, `endpoint`, `google_service`, `forwarding_rule`, `hybrid_subnet`, `vpn_gateway`, `vpn_tunnel`, `interconnect_attachment`, `vpc_connector`, `direct_vpc_egress_connection`, `serverless_external_connection`, `deliver`, `forward`, `abort`, `drop`, `load_balancer`, `network`, `gke_master`, `gke_pod`, `ip_masquerading_skipped`, `cloud_sql_instance`, `redis_instance`, `redis_cluster`, `cloud_function`, `cloud_run_revision`, `nat`, `proxy_connection`, `load_balancer_backend_info`, `storage_bucket`, `serverless_neg`. 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: `app_engine_version`, `instance`, `firewall`, `route`, `endpoint`, `google_service`, `forwarding_rule`, `hybrid_subnet`, `vpn_gateway`, `vpn_tunnel`, `interconnect_attachment`, `vpc_connector`, `direct_vpc_egress_connection`, `serverless_external_connection`, `deliver`, `forward`, `abort`, `drop`, `load_balancer`, `network`, `gke_master`, `gke_pod`, `ip_masquerading_skipped`, `gke_network_policy`, `gke_network_policy_skipped`, `cloud_sql_instance`, `redis_instance`, `redis_cluster`, `cloud_function`, `cloud_run_revision`, `nat`, `proxy_connection`, `load_balancer_backend_info`, `storage_bucket`, `serverless_neg`, `ngfw_packet_inspection`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] cloud_run_revision # @return [::Google::Cloud::NetworkManagement::V1::CloudRunRevisionInfo] # Display information of a Cloud Run revision. # - # Note: The following fields are mutually exclusive: `cloud_run_revision`, `instance`, `firewall`, `route`, `endpoint`, `google_service`, `forwarding_rule`, `hybrid_subnet`, `vpn_gateway`, `vpn_tunnel`, `interconnect_attachment`, `vpc_connector`, `direct_vpc_egress_connection`, `serverless_external_connection`, `deliver`, `forward`, `abort`, `drop`, `load_balancer`, `network`, `gke_master`, `gke_pod`, `ip_masquerading_skipped`, `cloud_sql_instance`, `redis_instance`, `redis_cluster`, `cloud_function`, `app_engine_version`, `nat`, `proxy_connection`, `load_balancer_backend_info`, `storage_bucket`, `serverless_neg`. 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: `cloud_run_revision`, `instance`, `firewall`, `route`, `endpoint`, `google_service`, `forwarding_rule`, `hybrid_subnet`, `vpn_gateway`, `vpn_tunnel`, `interconnect_attachment`, `vpc_connector`, `direct_vpc_egress_connection`, `serverless_external_connection`, `deliver`, `forward`, `abort`, `drop`, `load_balancer`, `network`, `gke_master`, `gke_pod`, `ip_masquerading_skipped`, `gke_network_policy`, `gke_network_policy_skipped`, `cloud_sql_instance`, `redis_instance`, `redis_cluster`, `cloud_function`, `app_engine_version`, `nat`, `proxy_connection`, `load_balancer_backend_info`, `storage_bucket`, `serverless_neg`, `ngfw_packet_inspection`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] nat # @return [::Google::Cloud::NetworkManagement::V1::NatInfo] # Display information of a NAT. # - # Note: The following fields are mutually exclusive: `nat`, `instance`, `firewall`, `route`, `endpoint`, `google_service`, `forwarding_rule`, `hybrid_subnet`, `vpn_gateway`, `vpn_tunnel`, `interconnect_attachment`, `vpc_connector`, `direct_vpc_egress_connection`, `serverless_external_connection`, `deliver`, `forward`, `abort`, `drop`, `load_balancer`, `network`, `gke_master`, `gke_pod`, `ip_masquerading_skipped`, `cloud_sql_instance`, `redis_instance`, `redis_cluster`, `cloud_function`, `app_engine_version`, `cloud_run_revision`, `proxy_connection`, `load_balancer_backend_info`, `storage_bucket`, `serverless_neg`. 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: `nat`, `instance`, `firewall`, `route`, `endpoint`, `google_service`, `forwarding_rule`, `hybrid_subnet`, `vpn_gateway`, `vpn_tunnel`, `interconnect_attachment`, `vpc_connector`, `direct_vpc_egress_connection`, `serverless_external_connection`, `deliver`, `forward`, `abort`, `drop`, `load_balancer`, `network`, `gke_master`, `gke_pod`, `ip_masquerading_skipped`, `gke_network_policy`, `gke_network_policy_skipped`, `cloud_sql_instance`, `redis_instance`, `redis_cluster`, `cloud_function`, `app_engine_version`, `cloud_run_revision`, `proxy_connection`, `load_balancer_backend_info`, `storage_bucket`, `serverless_neg`, `ngfw_packet_inspection`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] proxy_connection # @return [::Google::Cloud::NetworkManagement::V1::ProxyConnectionInfo] # Display information of a ProxyConnection. # - # Note: The following fields are mutually exclusive: `proxy_connection`, `instance`, `firewall`, `route`, `endpoint`, `google_service`, `forwarding_rule`, `hybrid_subnet`, `vpn_gateway`, `vpn_tunnel`, `interconnect_attachment`, `vpc_connector`, `direct_vpc_egress_connection`, `serverless_external_connection`, `deliver`, `forward`, `abort`, `drop`, `load_balancer`, `network`, `gke_master`, `gke_pod`, `ip_masquerading_skipped`, `cloud_sql_instance`, `redis_instance`, `redis_cluster`, `cloud_function`, `app_engine_version`, `cloud_run_revision`, `nat`, `load_balancer_backend_info`, `storage_bucket`, `serverless_neg`. 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: `proxy_connection`, `instance`, `firewall`, `route`, `endpoint`, `google_service`, `forwarding_rule`, `hybrid_subnet`, `vpn_gateway`, `vpn_tunnel`, `interconnect_attachment`, `vpc_connector`, `direct_vpc_egress_connection`, `serverless_external_connection`, `deliver`, `forward`, `abort`, `drop`, `load_balancer`, `network`, `gke_master`, `gke_pod`, `ip_masquerading_skipped`, `gke_network_policy`, `gke_network_policy_skipped`, `cloud_sql_instance`, `redis_instance`, `redis_cluster`, `cloud_function`, `app_engine_version`, `cloud_run_revision`, `nat`, `load_balancer_backend_info`, `storage_bucket`, `serverless_neg`, `ngfw_packet_inspection`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] load_balancer_backend_info # @return [::Google::Cloud::NetworkManagement::V1::LoadBalancerBackendInfo] # Display information of a specific load balancer backend. # - # Note: The following fields are mutually exclusive: `load_balancer_backend_info`, `instance`, `firewall`, `route`, `endpoint`, `google_service`, `forwarding_rule`, `hybrid_subnet`, `vpn_gateway`, `vpn_tunnel`, `interconnect_attachment`, `vpc_connector`, `direct_vpc_egress_connection`, `serverless_external_connection`, `deliver`, `forward`, `abort`, `drop`, `load_balancer`, `network`, `gke_master`, `gke_pod`, `ip_masquerading_skipped`, `cloud_sql_instance`, `redis_instance`, `redis_cluster`, `cloud_function`, `app_engine_version`, `cloud_run_revision`, `nat`, `proxy_connection`, `storage_bucket`, `serverless_neg`. 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: `load_balancer_backend_info`, `instance`, `firewall`, `route`, `endpoint`, `google_service`, `forwarding_rule`, `hybrid_subnet`, `vpn_gateway`, `vpn_tunnel`, `interconnect_attachment`, `vpc_connector`, `direct_vpc_egress_connection`, `serverless_external_connection`, `deliver`, `forward`, `abort`, `drop`, `load_balancer`, `network`, `gke_master`, `gke_pod`, `ip_masquerading_skipped`, `gke_network_policy`, `gke_network_policy_skipped`, `cloud_sql_instance`, `redis_instance`, `redis_cluster`, `cloud_function`, `app_engine_version`, `cloud_run_revision`, `nat`, `proxy_connection`, `storage_bucket`, `serverless_neg`, `ngfw_packet_inspection`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] storage_bucket # @return [::Google::Cloud::NetworkManagement::V1::StorageBucketInfo] # Display information of a Storage Bucket. Used only for return traces. # - # Note: The following fields are mutually exclusive: `storage_bucket`, `instance`, `firewall`, `route`, `endpoint`, `google_service`, `forwarding_rule`, `hybrid_subnet`, `vpn_gateway`, `vpn_tunnel`, `interconnect_attachment`, `vpc_connector`, `direct_vpc_egress_connection`, `serverless_external_connection`, `deliver`, `forward`, `abort`, `drop`, `load_balancer`, `network`, `gke_master`, `gke_pod`, `ip_masquerading_skipped`, `cloud_sql_instance`, `redis_instance`, `redis_cluster`, `cloud_function`, `app_engine_version`, `cloud_run_revision`, `nat`, `proxy_connection`, `load_balancer_backend_info`, `serverless_neg`. 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: `storage_bucket`, `instance`, `firewall`, `route`, `endpoint`, `google_service`, `forwarding_rule`, `hybrid_subnet`, `vpn_gateway`, `vpn_tunnel`, `interconnect_attachment`, `vpc_connector`, `direct_vpc_egress_connection`, `serverless_external_connection`, `deliver`, `forward`, `abort`, `drop`, `load_balancer`, `network`, `gke_master`, `gke_pod`, `ip_masquerading_skipped`, `gke_network_policy`, `gke_network_policy_skipped`, `cloud_sql_instance`, `redis_instance`, `redis_cluster`, `cloud_function`, `app_engine_version`, `cloud_run_revision`, `nat`, `proxy_connection`, `load_balancer_backend_info`, `serverless_neg`, `ngfw_packet_inspection`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] serverless_neg # @return [::Google::Cloud::NetworkManagement::V1::ServerlessNegInfo] # Display information of a Serverless network endpoint group backend. Used # only for return traces. # - # Note: The following fields are mutually exclusive: `serverless_neg`, `instance`, `firewall`, `route`, `endpoint`, `google_service`, `forwarding_rule`, `hybrid_subnet`, `vpn_gateway`, `vpn_tunnel`, `interconnect_attachment`, `vpc_connector`, `direct_vpc_egress_connection`, `serverless_external_connection`, `deliver`, `forward`, `abort`, `drop`, `load_balancer`, `network`, `gke_master`, `gke_pod`, `ip_masquerading_skipped`, `cloud_sql_instance`, `redis_instance`, `redis_cluster`, `cloud_function`, `app_engine_version`, `cloud_run_revision`, `nat`, `proxy_connection`, `load_balancer_backend_info`, `storage_bucket`. 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: `serverless_neg`, `instance`, `firewall`, `route`, `endpoint`, `google_service`, `forwarding_rule`, `hybrid_subnet`, `vpn_gateway`, `vpn_tunnel`, `interconnect_attachment`, `vpc_connector`, `direct_vpc_egress_connection`, `serverless_external_connection`, `deliver`, `forward`, `abort`, `drop`, `load_balancer`, `network`, `gke_master`, `gke_pod`, `ip_masquerading_skipped`, `gke_network_policy`, `gke_network_policy_skipped`, `cloud_sql_instance`, `redis_instance`, `redis_cluster`, `cloud_function`, `app_engine_version`, `cloud_run_revision`, `nat`, `proxy_connection`, `load_balancer_backend_info`, `storage_bucket`, `ngfw_packet_inspection`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] ngfw_packet_inspection + # @return [::Google::Cloud::NetworkManagement::V1::NgfwPacketInspectionInfo] + # Display information of a layer 7 packet inspection by the firewall. + # + # Note: The following fields are mutually exclusive: `ngfw_packet_inspection`, `instance`, `firewall`, `route`, `endpoint`, `google_service`, `forwarding_rule`, `hybrid_subnet`, `vpn_gateway`, `vpn_tunnel`, `interconnect_attachment`, `vpc_connector`, `direct_vpc_egress_connection`, `serverless_external_connection`, `deliver`, `forward`, `abort`, `drop`, `load_balancer`, `network`, `gke_master`, `gke_pod`, `ip_masquerading_skipped`, `gke_network_policy`, `gke_network_policy_skipped`, `cloud_sql_instance`, `redis_instance`, `redis_cluster`, `cloud_function`, `app_engine_version`, `cloud_run_revision`, `nat`, `proxy_connection`, `load_balancer_backend_info`, `storage_bucket`, `serverless_neg`. If a field in that set is populated, all other fields in the set will automatically be cleared. class Step include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -360,6 +376,9 @@ module State # Forwarding state: arriving at a VPC connector. ARRIVE_AT_VPC_CONNECTOR = 24 + # Forwarding state: arriving at a GKE Pod. + ARRIVE_AT_GKE_POD = 44 + # Forwarding state: for packets originating from a serverless endpoint # forwarded through Direct VPC egress. DIRECT_VPC_EGRESS_CONNECTION = 35 @@ -368,6 +387,10 @@ module State # forwarded through public (external) connectivity. SERVERLESS_EXTERNAL_CONNECTION = 36 + # Forwarding state: Layer 7 packet inspection by the firewall endpoint + # based on the configured security profile group. + NGFW_PACKET_INSPECTION = 47 + # Transition state: packet header translated. The `nat` field is populated # with the translation information. NAT = 14 @@ -376,6 +399,20 @@ module State # `ip_masquerading_skipped` field is populated with the reason. SKIP_GKE_POD_IP_MASQUERADING = 40 + # Transition state: GKE Ingress Network Policy is skipped. The + # `gke_network_policy_skipped` field is populated with the reason. + SKIP_GKE_INGRESS_NETWORK_POLICY = 41 + + # Transition state: GKE Egress Network Policy is skipped. The + # `gke_network_policy_skipped` field is populated with the reason. + SKIP_GKE_EGRESS_NETWORK_POLICY = 42 + + # Config checking state: verify ingress GKE network policy. + APPLY_INGRESS_GKE_NETWORK_POLICY = 45 + + # Config checking state: verify egress GKE network policy. + APPLY_EGRESS_GKE_NETWORK_POLICY = 46 + # Transition state: original connection is terminated and a new proxied # connection is initiated. PROXY_CONNECTION = 15 @@ -1962,6 +1999,13 @@ module Cause # Packet is dropped because no matching route was found in the hybrid # subnet. HYBRID_SUBNET_NO_ROUTE = 106 + + # Packet is dropped by GKE Network Policy. + GKE_NETWORK_POLICY = 108 + + # Packet is dropped because there is no valid matching route from the + # network of the Google-managed service to the destination. + NO_VALID_ROUTE_FROM_GOOGLE_MANAGED_NETWORK_TO_DESTINATION = 110 end end @@ -2054,6 +2098,63 @@ module Reason end end + # For display only. Metadata associated with a GKE Network Policy. + # @!attribute [rw] display_name + # @return [::String] + # The name of the Network Policy. + # @!attribute [rw] uri + # @return [::String] + # The URI of the Network Policy. + # Format for a Network Policy in a zonal cluster: + # `projects//zones//clusters//k8s/namespaces//networking.k8s.io/networkpolicies/` + # Format for a Network Policy in a regional cluster: + # `projects//locations//clusters//k8s/namespaces//networking.k8s.io/networkpolicies/` + # @!attribute [rw] direction + # @return [::String] + # Possible values: INGRESS, EGRESS + # @!attribute [rw] action + # @return [::String] + # Possible values: ALLOW, DENY + class GkeNetworkPolicyInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # For display only. Contains information about why GKE Network Policy + # evaluation was skipped. + # @!attribute [rw] reason + # @return [::Google::Cloud::NetworkManagement::V1::GkeNetworkPolicySkippedInfo::Reason] + # Reason why Network Policy evaluation was skipped. + class GkeNetworkPolicySkippedInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + module Reason + # Unused default value. + REASON_UNSPECIFIED = 0 + + # Network Policy is disabled on the cluster. + NETWORK_POLICY_DISABLED = 1 + + # Ingress traffic to a Pod from a source on the same Node is always + # allowed. + INGRESS_SOURCE_ON_SAME_NODE = 2 + + # Egress traffic from a Pod that uses the Node's network namespace is not + # subject to Network Policy. + EGRESS_FROM_NODE_NETWORK_NAMESPACE_POD = 3 + + # Network Policy is not applied to response traffic. This is because GKE + # Network Policy evaluation is stateful in both GKE Dataplane V2 (eBPF) and + # legacy (iptables) implementations. + NETWORK_POLICY_NOT_APPLIED_TO_RESPONSE_TRAFFIC = 4 + + # Network Policy evaluation is currently not supported for clusters with + # FQDN Network Policies enabled. + NETWORK_POLICY_ANALYSIS_UNSUPPORTED = 100 + end + end + # For display only. Metadata associated with a Cloud SQL instance. # @!attribute [rw] display_name # @return [::String] @@ -2454,6 +2555,17 @@ class ServerlessNegInfo extend ::Google::Protobuf::MessageExts::ClassMethods end + # For display only. Metadata associated with a layer 7 packet inspection by the + # firewall. + # @!attribute [rw] security_profile_group_uri + # @return [::String] + # URI of the security profile group associated with this firewall packet + # inspection. + class NgfwPacketInspectionInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + # Type of a load balancer. For more information, see [Summary of Google Cloud # load # balancers](https://cloud.google.com/load-balancing/docs/load-balancing-overview#summary-of-google-cloud-load-balancers). diff --git a/owl-bot-staging/google-cloud-network_management-v1/.gitignore b/owl-bot-staging/google-cloud-network_management-v1/.gitignore deleted file mode 100644 index 0135b6bc6cfc..000000000000 --- a/owl-bot-staging/google-cloud-network_management-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-network_management-v1/.repo-metadata.json b/owl-bot-staging/google-cloud-network_management-v1/.repo-metadata.json deleted file mode 100644 index e77f1d9cf88e..000000000000 --- a/owl-bot-staging/google-cloud-network_management-v1/.repo-metadata.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "api_id": "networkmanagement.googleapis.com", - "api_shortname": "networkmanagement", - "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-network_management-v1/latest", - "distribution_name": "google-cloud-network_management-v1", - "is_cloud": true, - "language": "ruby", - "name": "networkmanagement", - "name_pretty": "Network Management V1 API", - "product_documentation": "https://cloud.google.com/network-intelligence-center/docs/connectivity-tests/reference/networkmanagement/rest", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "The Network Management API provides a collection of network performance monitoring and diagnostic capabilities. Note that google-cloud-network_management-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-network_management instead. See the readme for more details.", - "ruby-cloud-product-url": "https://cloud.google.com/network-intelligence-center/docs/connectivity-tests/reference/networkmanagement/rest", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-cloud-network_management-v1/.rubocop.yml b/owl-bot-staging/google-cloud-network_management-v1/.rubocop.yml deleted file mode 100644 index d9210d1d63c6..000000000000 --- a/owl-bot-staging/google-cloud-network_management-v1/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-cloud-network_management-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-network_management-v1.rb" diff --git a/owl-bot-staging/google-cloud-network_management-v1/.toys.rb b/owl-bot-staging/google-cloud-network_management-v1/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-cloud-network_management-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-network_management-v1/.yardopts b/owl-bot-staging/google-cloud-network_management-v1/.yardopts deleted file mode 100644 index f79479aa57af..000000000000 --- a/owl-bot-staging/google-cloud-network_management-v1/.yardopts +++ /dev/null @@ -1,12 +0,0 @@ ---no-private ---title="Network Management 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-network_management-v1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-network_management-v1/AUTHENTICATION.md deleted file mode 100644 index df8ce97a88d6..000000000000 --- a/owl-bot-staging/google-cloud-network_management-v1/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-cloud-network_management-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-network_management-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/network_management/v1" - -client = ::Google::Cloud::NetworkManagement::V1::ReachabilityService::Client.new do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/cloud/network_management/v1" - -::Google::Cloud::NetworkManagement::V1::ReachabilityService::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Cloud::NetworkManagement::V1::ReachabilityService::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-network_management-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/network_management/v1" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Cloud::NetworkManagement::V1::ReachabilityService::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-network_management-v1/CHANGELOG.md b/owl-bot-staging/google-cloud-network_management-v1/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-cloud-network_management-v1/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-cloud-network_management-v1/Gemfile b/owl-bot-staging/google-cloud-network_management-v1/Gemfile deleted file mode 100644 index 6442df18fa2f..000000000000 --- a/owl-bot-staging/google-cloud-network_management-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-network_management-v1/LICENSE.md b/owl-bot-staging/google-cloud-network_management-v1/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-cloud-network_management-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-network_management-v1/README.md b/owl-bot-staging/google-cloud-network_management-v1/README.md deleted file mode 100644 index 0d5e68b51b8d..000000000000 --- a/owl-bot-staging/google-cloud-network_management-v1/README.md +++ /dev/null @@ -1,153 +0,0 @@ -# Ruby Client for the Network Management V1 API - -The Network Management API provides a collection of network performance monitoring and diagnostic capabilities. - - -https://github.com/googleapis/google-cloud-ruby - -This gem is a _versioned_ client. It provides basic client classes for a -specific version of the Network Management V1 API. Most users should consider using -the main client gem, -[google-cloud-network_management](https://rubygems.org/gems/google-cloud-network_management). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-cloud-network_management-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/networkmanagement.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -## Quick Start - -```ruby -require "google/cloud/network_management/v1" - -client = ::Google::Cloud::NetworkManagement::V1::ReachabilityService::Client.new -request = ::Google::Cloud::NetworkManagement::V1::ListConnectivityTestsRequest.new # (request fields as keyword arguments...) -response = client.list_connectivity_tests request -``` - -View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-network_management-v1/latest) -for class and method documentation. - -See also the [Product Documentation](https://cloud.google.com/network-intelligence-center/docs/connectivity-tests/reference/networkmanagement/rest) -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/network_management/v1" -require "logger" - -client = ::Google::Cloud::NetworkManagement::V1::ReachabilityService::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-network_management`, -and lower-level _versioned_ client libraries with names such as -`google-cloud-network_management-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-network_management`. -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-network_management-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-network_management-v1/Rakefile b/owl-bot-staging/google-cloud-network_management-v1/Rakefile deleted file mode 100644 index f6e41fc4e5a1..000000000000 --- a/owl-bot-staging/google-cloud-network_management-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-network_management-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/network_management/v1/reachability_service/credentials" - ::Google::Cloud::NetworkManagement::V1::ReachabilityService::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-network_management-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-network_management-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-network_management-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-network_management-v1 gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-cloud-network_management-v1" - header "google-cloud-network_management-v1 rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-cloud-network_management-v1 yard", "*" - Rake::Task[:yard].invoke - header "google-cloud-network_management-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-network_management-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-network_management-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-network_management-v1/gapic_metadata.json b/owl-bot-staging/google-cloud-network_management-v1/gapic_metadata.json deleted file mode 100644 index 47dcb121adc7..000000000000 --- a/owl-bot-staging/google-cloud-network_management-v1/gapic_metadata.json +++ /dev/null @@ -1,126 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "ruby", - "protoPackage": "google.cloud.networkmanagement.v1", - "libraryPackage": "::Google::Cloud::NetworkManagement::V1", - "services": { - "ReachabilityService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::NetworkManagement::V1::ReachabilityService::Client", - "rpcs": { - "ListConnectivityTests": { - "methods": [ - "list_connectivity_tests" - ] - }, - "GetConnectivityTest": { - "methods": [ - "get_connectivity_test" - ] - }, - "CreateConnectivityTest": { - "methods": [ - "create_connectivity_test" - ] - }, - "UpdateConnectivityTest": { - "methods": [ - "update_connectivity_test" - ] - }, - "RerunConnectivityTest": { - "methods": [ - "rerun_connectivity_test" - ] - }, - "DeleteConnectivityTest": { - "methods": [ - "delete_connectivity_test" - ] - } - } - } - } - }, - "VpcFlowLogsService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::NetworkManagement::V1::VpcFlowLogsService::Client", - "rpcs": { - "ListVpcFlowLogsConfigs": { - "methods": [ - "list_vpc_flow_logs_configs" - ] - }, - "GetVpcFlowLogsConfig": { - "methods": [ - "get_vpc_flow_logs_config" - ] - }, - "CreateVpcFlowLogsConfig": { - "methods": [ - "create_vpc_flow_logs_config" - ] - }, - "UpdateVpcFlowLogsConfig": { - "methods": [ - "update_vpc_flow_logs_config" - ] - }, - "DeleteVpcFlowLogsConfig": { - "methods": [ - "delete_vpc_flow_logs_config" - ] - }, - "QueryOrgVpcFlowLogsConfigs": { - "methods": [ - "query_org_vpc_flow_logs_configs" - ] - }, - "ShowEffectiveFlowLogsConfigs": { - "methods": [ - "show_effective_flow_logs_configs" - ] - } - } - } - } - }, - "OrganizationVpcFlowLogsService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::NetworkManagement::V1::OrganizationVpcFlowLogsService::Client", - "rpcs": { - "ListVpcFlowLogsConfigs": { - "methods": [ - "list_vpc_flow_logs_configs" - ] - }, - "GetVpcFlowLogsConfig": { - "methods": [ - "get_vpc_flow_logs_config" - ] - }, - "CreateVpcFlowLogsConfig": { - "methods": [ - "create_vpc_flow_logs_config" - ] - }, - "UpdateVpcFlowLogsConfig": { - "methods": [ - "update_vpc_flow_logs_config" - ] - }, - "DeleteVpcFlowLogsConfig": { - "methods": [ - "delete_vpc_flow_logs_config" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-network_management-v1/google-cloud-network_management-v1.gemspec b/owl-bot-staging/google-cloud-network_management-v1/google-cloud-network_management-v1.gemspec deleted file mode 100644 index dc189a3bd4d3..000000000000 --- a/owl-bot-staging/google-cloud-network_management-v1/google-cloud-network_management-v1.gemspec +++ /dev/null @@ -1,30 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/cloud/network_management/v1/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-cloud-network_management-v1" - gem.version = Google::Cloud::NetworkManagement::V1::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "The Network Management API provides a collection of network performance monitoring and diagnostic capabilities. Note that google-cloud-network_management-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-network_management instead. See the readme for more details." - gem.summary = "The Network Management API provides a collection of network performance monitoring and diagnostic capabilities." - 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" - gem.add_dependency "google-iam-v1", "~> 1.3" -end diff --git a/owl-bot-staging/google-cloud-network_management-v1/lib/google-cloud-network_management-v1.rb b/owl-bot-staging/google-cloud-network_management-v1/lib/google-cloud-network_management-v1.rb deleted file mode 100644 index fc0e794a1e58..000000000000 --- a/owl-bot-staging/google-cloud-network_management-v1/lib/google-cloud-network_management-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/network_management/v1" diff --git a/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1.rb b/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1.rb deleted file mode 100644 index 0a43718af857..000000000000 --- a/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1.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 "google/cloud/network_management/v1/reachability_service" -require "google/cloud/network_management/v1/vpc_flow_logs_service" -require "google/cloud/network_management/v1/organization_vpc_flow_logs_service" -require "google/cloud/network_management/v1/version" - -module Google - module Cloud - module NetworkManagement - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/cloud/network_management/v1" - # client = ::Google::Cloud::NetworkManagement::V1::ReachabilityService::Client.new - # - # @example Load this package, including all its services, and instantiate a REST client - # - # require "google/cloud/network_management/v1" - # client = ::Google::Cloud::NetworkManagement::V1::ReachabilityService::Rest::Client.new - # - module V1 - end - end - end -end - -helper_path = ::File.join __dir__, "v1", "_helpers.rb" -require "google/cloud/network_management/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/bindings_override.rb b/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/bindings_override.rb deleted file mode 100644 index 80b6802699fa..000000000000 --- a/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/bindings_override.rb +++ /dev/null @@ -1,124 +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 NetworkManagement - ## - # @example Loading just the REST part of this package, including all its services, and instantiating a REST client - # - # require "google/cloud/network_management/v1/rest" - # client = ::Google::Cloud::NetworkManagement::V1::ReachabilityService::Rest::Client.new - # - module V1 - ## - # @private - # Initialize the mixin bindings configuration - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "NetworkManagement"] - 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 - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/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 - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :get, - uri_template: "/v1/{name}/locations", - matches: [ - ["name", %r{^organizations/[^/]+/?$}, false] - ], - body: nil - ) - ] - default_config.bindings_override["google.iam.v1.IAMPolicy.GetIamPolicy"] = [ - - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :get, - uri_template: "/v1/{resource}:getIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/global/connectivityTests/[^/]+/?$}, false] - ], - body: nil - ) - ] - default_config.bindings_override["google.iam.v1.IAMPolicy.SetIamPolicy"] = [ - - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:setIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/global/connectivityTests/[^/]+/?$}, false] - ], - body: "*" - ) - ] - default_config.bindings_override["google.iam.v1.IAMPolicy.TestIamPermissions"] = [ - - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:testIamPermissions", - matches: [ - ["resource", %r{^projects/[^/]+/locations/global/connectivityTests/[^/]+/?$}, false] - ], - body: "*" - ) - ] - default_config - end - yield @configure if block_given? - @configure - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/organization_vpc_flow_logs_service.rb b/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/organization_vpc_flow_logs_service.rb deleted file mode 100644 index 6686a8eb90ba..000000000000 --- a/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/organization_vpc_flow_logs_service.rb +++ /dev/null @@ -1,59 +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/network_management/v1/version" - -require "google/cloud/network_management/v1/organization_vpc_flow_logs_service/credentials" -require "google/cloud/network_management/v1/organization_vpc_flow_logs_service/paths" -require "google/cloud/network_management/v1/organization_vpc_flow_logs_service/operations" -require "google/cloud/network_management/v1/organization_vpc_flow_logs_service/client" -require "google/cloud/network_management/v1/organization_vpc_flow_logs_service/rest" - -module Google - module Cloud - module NetworkManagement - module V1 - ## - # The VPC Flow Logs organization service in the Google Cloud Network Management - # API provides organization level configurations that generate Flow Logs. The - # service and the configuration resources created using this service are - # global. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/network_management/v1/organization_vpc_flow_logs_service" - # client = ::Google::Cloud::NetworkManagement::V1::OrganizationVpcFlowLogsService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/cloud/network_management/v1/organization_vpc_flow_logs_service/rest" - # client = ::Google::Cloud::NetworkManagement::V1::OrganizationVpcFlowLogsService::Rest::Client.new - # - module OrganizationVpcFlowLogsService - end - end - end - end -end - -helper_path = ::File.join __dir__, "organization_vpc_flow_logs_service", "helpers.rb" -require "google/cloud/network_management/v1/organization_vpc_flow_logs_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/organization_vpc_flow_logs_service/client.rb b/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/organization_vpc_flow_logs_service/client.rb deleted file mode 100644 index 05e9b74f6152..000000000000 --- a/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/organization_vpc_flow_logs_service/client.rb +++ /dev/null @@ -1,1002 +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/networkmanagement/v1/vpc_flow_logs_pb" -require "google/cloud/location" -require "google/iam/v1" - -module Google - module Cloud - module NetworkManagement - module V1 - module OrganizationVpcFlowLogsService - ## - # Client for the OrganizationVpcFlowLogsService service. - # - # The VPC Flow Logs organization service in the Google Cloud Network Management - # API provides organization level configurations that generate Flow Logs. The - # service and the configuration resources created using this service are - # global. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "networkmanagement.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :organization_vpc_flow_logs_service_stub - - ## - # Configure the OrganizationVpcFlowLogsService Client class. - # - # See {::Google::Cloud::NetworkManagement::V1::OrganizationVpcFlowLogsService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all OrganizationVpcFlowLogsService clients - # ::Google::Cloud::NetworkManagement::V1::OrganizationVpcFlowLogsService::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", "NetworkManagement", "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 OrganizationVpcFlowLogsService 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::NetworkManagement::V1::OrganizationVpcFlowLogsService::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 - @organization_vpc_flow_logs_service_stub.universe_domain - end - - ## - # Create a new OrganizationVpcFlowLogsService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::NetworkManagement::V1::OrganizationVpcFlowLogsService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::NetworkManagement::V1::OrganizationVpcFlowLogsService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the OrganizationVpcFlowLogsService 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/networkmanagement/v1/vpc_flow_logs_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 - - @organization_vpc_flow_logs_service_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::NetworkManagement::V1::OrganizationVpcFlowLogsService::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 - ) - - @organization_vpc_flow_logs_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 = @organization_vpc_flow_logs_service_stub.endpoint - config.universe_domain = @organization_vpc_flow_logs_service_stub.universe_domain - config.logger = @organization_vpc_flow_logs_service_stub.logger if config.respond_to? :logger= - end - - @iam_policy_client = Google::Iam::V1::IAMPolicy::Client.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @organization_vpc_flow_logs_service_stub.endpoint - config.universe_domain = @organization_vpc_flow_logs_service_stub.universe_domain - config.logger = @organization_vpc_flow_logs_service_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::NetworkManagement::V1::OrganizationVpcFlowLogsService::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 - - ## - # Get the associated client for mix-in of the IAMPolicy. - # - # @return [Google::Iam::V1::IAMPolicy::Client] - # - attr_reader :iam_policy_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @organization_vpc_flow_logs_service_stub.logger - end - - # Service calls - - ## - # Lists all `VpcFlowLogsConfigs` in a given organization. - # - # @overload list_vpc_flow_logs_configs(request, options = nil) - # Pass arguments to `list_vpc_flow_logs_configs` via a request object, either of type - # {::Google::Cloud::NetworkManagement::V1::ListVpcFlowLogsConfigsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkManagement::V1::ListVpcFlowLogsConfigsRequest, ::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_vpc_flow_logs_configs(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_vpc_flow_logs_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. The parent resource of the VpcFlowLogsConfig, - # in one of the following formats: - # - # - For project-level resources: `projects/{project_id}/locations/global` - # - # - For organization-level resources: - # `organizations/{organization_id}/locations/global` - # @param page_size [::Integer] - # Optional. Number of `VpcFlowLogsConfigs` to return. - # @param page_token [::String] - # Optional. Page token from an earlier query, as returned in - # `next_page_token`. - # @param filter [::String] - # Optional. Lists the `VpcFlowLogsConfigs` that match the filter expression. - # A filter expression must use the supported [CEL logic operators] - # (https://cloud.google.com/vpc/docs/about-flow-logs-records#supported_cel_logic_operators). - # @param order_by [::String] - # Optional. Field to use to sort the list. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::NetworkManagement::V1::VpcFlowLogsConfig>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::NetworkManagement::V1::VpcFlowLogsConfig>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/network_management/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkManagement::V1::OrganizationVpcFlowLogsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkManagement::V1::ListVpcFlowLogsConfigsRequest.new - # - # # Call the list_vpc_flow_logs_configs method. - # result = client.list_vpc_flow_logs_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::NetworkManagement::V1::VpcFlowLogsConfig. - # p item - # end - # - def list_vpc_flow_logs_configs request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkManagement::V1::ListVpcFlowLogsConfigsRequest - - # 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_vpc_flow_logs_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::NetworkManagement::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_vpc_flow_logs_configs.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_vpc_flow_logs_configs.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @organization_vpc_flow_logs_service_stub.call_rpc :list_vpc_flow_logs_configs, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @organization_vpc_flow_logs_service_stub, :list_vpc_flow_logs_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 - - ## - # Gets the details of a specific `VpcFlowLogsConfig`. - # - # @overload get_vpc_flow_logs_config(request, options = nil) - # Pass arguments to `get_vpc_flow_logs_config` via a request object, either of type - # {::Google::Cloud::NetworkManagement::V1::GetVpcFlowLogsConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkManagement::V1::GetVpcFlowLogsConfigRequest, ::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_vpc_flow_logs_config(name: nil) - # Pass arguments to `get_vpc_flow_logs_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. The resource name of the VpcFlowLogsConfig, - # in one of the following formats: - # - # - For project-level resources: - # `projects/{project_id}/locations/global/vpcFlowLogsConfigs/{vpc_flow_logs_config_id}` - # - # - For organization-level resources: - # `organizations/{organization_id}/locations/global/vpcFlowLogsConfigs/{vpc_flow_logs_config_id}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::NetworkManagement::V1::VpcFlowLogsConfig] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::NetworkManagement::V1::VpcFlowLogsConfig] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/network_management/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkManagement::V1::OrganizationVpcFlowLogsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkManagement::V1::GetVpcFlowLogsConfigRequest.new - # - # # Call the get_vpc_flow_logs_config method. - # result = client.get_vpc_flow_logs_config request - # - # # The returned object is of type Google::Cloud::NetworkManagement::V1::VpcFlowLogsConfig. - # p result - # - def get_vpc_flow_logs_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkManagement::V1::GetVpcFlowLogsConfigRequest - - # 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_vpc_flow_logs_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::NetworkManagement::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_vpc_flow_logs_config.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_vpc_flow_logs_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @organization_vpc_flow_logs_service_stub.call_rpc :get_vpc_flow_logs_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 - - ## - # Creates a new `VpcFlowLogsConfig`. - # If a configuration with the exact same settings already exists (even if the - # ID is different), the creation fails. - # Notes: - # - # 1. Creating a configuration with `state=DISABLED` will fail - # 2. The following fields are not considered as settings for the purpose - # of the check mentioned above, therefore - creating another configuration - # with the same fields but different values for the following fields will - # fail as well: - # * name - # * create_time - # * update_time - # * labels - # * description - # - # @overload create_vpc_flow_logs_config(request, options = nil) - # Pass arguments to `create_vpc_flow_logs_config` via a request object, either of type - # {::Google::Cloud::NetworkManagement::V1::CreateVpcFlowLogsConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkManagement::V1::CreateVpcFlowLogsConfigRequest, ::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_vpc_flow_logs_config(parent: nil, vpc_flow_logs_config_id: nil, vpc_flow_logs_config: nil) - # Pass arguments to `create_vpc_flow_logs_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. The parent resource of the VpcFlowLogsConfig to create, - # in one of the following formats: - # - # - For project-level resources: `projects/{project_id}/locations/global` - # - # - For organization-level resources: - # `organizations/{organization_id}/locations/global` - # @param vpc_flow_logs_config_id [::String] - # Required. ID of the `VpcFlowLogsConfig`. - # @param vpc_flow_logs_config [::Google::Cloud::NetworkManagement::V1::VpcFlowLogsConfig, ::Hash] - # Required. A `VpcFlowLogsConfig` 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/network_management/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkManagement::V1::OrganizationVpcFlowLogsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkManagement::V1::CreateVpcFlowLogsConfigRequest.new - # - # # Call the create_vpc_flow_logs_config method. - # result = client.create_vpc_flow_logs_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_vpc_flow_logs_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkManagement::V1::CreateVpcFlowLogsConfigRequest - - # 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_vpc_flow_logs_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::NetworkManagement::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_vpc_flow_logs_config.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_vpc_flow_logs_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @organization_vpc_flow_logs_service_stub.call_rpc :create_vpc_flow_logs_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 - - ## - # Updates an existing `VpcFlowLogsConfig`. - # If a configuration with the exact same settings already exists (even if the - # ID is different), the creation fails. - # Notes: - # - # 1. Updating a configuration with `state=DISABLED` will fail - # 2. The following fields are not considered as settings for the purpose - # of the check mentioned above, therefore - updating another configuration - # with the same fields but different values for the following fields will - # fail as well: - # * name - # * create_time - # * update_time - # * labels - # * description - # - # @overload update_vpc_flow_logs_config(request, options = nil) - # Pass arguments to `update_vpc_flow_logs_config` via a request object, either of type - # {::Google::Cloud::NetworkManagement::V1::UpdateVpcFlowLogsConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkManagement::V1::UpdateVpcFlowLogsConfigRequest, ::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_vpc_flow_logs_config(update_mask: nil, vpc_flow_logs_config: nil) - # Pass arguments to `update_vpc_flow_logs_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 update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. Mask of fields to update. At least one path must be supplied in - # this field. - # For example, to change the state of the configuration to ENABLED, specify - # `update_mask` = `"state"`, and the `vpc_flow_logs_config` would be: - # `vpc_flow_logs_config = { - # name = - # "projects/my-project/locations/global/vpcFlowLogsConfigs/my-config" - # state = "ENABLED" }` - # @param vpc_flow_logs_config [::Google::Cloud::NetworkManagement::V1::VpcFlowLogsConfig, ::Hash] - # Required. Only fields specified in update_mask are updated. - # - # @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/network_management/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkManagement::V1::OrganizationVpcFlowLogsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkManagement::V1::UpdateVpcFlowLogsConfigRequest.new - # - # # Call the update_vpc_flow_logs_config method. - # result = client.update_vpc_flow_logs_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_vpc_flow_logs_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkManagement::V1::UpdateVpcFlowLogsConfigRequest - - # 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_vpc_flow_logs_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::NetworkManagement::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.vpc_flow_logs_config&.name - header_params["vpc_flow_logs_config.name"] = request.vpc_flow_logs_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_vpc_flow_logs_config.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_vpc_flow_logs_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @organization_vpc_flow_logs_service_stub.call_rpc :update_vpc_flow_logs_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 specific `VpcFlowLogsConfig`. - # - # @overload delete_vpc_flow_logs_config(request, options = nil) - # Pass arguments to `delete_vpc_flow_logs_config` via a request object, either of type - # {::Google::Cloud::NetworkManagement::V1::DeleteVpcFlowLogsConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkManagement::V1::DeleteVpcFlowLogsConfigRequest, ::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_vpc_flow_logs_config(name: nil) - # Pass arguments to `delete_vpc_flow_logs_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. The resource name of the VpcFlowLogsConfig, - # in one of the following formats: - # - # - For a project-level resource: - # `projects/{project_id}/locations/global/vpcFlowLogsConfigs/{vpc_flow_logs_config_id}` - # - # - For an organization-level resource: - # `organizations/{organization_id}/locations/global/vpcFlowLogsConfigs/{vpc_flow_logs_config_id}` - # - # @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/network_management/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkManagement::V1::OrganizationVpcFlowLogsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkManagement::V1::DeleteVpcFlowLogsConfigRequest.new - # - # # Call the delete_vpc_flow_logs_config method. - # result = client.delete_vpc_flow_logs_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_vpc_flow_logs_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkManagement::V1::DeleteVpcFlowLogsConfigRequest - - # 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_vpc_flow_logs_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::NetworkManagement::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_vpc_flow_logs_config.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_vpc_flow_logs_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @organization_vpc_flow_logs_service_stub.call_rpc :delete_vpc_flow_logs_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 - - ## - # Configuration class for the OrganizationVpcFlowLogsService API. - # - # This class represents the configuration for OrganizationVpcFlowLogsService, - # 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::NetworkManagement::V1::OrganizationVpcFlowLogsService::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_vpc_flow_logs_configs to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::NetworkManagement::V1::OrganizationVpcFlowLogsService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_vpc_flow_logs_configs.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::NetworkManagement::V1::OrganizationVpcFlowLogsService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_vpc_flow_logs_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::NetworkManagement::V1::OrganizationVpcFlowLogsService::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 = "networkmanagement.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 OrganizationVpcFlowLogsService 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_vpc_flow_logs_configs` - # @return [::Gapic::Config::Method] - # - attr_reader :list_vpc_flow_logs_configs - ## - # RPC-specific configuration for `get_vpc_flow_logs_config` - # @return [::Gapic::Config::Method] - # - attr_reader :get_vpc_flow_logs_config - ## - # RPC-specific configuration for `create_vpc_flow_logs_config` - # @return [::Gapic::Config::Method] - # - attr_reader :create_vpc_flow_logs_config - ## - # RPC-specific configuration for `update_vpc_flow_logs_config` - # @return [::Gapic::Config::Method] - # - attr_reader :update_vpc_flow_logs_config - ## - # RPC-specific configuration for `delete_vpc_flow_logs_config` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_vpc_flow_logs_config - - # @private - def initialize parent_rpcs = nil - list_vpc_flow_logs_configs_config = parent_rpcs.list_vpc_flow_logs_configs if parent_rpcs.respond_to? :list_vpc_flow_logs_configs - @list_vpc_flow_logs_configs = ::Gapic::Config::Method.new list_vpc_flow_logs_configs_config - get_vpc_flow_logs_config_config = parent_rpcs.get_vpc_flow_logs_config if parent_rpcs.respond_to? :get_vpc_flow_logs_config - @get_vpc_flow_logs_config = ::Gapic::Config::Method.new get_vpc_flow_logs_config_config - create_vpc_flow_logs_config_config = parent_rpcs.create_vpc_flow_logs_config if parent_rpcs.respond_to? :create_vpc_flow_logs_config - @create_vpc_flow_logs_config = ::Gapic::Config::Method.new create_vpc_flow_logs_config_config - update_vpc_flow_logs_config_config = parent_rpcs.update_vpc_flow_logs_config if parent_rpcs.respond_to? :update_vpc_flow_logs_config - @update_vpc_flow_logs_config = ::Gapic::Config::Method.new update_vpc_flow_logs_config_config - delete_vpc_flow_logs_config_config = parent_rpcs.delete_vpc_flow_logs_config if parent_rpcs.respond_to? :delete_vpc_flow_logs_config - @delete_vpc_flow_logs_config = ::Gapic::Config::Method.new delete_vpc_flow_logs_config_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/organization_vpc_flow_logs_service/credentials.rb b/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/organization_vpc_flow_logs_service/credentials.rb deleted file mode 100644 index 7c78a19679d1..000000000000 --- a/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/organization_vpc_flow_logs_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 NetworkManagement - module V1 - module OrganizationVpcFlowLogsService - # Credentials for the OrganizationVpcFlowLogsService 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-network_management-v1/lib/google/cloud/network_management/v1/organization_vpc_flow_logs_service/operations.rb b/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/organization_vpc_flow_logs_service/operations.rb deleted file mode 100644 index f24a717b9035..000000000000 --- a/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/organization_vpc_flow_logs_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 NetworkManagement - module V1 - module OrganizationVpcFlowLogsService - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "networkmanagement.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the OrganizationVpcFlowLogsService 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 OrganizationVpcFlowLogsService 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::NetworkManagement::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::NetworkManagement::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::NetworkManagement::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::NetworkManagement::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::NetworkManagement::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 = "networkmanagement.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-network_management-v1/lib/google/cloud/network_management/v1/organization_vpc_flow_logs_service/paths.rb b/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/organization_vpc_flow_logs_service/paths.rb deleted file mode 100644 index ec6736715647..000000000000 --- a/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/organization_vpc_flow_logs_service/paths.rb +++ /dev/null @@ -1,110 +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 NetworkManagement - module V1 - module OrganizationVpcFlowLogsService - # Path helper methods for the OrganizationVpcFlowLogsService API. - module Paths - ## - # 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 OrganizationLocation resource string. - # - # The resource will be in the following format: - # - # `organizations/{organization}/locations/{location}` - # - # @param organization [String] - # @param location [String] - # - # @return [::String] - def organization_location_path organization:, location: - raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" - - "organizations/#{organization}/locations/#{location}" - end - - ## - # Create a fully-qualified VpcFlowLogsConfig resource string. - # - # @overload vpc_flow_logs_config_path(project:, location:, vpc_flow_logs_config:) - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/vpcFlowLogsConfigs/{vpc_flow_logs_config}` - # - # @param project [String] - # @param location [String] - # @param vpc_flow_logs_config [String] - # - # @overload vpc_flow_logs_config_path(organization:, location:, vpc_flow_logs_config:) - # The resource will be in the following format: - # - # `organizations/{organization}/locations/{location}/vpcFlowLogsConfigs/{vpc_flow_logs_config}` - # - # @param organization [String] - # @param location [String] - # @param vpc_flow_logs_config [String] - # - # @return [::String] - def vpc_flow_logs_config_path **args - resources = { - "location:project:vpc_flow_logs_config" => (proc do |project:, location:, vpc_flow_logs_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}/vpcFlowLogsConfigs/#{vpc_flow_logs_config}" - end), - "location:organization:vpc_flow_logs_config" => (proc do |organization:, location:, vpc_flow_logs_config:| - raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "organizations/#{organization}/locations/#{location}/vpcFlowLogsConfigs/#{vpc_flow_logs_config}" - end) - } - - resource = resources[args.keys.sort.join(":")] - raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? - resource.call(**args) - end - - extend self - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/organization_vpc_flow_logs_service/rest.rb b/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/organization_vpc_flow_logs_service/rest.rb deleted file mode 100644 index 443afce82eb8..000000000000 --- a/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/organization_vpc_flow_logs_service/rest.rb +++ /dev/null @@ -1,57 +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/network_management/v1/version" -require "google/cloud/network_management/v1/bindings_override" - -require "google/cloud/network_management/v1/organization_vpc_flow_logs_service/credentials" -require "google/cloud/network_management/v1/organization_vpc_flow_logs_service/paths" -require "google/cloud/network_management/v1/organization_vpc_flow_logs_service/rest/operations" -require "google/cloud/network_management/v1/organization_vpc_flow_logs_service/rest/client" - -module Google - module Cloud - module NetworkManagement - module V1 - ## - # The VPC Flow Logs organization service in the Google Cloud Network Management - # API provides organization level configurations that generate Flow Logs. The - # service and the configuration resources created using this service are - # global. - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/network_management/v1/organization_vpc_flow_logs_service/rest" - # client = ::Google::Cloud::NetworkManagement::V1::OrganizationVpcFlowLogsService::Rest::Client.new - # - module OrganizationVpcFlowLogsService - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/network_management/v1/organization_vpc_flow_logs_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/organization_vpc_flow_logs_service/rest/client.rb b/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/organization_vpc_flow_logs_service/rest/client.rb deleted file mode 100644 index e6dad09ba975..000000000000 --- a/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/organization_vpc_flow_logs_service/rest/client.rb +++ /dev/null @@ -1,933 +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/networkmanagement/v1/vpc_flow_logs_pb" -require "google/cloud/network_management/v1/organization_vpc_flow_logs_service/rest/service_stub" -require "google/cloud/location/rest" -require "google/iam/v1/rest" - -module Google - module Cloud - module NetworkManagement - module V1 - module OrganizationVpcFlowLogsService - module Rest - ## - # REST client for the OrganizationVpcFlowLogsService service. - # - # The VPC Flow Logs organization service in the Google Cloud Network Management - # API provides organization level configurations that generate Flow Logs. The - # service and the configuration resources created using this service are - # global. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "networkmanagement.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :organization_vpc_flow_logs_service_stub - - ## - # Configure the OrganizationVpcFlowLogsService Client class. - # - # See {::Google::Cloud::NetworkManagement::V1::OrganizationVpcFlowLogsService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all OrganizationVpcFlowLogsService clients - # ::Google::Cloud::NetworkManagement::V1::OrganizationVpcFlowLogsService::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", "NetworkManagement", "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 OrganizationVpcFlowLogsService 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::NetworkManagement::V1::OrganizationVpcFlowLogsService::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 - @organization_vpc_flow_logs_service_stub.universe_domain - end - - ## - # Create a new OrganizationVpcFlowLogsService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::NetworkManagement::V1::OrganizationVpcFlowLogsService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::NetworkManagement::V1::OrganizationVpcFlowLogsService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the OrganizationVpcFlowLogsService 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::NetworkManagement::V1::OrganizationVpcFlowLogsService::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 - - @organization_vpc_flow_logs_service_stub = ::Google::Cloud::NetworkManagement::V1::OrganizationVpcFlowLogsService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @organization_vpc_flow_logs_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 = @organization_vpc_flow_logs_service_stub.endpoint - config.universe_domain = @organization_vpc_flow_logs_service_stub.universe_domain - config.bindings_override = @config.bindings_override - config.logger = @organization_vpc_flow_logs_service_stub.logger if config.respond_to? :logger= - end - - @iam_policy_client = Google::Iam::V1::IAMPolicy::Rest::Client.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @organization_vpc_flow_logs_service_stub.endpoint - config.universe_domain = @organization_vpc_flow_logs_service_stub.universe_domain - config.bindings_override = @config.bindings_override - config.logger = @organization_vpc_flow_logs_service_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::NetworkManagement::V1::OrganizationVpcFlowLogsService::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 - - ## - # Get the associated client for mix-in of the IAMPolicy. - # - # @return [Google::Iam::V1::IAMPolicy::Rest::Client] - # - attr_reader :iam_policy_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @organization_vpc_flow_logs_service_stub.logger - end - - # Service calls - - ## - # Lists all `VpcFlowLogsConfigs` in a given organization. - # - # @overload list_vpc_flow_logs_configs(request, options = nil) - # Pass arguments to `list_vpc_flow_logs_configs` via a request object, either of type - # {::Google::Cloud::NetworkManagement::V1::ListVpcFlowLogsConfigsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkManagement::V1::ListVpcFlowLogsConfigsRequest, ::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_vpc_flow_logs_configs(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_vpc_flow_logs_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. The parent resource of the VpcFlowLogsConfig, - # in one of the following formats: - # - # - For project-level resources: `projects/{project_id}/locations/global` - # - # - For organization-level resources: - # `organizations/{organization_id}/locations/global` - # @param page_size [::Integer] - # Optional. Number of `VpcFlowLogsConfigs` to return. - # @param page_token [::String] - # Optional. Page token from an earlier query, as returned in - # `next_page_token`. - # @param filter [::String] - # Optional. Lists the `VpcFlowLogsConfigs` that match the filter expression. - # A filter expression must use the supported [CEL logic operators] - # (https://cloud.google.com/vpc/docs/about-flow-logs-records#supported_cel_logic_operators). - # @param order_by [::String] - # Optional. Field to use to sort the list. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkManagement::V1::VpcFlowLogsConfig>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkManagement::V1::VpcFlowLogsConfig>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/network_management/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkManagement::V1::OrganizationVpcFlowLogsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkManagement::V1::ListVpcFlowLogsConfigsRequest.new - # - # # Call the list_vpc_flow_logs_configs method. - # result = client.list_vpc_flow_logs_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::NetworkManagement::V1::VpcFlowLogsConfig. - # p item - # end - # - def list_vpc_flow_logs_configs request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkManagement::V1::ListVpcFlowLogsConfigsRequest - - # 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_vpc_flow_logs_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::NetworkManagement::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_vpc_flow_logs_configs.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_vpc_flow_logs_configs.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @organization_vpc_flow_logs_service_stub.list_vpc_flow_logs_configs request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @organization_vpc_flow_logs_service_stub, :list_vpc_flow_logs_configs, "vpc_flow_logs_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 - - ## - # Gets the details of a specific `VpcFlowLogsConfig`. - # - # @overload get_vpc_flow_logs_config(request, options = nil) - # Pass arguments to `get_vpc_flow_logs_config` via a request object, either of type - # {::Google::Cloud::NetworkManagement::V1::GetVpcFlowLogsConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkManagement::V1::GetVpcFlowLogsConfigRequest, ::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_vpc_flow_logs_config(name: nil) - # Pass arguments to `get_vpc_flow_logs_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. The resource name of the VpcFlowLogsConfig, - # in one of the following formats: - # - # - For project-level resources: - # `projects/{project_id}/locations/global/vpcFlowLogsConfigs/{vpc_flow_logs_config_id}` - # - # - For organization-level resources: - # `organizations/{organization_id}/locations/global/vpcFlowLogsConfigs/{vpc_flow_logs_config_id}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::NetworkManagement::V1::VpcFlowLogsConfig] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::NetworkManagement::V1::VpcFlowLogsConfig] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/network_management/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkManagement::V1::OrganizationVpcFlowLogsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkManagement::V1::GetVpcFlowLogsConfigRequest.new - # - # # Call the get_vpc_flow_logs_config method. - # result = client.get_vpc_flow_logs_config request - # - # # The returned object is of type Google::Cloud::NetworkManagement::V1::VpcFlowLogsConfig. - # p result - # - def get_vpc_flow_logs_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkManagement::V1::GetVpcFlowLogsConfigRequest - - # 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_vpc_flow_logs_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::NetworkManagement::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_vpc_flow_logs_config.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_vpc_flow_logs_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @organization_vpc_flow_logs_service_stub.get_vpc_flow_logs_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 - - ## - # Creates a new `VpcFlowLogsConfig`. - # If a configuration with the exact same settings already exists (even if the - # ID is different), the creation fails. - # Notes: - # - # 1. Creating a configuration with `state=DISABLED` will fail - # 2. The following fields are not considered as settings for the purpose - # of the check mentioned above, therefore - creating another configuration - # with the same fields but different values for the following fields will - # fail as well: - # * name - # * create_time - # * update_time - # * labels - # * description - # - # @overload create_vpc_flow_logs_config(request, options = nil) - # Pass arguments to `create_vpc_flow_logs_config` via a request object, either of type - # {::Google::Cloud::NetworkManagement::V1::CreateVpcFlowLogsConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkManagement::V1::CreateVpcFlowLogsConfigRequest, ::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_vpc_flow_logs_config(parent: nil, vpc_flow_logs_config_id: nil, vpc_flow_logs_config: nil) - # Pass arguments to `create_vpc_flow_logs_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. The parent resource of the VpcFlowLogsConfig to create, - # in one of the following formats: - # - # - For project-level resources: `projects/{project_id}/locations/global` - # - # - For organization-level resources: - # `organizations/{organization_id}/locations/global` - # @param vpc_flow_logs_config_id [::String] - # Required. ID of the `VpcFlowLogsConfig`. - # @param vpc_flow_logs_config [::Google::Cloud::NetworkManagement::V1::VpcFlowLogsConfig, ::Hash] - # Required. A `VpcFlowLogsConfig` 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/network_management/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkManagement::V1::OrganizationVpcFlowLogsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkManagement::V1::CreateVpcFlowLogsConfigRequest.new - # - # # Call the create_vpc_flow_logs_config method. - # result = client.create_vpc_flow_logs_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_vpc_flow_logs_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkManagement::V1::CreateVpcFlowLogsConfigRequest - - # 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_vpc_flow_logs_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::NetworkManagement::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_vpc_flow_logs_config.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_vpc_flow_logs_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @organization_vpc_flow_logs_service_stub.create_vpc_flow_logs_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 - - ## - # Updates an existing `VpcFlowLogsConfig`. - # If a configuration with the exact same settings already exists (even if the - # ID is different), the creation fails. - # Notes: - # - # 1. Updating a configuration with `state=DISABLED` will fail - # 2. The following fields are not considered as settings for the purpose - # of the check mentioned above, therefore - updating another configuration - # with the same fields but different values for the following fields will - # fail as well: - # * name - # * create_time - # * update_time - # * labels - # * description - # - # @overload update_vpc_flow_logs_config(request, options = nil) - # Pass arguments to `update_vpc_flow_logs_config` via a request object, either of type - # {::Google::Cloud::NetworkManagement::V1::UpdateVpcFlowLogsConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkManagement::V1::UpdateVpcFlowLogsConfigRequest, ::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_vpc_flow_logs_config(update_mask: nil, vpc_flow_logs_config: nil) - # Pass arguments to `update_vpc_flow_logs_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 update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. Mask of fields to update. At least one path must be supplied in - # this field. - # For example, to change the state of the configuration to ENABLED, specify - # `update_mask` = `"state"`, and the `vpc_flow_logs_config` would be: - # `vpc_flow_logs_config = { - # name = - # "projects/my-project/locations/global/vpcFlowLogsConfigs/my-config" - # state = "ENABLED" }` - # @param vpc_flow_logs_config [::Google::Cloud::NetworkManagement::V1::VpcFlowLogsConfig, ::Hash] - # Required. Only fields specified in update_mask are updated. - # @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/network_management/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkManagement::V1::OrganizationVpcFlowLogsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkManagement::V1::UpdateVpcFlowLogsConfigRequest.new - # - # # Call the update_vpc_flow_logs_config method. - # result = client.update_vpc_flow_logs_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_vpc_flow_logs_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkManagement::V1::UpdateVpcFlowLogsConfigRequest - - # 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_vpc_flow_logs_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::NetworkManagement::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_vpc_flow_logs_config.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_vpc_flow_logs_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @organization_vpc_flow_logs_service_stub.update_vpc_flow_logs_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 specific `VpcFlowLogsConfig`. - # - # @overload delete_vpc_flow_logs_config(request, options = nil) - # Pass arguments to `delete_vpc_flow_logs_config` via a request object, either of type - # {::Google::Cloud::NetworkManagement::V1::DeleteVpcFlowLogsConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkManagement::V1::DeleteVpcFlowLogsConfigRequest, ::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_vpc_flow_logs_config(name: nil) - # Pass arguments to `delete_vpc_flow_logs_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. The resource name of the VpcFlowLogsConfig, - # in one of the following formats: - # - # - For a project-level resource: - # `projects/{project_id}/locations/global/vpcFlowLogsConfigs/{vpc_flow_logs_config_id}` - # - # - For an organization-level resource: - # `organizations/{organization_id}/locations/global/vpcFlowLogsConfigs/{vpc_flow_logs_config_id}` - # @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/network_management/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkManagement::V1::OrganizationVpcFlowLogsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkManagement::V1::DeleteVpcFlowLogsConfigRequest.new - # - # # Call the delete_vpc_flow_logs_config method. - # result = client.delete_vpc_flow_logs_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_vpc_flow_logs_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkManagement::V1::DeleteVpcFlowLogsConfigRequest - - # 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_vpc_flow_logs_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::NetworkManagement::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_vpc_flow_logs_config.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_vpc_flow_logs_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @organization_vpc_flow_logs_service_stub.delete_vpc_flow_logs_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 - - ## - # Configuration class for the OrganizationVpcFlowLogsService REST API. - # - # This class represents the configuration for OrganizationVpcFlowLogsService 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::NetworkManagement::V1::OrganizationVpcFlowLogsService::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_vpc_flow_logs_configs to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::NetworkManagement::V1::OrganizationVpcFlowLogsService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_vpc_flow_logs_configs.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::NetworkManagement::V1::OrganizationVpcFlowLogsService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_vpc_flow_logs_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 = "networkmanagement.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 OrganizationVpcFlowLogsService 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_vpc_flow_logs_configs` - # @return [::Gapic::Config::Method] - # - attr_reader :list_vpc_flow_logs_configs - ## - # RPC-specific configuration for `get_vpc_flow_logs_config` - # @return [::Gapic::Config::Method] - # - attr_reader :get_vpc_flow_logs_config - ## - # RPC-specific configuration for `create_vpc_flow_logs_config` - # @return [::Gapic::Config::Method] - # - attr_reader :create_vpc_flow_logs_config - ## - # RPC-specific configuration for `update_vpc_flow_logs_config` - # @return [::Gapic::Config::Method] - # - attr_reader :update_vpc_flow_logs_config - ## - # RPC-specific configuration for `delete_vpc_flow_logs_config` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_vpc_flow_logs_config - - # @private - def initialize parent_rpcs = nil - list_vpc_flow_logs_configs_config = parent_rpcs.list_vpc_flow_logs_configs if parent_rpcs.respond_to? :list_vpc_flow_logs_configs - @list_vpc_flow_logs_configs = ::Gapic::Config::Method.new list_vpc_flow_logs_configs_config - get_vpc_flow_logs_config_config = parent_rpcs.get_vpc_flow_logs_config if parent_rpcs.respond_to? :get_vpc_flow_logs_config - @get_vpc_flow_logs_config = ::Gapic::Config::Method.new get_vpc_flow_logs_config_config - create_vpc_flow_logs_config_config = parent_rpcs.create_vpc_flow_logs_config if parent_rpcs.respond_to? :create_vpc_flow_logs_config - @create_vpc_flow_logs_config = ::Gapic::Config::Method.new create_vpc_flow_logs_config_config - update_vpc_flow_logs_config_config = parent_rpcs.update_vpc_flow_logs_config if parent_rpcs.respond_to? :update_vpc_flow_logs_config - @update_vpc_flow_logs_config = ::Gapic::Config::Method.new update_vpc_flow_logs_config_config - delete_vpc_flow_logs_config_config = parent_rpcs.delete_vpc_flow_logs_config if parent_rpcs.respond_to? :delete_vpc_flow_logs_config - @delete_vpc_flow_logs_config = ::Gapic::Config::Method.new delete_vpc_flow_logs_config_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/organization_vpc_flow_logs_service/rest/operations.rb b/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/organization_vpc_flow_logs_service/rest/operations.rb deleted file mode 100644 index 8a95f5bf3a64..000000000000 --- a/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/organization_vpc_flow_logs_service/rest/operations.rb +++ /dev/null @@ -1,954 +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 NetworkManagement - module V1 - module OrganizationVpcFlowLogsService - module Rest - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "networkmanagement.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the OrganizationVpcFlowLogsService 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 OrganizationVpcFlowLogsService 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::NetworkManagement::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::NetworkManagement::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::NetworkManagement::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::NetworkManagement::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 = "networkmanagement.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/global/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}/operations", - matches: [ - ["name", %r{^organizations/[^/]+/locations/global/?$}, 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/global/operations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/locations/global/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/global/operations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/locations/global/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/global/operations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:cancel", - body: "*", - matches: [ - ["name", %r{^organizations/[^/]+/locations/global/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/organization_vpc_flow_logs_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/organization_vpc_flow_logs_service/rest/service_stub.rb deleted file mode 100644 index c9daa5a7f488..000000000000 --- a/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/organization_vpc_flow_logs_service/rest/service_stub.rb +++ /dev/null @@ -1,388 +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/networkmanagement/v1/vpc_flow_logs_pb" - -module Google - module Cloud - module NetworkManagement - module V1 - module OrganizationVpcFlowLogsService - module Rest - ## - # REST service stub for the OrganizationVpcFlowLogsService 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_vpc_flow_logs_configs REST call - # - # @param request_pb [::Google::Cloud::NetworkManagement::V1::ListVpcFlowLogsConfigsRequest] - # 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::NetworkManagement::V1::ListVpcFlowLogsConfigsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::NetworkManagement::V1::ListVpcFlowLogsConfigsResponse] - # A result object deserialized from the server's reply - def list_vpc_flow_logs_configs request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_vpc_flow_logs_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_vpc_flow_logs_configs", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::NetworkManagement::V1::ListVpcFlowLogsConfigsResponse.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_vpc_flow_logs_config REST call - # - # @param request_pb [::Google::Cloud::NetworkManagement::V1::GetVpcFlowLogsConfigRequest] - # 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::NetworkManagement::V1::VpcFlowLogsConfig] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::NetworkManagement::V1::VpcFlowLogsConfig] - # A result object deserialized from the server's reply - def get_vpc_flow_logs_config request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_vpc_flow_logs_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_vpc_flow_logs_config", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::NetworkManagement::V1::VpcFlowLogsConfig.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_vpc_flow_logs_config REST call - # - # @param request_pb [::Google::Cloud::NetworkManagement::V1::CreateVpcFlowLogsConfigRequest] - # 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_vpc_flow_logs_config request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_vpc_flow_logs_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_vpc_flow_logs_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 update_vpc_flow_logs_config REST call - # - # @param request_pb [::Google::Cloud::NetworkManagement::V1::UpdateVpcFlowLogsConfigRequest] - # 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_vpc_flow_logs_config request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_vpc_flow_logs_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_vpc_flow_logs_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_vpc_flow_logs_config REST call - # - # @param request_pb [::Google::Cloud::NetworkManagement::V1::DeleteVpcFlowLogsConfigRequest] - # 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_vpc_flow_logs_config request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_vpc_flow_logs_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_vpc_flow_logs_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 - - ## - # @private - # - # GRPC transcoding helper method for the list_vpc_flow_logs_configs REST call - # - # @param request_pb [::Google::Cloud::NetworkManagement::V1::ListVpcFlowLogsConfigsRequest] - # 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_vpc_flow_logs_configs_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/vpcFlowLogsConfigs", - matches: [ - ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_vpc_flow_logs_config REST call - # - # @param request_pb [::Google::Cloud::NetworkManagement::V1::GetVpcFlowLogsConfigRequest] - # 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_vpc_flow_logs_config_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/locations/[^/]+/vpcFlowLogsConfigs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_vpc_flow_logs_config REST call - # - # @param request_pb [::Google::Cloud::NetworkManagement::V1::CreateVpcFlowLogsConfigRequest] - # 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_vpc_flow_logs_config_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/vpcFlowLogsConfigs", - body: "vpc_flow_logs_config", - matches: [ - ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_vpc_flow_logs_config REST call - # - # @param request_pb [::Google::Cloud::NetworkManagement::V1::UpdateVpcFlowLogsConfigRequest] - # 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_vpc_flow_logs_config_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{vpc_flow_logs_config.name}", - body: "vpc_flow_logs_config", - matches: [ - ["vpc_flow_logs_config.name", %r{^organizations/[^/]+/locations/[^/]+/vpcFlowLogsConfigs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_vpc_flow_logs_config REST call - # - # @param request_pb [::Google::Cloud::NetworkManagement::V1::DeleteVpcFlowLogsConfigRequest] - # 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_vpc_flow_logs_config_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/locations/[^/]+/vpcFlowLogsConfigs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/reachability_service.rb b/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/reachability_service.rb deleted file mode 100644 index 9d50005b9ff4..000000000000 --- a/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/reachability_service.rb +++ /dev/null @@ -1,63 +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/network_management/v1/version" - -require "google/cloud/network_management/v1/reachability_service/credentials" -require "google/cloud/network_management/v1/reachability_service/paths" -require "google/cloud/network_management/v1/reachability_service/operations" -require "google/cloud/network_management/v1/reachability_service/client" -require "google/cloud/network_management/v1/reachability_service/rest" - -module Google - module Cloud - module NetworkManagement - module V1 - ## - # The Reachability service in the Google Cloud Network Management API provides - # services that analyze the reachability within a single Google Virtual Private - # Cloud (VPC) network, between peered VPC networks, between VPC and on-premises - # networks, or between VPC networks and internet hosts. A reachability analysis - # is based on Google Cloud network configurations. - # - # You can use the analysis results to verify these configurations and - # to troubleshoot connectivity issues. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/network_management/v1/reachability_service" - # client = ::Google::Cloud::NetworkManagement::V1::ReachabilityService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/cloud/network_management/v1/reachability_service/rest" - # client = ::Google::Cloud::NetworkManagement::V1::ReachabilityService::Rest::Client.new - # - module ReachabilityService - end - end - end - end -end - -helper_path = ::File.join __dir__, "reachability_service", "helpers.rb" -require "google/cloud/network_management/v1/reachability_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/reachability_service/client.rb b/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/reachability_service/client.rb deleted file mode 100644 index f23d250e7e62..000000000000 --- a/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/reachability_service/client.rb +++ /dev/null @@ -1,1111 +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/networkmanagement/v1/reachability_pb" -require "google/cloud/location" -require "google/iam/v1" - -module Google - module Cloud - module NetworkManagement - module V1 - module ReachabilityService - ## - # Client for the ReachabilityService service. - # - # The Reachability service in the Google Cloud Network Management API provides - # services that analyze the reachability within a single Google Virtual Private - # Cloud (VPC) network, between peered VPC networks, between VPC and on-premises - # networks, or between VPC networks and internet hosts. A reachability analysis - # is based on Google Cloud network configurations. - # - # You can use the analysis results to verify these configurations and - # to troubleshoot connectivity issues. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "networkmanagement.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :reachability_service_stub - - ## - # Configure the ReachabilityService Client class. - # - # See {::Google::Cloud::NetworkManagement::V1::ReachabilityService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all ReachabilityService clients - # ::Google::Cloud::NetworkManagement::V1::ReachabilityService::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", "NetworkManagement", "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.timeout = 60.0 - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the ReachabilityService 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::NetworkManagement::V1::ReachabilityService::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 - @reachability_service_stub.universe_domain - end - - ## - # Create a new ReachabilityService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::NetworkManagement::V1::ReachabilityService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::NetworkManagement::V1::ReachabilityService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the ReachabilityService 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/networkmanagement/v1/reachability_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 - - @reachability_service_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::NetworkManagement::V1::ReachabilityService::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 - ) - - @reachability_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 = @reachability_service_stub.endpoint - config.universe_domain = @reachability_service_stub.universe_domain - config.logger = @reachability_service_stub.logger if config.respond_to? :logger= - end - - @iam_policy_client = Google::Iam::V1::IAMPolicy::Client.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @reachability_service_stub.endpoint - config.universe_domain = @reachability_service_stub.universe_domain - config.logger = @reachability_service_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::NetworkManagement::V1::ReachabilityService::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 - - ## - # Get the associated client for mix-in of the IAMPolicy. - # - # @return [Google::Iam::V1::IAMPolicy::Client] - # - attr_reader :iam_policy_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @reachability_service_stub.logger - end - - # Service calls - - ## - # Lists all Connectivity Tests owned by a project. - # - # @overload list_connectivity_tests(request, options = nil) - # Pass arguments to `list_connectivity_tests` via a request object, either of type - # {::Google::Cloud::NetworkManagement::V1::ListConnectivityTestsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkManagement::V1::ListConnectivityTestsRequest, ::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_connectivity_tests(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_connectivity_tests` 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 resource of the Connectivity Tests: - # `projects/{project_id}/locations/global` - # @param page_size [::Integer] - # Number of `ConnectivityTests` to return. - # @param page_token [::String] - # Page token from an earlier query, as returned in `next_page_token`. - # @param filter [::String] - # Lists the `ConnectivityTests` that match the filter expression. A filter - # expression filters the resources listed in the response. The expression - # must be of the form ` ` where operators: `<`, `>`, - # `<=`, - # `>=`, - # `!=`, `=`, `:` are supported (colon `:` represents a HAS operator which is - # roughly synonymous with equality). can refer to a proto or JSON - # field, or a synthetic field. Field names can be camelCase or snake_case. - # - # Examples: - # - Filter by name: - # name = "projects/proj-1/locations/global/connectivityTests/test-1 - # - # - Filter by labels: - # - Resources that have a key called `foo` - # labels.foo:* - # - Resources that have a key called `foo` whose value is `bar` - # labels.foo = bar - # @param order_by [::String] - # Field to use to sort the list. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::NetworkManagement::V1::ConnectivityTest>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::NetworkManagement::V1::ConnectivityTest>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/network_management/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkManagement::V1::ReachabilityService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkManagement::V1::ListConnectivityTestsRequest.new - # - # # Call the list_connectivity_tests method. - # result = client.list_connectivity_tests 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::NetworkManagement::V1::ConnectivityTest. - # p item - # end - # - def list_connectivity_tests request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkManagement::V1::ListConnectivityTestsRequest - - # 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_connectivity_tests.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::NetworkManagement::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_connectivity_tests.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_connectivity_tests.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @reachability_service_stub.call_rpc :list_connectivity_tests, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @reachability_service_stub, :list_connectivity_tests, 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 the details of a specific Connectivity Test. - # - # @overload get_connectivity_test(request, options = nil) - # Pass arguments to `get_connectivity_test` via a request object, either of type - # {::Google::Cloud::NetworkManagement::V1::GetConnectivityTestRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkManagement::V1::GetConnectivityTestRequest, ::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_connectivity_test(name: nil) - # Pass arguments to `get_connectivity_test` 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. `ConnectivityTest` resource name using the form: - # `projects/{project_id}/locations/global/connectivityTests/{test_id}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::NetworkManagement::V1::ConnectivityTest] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::NetworkManagement::V1::ConnectivityTest] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/network_management/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkManagement::V1::ReachabilityService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkManagement::V1::GetConnectivityTestRequest.new - # - # # Call the get_connectivity_test method. - # result = client.get_connectivity_test request - # - # # The returned object is of type Google::Cloud::NetworkManagement::V1::ConnectivityTest. - # p result - # - def get_connectivity_test request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkManagement::V1::GetConnectivityTestRequest - - # 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_connectivity_test.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::NetworkManagement::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_connectivity_test.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_connectivity_test.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @reachability_service_stub.call_rpc :get_connectivity_test, 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 Connectivity Test. - # After you create a test, the reachability analysis is performed as part - # of the long running operation, which completes when the analysis completes. - # - # If the endpoint specifications in `ConnectivityTest` are invalid - # (for example, containing non-existent resources in the network, or you - # don't have read permissions to the network configurations of listed - # projects), then the reachability result returns a value of `UNKNOWN`. - # - # If the endpoint specifications in `ConnectivityTest` are - # incomplete, the reachability result returns a value of - # AMBIGUOUS. For more information, - # see the Connectivity Test documentation. - # - # @overload create_connectivity_test(request, options = nil) - # Pass arguments to `create_connectivity_test` via a request object, either of type - # {::Google::Cloud::NetworkManagement::V1::CreateConnectivityTestRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkManagement::V1::CreateConnectivityTestRequest, ::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_connectivity_test(parent: nil, test_id: nil, resource: nil) - # Pass arguments to `create_connectivity_test` 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 resource of the Connectivity Test to create: - # `projects/{project_id}/locations/global` - # @param test_id [::String] - # Required. The logical name of the Connectivity Test in your project - # with the following restrictions: - # - # * Must contain only lowercase letters, numbers, and hyphens. - # * Must start with a letter. - # * Must be between 1-40 characters. - # * Must end with a number or a letter. - # * Must be unique within the customer project - # @param resource [::Google::Cloud::NetworkManagement::V1::ConnectivityTest, ::Hash] - # Required. A `ConnectivityTest` 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/network_management/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkManagement::V1::ReachabilityService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkManagement::V1::CreateConnectivityTestRequest.new - # - # # Call the create_connectivity_test method. - # result = client.create_connectivity_test 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_connectivity_test request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkManagement::V1::CreateConnectivityTestRequest - - # 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_connectivity_test.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::NetworkManagement::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_connectivity_test.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_connectivity_test.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @reachability_service_stub.call_rpc :create_connectivity_test, 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 configuration of an existing `ConnectivityTest`. - # After you update a test, the reachability analysis is performed as part - # of the long running operation, which completes when the analysis completes. - # The Reachability state in the test resource is updated with the new result. - # - # If the endpoint specifications in `ConnectivityTest` are invalid - # (for example, they contain non-existent resources in the network, or the - # user does not have read permissions to the network configurations of - # listed projects), then the reachability result returns a value of - # UNKNOWN. - # - # If the endpoint specifications in `ConnectivityTest` are incomplete, the - # reachability result returns a value of `AMBIGUOUS`. See the documentation - # in `ConnectivityTest` for more details. - # - # @overload update_connectivity_test(request, options = nil) - # Pass arguments to `update_connectivity_test` via a request object, either of type - # {::Google::Cloud::NetworkManagement::V1::UpdateConnectivityTestRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkManagement::V1::UpdateConnectivityTestRequest, ::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_connectivity_test(update_mask: nil, resource: nil) - # Pass arguments to `update_connectivity_test` 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. Mask of fields to update. At least one path must be supplied in - # this field. - # @param resource [::Google::Cloud::NetworkManagement::V1::ConnectivityTest, ::Hash] - # Required. Only fields specified in update_mask are updated. - # - # @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/network_management/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkManagement::V1::ReachabilityService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkManagement::V1::UpdateConnectivityTestRequest.new - # - # # Call the update_connectivity_test method. - # result = client.update_connectivity_test 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_connectivity_test request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkManagement::V1::UpdateConnectivityTestRequest - - # 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_connectivity_test.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::NetworkManagement::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.resource&.name - header_params["resource.name"] = request.resource.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_connectivity_test.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_connectivity_test.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @reachability_service_stub.call_rpc :update_connectivity_test, 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 - - ## - # Rerun an existing `ConnectivityTest`. - # After the user triggers the rerun, the reachability analysis is performed - # as part of the long running operation, which completes when the analysis - # completes. - # - # Even though the test configuration remains the same, the reachability - # result may change due to underlying network configuration changes. - # - # If the endpoint specifications in `ConnectivityTest` become invalid (for - # example, specified resources are deleted in the network, or you lost - # read permissions to the network configurations of listed projects), then - # the reachability result returns a value of `UNKNOWN`. - # - # @overload rerun_connectivity_test(request, options = nil) - # Pass arguments to `rerun_connectivity_test` via a request object, either of type - # {::Google::Cloud::NetworkManagement::V1::RerunConnectivityTestRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkManagement::V1::RerunConnectivityTestRequest, ::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 rerun_connectivity_test(name: nil) - # Pass arguments to `rerun_connectivity_test` 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. Connectivity Test resource name using the form: - # `projects/{project_id}/locations/global/connectivityTests/{test_id}` - # - # @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/network_management/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkManagement::V1::ReachabilityService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkManagement::V1::RerunConnectivityTestRequest.new - # - # # Call the rerun_connectivity_test method. - # result = client.rerun_connectivity_test 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 rerun_connectivity_test request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkManagement::V1::RerunConnectivityTestRequest - - # 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.rerun_connectivity_test.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::NetworkManagement::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.rerun_connectivity_test.timeout, - metadata: metadata, - retry_policy: @config.rpcs.rerun_connectivity_test.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @reachability_service_stub.call_rpc :rerun_connectivity_test, 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 specific `ConnectivityTest`. - # - # @overload delete_connectivity_test(request, options = nil) - # Pass arguments to `delete_connectivity_test` via a request object, either of type - # {::Google::Cloud::NetworkManagement::V1::DeleteConnectivityTestRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkManagement::V1::DeleteConnectivityTestRequest, ::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_connectivity_test(name: nil) - # Pass arguments to `delete_connectivity_test` 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. Connectivity Test resource name using the form: - # `projects/{project_id}/locations/global/connectivityTests/{test_id}` - # - # @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/network_management/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkManagement::V1::ReachabilityService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkManagement::V1::DeleteConnectivityTestRequest.new - # - # # Call the delete_connectivity_test method. - # result = client.delete_connectivity_test 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_connectivity_test request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkManagement::V1::DeleteConnectivityTestRequest - - # 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_connectivity_test.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::NetworkManagement::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_connectivity_test.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_connectivity_test.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @reachability_service_stub.call_rpc :delete_connectivity_test, 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 ReachabilityService API. - # - # This class represents the configuration for ReachabilityService, - # 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::NetworkManagement::V1::ReachabilityService::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_connectivity_tests to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::NetworkManagement::V1::ReachabilityService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_connectivity_tests.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::NetworkManagement::V1::ReachabilityService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_connectivity_tests.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::NetworkManagement::V1::ReachabilityService::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 = "networkmanagement.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 ReachabilityService 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_connectivity_tests` - # @return [::Gapic::Config::Method] - # - attr_reader :list_connectivity_tests - ## - # RPC-specific configuration for `get_connectivity_test` - # @return [::Gapic::Config::Method] - # - attr_reader :get_connectivity_test - ## - # RPC-specific configuration for `create_connectivity_test` - # @return [::Gapic::Config::Method] - # - attr_reader :create_connectivity_test - ## - # RPC-specific configuration for `update_connectivity_test` - # @return [::Gapic::Config::Method] - # - attr_reader :update_connectivity_test - ## - # RPC-specific configuration for `rerun_connectivity_test` - # @return [::Gapic::Config::Method] - # - attr_reader :rerun_connectivity_test - ## - # RPC-specific configuration for `delete_connectivity_test` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_connectivity_test - - # @private - def initialize parent_rpcs = nil - list_connectivity_tests_config = parent_rpcs.list_connectivity_tests if parent_rpcs.respond_to? :list_connectivity_tests - @list_connectivity_tests = ::Gapic::Config::Method.new list_connectivity_tests_config - get_connectivity_test_config = parent_rpcs.get_connectivity_test if parent_rpcs.respond_to? :get_connectivity_test - @get_connectivity_test = ::Gapic::Config::Method.new get_connectivity_test_config - create_connectivity_test_config = parent_rpcs.create_connectivity_test if parent_rpcs.respond_to? :create_connectivity_test - @create_connectivity_test = ::Gapic::Config::Method.new create_connectivity_test_config - update_connectivity_test_config = parent_rpcs.update_connectivity_test if parent_rpcs.respond_to? :update_connectivity_test - @update_connectivity_test = ::Gapic::Config::Method.new update_connectivity_test_config - rerun_connectivity_test_config = parent_rpcs.rerun_connectivity_test if parent_rpcs.respond_to? :rerun_connectivity_test - @rerun_connectivity_test = ::Gapic::Config::Method.new rerun_connectivity_test_config - delete_connectivity_test_config = parent_rpcs.delete_connectivity_test if parent_rpcs.respond_to? :delete_connectivity_test - @delete_connectivity_test = ::Gapic::Config::Method.new delete_connectivity_test_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/reachability_service/credentials.rb b/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/reachability_service/credentials.rb deleted file mode 100644 index 93870a67c8fa..000000000000 --- a/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/reachability_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 NetworkManagement - module V1 - module ReachabilityService - # Credentials for the ReachabilityService 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-network_management-v1/lib/google/cloud/network_management/v1/reachability_service/operations.rb b/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/reachability_service/operations.rb deleted file mode 100644 index ea51bdee6d9f..000000000000 --- a/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/reachability_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 NetworkManagement - module V1 - module ReachabilityService - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "networkmanagement.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the ReachabilityService 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 ReachabilityService 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::NetworkManagement::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::NetworkManagement::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::NetworkManagement::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::NetworkManagement::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::NetworkManagement::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 = "networkmanagement.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-network_management-v1/lib/google/cloud/network_management/v1/reachability_service/paths.rb b/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/reachability_service/paths.rb deleted file mode 100644 index ee9e1848a3ce..000000000000 --- a/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/reachability_service/paths.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! - - -module Google - module Cloud - module NetworkManagement - module V1 - module ReachabilityService - # Path helper methods for the ReachabilityService API. - module Paths - ## - # Create a fully-qualified ConnectivityTest resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/global/connectivityTests/{test}` - # - # @param project [String] - # @param test [String] - # - # @return [::String] - def connectivity_test_path project:, test: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - - "projects/#{project}/locations/global/connectivityTests/#{test}" - end - - ## - # Create a fully-qualified Project resource string. - # - # The resource will be in the following format: - # - # `projects/{project}` - # - # @param project [String] - # - # @return [::String] - def project_path project: - "projects/#{project}" - end - - extend self - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/reachability_service/rest.rb b/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/reachability_service/rest.rb deleted file mode 100644 index d093c215e60f..000000000000 --- a/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/reachability_service/rest.rb +++ /dev/null @@ -1,61 +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/network_management/v1/version" -require "google/cloud/network_management/v1/bindings_override" - -require "google/cloud/network_management/v1/reachability_service/credentials" -require "google/cloud/network_management/v1/reachability_service/paths" -require "google/cloud/network_management/v1/reachability_service/rest/operations" -require "google/cloud/network_management/v1/reachability_service/rest/client" - -module Google - module Cloud - module NetworkManagement - module V1 - ## - # The Reachability service in the Google Cloud Network Management API provides - # services that analyze the reachability within a single Google Virtual Private - # Cloud (VPC) network, between peered VPC networks, between VPC and on-premises - # networks, or between VPC networks and internet hosts. A reachability analysis - # is based on Google Cloud network configurations. - # - # You can use the analysis results to verify these configurations and - # to troubleshoot connectivity issues. - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/network_management/v1/reachability_service/rest" - # client = ::Google::Cloud::NetworkManagement::V1::ReachabilityService::Rest::Client.new - # - module ReachabilityService - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/network_management/v1/reachability_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/reachability_service/rest/client.rb b/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/reachability_service/rest/client.rb deleted file mode 100644 index fec419e03b87..000000000000 --- a/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/reachability_service/rest/client.rb +++ /dev/null @@ -1,1035 +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/networkmanagement/v1/reachability_pb" -require "google/cloud/network_management/v1/reachability_service/rest/service_stub" -require "google/cloud/location/rest" -require "google/iam/v1/rest" - -module Google - module Cloud - module NetworkManagement - module V1 - module ReachabilityService - module Rest - ## - # REST client for the ReachabilityService service. - # - # The Reachability service in the Google Cloud Network Management API provides - # services that analyze the reachability within a single Google Virtual Private - # Cloud (VPC) network, between peered VPC networks, between VPC and on-premises - # networks, or between VPC networks and internet hosts. A reachability analysis - # is based on Google Cloud network configurations. - # - # You can use the analysis results to verify these configurations and - # to troubleshoot connectivity issues. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "networkmanagement.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :reachability_service_stub - - ## - # Configure the ReachabilityService Client class. - # - # See {::Google::Cloud::NetworkManagement::V1::ReachabilityService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all ReachabilityService clients - # ::Google::Cloud::NetworkManagement::V1::ReachabilityService::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", "NetworkManagement", "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.timeout = 60.0 - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the ReachabilityService 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::NetworkManagement::V1::ReachabilityService::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 - @reachability_service_stub.universe_domain - end - - ## - # Create a new ReachabilityService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::NetworkManagement::V1::ReachabilityService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::NetworkManagement::V1::ReachabilityService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the ReachabilityService 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::NetworkManagement::V1::ReachabilityService::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 - - @reachability_service_stub = ::Google::Cloud::NetworkManagement::V1::ReachabilityService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @reachability_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 = @reachability_service_stub.endpoint - config.universe_domain = @reachability_service_stub.universe_domain - config.bindings_override = @config.bindings_override - config.logger = @reachability_service_stub.logger if config.respond_to? :logger= - end - - @iam_policy_client = Google::Iam::V1::IAMPolicy::Rest::Client.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @reachability_service_stub.endpoint - config.universe_domain = @reachability_service_stub.universe_domain - config.bindings_override = @config.bindings_override - config.logger = @reachability_service_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::NetworkManagement::V1::ReachabilityService::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 - - ## - # Get the associated client for mix-in of the IAMPolicy. - # - # @return [Google::Iam::V1::IAMPolicy::Rest::Client] - # - attr_reader :iam_policy_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @reachability_service_stub.logger - end - - # Service calls - - ## - # Lists all Connectivity Tests owned by a project. - # - # @overload list_connectivity_tests(request, options = nil) - # Pass arguments to `list_connectivity_tests` via a request object, either of type - # {::Google::Cloud::NetworkManagement::V1::ListConnectivityTestsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkManagement::V1::ListConnectivityTestsRequest, ::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_connectivity_tests(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_connectivity_tests` 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 resource of the Connectivity Tests: - # `projects/{project_id}/locations/global` - # @param page_size [::Integer] - # Number of `ConnectivityTests` to return. - # @param page_token [::String] - # Page token from an earlier query, as returned in `next_page_token`. - # @param filter [::String] - # Lists the `ConnectivityTests` that match the filter expression. A filter - # expression filters the resources listed in the response. The expression - # must be of the form ` ` where operators: `<`, `>`, - # `<=`, - # `>=`, - # `!=`, `=`, `:` are supported (colon `:` represents a HAS operator which is - # roughly synonymous with equality). can refer to a proto or JSON - # field, or a synthetic field. Field names can be camelCase or snake_case. - # - # Examples: - # - Filter by name: - # name = "projects/proj-1/locations/global/connectivityTests/test-1 - # - # - Filter by labels: - # - Resources that have a key called `foo` - # labels.foo:* - # - Resources that have a key called `foo` whose value is `bar` - # labels.foo = bar - # @param order_by [::String] - # Field to use to sort the list. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkManagement::V1::ConnectivityTest>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkManagement::V1::ConnectivityTest>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/network_management/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkManagement::V1::ReachabilityService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkManagement::V1::ListConnectivityTestsRequest.new - # - # # Call the list_connectivity_tests method. - # result = client.list_connectivity_tests 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::NetworkManagement::V1::ConnectivityTest. - # p item - # end - # - def list_connectivity_tests request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkManagement::V1::ListConnectivityTestsRequest - - # 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_connectivity_tests.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::NetworkManagement::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_connectivity_tests.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_connectivity_tests.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @reachability_service_stub.list_connectivity_tests request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @reachability_service_stub, :list_connectivity_tests, "resources", 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 details of a specific Connectivity Test. - # - # @overload get_connectivity_test(request, options = nil) - # Pass arguments to `get_connectivity_test` via a request object, either of type - # {::Google::Cloud::NetworkManagement::V1::GetConnectivityTestRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkManagement::V1::GetConnectivityTestRequest, ::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_connectivity_test(name: nil) - # Pass arguments to `get_connectivity_test` 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. `ConnectivityTest` resource name using the form: - # `projects/{project_id}/locations/global/connectivityTests/{test_id}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::NetworkManagement::V1::ConnectivityTest] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::NetworkManagement::V1::ConnectivityTest] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/network_management/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkManagement::V1::ReachabilityService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkManagement::V1::GetConnectivityTestRequest.new - # - # # Call the get_connectivity_test method. - # result = client.get_connectivity_test request - # - # # The returned object is of type Google::Cloud::NetworkManagement::V1::ConnectivityTest. - # p result - # - def get_connectivity_test request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkManagement::V1::GetConnectivityTestRequest - - # 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_connectivity_test.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::NetworkManagement::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_connectivity_test.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_connectivity_test.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @reachability_service_stub.get_connectivity_test 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 Connectivity Test. - # After you create a test, the reachability analysis is performed as part - # of the long running operation, which completes when the analysis completes. - # - # If the endpoint specifications in `ConnectivityTest` are invalid - # (for example, containing non-existent resources in the network, or you - # don't have read permissions to the network configurations of listed - # projects), then the reachability result returns a value of `UNKNOWN`. - # - # If the endpoint specifications in `ConnectivityTest` are - # incomplete, the reachability result returns a value of - # AMBIGUOUS. For more information, - # see the Connectivity Test documentation. - # - # @overload create_connectivity_test(request, options = nil) - # Pass arguments to `create_connectivity_test` via a request object, either of type - # {::Google::Cloud::NetworkManagement::V1::CreateConnectivityTestRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkManagement::V1::CreateConnectivityTestRequest, ::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_connectivity_test(parent: nil, test_id: nil, resource: nil) - # Pass arguments to `create_connectivity_test` 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 resource of the Connectivity Test to create: - # `projects/{project_id}/locations/global` - # @param test_id [::String] - # Required. The logical name of the Connectivity Test in your project - # with the following restrictions: - # - # * Must contain only lowercase letters, numbers, and hyphens. - # * Must start with a letter. - # * Must be between 1-40 characters. - # * Must end with a number or a letter. - # * Must be unique within the customer project - # @param resource [::Google::Cloud::NetworkManagement::V1::ConnectivityTest, ::Hash] - # Required. A `ConnectivityTest` 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/network_management/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkManagement::V1::ReachabilityService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkManagement::V1::CreateConnectivityTestRequest.new - # - # # Call the create_connectivity_test method. - # result = client.create_connectivity_test 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_connectivity_test request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkManagement::V1::CreateConnectivityTestRequest - - # 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_connectivity_test.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::NetworkManagement::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_connectivity_test.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_connectivity_test.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @reachability_service_stub.create_connectivity_test 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 configuration of an existing `ConnectivityTest`. - # After you update a test, the reachability analysis is performed as part - # of the long running operation, which completes when the analysis completes. - # The Reachability state in the test resource is updated with the new result. - # - # If the endpoint specifications in `ConnectivityTest` are invalid - # (for example, they contain non-existent resources in the network, or the - # user does not have read permissions to the network configurations of - # listed projects), then the reachability result returns a value of - # UNKNOWN. - # - # If the endpoint specifications in `ConnectivityTest` are incomplete, the - # reachability result returns a value of `AMBIGUOUS`. See the documentation - # in `ConnectivityTest` for more details. - # - # @overload update_connectivity_test(request, options = nil) - # Pass arguments to `update_connectivity_test` via a request object, either of type - # {::Google::Cloud::NetworkManagement::V1::UpdateConnectivityTestRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkManagement::V1::UpdateConnectivityTestRequest, ::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_connectivity_test(update_mask: nil, resource: nil) - # Pass arguments to `update_connectivity_test` 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. Mask of fields to update. At least one path must be supplied in - # this field. - # @param resource [::Google::Cloud::NetworkManagement::V1::ConnectivityTest, ::Hash] - # Required. Only fields specified in update_mask are updated. - # @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/network_management/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkManagement::V1::ReachabilityService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkManagement::V1::UpdateConnectivityTestRequest.new - # - # # Call the update_connectivity_test method. - # result = client.update_connectivity_test 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_connectivity_test request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkManagement::V1::UpdateConnectivityTestRequest - - # 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_connectivity_test.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::NetworkManagement::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_connectivity_test.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_connectivity_test.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @reachability_service_stub.update_connectivity_test 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 - - ## - # Rerun an existing `ConnectivityTest`. - # After the user triggers the rerun, the reachability analysis is performed - # as part of the long running operation, which completes when the analysis - # completes. - # - # Even though the test configuration remains the same, the reachability - # result may change due to underlying network configuration changes. - # - # If the endpoint specifications in `ConnectivityTest` become invalid (for - # example, specified resources are deleted in the network, or you lost - # read permissions to the network configurations of listed projects), then - # the reachability result returns a value of `UNKNOWN`. - # - # @overload rerun_connectivity_test(request, options = nil) - # Pass arguments to `rerun_connectivity_test` via a request object, either of type - # {::Google::Cloud::NetworkManagement::V1::RerunConnectivityTestRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkManagement::V1::RerunConnectivityTestRequest, ::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 rerun_connectivity_test(name: nil) - # Pass arguments to `rerun_connectivity_test` 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. Connectivity Test resource name using the form: - # `projects/{project_id}/locations/global/connectivityTests/{test_id}` - # @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/network_management/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkManagement::V1::ReachabilityService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkManagement::V1::RerunConnectivityTestRequest.new - # - # # Call the rerun_connectivity_test method. - # result = client.rerun_connectivity_test 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 rerun_connectivity_test request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkManagement::V1::RerunConnectivityTestRequest - - # 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.rerun_connectivity_test.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::NetworkManagement::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.rerun_connectivity_test.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.rerun_connectivity_test.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @reachability_service_stub.rerun_connectivity_test 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 specific `ConnectivityTest`. - # - # @overload delete_connectivity_test(request, options = nil) - # Pass arguments to `delete_connectivity_test` via a request object, either of type - # {::Google::Cloud::NetworkManagement::V1::DeleteConnectivityTestRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkManagement::V1::DeleteConnectivityTestRequest, ::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_connectivity_test(name: nil) - # Pass arguments to `delete_connectivity_test` 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. Connectivity Test resource name using the form: - # `projects/{project_id}/locations/global/connectivityTests/{test_id}` - # @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/network_management/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkManagement::V1::ReachabilityService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkManagement::V1::DeleteConnectivityTestRequest.new - # - # # Call the delete_connectivity_test method. - # result = client.delete_connectivity_test 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_connectivity_test request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkManagement::V1::DeleteConnectivityTestRequest - - # 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_connectivity_test.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::NetworkManagement::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_connectivity_test.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_connectivity_test.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @reachability_service_stub.delete_connectivity_test 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 - - ## - # Configuration class for the ReachabilityService REST API. - # - # This class represents the configuration for ReachabilityService 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::NetworkManagement::V1::ReachabilityService::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_connectivity_tests to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::NetworkManagement::V1::ReachabilityService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_connectivity_tests.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::NetworkManagement::V1::ReachabilityService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_connectivity_tests.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 = "networkmanagement.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 ReachabilityService 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_connectivity_tests` - # @return [::Gapic::Config::Method] - # - attr_reader :list_connectivity_tests - ## - # RPC-specific configuration for `get_connectivity_test` - # @return [::Gapic::Config::Method] - # - attr_reader :get_connectivity_test - ## - # RPC-specific configuration for `create_connectivity_test` - # @return [::Gapic::Config::Method] - # - attr_reader :create_connectivity_test - ## - # RPC-specific configuration for `update_connectivity_test` - # @return [::Gapic::Config::Method] - # - attr_reader :update_connectivity_test - ## - # RPC-specific configuration for `rerun_connectivity_test` - # @return [::Gapic::Config::Method] - # - attr_reader :rerun_connectivity_test - ## - # RPC-specific configuration for `delete_connectivity_test` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_connectivity_test - - # @private - def initialize parent_rpcs = nil - list_connectivity_tests_config = parent_rpcs.list_connectivity_tests if parent_rpcs.respond_to? :list_connectivity_tests - @list_connectivity_tests = ::Gapic::Config::Method.new list_connectivity_tests_config - get_connectivity_test_config = parent_rpcs.get_connectivity_test if parent_rpcs.respond_to? :get_connectivity_test - @get_connectivity_test = ::Gapic::Config::Method.new get_connectivity_test_config - create_connectivity_test_config = parent_rpcs.create_connectivity_test if parent_rpcs.respond_to? :create_connectivity_test - @create_connectivity_test = ::Gapic::Config::Method.new create_connectivity_test_config - update_connectivity_test_config = parent_rpcs.update_connectivity_test if parent_rpcs.respond_to? :update_connectivity_test - @update_connectivity_test = ::Gapic::Config::Method.new update_connectivity_test_config - rerun_connectivity_test_config = parent_rpcs.rerun_connectivity_test if parent_rpcs.respond_to? :rerun_connectivity_test - @rerun_connectivity_test = ::Gapic::Config::Method.new rerun_connectivity_test_config - delete_connectivity_test_config = parent_rpcs.delete_connectivity_test if parent_rpcs.respond_to? :delete_connectivity_test - @delete_connectivity_test = ::Gapic::Config::Method.new delete_connectivity_test_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/reachability_service/rest/operations.rb b/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/reachability_service/rest/operations.rb deleted file mode 100644 index 74b21b1f8e80..000000000000 --- a/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/reachability_service/rest/operations.rb +++ /dev/null @@ -1,954 +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 NetworkManagement - module V1 - module ReachabilityService - module Rest - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "networkmanagement.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the ReachabilityService 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 ReachabilityService 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::NetworkManagement::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::NetworkManagement::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::NetworkManagement::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::NetworkManagement::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 = "networkmanagement.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/global/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}/operations", - matches: [ - ["name", %r{^organizations/[^/]+/locations/global/?$}, 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/global/operations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/locations/global/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/global/operations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/locations/global/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/global/operations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:cancel", - body: "*", - matches: [ - ["name", %r{^organizations/[^/]+/locations/global/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/reachability_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/reachability_service/rest/service_stub.rb deleted file mode 100644 index d66fe06179d6..000000000000 --- a/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/reachability_service/rest/service_stub.rb +++ /dev/null @@ -1,450 +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/networkmanagement/v1/reachability_pb" - -module Google - module Cloud - module NetworkManagement - module V1 - module ReachabilityService - module Rest - ## - # REST service stub for the ReachabilityService 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_connectivity_tests REST call - # - # @param request_pb [::Google::Cloud::NetworkManagement::V1::ListConnectivityTestsRequest] - # 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::NetworkManagement::V1::ListConnectivityTestsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::NetworkManagement::V1::ListConnectivityTestsResponse] - # A result object deserialized from the server's reply - def list_connectivity_tests request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_connectivity_tests_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_connectivity_tests", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::NetworkManagement::V1::ListConnectivityTestsResponse.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_connectivity_test REST call - # - # @param request_pb [::Google::Cloud::NetworkManagement::V1::GetConnectivityTestRequest] - # 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::NetworkManagement::V1::ConnectivityTest] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::NetworkManagement::V1::ConnectivityTest] - # A result object deserialized from the server's reply - def get_connectivity_test request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_connectivity_test_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_connectivity_test", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::NetworkManagement::V1::ConnectivityTest.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_connectivity_test REST call - # - # @param request_pb [::Google::Cloud::NetworkManagement::V1::CreateConnectivityTestRequest] - # 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_connectivity_test request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_connectivity_test_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_connectivity_test", - 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_connectivity_test REST call - # - # @param request_pb [::Google::Cloud::NetworkManagement::V1::UpdateConnectivityTestRequest] - # 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_connectivity_test request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_connectivity_test_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_connectivity_test", - 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 rerun_connectivity_test REST call - # - # @param request_pb [::Google::Cloud::NetworkManagement::V1::RerunConnectivityTestRequest] - # 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 rerun_connectivity_test request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_rerun_connectivity_test_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: "rerun_connectivity_test", - 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_connectivity_test REST call - # - # @param request_pb [::Google::Cloud::NetworkManagement::V1::DeleteConnectivityTestRequest] - # 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_connectivity_test request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_connectivity_test_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_connectivity_test", - 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 - - ## - # @private - # - # GRPC transcoding helper method for the list_connectivity_tests REST call - # - # @param request_pb [::Google::Cloud::NetworkManagement::V1::ListConnectivityTestsRequest] - # 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_connectivity_tests_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/connectivityTests", - matches: [ - ["parent", %r{^projects/[^/]+/locations/global/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_connectivity_test REST call - # - # @param request_pb [::Google::Cloud::NetworkManagement::V1::GetConnectivityTestRequest] - # 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_connectivity_test_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/global/connectivityTests/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_connectivity_test REST call - # - # @param request_pb [::Google::Cloud::NetworkManagement::V1::CreateConnectivityTestRequest] - # 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_connectivity_test_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/connectivityTests", - body: "resource", - matches: [ - ["parent", %r{^projects/[^/]+/locations/global/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_connectivity_test REST call - # - # @param request_pb [::Google::Cloud::NetworkManagement::V1::UpdateConnectivityTestRequest] - # 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_connectivity_test_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{resource.name}", - body: "resource", - matches: [ - ["resource.name", %r{^projects/[^/]+/locations/global/connectivityTests/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the rerun_connectivity_test REST call - # - # @param request_pb [::Google::Cloud::NetworkManagement::V1::RerunConnectivityTestRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_rerun_connectivity_test_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:rerun", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/global/connectivityTests/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_connectivity_test REST call - # - # @param request_pb [::Google::Cloud::NetworkManagement::V1::DeleteConnectivityTestRequest] - # 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_connectivity_test_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/global/connectivityTests/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/rest.rb b/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/rest.rb deleted file mode 100644 index e3c377c9a482..000000000000 --- a/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/rest.rb +++ /dev/null @@ -1,40 +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/network_management/v1/reachability_service/rest" -require "google/cloud/network_management/v1/vpc_flow_logs_service/rest" -require "google/cloud/network_management/v1/organization_vpc_flow_logs_service/rest" -require "google/cloud/network_management/v1/bindings_override" -require "google/cloud/network_management/v1/version" - -module Google - module Cloud - module NetworkManagement - ## - # To load just the REST part of this package, including all its services, and instantiate a REST client: - # - # @example - # - # require "google/cloud/network_management/v1/rest" - # client = ::Google::Cloud::NetworkManagement::V1::ReachabilityService::Rest::Client.new - # - module V1 - end - end - end -end diff --git a/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/version.rb b/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/version.rb deleted file mode 100644 index 8f8a91bfe247..000000000000 --- a/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/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 NetworkManagement - module V1 - VERSION = "0.0.1" - end - end - end -end diff --git a/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/vpc_flow_logs_service.rb b/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/vpc_flow_logs_service.rb deleted file mode 100644 index c5857d9a447f..000000000000 --- a/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/vpc_flow_logs_service.rb +++ /dev/null @@ -1,58 +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/network_management/v1/version" - -require "google/cloud/network_management/v1/vpc_flow_logs_service/credentials" -require "google/cloud/network_management/v1/vpc_flow_logs_service/paths" -require "google/cloud/network_management/v1/vpc_flow_logs_service/operations" -require "google/cloud/network_management/v1/vpc_flow_logs_service/client" -require "google/cloud/network_management/v1/vpc_flow_logs_service/rest" - -module Google - module Cloud - module NetworkManagement - module V1 - ## - # The VPC Flow Logs service in the Google Cloud Network Management API provides - # configurations that generate Flow Logs. The service and the configuration - # resources created using this service are global. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/network_management/v1/vpc_flow_logs_service" - # client = ::Google::Cloud::NetworkManagement::V1::VpcFlowLogsService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/cloud/network_management/v1/vpc_flow_logs_service/rest" - # client = ::Google::Cloud::NetworkManagement::V1::VpcFlowLogsService::Rest::Client.new - # - module VpcFlowLogsService - end - end - end - end -end - -helper_path = ::File.join __dir__, "vpc_flow_logs_service", "helpers.rb" -require "google/cloud/network_management/v1/vpc_flow_logs_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/vpc_flow_logs_service/client.rb b/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/vpc_flow_logs_service/client.rb deleted file mode 100644 index 2709af7e0233..000000000000 --- a/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/vpc_flow_logs_service/client.rb +++ /dev/null @@ -1,1225 +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/networkmanagement/v1/vpc_flow_logs_pb" -require "google/cloud/location" -require "google/iam/v1" - -module Google - module Cloud - module NetworkManagement - module V1 - module VpcFlowLogsService - ## - # Client for the VpcFlowLogsService service. - # - # The VPC Flow Logs service in the Google Cloud Network Management API provides - # configurations that generate Flow Logs. The service and the configuration - # resources created using this service are global. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "networkmanagement.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :vpc_flow_logs_service_stub - - ## - # Configure the VpcFlowLogsService Client class. - # - # See {::Google::Cloud::NetworkManagement::V1::VpcFlowLogsService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all VpcFlowLogsService clients - # ::Google::Cloud::NetworkManagement::V1::VpcFlowLogsService::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", "NetworkManagement", "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 VpcFlowLogsService 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::NetworkManagement::V1::VpcFlowLogsService::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 - @vpc_flow_logs_service_stub.universe_domain - end - - ## - # Create a new VpcFlowLogsService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::NetworkManagement::V1::VpcFlowLogsService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::NetworkManagement::V1::VpcFlowLogsService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the VpcFlowLogsService 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/networkmanagement/v1/vpc_flow_logs_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 - - @vpc_flow_logs_service_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::NetworkManagement::V1::VpcFlowLogsService::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 - ) - - @vpc_flow_logs_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 = @vpc_flow_logs_service_stub.endpoint - config.universe_domain = @vpc_flow_logs_service_stub.universe_domain - config.logger = @vpc_flow_logs_service_stub.logger if config.respond_to? :logger= - end - - @iam_policy_client = Google::Iam::V1::IAMPolicy::Client.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @vpc_flow_logs_service_stub.endpoint - config.universe_domain = @vpc_flow_logs_service_stub.universe_domain - config.logger = @vpc_flow_logs_service_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::NetworkManagement::V1::VpcFlowLogsService::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 - - ## - # Get the associated client for mix-in of the IAMPolicy. - # - # @return [Google::Iam::V1::IAMPolicy::Client] - # - attr_reader :iam_policy_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @vpc_flow_logs_service_stub.logger - end - - # Service calls - - ## - # Lists all `VpcFlowLogsConfigs` in a given project. - # - # @overload list_vpc_flow_logs_configs(request, options = nil) - # Pass arguments to `list_vpc_flow_logs_configs` via a request object, either of type - # {::Google::Cloud::NetworkManagement::V1::ListVpcFlowLogsConfigsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkManagement::V1::ListVpcFlowLogsConfigsRequest, ::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_vpc_flow_logs_configs(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_vpc_flow_logs_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. The parent resource of the VpcFlowLogsConfig, - # in one of the following formats: - # - # - For project-level resources: `projects/{project_id}/locations/global` - # - # - For organization-level resources: - # `organizations/{organization_id}/locations/global` - # @param page_size [::Integer] - # Optional. Number of `VpcFlowLogsConfigs` to return. - # @param page_token [::String] - # Optional. Page token from an earlier query, as returned in - # `next_page_token`. - # @param filter [::String] - # Optional. Lists the `VpcFlowLogsConfigs` that match the filter expression. - # A filter expression must use the supported [CEL logic operators] - # (https://cloud.google.com/vpc/docs/about-flow-logs-records#supported_cel_logic_operators). - # @param order_by [::String] - # Optional. Field to use to sort the list. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::NetworkManagement::V1::VpcFlowLogsConfig>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::NetworkManagement::V1::VpcFlowLogsConfig>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/network_management/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkManagement::V1::VpcFlowLogsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkManagement::V1::ListVpcFlowLogsConfigsRequest.new - # - # # Call the list_vpc_flow_logs_configs method. - # result = client.list_vpc_flow_logs_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::NetworkManagement::V1::VpcFlowLogsConfig. - # p item - # end - # - def list_vpc_flow_logs_configs request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkManagement::V1::ListVpcFlowLogsConfigsRequest - - # 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_vpc_flow_logs_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::NetworkManagement::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_vpc_flow_logs_configs.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_vpc_flow_logs_configs.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @vpc_flow_logs_service_stub.call_rpc :list_vpc_flow_logs_configs, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @vpc_flow_logs_service_stub, :list_vpc_flow_logs_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 - - ## - # Gets the details of a specific `VpcFlowLogsConfig`. - # - # @overload get_vpc_flow_logs_config(request, options = nil) - # Pass arguments to `get_vpc_flow_logs_config` via a request object, either of type - # {::Google::Cloud::NetworkManagement::V1::GetVpcFlowLogsConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkManagement::V1::GetVpcFlowLogsConfigRequest, ::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_vpc_flow_logs_config(name: nil) - # Pass arguments to `get_vpc_flow_logs_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. The resource name of the VpcFlowLogsConfig, - # in one of the following formats: - # - # - For project-level resources: - # `projects/{project_id}/locations/global/vpcFlowLogsConfigs/{vpc_flow_logs_config_id}` - # - # - For organization-level resources: - # `organizations/{organization_id}/locations/global/vpcFlowLogsConfigs/{vpc_flow_logs_config_id}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::NetworkManagement::V1::VpcFlowLogsConfig] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::NetworkManagement::V1::VpcFlowLogsConfig] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/network_management/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkManagement::V1::VpcFlowLogsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkManagement::V1::GetVpcFlowLogsConfigRequest.new - # - # # Call the get_vpc_flow_logs_config method. - # result = client.get_vpc_flow_logs_config request - # - # # The returned object is of type Google::Cloud::NetworkManagement::V1::VpcFlowLogsConfig. - # p result - # - def get_vpc_flow_logs_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkManagement::V1::GetVpcFlowLogsConfigRequest - - # 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_vpc_flow_logs_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::NetworkManagement::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_vpc_flow_logs_config.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_vpc_flow_logs_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @vpc_flow_logs_service_stub.call_rpc :get_vpc_flow_logs_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 - - ## - # Creates a new `VpcFlowLogsConfig`. - # If a configuration with the exact same settings already exists (even if the - # ID is different), the creation fails. - # Notes: - # - # 1. Creating a configuration with `state=DISABLED` will fail - # 2. The following fields are not considered as settings for the purpose - # of the check mentioned above, therefore - creating another configuration - # with the same fields but different values for the following fields will - # fail as well: - # * name - # * create_time - # * update_time - # * labels - # * description - # - # @overload create_vpc_flow_logs_config(request, options = nil) - # Pass arguments to `create_vpc_flow_logs_config` via a request object, either of type - # {::Google::Cloud::NetworkManagement::V1::CreateVpcFlowLogsConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkManagement::V1::CreateVpcFlowLogsConfigRequest, ::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_vpc_flow_logs_config(parent: nil, vpc_flow_logs_config_id: nil, vpc_flow_logs_config: nil) - # Pass arguments to `create_vpc_flow_logs_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. The parent resource of the VpcFlowLogsConfig to create, - # in one of the following formats: - # - # - For project-level resources: `projects/{project_id}/locations/global` - # - # - For organization-level resources: - # `organizations/{organization_id}/locations/global` - # @param vpc_flow_logs_config_id [::String] - # Required. ID of the `VpcFlowLogsConfig`. - # @param vpc_flow_logs_config [::Google::Cloud::NetworkManagement::V1::VpcFlowLogsConfig, ::Hash] - # Required. A `VpcFlowLogsConfig` 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/network_management/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkManagement::V1::VpcFlowLogsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkManagement::V1::CreateVpcFlowLogsConfigRequest.new - # - # # Call the create_vpc_flow_logs_config method. - # result = client.create_vpc_flow_logs_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_vpc_flow_logs_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkManagement::V1::CreateVpcFlowLogsConfigRequest - - # 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_vpc_flow_logs_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::NetworkManagement::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_vpc_flow_logs_config.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_vpc_flow_logs_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @vpc_flow_logs_service_stub.call_rpc :create_vpc_flow_logs_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 - - ## - # Updates an existing `VpcFlowLogsConfig`. - # If a configuration with the exact same settings already exists (even if the - # ID is different), the creation fails. - # Notes: - # - # 1. Updating a configuration with `state=DISABLED` will fail. - # 2. The following fields are not considered as settings for the purpose - # of the check mentioned above, therefore - updating another configuration - # with the same fields but different values for the following fields will - # fail as well: - # * name - # * create_time - # * update_time - # * labels - # * description - # - # @overload update_vpc_flow_logs_config(request, options = nil) - # Pass arguments to `update_vpc_flow_logs_config` via a request object, either of type - # {::Google::Cloud::NetworkManagement::V1::UpdateVpcFlowLogsConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkManagement::V1::UpdateVpcFlowLogsConfigRequest, ::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_vpc_flow_logs_config(update_mask: nil, vpc_flow_logs_config: nil) - # Pass arguments to `update_vpc_flow_logs_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 update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. Mask of fields to update. At least one path must be supplied in - # this field. - # For example, to change the state of the configuration to ENABLED, specify - # `update_mask` = `"state"`, and the `vpc_flow_logs_config` would be: - # `vpc_flow_logs_config = { - # name = - # "projects/my-project/locations/global/vpcFlowLogsConfigs/my-config" - # state = "ENABLED" }` - # @param vpc_flow_logs_config [::Google::Cloud::NetworkManagement::V1::VpcFlowLogsConfig, ::Hash] - # Required. Only fields specified in update_mask are updated. - # - # @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/network_management/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkManagement::V1::VpcFlowLogsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkManagement::V1::UpdateVpcFlowLogsConfigRequest.new - # - # # Call the update_vpc_flow_logs_config method. - # result = client.update_vpc_flow_logs_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_vpc_flow_logs_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkManagement::V1::UpdateVpcFlowLogsConfigRequest - - # 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_vpc_flow_logs_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::NetworkManagement::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.vpc_flow_logs_config&.name - header_params["vpc_flow_logs_config.name"] = request.vpc_flow_logs_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_vpc_flow_logs_config.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_vpc_flow_logs_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @vpc_flow_logs_service_stub.call_rpc :update_vpc_flow_logs_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 specific `VpcFlowLogsConfig`. - # - # @overload delete_vpc_flow_logs_config(request, options = nil) - # Pass arguments to `delete_vpc_flow_logs_config` via a request object, either of type - # {::Google::Cloud::NetworkManagement::V1::DeleteVpcFlowLogsConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkManagement::V1::DeleteVpcFlowLogsConfigRequest, ::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_vpc_flow_logs_config(name: nil) - # Pass arguments to `delete_vpc_flow_logs_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. The resource name of the VpcFlowLogsConfig, - # in one of the following formats: - # - # - For a project-level resource: - # `projects/{project_id}/locations/global/vpcFlowLogsConfigs/{vpc_flow_logs_config_id}` - # - # - For an organization-level resource: - # `organizations/{organization_id}/locations/global/vpcFlowLogsConfigs/{vpc_flow_logs_config_id}` - # - # @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/network_management/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkManagement::V1::VpcFlowLogsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkManagement::V1::DeleteVpcFlowLogsConfigRequest.new - # - # # Call the delete_vpc_flow_logs_config method. - # result = client.delete_vpc_flow_logs_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_vpc_flow_logs_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkManagement::V1::DeleteVpcFlowLogsConfigRequest - - # 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_vpc_flow_logs_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::NetworkManagement::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_vpc_flow_logs_config.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_vpc_flow_logs_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @vpc_flow_logs_service_stub.call_rpc :delete_vpc_flow_logs_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 - - ## - # QueryOrgVpcFlowLogsConfigs returns a list of all organization-level VPC - # Flow Logs configurations applicable to the specified project. - # - # @overload query_org_vpc_flow_logs_configs(request, options = nil) - # Pass arguments to `query_org_vpc_flow_logs_configs` via a request object, either of type - # {::Google::Cloud::NetworkManagement::V1::QueryOrgVpcFlowLogsConfigsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkManagement::V1::QueryOrgVpcFlowLogsConfigsRequest, ::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 query_org_vpc_flow_logs_configs(parent: nil, page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `query_org_vpc_flow_logs_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. The parent resource of the VpcFlowLogsConfig, specified in - # the following format: `projects/{project_id}/locations/global` - # @param page_size [::Integer] - # Optional. Number of `VpcFlowLogsConfigs` to return. - # @param page_token [::String] - # Optional. Page token from an earlier query, as returned in - # `next_page_token`. - # @param filter [::String] - # Optional. Lists the `VpcFlowLogsConfigs` that match the filter expression. - # A filter expression must use the supported [CEL logic operators] - # (https://cloud.google.com/vpc/docs/about-flow-logs-records#supported_cel_logic_operators). - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::NetworkManagement::V1::VpcFlowLogsConfig>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::NetworkManagement::V1::VpcFlowLogsConfig>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/network_management/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkManagement::V1::VpcFlowLogsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkManagement::V1::QueryOrgVpcFlowLogsConfigsRequest.new - # - # # Call the query_org_vpc_flow_logs_configs method. - # result = client.query_org_vpc_flow_logs_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::NetworkManagement::V1::VpcFlowLogsConfig. - # p item - # end - # - def query_org_vpc_flow_logs_configs request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkManagement::V1::QueryOrgVpcFlowLogsConfigsRequest - - # 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.query_org_vpc_flow_logs_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::NetworkManagement::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.query_org_vpc_flow_logs_configs.timeout, - metadata: metadata, - retry_policy: @config.rpcs.query_org_vpc_flow_logs_configs.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @vpc_flow_logs_service_stub.call_rpc :query_org_vpc_flow_logs_configs, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @vpc_flow_logs_service_stub, :query_org_vpc_flow_logs_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 - - ## - # ShowEffectiveFlowLogsConfigs returns a list of all VPC Flow Logs - # configurations applicable to a specified resource. - # - # @overload show_effective_flow_logs_configs(request, options = nil) - # Pass arguments to `show_effective_flow_logs_configs` via a request object, either of type - # {::Google::Cloud::NetworkManagement::V1::ShowEffectiveFlowLogsConfigsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkManagement::V1::ShowEffectiveFlowLogsConfigsRequest, ::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 show_effective_flow_logs_configs(parent: nil, resource: nil, page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `show_effective_flow_logs_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. The parent resource of the VpcFlowLogsConfig, specified in - # the following format: `projects/{project_id}/locations/global` - # @param resource [::String] - # Required. The resource to get the effective VPC Flow Logs configuration - # for. The resource must belong to the same project as the parent. The - # resource must be a network, subnetwork, interconnect attachment, VPN - # tunnel, or a project. - # @param page_size [::Integer] - # Optional. Number of `EffectiveVpcFlowLogsConfigs` to return. Default is 30. - # @param page_token [::String] - # Optional. Page token from an earlier query, as returned in - # `next_page_token`. - # @param filter [::String] - # Optional. Lists the `EffectiveVpcFlowLogsConfigs` that match the filter - # expression. A filter expression must use the supported [CEL logic - # operators] - # (https://cloud.google.com/vpc/docs/about-flow-logs-records#supported_cel_logic_operators). - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::NetworkManagement::V1::EffectiveVpcFlowLogsConfig>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::NetworkManagement::V1::EffectiveVpcFlowLogsConfig>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/network_management/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkManagement::V1::VpcFlowLogsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkManagement::V1::ShowEffectiveFlowLogsConfigsRequest.new - # - # # Call the show_effective_flow_logs_configs method. - # result = client.show_effective_flow_logs_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::NetworkManagement::V1::EffectiveVpcFlowLogsConfig. - # p item - # end - # - def show_effective_flow_logs_configs request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkManagement::V1::ShowEffectiveFlowLogsConfigsRequest - - # 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.show_effective_flow_logs_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::NetworkManagement::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.show_effective_flow_logs_configs.timeout, - metadata: metadata, - retry_policy: @config.rpcs.show_effective_flow_logs_configs.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @vpc_flow_logs_service_stub.call_rpc :show_effective_flow_logs_configs, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @vpc_flow_logs_service_stub, :show_effective_flow_logs_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 - - ## - # Configuration class for the VpcFlowLogsService API. - # - # This class represents the configuration for VpcFlowLogsService, - # 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::NetworkManagement::V1::VpcFlowLogsService::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_vpc_flow_logs_configs to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::NetworkManagement::V1::VpcFlowLogsService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_vpc_flow_logs_configs.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::NetworkManagement::V1::VpcFlowLogsService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_vpc_flow_logs_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::NetworkManagement::V1::VpcFlowLogsService::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 = "networkmanagement.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 VpcFlowLogsService 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_vpc_flow_logs_configs` - # @return [::Gapic::Config::Method] - # - attr_reader :list_vpc_flow_logs_configs - ## - # RPC-specific configuration for `get_vpc_flow_logs_config` - # @return [::Gapic::Config::Method] - # - attr_reader :get_vpc_flow_logs_config - ## - # RPC-specific configuration for `create_vpc_flow_logs_config` - # @return [::Gapic::Config::Method] - # - attr_reader :create_vpc_flow_logs_config - ## - # RPC-specific configuration for `update_vpc_flow_logs_config` - # @return [::Gapic::Config::Method] - # - attr_reader :update_vpc_flow_logs_config - ## - # RPC-specific configuration for `delete_vpc_flow_logs_config` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_vpc_flow_logs_config - ## - # RPC-specific configuration for `query_org_vpc_flow_logs_configs` - # @return [::Gapic::Config::Method] - # - attr_reader :query_org_vpc_flow_logs_configs - ## - # RPC-specific configuration for `show_effective_flow_logs_configs` - # @return [::Gapic::Config::Method] - # - attr_reader :show_effective_flow_logs_configs - - # @private - def initialize parent_rpcs = nil - list_vpc_flow_logs_configs_config = parent_rpcs.list_vpc_flow_logs_configs if parent_rpcs.respond_to? :list_vpc_flow_logs_configs - @list_vpc_flow_logs_configs = ::Gapic::Config::Method.new list_vpc_flow_logs_configs_config - get_vpc_flow_logs_config_config = parent_rpcs.get_vpc_flow_logs_config if parent_rpcs.respond_to? :get_vpc_flow_logs_config - @get_vpc_flow_logs_config = ::Gapic::Config::Method.new get_vpc_flow_logs_config_config - create_vpc_flow_logs_config_config = parent_rpcs.create_vpc_flow_logs_config if parent_rpcs.respond_to? :create_vpc_flow_logs_config - @create_vpc_flow_logs_config = ::Gapic::Config::Method.new create_vpc_flow_logs_config_config - update_vpc_flow_logs_config_config = parent_rpcs.update_vpc_flow_logs_config if parent_rpcs.respond_to? :update_vpc_flow_logs_config - @update_vpc_flow_logs_config = ::Gapic::Config::Method.new update_vpc_flow_logs_config_config - delete_vpc_flow_logs_config_config = parent_rpcs.delete_vpc_flow_logs_config if parent_rpcs.respond_to? :delete_vpc_flow_logs_config - @delete_vpc_flow_logs_config = ::Gapic::Config::Method.new delete_vpc_flow_logs_config_config - query_org_vpc_flow_logs_configs_config = parent_rpcs.query_org_vpc_flow_logs_configs if parent_rpcs.respond_to? :query_org_vpc_flow_logs_configs - @query_org_vpc_flow_logs_configs = ::Gapic::Config::Method.new query_org_vpc_flow_logs_configs_config - show_effective_flow_logs_configs_config = parent_rpcs.show_effective_flow_logs_configs if parent_rpcs.respond_to? :show_effective_flow_logs_configs - @show_effective_flow_logs_configs = ::Gapic::Config::Method.new show_effective_flow_logs_configs_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/vpc_flow_logs_service/credentials.rb b/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/vpc_flow_logs_service/credentials.rb deleted file mode 100644 index c68e48fec97d..000000000000 --- a/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/vpc_flow_logs_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 NetworkManagement - module V1 - module VpcFlowLogsService - # Credentials for the VpcFlowLogsService 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-network_management-v1/lib/google/cloud/network_management/v1/vpc_flow_logs_service/operations.rb b/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/vpc_flow_logs_service/operations.rb deleted file mode 100644 index c9ecd671bee7..000000000000 --- a/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/vpc_flow_logs_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 NetworkManagement - module V1 - module VpcFlowLogsService - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "networkmanagement.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the VpcFlowLogsService 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 VpcFlowLogsService 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::NetworkManagement::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::NetworkManagement::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::NetworkManagement::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::NetworkManagement::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::NetworkManagement::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 = "networkmanagement.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-network_management-v1/lib/google/cloud/network_management/v1/vpc_flow_logs_service/paths.rb b/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/vpc_flow_logs_service/paths.rb deleted file mode 100644 index 09614020a8c1..000000000000 --- a/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/vpc_flow_logs_service/paths.rb +++ /dev/null @@ -1,110 +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 NetworkManagement - module V1 - module VpcFlowLogsService - # Path helper methods for the VpcFlowLogsService API. - module Paths - ## - # 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 OrganizationLocation resource string. - # - # The resource will be in the following format: - # - # `organizations/{organization}/locations/{location}` - # - # @param organization [String] - # @param location [String] - # - # @return [::String] - def organization_location_path organization:, location: - raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" - - "organizations/#{organization}/locations/#{location}" - end - - ## - # Create a fully-qualified VpcFlowLogsConfig resource string. - # - # @overload vpc_flow_logs_config_path(project:, location:, vpc_flow_logs_config:) - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/vpcFlowLogsConfigs/{vpc_flow_logs_config}` - # - # @param project [String] - # @param location [String] - # @param vpc_flow_logs_config [String] - # - # @overload vpc_flow_logs_config_path(organization:, location:, vpc_flow_logs_config:) - # The resource will be in the following format: - # - # `organizations/{organization}/locations/{location}/vpcFlowLogsConfigs/{vpc_flow_logs_config}` - # - # @param organization [String] - # @param location [String] - # @param vpc_flow_logs_config [String] - # - # @return [::String] - def vpc_flow_logs_config_path **args - resources = { - "location:project:vpc_flow_logs_config" => (proc do |project:, location:, vpc_flow_logs_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}/vpcFlowLogsConfigs/#{vpc_flow_logs_config}" - end), - "location:organization:vpc_flow_logs_config" => (proc do |organization:, location:, vpc_flow_logs_config:| - raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "organizations/#{organization}/locations/#{location}/vpcFlowLogsConfigs/#{vpc_flow_logs_config}" - end) - } - - resource = resources[args.keys.sort.join(":")] - raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? - resource.call(**args) - end - - extend self - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/vpc_flow_logs_service/rest.rb b/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/vpc_flow_logs_service/rest.rb deleted file mode 100644 index 24bf8e874555..000000000000 --- a/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/vpc_flow_logs_service/rest.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/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/network_management/v1/version" -require "google/cloud/network_management/v1/bindings_override" - -require "google/cloud/network_management/v1/vpc_flow_logs_service/credentials" -require "google/cloud/network_management/v1/vpc_flow_logs_service/paths" -require "google/cloud/network_management/v1/vpc_flow_logs_service/rest/operations" -require "google/cloud/network_management/v1/vpc_flow_logs_service/rest/client" - -module Google - module Cloud - module NetworkManagement - module V1 - ## - # The VPC Flow Logs service in the Google Cloud Network Management API provides - # configurations that generate Flow Logs. The service and the configuration - # resources created using this service are global. - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/network_management/v1/vpc_flow_logs_service/rest" - # client = ::Google::Cloud::NetworkManagement::V1::VpcFlowLogsService::Rest::Client.new - # - module VpcFlowLogsService - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/network_management/v1/vpc_flow_logs_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/vpc_flow_logs_service/rest/client.rb b/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/vpc_flow_logs_service/rest/client.rb deleted file mode 100644 index ca91750d3348..000000000000 --- a/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/vpc_flow_logs_service/rest/client.rb +++ /dev/null @@ -1,1142 +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/networkmanagement/v1/vpc_flow_logs_pb" -require "google/cloud/network_management/v1/vpc_flow_logs_service/rest/service_stub" -require "google/cloud/location/rest" -require "google/iam/v1/rest" - -module Google - module Cloud - module NetworkManagement - module V1 - module VpcFlowLogsService - module Rest - ## - # REST client for the VpcFlowLogsService service. - # - # The VPC Flow Logs service in the Google Cloud Network Management API provides - # configurations that generate Flow Logs. The service and the configuration - # resources created using this service are global. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "networkmanagement.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :vpc_flow_logs_service_stub - - ## - # Configure the VpcFlowLogsService Client class. - # - # See {::Google::Cloud::NetworkManagement::V1::VpcFlowLogsService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all VpcFlowLogsService clients - # ::Google::Cloud::NetworkManagement::V1::VpcFlowLogsService::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", "NetworkManagement", "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 VpcFlowLogsService 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::NetworkManagement::V1::VpcFlowLogsService::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 - @vpc_flow_logs_service_stub.universe_domain - end - - ## - # Create a new VpcFlowLogsService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::NetworkManagement::V1::VpcFlowLogsService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::NetworkManagement::V1::VpcFlowLogsService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the VpcFlowLogsService 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::NetworkManagement::V1::VpcFlowLogsService::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 - - @vpc_flow_logs_service_stub = ::Google::Cloud::NetworkManagement::V1::VpcFlowLogsService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @vpc_flow_logs_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 = @vpc_flow_logs_service_stub.endpoint - config.universe_domain = @vpc_flow_logs_service_stub.universe_domain - config.bindings_override = @config.bindings_override - config.logger = @vpc_flow_logs_service_stub.logger if config.respond_to? :logger= - end - - @iam_policy_client = Google::Iam::V1::IAMPolicy::Rest::Client.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @vpc_flow_logs_service_stub.endpoint - config.universe_domain = @vpc_flow_logs_service_stub.universe_domain - config.bindings_override = @config.bindings_override - config.logger = @vpc_flow_logs_service_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::NetworkManagement::V1::VpcFlowLogsService::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 - - ## - # Get the associated client for mix-in of the IAMPolicy. - # - # @return [Google::Iam::V1::IAMPolicy::Rest::Client] - # - attr_reader :iam_policy_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @vpc_flow_logs_service_stub.logger - end - - # Service calls - - ## - # Lists all `VpcFlowLogsConfigs` in a given project. - # - # @overload list_vpc_flow_logs_configs(request, options = nil) - # Pass arguments to `list_vpc_flow_logs_configs` via a request object, either of type - # {::Google::Cloud::NetworkManagement::V1::ListVpcFlowLogsConfigsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkManagement::V1::ListVpcFlowLogsConfigsRequest, ::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_vpc_flow_logs_configs(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_vpc_flow_logs_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. The parent resource of the VpcFlowLogsConfig, - # in one of the following formats: - # - # - For project-level resources: `projects/{project_id}/locations/global` - # - # - For organization-level resources: - # `organizations/{organization_id}/locations/global` - # @param page_size [::Integer] - # Optional. Number of `VpcFlowLogsConfigs` to return. - # @param page_token [::String] - # Optional. Page token from an earlier query, as returned in - # `next_page_token`. - # @param filter [::String] - # Optional. Lists the `VpcFlowLogsConfigs` that match the filter expression. - # A filter expression must use the supported [CEL logic operators] - # (https://cloud.google.com/vpc/docs/about-flow-logs-records#supported_cel_logic_operators). - # @param order_by [::String] - # Optional. Field to use to sort the list. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkManagement::V1::VpcFlowLogsConfig>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkManagement::V1::VpcFlowLogsConfig>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/network_management/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkManagement::V1::VpcFlowLogsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkManagement::V1::ListVpcFlowLogsConfigsRequest.new - # - # # Call the list_vpc_flow_logs_configs method. - # result = client.list_vpc_flow_logs_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::NetworkManagement::V1::VpcFlowLogsConfig. - # p item - # end - # - def list_vpc_flow_logs_configs request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkManagement::V1::ListVpcFlowLogsConfigsRequest - - # 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_vpc_flow_logs_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::NetworkManagement::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_vpc_flow_logs_configs.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_vpc_flow_logs_configs.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @vpc_flow_logs_service_stub.list_vpc_flow_logs_configs request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @vpc_flow_logs_service_stub, :list_vpc_flow_logs_configs, "vpc_flow_logs_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 - - ## - # Gets the details of a specific `VpcFlowLogsConfig`. - # - # @overload get_vpc_flow_logs_config(request, options = nil) - # Pass arguments to `get_vpc_flow_logs_config` via a request object, either of type - # {::Google::Cloud::NetworkManagement::V1::GetVpcFlowLogsConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkManagement::V1::GetVpcFlowLogsConfigRequest, ::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_vpc_flow_logs_config(name: nil) - # Pass arguments to `get_vpc_flow_logs_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. The resource name of the VpcFlowLogsConfig, - # in one of the following formats: - # - # - For project-level resources: - # `projects/{project_id}/locations/global/vpcFlowLogsConfigs/{vpc_flow_logs_config_id}` - # - # - For organization-level resources: - # `organizations/{organization_id}/locations/global/vpcFlowLogsConfigs/{vpc_flow_logs_config_id}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::NetworkManagement::V1::VpcFlowLogsConfig] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::NetworkManagement::V1::VpcFlowLogsConfig] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/network_management/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkManagement::V1::VpcFlowLogsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkManagement::V1::GetVpcFlowLogsConfigRequest.new - # - # # Call the get_vpc_flow_logs_config method. - # result = client.get_vpc_flow_logs_config request - # - # # The returned object is of type Google::Cloud::NetworkManagement::V1::VpcFlowLogsConfig. - # p result - # - def get_vpc_flow_logs_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkManagement::V1::GetVpcFlowLogsConfigRequest - - # 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_vpc_flow_logs_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::NetworkManagement::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_vpc_flow_logs_config.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_vpc_flow_logs_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @vpc_flow_logs_service_stub.get_vpc_flow_logs_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 - - ## - # Creates a new `VpcFlowLogsConfig`. - # If a configuration with the exact same settings already exists (even if the - # ID is different), the creation fails. - # Notes: - # - # 1. Creating a configuration with `state=DISABLED` will fail - # 2. The following fields are not considered as settings for the purpose - # of the check mentioned above, therefore - creating another configuration - # with the same fields but different values for the following fields will - # fail as well: - # * name - # * create_time - # * update_time - # * labels - # * description - # - # @overload create_vpc_flow_logs_config(request, options = nil) - # Pass arguments to `create_vpc_flow_logs_config` via a request object, either of type - # {::Google::Cloud::NetworkManagement::V1::CreateVpcFlowLogsConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkManagement::V1::CreateVpcFlowLogsConfigRequest, ::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_vpc_flow_logs_config(parent: nil, vpc_flow_logs_config_id: nil, vpc_flow_logs_config: nil) - # Pass arguments to `create_vpc_flow_logs_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. The parent resource of the VpcFlowLogsConfig to create, - # in one of the following formats: - # - # - For project-level resources: `projects/{project_id}/locations/global` - # - # - For organization-level resources: - # `organizations/{organization_id}/locations/global` - # @param vpc_flow_logs_config_id [::String] - # Required. ID of the `VpcFlowLogsConfig`. - # @param vpc_flow_logs_config [::Google::Cloud::NetworkManagement::V1::VpcFlowLogsConfig, ::Hash] - # Required. A `VpcFlowLogsConfig` 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/network_management/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkManagement::V1::VpcFlowLogsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkManagement::V1::CreateVpcFlowLogsConfigRequest.new - # - # # Call the create_vpc_flow_logs_config method. - # result = client.create_vpc_flow_logs_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_vpc_flow_logs_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkManagement::V1::CreateVpcFlowLogsConfigRequest - - # 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_vpc_flow_logs_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::NetworkManagement::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_vpc_flow_logs_config.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_vpc_flow_logs_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @vpc_flow_logs_service_stub.create_vpc_flow_logs_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 - - ## - # Updates an existing `VpcFlowLogsConfig`. - # If a configuration with the exact same settings already exists (even if the - # ID is different), the creation fails. - # Notes: - # - # 1. Updating a configuration with `state=DISABLED` will fail. - # 2. The following fields are not considered as settings for the purpose - # of the check mentioned above, therefore - updating another configuration - # with the same fields but different values for the following fields will - # fail as well: - # * name - # * create_time - # * update_time - # * labels - # * description - # - # @overload update_vpc_flow_logs_config(request, options = nil) - # Pass arguments to `update_vpc_flow_logs_config` via a request object, either of type - # {::Google::Cloud::NetworkManagement::V1::UpdateVpcFlowLogsConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkManagement::V1::UpdateVpcFlowLogsConfigRequest, ::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_vpc_flow_logs_config(update_mask: nil, vpc_flow_logs_config: nil) - # Pass arguments to `update_vpc_flow_logs_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 update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. Mask of fields to update. At least one path must be supplied in - # this field. - # For example, to change the state of the configuration to ENABLED, specify - # `update_mask` = `"state"`, and the `vpc_flow_logs_config` would be: - # `vpc_flow_logs_config = { - # name = - # "projects/my-project/locations/global/vpcFlowLogsConfigs/my-config" - # state = "ENABLED" }` - # @param vpc_flow_logs_config [::Google::Cloud::NetworkManagement::V1::VpcFlowLogsConfig, ::Hash] - # Required. Only fields specified in update_mask are updated. - # @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/network_management/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkManagement::V1::VpcFlowLogsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkManagement::V1::UpdateVpcFlowLogsConfigRequest.new - # - # # Call the update_vpc_flow_logs_config method. - # result = client.update_vpc_flow_logs_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_vpc_flow_logs_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkManagement::V1::UpdateVpcFlowLogsConfigRequest - - # 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_vpc_flow_logs_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::NetworkManagement::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_vpc_flow_logs_config.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_vpc_flow_logs_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @vpc_flow_logs_service_stub.update_vpc_flow_logs_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 specific `VpcFlowLogsConfig`. - # - # @overload delete_vpc_flow_logs_config(request, options = nil) - # Pass arguments to `delete_vpc_flow_logs_config` via a request object, either of type - # {::Google::Cloud::NetworkManagement::V1::DeleteVpcFlowLogsConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkManagement::V1::DeleteVpcFlowLogsConfigRequest, ::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_vpc_flow_logs_config(name: nil) - # Pass arguments to `delete_vpc_flow_logs_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. The resource name of the VpcFlowLogsConfig, - # in one of the following formats: - # - # - For a project-level resource: - # `projects/{project_id}/locations/global/vpcFlowLogsConfigs/{vpc_flow_logs_config_id}` - # - # - For an organization-level resource: - # `organizations/{organization_id}/locations/global/vpcFlowLogsConfigs/{vpc_flow_logs_config_id}` - # @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/network_management/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkManagement::V1::VpcFlowLogsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkManagement::V1::DeleteVpcFlowLogsConfigRequest.new - # - # # Call the delete_vpc_flow_logs_config method. - # result = client.delete_vpc_flow_logs_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_vpc_flow_logs_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkManagement::V1::DeleteVpcFlowLogsConfigRequest - - # 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_vpc_flow_logs_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::NetworkManagement::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_vpc_flow_logs_config.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_vpc_flow_logs_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @vpc_flow_logs_service_stub.delete_vpc_flow_logs_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 - - ## - # QueryOrgVpcFlowLogsConfigs returns a list of all organization-level VPC - # Flow Logs configurations applicable to the specified project. - # - # @overload query_org_vpc_flow_logs_configs(request, options = nil) - # Pass arguments to `query_org_vpc_flow_logs_configs` via a request object, either of type - # {::Google::Cloud::NetworkManagement::V1::QueryOrgVpcFlowLogsConfigsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkManagement::V1::QueryOrgVpcFlowLogsConfigsRequest, ::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 query_org_vpc_flow_logs_configs(parent: nil, page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `query_org_vpc_flow_logs_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. The parent resource of the VpcFlowLogsConfig, specified in - # the following format: `projects/{project_id}/locations/global` - # @param page_size [::Integer] - # Optional. Number of `VpcFlowLogsConfigs` to return. - # @param page_token [::String] - # Optional. Page token from an earlier query, as returned in - # `next_page_token`. - # @param filter [::String] - # Optional. Lists the `VpcFlowLogsConfigs` that match the filter expression. - # A filter expression must use the supported [CEL logic operators] - # (https://cloud.google.com/vpc/docs/about-flow-logs-records#supported_cel_logic_operators). - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkManagement::V1::VpcFlowLogsConfig>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkManagement::V1::VpcFlowLogsConfig>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/network_management/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkManagement::V1::VpcFlowLogsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkManagement::V1::QueryOrgVpcFlowLogsConfigsRequest.new - # - # # Call the query_org_vpc_flow_logs_configs method. - # result = client.query_org_vpc_flow_logs_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::NetworkManagement::V1::VpcFlowLogsConfig. - # p item - # end - # - def query_org_vpc_flow_logs_configs request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkManagement::V1::QueryOrgVpcFlowLogsConfigsRequest - - # 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.query_org_vpc_flow_logs_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::NetworkManagement::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.query_org_vpc_flow_logs_configs.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.query_org_vpc_flow_logs_configs.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @vpc_flow_logs_service_stub.query_org_vpc_flow_logs_configs request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @vpc_flow_logs_service_stub, :query_org_vpc_flow_logs_configs, "vpc_flow_logs_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 - - ## - # ShowEffectiveFlowLogsConfigs returns a list of all VPC Flow Logs - # configurations applicable to a specified resource. - # - # @overload show_effective_flow_logs_configs(request, options = nil) - # Pass arguments to `show_effective_flow_logs_configs` via a request object, either of type - # {::Google::Cloud::NetworkManagement::V1::ShowEffectiveFlowLogsConfigsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkManagement::V1::ShowEffectiveFlowLogsConfigsRequest, ::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 show_effective_flow_logs_configs(parent: nil, resource: nil, page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `show_effective_flow_logs_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. The parent resource of the VpcFlowLogsConfig, specified in - # the following format: `projects/{project_id}/locations/global` - # @param resource [::String] - # Required. The resource to get the effective VPC Flow Logs configuration - # for. The resource must belong to the same project as the parent. The - # resource must be a network, subnetwork, interconnect attachment, VPN - # tunnel, or a project. - # @param page_size [::Integer] - # Optional. Number of `EffectiveVpcFlowLogsConfigs` to return. Default is 30. - # @param page_token [::String] - # Optional. Page token from an earlier query, as returned in - # `next_page_token`. - # @param filter [::String] - # Optional. Lists the `EffectiveVpcFlowLogsConfigs` that match the filter - # expression. A filter expression must use the supported [CEL logic - # operators] - # (https://cloud.google.com/vpc/docs/about-flow-logs-records#supported_cel_logic_operators). - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkManagement::V1::EffectiveVpcFlowLogsConfig>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkManagement::V1::EffectiveVpcFlowLogsConfig>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/network_management/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkManagement::V1::VpcFlowLogsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkManagement::V1::ShowEffectiveFlowLogsConfigsRequest.new - # - # # Call the show_effective_flow_logs_configs method. - # result = client.show_effective_flow_logs_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::NetworkManagement::V1::EffectiveVpcFlowLogsConfig. - # p item - # end - # - def show_effective_flow_logs_configs request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkManagement::V1::ShowEffectiveFlowLogsConfigsRequest - - # 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.show_effective_flow_logs_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::NetworkManagement::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.show_effective_flow_logs_configs.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.show_effective_flow_logs_configs.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @vpc_flow_logs_service_stub.show_effective_flow_logs_configs request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @vpc_flow_logs_service_stub, :show_effective_flow_logs_configs, "effective_flow_logs_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 - - ## - # Configuration class for the VpcFlowLogsService REST API. - # - # This class represents the configuration for VpcFlowLogsService 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::NetworkManagement::V1::VpcFlowLogsService::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_vpc_flow_logs_configs to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::NetworkManagement::V1::VpcFlowLogsService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_vpc_flow_logs_configs.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::NetworkManagement::V1::VpcFlowLogsService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_vpc_flow_logs_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 = "networkmanagement.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 VpcFlowLogsService 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_vpc_flow_logs_configs` - # @return [::Gapic::Config::Method] - # - attr_reader :list_vpc_flow_logs_configs - ## - # RPC-specific configuration for `get_vpc_flow_logs_config` - # @return [::Gapic::Config::Method] - # - attr_reader :get_vpc_flow_logs_config - ## - # RPC-specific configuration for `create_vpc_flow_logs_config` - # @return [::Gapic::Config::Method] - # - attr_reader :create_vpc_flow_logs_config - ## - # RPC-specific configuration for `update_vpc_flow_logs_config` - # @return [::Gapic::Config::Method] - # - attr_reader :update_vpc_flow_logs_config - ## - # RPC-specific configuration for `delete_vpc_flow_logs_config` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_vpc_flow_logs_config - ## - # RPC-specific configuration for `query_org_vpc_flow_logs_configs` - # @return [::Gapic::Config::Method] - # - attr_reader :query_org_vpc_flow_logs_configs - ## - # RPC-specific configuration for `show_effective_flow_logs_configs` - # @return [::Gapic::Config::Method] - # - attr_reader :show_effective_flow_logs_configs - - # @private - def initialize parent_rpcs = nil - list_vpc_flow_logs_configs_config = parent_rpcs.list_vpc_flow_logs_configs if parent_rpcs.respond_to? :list_vpc_flow_logs_configs - @list_vpc_flow_logs_configs = ::Gapic::Config::Method.new list_vpc_flow_logs_configs_config - get_vpc_flow_logs_config_config = parent_rpcs.get_vpc_flow_logs_config if parent_rpcs.respond_to? :get_vpc_flow_logs_config - @get_vpc_flow_logs_config = ::Gapic::Config::Method.new get_vpc_flow_logs_config_config - create_vpc_flow_logs_config_config = parent_rpcs.create_vpc_flow_logs_config if parent_rpcs.respond_to? :create_vpc_flow_logs_config - @create_vpc_flow_logs_config = ::Gapic::Config::Method.new create_vpc_flow_logs_config_config - update_vpc_flow_logs_config_config = parent_rpcs.update_vpc_flow_logs_config if parent_rpcs.respond_to? :update_vpc_flow_logs_config - @update_vpc_flow_logs_config = ::Gapic::Config::Method.new update_vpc_flow_logs_config_config - delete_vpc_flow_logs_config_config = parent_rpcs.delete_vpc_flow_logs_config if parent_rpcs.respond_to? :delete_vpc_flow_logs_config - @delete_vpc_flow_logs_config = ::Gapic::Config::Method.new delete_vpc_flow_logs_config_config - query_org_vpc_flow_logs_configs_config = parent_rpcs.query_org_vpc_flow_logs_configs if parent_rpcs.respond_to? :query_org_vpc_flow_logs_configs - @query_org_vpc_flow_logs_configs = ::Gapic::Config::Method.new query_org_vpc_flow_logs_configs_config - show_effective_flow_logs_configs_config = parent_rpcs.show_effective_flow_logs_configs if parent_rpcs.respond_to? :show_effective_flow_logs_configs - @show_effective_flow_logs_configs = ::Gapic::Config::Method.new show_effective_flow_logs_configs_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/vpc_flow_logs_service/rest/operations.rb b/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/vpc_flow_logs_service/rest/operations.rb deleted file mode 100644 index d5fdcbd481d1..000000000000 --- a/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/vpc_flow_logs_service/rest/operations.rb +++ /dev/null @@ -1,954 +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 NetworkManagement - module V1 - module VpcFlowLogsService - module Rest - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "networkmanagement.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the VpcFlowLogsService 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 VpcFlowLogsService 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::NetworkManagement::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::NetworkManagement::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::NetworkManagement::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::NetworkManagement::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 = "networkmanagement.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/global/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}/operations", - matches: [ - ["name", %r{^organizations/[^/]+/locations/global/?$}, 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/global/operations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/locations/global/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/global/operations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/locations/global/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/global/operations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:cancel", - body: "*", - matches: [ - ["name", %r{^organizations/[^/]+/locations/global/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/vpc_flow_logs_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/vpc_flow_logs_service/rest/service_stub.rb deleted file mode 100644 index b528be315547..000000000000 --- a/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/network_management/v1/vpc_flow_logs_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/networkmanagement/v1/vpc_flow_logs_pb" - -module Google - module Cloud - module NetworkManagement - module V1 - module VpcFlowLogsService - module Rest - ## - # REST service stub for the VpcFlowLogsService 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_vpc_flow_logs_configs REST call - # - # @param request_pb [::Google::Cloud::NetworkManagement::V1::ListVpcFlowLogsConfigsRequest] - # 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::NetworkManagement::V1::ListVpcFlowLogsConfigsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::NetworkManagement::V1::ListVpcFlowLogsConfigsResponse] - # A result object deserialized from the server's reply - def list_vpc_flow_logs_configs request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_vpc_flow_logs_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_vpc_flow_logs_configs", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::NetworkManagement::V1::ListVpcFlowLogsConfigsResponse.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_vpc_flow_logs_config REST call - # - # @param request_pb [::Google::Cloud::NetworkManagement::V1::GetVpcFlowLogsConfigRequest] - # 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::NetworkManagement::V1::VpcFlowLogsConfig] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::NetworkManagement::V1::VpcFlowLogsConfig] - # A result object deserialized from the server's reply - def get_vpc_flow_logs_config request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_vpc_flow_logs_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_vpc_flow_logs_config", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::NetworkManagement::V1::VpcFlowLogsConfig.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_vpc_flow_logs_config REST call - # - # @param request_pb [::Google::Cloud::NetworkManagement::V1::CreateVpcFlowLogsConfigRequest] - # 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_vpc_flow_logs_config request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_vpc_flow_logs_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_vpc_flow_logs_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 update_vpc_flow_logs_config REST call - # - # @param request_pb [::Google::Cloud::NetworkManagement::V1::UpdateVpcFlowLogsConfigRequest] - # 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_vpc_flow_logs_config request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_vpc_flow_logs_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_vpc_flow_logs_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_vpc_flow_logs_config REST call - # - # @param request_pb [::Google::Cloud::NetworkManagement::V1::DeleteVpcFlowLogsConfigRequest] - # 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_vpc_flow_logs_config request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_vpc_flow_logs_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_vpc_flow_logs_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 query_org_vpc_flow_logs_configs REST call - # - # @param request_pb [::Google::Cloud::NetworkManagement::V1::QueryOrgVpcFlowLogsConfigsRequest] - # 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::NetworkManagement::V1::QueryOrgVpcFlowLogsConfigsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::NetworkManagement::V1::QueryOrgVpcFlowLogsConfigsResponse] - # A result object deserialized from the server's reply - def query_org_vpc_flow_logs_configs request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_query_org_vpc_flow_logs_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: "query_org_vpc_flow_logs_configs", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::NetworkManagement::V1::QueryOrgVpcFlowLogsConfigsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the show_effective_flow_logs_configs REST call - # - # @param request_pb [::Google::Cloud::NetworkManagement::V1::ShowEffectiveFlowLogsConfigsRequest] - # 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::NetworkManagement::V1::ShowEffectiveFlowLogsConfigsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::NetworkManagement::V1::ShowEffectiveFlowLogsConfigsResponse] - # A result object deserialized from the server's reply - def show_effective_flow_logs_configs request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_show_effective_flow_logs_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: "show_effective_flow_logs_configs", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::NetworkManagement::V1::ShowEffectiveFlowLogsConfigsResponse.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_vpc_flow_logs_configs REST call - # - # @param request_pb [::Google::Cloud::NetworkManagement::V1::ListVpcFlowLogsConfigsRequest] - # 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_vpc_flow_logs_configs_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/vpcFlowLogsConfigs", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_vpc_flow_logs_config REST call - # - # @param request_pb [::Google::Cloud::NetworkManagement::V1::GetVpcFlowLogsConfigRequest] - # 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_vpc_flow_logs_config_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/vpcFlowLogsConfigs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_vpc_flow_logs_config REST call - # - # @param request_pb [::Google::Cloud::NetworkManagement::V1::CreateVpcFlowLogsConfigRequest] - # 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_vpc_flow_logs_config_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/vpcFlowLogsConfigs", - body: "vpc_flow_logs_config", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_vpc_flow_logs_config REST call - # - # @param request_pb [::Google::Cloud::NetworkManagement::V1::UpdateVpcFlowLogsConfigRequest] - # 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_vpc_flow_logs_config_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{vpc_flow_logs_config.name}", - body: "vpc_flow_logs_config", - matches: [ - ["vpc_flow_logs_config.name", %r{^projects/[^/]+/locations/[^/]+/vpcFlowLogsConfigs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_vpc_flow_logs_config REST call - # - # @param request_pb [::Google::Cloud::NetworkManagement::V1::DeleteVpcFlowLogsConfigRequest] - # 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_vpc_flow_logs_config_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/vpcFlowLogsConfigs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the query_org_vpc_flow_logs_configs REST call - # - # @param request_pb [::Google::Cloud::NetworkManagement::V1::QueryOrgVpcFlowLogsConfigsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_query_org_vpc_flow_logs_configs_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/vpcFlowLogsConfigs:queryOrgVpcFlowLogsConfigs", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the show_effective_flow_logs_configs REST call - # - # @param request_pb [::Google::Cloud::NetworkManagement::V1::ShowEffectiveFlowLogsConfigsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_show_effective_flow_logs_configs_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/vpcFlowLogsConfigs:showEffectiveFlowLogsConfigs", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/networkmanagement/v1/connectivity_test_pb.rb b/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/networkmanagement/v1/connectivity_test_pb.rb deleted file mode 100644 index af52f0fdad6f..000000000000 --- a/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/networkmanagement/v1/connectivity_test_pb.rb +++ /dev/null @@ -1,66 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/networkmanagement/v1/connectivity_test.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/cloud/networkmanagement/v1/trace_pb' -require 'google/protobuf/timestamp_pb' -require 'google/rpc/status_pb' - - -descriptor_data = "\n9google/cloud/networkmanagement/v1/connectivity_test.proto\x12!google.cloud.networkmanagement.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a-google/cloud/networkmanagement/v1/trace.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto\"\xae\x07\n\x10\x43onnectivityTest\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12@\n\x06source\x18\x03 \x01(\x0b\x32+.google.cloud.networkmanagement.v1.EndpointB\x03\xe0\x41\x02\x12\x45\n\x0b\x64\x65stination\x18\x04 \x01(\x0b\x32+.google.cloud.networkmanagement.v1.EndpointB\x03\xe0\x41\x02\x12\x10\n\x08protocol\x18\x05 \x01(\t\x12\x18\n\x10related_projects\x18\x06 \x03(\t\x12\x19\n\x0c\x64isplay_name\x18\x07 \x01(\tB\x03\xe0\x41\x03\x12O\n\x06labels\x18\x08 \x03(\x0b\x32?.google.cloud.networkmanagement.v1.ConnectivityTest.LabelsEntry\x12\x34\n\x0b\x63reate_time\x18\n \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x0b \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12Y\n\x14reachability_details\x18\x0c \x01(\x0b\x32\x36.google.cloud.networkmanagement.v1.ReachabilityDetailsB\x03\xe0\x41\x03\x12O\n\x0fprobing_details\x18\x0e \x01(\x0b\x32\x31.google.cloud.networkmanagement.v1.ProbingDetailsB\x03\xe0\x41\x03\x12\x12\n\nround_trip\x18\x0f \x01(\x08\x12`\n\x1breturn_reachability_details\x18\x10 \x01(\x0b\x32\x36.google.cloud.networkmanagement.v1.ReachabilityDetailsB\x03\xe0\x41\x03\x12\x1e\n\x16\x62ypass_firewall_checks\x18\x11 \x01(\x08\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:t\xea\x41q\n1networkmanagement.googleapis.com/ConnectivityTest\x12.google.cloud.networkmanagement.v1.ProbingDetails.EdgeLocation\x12\\\n\x0e\x65\x64ge_responses\x18\n \x03(\x0b\x32\x44.google.cloud.networkmanagement.v1.ProbingDetails.SingleEdgeResponse\x12\x1a\n\x12probed_all_devices\x18\x0b \x01(\x08\x1a)\n\x0c\x45\x64geLocation\x12\x19\n\x11metropolitan_area\x18\x01 \x01(\t\x1a\xf1\x02\n\x12SingleEdgeResponse\x12O\n\x06result\x18\x01 \x01(\x0e\x32?.google.cloud.networkmanagement.v1.ProbingDetails.ProbingResult\x12\x18\n\x10sent_probe_count\x18\x02 \x01(\x05\x12\x1e\n\x16successful_probe_count\x18\x03 \x01(\x05\x12O\n\x0fprobing_latency\x18\x04 \x01(\x0b\x32\x36.google.cloud.networkmanagement.v1.LatencyDistribution\x12\x63\n\x1b\x64\x65stination_egress_location\x18\x05 \x01(\x0b\x32>.google.cloud.networkmanagement.v1.ProbingDetails.EdgeLocation\x12\x1a\n\x12\x64\x65stination_router\x18\x06 \x01(\t\"\x80\x01\n\rProbingResult\x12\x1e\n\x1aPROBING_RESULT_UNSPECIFIED\x10\x00\x12\r\n\tREACHABLE\x10\x01\x12\x0f\n\x0bUNREACHABLE\x10\x02\x12\x1d\n\x19REACHABILITY_INCONSISTENT\x10\x03\x12\x10\n\x0cUNDETERMINED\x10\x04\"g\n\x11ProbingAbortCause\x12#\n\x1fPROBING_ABORT_CAUSE_UNSPECIFIED\x10\x00\x12\x15\n\x11PERMISSION_DENIED\x10\x01\x12\x16\n\x12NO_SOURCE_LOCATION\x10\x02\x42\xfd\x01\n%com.google.cloud.networkmanagement.v1B\x0eTestOuterClassP\x01ZScloud.google.com/go/networkmanagement/apiv1/networkmanagementpb;networkmanagementpb\xaa\x02!Google.Cloud.NetworkManagement.V1\xca\x02!Google\\Cloud\\NetworkManagement\\V1\xea\x02$Google::Cloud::NetworkManagement::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"], - ["google.cloud.networkmanagement.v1.Trace", "google/cloud/networkmanagement/v1/trace.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 NetworkManagement - module V1 - ConnectivityTest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.ConnectivityTest").msgclass - Endpoint = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.Endpoint").msgclass - Endpoint::CloudFunctionEndpoint = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint").msgclass - Endpoint::AppEngineVersionEndpoint = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint").msgclass - Endpoint::CloudRunRevisionEndpoint = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint").msgclass - Endpoint::NetworkType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.Endpoint.NetworkType").enummodule - Endpoint::ForwardingRuleTarget = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.Endpoint.ForwardingRuleTarget").enummodule - ReachabilityDetails = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.ReachabilityDetails").msgclass - ReachabilityDetails::Result = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.ReachabilityDetails.Result").enummodule - LatencyPercentile = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.LatencyPercentile").msgclass - LatencyDistribution = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.LatencyDistribution").msgclass - ProbingDetails = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.ProbingDetails").msgclass - ProbingDetails::EdgeLocation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.ProbingDetails.EdgeLocation").msgclass - ProbingDetails::SingleEdgeResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.ProbingDetails.SingleEdgeResponse").msgclass - ProbingDetails::ProbingResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.ProbingDetails.ProbingResult").enummodule - ProbingDetails::ProbingAbortCause = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.ProbingDetails.ProbingAbortCause").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/networkmanagement/v1/reachability_pb.rb b/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/networkmanagement/v1/reachability_pb.rb deleted file mode 100644 index 492077f66e3f..000000000000 --- a/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/networkmanagement/v1/reachability_pb.rb +++ /dev/null @@ -1,62 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/networkmanagement/v1/reachability.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/cloud/networkmanagement/v1/connectivity_test_pb' -require 'google/longrunning/operations_pb' -require 'google/protobuf/empty_pb' -require 'google/protobuf/field_mask_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n4google/cloud/networkmanagement/v1/reachability.proto\x12!google.cloud.networkmanagement.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x39google/cloud/networkmanagement/v1/connectivity_test.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xac\x01\n\x1cListConnectivityTestsRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+cloudresourcemanager.googleapis.com/Project\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x04 \x01(\t\x12\x10\n\x08order_by\x18\x05 \x01(\t\"\x95\x01\n\x1dListConnectivityTestsResponse\x12\x46\n\tresources\x18\x01 \x03(\x0b\x32\x33.google.cloud.networkmanagement.v1.ConnectivityTest\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"e\n\x1aGetConnectivityTestRequest\x12G\n\x04name\x18\x01 \x01(\tB9\xe0\x41\x02\xfa\x41\x33\n1networkmanagement.googleapis.com/ConnectivityTest\"\xc6\x01\n\x1d\x43reateConnectivityTestRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+cloudresourcemanager.googleapis.com/Project\x12\x14\n\x07test_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12J\n\x08resource\x18\x03 \x01(\x0b\x32\x33.google.cloud.networkmanagement.v1.ConnectivityTestB\x03\xe0\x41\x02\"\xa1\x01\n\x1dUpdateConnectivityTestRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12J\n\x08resource\x18\x02 \x01(\x0b\x32\x33.google.cloud.networkmanagement.v1.ConnectivityTestB\x03\xe0\x41\x02\"h\n\x1d\x44\x65leteConnectivityTestRequest\x12G\n\x04name\x18\x01 \x01(\tB9\xe0\x41\x02\xfa\x41\x33\n1networkmanagement.googleapis.com/ConnectivityTest\"g\n\x1cRerunConnectivityTestRequest\x12G\n\x04name\x18\x01 \x01(\tB9\xe0\x41\x02\xfa\x41\x33\n1networkmanagement.googleapis.com/ConnectivityTest\"\xd6\x01\n\x11OperationMetadata\x12/\n\x0b\x63reate_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x0e\n\x06target\x18\x03 \x01(\t\x12\x0c\n\x04verb\x18\x04 \x01(\t\x12\x15\n\rstatus_detail\x18\x05 \x01(\t\x12\x18\n\x10\x63\x61ncel_requested\x18\x06 \x01(\x08\x12\x13\n\x0b\x61pi_version\x18\x07 \x01(\t2\x96\r\n\x13ReachabilityService\x12\xe7\x01\n\x15ListConnectivityTests\x12?.google.cloud.networkmanagement.v1.ListConnectivityTestsRequest\x1a@.google.cloud.networkmanagement.v1.ListConnectivityTestsResponse\"K\xda\x41\x06parent\x82\xd3\xe4\x93\x02<\x12:/v1/{parent=projects/*/locations/global}/connectivityTests\x12\xd4\x01\n\x13GetConnectivityTest\x12=.google.cloud.networkmanagement.v1.GetConnectivityTestRequest\x1a\x33.google.cloud.networkmanagement.v1.ConnectivityTest\"I\xda\x41\x04name\x82\xd3\xe4\x93\x02<\x12:/v1/{name=projects/*/locations/global/connectivityTests/*}\x12\xac\x02\n\x16\x43reateConnectivityTest\x12@.google.cloud.networkmanagement.v1.CreateConnectivityTestRequest\x1a\x1d.google.longrunning.Operation\"\xb0\x01\xca\x41G\n2google.cloud.networkmanagement.v1.ConnectivityTest\x12\x11OperationMetadata\xda\x41\x17parent,test_id,resource\x82\xd3\xe4\x93\x02\x46\":/v1/{parent=projects/*/locations/global}/connectivityTests:\x08resource\x12\xb2\x02\n\x16UpdateConnectivityTest\x12@.google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest\x1a\x1d.google.longrunning.Operation\"\xb6\x01\xca\x41G\n2google.cloud.networkmanagement.v1.ConnectivityTest\x12\x11OperationMetadata\xda\x41\x14update_mask,resource\x82\xd3\xe4\x93\x02O2C/v1/{resource.name=projects/*/locations/global/connectivityTests/*}:\x08resource\x12\x8f\x02\n\x15RerunConnectivityTest\x12?.google.cloud.networkmanagement.v1.RerunConnectivityTestRequest\x1a\x1d.google.longrunning.Operation\"\x95\x01\xca\x41G\n2google.cloud.networkmanagement.v1.ConnectivityTest\x12\x11OperationMetadata\x82\xd3\xe4\x93\x02\x45\"@/v1/{name=projects/*/locations/global/connectivityTests/*}:rerun:\x01*\x12\xf1\x01\n\x16\x44\x65leteConnectivityTest\x12@.google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest\x1a\x1d.google.longrunning.Operation\"v\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02<*:/v1/{name=projects/*/locations/global/connectivityTests/*}\x1aT\xca\x41 networkmanagement.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\x87\x02\n%com.google.cloud.networkmanagement.v1B\x18ReachabilityServiceProtoP\x01ZScloud.google.com/go/networkmanagement/apiv1/networkmanagementpb;networkmanagementpb\xaa\x02!Google.Cloud.NetworkManagement.V1\xca\x02!Google\\Cloud\\NetworkManagement\\V1\xea\x02$Google::Cloud::NetworkManagement::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.cloud.networkmanagement.v1.ConnectivityTest", "google/cloud/networkmanagement/v1/connectivity_test.proto"], - ["google.protobuf.FieldMask", "google/protobuf/field_mask.proto"], - ["google.protobuf.Timestamp", "google/protobuf/timestamp.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 NetworkManagement - module V1 - ListConnectivityTestsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.ListConnectivityTestsRequest").msgclass - ListConnectivityTestsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.ListConnectivityTestsResponse").msgclass - GetConnectivityTestRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.GetConnectivityTestRequest").msgclass - CreateConnectivityTestRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.CreateConnectivityTestRequest").msgclass - UpdateConnectivityTestRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest").msgclass - DeleteConnectivityTestRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest").msgclass - RerunConnectivityTestRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.RerunConnectivityTestRequest").msgclass - OperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.OperationMetadata").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/networkmanagement/v1/reachability_services_pb.rb b/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/networkmanagement/v1/reachability_services_pb.rb deleted file mode 100644 index c548533e2859..000000000000 --- a/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/networkmanagement/v1/reachability_services_pb.rb +++ /dev/null @@ -1,100 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/cloud/networkmanagement/v1/reachability.proto for package 'Google.Cloud.NetworkManagement.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/networkmanagement/v1/reachability_pb' - -module Google - module Cloud - module NetworkManagement - module V1 - module ReachabilityService - # The Reachability service in Google Cloud Network Management API - # - # The Reachability service in the Google Cloud Network Management API provides - # services that analyze the reachability within a single Google Virtual Private - # Cloud (VPC) network, between peered VPC networks, between VPC and on-premises - # networks, or between VPC networks and internet hosts. A reachability analysis - # is based on Google Cloud network configurations. - # - # You can use the analysis results to verify these configurations and - # to troubleshoot connectivity issues. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.cloud.networkmanagement.v1.ReachabilityService' - - # Lists all Connectivity Tests owned by a project. - rpc :ListConnectivityTests, ::Google::Cloud::NetworkManagement::V1::ListConnectivityTestsRequest, ::Google::Cloud::NetworkManagement::V1::ListConnectivityTestsResponse - # Gets the details of a specific Connectivity Test. - rpc :GetConnectivityTest, ::Google::Cloud::NetworkManagement::V1::GetConnectivityTestRequest, ::Google::Cloud::NetworkManagement::V1::ConnectivityTest - # Creates a new Connectivity Test. - # After you create a test, the reachability analysis is performed as part - # of the long running operation, which completes when the analysis completes. - # - # If the endpoint specifications in `ConnectivityTest` are invalid - # (for example, containing non-existent resources in the network, or you - # don't have read permissions to the network configurations of listed - # projects), then the reachability result returns a value of `UNKNOWN`. - # - # If the endpoint specifications in `ConnectivityTest` are - # incomplete, the reachability result returns a value of - # AMBIGUOUS. For more information, - # see the Connectivity Test documentation. - rpc :CreateConnectivityTest, ::Google::Cloud::NetworkManagement::V1::CreateConnectivityTestRequest, ::Google::Longrunning::Operation - # Updates the configuration of an existing `ConnectivityTest`. - # After you update a test, the reachability analysis is performed as part - # of the long running operation, which completes when the analysis completes. - # The Reachability state in the test resource is updated with the new result. - # - # If the endpoint specifications in `ConnectivityTest` are invalid - # (for example, they contain non-existent resources in the network, or the - # user does not have read permissions to the network configurations of - # listed projects), then the reachability result returns a value of - # UNKNOWN. - # - # If the endpoint specifications in `ConnectivityTest` are incomplete, the - # reachability result returns a value of `AMBIGUOUS`. See the documentation - # in `ConnectivityTest` for more details. - rpc :UpdateConnectivityTest, ::Google::Cloud::NetworkManagement::V1::UpdateConnectivityTestRequest, ::Google::Longrunning::Operation - # Rerun an existing `ConnectivityTest`. - # After the user triggers the rerun, the reachability analysis is performed - # as part of the long running operation, which completes when the analysis - # completes. - # - # Even though the test configuration remains the same, the reachability - # result may change due to underlying network configuration changes. - # - # If the endpoint specifications in `ConnectivityTest` become invalid (for - # example, specified resources are deleted in the network, or you lost - # read permissions to the network configurations of listed projects), then - # the reachability result returns a value of `UNKNOWN`. - rpc :RerunConnectivityTest, ::Google::Cloud::NetworkManagement::V1::RerunConnectivityTestRequest, ::Google::Longrunning::Operation - # Deletes a specific `ConnectivityTest`. - rpc :DeleteConnectivityTest, ::Google::Cloud::NetworkManagement::V1::DeleteConnectivityTestRequest, ::Google::Longrunning::Operation - end - - Stub = Service.rpc_stub_class - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/networkmanagement/v1/trace_pb.rb b/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/networkmanagement/v1/trace_pb.rb deleted file mode 100644 index e686396d0c5c..000000000000 --- a/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/networkmanagement/v1/trace_pb.rb +++ /dev/null @@ -1,107 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/networkmanagement/v1/trace.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/field_info_pb' - - -descriptor_data = "\n-google/cloud/networkmanagement/v1/trace.proto\x12!google.cloud.networkmanagement.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1bgoogle/api/field_info.proto\"\xa1\x01\n\x05Trace\x12\x46\n\rendpoint_info\x18\x01 \x01(\x0b\x32/.google.cloud.networkmanagement.v1.EndpointInfo\x12\x36\n\x05steps\x18\x02 \x03(\x0b\x32\'.google.cloud.networkmanagement.v1.Step\x12\x18\n\x10\x66orward_trace_id\x18\x04 \x01(\x05\"\xfd!\n\x04Step\x12\x13\n\x0b\x64\x65scription\x18\x01 \x01(\t\x12<\n\x05state\x18\x02 \x01(\x0e\x32-.google.cloud.networkmanagement.v1.Step.State\x12\x13\n\x0b\x63\x61uses_drop\x18\x03 \x01(\x08\x12\x12\n\nproject_id\x18\x04 \x01(\t\x12\x43\n\x08instance\x18\x05 \x01(\x0b\x32/.google.cloud.networkmanagement.v1.InstanceInfoH\x00\x12\x43\n\x08\x66irewall\x18\x06 \x01(\x0b\x32/.google.cloud.networkmanagement.v1.FirewallInfoH\x00\x12=\n\x05route\x18\x07 \x01(\x0b\x32,.google.cloud.networkmanagement.v1.RouteInfoH\x00\x12\x43\n\x08\x65ndpoint\x18\x08 \x01(\x0b\x32/.google.cloud.networkmanagement.v1.EndpointInfoH\x00\x12N\n\x0egoogle_service\x18\x18 \x01(\x0b\x32\x34.google.cloud.networkmanagement.v1.GoogleServiceInfoH\x00\x12P\n\x0f\x66orwarding_rule\x18\t \x01(\x0b\x32\x35.google.cloud.networkmanagement.v1.ForwardingRuleInfoH\x00\x12L\n\rhybrid_subnet\x18$ \x01(\x0b\x32\x33.google.cloud.networkmanagement.v1.HybridSubnetInfoH\x00\x12H\n\x0bvpn_gateway\x18\n \x01(\x0b\x32\x31.google.cloud.networkmanagement.v1.VpnGatewayInfoH\x00\x12\x46\n\nvpn_tunnel\x18\x0b \x01(\x0b\x32\x30.google.cloud.networkmanagement.v1.VpnTunnelInfoH\x00\x12`\n\x17interconnect_attachment\x18# \x01(\x0b\x32=.google.cloud.networkmanagement.v1.InterconnectAttachmentInfoH\x00\x12L\n\rvpc_connector\x18\x15 \x01(\x0b\x32\x33.google.cloud.networkmanagement.v1.VpcConnectorInfoH\x00\x12h\n\x1c\x64irect_vpc_egress_connection\x18! \x01(\x0b\x32@.google.cloud.networkmanagement.v1.DirectVpcEgressConnectionInfoH\x00\x12m\n\x1eserverless_external_connection\x18\" \x01(\x0b\x32\x43.google.cloud.networkmanagement.v1.ServerlessExternalConnectionInfoH\x00\x12\x41\n\x07\x64\x65liver\x18\x0c \x01(\x0b\x32..google.cloud.networkmanagement.v1.DeliverInfoH\x00\x12\x41\n\x07\x66orward\x18\r \x01(\x0b\x32..google.cloud.networkmanagement.v1.ForwardInfoH\x00\x12=\n\x05\x61\x62ort\x18\x0e \x01(\x0b\x32,.google.cloud.networkmanagement.v1.AbortInfoH\x00\x12;\n\x04\x64rop\x18\x0f \x01(\x0b\x32+.google.cloud.networkmanagement.v1.DropInfoH\x00\x12P\n\rload_balancer\x18\x10 \x01(\x0b\x32\x33.google.cloud.networkmanagement.v1.LoadBalancerInfoB\x02\x18\x01H\x00\x12\x41\n\x07network\x18\x11 \x01(\x0b\x32..google.cloud.networkmanagement.v1.NetworkInfoH\x00\x12\x46\n\ngke_master\x18\x12 \x01(\x0b\x32\x30.google.cloud.networkmanagement.v1.GKEMasterInfoH\x00\x12@\n\x07gke_pod\x18% \x01(\x0b\x32-.google.cloud.networkmanagement.v1.GkePodInfoH\x00\x12_\n\x17ip_masquerading_skipped\x18& \x01(\x0b\x32<.google.cloud.networkmanagement.v1.IpMasqueradingSkippedInfoH\x00\x12U\n\x12gke_network_policy\x18\' \x01(\x0b\x32\x37.google.cloud.networkmanagement.v1.GkeNetworkPolicyInfoH\x00\x12\x64\n\x1agke_network_policy_skipped\x18( \x01(\x0b\x32>.google.cloud.networkmanagement.v1.GkeNetworkPolicySkippedInfoH\x00\x12U\n\x12\x63loud_sql_instance\x18\x13 \x01(\x0b\x32\x37.google.cloud.networkmanagement.v1.CloudSQLInstanceInfoH\x00\x12N\n\x0eredis_instance\x18\x1e \x01(\x0b\x32\x34.google.cloud.networkmanagement.v1.RedisInstanceInfoH\x00\x12L\n\rredis_cluster\x18\x1f \x01(\x0b\x32\x33.google.cloud.networkmanagement.v1.RedisClusterInfoH\x00\x12N\n\x0e\x63loud_function\x18\x14 \x01(\x0b\x32\x34.google.cloud.networkmanagement.v1.CloudFunctionInfoH\x00\x12U\n\x12\x61pp_engine_version\x18\x16 \x01(\x0b\x32\x37.google.cloud.networkmanagement.v1.AppEngineVersionInfoH\x00\x12U\n\x12\x63loud_run_revision\x18\x17 \x01(\x0b\x32\x37.google.cloud.networkmanagement.v1.CloudRunRevisionInfoH\x00\x12\x39\n\x03nat\x18\x19 \x01(\x0b\x32*.google.cloud.networkmanagement.v1.NatInfoH\x00\x12R\n\x10proxy_connection\x18\x1a \x01(\x0b\x32\x36.google.cloud.networkmanagement.v1.ProxyConnectionInfoH\x00\x12`\n\x1aload_balancer_backend_info\x18\x1b \x01(\x0b\x32:.google.cloud.networkmanagement.v1.LoadBalancerBackendInfoH\x00\x12N\n\x0estorage_bucket\x18\x1c \x01(\x0b\x32\x34.google.cloud.networkmanagement.v1.StorageBucketInfoH\x00\x12N\n\x0eserverless_neg\x18\x1d \x01(\x0b\x32\x34.google.cloud.networkmanagement.v1.ServerlessNegInfoH\x00\x12]\n\x16ngfw_packet_inspection\x18* \x01(\x0b\x32;.google.cloud.networkmanagement.v1.NgfwPacketInspectionInfoH\x00\"\xb0\n\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x17\n\x13START_FROM_INSTANCE\x10\x01\x12\x17\n\x13START_FROM_INTERNET\x10\x02\x12\x1d\n\x19START_FROM_GOOGLE_SERVICE\x10\x1b\x12\x1e\n\x1aSTART_FROM_PRIVATE_NETWORK\x10\x03\x12\x19\n\x15START_FROM_GKE_MASTER\x10\x15\x12!\n\x1dSTART_FROM_CLOUD_SQL_INSTANCE\x10\x16\x12\x16\n\x12START_FROM_GKE_POD\x10\'\x12\x1d\n\x19START_FROM_REDIS_INSTANCE\x10 \x12\x1c\n\x18START_FROM_REDIS_CLUSTER\x10!\x12\x1d\n\x19START_FROM_CLOUD_FUNCTION\x10\x17\x12!\n\x1dSTART_FROM_APP_ENGINE_VERSION\x10\x19\x12!\n\x1dSTART_FROM_CLOUD_RUN_REVISION\x10\x1a\x12\x1d\n\x19START_FROM_STORAGE_BUCKET\x10\x1d\x12$\n START_FROM_PSC_PUBLISHED_SERVICE\x10\x1e\x12\x1d\n\x19START_FROM_SERVERLESS_NEG\x10\x1f\x12\x1f\n\x1b\x41PPLY_INGRESS_FIREWALL_RULE\x10\x04\x12\x1e\n\x1a\x41PPLY_EGRESS_FIREWALL_RULE\x10\x05\x12\x0f\n\x0b\x41PPLY_ROUTE\x10\x06\x12\x19\n\x15\x41PPLY_FORWARDING_RULE\x10\x07\x12!\n\x1d\x41NALYZE_LOAD_BALANCER_BACKEND\x10\x1c\x12\x15\n\x11SPOOFING_APPROVED\x10\x08\x12\x16\n\x12\x41RRIVE_AT_INSTANCE\x10\t\x12(\n ARRIVE_AT_INTERNAL_LOAD_BALANCER\x10\n\x1a\x02\x08\x01\x12(\n ARRIVE_AT_EXTERNAL_LOAD_BALANCER\x10\x0b\x1a\x02\x08\x01\x12\x1b\n\x17\x41RRIVE_AT_HYBRID_SUBNET\x10&\x12\x19\n\x15\x41RRIVE_AT_VPN_GATEWAY\x10\x0c\x12\x18\n\x14\x41RRIVE_AT_VPN_TUNNEL\x10\r\x12%\n!ARRIVE_AT_INTERCONNECT_ATTACHMENT\x10%\x12\x1b\n\x17\x41RRIVE_AT_VPC_CONNECTOR\x10\x18\x12\x15\n\x11\x41RRIVE_AT_GKE_POD\x10,\x12 \n\x1c\x44IRECT_VPC_EGRESS_CONNECTION\x10#\x12\"\n\x1eSERVERLESS_EXTERNAL_CONNECTION\x10$\x12\x1a\n\x16NGFW_PACKET_INSPECTION\x10/\x12\x07\n\x03NAT\x10\x0e\x12 \n\x1cSKIP_GKE_POD_IP_MASQUERADING\x10(\x12#\n\x1fSKIP_GKE_INGRESS_NETWORK_POLICY\x10)\x12\"\n\x1eSKIP_GKE_EGRESS_NETWORK_POLICY\x10*\x12$\n APPLY_INGRESS_GKE_NETWORK_POLICY\x10-\x12#\n\x1f\x41PPLY_EGRESS_GKE_NETWORK_POLICY\x10.\x12\x14\n\x10PROXY_CONNECTION\x10\x0f\x12\x0b\n\x07\x44\x45LIVER\x10\x10\x12\x08\n\x04\x44ROP\x10\x11\x12\x0b\n\x07\x46ORWARD\x10\x12\x12\t\n\x05\x41\x42ORT\x10\x13\x12\x1d\n\x19VIEWER_PERMISSION_MISSING\x10\x14\x42\x0b\n\tstep_info\"\xf7\x02\n\x0cInstanceInfo\x12\x14\n\x0c\x64isplay_name\x18\x01 \x01(\t\x12\x0b\n\x03uri\x18\x02 \x01(\t\x12\x11\n\tinterface\x18\x03 \x01(\t\x12\x13\n\x0bnetwork_uri\x18\x04 \x01(\t\x12\x13\n\x0binternal_ip\x18\x05 \x01(\t\x12\x13\n\x0b\x65xternal_ip\x18\x06 \x01(\t\x12\x14\n\x0cnetwork_tags\x18\x07 \x03(\t\x12\x1b\n\x0fservice_account\x18\x08 \x01(\tB\x02\x18\x01\x12\"\n\x1apsc_network_attachment_uri\x18\t \x01(\t\x12\x13\n\x07running\x18\n \x01(\x08\x42\x02\x18\x01\x12\x46\n\x06status\x18\x0b \x01(\x0e\x32\x36.google.cloud.networkmanagement.v1.InstanceInfo.Status\">\n\x06Status\x12\x16\n\x12STATUS_UNSPECIFIED\x10\x00\x12\x0b\n\x07RUNNING\x10\x01\x12\x0f\n\x0bNOT_RUNNING\x10\x02\"v\n\x0bNetworkInfo\x12\x14\n\x0c\x64isplay_name\x18\x01 \x01(\t\x12\x0b\n\x03uri\x18\x02 \x01(\t\x12\x1a\n\x12matched_subnet_uri\x18\x05 \x01(\t\x12\x18\n\x10matched_ip_range\x18\x04 \x01(\t\x12\x0e\n\x06region\x18\x06 \x01(\t\"\xaf\x07\n\x0c\x46irewallInfo\x12\x14\n\x0c\x64isplay_name\x18\x01 \x01(\t\x12\x0b\n\x03uri\x18\x02 \x01(\t\x12\x11\n\tdirection\x18\x03 \x01(\t\x12\x0e\n\x06\x61\x63tion\x18\x04 \x01(\t\x12\x10\n\x08priority\x18\x05 \x01(\x05\x12\x13\n\x0bnetwork_uri\x18\x06 \x01(\t\x12\x13\n\x0btarget_tags\x18\x07 \x03(\t\x12\x1f\n\x17target_service_accounts\x18\x08 \x03(\t\x12\x0e\n\x06policy\x18\t \x01(\t\x12\x12\n\npolicy_uri\x18\x0b \x01(\t\x12\\\n\x12\x66irewall_rule_type\x18\n \x01(\x0e\x32@.google.cloud.networkmanagement.v1.FirewallInfo.FirewallRuleType\x12\x17\n\x0fpolicy_priority\x18\x0c \x01(\x05\x12O\n\x0btarget_type\x18\r \x01(\x0e\x32:.google.cloud.networkmanagement.v1.FirewallInfo.TargetType\"\xbc\x03\n\x10\x46irewallRuleType\x12\"\n\x1e\x46IREWALL_RULE_TYPE_UNSPECIFIED\x10\x00\x12%\n!HIERARCHICAL_FIREWALL_POLICY_RULE\x10\x01\x12\x15\n\x11VPC_FIREWALL_RULE\x10\x02\x12\x1d\n\x19IMPLIED_VPC_FIREWALL_RULE\x10\x03\x12/\n+SERVERLESS_VPC_ACCESS_MANAGED_FIREWALL_RULE\x10\x04\x12 \n\x1cNETWORK_FIREWALL_POLICY_RULE\x10\x05\x12)\n%NETWORK_REGIONAL_FIREWALL_POLICY_RULE\x10\x06\x12\'\n#SYSTEM_NETWORK_FIREWALL_POLICY_RULE\x10\x07\x12\x30\n,SYSTEM_REGIONAL_NETWORK_FIREWALL_POLICY_RULE\x10\x08\x12$\n UNSUPPORTED_FIREWALL_POLICY_RULE\x10\x64\x12\x12\n\x0eTRACKING_STATE\x10\x65\x12\x14\n\x10\x41NALYSIS_SKIPPED\x10\x66\"Q\n\nTargetType\x12\x1b\n\x17TARGET_TYPE_UNSPECIFIED\x10\x00\x12\r\n\tINSTANCES\x10\x01\x12\x17\n\x13INTERNAL_MANAGED_LB\x10\x02\"\xec\x0b\n\tRouteInfo\x12J\n\nroute_type\x18\x08 \x01(\x0e\x32\x36.google.cloud.networkmanagement.v1.RouteInfo.RouteType\x12O\n\rnext_hop_type\x18\t \x01(\x0e\x32\x38.google.cloud.networkmanagement.v1.RouteInfo.NextHopType\x12P\n\x0broute_scope\x18\x0e \x01(\x0e\x32\x37.google.cloud.networkmanagement.v1.RouteInfo.RouteScopeB\x02\x18\x01\x12\x14\n\x0c\x64isplay_name\x18\x01 \x01(\t\x12\x0b\n\x03uri\x18\x02 \x01(\t\x12\x0e\n\x06region\x18\x13 \x01(\t\x12\x15\n\rdest_ip_range\x18\x03 \x01(\t\x12\x14\n\x08next_hop\x18\x04 \x01(\tB\x02\x18\x01\x12\x13\n\x0bnetwork_uri\x18\x05 \x01(\t\x12\x10\n\x08priority\x18\x06 \x01(\x05\x12\x15\n\rinstance_tags\x18\x07 \x03(\t\x12\x14\n\x0csrc_ip_range\x18\n \x01(\t\x12\x18\n\x10\x64\x65st_port_ranges\x18\x0b \x03(\t\x12\x17\n\x0fsrc_port_ranges\x18\x0c \x03(\t\x12\x11\n\tprotocols\x18\r \x03(\t\x12\x18\n\x0bncc_hub_uri\x18\x0f \x01(\tH\x00\x88\x01\x01\x12\x1a\n\rncc_spoke_uri\x18\x10 \x01(\tH\x01\x88\x01\x01\x12/\n\"advertised_route_source_router_uri\x18\x11 \x01(\tH\x02\x88\x01\x01\x12.\n\x1d\x61\x64vertised_route_next_hop_uri\x18\x12 \x01(\tB\x02\x18\x01H\x03\x88\x01\x01\x12\x14\n\x0cnext_hop_uri\x18\x14 \x01(\t\x12\x1c\n\x14next_hop_network_uri\x18\x15 \x01(\t\x12\x1d\n\x15originating_route_uri\x18\x16 \x01(\t\x12&\n\x1eoriginating_route_display_name\x18\x17 \x01(\t\x12\x19\n\x11ncc_hub_route_uri\x18\x18 \x01(\t\"\xab\x01\n\tRouteType\x12\x1a\n\x16ROUTE_TYPE_UNSPECIFIED\x10\x00\x12\n\n\x06SUBNET\x10\x01\x12\n\n\x06STATIC\x10\x02\x12\x0b\n\x07\x44YNAMIC\x10\x03\x12\x12\n\x0ePEERING_SUBNET\x10\x04\x12\x12\n\x0ePEERING_STATIC\x10\x05\x12\x13\n\x0fPEERING_DYNAMIC\x10\x06\x12\x10\n\x0cPOLICY_BASED\x10\x07\x12\x0e\n\nADVERTISED\x10\x65\"\xea\x02\n\x0bNextHopType\x12\x1d\n\x19NEXT_HOP_TYPE_UNSPECIFIED\x10\x00\x12\x0f\n\x0bNEXT_HOP_IP\x10\x01\x12\x15\n\x11NEXT_HOP_INSTANCE\x10\x02\x12\x14\n\x10NEXT_HOP_NETWORK\x10\x03\x12\x14\n\x10NEXT_HOP_PEERING\x10\x04\x12\x19\n\x15NEXT_HOP_INTERCONNECT\x10\x05\x12\x17\n\x13NEXT_HOP_VPN_TUNNEL\x10\x06\x12\x18\n\x14NEXT_HOP_VPN_GATEWAY\x10\x07\x12\x1d\n\x19NEXT_HOP_INTERNET_GATEWAY\x10\x08\x12\x16\n\x12NEXT_HOP_BLACKHOLE\x10\t\x12\x10\n\x0cNEXT_HOP_ILB\x10\n\x12\x1d\n\x19NEXT_HOP_ROUTER_APPLIANCE\x10\x0b\x12\x14\n\x10NEXT_HOP_NCC_HUB\x10\x0c\x12\x1c\n\x18SECURE_WEB_PROXY_GATEWAY\x10\r\"C\n\nRouteScope\x12\x1b\n\x17ROUTE_SCOPE_UNSPECIFIED\x10\x00\x12\x0b\n\x07NETWORK\x10\x01\x12\x0b\n\x07NCC_HUB\x10\x02\x42\x0e\n\x0c_ncc_hub_uriB\x10\n\x0e_ncc_spoke_uriB%\n#_advertised_route_source_router_uriB \n\x1e_advertised_route_next_hop_uri\"\xda\x02\n\x11GoogleServiceInfo\x12\x11\n\tsource_ip\x18\x01 \x01(\t\x12\x63\n\x13google_service_type\x18\x02 \x01(\x0e\x32\x46.google.cloud.networkmanagement.v1.GoogleServiceInfo.GoogleServiceType\"\xcc\x01\n\x11GoogleServiceType\x12#\n\x1fGOOGLE_SERVICE_TYPE_UNSPECIFIED\x10\x00\x12\x07\n\x03IAP\x10\x01\x12$\n GFE_PROXY_OR_HEALTH_CHECK_PROBER\x10\x02\x12\r\n\tCLOUD_DNS\x10\x03\x12\x0e\n\nGOOGLE_API\x10\x04\x12\x12\n\x0eGOOGLE_API_PSC\x10\x05\x12\x15\n\x11GOOGLE_API_VPC_SC\x10\x06\x12\x19\n\x15SERVERLESS_VPC_ACCESS\x10\x07\"\x8e\x02\n\x12\x46orwardingRuleInfo\x12\x14\n\x0c\x64isplay_name\x18\x01 \x01(\t\x12\x0b\n\x03uri\x18\x02 \x01(\t\x12\x18\n\x10matched_protocol\x18\x03 \x01(\t\x12\x1a\n\x12matched_port_range\x18\x06 \x01(\t\x12\x0b\n\x03vip\x18\x04 \x01(\t\x12\x0e\n\x06target\x18\x05 \x01(\t\x12\x13\n\x0bnetwork_uri\x18\x07 \x01(\t\x12\x0e\n\x06region\x18\x08 \x01(\t\x12\x1a\n\x12load_balancer_name\x18\t \x01(\t\x12\"\n\x1apsc_service_attachment_uri\x18\n \x01(\t\x12\x1d\n\x15psc_google_api_target\x18\x0b \x01(\t\"\xc2\x04\n\x10LoadBalancerInfo\x12`\n\x12load_balancer_type\x18\x01 \x01(\x0e\x32\x44.google.cloud.networkmanagement.v1.LoadBalancerInfo.LoadBalancerType\x12\x1c\n\x10health_check_uri\x18\x02 \x01(\tB\x02\x18\x01\x12H\n\x08\x62\x61\x63kends\x18\x03 \x03(\x0b\x32\x36.google.cloud.networkmanagement.v1.LoadBalancerBackend\x12U\n\x0c\x62\x61\x63kend_type\x18\x04 \x01(\x0e\x32?.google.cloud.networkmanagement.v1.LoadBalancerInfo.BackendType\x12\x13\n\x0b\x62\x61\x63kend_uri\x18\x05 \x01(\t\"\x8f\x01\n\x10LoadBalancerType\x12\"\n\x1eLOAD_BALANCER_TYPE_UNSPECIFIED\x10\x00\x12\x14\n\x10INTERNAL_TCP_UDP\x10\x01\x12\x13\n\x0fNETWORK_TCP_UDP\x10\x02\x12\x0e\n\nHTTP_PROXY\x10\x03\x12\r\n\tTCP_PROXY\x10\x04\x12\r\n\tSSL_PROXY\x10\x05\"f\n\x0b\x42\x61\x63kendType\x12\x1c\n\x18\x42\x41\x43KEND_TYPE_UNSPECIFIED\x10\x00\x12\x13\n\x0f\x42\x41\x43KEND_SERVICE\x10\x01\x12\x0f\n\x0bTARGET_POOL\x10\x02\x12\x13\n\x0fTARGET_INSTANCE\x10\x03\"\xf6\x02\n\x13LoadBalancerBackend\x12\x14\n\x0c\x64isplay_name\x18\x01 \x01(\t\x12\x0b\n\x03uri\x18\x02 \x01(\t\x12t\n\x1bhealth_check_firewall_state\x18\x03 \x01(\x0e\x32O.google.cloud.networkmanagement.v1.LoadBalancerBackend.HealthCheckFirewallState\x12,\n$health_check_allowing_firewall_rules\x18\x04 \x03(\t\x12,\n$health_check_blocking_firewall_rules\x18\x05 \x03(\t\"j\n\x18HealthCheckFirewallState\x12+\n\'HEALTH_CHECK_FIREWALL_STATE_UNSPECIFIED\x10\x00\x12\x0e\n\nCONFIGURED\x10\x01\x12\x11\n\rMISCONFIGURED\x10\x02\"E\n\x10HybridSubnetInfo\x12\x14\n\x0c\x64isplay_name\x18\x01 \x01(\t\x12\x0b\n\x03uri\x18\x02 \x01(\t\x12\x0e\n\x06region\x18\x03 \x01(\t\"\x84\x01\n\x0eVpnGatewayInfo\x12\x14\n\x0c\x64isplay_name\x18\x01 \x01(\t\x12\x0b\n\x03uri\x18\x02 \x01(\t\x12\x13\n\x0bnetwork_uri\x18\x03 \x01(\t\x12\x12\n\nip_address\x18\x04 \x01(\t\x12\x16\n\x0evpn_tunnel_uri\x18\x05 \x01(\t\x12\x0e\n\x06region\x18\x06 \x01(\t\"\xee\x02\n\rVpnTunnelInfo\x12\x14\n\x0c\x64isplay_name\x18\x01 \x01(\t\x12\x0b\n\x03uri\x18\x02 \x01(\t\x12\x16\n\x0esource_gateway\x18\x03 \x01(\t\x12\x16\n\x0eremote_gateway\x18\x04 \x01(\t\x12\x19\n\x11remote_gateway_ip\x18\x05 \x01(\t\x12\x19\n\x11source_gateway_ip\x18\x06 \x01(\t\x12\x13\n\x0bnetwork_uri\x18\x07 \x01(\t\x12\x0e\n\x06region\x18\x08 \x01(\t\x12R\n\x0crouting_type\x18\t \x01(\x0e\x32<.google.cloud.networkmanagement.v1.VpnTunnelInfo.RoutingType\"[\n\x0bRoutingType\x12\x1c\n\x18ROUTING_TYPE_UNSPECIFIED\x10\x00\x12\x0f\n\x0bROUTE_BASED\x10\x01\x12\x10\n\x0cPOLICY_BASED\x10\x02\x12\x0b\n\x07\x44YNAMIC\x10\x03\"\xeb\x02\n\x1aInterconnectAttachmentInfo\x12\x14\n\x0c\x64isplay_name\x18\x01 \x01(\t\x12\x0b\n\x03uri\x18\x02 \x01(\t\x12\x18\n\x10interconnect_uri\x18\x03 \x01(\t\x12\x0e\n\x06region\x18\x04 \x01(\t\x12\x18\n\x10\x63loud_router_uri\x18\x05 \x01(\t\x12P\n\x04type\x18\x06 \x01(\x0e\x32\x42.google.cloud.networkmanagement.v1.InterconnectAttachmentInfo.Type\x12\x32\n l2_attachment_matched_ip_address\x18\x07 \x01(\tB\x08\xe2\x8c\xcf\xd7\x08\x02\x08\x04\"`\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\r\n\tDEDICATED\x10\x01\x12\x0b\n\x07PARTNER\x10\x02\x12\x14\n\x10PARTNER_PROVIDER\x10\x03\x12\x10\n\x0cL2_DEDICATED\x10\x04\"\xd1\x01\n\x0c\x45ndpointInfo\x12\x11\n\tsource_ip\x18\x01 \x01(\t\x12\x16\n\x0e\x64\x65stination_ip\x18\x02 \x01(\t\x12\x10\n\x08protocol\x18\x03 \x01(\t\x12\x13\n\x0bsource_port\x18\x04 \x01(\x05\x12\x18\n\x10\x64\x65stination_port\x18\x05 \x01(\x05\x12\x1a\n\x12source_network_uri\x18\x06 \x01(\t\x12\x1f\n\x17\x64\x65stination_network_uri\x18\x07 \x01(\t\x12\x18\n\x10source_agent_uri\x18\x08 \x01(\t\"\xd4\x06\n\x0b\x44\x65liverInfo\x12\x45\n\x06target\x18\x01 \x01(\x0e\x32\x35.google.cloud.networkmanagement.v1.DeliverInfo.Target\x12\x14\n\x0cresource_uri\x18\x02 \x01(\t\x12\x1c\n\nip_address\x18\x03 \x01(\tB\x08\xe2\x8c\xcf\xd7\x08\x02\x08\x04\x12\x16\n\x0estorage_bucket\x18\x04 \x01(\t\x12\x1d\n\x15psc_google_api_target\x18\x05 \x01(\t\x12]\n\x13google_service_type\x18\x06 \x01(\x0e\x32@.google.cloud.networkmanagement.v1.DeliverInfo.GoogleServiceType\"\x84\x03\n\x06Target\x12\x16\n\x12TARGET_UNSPECIFIED\x10\x00\x12\x0c\n\x08INSTANCE\x10\x01\x12\x0c\n\x08INTERNET\x10\x02\x12\x0e\n\nGOOGLE_API\x10\x03\x12\x0e\n\nGKE_MASTER\x10\x04\x12\x16\n\x12\x43LOUD_SQL_INSTANCE\x10\x05\x12\x19\n\x15PSC_PUBLISHED_SERVICE\x10\x06\x12\x12\n\x0ePSC_GOOGLE_API\x10\x07\x12\x0e\n\nPSC_VPC_SC\x10\x08\x12\x12\n\x0eSERVERLESS_NEG\x10\t\x12\x12\n\x0eSTORAGE_BUCKET\x10\n\x12\x13\n\x0fPRIVATE_NETWORK\x10\x0b\x12\x12\n\x0e\x43LOUD_FUNCTION\x10\x0c\x12\x16\n\x12\x41PP_ENGINE_VERSION\x10\r\x12\x16\n\x12\x43LOUD_RUN_REVISION\x10\x0e\x12\x1a\n\x16GOOGLE_MANAGED_SERVICE\x10\x0f\x12\x12\n\x0eREDIS_INSTANCE\x10\x10\x12\x11\n\rREDIS_CLUSTER\x10\x11\x12\x0b\n\x07GKE_POD\x10\x13\"\xac\x01\n\x11GoogleServiceType\x12#\n\x1fGOOGLE_SERVICE_TYPE_UNSPECIFIED\x10\x00\x12\x07\n\x03IAP\x10\x01\x12$\n GFE_PROXY_OR_HEALTH_CHECK_PROBER\x10\x02\x12\r\n\tCLOUD_DNS\x10\x03\x12\x19\n\x15PRIVATE_GOOGLE_ACCESS\x10\x04\x12\x19\n\x15SERVERLESS_VPC_ACCESS\x10\x05\"\x89\x03\n\x0b\x46orwardInfo\x12\x45\n\x06target\x18\x01 \x01(\x0e\x32\x35.google.cloud.networkmanagement.v1.ForwardInfo.Target\x12\x14\n\x0cresource_uri\x18\x02 \x01(\t\x12\x1c\n\nip_address\x18\x03 \x01(\tB\x08\xe2\x8c\xcf\xd7\x08\x02\x08\x04\"\xfe\x01\n\x06Target\x12\x16\n\x12TARGET_UNSPECIFIED\x10\x00\x12\x0f\n\x0bPEERING_VPC\x10\x01\x12\x0f\n\x0bVPN_GATEWAY\x10\x02\x12\x10\n\x0cINTERCONNECT\x10\x03\x12\x12\n\nGKE_MASTER\x10\x04\x1a\x02\x08\x01\x12\"\n\x1eIMPORTED_CUSTOM_ROUTE_NEXT_HOP\x10\x05\x12\x1a\n\x12\x43LOUD_SQL_INSTANCE\x10\x06\x1a\x02\x08\x01\x12\x13\n\x0f\x41NOTHER_PROJECT\x10\x07\x12\x0b\n\x07NCC_HUB\x10\x08\x12\x14\n\x10ROUTER_APPLIANCE\x10\t\x12\x1c\n\x18SECURE_WEB_PROXY_GATEWAY\x10\n\"\x85\r\n\tAbortInfo\x12\x41\n\x05\x63\x61use\x18\x01 \x01(\x0e\x32\x32.google.cloud.networkmanagement.v1.AbortInfo.Cause\x12\x14\n\x0cresource_uri\x18\x02 \x01(\t\x12\x1c\n\nip_address\x18\x04 \x01(\tB\x08\xe2\x8c\xcf\xd7\x08\x02\x08\x04\x12#\n\x1bprojects_missing_permission\x18\x03 \x03(\t\"\xdb\x0b\n\x05\x43\x61use\x12\x15\n\x11\x43\x41USE_UNSPECIFIED\x10\x00\x12\x17\n\x0fUNKNOWN_NETWORK\x10\x01\x1a\x02\x08\x01\x12\x17\n\x0fUNKNOWN_PROJECT\x10\x03\x1a\x02\x08\x01\x12\x16\n\x0eNO_EXTERNAL_IP\x10\x07\x1a\x02\x08\x01\x12\x1e\n\x16UNINTENDED_DESTINATION\x10\x08\x1a\x02\x08\x01\x12!\n\x19SOURCE_ENDPOINT_NOT_FOUND\x10\x0b\x1a\x02\x08\x01\x12!\n\x19MISMATCHED_SOURCE_NETWORK\x10\x0c\x1a\x02\x08\x01\x12&\n\x1e\x44\x45STINATION_ENDPOINT_NOT_FOUND\x10\r\x1a\x02\x08\x01\x12&\n\x1eMISMATCHED_DESTINATION_NETWORK\x10\x0e\x1a\x02\x08\x01\x12\x0e\n\nUNKNOWN_IP\x10\x02\x12%\n!GOOGLE_MANAGED_SERVICE_UNKNOWN_IP\x10 \x12+\n\'SOURCE_IP_ADDRESS_NOT_IN_SOURCE_NETWORK\x10\x17\x12\x15\n\x11PERMISSION_DENIED\x10\x04\x12*\n&PERMISSION_DENIED_NO_CLOUD_NAT_CONFIGS\x10\x1c\x12-\n)PERMISSION_DENIED_NO_NEG_ENDPOINT_CONFIGS\x10\x1d\x12-\n)PERMISSION_DENIED_NO_CLOUD_ROUTER_CONFIGS\x10$\x12\x16\n\x12NO_SOURCE_LOCATION\x10\x05\x12\"\n\x1eNO_SOURCE_GCP_NETWORK_LOCATION\x10*\x12&\n\"NO_SOURCE_NON_GCP_NETWORK_LOCATION\x10+\x12\x1f\n\x1bNO_SOURCE_INTERNET_LOCATION\x10,\x12\x14\n\x10INVALID_ARGUMENT\x10\x06\x12\x12\n\x0eTRACE_TOO_LONG\x10\t\x12\x12\n\x0eINTERNAL_ERROR\x10\n\x12\x0f\n\x0bUNSUPPORTED\x10\x0f\x12\x19\n\x15MISMATCHED_IP_VERSION\x10\x10\x12&\n\"GKE_KONNECTIVITY_PROXY_UNSUPPORTED\x10\x11\x12\x1d\n\x19RESOURCE_CONFIG_NOT_FOUND\x10\x12\x12 \n\x1cVM_INSTANCE_CONFIG_NOT_FOUND\x10\x18\x12\x1c\n\x18NETWORK_CONFIG_NOT_FOUND\x10\x19\x12\x1d\n\x19\x46IREWALL_CONFIG_NOT_FOUND\x10\x1a\x12\x1a\n\x16ROUTE_CONFIG_NOT_FOUND\x10\x1b\x12\x31\n-GOOGLE_MANAGED_SERVICE_AMBIGUOUS_PSC_ENDPOINT\x10\x13\x12-\n)GOOGLE_MANAGED_SERVICE_AMBIGUOUS_ENDPOINT\x10\'\x12$\n SOURCE_PSC_CLOUD_SQL_UNSUPPORTED\x10\x14\x12)\n%SOURCE_EXTERNAL_CLOUD_SQL_UNSUPPORTED\x10-\x12$\n SOURCE_REDIS_CLUSTER_UNSUPPORTED\x10\"\x12%\n!SOURCE_REDIS_INSTANCE_UNSUPPORTED\x10#\x12&\n\"SOURCE_FORWARDING_RULE_UNSUPPORTED\x10\x15\x12\x1b\n\x17NON_ROUTABLE_IP_ADDRESS\x10\x16\x12+\n\'UNKNOWN_ISSUE_IN_GOOGLE_MANAGED_PROJECT\x10\x1e\x12-\n)UNSUPPORTED_GOOGLE_MANAGED_PROJECT_CONFIG\x10\x1f\x12\x1b\n\x17NO_SERVERLESS_IP_RANGES\x10%\x12 \n\x1cIP_VERSION_PROTOCOL_MISMATCH\x10(\x12%\n!GKE_POD_UNKNOWN_ENDPOINT_LOCATION\x10)\"\xb1\"\n\x08\x44ropInfo\x12@\n\x05\x63\x61use\x18\x01 \x01(\x0e\x32\x31.google.cloud.networkmanagement.v1.DropInfo.Cause\x12\x14\n\x0cresource_uri\x18\x02 \x01(\t\x12\x11\n\tsource_ip\x18\x03 \x01(\t\x12\x16\n\x0e\x64\x65stination_ip\x18\x04 \x01(\t\x12\x0e\n\x06region\x18\x05 \x01(\t\x12\x1f\n\x17source_geolocation_code\x18\x06 \x01(\t\x12$\n\x1c\x64\x65stination_geolocation_code\x18\x07 \x01(\t\"\xca \n\x05\x43\x61use\x12\x15\n\x11\x43\x41USE_UNSPECIFIED\x10\x00\x12\x1c\n\x18UNKNOWN_EXTERNAL_ADDRESS\x10\x01\x12\x19\n\x15\x46OREIGN_IP_DISALLOWED\x10\x02\x12\x11\n\rFIREWALL_RULE\x10\x03\x12\x0c\n\x08NO_ROUTE\x10\x04\x12\x13\n\x0fROUTE_BLACKHOLE\x10\x05\x12\x17\n\x13ROUTE_WRONG_NETWORK\x10\x06\x12*\n&ROUTE_NEXT_HOP_IP_ADDRESS_NOT_RESOLVED\x10*\x12%\n!ROUTE_NEXT_HOP_RESOURCE_NOT_FOUND\x10+\x12)\n%ROUTE_NEXT_HOP_INSTANCE_WRONG_NETWORK\x10\x31\x12*\n&ROUTE_NEXT_HOP_INSTANCE_NON_PRIMARY_IP\x10\x32\x12.\n*ROUTE_NEXT_HOP_FORWARDING_RULE_IP_MISMATCH\x10\x33\x12-\n)ROUTE_NEXT_HOP_VPN_TUNNEL_NOT_ESTABLISHED\x10\x34\x12/\n+ROUTE_NEXT_HOP_FORWARDING_RULE_TYPE_INVALID\x10\x35\x12\x32\n.NO_ROUTE_FROM_INTERNET_TO_PRIVATE_IPV6_ADDRESS\x10,\x12\x32\n.NO_ROUTE_FROM_INTERNET_TO_PRIVATE_IPV4_ADDRESS\x10m\x12>\n:NO_ROUTE_FROM_EXTERNAL_IPV6_SOURCE_TO_PRIVATE_IPV6_ADDRESS\x10\x62\x12&\n\"VPN_TUNNEL_LOCAL_SELECTOR_MISMATCH\x10-\x12\'\n#VPN_TUNNEL_REMOTE_SELECTOR_MISMATCH\x10.\x12\x1f\n\x1bPRIVATE_TRAFFIC_TO_INTERNET\x10\x07\x12$\n PRIVATE_GOOGLE_ACCESS_DISALLOWED\x10\x08\x12\x34\n0PRIVATE_GOOGLE_ACCESS_VIA_VPN_TUNNEL_UNSUPPORTED\x10/\x12\x17\n\x13NO_EXTERNAL_ADDRESS\x10\t\x12\x1c\n\x18UNKNOWN_INTERNAL_ADDRESS\x10\n\x12\x1c\n\x18\x46ORWARDING_RULE_MISMATCH\x10\x0b\x12 \n\x1c\x46ORWARDING_RULE_NO_INSTANCES\x10\x0c\x12\x38\n4FIREWALL_BLOCKING_LOAD_BALANCER_BACKEND_HEALTH_CHECK\x10\r\x12:\n6INGRESS_FIREWALL_TAGS_UNSUPPORTED_BY_DIRECT_VPC_EGRESS\x10U\x12\x18\n\x14INSTANCE_NOT_RUNNING\x10\x0e\x12\x1b\n\x17GKE_CLUSTER_NOT_RUNNING\x10\x1b\x12\x17\n\x13GKE_POD_NOT_RUNNING\x10g\x12\"\n\x1e\x43LOUD_SQL_INSTANCE_NOT_RUNNING\x10\x1c\x12\x1e\n\x1aREDIS_INSTANCE_NOT_RUNNING\x10\x44\x12\x1d\n\x19REDIS_CLUSTER_NOT_RUNNING\x10\x45\x12\x18\n\x14TRAFFIC_TYPE_BLOCKED\x10\x0f\x12\"\n\x1eGKE_MASTER_UNAUTHORIZED_ACCESS\x10\x10\x12*\n&CLOUD_SQL_INSTANCE_UNAUTHORIZED_ACCESS\x10\x11\x12\x1e\n\x1a\x44ROPPED_INSIDE_GKE_SERVICE\x10\x12\x12$\n DROPPED_INSIDE_CLOUD_SQL_SERVICE\x10\x13\x12%\n!GOOGLE_MANAGED_SERVICE_NO_PEERING\x10\x14\x12*\n&GOOGLE_MANAGED_SERVICE_NO_PSC_ENDPOINT\x10&\x12\x1c\n\x18GKE_PSC_ENDPOINT_MISSING\x10$\x12$\n CLOUD_SQL_INSTANCE_NO_IP_ADDRESS\x10\x15\x12%\n!GKE_CONTROL_PLANE_REGION_MISMATCH\x10\x1e\x12\x33\n/PUBLIC_GKE_CONTROL_PLANE_TO_PRIVATE_DESTINATION\x10\x1f\x12\x1e\n\x1aGKE_CONTROL_PLANE_NO_ROUTE\x10 \x12:\n6CLOUD_SQL_INSTANCE_NOT_CONFIGURED_FOR_EXTERNAL_TRAFFIC\x10!\x12\x34\n0PUBLIC_CLOUD_SQL_INSTANCE_TO_PRIVATE_DESTINATION\x10\"\x12\x1f\n\x1b\x43LOUD_SQL_INSTANCE_NO_ROUTE\x10#\x12 \n\x1c\x43LOUD_SQL_CONNECTOR_REQUIRED\x10?\x12\x1d\n\x19\x43LOUD_FUNCTION_NOT_ACTIVE\x10\x16\x12\x19\n\x15VPC_CONNECTOR_NOT_SET\x10\x17\x12\x1d\n\x19VPC_CONNECTOR_NOT_RUNNING\x10\x18\x12,\n(VPC_CONNECTOR_SERVERLESS_TRAFFIC_BLOCKED\x10<\x12.\n*VPC_CONNECTOR_HEALTH_CHECK_TRAFFIC_BLOCKED\x10=\x12#\n\x1f\x46ORWARDING_RULE_REGION_MISMATCH\x10\x19\x12\x1f\n\x1bPSC_CONNECTION_NOT_ACCEPTED\x10\x1a\x12-\n)PSC_ENDPOINT_ACCESSED_FROM_PEERED_NETWORK\x10)\x12.\n*PSC_NEG_PRODUCER_ENDPOINT_NO_GLOBAL_ACCESS\x10\x30\x12\x33\n/PSC_NEG_PRODUCER_FORWARDING_RULE_MULTIPLE_PORTS\x10\x36\x12!\n\x1d\x43LOUD_SQL_PSC_NEG_UNSUPPORTED\x10:\x12-\n)NO_NAT_SUBNETS_FOR_PSC_SERVICE_ATTACHMENT\x10\x39\x12#\n\x1fPSC_TRANSITIVITY_NOT_PROPAGATED\x10@\x12(\n$HYBRID_NEG_NON_DYNAMIC_ROUTE_MATCHED\x10\x37\x12.\n*HYBRID_NEG_NON_LOCAL_DYNAMIC_ROUTE_MATCHED\x10\x38\x12 \n\x1c\x43LOUD_RUN_REVISION_NOT_READY\x10\x1d\x12\'\n#DROPPED_INSIDE_PSC_SERVICE_PRODUCER\x10%\x12%\n!LOAD_BALANCER_HAS_NO_PROXY_SUBNET\x10\'\x12\x1a\n\x16\x43LOUD_NAT_NO_ADDRESSES\x10(\x12\x10\n\x0cROUTING_LOOP\x10;\x12)\n%DROPPED_INSIDE_GOOGLE_MANAGED_SERVICE\x10>\x12)\n%LOAD_BALANCER_BACKEND_INVALID_NETWORK\x10\x41\x12*\n&BACKEND_SERVICE_NAMED_PORT_NOT_DEFINED\x10\x42\x12\'\n#DESTINATION_IS_PRIVATE_NAT_IP_RANGE\x10\x43\x12)\n%DROPPED_INSIDE_REDIS_INSTANCE_SERVICE\x10\x46\x12#\n\x1fREDIS_INSTANCE_UNSUPPORTED_PORT\x10G\x12/\n+REDIS_INSTANCE_CONNECTING_FROM_PUPI_ADDRESS\x10H\x12\x32\n.REDIS_INSTANCE_NO_ROUTE_TO_DESTINATION_NETWORK\x10I\x12!\n\x1dREDIS_INSTANCE_NO_EXTERNAL_IP\x10J\x12\'\n#REDIS_INSTANCE_UNSUPPORTED_PROTOCOL\x10N\x12(\n$DROPPED_INSIDE_REDIS_CLUSTER_SERVICE\x10K\x12\"\n\x1eREDIS_CLUSTER_UNSUPPORTED_PORT\x10L\x12 \n\x1cREDIS_CLUSTER_NO_EXTERNAL_IP\x10M\x12&\n\"REDIS_CLUSTER_UNSUPPORTED_PROTOCOL\x10O\x12*\n&NO_ADVERTISED_ROUTE_TO_GCP_DESTINATION\x10P\x12*\n&NO_TRAFFIC_SELECTOR_TO_GCP_DESTINATION\x10Q\x12\x35\n1NO_KNOWN_ROUTE_FROM_PEERED_NETWORK_TO_DESTINATION\x10R\x12+\n\'PRIVATE_NAT_TO_PSC_ENDPOINT_UNSUPPORTED\x10S\x12\"\n\x1ePSC_PORT_MAPPING_PORT_MISMATCH\x10V\x12\x37\n3PSC_PORT_MAPPING_WITHOUT_PSC_CONNECTION_UNSUPPORTED\x10W\x12\x33\n/UNSUPPORTED_ROUTE_MATCHED_FOR_NAT64_DESTINATION\x10X\x12\x37\n3TRAFFIC_FROM_HYBRID_ENDPOINT_TO_INTERNET_DISALLOWED\x10Y\x12\x1d\n\x19NO_MATCHING_NAT64_GATEWAY\x10Z\x12$\n NO_CONFIGURED_PRIVATE_NAT64_RULE\x10k\x12-\n)LOAD_BALANCER_BACKEND_IP_VERSION_MISMATCH\x10`\x12\x32\n.NO_KNOWN_ROUTE_FROM_NCC_NETWORK_TO_DESTINATION\x10\x61\x12\"\n\x1e\x43LOUD_NAT_PROTOCOL_UNSUPPORTED\x10\x63\x12(\n$L2_INTERCONNECT_UNSUPPORTED_PROTOCOL\x10\x64\x12$\n L2_INTERCONNECT_UNSUPPORTED_PORT\x10\x65\x12+\n\'L2_INTERCONNECT_DESTINATION_IP_MISMATCH\x10\x66\x12.\n*NCC_ROUTE_WITHIN_HYBRID_SUBNET_UNSUPPORTED\x10h\x12!\n\x1dHYBRID_SUBNET_REGION_MISMATCH\x10i\x12\x1a\n\x16HYBRID_SUBNET_NO_ROUTE\x10j\x12\x16\n\x12GKE_NETWORK_POLICY\x10l\x12=\n9NO_VALID_ROUTE_FROM_GOOGLE_MANAGED_NETWORK_TO_DESTINATION\x10n\"\x81\x01\n\rGKEMasterInfo\x12\x13\n\x0b\x63luster_uri\x18\x02 \x01(\t\x12\x1b\n\x13\x63luster_network_uri\x18\x04 \x01(\t\x12\x13\n\x0binternal_ip\x18\x05 \x01(\t\x12\x13\n\x0b\x65xternal_ip\x18\x06 \x01(\t\x12\x14\n\x0c\x64ns_endpoint\x18\x07 \x01(\t\"P\n\nGkePodInfo\x12\x0f\n\x07pod_uri\x18\x01 \x01(\t\x12\x1c\n\nip_address\x18\x02 \x01(\tB\x08\xe2\x8c\xcf\xd7\x08\x02\x08\x04\x12\x13\n\x0bnetwork_uri\x18\x03 \x01(\t\"\xbf\x03\n\x19IpMasqueradingSkippedInfo\x12S\n\x06reason\x18\x01 \x01(\x0e\x32\x43.google.cloud.networkmanagement.v1.IpMasqueradingSkippedInfo.Reason\x12\x1c\n\x14non_masquerade_range\x18\x02 \x01(\t\"\xae\x02\n\x06Reason\x12\x16\n\x12REASON_UNSPECIFIED\x10\x00\x12\x35\n1DESTINATION_IP_IN_CONFIGURED_NON_MASQUERADE_RANGE\x10\x01\x12\x32\n.DESTINATION_IP_IN_DEFAULT_NON_MASQUERADE_RANGE\x10\x02\x12\x1c\n\x18\x44\x45STINATION_ON_SAME_NODE\x10\x03\x12\x19\n\x15\x44\x45\x46\x41ULT_SNAT_DISABLED\x10\x04\x12\x1c\n\x18NO_MASQUERADING_FOR_IPV6\x10\x05\x12#\n\x1fPOD_USES_NODE_NETWORK_NAMESPACE\x10\x06\x12%\n!NO_MASQUERADING_FOR_RETURN_PACKET\x10\x07\"\\\n\x14GkeNetworkPolicyInfo\x12\x14\n\x0c\x64isplay_name\x18\x01 \x01(\t\x12\x0b\n\x03uri\x18\x02 \x01(\t\x12\x11\n\tdirection\x18\x03 \x01(\t\x12\x0e\n\x06\x61\x63tion\x18\x04 \x01(\t\"\xde\x02\n\x1bGkeNetworkPolicySkippedInfo\x12U\n\x06reason\x18\x01 \x01(\x0e\x32\x45.google.cloud.networkmanagement.v1.GkeNetworkPolicySkippedInfo.Reason\"\xe7\x01\n\x06Reason\x12\x16\n\x12REASON_UNSPECIFIED\x10\x00\x12\x1b\n\x17NETWORK_POLICY_DISABLED\x10\x01\x12\x1f\n\x1bINGRESS_SOURCE_ON_SAME_NODE\x10\x02\x12*\n&EGRESS_FROM_NODE_NETWORK_NAMESPACE_POD\x10\x03\x12\x32\n.NETWORK_POLICY_NOT_APPLIED_TO_RESPONSE_TRAFFIC\x10\x04\x12\'\n#NETWORK_POLICY_ANALYSIS_UNSUPPORTED\x10\x64\"\x88\x01\n\x14\x43loudSQLInstanceInfo\x12\x14\n\x0c\x64isplay_name\x18\x01 \x01(\t\x12\x0b\n\x03uri\x18\x02 \x01(\t\x12\x13\n\x0bnetwork_uri\x18\x04 \x01(\t\x12\x13\n\x0binternal_ip\x18\x05 \x01(\t\x12\x13\n\x0b\x65xternal_ip\x18\x06 \x01(\t\x12\x0e\n\x06region\x18\x07 \x01(\t\"\x92\x01\n\x11RedisInstanceInfo\x12\x14\n\x0c\x64isplay_name\x18\x01 \x01(\t\x12\x0b\n\x03uri\x18\x02 \x01(\t\x12\x13\n\x0bnetwork_uri\x18\x03 \x01(\t\x12\x1b\n\x13primary_endpoint_ip\x18\x04 \x01(\t\x12\x18\n\x10read_endpoint_ip\x18\x05 \x01(\t\x12\x0e\n\x06region\x18\x06 \x01(\t\"\xbe\x01\n\x10RedisClusterInfo\x12\x14\n\x0c\x64isplay_name\x18\x01 \x01(\t\x12\x0b\n\x03uri\x18\x02 \x01(\t\x12\x13\n\x0bnetwork_uri\x18\x03 \x01(\t\x12/\n\x1d\x64iscovery_endpoint_ip_address\x18\x04 \x01(\tB\x08\xe2\x8c\xcf\xd7\x08\x02\x08\x04\x12/\n\x1dsecondary_endpoint_ip_address\x18\x05 \x01(\tB\x08\xe2\x8c\xcf\xd7\x08\x02\x08\x04\x12\x10\n\x08location\x18\x06 \x01(\t\"\\\n\x11\x43loudFunctionInfo\x12\x14\n\x0c\x64isplay_name\x18\x01 \x01(\t\x12\x0b\n\x03uri\x18\x02 \x01(\t\x12\x10\n\x08location\x18\x03 \x01(\t\x12\x12\n\nversion_id\x18\x04 \x01(\x03\"`\n\x14\x43loudRunRevisionInfo\x12\x14\n\x0c\x64isplay_name\x18\x01 \x01(\t\x12\x0b\n\x03uri\x18\x02 \x01(\t\x12\x10\n\x08location\x18\x04 \x01(\t\x12\x13\n\x0bservice_uri\x18\x05 \x01(\t\"_\n\x14\x41ppEngineVersionInfo\x12\x14\n\x0c\x64isplay_name\x18\x01 \x01(\t\x12\x0b\n\x03uri\x18\x02 \x01(\t\x12\x0f\n\x07runtime\x18\x03 \x01(\t\x12\x13\n\x0b\x65nvironment\x18\x04 \x01(\t\"G\n\x10VpcConnectorInfo\x12\x14\n\x0c\x64isplay_name\x18\x01 \x01(\t\x12\x0b\n\x03uri\x18\x02 \x01(\t\x12\x10\n\x08location\x18\x03 \x01(\t\"\xa8\x01\n\x1d\x44irectVpcEgressConnectionInfo\x12\x13\n\x0bnetwork_uri\x18\x01 \x01(\t\x12\x16\n\x0esubnetwork_uri\x18\x02 \x01(\t\x12#\n\x11selected_ip_range\x18\x03 \x01(\tB\x08\xe2\x8c\xcf\xd7\x08\x02\x08\x04\x12%\n\x13selected_ip_address\x18\x04 \x01(\tB\x08\xe2\x8c\xcf\xd7\x08\x02\x08\x04\x12\x0e\n\x06region\x18\x05 \x01(\t\"I\n ServerlessExternalConnectionInfo\x12%\n\x13selected_ip_address\x18\x01 \x01(\tB\x08\xe2\x8c\xcf\xd7\x08\x02\x08\x04\"\x91\x06\n\x07NatInfo\x12=\n\x04type\x18\x01 \x01(\x0e\x32/.google.cloud.networkmanagement.v1.NatInfo.Type\x12\x10\n\x08protocol\x18\x02 \x01(\t\x12\x13\n\x0bnetwork_uri\x18\x03 \x01(\t\x12\x15\n\rold_source_ip\x18\x04 \x01(\t\x12\x15\n\rnew_source_ip\x18\x05 \x01(\t\x12\x1a\n\x12old_destination_ip\x18\x06 \x01(\t\x12\x1a\n\x12new_destination_ip\x18\x07 \x01(\t\x12\x17\n\x0fold_source_port\x18\x08 \x01(\x05\x12\x17\n\x0fnew_source_port\x18\t \x01(\x05\x12\x1c\n\x14old_destination_port\x18\n \x01(\x05\x12\x1c\n\x14new_destination_port\x18\x0b \x01(\x05\x12\x12\n\nrouter_uri\x18\x0c \x01(\t\x12\x18\n\x10nat_gateway_name\x18\r \x01(\t\x12^\n\x16\x63loud_nat_gateway_type\x18\x0e \x01(\x0e\x32>.google.cloud.networkmanagement.v1.NatInfo.CloudNatGatewayType\"\x99\x01\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x18\n\x14INTERNAL_TO_EXTERNAL\x10\x01\x12\x18\n\x14\x45XTERNAL_TO_INTERNAL\x10\x02\x12\r\n\tCLOUD_NAT\x10\x03\x12\x1b\n\x17PRIVATE_SERVICE_CONNECT\x10\x04\x12\x1b\n\x17GKE_POD_IP_MASQUERADING\x10\x05\"\xa1\x01\n\x13\x43loudNatGatewayType\x12&\n\"CLOUD_NAT_GATEWAY_TYPE_UNSPECIFIED\x10\x00\x12\x10\n\x0cPUBLIC_NAT44\x10\x01\x12\x10\n\x0cPUBLIC_NAT64\x10\x02\x12\x13\n\x0fPRIVATE_NAT_NCC\x10\x03\x12\x16\n\x12PRIVATE_NAT_HYBRID\x10\x04\x12\x11\n\rPRIVATE_NAT64\x10\x05\"\xa4\x02\n\x13ProxyConnectionInfo\x12\x10\n\x08protocol\x18\x01 \x01(\t\x12\x15\n\rold_source_ip\x18\x02 \x01(\t\x12\x15\n\rnew_source_ip\x18\x03 \x01(\t\x12\x1a\n\x12old_destination_ip\x18\x04 \x01(\t\x12\x1a\n\x12new_destination_ip\x18\x05 \x01(\t\x12\x17\n\x0fold_source_port\x18\x06 \x01(\x05\x12\x17\n\x0fnew_source_port\x18\x07 \x01(\x05\x12\x1c\n\x14old_destination_port\x18\x08 \x01(\x05\x12\x1c\n\x14new_destination_port\x18\t \x01(\x05\x12\x12\n\nsubnet_uri\x18\n \x01(\t\x12\x13\n\x0bnetwork_uri\x18\x0b \x01(\t\"\xf2\x04\n\x17LoadBalancerBackendInfo\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0cinstance_uri\x18\x02 \x01(\t\x12\x1b\n\x13\x62\x61\x63kend_service_uri\x18\x03 \x01(\t\x12\x1a\n\x12instance_group_uri\x18\x04 \x01(\t\x12\"\n\x1anetwork_endpoint_group_uri\x18\x05 \x01(\t\x12\x1a\n\x12\x62\x61\x63kend_bucket_uri\x18\x08 \x01(\t\x12\"\n\x1apsc_service_attachment_uri\x18\t \x01(\t\x12\x1d\n\x15psc_google_api_target\x18\n \x01(\t\x12\x18\n\x10health_check_uri\x18\x06 \x01(\t\x12\x8c\x01\n#health_check_firewalls_config_state\x18\x07 \x01(\x0e\x32Z.google.cloud.networkmanagement.v1.LoadBalancerBackendInfo.HealthCheckFirewallsConfigStateB\x03\xe0\x41\x03\"\xcd\x01\n\x1fHealthCheckFirewallsConfigState\x12\x33\n/HEALTH_CHECK_FIREWALLS_CONFIG_STATE_UNSPECIFIED\x10\x00\x12\x18\n\x14\x46IREWALLS_CONFIGURED\x10\x01\x12\"\n\x1e\x46IREWALLS_PARTIALLY_CONFIGURED\x10\x02\x12\x1c\n\x18\x46IREWALLS_NOT_CONFIGURED\x10\x03\x12\x19\n\x15\x46IREWALLS_UNSUPPORTED\x10\x04\"#\n\x11StorageBucketInfo\x12\x0e\n\x06\x62ucket\x18\x01 \x01(\t\"$\n\x11ServerlessNegInfo\x12\x0f\n\x07neg_uri\x18\x01 \x01(\t\">\n\x18NgfwPacketInspectionInfo\x12\"\n\x1asecurity_profile_group_uri\x18\x01 \x01(\t*\xf6\x02\n\x10LoadBalancerType\x12\"\n\x1eLOAD_BALANCER_TYPE_UNSPECIFIED\x10\x00\x12 \n\x1cHTTPS_ADVANCED_LOAD_BALANCER\x10\x01\x12\x17\n\x13HTTPS_LOAD_BALANCER\x10\x02\x12 \n\x1cREGIONAL_HTTPS_LOAD_BALANCER\x10\x03\x12 \n\x1cINTERNAL_HTTPS_LOAD_BALANCER\x10\x04\x12\x1b\n\x17SSL_PROXY_LOAD_BALANCER\x10\x05\x12\x1b\n\x17TCP_PROXY_LOAD_BALANCER\x10\x06\x12$\n INTERNAL_TCP_PROXY_LOAD_BALANCER\x10\x07\x12\x19\n\x15NETWORK_LOAD_BALANCER\x10\x08\x12 \n\x1cLEGACY_NETWORK_LOAD_BALANCER\x10\t\x12\"\n\x1eTCP_UDP_INTERNAL_LOAD_BALANCER\x10\nB\xf9\x01\n%com.google.cloud.networkmanagement.v1B\nTraceProtoP\x01ZScloud.google.com/go/networkmanagement/apiv1/networkmanagementpb;networkmanagementpb\xaa\x02!Google.Cloud.NetworkManagement.V1\xca\x02!Google\\Cloud\\NetworkManagement\\V1\xea\x02$Google::Cloud::NetworkManagement::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 = [ - ] - 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 NetworkManagement - module V1 - Trace = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.Trace").msgclass - Step = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.Step").msgclass - Step::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.Step.State").enummodule - InstanceInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.InstanceInfo").msgclass - InstanceInfo::Status = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.InstanceInfo.Status").enummodule - NetworkInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.NetworkInfo").msgclass - FirewallInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.FirewallInfo").msgclass - FirewallInfo::FirewallRuleType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.FirewallInfo.FirewallRuleType").enummodule - FirewallInfo::TargetType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.FirewallInfo.TargetType").enummodule - RouteInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.RouteInfo").msgclass - RouteInfo::RouteType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.RouteInfo.RouteType").enummodule - RouteInfo::NextHopType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.RouteInfo.NextHopType").enummodule - RouteInfo::RouteScope = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.RouteInfo.RouteScope").enummodule - GoogleServiceInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.GoogleServiceInfo").msgclass - GoogleServiceInfo::GoogleServiceType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.GoogleServiceInfo.GoogleServiceType").enummodule - ForwardingRuleInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.ForwardingRuleInfo").msgclass - LoadBalancerInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.LoadBalancerInfo").msgclass - LoadBalancerInfo::LoadBalancerType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.LoadBalancerInfo.LoadBalancerType").enummodule - LoadBalancerInfo::BackendType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.LoadBalancerInfo.BackendType").enummodule - LoadBalancerBackend = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.LoadBalancerBackend").msgclass - LoadBalancerBackend::HealthCheckFirewallState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.LoadBalancerBackend.HealthCheckFirewallState").enummodule - HybridSubnetInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.HybridSubnetInfo").msgclass - VpnGatewayInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.VpnGatewayInfo").msgclass - VpnTunnelInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.VpnTunnelInfo").msgclass - VpnTunnelInfo::RoutingType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.VpnTunnelInfo.RoutingType").enummodule - InterconnectAttachmentInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.InterconnectAttachmentInfo").msgclass - InterconnectAttachmentInfo::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.InterconnectAttachmentInfo.Type").enummodule - EndpointInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.EndpointInfo").msgclass - DeliverInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.DeliverInfo").msgclass - DeliverInfo::Target = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.DeliverInfo.Target").enummodule - DeliverInfo::GoogleServiceType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.DeliverInfo.GoogleServiceType").enummodule - ForwardInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.ForwardInfo").msgclass - ForwardInfo::Target = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.ForwardInfo.Target").enummodule - AbortInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.AbortInfo").msgclass - AbortInfo::Cause = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.AbortInfo.Cause").enummodule - DropInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.DropInfo").msgclass - DropInfo::Cause = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.DropInfo.Cause").enummodule - GKEMasterInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.GKEMasterInfo").msgclass - GkePodInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.GkePodInfo").msgclass - IpMasqueradingSkippedInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.IpMasqueradingSkippedInfo").msgclass - IpMasqueradingSkippedInfo::Reason = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.IpMasqueradingSkippedInfo.Reason").enummodule - GkeNetworkPolicyInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.GkeNetworkPolicyInfo").msgclass - GkeNetworkPolicySkippedInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.GkeNetworkPolicySkippedInfo").msgclass - GkeNetworkPolicySkippedInfo::Reason = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.GkeNetworkPolicySkippedInfo.Reason").enummodule - CloudSQLInstanceInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.CloudSQLInstanceInfo").msgclass - RedisInstanceInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.RedisInstanceInfo").msgclass - RedisClusterInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.RedisClusterInfo").msgclass - CloudFunctionInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.CloudFunctionInfo").msgclass - CloudRunRevisionInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.CloudRunRevisionInfo").msgclass - AppEngineVersionInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.AppEngineVersionInfo").msgclass - VpcConnectorInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.VpcConnectorInfo").msgclass - DirectVpcEgressConnectionInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.DirectVpcEgressConnectionInfo").msgclass - ServerlessExternalConnectionInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.ServerlessExternalConnectionInfo").msgclass - NatInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.NatInfo").msgclass - NatInfo::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.NatInfo.Type").enummodule - NatInfo::CloudNatGatewayType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.NatInfo.CloudNatGatewayType").enummodule - ProxyConnectionInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.ProxyConnectionInfo").msgclass - LoadBalancerBackendInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.LoadBalancerBackendInfo").msgclass - LoadBalancerBackendInfo::HealthCheckFirewallsConfigState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.LoadBalancerBackendInfo.HealthCheckFirewallsConfigState").enummodule - StorageBucketInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.StorageBucketInfo").msgclass - ServerlessNegInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.ServerlessNegInfo").msgclass - NgfwPacketInspectionInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.NgfwPacketInspectionInfo").msgclass - LoadBalancerType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.LoadBalancerType").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/networkmanagement/v1/vpc_flow_logs_config_pb.rb b/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/networkmanagement/v1/vpc_flow_logs_config_pb.rb deleted file mode 100644 index da41bfc41277..000000000000 --- a/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/networkmanagement/v1/vpc_flow_logs_config_pb.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/networkmanagement/v1/vpc_flow_logs_config.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n.google.cloud.networkmanagement.v1.GetVpcFlowLogsConfigRequest\x1a\x34.google.cloud.networkmanagement.v1.VpcFlowLogsConfig\"E\xda\x41\x04name\x82\xd3\xe4\x93\x02\x38\x12\x36/v1/{name=projects/*/locations/*/vpcFlowLogsConfigs/*}\x12\xd3\x02\n\x17\x43reateVpcFlowLogsConfig\x12\x41.google.cloud.networkmanagement.v1.CreateVpcFlowLogsConfigRequest\x1a\x1d.google.longrunning.Operation\"\xd5\x01\xca\x41H\n\x11VpcFlowLogsConfig\x12\x33google.cloud.networkmanagement.v1.OperationMetadata\xda\x41\x33parent,vpc_flow_logs_config,vpc_flow_logs_config_id\x82\xd3\xe4\x93\x02N\"6/v1/{parent=projects/*/locations/*}/vpcFlowLogsConfigs:\x14vpc_flow_logs_config\x12\xd5\x02\n\x17UpdateVpcFlowLogsConfig\x12\x41.google.cloud.networkmanagement.v1.UpdateVpcFlowLogsConfigRequest\x1a\x1d.google.longrunning.Operation\"\xd7\x01\xca\x41H\n\x11VpcFlowLogsConfig\x12\x33google.cloud.networkmanagement.v1.OperationMetadata\xda\x41 vpc_flow_logs_config,update_mask\x82\xd3\xe4\x93\x02\x63\x32K/v1/{vpc_flow_logs_config.name=projects/*/locations/*/vpcFlowLogsConfigs/*}:\x14vpc_flow_logs_config\x12\x92\x02\n\x17\x44\x65leteVpcFlowLogsConfig\x12\x41.google.cloud.networkmanagement.v1.DeleteVpcFlowLogsConfigRequest\x1a\x1d.google.longrunning.Operation\"\x94\x01\xca\x41L\n\x15google.protobuf.Empty\x12\x33google.cloud.networkmanagement.v1.OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x38*6/v1/{name=projects/*/locations/*/vpcFlowLogsConfigs/*}\x12\x84\x02\n\x1aQueryOrgVpcFlowLogsConfigs\x12\x44.google.cloud.networkmanagement.v1.QueryOrgVpcFlowLogsConfigsRequest\x1a\x45.google.cloud.networkmanagement.v1.QueryOrgVpcFlowLogsConfigsResponse\"Y\x82\xd3\xe4\x93\x02S\x12Q/v1/{parent=projects/*/locations/*}/vpcFlowLogsConfigs:queryOrgVpcFlowLogsConfigs\x12\x8c\x02\n\x1cShowEffectiveFlowLogsConfigs\x12\x46.google.cloud.networkmanagement.v1.ShowEffectiveFlowLogsConfigsRequest\x1aG.google.cloud.networkmanagement.v1.ShowEffectiveFlowLogsConfigsResponse\"[\x82\xd3\xe4\x93\x02U\x12S/v1/{parent=projects/*/locations/*}/vpcFlowLogsConfigs:showEffectiveFlowLogsConfigs\x1aT\xca\x41 networkmanagement.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platform2\x91\x0c\n\x1eOrganizationVpcFlowLogsService\x12\xeb\x01\n\x16ListVpcFlowLogsConfigs\x12@.google.cloud.networkmanagement.v1.ListVpcFlowLogsConfigsRequest\x1a\x41.google.cloud.networkmanagement.v1.ListVpcFlowLogsConfigsResponse\"L\xda\x41\x06parent\x82\xd3\xe4\x93\x02=\x12;/v1/{parent=organizations/*/locations/*}/vpcFlowLogsConfigs\x12\xd8\x01\n\x14GetVpcFlowLogsConfig\x12>.google.cloud.networkmanagement.v1.GetVpcFlowLogsConfigRequest\x1a\x34.google.cloud.networkmanagement.v1.VpcFlowLogsConfig\"J\xda\x41\x04name\x82\xd3\xe4\x93\x02=\x12;/v1/{name=organizations/*/locations/*/vpcFlowLogsConfigs/*}\x12\xd8\x02\n\x17\x43reateVpcFlowLogsConfig\x12\x41.google.cloud.networkmanagement.v1.CreateVpcFlowLogsConfigRequest\x1a\x1d.google.longrunning.Operation\"\xda\x01\xca\x41H\n\x11VpcFlowLogsConfig\x12\x33google.cloud.networkmanagement.v1.OperationMetadata\xda\x41\x33parent,vpc_flow_logs_config,vpc_flow_logs_config_id\x82\xd3\xe4\x93\x02S\";/v1/{parent=organizations/*/locations/*}/vpcFlowLogsConfigs:\x14vpc_flow_logs_config\x12\xda\x02\n\x17UpdateVpcFlowLogsConfig\x12\x41.google.cloud.networkmanagement.v1.UpdateVpcFlowLogsConfigRequest\x1a\x1d.google.longrunning.Operation\"\xdc\x01\xca\x41H\n\x11VpcFlowLogsConfig\x12\x33google.cloud.networkmanagement.v1.OperationMetadata\xda\x41 vpc_flow_logs_config,update_mask\x82\xd3\xe4\x93\x02h2P/v1/{vpc_flow_logs_config.name=organizations/*/locations/*/vpcFlowLogsConfigs/*}:\x14vpc_flow_logs_config\x12\x97\x02\n\x17\x44\x65leteVpcFlowLogsConfig\x12\x41.google.cloud.networkmanagement.v1.DeleteVpcFlowLogsConfigRequest\x1a\x1d.google.longrunning.Operation\"\x99\x01\xca\x41L\n\x15google.protobuf.Empty\x12\x33google.cloud.networkmanagement.v1.OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02=*;/v1/{name=organizations/*/locations/*/vpcFlowLogsConfigs/*}\x1aT\xca\x41 networkmanagement.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xff\x01\n%com.google.cloud.networkmanagement.v1B\x10VpcFlowLogsProtoP\x01ZScloud.google.com/go/networkmanagement/apiv1/networkmanagementpb;networkmanagementpb\xaa\x02!Google.Cloud.NetworkManagement.V1\xca\x02!Google\\Cloud\\NetworkManagement\\V1\xea\x02$Google::Cloud::NetworkManagement::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.cloud.networkmanagement.v1.VpcFlowLogsConfig", "google/cloud/networkmanagement/v1/vpc_flow_logs_config.proto"], - ["google.protobuf.FieldMask", "google/protobuf/field_mask.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 NetworkManagement - module V1 - ListVpcFlowLogsConfigsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.ListVpcFlowLogsConfigsRequest").msgclass - ListVpcFlowLogsConfigsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.ListVpcFlowLogsConfigsResponse").msgclass - GetVpcFlowLogsConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.GetVpcFlowLogsConfigRequest").msgclass - CreateVpcFlowLogsConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.CreateVpcFlowLogsConfigRequest").msgclass - UpdateVpcFlowLogsConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.UpdateVpcFlowLogsConfigRequest").msgclass - DeleteVpcFlowLogsConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.DeleteVpcFlowLogsConfigRequest").msgclass - QueryOrgVpcFlowLogsConfigsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.QueryOrgVpcFlowLogsConfigsRequest").msgclass - QueryOrgVpcFlowLogsConfigsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.QueryOrgVpcFlowLogsConfigsResponse").msgclass - ShowEffectiveFlowLogsConfigsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.ShowEffectiveFlowLogsConfigsRequest").msgclass - ShowEffectiveFlowLogsConfigsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkmanagement.v1.ShowEffectiveFlowLogsConfigsResponse").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/networkmanagement/v1/vpc_flow_logs_services_pb.rb b/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/networkmanagement/v1/vpc_flow_logs_services_pb.rb deleted file mode 100644 index 0e83e1a525a0..000000000000 --- a/owl-bot-staging/google-cloud-network_management-v1/lib/google/cloud/networkmanagement/v1/vpc_flow_logs_services_pb.rb +++ /dev/null @@ -1,144 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/cloud/networkmanagement/v1/vpc_flow_logs.proto for package 'Google.Cloud.NetworkManagement.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/networkmanagement/v1/vpc_flow_logs_pb' - -module Google - module Cloud - module NetworkManagement - module V1 - module VpcFlowLogsService - # The VPC Flow Logs service in the Google Cloud Network Management API provides - # configurations that generate Flow Logs. The service and the configuration - # resources created using this service are global. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.cloud.networkmanagement.v1.VpcFlowLogsService' - - # Lists all `VpcFlowLogsConfigs` in a given project. - rpc :ListVpcFlowLogsConfigs, ::Google::Cloud::NetworkManagement::V1::ListVpcFlowLogsConfigsRequest, ::Google::Cloud::NetworkManagement::V1::ListVpcFlowLogsConfigsResponse - # Gets the details of a specific `VpcFlowLogsConfig`. - rpc :GetVpcFlowLogsConfig, ::Google::Cloud::NetworkManagement::V1::GetVpcFlowLogsConfigRequest, ::Google::Cloud::NetworkManagement::V1::VpcFlowLogsConfig - # Creates a new `VpcFlowLogsConfig`. - # If a configuration with the exact same settings already exists (even if the - # ID is different), the creation fails. - # Notes: - # - # 1. Creating a configuration with `state=DISABLED` will fail - # 2. The following fields are not considered as settings for the purpose - # of the check mentioned above, therefore - creating another configuration - # with the same fields but different values for the following fields will - # fail as well: - # * name - # * create_time - # * update_time - # * labels - # * description - rpc :CreateVpcFlowLogsConfig, ::Google::Cloud::NetworkManagement::V1::CreateVpcFlowLogsConfigRequest, ::Google::Longrunning::Operation - # Updates an existing `VpcFlowLogsConfig`. - # If a configuration with the exact same settings already exists (even if the - # ID is different), the creation fails. - # Notes: - # - # 1. Updating a configuration with `state=DISABLED` will fail. - # 2. The following fields are not considered as settings for the purpose - # of the check mentioned above, therefore - updating another configuration - # with the same fields but different values for the following fields will - # fail as well: - # * name - # * create_time - # * update_time - # * labels - # * description - rpc :UpdateVpcFlowLogsConfig, ::Google::Cloud::NetworkManagement::V1::UpdateVpcFlowLogsConfigRequest, ::Google::Longrunning::Operation - # Deletes a specific `VpcFlowLogsConfig`. - rpc :DeleteVpcFlowLogsConfig, ::Google::Cloud::NetworkManagement::V1::DeleteVpcFlowLogsConfigRequest, ::Google::Longrunning::Operation - # QueryOrgVpcFlowLogsConfigs returns a list of all organization-level VPC - # Flow Logs configurations applicable to the specified project. - rpc :QueryOrgVpcFlowLogsConfigs, ::Google::Cloud::NetworkManagement::V1::QueryOrgVpcFlowLogsConfigsRequest, ::Google::Cloud::NetworkManagement::V1::QueryOrgVpcFlowLogsConfigsResponse - # ShowEffectiveFlowLogsConfigs returns a list of all VPC Flow Logs - # configurations applicable to a specified resource. - rpc :ShowEffectiveFlowLogsConfigs, ::Google::Cloud::NetworkManagement::V1::ShowEffectiveFlowLogsConfigsRequest, ::Google::Cloud::NetworkManagement::V1::ShowEffectiveFlowLogsConfigsResponse - end - - Stub = Service.rpc_stub_class - end - module OrganizationVpcFlowLogsService - # The VPC Flow Logs organization service in the Google Cloud Network Management - # API provides organization level configurations that generate Flow Logs. The - # service and the configuration resources created using this service are - # global. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.cloud.networkmanagement.v1.OrganizationVpcFlowLogsService' - - # Lists all `VpcFlowLogsConfigs` in a given organization. - rpc :ListVpcFlowLogsConfigs, ::Google::Cloud::NetworkManagement::V1::ListVpcFlowLogsConfigsRequest, ::Google::Cloud::NetworkManagement::V1::ListVpcFlowLogsConfigsResponse - # Gets the details of a specific `VpcFlowLogsConfig`. - rpc :GetVpcFlowLogsConfig, ::Google::Cloud::NetworkManagement::V1::GetVpcFlowLogsConfigRequest, ::Google::Cloud::NetworkManagement::V1::VpcFlowLogsConfig - # Creates a new `VpcFlowLogsConfig`. - # If a configuration with the exact same settings already exists (even if the - # ID is different), the creation fails. - # Notes: - # - # 1. Creating a configuration with `state=DISABLED` will fail - # 2. The following fields are not considered as settings for the purpose - # of the check mentioned above, therefore - creating another configuration - # with the same fields but different values for the following fields will - # fail as well: - # * name - # * create_time - # * update_time - # * labels - # * description - rpc :CreateVpcFlowLogsConfig, ::Google::Cloud::NetworkManagement::V1::CreateVpcFlowLogsConfigRequest, ::Google::Longrunning::Operation - # Updates an existing `VpcFlowLogsConfig`. - # If a configuration with the exact same settings already exists (even if the - # ID is different), the creation fails. - # Notes: - # - # 1. Updating a configuration with `state=DISABLED` will fail - # 2. The following fields are not considered as settings for the purpose - # of the check mentioned above, therefore - updating another configuration - # with the same fields but different values for the following fields will - # fail as well: - # * name - # * create_time - # * update_time - # * labels - # * description - rpc :UpdateVpcFlowLogsConfig, ::Google::Cloud::NetworkManagement::V1::UpdateVpcFlowLogsConfigRequest, ::Google::Longrunning::Operation - # Deletes a specific `VpcFlowLogsConfig`. - rpc :DeleteVpcFlowLogsConfig, ::Google::Cloud::NetworkManagement::V1::DeleteVpcFlowLogsConfigRequest, ::Google::Longrunning::Operation - end - - Stub = Service.rpc_stub_class - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-network_management-v1/proto_docs/README.md b/owl-bot-staging/google-cloud-network_management-v1/proto_docs/README.md deleted file mode 100644 index 45230be2e5e4..000000000000 --- a/owl-bot-staging/google-cloud-network_management-v1/proto_docs/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# Network Management 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-network_management-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-network_management-v1/proto_docs/google/api/client.rb deleted file mode 100644 index d59ba51a5612..000000000000 --- a/owl-bot-staging/google-cloud-network_management-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-network_management-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-network_management-v1/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index 582be187d115..000000000000 --- a/owl-bot-staging/google-cloud-network_management-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-network_management-v1/proto_docs/google/api/field_info.rb b/owl-bot-staging/google-cloud-network_management-v1/proto_docs/google/api/field_info.rb deleted file mode 100644 index 0f5acf0a5538..000000000000 --- a/owl-bot-staging/google-cloud-network_management-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-network_management-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-network_management-v1/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 9392a413fb1b..000000000000 --- a/owl-bot-staging/google-cloud-network_management-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-network_management-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-network_management-v1/proto_docs/google/api/resource.rb deleted file mode 100644 index 25dec4847ac1..000000000000 --- a/owl-bot-staging/google-cloud-network_management-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-network_management-v1/proto_docs/google/cloud/networkmanagement/v1/connectivity_test.rb b/owl-bot-staging/google-cloud-network_management-v1/proto_docs/google/cloud/networkmanagement/v1/connectivity_test.rb deleted file mode 100644 index a7325b8fa62a..000000000000 --- a/owl-bot-staging/google-cloud-network_management-v1/proto_docs/google/cloud/networkmanagement/v1/connectivity_test.rb +++ /dev/null @@ -1,490 +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 NetworkManagement - module V1 - # A Connectivity Test for a network reachability analysis. - # @!attribute [rw] name - # @return [::String] - # Identifier. Unique name of the resource using the form: - # `projects/{project_id}/locations/global/connectivityTests/{test_id}` - # @!attribute [rw] description - # @return [::String] - # The user-supplied description of the Connectivity Test. - # Maximum of 512 characters. - # @!attribute [rw] source - # @return [::Google::Cloud::NetworkManagement::V1::Endpoint] - # Required. Source specification of the Connectivity Test. - # - # You can use a combination of source IP address, URI of a supported - # endpoint, project ID, or VPC network to identify the source location. - # - # Reachability analysis might proceed even if the source location is - # ambiguous. However, the test result might include endpoints or use a source - # that you don't intend to test. - # @!attribute [rw] destination - # @return [::Google::Cloud::NetworkManagement::V1::Endpoint] - # Required. Destination specification of the Connectivity Test. - # - # You can use a combination of destination IP address, URI of a supported - # endpoint, project ID, or VPC network to identify the destination location. - # - # Reachability analysis proceeds even if the destination location is - # ambiguous. However, the test result might include endpoints or use a - # destination that you don't intend to test. - # @!attribute [rw] protocol - # @return [::String] - # IP Protocol of the test. When not provided, "TCP" is assumed. - # @!attribute [rw] related_projects - # @return [::Array<::String>] - # Other projects that may be relevant for reachability analysis. - # This is applicable to scenarios where a test can cross project boundaries. - # @!attribute [r] display_name - # @return [::String] - # Output only. The display name of a Connectivity Test. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Resource labels to represent user-provided metadata. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time the test was created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time the test's configuration was updated. - # @!attribute [r] reachability_details - # @return [::Google::Cloud::NetworkManagement::V1::ReachabilityDetails] - # Output only. The reachability details of this test from the latest run. - # The details are updated when creating a new test, updating an - # existing test, or triggering a one-time rerun of an existing test. - # @!attribute [r] probing_details - # @return [::Google::Cloud::NetworkManagement::V1::ProbingDetails] - # Output only. The probing details of this test from the latest run, present - # for applicable tests only. The details are updated when creating a new - # test, updating an existing test, or triggering a one-time rerun of an - # existing test. - # @!attribute [rw] round_trip - # @return [::Boolean] - # Whether run analysis for the return path from destination to source. - # Default value is false. - # @!attribute [r] return_reachability_details - # @return [::Google::Cloud::NetworkManagement::V1::ReachabilityDetails] - # Output only. The reachability details of this test from the latest run for - # the return path. The details are updated when creating a new test, - # updating an existing test, or triggering a one-time rerun of an existing - # test. - # @!attribute [rw] bypass_firewall_checks - # @return [::Boolean] - # Whether the analysis should skip firewall checking. Default value is false. - class ConnectivityTest - 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 - end - - # Source or destination of the Connectivity Test. - # @!attribute [rw] ip_address - # @return [::String] - # The IP address of the endpoint, which can be an external or internal IP. - # @!attribute [rw] port - # @return [::Integer] - # The IP protocol port of the endpoint. - # Only applicable when protocol is TCP or UDP. - # @!attribute [rw] instance - # @return [::String] - # A Compute Engine instance URI. - # @!attribute [rw] forwarding_rule - # @return [::String] - # A forwarding rule and its corresponding IP address represent the frontend - # configuration of a Google Cloud load balancer. Forwarding rules are also - # used for protocol forwarding, Private Service Connect and other network - # services to provide forwarding information in the control plane. Applicable - # only to destination endpoint. Format: - # `projects/{project}/global/forwardingRules/{id}` or - # `projects/{project}/regions/{region}/forwardingRules/{id}` - # @!attribute [r] forwarding_rule_target - # @return [::Google::Cloud::NetworkManagement::V1::Endpoint::ForwardingRuleTarget] - # Output only. Specifies the type of the target of the forwarding rule. - # @!attribute [r] load_balancer_id - # @return [::String] - # Output only. ID of the load balancer the forwarding rule points to. Empty - # for forwarding rules not related to load balancers. - # @!attribute [r] load_balancer_type - # @return [::Google::Cloud::NetworkManagement::V1::LoadBalancerType] - # Output only. Type of the load balancer the forwarding rule points to. - # @!attribute [rw] gke_master_cluster - # @return [::String] - # A cluster URI for [Google Kubernetes Engine cluster control - # plane](https://cloud.google.com/kubernetes-engine/docs/concepts/cluster-architecture). - # @!attribute [rw] fqdn - # @return [::String] - # DNS endpoint of [Google Kubernetes Engine cluster control - # plane](https://cloud.google.com/kubernetes-engine/docs/concepts/cluster-architecture). - # Requires gke_master_cluster to be set, can't be used simultaneoulsly with - # ip_address or network. Applicable only to destination endpoint. - # @!attribute [rw] cloud_sql_instance - # @return [::String] - # A [Cloud SQL](https://cloud.google.com/sql) instance URI. - # @!attribute [rw] redis_instance - # @return [::String] - # A [Redis Instance](https://cloud.google.com/memorystore/docs/redis) URI. - # Applicable only to destination endpoint. - # @!attribute [rw] redis_cluster - # @return [::String] - # A [Redis Cluster](https://cloud.google.com/memorystore/docs/cluster) URI. - # Applicable only to destination endpoint. - # @!attribute [rw] gke_pod - # @return [::String] - # A [GKE Pod](https://cloud.google.com/kubernetes-engine/docs/concepts/pod) - # URI. - # @!attribute [rw] cloud_function - # @return [::Google::Cloud::NetworkManagement::V1::Endpoint::CloudFunctionEndpoint] - # A [Cloud Function](https://cloud.google.com/functions). Applicable only to - # source endpoint. - # @!attribute [rw] app_engine_version - # @return [::Google::Cloud::NetworkManagement::V1::Endpoint::AppEngineVersionEndpoint] - # An [App Engine](https://cloud.google.com/appengine) [service - # version](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions). - # Applicable only to source endpoint. - # @!attribute [rw] cloud_run_revision - # @return [::Google::Cloud::NetworkManagement::V1::Endpoint::CloudRunRevisionEndpoint] - # A [Cloud Run](https://cloud.google.com/run) - # [revision](https://cloud.google.com/run/docs/reference/rest/v1/namespaces.revisions/get) - # Applicable only to source endpoint. - # @!attribute [rw] network - # @return [::String] - # A VPC network URI. For source endpoints, used according to the - # `network_type`. For destination endpoints, used only when the source is an - # external IP address endpoint, and the destination is an internal IP address - # endpoint. - # @!attribute [rw] network_type - # @return [::Google::Cloud::NetworkManagement::V1::Endpoint::NetworkType] - # For source endpoints, type of the network where the endpoint is located. - # Not relevant for destination endpoints. - # @!attribute [rw] project_id - # @return [::String] - # For source endpoints, endpoint project ID. Used according to the - # `network_type`. Not relevant for destination endpoints. - class Endpoint - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Wrapper for Cloud Function attributes. - # @!attribute [rw] uri - # @return [::String] - # A [Cloud Function](https://cloud.google.com/functions) name. - class CloudFunctionEndpoint - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Wrapper for the App Engine service version attributes. - # @!attribute [rw] uri - # @return [::String] - # An [App Engine](https://cloud.google.com/appengine) [service - # version](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions) - # name. - class AppEngineVersionEndpoint - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Wrapper for Cloud Run revision attributes. - # @!attribute [rw] uri - # @return [::String] - # A [Cloud Run](https://cloud.google.com/run) - # [revision](https://cloud.google.com/run/docs/reference/rest/v1/namespaces.revisions/get) - # URI. The format is: - # projects/\\{project}/locations/\\{location}/revisions/\\{revision} - # @!attribute [r] service_uri - # @return [::String] - # Output only. The URI of the Cloud Run service that the revision belongs - # to. The format is: - # projects/\\{project}/locations/\\{location}/services/\\{service} - class CloudRunRevisionEndpoint - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The type of the network of the IP address endpoint. Relevant for the source - # IP address endpoints. - module NetworkType - # Unspecified. The test will analyze all possible IP address locations. - # This might take longer and produce inaccurate or ambiguous results, so - # prefer specifying an explicit network type. - # - # The `project_id` field should be set to the project where the GCP - # endpoint is located, or where the non-GCP endpoint should be reachable - # from (via routes to non-GCP networks). The project might also be inferred - # from the Connectivity Test project or other projects referenced in the - # request. - NETWORK_TYPE_UNSPECIFIED = 0 - - # A VPC network. Should be used for internal IP addresses in VPC networks. - # The `network` field should be set to the URI of this network. Only - # endpoints within this network will be considered. - GCP_NETWORK = 1 - - # A non-GCP network (for example, an on-premises network or another cloud - # provider network). Should be used for internal IP addresses outside of - # Google Cloud. The `network` field should be set to the URI of the VPC - # network containing a corresponding Cloud VPN tunnel, Cloud Interconnect - # VLAN attachment, or a router appliance instance. Only endpoints reachable - # from the provided VPC network via the routes to non-GCP networks will be - # considered. - NON_GCP_NETWORK = 2 - - # Internet. Should be used for internet-routable external IP addresses or - # IP addresses for global Google APIs and services. - INTERNET = 3 - end - - # Type of the target of a forwarding rule. - module ForwardingRuleTarget - # Forwarding rule target is unknown. - FORWARDING_RULE_TARGET_UNSPECIFIED = 0 - - # Compute Engine instance for protocol forwarding. - INSTANCE = 1 - - # Load Balancer. The specific type can be found from [load_balancer_type] - # [google.cloud.networkmanagement.v1.Endpoint.load_balancer_type]. - LOAD_BALANCER = 2 - - # Classic Cloud VPN Gateway. - VPN_GATEWAY = 3 - - # Forwarding Rule is a Private Service Connect endpoint. - PSC = 4 - end - end - - # Results of the configuration analysis from the last run of the test. - # @!attribute [rw] result - # @return [::Google::Cloud::NetworkManagement::V1::ReachabilityDetails::Result] - # The overall result of the test's configuration analysis. - # @!attribute [rw] verify_time - # @return [::Google::Protobuf::Timestamp] - # The time of the configuration analysis. - # @!attribute [rw] error - # @return [::Google::Rpc::Status] - # The details of a failure or a cancellation of reachability analysis. - # @!attribute [rw] traces - # @return [::Array<::Google::Cloud::NetworkManagement::V1::Trace>] - # Result may contain a list of traces if a test has multiple possible - # paths in the network, such as when destination endpoint is a load balancer - # with multiple backends. - class ReachabilityDetails - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The overall result of the test's configuration analysis. - module Result - # No result was specified. - RESULT_UNSPECIFIED = 0 - - # Possible scenarios are: - # - # * The configuration analysis determined that a packet originating from - # the source is expected to reach the destination. - # * The analysis didn't complete because the user lacks permission for - # some of the resources in the trace. However, at the time the user's - # permission became insufficient, the trace had been successful so far. - REACHABLE = 1 - - # A packet originating from the source is expected to be dropped before - # reaching the destination. - UNREACHABLE = 2 - - # The source and destination endpoints do not uniquely identify - # the test location in the network, and the reachability result contains - # multiple traces. For some traces, a packet could be delivered, and for - # others, it would not be. This result is also assigned to - # configuration analysis of return path if on its own it should be - # REACHABLE, but configuration analysis of forward path is AMBIGUOUS. - AMBIGUOUS = 4 - - # The configuration analysis did not complete. Possible reasons are: - # - # * A permissions error occurred--for example, the user might not have - # read permission for all of the resources named in the test. - # * An internal error occurred. - # * The analyzer received an invalid or unsupported argument or was unable - # to identify a known endpoint. - UNDETERMINED = 5 - end - end - - # Latency percentile rank and value. - # @!attribute [rw] percent - # @return [::Integer] - # Percentage of samples this data point applies to. - # @!attribute [rw] latency_micros - # @return [::Integer] - # percent-th percentile of latency observed, in microseconds. - # Fraction of percent/100 of samples have latency lower or - # equal to the value of this field. - class LatencyPercentile - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Describes measured latency distribution. - # @!attribute [rw] latency_percentiles - # @return [::Array<::Google::Cloud::NetworkManagement::V1::LatencyPercentile>] - # Representative latency percentiles. - class LatencyDistribution - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Results of active probing from the last run of the test. - # @!attribute [rw] result - # @return [::Google::Cloud::NetworkManagement::V1::ProbingDetails::ProbingResult] - # The overall result of active probing. - # @!attribute [rw] verify_time - # @return [::Google::Protobuf::Timestamp] - # The time that reachability was assessed through active probing. - # @!attribute [rw] error - # @return [::Google::Rpc::Status] - # Details about an internal failure or the cancellation of active probing. - # @!attribute [rw] abort_cause - # @return [::Google::Cloud::NetworkManagement::V1::ProbingDetails::ProbingAbortCause] - # The reason probing was aborted. - # @!attribute [rw] sent_probe_count - # @return [::Integer] - # Number of probes sent. - # @!attribute [rw] successful_probe_count - # @return [::Integer] - # Number of probes that reached the destination. - # @!attribute [rw] endpoint_info - # @return [::Google::Cloud::NetworkManagement::V1::EndpointInfo] - # The source and destination endpoints derived from the test input and used - # for active probing. - # @!attribute [rw] probing_latency - # @return [::Google::Cloud::NetworkManagement::V1::LatencyDistribution] - # Latency as measured by active probing in one direction: - # from the source to the destination endpoint. - # @!attribute [rw] destination_egress_location - # @return [::Google::Cloud::NetworkManagement::V1::ProbingDetails::EdgeLocation] - # The EdgeLocation from which a packet, destined to the internet, will egress - # the Google network. - # This will only be populated for a connectivity test which has an internet - # destination address. - # The absence of this field *must not* be used as an indication that the - # destination is part of the Google network. - # @!attribute [rw] edge_responses - # @return [::Array<::Google::Cloud::NetworkManagement::V1::ProbingDetails::SingleEdgeResponse>] - # Probing results for all edge devices. - # @!attribute [rw] probed_all_devices - # @return [::Boolean] - # Whether all relevant edge devices were probed. - class ProbingDetails - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Representation of a network edge location as per - # https://cloud.google.com/vpc/docs/edge-locations. - # @!attribute [rw] metropolitan_area - # @return [::String] - # Name of the metropolitan area. - class EdgeLocation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Probing results for a single edge device. - # @!attribute [rw] result - # @return [::Google::Cloud::NetworkManagement::V1::ProbingDetails::ProbingResult] - # The overall result of active probing for this egress device. - # @!attribute [rw] sent_probe_count - # @return [::Integer] - # Number of probes sent. - # @!attribute [rw] successful_probe_count - # @return [::Integer] - # Number of probes that reached the destination. - # @!attribute [rw] probing_latency - # @return [::Google::Cloud::NetworkManagement::V1::LatencyDistribution] - # Latency as measured by active probing in one direction: from the source - # to the destination endpoint. - # @!attribute [rw] destination_egress_location - # @return [::Google::Cloud::NetworkManagement::V1::ProbingDetails::EdgeLocation] - # The EdgeLocation from which a packet, destined to the internet, will - # egress the Google network. - # This will only be populated for a connectivity test which has an internet - # destination address. - # The absence of this field *must not* be used as an indication that the - # destination is part of the Google network. - # @!attribute [rw] destination_router - # @return [::String] - # Router name in the format '\\{router}.\\{metroshard}'. For example: - # pf01.aaa01, pr02.aaa01. - class SingleEdgeResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Overall probing result of the test. - module ProbingResult - # No result was specified. - PROBING_RESULT_UNSPECIFIED = 0 - - # At least 95% of packets reached the destination. - REACHABLE = 1 - - # No packets reached the destination. - UNREACHABLE = 2 - - # Less than 95% of packets reached the destination. - REACHABILITY_INCONSISTENT = 3 - - # Reachability could not be determined. Possible reasons are: - # * The user lacks permission to access some of the network resources - # required to run the test. - # * No valid source endpoint could be derived from the request. - # * An internal error occurred. - UNDETERMINED = 4 - end - - # Abort cause types. - module ProbingAbortCause - # No reason was specified. - PROBING_ABORT_CAUSE_UNSPECIFIED = 0 - - # The user lacks permission to access some of the - # network resources required to run the test. - PERMISSION_DENIED = 1 - - # No valid source endpoint could be derived from the request. - NO_SOURCE_LOCATION = 2 - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-network_management-v1/proto_docs/google/cloud/networkmanagement/v1/reachability.rb b/owl-bot-staging/google-cloud-network_management-v1/proto_docs/google/cloud/networkmanagement/v1/reachability.rb deleted file mode 100644 index a24703a951fc..000000000000 --- a/owl-bot-staging/google-cloud-network_management-v1/proto_docs/google/cloud/networkmanagement/v1/reachability.rb +++ /dev/null @@ -1,174 +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 NetworkManagement - module V1 - # Request for the `ListConnectivityTests` method. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent resource of the Connectivity Tests: - # `projects/{project_id}/locations/global` - # @!attribute [rw] page_size - # @return [::Integer] - # Number of `ConnectivityTests` to return. - # @!attribute [rw] page_token - # @return [::String] - # Page token from an earlier query, as returned in `next_page_token`. - # @!attribute [rw] filter - # @return [::String] - # Lists the `ConnectivityTests` that match the filter expression. A filter - # expression filters the resources listed in the response. The expression - # must be of the form ` ` where operators: `<`, `>`, - # `<=`, - # `>=`, - # `!=`, `=`, `:` are supported (colon `:` represents a HAS operator which is - # roughly synonymous with equality). can refer to a proto or JSON - # field, or a synthetic field. Field names can be camelCase or snake_case. - # - # Examples: - # - Filter by name: - # name = "projects/proj-1/locations/global/connectivityTests/test-1 - # - # - Filter by labels: - # - Resources that have a key called `foo` - # labels.foo:* - # - Resources that have a key called `foo` whose value is `bar` - # labels.foo = bar - # @!attribute [rw] order_by - # @return [::String] - # Field to use to sort the list. - class ListConnectivityTestsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response for the `ListConnectivityTests` method. - # @!attribute [rw] resources - # @return [::Array<::Google::Cloud::NetworkManagement::V1::ConnectivityTest>] - # List of Connectivity Tests. - # @!attribute [rw] next_page_token - # @return [::String] - # Page token to fetch the next set of Connectivity Tests. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Locations that could not be reached (when querying all locations with `-`). - class ListConnectivityTestsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for the `GetConnectivityTest` method. - # @!attribute [rw] name - # @return [::String] - # Required. `ConnectivityTest` resource name using the form: - # `projects/{project_id}/locations/global/connectivityTests/{test_id}` - class GetConnectivityTestRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for the `CreateConnectivityTest` method. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent resource of the Connectivity Test to create: - # `projects/{project_id}/locations/global` - # @!attribute [rw] test_id - # @return [::String] - # Required. The logical name of the Connectivity Test in your project - # with the following restrictions: - # - # * Must contain only lowercase letters, numbers, and hyphens. - # * Must start with a letter. - # * Must be between 1-40 characters. - # * Must end with a number or a letter. - # * Must be unique within the customer project - # @!attribute [rw] resource - # @return [::Google::Cloud::NetworkManagement::V1::ConnectivityTest] - # Required. A `ConnectivityTest` resource - class CreateConnectivityTestRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for the `UpdateConnectivityTest` method. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. Mask of fields to update. At least one path must be supplied in - # this field. - # @!attribute [rw] resource - # @return [::Google::Cloud::NetworkManagement::V1::ConnectivityTest] - # Required. Only fields specified in update_mask are updated. - class UpdateConnectivityTestRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for the `DeleteConnectivityTest` method. - # @!attribute [rw] name - # @return [::String] - # Required. Connectivity Test resource name using the form: - # `projects/{project_id}/locations/global/connectivityTests/{test_id}` - class DeleteConnectivityTestRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for the `RerunConnectivityTest` method. - # @!attribute [rw] name - # @return [::String] - # Required. Connectivity Test resource name using the form: - # `projects/{project_id}/locations/global/connectivityTests/{test_id}` - class RerunConnectivityTestRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Metadata describing an {::Google::Longrunning::Operation Operation} - # @!attribute [rw] create_time - # @return [::Google::Protobuf::Timestamp] - # The time the operation was created. - # @!attribute [rw] end_time - # @return [::Google::Protobuf::Timestamp] - # The time the operation finished running. - # @!attribute [rw] target - # @return [::String] - # Target of the operation - for example - # projects/project-1/locations/global/connectivityTests/test-1 - # @!attribute [rw] verb - # @return [::String] - # Name of the verb executed by the operation. - # @!attribute [rw] status_detail - # @return [::String] - # Human-readable status of the operation, if any. - # @!attribute [rw] cancel_requested - # @return [::Boolean] - # Specifies if cancellation was requested for the operation. - # @!attribute [rw] api_version - # @return [::String] - # API version. - class OperationMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-network_management-v1/proto_docs/google/cloud/networkmanagement/v1/trace.rb b/owl-bot-staging/google-cloud-network_management-v1/proto_docs/google/cloud/networkmanagement/v1/trace.rb deleted file mode 100644 index 3b57f1f7a95c..000000000000 --- a/owl-bot-staging/google-cloud-network_management-v1/proto_docs/google/cloud/networkmanagement/v1/trace.rb +++ /dev/null @@ -1,2610 +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 NetworkManagement - module V1 - # Trace represents one simulated packet forwarding path. - # - # * Each trace contains multiple ordered steps. - # * Each step is in a particular state with associated configuration. - # * State is categorized as final or non-final states. - # * Each final state has a reason associated. - # * Each trace must end with a final state (the last step). - # ``` - # |---------------------Trace----------------------| - # Step1(State) Step2(State) --- StepN(State(final)) - # ``` - # @!attribute [rw] endpoint_info - # @return [::Google::Cloud::NetworkManagement::V1::EndpointInfo] - # Derived from the source and destination endpoints definition specified by - # user request, and validated by the data plane model. - # If there are multiple traces starting from different source locations, then - # the endpoint_info may be different between traces. - # @!attribute [rw] steps - # @return [::Array<::Google::Cloud::NetworkManagement::V1::Step>] - # A trace of a test contains multiple steps from the initial state to the - # final state (delivered, dropped, forwarded, or aborted). - # - # The steps are ordered by the processing sequence within the simulated - # network state machine. It is critical to preserve the order of the steps - # and avoid reordering or sorting them. - # @!attribute [rw] forward_trace_id - # @return [::Integer] - # ID of trace. For forward traces, this ID is unique for each trace. For - # return traces, it matches ID of associated forward trace. A single forward - # trace can be associated with none, one or more than one return trace. - class Trace - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A simulated forwarding path is composed of multiple steps. - # Each step has a well-defined state and an associated configuration. - # @!attribute [rw] description - # @return [::String] - # A description of the step. Usually this is a summary of the state. - # @!attribute [rw] state - # @return [::Google::Cloud::NetworkManagement::V1::Step::State] - # Each step is in one of the pre-defined states. - # @!attribute [rw] causes_drop - # @return [::Boolean] - # This is a step that leads to the final state Drop. - # @!attribute [rw] project_id - # @return [::String] - # Project ID that contains the configuration this step is validating. - # @!attribute [rw] instance - # @return [::Google::Cloud::NetworkManagement::V1::InstanceInfo] - # Display information of a Compute Engine instance. - # - # Note: The following fields are mutually exclusive: `instance`, `firewall`, `route`, `endpoint`, `google_service`, `forwarding_rule`, `hybrid_subnet`, `vpn_gateway`, `vpn_tunnel`, `interconnect_attachment`, `vpc_connector`, `direct_vpc_egress_connection`, `serverless_external_connection`, `deliver`, `forward`, `abort`, `drop`, `load_balancer`, `network`, `gke_master`, `gke_pod`, `ip_masquerading_skipped`, `gke_network_policy`, `gke_network_policy_skipped`, `cloud_sql_instance`, `redis_instance`, `redis_cluster`, `cloud_function`, `app_engine_version`, `cloud_run_revision`, `nat`, `proxy_connection`, `load_balancer_backend_info`, `storage_bucket`, `serverless_neg`, `ngfw_packet_inspection`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] firewall - # @return [::Google::Cloud::NetworkManagement::V1::FirewallInfo] - # Display information of a Compute Engine firewall rule. - # - # Note: The following fields are mutually exclusive: `firewall`, `instance`, `route`, `endpoint`, `google_service`, `forwarding_rule`, `hybrid_subnet`, `vpn_gateway`, `vpn_tunnel`, `interconnect_attachment`, `vpc_connector`, `direct_vpc_egress_connection`, `serverless_external_connection`, `deliver`, `forward`, `abort`, `drop`, `load_balancer`, `network`, `gke_master`, `gke_pod`, `ip_masquerading_skipped`, `gke_network_policy`, `gke_network_policy_skipped`, `cloud_sql_instance`, `redis_instance`, `redis_cluster`, `cloud_function`, `app_engine_version`, `cloud_run_revision`, `nat`, `proxy_connection`, `load_balancer_backend_info`, `storage_bucket`, `serverless_neg`, `ngfw_packet_inspection`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] route - # @return [::Google::Cloud::NetworkManagement::V1::RouteInfo] - # Display information of a Compute Engine route. - # - # Note: The following fields are mutually exclusive: `route`, `instance`, `firewall`, `endpoint`, `google_service`, `forwarding_rule`, `hybrid_subnet`, `vpn_gateway`, `vpn_tunnel`, `interconnect_attachment`, `vpc_connector`, `direct_vpc_egress_connection`, `serverless_external_connection`, `deliver`, `forward`, `abort`, `drop`, `load_balancer`, `network`, `gke_master`, `gke_pod`, `ip_masquerading_skipped`, `gke_network_policy`, `gke_network_policy_skipped`, `cloud_sql_instance`, `redis_instance`, `redis_cluster`, `cloud_function`, `app_engine_version`, `cloud_run_revision`, `nat`, `proxy_connection`, `load_balancer_backend_info`, `storage_bucket`, `serverless_neg`, `ngfw_packet_inspection`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] endpoint - # @return [::Google::Cloud::NetworkManagement::V1::EndpointInfo] - # Display information of the source and destination under analysis. - # The endpoint information in an intermediate state may differ with the - # initial input, as it might be modified by state like NAT, - # or Connection Proxy. - # - # Note: The following fields are mutually exclusive: `endpoint`, `instance`, `firewall`, `route`, `google_service`, `forwarding_rule`, `hybrid_subnet`, `vpn_gateway`, `vpn_tunnel`, `interconnect_attachment`, `vpc_connector`, `direct_vpc_egress_connection`, `serverless_external_connection`, `deliver`, `forward`, `abort`, `drop`, `load_balancer`, `network`, `gke_master`, `gke_pod`, `ip_masquerading_skipped`, `gke_network_policy`, `gke_network_policy_skipped`, `cloud_sql_instance`, `redis_instance`, `redis_cluster`, `cloud_function`, `app_engine_version`, `cloud_run_revision`, `nat`, `proxy_connection`, `load_balancer_backend_info`, `storage_bucket`, `serverless_neg`, `ngfw_packet_inspection`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] google_service - # @return [::Google::Cloud::NetworkManagement::V1::GoogleServiceInfo] - # Display information of a Google service - # - # Note: The following fields are mutually exclusive: `google_service`, `instance`, `firewall`, `route`, `endpoint`, `forwarding_rule`, `hybrid_subnet`, `vpn_gateway`, `vpn_tunnel`, `interconnect_attachment`, `vpc_connector`, `direct_vpc_egress_connection`, `serverless_external_connection`, `deliver`, `forward`, `abort`, `drop`, `load_balancer`, `network`, `gke_master`, `gke_pod`, `ip_masquerading_skipped`, `gke_network_policy`, `gke_network_policy_skipped`, `cloud_sql_instance`, `redis_instance`, `redis_cluster`, `cloud_function`, `app_engine_version`, `cloud_run_revision`, `nat`, `proxy_connection`, `load_balancer_backend_info`, `storage_bucket`, `serverless_neg`, `ngfw_packet_inspection`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] forwarding_rule - # @return [::Google::Cloud::NetworkManagement::V1::ForwardingRuleInfo] - # Display information of a Compute Engine forwarding rule. - # - # Note: The following fields are mutually exclusive: `forwarding_rule`, `instance`, `firewall`, `route`, `endpoint`, `google_service`, `hybrid_subnet`, `vpn_gateway`, `vpn_tunnel`, `interconnect_attachment`, `vpc_connector`, `direct_vpc_egress_connection`, `serverless_external_connection`, `deliver`, `forward`, `abort`, `drop`, `load_balancer`, `network`, `gke_master`, `gke_pod`, `ip_masquerading_skipped`, `gke_network_policy`, `gke_network_policy_skipped`, `cloud_sql_instance`, `redis_instance`, `redis_cluster`, `cloud_function`, `app_engine_version`, `cloud_run_revision`, `nat`, `proxy_connection`, `load_balancer_backend_info`, `storage_bucket`, `serverless_neg`, `ngfw_packet_inspection`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] hybrid_subnet - # @return [::Google::Cloud::NetworkManagement::V1::HybridSubnetInfo] - # Display information of a hybrid subnet. - # - # Note: The following fields are mutually exclusive: `hybrid_subnet`, `instance`, `firewall`, `route`, `endpoint`, `google_service`, `forwarding_rule`, `vpn_gateway`, `vpn_tunnel`, `interconnect_attachment`, `vpc_connector`, `direct_vpc_egress_connection`, `serverless_external_connection`, `deliver`, `forward`, `abort`, `drop`, `load_balancer`, `network`, `gke_master`, `gke_pod`, `ip_masquerading_skipped`, `gke_network_policy`, `gke_network_policy_skipped`, `cloud_sql_instance`, `redis_instance`, `redis_cluster`, `cloud_function`, `app_engine_version`, `cloud_run_revision`, `nat`, `proxy_connection`, `load_balancer_backend_info`, `storage_bucket`, `serverless_neg`, `ngfw_packet_inspection`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] vpn_gateway - # @return [::Google::Cloud::NetworkManagement::V1::VpnGatewayInfo] - # Display information of a Compute Engine VPN gateway. - # - # Note: The following fields are mutually exclusive: `vpn_gateway`, `instance`, `firewall`, `route`, `endpoint`, `google_service`, `forwarding_rule`, `hybrid_subnet`, `vpn_tunnel`, `interconnect_attachment`, `vpc_connector`, `direct_vpc_egress_connection`, `serverless_external_connection`, `deliver`, `forward`, `abort`, `drop`, `load_balancer`, `network`, `gke_master`, `gke_pod`, `ip_masquerading_skipped`, `gke_network_policy`, `gke_network_policy_skipped`, `cloud_sql_instance`, `redis_instance`, `redis_cluster`, `cloud_function`, `app_engine_version`, `cloud_run_revision`, `nat`, `proxy_connection`, `load_balancer_backend_info`, `storage_bucket`, `serverless_neg`, `ngfw_packet_inspection`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] vpn_tunnel - # @return [::Google::Cloud::NetworkManagement::V1::VpnTunnelInfo] - # Display information of a Compute Engine VPN tunnel. - # - # Note: The following fields are mutually exclusive: `vpn_tunnel`, `instance`, `firewall`, `route`, `endpoint`, `google_service`, `forwarding_rule`, `hybrid_subnet`, `vpn_gateway`, `interconnect_attachment`, `vpc_connector`, `direct_vpc_egress_connection`, `serverless_external_connection`, `deliver`, `forward`, `abort`, `drop`, `load_balancer`, `network`, `gke_master`, `gke_pod`, `ip_masquerading_skipped`, `gke_network_policy`, `gke_network_policy_skipped`, `cloud_sql_instance`, `redis_instance`, `redis_cluster`, `cloud_function`, `app_engine_version`, `cloud_run_revision`, `nat`, `proxy_connection`, `load_balancer_backend_info`, `storage_bucket`, `serverless_neg`, `ngfw_packet_inspection`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] interconnect_attachment - # @return [::Google::Cloud::NetworkManagement::V1::InterconnectAttachmentInfo] - # Display information of an interconnect attachment. - # - # Note: The following fields are mutually exclusive: `interconnect_attachment`, `instance`, `firewall`, `route`, `endpoint`, `google_service`, `forwarding_rule`, `hybrid_subnet`, `vpn_gateway`, `vpn_tunnel`, `vpc_connector`, `direct_vpc_egress_connection`, `serverless_external_connection`, `deliver`, `forward`, `abort`, `drop`, `load_balancer`, `network`, `gke_master`, `gke_pod`, `ip_masquerading_skipped`, `gke_network_policy`, `gke_network_policy_skipped`, `cloud_sql_instance`, `redis_instance`, `redis_cluster`, `cloud_function`, `app_engine_version`, `cloud_run_revision`, `nat`, `proxy_connection`, `load_balancer_backend_info`, `storage_bucket`, `serverless_neg`, `ngfw_packet_inspection`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] vpc_connector - # @return [::Google::Cloud::NetworkManagement::V1::VpcConnectorInfo] - # Display information of a VPC connector. - # - # Note: The following fields are mutually exclusive: `vpc_connector`, `instance`, `firewall`, `route`, `endpoint`, `google_service`, `forwarding_rule`, `hybrid_subnet`, `vpn_gateway`, `vpn_tunnel`, `interconnect_attachment`, `direct_vpc_egress_connection`, `serverless_external_connection`, `deliver`, `forward`, `abort`, `drop`, `load_balancer`, `network`, `gke_master`, `gke_pod`, `ip_masquerading_skipped`, `gke_network_policy`, `gke_network_policy_skipped`, `cloud_sql_instance`, `redis_instance`, `redis_cluster`, `cloud_function`, `app_engine_version`, `cloud_run_revision`, `nat`, `proxy_connection`, `load_balancer_backend_info`, `storage_bucket`, `serverless_neg`, `ngfw_packet_inspection`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] direct_vpc_egress_connection - # @return [::Google::Cloud::NetworkManagement::V1::DirectVpcEgressConnectionInfo] - # Display information of a serverless direct VPC egress connection. - # - # Note: The following fields are mutually exclusive: `direct_vpc_egress_connection`, `instance`, `firewall`, `route`, `endpoint`, `google_service`, `forwarding_rule`, `hybrid_subnet`, `vpn_gateway`, `vpn_tunnel`, `interconnect_attachment`, `vpc_connector`, `serverless_external_connection`, `deliver`, `forward`, `abort`, `drop`, `load_balancer`, `network`, `gke_master`, `gke_pod`, `ip_masquerading_skipped`, `gke_network_policy`, `gke_network_policy_skipped`, `cloud_sql_instance`, `redis_instance`, `redis_cluster`, `cloud_function`, `app_engine_version`, `cloud_run_revision`, `nat`, `proxy_connection`, `load_balancer_backend_info`, `storage_bucket`, `serverless_neg`, `ngfw_packet_inspection`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] serverless_external_connection - # @return [::Google::Cloud::NetworkManagement::V1::ServerlessExternalConnectionInfo] - # Display information of a serverless public (external) connection. - # - # Note: The following fields are mutually exclusive: `serverless_external_connection`, `instance`, `firewall`, `route`, `endpoint`, `google_service`, `forwarding_rule`, `hybrid_subnet`, `vpn_gateway`, `vpn_tunnel`, `interconnect_attachment`, `vpc_connector`, `direct_vpc_egress_connection`, `deliver`, `forward`, `abort`, `drop`, `load_balancer`, `network`, `gke_master`, `gke_pod`, `ip_masquerading_skipped`, `gke_network_policy`, `gke_network_policy_skipped`, `cloud_sql_instance`, `redis_instance`, `redis_cluster`, `cloud_function`, `app_engine_version`, `cloud_run_revision`, `nat`, `proxy_connection`, `load_balancer_backend_info`, `storage_bucket`, `serverless_neg`, `ngfw_packet_inspection`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] deliver - # @return [::Google::Cloud::NetworkManagement::V1::DeliverInfo] - # Display information of the final state "deliver" and reason. - # - # Note: The following fields are mutually exclusive: `deliver`, `instance`, `firewall`, `route`, `endpoint`, `google_service`, `forwarding_rule`, `hybrid_subnet`, `vpn_gateway`, `vpn_tunnel`, `interconnect_attachment`, `vpc_connector`, `direct_vpc_egress_connection`, `serverless_external_connection`, `forward`, `abort`, `drop`, `load_balancer`, `network`, `gke_master`, `gke_pod`, `ip_masquerading_skipped`, `gke_network_policy`, `gke_network_policy_skipped`, `cloud_sql_instance`, `redis_instance`, `redis_cluster`, `cloud_function`, `app_engine_version`, `cloud_run_revision`, `nat`, `proxy_connection`, `load_balancer_backend_info`, `storage_bucket`, `serverless_neg`, `ngfw_packet_inspection`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] forward - # @return [::Google::Cloud::NetworkManagement::V1::ForwardInfo] - # Display information of the final state "forward" and reason. - # - # Note: The following fields are mutually exclusive: `forward`, `instance`, `firewall`, `route`, `endpoint`, `google_service`, `forwarding_rule`, `hybrid_subnet`, `vpn_gateway`, `vpn_tunnel`, `interconnect_attachment`, `vpc_connector`, `direct_vpc_egress_connection`, `serverless_external_connection`, `deliver`, `abort`, `drop`, `load_balancer`, `network`, `gke_master`, `gke_pod`, `ip_masquerading_skipped`, `gke_network_policy`, `gke_network_policy_skipped`, `cloud_sql_instance`, `redis_instance`, `redis_cluster`, `cloud_function`, `app_engine_version`, `cloud_run_revision`, `nat`, `proxy_connection`, `load_balancer_backend_info`, `storage_bucket`, `serverless_neg`, `ngfw_packet_inspection`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] abort - # @return [::Google::Cloud::NetworkManagement::V1::AbortInfo] - # Display information of the final state "abort" and reason. - # - # Note: The following fields are mutually exclusive: `abort`, `instance`, `firewall`, `route`, `endpoint`, `google_service`, `forwarding_rule`, `hybrid_subnet`, `vpn_gateway`, `vpn_tunnel`, `interconnect_attachment`, `vpc_connector`, `direct_vpc_egress_connection`, `serverless_external_connection`, `deliver`, `forward`, `drop`, `load_balancer`, `network`, `gke_master`, `gke_pod`, `ip_masquerading_skipped`, `gke_network_policy`, `gke_network_policy_skipped`, `cloud_sql_instance`, `redis_instance`, `redis_cluster`, `cloud_function`, `app_engine_version`, `cloud_run_revision`, `nat`, `proxy_connection`, `load_balancer_backend_info`, `storage_bucket`, `serverless_neg`, `ngfw_packet_inspection`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] drop - # @return [::Google::Cloud::NetworkManagement::V1::DropInfo] - # Display information of the final state "drop" and reason. - # - # Note: The following fields are mutually exclusive: `drop`, `instance`, `firewall`, `route`, `endpoint`, `google_service`, `forwarding_rule`, `hybrid_subnet`, `vpn_gateway`, `vpn_tunnel`, `interconnect_attachment`, `vpc_connector`, `direct_vpc_egress_connection`, `serverless_external_connection`, `deliver`, `forward`, `abort`, `load_balancer`, `network`, `gke_master`, `gke_pod`, `ip_masquerading_skipped`, `gke_network_policy`, `gke_network_policy_skipped`, `cloud_sql_instance`, `redis_instance`, `redis_cluster`, `cloud_function`, `app_engine_version`, `cloud_run_revision`, `nat`, `proxy_connection`, `load_balancer_backend_info`, `storage_bucket`, `serverless_neg`, `ngfw_packet_inspection`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] load_balancer - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::Google::Cloud::NetworkManagement::V1::LoadBalancerInfo] - # Display information of the load balancers. Deprecated in favor of the - # `load_balancer_backend_info` field, not used in new tests. - # - # Note: The following fields are mutually exclusive: `load_balancer`, `instance`, `firewall`, `route`, `endpoint`, `google_service`, `forwarding_rule`, `hybrid_subnet`, `vpn_gateway`, `vpn_tunnel`, `interconnect_attachment`, `vpc_connector`, `direct_vpc_egress_connection`, `serverless_external_connection`, `deliver`, `forward`, `abort`, `drop`, `network`, `gke_master`, `gke_pod`, `ip_masquerading_skipped`, `gke_network_policy`, `gke_network_policy_skipped`, `cloud_sql_instance`, `redis_instance`, `redis_cluster`, `cloud_function`, `app_engine_version`, `cloud_run_revision`, `nat`, `proxy_connection`, `load_balancer_backend_info`, `storage_bucket`, `serverless_neg`, `ngfw_packet_inspection`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] network - # @return [::Google::Cloud::NetworkManagement::V1::NetworkInfo] - # Display information of a Google Cloud network. - # - # Note: The following fields are mutually exclusive: `network`, `instance`, `firewall`, `route`, `endpoint`, `google_service`, `forwarding_rule`, `hybrid_subnet`, `vpn_gateway`, `vpn_tunnel`, `interconnect_attachment`, `vpc_connector`, `direct_vpc_egress_connection`, `serverless_external_connection`, `deliver`, `forward`, `abort`, `drop`, `load_balancer`, `gke_master`, `gke_pod`, `ip_masquerading_skipped`, `gke_network_policy`, `gke_network_policy_skipped`, `cloud_sql_instance`, `redis_instance`, `redis_cluster`, `cloud_function`, `app_engine_version`, `cloud_run_revision`, `nat`, `proxy_connection`, `load_balancer_backend_info`, `storage_bucket`, `serverless_neg`, `ngfw_packet_inspection`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] gke_master - # @return [::Google::Cloud::NetworkManagement::V1::GKEMasterInfo] - # Display information of a Google Kubernetes Engine cluster master. - # - # Note: The following fields are mutually exclusive: `gke_master`, `instance`, `firewall`, `route`, `endpoint`, `google_service`, `forwarding_rule`, `hybrid_subnet`, `vpn_gateway`, `vpn_tunnel`, `interconnect_attachment`, `vpc_connector`, `direct_vpc_egress_connection`, `serverless_external_connection`, `deliver`, `forward`, `abort`, `drop`, `load_balancer`, `network`, `gke_pod`, `ip_masquerading_skipped`, `gke_network_policy`, `gke_network_policy_skipped`, `cloud_sql_instance`, `redis_instance`, `redis_cluster`, `cloud_function`, `app_engine_version`, `cloud_run_revision`, `nat`, `proxy_connection`, `load_balancer_backend_info`, `storage_bucket`, `serverless_neg`, `ngfw_packet_inspection`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] gke_pod - # @return [::Google::Cloud::NetworkManagement::V1::GkePodInfo] - # Display information of a Google Kubernetes Engine Pod. - # - # Note: The following fields are mutually exclusive: `gke_pod`, `instance`, `firewall`, `route`, `endpoint`, `google_service`, `forwarding_rule`, `hybrid_subnet`, `vpn_gateway`, `vpn_tunnel`, `interconnect_attachment`, `vpc_connector`, `direct_vpc_egress_connection`, `serverless_external_connection`, `deliver`, `forward`, `abort`, `drop`, `load_balancer`, `network`, `gke_master`, `ip_masquerading_skipped`, `gke_network_policy`, `gke_network_policy_skipped`, `cloud_sql_instance`, `redis_instance`, `redis_cluster`, `cloud_function`, `app_engine_version`, `cloud_run_revision`, `nat`, `proxy_connection`, `load_balancer_backend_info`, `storage_bucket`, `serverless_neg`, `ngfw_packet_inspection`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] ip_masquerading_skipped - # @return [::Google::Cloud::NetworkManagement::V1::IpMasqueradingSkippedInfo] - # Display information of the reason why GKE Pod IP masquerading was - # skipped. - # - # Note: The following fields are mutually exclusive: `ip_masquerading_skipped`, `instance`, `firewall`, `route`, `endpoint`, `google_service`, `forwarding_rule`, `hybrid_subnet`, `vpn_gateway`, `vpn_tunnel`, `interconnect_attachment`, `vpc_connector`, `direct_vpc_egress_connection`, `serverless_external_connection`, `deliver`, `forward`, `abort`, `drop`, `load_balancer`, `network`, `gke_master`, `gke_pod`, `gke_network_policy`, `gke_network_policy_skipped`, `cloud_sql_instance`, `redis_instance`, `redis_cluster`, `cloud_function`, `app_engine_version`, `cloud_run_revision`, `nat`, `proxy_connection`, `load_balancer_backend_info`, `storage_bucket`, `serverless_neg`, `ngfw_packet_inspection`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] gke_network_policy - # @return [::Google::Cloud::NetworkManagement::V1::GkeNetworkPolicyInfo] - # Display information of a GKE Network Policy. - # - # Note: The following fields are mutually exclusive: `gke_network_policy`, `instance`, `firewall`, `route`, `endpoint`, `google_service`, `forwarding_rule`, `hybrid_subnet`, `vpn_gateway`, `vpn_tunnel`, `interconnect_attachment`, `vpc_connector`, `direct_vpc_egress_connection`, `serverless_external_connection`, `deliver`, `forward`, `abort`, `drop`, `load_balancer`, `network`, `gke_master`, `gke_pod`, `ip_masquerading_skipped`, `gke_network_policy_skipped`, `cloud_sql_instance`, `redis_instance`, `redis_cluster`, `cloud_function`, `app_engine_version`, `cloud_run_revision`, `nat`, `proxy_connection`, `load_balancer_backend_info`, `storage_bucket`, `serverless_neg`, `ngfw_packet_inspection`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] gke_network_policy_skipped - # @return [::Google::Cloud::NetworkManagement::V1::GkeNetworkPolicySkippedInfo] - # Display information of the reason why GKE Network Policy evaluation was - # skipped. - # - # Note: The following fields are mutually exclusive: `gke_network_policy_skipped`, `instance`, `firewall`, `route`, `endpoint`, `google_service`, `forwarding_rule`, `hybrid_subnet`, `vpn_gateway`, `vpn_tunnel`, `interconnect_attachment`, `vpc_connector`, `direct_vpc_egress_connection`, `serverless_external_connection`, `deliver`, `forward`, `abort`, `drop`, `load_balancer`, `network`, `gke_master`, `gke_pod`, `ip_masquerading_skipped`, `gke_network_policy`, `cloud_sql_instance`, `redis_instance`, `redis_cluster`, `cloud_function`, `app_engine_version`, `cloud_run_revision`, `nat`, `proxy_connection`, `load_balancer_backend_info`, `storage_bucket`, `serverless_neg`, `ngfw_packet_inspection`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] cloud_sql_instance - # @return [::Google::Cloud::NetworkManagement::V1::CloudSQLInstanceInfo] - # Display information of a Cloud SQL instance. - # - # Note: The following fields are mutually exclusive: `cloud_sql_instance`, `instance`, `firewall`, `route`, `endpoint`, `google_service`, `forwarding_rule`, `hybrid_subnet`, `vpn_gateway`, `vpn_tunnel`, `interconnect_attachment`, `vpc_connector`, `direct_vpc_egress_connection`, `serverless_external_connection`, `deliver`, `forward`, `abort`, `drop`, `load_balancer`, `network`, `gke_master`, `gke_pod`, `ip_masquerading_skipped`, `gke_network_policy`, `gke_network_policy_skipped`, `redis_instance`, `redis_cluster`, `cloud_function`, `app_engine_version`, `cloud_run_revision`, `nat`, `proxy_connection`, `load_balancer_backend_info`, `storage_bucket`, `serverless_neg`, `ngfw_packet_inspection`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] redis_instance - # @return [::Google::Cloud::NetworkManagement::V1::RedisInstanceInfo] - # Display information of a Redis Instance. - # - # Note: The following fields are mutually exclusive: `redis_instance`, `instance`, `firewall`, `route`, `endpoint`, `google_service`, `forwarding_rule`, `hybrid_subnet`, `vpn_gateway`, `vpn_tunnel`, `interconnect_attachment`, `vpc_connector`, `direct_vpc_egress_connection`, `serverless_external_connection`, `deliver`, `forward`, `abort`, `drop`, `load_balancer`, `network`, `gke_master`, `gke_pod`, `ip_masquerading_skipped`, `gke_network_policy`, `gke_network_policy_skipped`, `cloud_sql_instance`, `redis_cluster`, `cloud_function`, `app_engine_version`, `cloud_run_revision`, `nat`, `proxy_connection`, `load_balancer_backend_info`, `storage_bucket`, `serverless_neg`, `ngfw_packet_inspection`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] redis_cluster - # @return [::Google::Cloud::NetworkManagement::V1::RedisClusterInfo] - # Display information of a Redis Cluster. - # - # Note: The following fields are mutually exclusive: `redis_cluster`, `instance`, `firewall`, `route`, `endpoint`, `google_service`, `forwarding_rule`, `hybrid_subnet`, `vpn_gateway`, `vpn_tunnel`, `interconnect_attachment`, `vpc_connector`, `direct_vpc_egress_connection`, `serverless_external_connection`, `deliver`, `forward`, `abort`, `drop`, `load_balancer`, `network`, `gke_master`, `gke_pod`, `ip_masquerading_skipped`, `gke_network_policy`, `gke_network_policy_skipped`, `cloud_sql_instance`, `redis_instance`, `cloud_function`, `app_engine_version`, `cloud_run_revision`, `nat`, `proxy_connection`, `load_balancer_backend_info`, `storage_bucket`, `serverless_neg`, `ngfw_packet_inspection`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] cloud_function - # @return [::Google::Cloud::NetworkManagement::V1::CloudFunctionInfo] - # Display information of a Cloud Function. - # - # Note: The following fields are mutually exclusive: `cloud_function`, `instance`, `firewall`, `route`, `endpoint`, `google_service`, `forwarding_rule`, `hybrid_subnet`, `vpn_gateway`, `vpn_tunnel`, `interconnect_attachment`, `vpc_connector`, `direct_vpc_egress_connection`, `serverless_external_connection`, `deliver`, `forward`, `abort`, `drop`, `load_balancer`, `network`, `gke_master`, `gke_pod`, `ip_masquerading_skipped`, `gke_network_policy`, `gke_network_policy_skipped`, `cloud_sql_instance`, `redis_instance`, `redis_cluster`, `app_engine_version`, `cloud_run_revision`, `nat`, `proxy_connection`, `load_balancer_backend_info`, `storage_bucket`, `serverless_neg`, `ngfw_packet_inspection`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] app_engine_version - # @return [::Google::Cloud::NetworkManagement::V1::AppEngineVersionInfo] - # Display information of an App Engine service version. - # - # Note: The following fields are mutually exclusive: `app_engine_version`, `instance`, `firewall`, `route`, `endpoint`, `google_service`, `forwarding_rule`, `hybrid_subnet`, `vpn_gateway`, `vpn_tunnel`, `interconnect_attachment`, `vpc_connector`, `direct_vpc_egress_connection`, `serverless_external_connection`, `deliver`, `forward`, `abort`, `drop`, `load_balancer`, `network`, `gke_master`, `gke_pod`, `ip_masquerading_skipped`, `gke_network_policy`, `gke_network_policy_skipped`, `cloud_sql_instance`, `redis_instance`, `redis_cluster`, `cloud_function`, `cloud_run_revision`, `nat`, `proxy_connection`, `load_balancer_backend_info`, `storage_bucket`, `serverless_neg`, `ngfw_packet_inspection`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] cloud_run_revision - # @return [::Google::Cloud::NetworkManagement::V1::CloudRunRevisionInfo] - # Display information of a Cloud Run revision. - # - # Note: The following fields are mutually exclusive: `cloud_run_revision`, `instance`, `firewall`, `route`, `endpoint`, `google_service`, `forwarding_rule`, `hybrid_subnet`, `vpn_gateway`, `vpn_tunnel`, `interconnect_attachment`, `vpc_connector`, `direct_vpc_egress_connection`, `serverless_external_connection`, `deliver`, `forward`, `abort`, `drop`, `load_balancer`, `network`, `gke_master`, `gke_pod`, `ip_masquerading_skipped`, `gke_network_policy`, `gke_network_policy_skipped`, `cloud_sql_instance`, `redis_instance`, `redis_cluster`, `cloud_function`, `app_engine_version`, `nat`, `proxy_connection`, `load_balancer_backend_info`, `storage_bucket`, `serverless_neg`, `ngfw_packet_inspection`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] nat - # @return [::Google::Cloud::NetworkManagement::V1::NatInfo] - # Display information of a NAT. - # - # Note: The following fields are mutually exclusive: `nat`, `instance`, `firewall`, `route`, `endpoint`, `google_service`, `forwarding_rule`, `hybrid_subnet`, `vpn_gateway`, `vpn_tunnel`, `interconnect_attachment`, `vpc_connector`, `direct_vpc_egress_connection`, `serverless_external_connection`, `deliver`, `forward`, `abort`, `drop`, `load_balancer`, `network`, `gke_master`, `gke_pod`, `ip_masquerading_skipped`, `gke_network_policy`, `gke_network_policy_skipped`, `cloud_sql_instance`, `redis_instance`, `redis_cluster`, `cloud_function`, `app_engine_version`, `cloud_run_revision`, `proxy_connection`, `load_balancer_backend_info`, `storage_bucket`, `serverless_neg`, `ngfw_packet_inspection`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] proxy_connection - # @return [::Google::Cloud::NetworkManagement::V1::ProxyConnectionInfo] - # Display information of a ProxyConnection. - # - # Note: The following fields are mutually exclusive: `proxy_connection`, `instance`, `firewall`, `route`, `endpoint`, `google_service`, `forwarding_rule`, `hybrid_subnet`, `vpn_gateway`, `vpn_tunnel`, `interconnect_attachment`, `vpc_connector`, `direct_vpc_egress_connection`, `serverless_external_connection`, `deliver`, `forward`, `abort`, `drop`, `load_balancer`, `network`, `gke_master`, `gke_pod`, `ip_masquerading_skipped`, `gke_network_policy`, `gke_network_policy_skipped`, `cloud_sql_instance`, `redis_instance`, `redis_cluster`, `cloud_function`, `app_engine_version`, `cloud_run_revision`, `nat`, `load_balancer_backend_info`, `storage_bucket`, `serverless_neg`, `ngfw_packet_inspection`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] load_balancer_backend_info - # @return [::Google::Cloud::NetworkManagement::V1::LoadBalancerBackendInfo] - # Display information of a specific load balancer backend. - # - # Note: The following fields are mutually exclusive: `load_balancer_backend_info`, `instance`, `firewall`, `route`, `endpoint`, `google_service`, `forwarding_rule`, `hybrid_subnet`, `vpn_gateway`, `vpn_tunnel`, `interconnect_attachment`, `vpc_connector`, `direct_vpc_egress_connection`, `serverless_external_connection`, `deliver`, `forward`, `abort`, `drop`, `load_balancer`, `network`, `gke_master`, `gke_pod`, `ip_masquerading_skipped`, `gke_network_policy`, `gke_network_policy_skipped`, `cloud_sql_instance`, `redis_instance`, `redis_cluster`, `cloud_function`, `app_engine_version`, `cloud_run_revision`, `nat`, `proxy_connection`, `storage_bucket`, `serverless_neg`, `ngfw_packet_inspection`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] storage_bucket - # @return [::Google::Cloud::NetworkManagement::V1::StorageBucketInfo] - # Display information of a Storage Bucket. Used only for return traces. - # - # Note: The following fields are mutually exclusive: `storage_bucket`, `instance`, `firewall`, `route`, `endpoint`, `google_service`, `forwarding_rule`, `hybrid_subnet`, `vpn_gateway`, `vpn_tunnel`, `interconnect_attachment`, `vpc_connector`, `direct_vpc_egress_connection`, `serverless_external_connection`, `deliver`, `forward`, `abort`, `drop`, `load_balancer`, `network`, `gke_master`, `gke_pod`, `ip_masquerading_skipped`, `gke_network_policy`, `gke_network_policy_skipped`, `cloud_sql_instance`, `redis_instance`, `redis_cluster`, `cloud_function`, `app_engine_version`, `cloud_run_revision`, `nat`, `proxy_connection`, `load_balancer_backend_info`, `serverless_neg`, `ngfw_packet_inspection`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] serverless_neg - # @return [::Google::Cloud::NetworkManagement::V1::ServerlessNegInfo] - # Display information of a Serverless network endpoint group backend. Used - # only for return traces. - # - # Note: The following fields are mutually exclusive: `serverless_neg`, `instance`, `firewall`, `route`, `endpoint`, `google_service`, `forwarding_rule`, `hybrid_subnet`, `vpn_gateway`, `vpn_tunnel`, `interconnect_attachment`, `vpc_connector`, `direct_vpc_egress_connection`, `serverless_external_connection`, `deliver`, `forward`, `abort`, `drop`, `load_balancer`, `network`, `gke_master`, `gke_pod`, `ip_masquerading_skipped`, `gke_network_policy`, `gke_network_policy_skipped`, `cloud_sql_instance`, `redis_instance`, `redis_cluster`, `cloud_function`, `app_engine_version`, `cloud_run_revision`, `nat`, `proxy_connection`, `load_balancer_backend_info`, `storage_bucket`, `ngfw_packet_inspection`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] ngfw_packet_inspection - # @return [::Google::Cloud::NetworkManagement::V1::NgfwPacketInspectionInfo] - # Display information of a layer 7 packet inspection by the firewall. - # - # Note: The following fields are mutually exclusive: `ngfw_packet_inspection`, `instance`, `firewall`, `route`, `endpoint`, `google_service`, `forwarding_rule`, `hybrid_subnet`, `vpn_gateway`, `vpn_tunnel`, `interconnect_attachment`, `vpc_connector`, `direct_vpc_egress_connection`, `serverless_external_connection`, `deliver`, `forward`, `abort`, `drop`, `load_balancer`, `network`, `gke_master`, `gke_pod`, `ip_masquerading_skipped`, `gke_network_policy`, `gke_network_policy_skipped`, `cloud_sql_instance`, `redis_instance`, `redis_cluster`, `cloud_function`, `app_engine_version`, `cloud_run_revision`, `nat`, `proxy_connection`, `load_balancer_backend_info`, `storage_bucket`, `serverless_neg`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class Step - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Type of states that are defined in the network state machine. - # Each step in the packet trace is in a specific state. - module State - # Unspecified state. - STATE_UNSPECIFIED = 0 - - # Initial state: packet originating from a Compute Engine instance. - # An InstanceInfo is populated with starting instance information. - START_FROM_INSTANCE = 1 - - # Initial state: packet originating from the internet. - # The endpoint information is populated. - START_FROM_INTERNET = 2 - - # Initial state: packet originating from a Google service. - # The google_service information is populated. - START_FROM_GOOGLE_SERVICE = 27 - - # Initial state: packet originating from a VPC or on-premises network - # with internal source IP. - # If the source is a VPC network visible to the user, a NetworkInfo - # is populated with details of the network. - START_FROM_PRIVATE_NETWORK = 3 - - # Initial state: packet originating from a Google Kubernetes Engine cluster - # master. A GKEMasterInfo is populated with starting instance information. - START_FROM_GKE_MASTER = 21 - - # Initial state: packet originating from a Cloud SQL instance. - # A CloudSQLInstanceInfo is populated with starting instance information. - START_FROM_CLOUD_SQL_INSTANCE = 22 - - # Initial state: packet originating from a Google Kubernetes Engine Pod. - # A GkePodInfo is populated with starting Pod information. - START_FROM_GKE_POD = 39 - - # Initial state: packet originating from a Redis instance. - # A RedisInstanceInfo is populated with starting instance information. - START_FROM_REDIS_INSTANCE = 32 - - # Initial state: packet originating from a Redis Cluster. - # A RedisClusterInfo is populated with starting Cluster information. - START_FROM_REDIS_CLUSTER = 33 - - # Initial state: packet originating from a Cloud Function. - # A CloudFunctionInfo is populated with starting function information. - START_FROM_CLOUD_FUNCTION = 23 - - # Initial state: packet originating from an App Engine service version. - # An AppEngineVersionInfo is populated with starting version information. - START_FROM_APP_ENGINE_VERSION = 25 - - # Initial state: packet originating from a Cloud Run revision. - # A CloudRunRevisionInfo is populated with starting revision information. - START_FROM_CLOUD_RUN_REVISION = 26 - - # Initial state: packet originating from a Storage Bucket. Used only for - # return traces. - # The storage_bucket information is populated. - START_FROM_STORAGE_BUCKET = 29 - - # Initial state: packet originating from a published service that uses - # Private Service Connect. Used only for return traces. - START_FROM_PSC_PUBLISHED_SERVICE = 30 - - # Initial state: packet originating from a serverless network endpoint - # group backend. Used only for return traces. - # The serverless_neg information is populated. - START_FROM_SERVERLESS_NEG = 31 - - # Config checking state: verify ingress firewall rule. - APPLY_INGRESS_FIREWALL_RULE = 4 - - # Config checking state: verify egress firewall rule. - APPLY_EGRESS_FIREWALL_RULE = 5 - - # Config checking state: verify route. - APPLY_ROUTE = 6 - - # Config checking state: match forwarding rule. - APPLY_FORWARDING_RULE = 7 - - # Config checking state: verify load balancer backend configuration. - ANALYZE_LOAD_BALANCER_BACKEND = 28 - - # Config checking state: packet sent or received under foreign IP - # address and allowed. - SPOOFING_APPROVED = 8 - - # Forwarding state: arriving at a Compute Engine instance. - ARRIVE_AT_INSTANCE = 9 - - # Forwarding state: arriving at a Compute Engine internal load balancer. - ARRIVE_AT_INTERNAL_LOAD_BALANCER = 10 - - # Forwarding state: arriving at a Compute Engine external load balancer. - ARRIVE_AT_EXTERNAL_LOAD_BALANCER = 11 - - # Forwarding state: arriving at a hybrid subnet. Appropriate routing - # configuration will be determined here. - ARRIVE_AT_HYBRID_SUBNET = 38 - - # Forwarding state: arriving at a Cloud VPN gateway. - ARRIVE_AT_VPN_GATEWAY = 12 - - # Forwarding state: arriving at a Cloud VPN tunnel. - ARRIVE_AT_VPN_TUNNEL = 13 - - # Forwarding state: arriving at an interconnect attachment. - ARRIVE_AT_INTERCONNECT_ATTACHMENT = 37 - - # Forwarding state: arriving at a VPC connector. - ARRIVE_AT_VPC_CONNECTOR = 24 - - # Forwarding state: arriving at a GKE Pod. - ARRIVE_AT_GKE_POD = 44 - - # Forwarding state: for packets originating from a serverless endpoint - # forwarded through Direct VPC egress. - DIRECT_VPC_EGRESS_CONNECTION = 35 - - # Forwarding state: for packets originating from a serverless endpoint - # forwarded through public (external) connectivity. - SERVERLESS_EXTERNAL_CONNECTION = 36 - - # Forwarding state: Layer 7 packet inspection by the firewall endpoint - # based on the configured security profile group. - NGFW_PACKET_INSPECTION = 47 - - # Transition state: packet header translated. The `nat` field is populated - # with the translation information. - NAT = 14 - - # Transition state: GKE Pod IP masquerading is skipped. The - # `ip_masquerading_skipped` field is populated with the reason. - SKIP_GKE_POD_IP_MASQUERADING = 40 - - # Transition state: GKE Ingress Network Policy is skipped. The - # `gke_network_policy_skipped` field is populated with the reason. - SKIP_GKE_INGRESS_NETWORK_POLICY = 41 - - # Transition state: GKE Egress Network Policy is skipped. The - # `gke_network_policy_skipped` field is populated with the reason. - SKIP_GKE_EGRESS_NETWORK_POLICY = 42 - - # Config checking state: verify ingress GKE network policy. - APPLY_INGRESS_GKE_NETWORK_POLICY = 45 - - # Config checking state: verify egress GKE network policy. - APPLY_EGRESS_GKE_NETWORK_POLICY = 46 - - # Transition state: original connection is terminated and a new proxied - # connection is initiated. - PROXY_CONNECTION = 15 - - # Final state: packet could be delivered. - DELIVER = 16 - - # Final state: packet could be dropped. - DROP = 17 - - # Final state: packet could be forwarded to a network with an unknown - # configuration. - FORWARD = 18 - - # Final state: analysis is aborted. - ABORT = 19 - - # Special state: viewer of the test result does not have permission to - # see the configuration in this step. - VIEWER_PERMISSION_MISSING = 20 - end - end - - # For display only. Metadata associated with a Compute Engine instance. - # @!attribute [rw] display_name - # @return [::String] - # Name of a Compute Engine instance. - # @!attribute [rw] uri - # @return [::String] - # URI of a Compute Engine instance. - # @!attribute [rw] interface - # @return [::String] - # Name of the network interface of a Compute Engine instance. - # @!attribute [rw] network_uri - # @return [::String] - # URI of a Compute Engine network. - # @!attribute [rw] internal_ip - # @return [::String] - # Internal IP address of the network interface. - # @!attribute [rw] external_ip - # @return [::String] - # External IP address of the network interface. - # @!attribute [rw] network_tags - # @return [::Array<::String>] - # Network tags configured on the instance. - # @!attribute [rw] service_account - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::String] - # Service account authorized for the instance. - # @!attribute [rw] psc_network_attachment_uri - # @return [::String] - # URI of the PSC network attachment the NIC is attached to (if relevant). - # @!attribute [rw] running - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::Boolean] - # Indicates whether the Compute Engine instance is running. - # Deprecated: use the `status` field instead. - # @!attribute [rw] status - # @return [::Google::Cloud::NetworkManagement::V1::InstanceInfo::Status] - # The status of the instance. - class InstanceInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The status of the instance. We treat all states other than "RUNNING" as - # not running. - module Status - # Default unspecified value. - STATUS_UNSPECIFIED = 0 - - # The instance is running. - RUNNING = 1 - - # The instance has any status other than "RUNNING". - NOT_RUNNING = 2 - end - end - - # For display only. Metadata associated with a Compute Engine network. - # @!attribute [rw] display_name - # @return [::String] - # Name of a Compute Engine network. - # @!attribute [rw] uri - # @return [::String] - # URI of a Compute Engine network. - # @!attribute [rw] matched_subnet_uri - # @return [::String] - # URI of the subnet matching the source IP address of the test. - # @!attribute [rw] matched_ip_range - # @return [::String] - # The IP range of the subnet matching the source IP address of the test. - # @!attribute [rw] region - # @return [::String] - # The region of the subnet matching the source IP address of the test. - class NetworkInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # For display only. Metadata associated with a VPC firewall rule, an implied - # VPC firewall rule, or a firewall policy rule. - # @!attribute [rw] display_name - # @return [::String] - # The display name of the firewall rule. This field might be empty for - # firewall policy rules. - # @!attribute [rw] uri - # @return [::String] - # The URI of the firewall rule. This field is not applicable to implied - # VPC firewall rules. - # @!attribute [rw] direction - # @return [::String] - # Possible values: INGRESS, EGRESS - # @!attribute [rw] action - # @return [::String] - # Possible values: ALLOW, DENY, APPLY_SECURITY_PROFILE_GROUP - # @!attribute [rw] priority - # @return [::Integer] - # The priority of the firewall rule. - # @!attribute [rw] network_uri - # @return [::String] - # The URI of the VPC network that the firewall rule is associated with. - # This field is not applicable to hierarchical firewall policy rules. - # @!attribute [rw] target_tags - # @return [::Array<::String>] - # The target tags defined by the VPC firewall rule. This field is not - # applicable to firewall policy rules. - # @!attribute [rw] target_service_accounts - # @return [::Array<::String>] - # The target service accounts specified by the firewall rule. - # @!attribute [rw] policy - # @return [::String] - # The name of the firewall policy that this rule is associated with. - # This field is not applicable to VPC firewall rules and implied VPC firewall - # rules. - # @!attribute [rw] policy_uri - # @return [::String] - # The URI of the firewall policy that this rule is associated with. - # This field is not applicable to VPC firewall rules and implied VPC firewall - # rules. - # @!attribute [rw] firewall_rule_type - # @return [::Google::Cloud::NetworkManagement::V1::FirewallInfo::FirewallRuleType] - # The firewall rule's type. - # @!attribute [rw] policy_priority - # @return [::Integer] - # The priority of the firewall policy that this rule is associated with. - # This field is not applicable to VPC firewall rules and implied VPC firewall - # rules. - # @!attribute [rw] target_type - # @return [::Google::Cloud::NetworkManagement::V1::FirewallInfo::TargetType] - # Target type of the firewall rule. - class FirewallInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The firewall rule's type. - module FirewallRuleType - # Unspecified type. - FIREWALL_RULE_TYPE_UNSPECIFIED = 0 - - # Hierarchical firewall policy rule. For details, see - # [Hierarchical firewall policies - # overview](https://cloud.google.com/vpc/docs/firewall-policies). - HIERARCHICAL_FIREWALL_POLICY_RULE = 1 - - # VPC firewall rule. For details, see - # [VPC firewall rules - # overview](https://cloud.google.com/vpc/docs/firewalls). - VPC_FIREWALL_RULE = 2 - - # Implied VPC firewall rule. For details, see - # [Implied - # rules](https://cloud.google.com/vpc/docs/firewalls#default_firewall_rules). - IMPLIED_VPC_FIREWALL_RULE = 3 - - # Implicit firewall rules that are managed by serverless VPC access to - # allow ingress access. They are not visible in the Google Cloud console. - # For details, see [VPC connector's implicit - # rules](https://cloud.google.com/functions/docs/networking/connecting-vpc#restrict-access). - SERVERLESS_VPC_ACCESS_MANAGED_FIREWALL_RULE = 4 - - # User-defined global network firewall policy rule. - # For details, see [Network firewall - # policies](https://cloud.google.com/vpc/docs/network-firewall-policies). - NETWORK_FIREWALL_POLICY_RULE = 5 - - # User-defined regional network firewall policy rule. - # For details, see [Regional network firewall - # policies](https://cloud.google.com/firewall/docs/regional-firewall-policies). - NETWORK_REGIONAL_FIREWALL_POLICY_RULE = 6 - - # System-defined global network firewall policy rule. - SYSTEM_NETWORK_FIREWALL_POLICY_RULE = 7 - - # System-defined regional network firewall policy rule. - SYSTEM_REGIONAL_NETWORK_FIREWALL_POLICY_RULE = 8 - - # Firewall policy rule containing attributes not yet supported in - # Connectivity tests. Firewall analysis is skipped if such a rule can - # potentially be matched. Please see the [list of unsupported - # configurations](https://cloud.google.com/network-intelligence-center/docs/connectivity-tests/concepts/overview#unsupported-configs). - UNSUPPORTED_FIREWALL_POLICY_RULE = 100 - - # Tracking state for response traffic created when request traffic goes - # through allow firewall rule. - # For details, see [firewall rules - # specifications](https://cloud.google.com/firewall/docs/firewalls#specifications) - TRACKING_STATE = 101 - - # Firewall analysis was skipped due to executing Connectivity Test in the - # BypassFirewallChecks mode - ANALYSIS_SKIPPED = 102 - end - - # Target type of the firewall rule. - module TargetType - # Target type is not specified. In this case we treat the rule as applying - # to INSTANCES target type. - TARGET_TYPE_UNSPECIFIED = 0 - - # Firewall rule applies to instances. - INSTANCES = 1 - - # Firewall rule applies to internal managed load balancers. - INTERNAL_MANAGED_LB = 2 - end - end - - # For display only. Metadata associated with a Compute Engine route. - # @!attribute [rw] route_type - # @return [::Google::Cloud::NetworkManagement::V1::RouteInfo::RouteType] - # Type of route. - # @!attribute [rw] next_hop_type - # @return [::Google::Cloud::NetworkManagement::V1::RouteInfo::NextHopType] - # Type of next hop. - # @!attribute [rw] route_scope - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::Google::Cloud::NetworkManagement::V1::RouteInfo::RouteScope] - # Indicates where route is applicable. Deprecated, routes with NCC_HUB scope - # are not included in the trace in new tests. - # @!attribute [rw] display_name - # @return [::String] - # Name of a route. - # @!attribute [rw] uri - # @return [::String] - # URI of a route. SUBNET, STATIC, PEERING_SUBNET (only for peering network) - # and POLICY_BASED routes only. - # @!attribute [rw] region - # @return [::String] - # Region of the route. DYNAMIC, PEERING_DYNAMIC, POLICY_BASED and ADVERTISED - # routes only. If set for POLICY_BASED route, this is a region of VLAN - # attachments for Cloud Interconnect the route applies to. - # @!attribute [rw] dest_ip_range - # @return [::String] - # Destination IP range of the route. - # @!attribute [rw] next_hop - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::String] - # String type of the next hop of the route (for example, "VPN tunnel"). - # Deprecated in favor of the next_hop_type and next_hop_uri fields, not used - # in new tests. - # @!attribute [rw] network_uri - # @return [::String] - # URI of a VPC network where route is located. - # @!attribute [rw] priority - # @return [::Integer] - # Priority of the route. - # @!attribute [rw] instance_tags - # @return [::Array<::String>] - # Instance tags of the route. - # @!attribute [rw] src_ip_range - # @return [::String] - # Source IP address range of the route. POLICY_BASED routes only. - # @!attribute [rw] dest_port_ranges - # @return [::Array<::String>] - # Destination port ranges of the route. POLICY_BASED routes only. - # @!attribute [rw] src_port_ranges - # @return [::Array<::String>] - # Source port ranges of the route. POLICY_BASED routes only. - # @!attribute [rw] protocols - # @return [::Array<::String>] - # Protocols of the route. POLICY_BASED routes only. - # @!attribute [rw] ncc_hub_uri - # @return [::String] - # URI of the NCC Hub the route is advertised by. PEERING_SUBNET and - # PEERING_DYNAMIC routes that are advertised by NCC Hub only. - # @!attribute [rw] ncc_spoke_uri - # @return [::String] - # URI of the destination NCC Spoke. PEERING_SUBNET and PEERING_DYNAMIC routes - # that are advertised by NCC Hub only. - # @!attribute [rw] advertised_route_source_router_uri - # @return [::String] - # For ADVERTISED dynamic routes, the URI of the Cloud Router that advertised - # the corresponding IP prefix. - # @!attribute [rw] advertised_route_next_hop_uri - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::String] - # For ADVERTISED routes, the URI of their next hop, i.e. the URI of the - # hybrid endpoint (VPN tunnel, Interconnect attachment, NCC router appliance) - # the advertised prefix is advertised through, or URI of the source peered - # network. Deprecated in favor of the next_hop_uri field, not used in new - # tests. - # @!attribute [rw] next_hop_uri - # @return [::String] - # URI of the next hop resource. - # @!attribute [rw] next_hop_network_uri - # @return [::String] - # URI of a VPC network where the next hop resource is located. - # @!attribute [rw] originating_route_uri - # @return [::String] - # For PEERING_SUBNET and PEERING_STATIC routes, the URI of the originating - # SUBNET/STATIC route. - # @!attribute [rw] originating_route_display_name - # @return [::String] - # For PEERING_SUBNET, PEERING_STATIC and PEERING_DYNAMIC routes, the name of - # the originating SUBNET/STATIC/DYNAMIC route. - # @!attribute [rw] ncc_hub_route_uri - # @return [::String] - # For PEERING_SUBNET and PEERING_DYNAMIC routes that are advertised by NCC - # Hub, the URI of the corresponding route in NCC Hub's routing table. - class RouteInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Type of route: - module RouteType - # Unspecified type. Default value. - ROUTE_TYPE_UNSPECIFIED = 0 - - # Route is a subnet route automatically created by the system. - SUBNET = 1 - - # Static route created by the user, including the default route to the - # internet. - STATIC = 2 - - # Dynamic route exchanged between BGP peers. - DYNAMIC = 3 - - # A subnet route received from peering network or NCC Hub. - PEERING_SUBNET = 4 - - # A static route received from peering network. - PEERING_STATIC = 5 - - # A dynamic route received from peering network or NCC Hub. - PEERING_DYNAMIC = 6 - - # Policy based route. - POLICY_BASED = 7 - - # Advertised route. Synthetic route which is used to transition from the - # StartFromPrivateNetwork state in Connectivity tests. - ADVERTISED = 101 - end - - # Type of next hop: - module NextHopType - # Unspecified type. Default value. - NEXT_HOP_TYPE_UNSPECIFIED = 0 - - # Next hop is an IP address. - NEXT_HOP_IP = 1 - - # Next hop is a Compute Engine instance. - NEXT_HOP_INSTANCE = 2 - - # Next hop is a VPC network gateway. - NEXT_HOP_NETWORK = 3 - - # Next hop is a peering VPC. This scenario only happens when the user - # doesn't have permissions to the project where the next hop resource is - # located. - NEXT_HOP_PEERING = 4 - - # Next hop is an interconnect. - NEXT_HOP_INTERCONNECT = 5 - - # Next hop is a VPN tunnel. - NEXT_HOP_VPN_TUNNEL = 6 - - # Next hop is a VPN gateway. This scenario only happens when tracing - # connectivity from an on-premises network to Google Cloud through a VPN. - # The analysis simulates a packet departing from the on-premises network - # through a VPN tunnel and arriving at a Cloud VPN gateway. - NEXT_HOP_VPN_GATEWAY = 7 - - # Next hop is an internet gateway. - NEXT_HOP_INTERNET_GATEWAY = 8 - - # Next hop is blackhole; that is, the next hop either does not exist or is - # unusable. - NEXT_HOP_BLACKHOLE = 9 - - # Next hop is the forwarding rule of an Internal Load Balancer. - NEXT_HOP_ILB = 10 - - # Next hop is a - # [router appliance - # instance](https://cloud.google.com/network-connectivity/docs/network-connectivity-center/concepts/ra-overview). - NEXT_HOP_ROUTER_APPLIANCE = 11 - - # Next hop is an NCC hub. This scenario only happens when the user doesn't - # have permissions to the project where the next hop resource is located. - NEXT_HOP_NCC_HUB = 12 - - # Next hop is Secure Web Proxy Gateway. - SECURE_WEB_PROXY_GATEWAY = 13 - end - - # Indicates where routes are applicable. - module RouteScope - # Unspecified scope. Default value. - ROUTE_SCOPE_UNSPECIFIED = 0 - - # Route is applicable to packets in Network. - NETWORK = 1 - - # Route is applicable to packets using NCC Hub's routing table. - NCC_HUB = 2 - end - end - - # For display only. Details of a Google Service sending packets to a - # VPC network. Although the source IP might be a publicly routable address, - # some Google Services use special routes within Google production - # infrastructure to reach Compute Engine Instances. - # https://cloud.google.com/vpc/docs/routes#special_return_paths - # @!attribute [rw] source_ip - # @return [::String] - # Source IP address. - # @!attribute [rw] google_service_type - # @return [::Google::Cloud::NetworkManagement::V1::GoogleServiceInfo::GoogleServiceType] - # Recognized type of a Google Service. - class GoogleServiceInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Recognized type of a Google Service. - module GoogleServiceType - # Unspecified Google Service. - GOOGLE_SERVICE_TYPE_UNSPECIFIED = 0 - - # Identity aware proxy. - # https://cloud.google.com/iap/docs/using-tcp-forwarding - IAP = 1 - - # One of two services sharing IP ranges: - # * Load Balancer proxy - # * Centralized Health Check prober - # https://cloud.google.com/load-balancing/docs/firewall-rules - GFE_PROXY_OR_HEALTH_CHECK_PROBER = 2 - - # Connectivity from Cloud DNS to forwarding targets or alternate name - # servers that use private routing. - # https://cloud.google.com/dns/docs/zones/forwarding-zones#firewall-rules - # https://cloud.google.com/dns/docs/policies#firewall-rules - CLOUD_DNS = 3 - - # private.googleapis.com and restricted.googleapis.com - GOOGLE_API = 4 - - # Google API via Private Service Connect. - # https://cloud.google.com/vpc/docs/configure-private-service-connect-apis - GOOGLE_API_PSC = 5 - - # Google API via VPC Service Controls. - # https://cloud.google.com/vpc/docs/configure-private-service-connect-apis - GOOGLE_API_VPC_SC = 6 - - # Google API via Serverless VPC Access. - # https://cloud.google.com/vpc/docs/serverless-vpc-access - SERVERLESS_VPC_ACCESS = 7 - end - end - - # For display only. Metadata associated with a Compute Engine forwarding rule. - # @!attribute [rw] display_name - # @return [::String] - # Name of the forwarding rule. - # @!attribute [rw] uri - # @return [::String] - # URI of the forwarding rule. - # @!attribute [rw] matched_protocol - # @return [::String] - # Protocol defined in the forwarding rule that matches the packet. - # @!attribute [rw] matched_port_range - # @return [::String] - # Port range defined in the forwarding rule that matches the packet. - # @!attribute [rw] vip - # @return [::String] - # VIP of the forwarding rule. - # @!attribute [rw] target - # @return [::String] - # Target type of the forwarding rule. - # @!attribute [rw] network_uri - # @return [::String] - # Network URI. - # @!attribute [rw] region - # @return [::String] - # Region of the forwarding rule. Set only for regional forwarding rules. - # @!attribute [rw] load_balancer_name - # @return [::String] - # Name of the load balancer the forwarding rule belongs to. Empty for - # forwarding rules not related to load balancers (like PSC forwarding rules). - # @!attribute [rw] psc_service_attachment_uri - # @return [::String] - # URI of the PSC service attachment this forwarding rule targets (if - # applicable). - # @!attribute [rw] psc_google_api_target - # @return [::String] - # PSC Google API target this forwarding rule targets (if applicable). - class ForwardingRuleInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # For display only. Metadata associated with a load balancer. - # @!attribute [rw] load_balancer_type - # @return [::Google::Cloud::NetworkManagement::V1::LoadBalancerInfo::LoadBalancerType] - # Type of the load balancer. - # @!attribute [rw] health_check_uri - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::String] - # URI of the health check for the load balancer. Deprecated and no longer - # populated as different load balancer backends might have different health - # checks. - # @!attribute [rw] backends - # @return [::Array<::Google::Cloud::NetworkManagement::V1::LoadBalancerBackend>] - # Information for the loadbalancer backends. - # @!attribute [rw] backend_type - # @return [::Google::Cloud::NetworkManagement::V1::LoadBalancerInfo::BackendType] - # Type of load balancer's backend configuration. - # @!attribute [rw] backend_uri - # @return [::String] - # Backend configuration URI. - class LoadBalancerInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The type definition for a load balancer: - module LoadBalancerType - # Type is unspecified. - LOAD_BALANCER_TYPE_UNSPECIFIED = 0 - - # Internal TCP/UDP load balancer. - INTERNAL_TCP_UDP = 1 - - # Network TCP/UDP load balancer. - NETWORK_TCP_UDP = 2 - - # HTTP(S) proxy load balancer. - HTTP_PROXY = 3 - - # TCP proxy load balancer. - TCP_PROXY = 4 - - # SSL proxy load balancer. - SSL_PROXY = 5 - end - - # The type definition for a load balancer backend configuration: - module BackendType - # Type is unspecified. - BACKEND_TYPE_UNSPECIFIED = 0 - - # Backend Service as the load balancer's backend. - BACKEND_SERVICE = 1 - - # Target Pool as the load balancer's backend. - TARGET_POOL = 2 - - # Target Instance as the load balancer's backend. - TARGET_INSTANCE = 3 - end - end - - # For display only. Metadata associated with a specific load balancer backend. - # @!attribute [rw] display_name - # @return [::String] - # Name of a Compute Engine instance or network endpoint. - # @!attribute [rw] uri - # @return [::String] - # URI of a Compute Engine instance or network endpoint. - # @!attribute [rw] health_check_firewall_state - # @return [::Google::Cloud::NetworkManagement::V1::LoadBalancerBackend::HealthCheckFirewallState] - # State of the health check firewall configuration. - # @!attribute [rw] health_check_allowing_firewall_rules - # @return [::Array<::String>] - # A list of firewall rule URIs allowing probes from health check IP ranges. - # @!attribute [rw] health_check_blocking_firewall_rules - # @return [::Array<::String>] - # A list of firewall rule URIs blocking probes from health check IP ranges. - class LoadBalancerBackend - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # State of a health check firewall configuration: - module HealthCheckFirewallState - # State is unspecified. Default state if not populated. - HEALTH_CHECK_FIREWALL_STATE_UNSPECIFIED = 0 - - # There are configured firewall rules to allow health check probes to the - # backend. - CONFIGURED = 1 - - # There are firewall rules configured to allow partial health check ranges - # or block all health check ranges. - # If a health check probe is sent from denied IP ranges, - # the health check to the backend will fail. Then, the backend will be - # marked unhealthy and will not receive traffic sent to the load balancer. - MISCONFIGURED = 2 - end - end - - # For display only. Metadata associated with a hybrid subnet. - # @!attribute [rw] display_name - # @return [::String] - # Name of a hybrid subnet. - # @!attribute [rw] uri - # @return [::String] - # URI of a hybrid subnet. - # @!attribute [rw] region - # @return [::String] - # Name of a Google Cloud region where the hybrid subnet is configured. - class HybridSubnetInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # For display only. Metadata associated with a Compute Engine VPN gateway. - # @!attribute [rw] display_name - # @return [::String] - # Name of a VPN gateway. - # @!attribute [rw] uri - # @return [::String] - # URI of a VPN gateway. - # @!attribute [rw] network_uri - # @return [::String] - # URI of a Compute Engine network where the VPN gateway is configured. - # @!attribute [rw] ip_address - # @return [::String] - # IP address of the VPN gateway. - # @!attribute [rw] vpn_tunnel_uri - # @return [::String] - # A VPN tunnel that is associated with this VPN gateway. - # There may be multiple VPN tunnels configured on a VPN gateway, and only - # the one relevant to the test is displayed. - # @!attribute [rw] region - # @return [::String] - # Name of a Google Cloud region where this VPN gateway is configured. - class VpnGatewayInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # For display only. Metadata associated with a Compute Engine VPN tunnel. - # @!attribute [rw] display_name - # @return [::String] - # Name of a VPN tunnel. - # @!attribute [rw] uri - # @return [::String] - # URI of a VPN tunnel. - # @!attribute [rw] source_gateway - # @return [::String] - # URI of the VPN gateway at local end of the tunnel. - # @!attribute [rw] remote_gateway - # @return [::String] - # URI of a VPN gateway at remote end of the tunnel. - # @!attribute [rw] remote_gateway_ip - # @return [::String] - # Remote VPN gateway's IP address. - # @!attribute [rw] source_gateway_ip - # @return [::String] - # Local VPN gateway's IP address. - # @!attribute [rw] network_uri - # @return [::String] - # URI of a Compute Engine network where the VPN tunnel is configured. - # @!attribute [rw] region - # @return [::String] - # Name of a Google Cloud region where this VPN tunnel is configured. - # @!attribute [rw] routing_type - # @return [::Google::Cloud::NetworkManagement::V1::VpnTunnelInfo::RoutingType] - # Type of the routing policy. - class VpnTunnelInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Types of VPN routing policy. For details, refer to [Networks and Tunnel - # routing](https://cloud.google.com/network-connectivity/docs/vpn/concepts/choosing-networks-routing/). - module RoutingType - # Unspecified type. Default value. - ROUTING_TYPE_UNSPECIFIED = 0 - - # Route based VPN. - ROUTE_BASED = 1 - - # Policy based routing. - POLICY_BASED = 2 - - # Dynamic (BGP) routing. - DYNAMIC = 3 - end - end - - # For display only. Metadata associated with an Interconnect attachment. - # @!attribute [rw] display_name - # @return [::String] - # Name of an Interconnect attachment. - # @!attribute [rw] uri - # @return [::String] - # URI of an Interconnect attachment. - # @!attribute [rw] interconnect_uri - # @return [::String] - # URI of the Interconnect where the Interconnect attachment is - # configured. - # @!attribute [rw] region - # @return [::String] - # Name of a Google Cloud region where the Interconnect attachment is - # configured. - # @!attribute [rw] cloud_router_uri - # @return [::String] - # URI of the Cloud Router to be used for dynamic routing. - # @!attribute [rw] type - # @return [::Google::Cloud::NetworkManagement::V1::InterconnectAttachmentInfo::Type] - # The type of interconnect attachment this is. - # @!attribute [rw] l2_attachment_matched_ip_address - # @return [::String] - # Appliance IP address that was matched for L2_DEDICATED attachments. - class InterconnectAttachmentInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # What type of interconnect attachment this is. - module Type - # Unspecified type. - TYPE_UNSPECIFIED = 0 - - # Attachment to a dedicated interconnect. - DEDICATED = 1 - - # Attachment to a partner interconnect, created by the customer. - PARTNER = 2 - - # Attachment to a partner interconnect, created by the partner. - PARTNER_PROVIDER = 3 - - # Attachment to a L2 interconnect, created by the customer. - L2_DEDICATED = 4 - end - end - - # For display only. The specification of the endpoints for the test. - # EndpointInfo is derived from source and destination Endpoint and validated - # by the backend data plane model. - # @!attribute [rw] source_ip - # @return [::String] - # Source IP address. - # @!attribute [rw] destination_ip - # @return [::String] - # Destination IP address. - # @!attribute [rw] protocol - # @return [::String] - # IP protocol in string format, for example: "TCP", "UDP", "ICMP". - # @!attribute [rw] source_port - # @return [::Integer] - # Source port. Only valid when protocol is TCP or UDP. - # @!attribute [rw] destination_port - # @return [::Integer] - # Destination port. Only valid when protocol is TCP or UDP. - # @!attribute [rw] source_network_uri - # @return [::String] - # URI of the network where this packet originates from. - # @!attribute [rw] destination_network_uri - # @return [::String] - # URI of the network where this packet is sent to. - # @!attribute [rw] source_agent_uri - # @return [::String] - # URI of the source telemetry agent this packet originates from. - class EndpointInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Details of the final state "deliver" and associated resource. - # @!attribute [rw] target - # @return [::Google::Cloud::NetworkManagement::V1::DeliverInfo::Target] - # Target type where the packet is delivered to. - # @!attribute [rw] resource_uri - # @return [::String] - # URI of the resource that the packet is delivered to. - # @!attribute [rw] ip_address - # @return [::String] - # IP address of the target (if applicable). - # @!attribute [rw] storage_bucket - # @return [::String] - # Name of the Cloud Storage Bucket the packet is delivered to (if - # applicable). - # @!attribute [rw] psc_google_api_target - # @return [::String] - # PSC Google API target the packet is delivered to (if applicable). - # @!attribute [rw] google_service_type - # @return [::Google::Cloud::NetworkManagement::V1::DeliverInfo::GoogleServiceType] - # Recognized type of a Google Service the packet is delivered to (if - # applicable). - class DeliverInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Deliver target types: - module Target - # Target not specified. - TARGET_UNSPECIFIED = 0 - - # Target is a Compute Engine instance. - INSTANCE = 1 - - # Target is the internet. - INTERNET = 2 - - # Target is a Google API. - GOOGLE_API = 3 - - # Target is a Google Kubernetes Engine cluster master. - GKE_MASTER = 4 - - # Target is a Cloud SQL instance. - CLOUD_SQL_INSTANCE = 5 - - # Target is a published service that uses [Private Service - # Connect](https://cloud.google.com/vpc/docs/configure-private-service-connect-services). - PSC_PUBLISHED_SERVICE = 6 - - # Target is Google APIs that use [Private Service - # Connect](https://cloud.google.com/vpc/docs/configure-private-service-connect-apis). - PSC_GOOGLE_API = 7 - - # Target is a VPC-SC that uses [Private Service - # Connect](https://cloud.google.com/vpc/docs/configure-private-service-connect-apis). - PSC_VPC_SC = 8 - - # Target is a serverless network endpoint group. - SERVERLESS_NEG = 9 - - # Target is a Cloud Storage bucket. - STORAGE_BUCKET = 10 - - # Target is a private network. Used only for return traces. - PRIVATE_NETWORK = 11 - - # Target is a Cloud Function. Used only for return traces. - CLOUD_FUNCTION = 12 - - # Target is a App Engine service version. Used only for return traces. - APP_ENGINE_VERSION = 13 - - # Target is a Cloud Run revision. Used only for return traces. - CLOUD_RUN_REVISION = 14 - - # Target is a Google-managed service. Used only for return traces. - GOOGLE_MANAGED_SERVICE = 15 - - # Target is a Redis Instance. - REDIS_INSTANCE = 16 - - # Target is a Redis Cluster. - REDIS_CLUSTER = 17 - - # Target is a GKE Pod. - GKE_POD = 19 - end - - # Recognized type of a Google Service. - module GoogleServiceType - # Unspecified Google Service. - GOOGLE_SERVICE_TYPE_UNSPECIFIED = 0 - - # Identity aware proxy. - # https://cloud.google.com/iap/docs/using-tcp-forwarding - IAP = 1 - - # One of two services sharing IP ranges: - # * Load Balancer proxy - # * Centralized Health Check prober - # https://cloud.google.com/load-balancing/docs/firewall-rules - GFE_PROXY_OR_HEALTH_CHECK_PROBER = 2 - - # Connectivity from Cloud DNS to forwarding targets or alternate name - # servers that use private routing. - # https://cloud.google.com/dns/docs/zones/forwarding-zones#firewall-rules - # https://cloud.google.com/dns/docs/policies#firewall-rules - CLOUD_DNS = 3 - - # private.googleapis.com and restricted.googleapis.com - PRIVATE_GOOGLE_ACCESS = 4 - - # Google API via Private Service Connect. - # https://cloud.google.com/vpc/docs/configure-private-service-connect-apis - # Google API via Serverless VPC Access. - # https://cloud.google.com/vpc/docs/serverless-vpc-access - SERVERLESS_VPC_ACCESS = 5 - end - end - - # Details of the final state "forward" and associated resource. - # @!attribute [rw] target - # @return [::Google::Cloud::NetworkManagement::V1::ForwardInfo::Target] - # Target type where this packet is forwarded to. - # @!attribute [rw] resource_uri - # @return [::String] - # URI of the resource that the packet is forwarded to. - # @!attribute [rw] ip_address - # @return [::String] - # IP address of the target (if applicable). - class ForwardInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Forward target types. - module Target - # Target not specified. - TARGET_UNSPECIFIED = 0 - - # Forwarded to a VPC peering network. - PEERING_VPC = 1 - - # Forwarded to a Cloud VPN gateway. - VPN_GATEWAY = 2 - - # Forwarded to a Cloud Interconnect connection. - INTERCONNECT = 3 - - # Forwarded to a Google Kubernetes Engine Container cluster master. - GKE_MASTER = 4 - - # Forwarded to the next hop of a custom route imported from a peering VPC. - IMPORTED_CUSTOM_ROUTE_NEXT_HOP = 5 - - # Forwarded to a Cloud SQL instance. - CLOUD_SQL_INSTANCE = 6 - - # Forwarded to a VPC network in another project. - ANOTHER_PROJECT = 7 - - # Forwarded to an NCC Hub. - NCC_HUB = 8 - - # Forwarded to a router appliance. - ROUTER_APPLIANCE = 9 - - # Forwarded to a Secure Web Proxy Gateway. - SECURE_WEB_PROXY_GATEWAY = 10 - end - end - - # Details of the final state "abort" and associated resource. - # @!attribute [rw] cause - # @return [::Google::Cloud::NetworkManagement::V1::AbortInfo::Cause] - # Causes that the analysis is aborted. - # @!attribute [rw] resource_uri - # @return [::String] - # URI of the resource that caused the abort. - # @!attribute [rw] ip_address - # @return [::String] - # IP address that caused the abort. - # @!attribute [rw] projects_missing_permission - # @return [::Array<::String>] - # List of project IDs the user specified in the request but lacks access to. - # In this case, analysis is aborted with the PERMISSION_DENIED cause. - class AbortInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Abort cause types: - module Cause - # Cause is unspecified. - CAUSE_UNSPECIFIED = 0 - - # Aborted due to unknown network. Deprecated, not used in the new tests. - UNKNOWN_NETWORK = 1 - - # Aborted because no project information can be derived from the test - # input. Deprecated, not used in the new tests. - UNKNOWN_PROJECT = 3 - - # Aborted because traffic is sent from a public IP to an instance without - # an external IP. Deprecated, not used in the new tests. - NO_EXTERNAL_IP = 7 - - # Aborted because none of the traces matches destination information - # specified in the input test request. Deprecated, not used in the new - # tests. - UNINTENDED_DESTINATION = 8 - - # Aborted because the source endpoint could not be found. Deprecated, not - # used in the new tests. - SOURCE_ENDPOINT_NOT_FOUND = 11 - - # Aborted because the source network does not match the source endpoint. - # Deprecated, not used in the new tests. - MISMATCHED_SOURCE_NETWORK = 12 - - # Aborted because the destination endpoint could not be found. Deprecated, - # not used in the new tests. - DESTINATION_ENDPOINT_NOT_FOUND = 13 - - # Aborted because the destination network does not match the destination - # endpoint. Deprecated, not used in the new tests. - MISMATCHED_DESTINATION_NETWORK = 14 - - # Aborted because no endpoint with the packet's destination IP address is - # found. - UNKNOWN_IP = 2 - - # Aborted because no endpoint with the packet's destination IP is found in - # the Google-managed project. - GOOGLE_MANAGED_SERVICE_UNKNOWN_IP = 32 - - # Aborted because the source IP address doesn't belong to any of the - # subnets of the source VPC network. - SOURCE_IP_ADDRESS_NOT_IN_SOURCE_NETWORK = 23 - - # Aborted because user lacks permission to access all or part of the - # network configurations required to run the test. - PERMISSION_DENIED = 4 - - # Aborted because user lacks permission to access Cloud NAT configs - # required to run the test. - PERMISSION_DENIED_NO_CLOUD_NAT_CONFIGS = 28 - - # Aborted because user lacks permission to access Network endpoint group - # endpoint configs required to run the test. - PERMISSION_DENIED_NO_NEG_ENDPOINT_CONFIGS = 29 - - # Aborted because user lacks permission to access Cloud Router configs - # required to run the test. - PERMISSION_DENIED_NO_CLOUD_ROUTER_CONFIGS = 36 - - # Aborted because no valid source or destination endpoint can be derived - # from the test request. - NO_SOURCE_LOCATION = 5 - - # Aborted because the source IP address is not contained within the subnet - # ranges of the provided VPC network. - NO_SOURCE_GCP_NETWORK_LOCATION = 42 - - # Aborted because the source IP address is not contained within the - # destination ranges of the routes towards non-GCP networks in the provided - # VPC network. - NO_SOURCE_NON_GCP_NETWORK_LOCATION = 43 - - # Aborted because the source IP address can't be resolved as an Internet - # IP address. - NO_SOURCE_INTERNET_LOCATION = 44 - - # Aborted because the source or destination endpoint specified in - # the request is invalid. Some examples: - # - The request might contain malformed resource URI, project ID, or IP - # address. - # - The request might contain inconsistent information (for example, the - # request might include both the instance and the network, but the instance - # might not have a NIC in that network). - INVALID_ARGUMENT = 6 - - # Aborted because the number of steps in the trace exceeds a certain - # limit. It might be caused by a routing loop. - TRACE_TOO_LONG = 9 - - # Aborted due to internal server error. - INTERNAL_ERROR = 10 - - # Aborted because the test scenario is not supported. - UNSUPPORTED = 15 - - # Aborted because the source and destination resources have no common IP - # version. - MISMATCHED_IP_VERSION = 16 - - # Aborted because the connection between the control plane and the node of - # the source cluster is initiated by the node and managed by the - # Konnectivity proxy. - GKE_KONNECTIVITY_PROXY_UNSUPPORTED = 17 - - # Aborted because expected resource configuration was missing. - RESOURCE_CONFIG_NOT_FOUND = 18 - - # Aborted because expected VM instance configuration was missing. - VM_INSTANCE_CONFIG_NOT_FOUND = 24 - - # Aborted because expected network configuration was missing. - NETWORK_CONFIG_NOT_FOUND = 25 - - # Aborted because expected firewall configuration was missing. - FIREWALL_CONFIG_NOT_FOUND = 26 - - # Aborted because expected route configuration was missing. - ROUTE_CONFIG_NOT_FOUND = 27 - - # Aborted because PSC endpoint selection for the Google-managed service - # is ambiguous (several PSC endpoints satisfy test input). - GOOGLE_MANAGED_SERVICE_AMBIGUOUS_PSC_ENDPOINT = 19 - - # Aborted because endpoint selection for the Google-managed service is - # ambiguous (several endpoints satisfy test input). - GOOGLE_MANAGED_SERVICE_AMBIGUOUS_ENDPOINT = 39 - - # Aborted because tests with a PSC-based Cloud SQL instance as a source are - # not supported. - SOURCE_PSC_CLOUD_SQL_UNSUPPORTED = 20 - - # Aborted because tests with the external database as a source are not - # supported. In such replication scenarios, the connection is initiated by - # the Cloud SQL replica instance. - SOURCE_EXTERNAL_CLOUD_SQL_UNSUPPORTED = 45 - - # Aborted because tests with a Redis Cluster as a source are not supported. - SOURCE_REDIS_CLUSTER_UNSUPPORTED = 34 - - # Aborted because tests with a Redis Instance as a source are not - # supported. - SOURCE_REDIS_INSTANCE_UNSUPPORTED = 35 - - # Aborted because tests with a forwarding rule as a source are not - # supported. - SOURCE_FORWARDING_RULE_UNSUPPORTED = 21 - - # Aborted because one of the endpoints is a non-routable IP address - # (loopback, link-local, etc). - NON_ROUTABLE_IP_ADDRESS = 22 - - # Aborted due to an unknown issue in the Google-managed project. - UNKNOWN_ISSUE_IN_GOOGLE_MANAGED_PROJECT = 30 - - # Aborted due to an unsupported configuration of the Google-managed - # project. - UNSUPPORTED_GOOGLE_MANAGED_PROJECT_CONFIG = 31 - - # Aborted because the source endpoint is a Cloud Run revision with direct - # VPC access enabled, but there are no reserved serverless IP ranges. - NO_SERVERLESS_IP_RANGES = 37 - - # Aborted because the used protocol is not supported for the used IP - # version. - IP_VERSION_PROTOCOL_MISMATCH = 40 - - # Aborted because selected GKE Pod endpoint location is unknown. This is - # often the case for "Pending" Pods, which don't have assigned IP addresses - # yet. - GKE_POD_UNKNOWN_ENDPOINT_LOCATION = 41 - end - end - - # Details of the final state "drop" and associated resource. - # @!attribute [rw] cause - # @return [::Google::Cloud::NetworkManagement::V1::DropInfo::Cause] - # Cause that the packet is dropped. - # @!attribute [rw] resource_uri - # @return [::String] - # URI of the resource that caused the drop. - # @!attribute [rw] source_ip - # @return [::String] - # Source IP address of the dropped packet (if relevant). - # @!attribute [rw] destination_ip - # @return [::String] - # Destination IP address of the dropped packet (if relevant). - # @!attribute [rw] region - # @return [::String] - # Region of the dropped packet (if relevant). - # @!attribute [rw] source_geolocation_code - # @return [::String] - # Geolocation (region code) of the source IP address (if relevant). - # @!attribute [rw] destination_geolocation_code - # @return [::String] - # Geolocation (region code) of the destination IP address (if relevant). - class DropInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Drop cause types: - module Cause - # Cause is unspecified. - CAUSE_UNSPECIFIED = 0 - - # Destination external address cannot be resolved to a known target. If - # the address is used in a Google Cloud project, provide the project ID - # as test input. - UNKNOWN_EXTERNAL_ADDRESS = 1 - - # A Compute Engine instance can only send or receive a packet with a - # foreign IP address if ip_forward is enabled. - FOREIGN_IP_DISALLOWED = 2 - - # Dropped due to a firewall rule, unless allowed due to connection - # tracking. - FIREWALL_RULE = 3 - - # Dropped due to no matching routes. - NO_ROUTE = 4 - - # Dropped due to invalid route. Route's next hop is a blackhole. - ROUTE_BLACKHOLE = 5 - - # Packet is sent to a wrong (unintended) network. Example: you trace a - # packet from VM1:Network1 to VM2:Network2, however, the route configured - # in Network1 sends the packet destined for VM2's IP address to Network3. - ROUTE_WRONG_NETWORK = 6 - - # Route's next hop IP address cannot be resolved to a GCP resource. - ROUTE_NEXT_HOP_IP_ADDRESS_NOT_RESOLVED = 42 - - # Route's next hop resource is not found. - ROUTE_NEXT_HOP_RESOURCE_NOT_FOUND = 43 - - # Route's next hop instance doesn't have a NIC in the route's network. - ROUTE_NEXT_HOP_INSTANCE_WRONG_NETWORK = 49 - - # Route's next hop IP address is not a primary IP address of the next hop - # instance. - ROUTE_NEXT_HOP_INSTANCE_NON_PRIMARY_IP = 50 - - # Route's next hop forwarding rule doesn't match next hop IP address. - ROUTE_NEXT_HOP_FORWARDING_RULE_IP_MISMATCH = 51 - - # Route's next hop VPN tunnel is down (does not have valid IKE SAs). - ROUTE_NEXT_HOP_VPN_TUNNEL_NOT_ESTABLISHED = 52 - - # Route's next hop forwarding rule type is invalid (it's not a forwarding - # rule of the internal passthrough load balancer). - ROUTE_NEXT_HOP_FORWARDING_RULE_TYPE_INVALID = 53 - - # Packet is sent from the Internet to the private IPv6 address. - NO_ROUTE_FROM_INTERNET_TO_PRIVATE_IPV6_ADDRESS = 44 - - # Packet is sent from the Internet to the private IPv4 address. - NO_ROUTE_FROM_INTERNET_TO_PRIVATE_IPV4_ADDRESS = 109 - - # Packet is sent from the external IPv6 source address of an instance to - # the private IPv6 address of an instance. - NO_ROUTE_FROM_EXTERNAL_IPV6_SOURCE_TO_PRIVATE_IPV6_ADDRESS = 98 - - # The packet does not match a policy-based VPN tunnel local selector. - VPN_TUNNEL_LOCAL_SELECTOR_MISMATCH = 45 - - # The packet does not match a policy-based VPN tunnel remote selector. - VPN_TUNNEL_REMOTE_SELECTOR_MISMATCH = 46 - - # Packet with internal destination address sent to the internet gateway. - PRIVATE_TRAFFIC_TO_INTERNET = 7 - - # Endpoint with only an internal IP address tries to access Google API and - # services, but Private Google Access is not enabled in the subnet or is - # not applicable. - PRIVATE_GOOGLE_ACCESS_DISALLOWED = 8 - - # Source endpoint tries to access Google API and services through the VPN - # tunnel to another network, but Private Google Access needs to be enabled - # in the source endpoint network. - PRIVATE_GOOGLE_ACCESS_VIA_VPN_TUNNEL_UNSUPPORTED = 47 - - # Endpoint with only an internal IP address tries to access external hosts, - # but there is no matching Cloud NAT gateway in the subnet. - NO_EXTERNAL_ADDRESS = 9 - - # Destination internal address cannot be resolved to a known target. If - # this is a shared VPC scenario, verify if the service project ID is - # provided as test input. Otherwise, verify if the IP address is being - # used in the project. - UNKNOWN_INTERNAL_ADDRESS = 10 - - # Forwarding rule's protocol and ports do not match the packet header. - FORWARDING_RULE_MISMATCH = 11 - - # Forwarding rule does not have backends configured. - FORWARDING_RULE_NO_INSTANCES = 12 - - # Firewalls block the health check probes to the backends and cause - # the backends to be unavailable for traffic from the load balancer. - # For more details, see [Health check firewall - # rules](https://cloud.google.com/load-balancing/docs/health-checks#firewall_rules). - FIREWALL_BLOCKING_LOAD_BALANCER_BACKEND_HEALTH_CHECK = 13 - - # Matching ingress firewall rules by network tags for packets sent via - # serverless VPC direct egress is unsupported. Behavior is undefined. - # https://cloud.google.com/run/docs/configuring/vpc-direct-vpc#limitations - INGRESS_FIREWALL_TAGS_UNSUPPORTED_BY_DIRECT_VPC_EGRESS = 85 - - # Packet is sent from or to a Compute Engine instance that is not in a - # running state. - INSTANCE_NOT_RUNNING = 14 - - # Packet sent from or to a GKE cluster that is not in running state. - GKE_CLUSTER_NOT_RUNNING = 27 - - # Packet sent from or to a GKE Pod that is not in running state. - GKE_POD_NOT_RUNNING = 103 - - # Packet sent from or to a Cloud SQL instance that is not in running state. - CLOUD_SQL_INSTANCE_NOT_RUNNING = 28 - - # Packet sent from or to a Redis Instance that is not in running state. - REDIS_INSTANCE_NOT_RUNNING = 68 - - # Packet sent from or to a Redis Cluster that is not in running state. - REDIS_CLUSTER_NOT_RUNNING = 69 - - # The type of traffic is blocked and the user cannot configure a firewall - # rule to enable it. See [Always blocked - # traffic](https://cloud.google.com/vpc/docs/firewalls#blockedtraffic) for - # more details. - TRAFFIC_TYPE_BLOCKED = 15 - - # Access to Google Kubernetes Engine cluster master's endpoint is not - # authorized. See [Access to the cluster - # endpoints](https://cloud.google.com/kubernetes-engine/docs/how-to/private-clusters#access_to_the_cluster_endpoints) - # for more details. - GKE_MASTER_UNAUTHORIZED_ACCESS = 16 - - # Access to the Cloud SQL instance endpoint is not authorized. - # See [Authorizing with authorized - # networks](https://cloud.google.com/sql/docs/mysql/authorize-networks) for - # more details. - CLOUD_SQL_INSTANCE_UNAUTHORIZED_ACCESS = 17 - - # Packet was dropped inside Google Kubernetes Engine Service. - DROPPED_INSIDE_GKE_SERVICE = 18 - - # Packet was dropped inside Cloud SQL Service. - DROPPED_INSIDE_CLOUD_SQL_SERVICE = 19 - - # Packet was dropped because there is no peering between the originating - # network and the Google Managed Services Network. - GOOGLE_MANAGED_SERVICE_NO_PEERING = 20 - - # Packet was dropped because the Google-managed service uses Private - # Service Connect (PSC), but the PSC endpoint is not found in the project. - GOOGLE_MANAGED_SERVICE_NO_PSC_ENDPOINT = 38 - - # Packet was dropped because the GKE cluster uses Private Service Connect - # (PSC), but the PSC endpoint is not found in the project. - GKE_PSC_ENDPOINT_MISSING = 36 - - # Packet was dropped because the Cloud SQL instance has neither a private - # nor a public IP address. - CLOUD_SQL_INSTANCE_NO_IP_ADDRESS = 21 - - # Packet was dropped because a GKE cluster private endpoint is - # unreachable from a region different from the cluster's region. - GKE_CONTROL_PLANE_REGION_MISMATCH = 30 - - # Packet sent from a public GKE cluster control plane to a private - # IP address. - PUBLIC_GKE_CONTROL_PLANE_TO_PRIVATE_DESTINATION = 31 - - # Packet was dropped because there is no route from a GKE cluster - # control plane to a destination network. - GKE_CONTROL_PLANE_NO_ROUTE = 32 - - # Packet sent from a Cloud SQL instance to an external IP address is not - # allowed. The Cloud SQL instance is not configured to send packets to - # external IP addresses. - CLOUD_SQL_INSTANCE_NOT_CONFIGURED_FOR_EXTERNAL_TRAFFIC = 33 - - # Packet sent from a Cloud SQL instance with only a public IP address to a - # private IP address. - PUBLIC_CLOUD_SQL_INSTANCE_TO_PRIVATE_DESTINATION = 34 - - # Packet was dropped because there is no route from a Cloud SQL - # instance to a destination network. - CLOUD_SQL_INSTANCE_NO_ROUTE = 35 - - # Packet was dropped because the Cloud SQL instance requires all - # connections to use Cloud SQL connectors and to target the Cloud SQL proxy - # port (3307). - CLOUD_SQL_CONNECTOR_REQUIRED = 63 - - # Packet could be dropped because the Cloud Function is not in an active - # status. - CLOUD_FUNCTION_NOT_ACTIVE = 22 - - # Packet could be dropped because no VPC connector is set. - VPC_CONNECTOR_NOT_SET = 23 - - # Packet could be dropped because the VPC connector is not in a running - # state. - VPC_CONNECTOR_NOT_RUNNING = 24 - - # Packet could be dropped because the traffic from the serverless service - # to the VPC connector is not allowed. - VPC_CONNECTOR_SERVERLESS_TRAFFIC_BLOCKED = 60 - - # Packet could be dropped because the health check traffic to the VPC - # connector is not allowed. - VPC_CONNECTOR_HEALTH_CHECK_TRAFFIC_BLOCKED = 61 - - # Packet could be dropped because it was sent from a different region - # to a regional forwarding without global access. - FORWARDING_RULE_REGION_MISMATCH = 25 - - # The Private Service Connect endpoint is in a project that is not approved - # to connect to the service. - PSC_CONNECTION_NOT_ACCEPTED = 26 - - # The packet is sent to the Private Service Connect endpoint over the - # peering, but [it's not - # supported](https://cloud.google.com/vpc/docs/configure-private-service-connect-services#on-premises). - PSC_ENDPOINT_ACCESSED_FROM_PEERED_NETWORK = 41 - - # The packet is sent to the Private Service Connect backend (network - # endpoint group), but the producer PSC forwarding rule does not have - # global access enabled. - PSC_NEG_PRODUCER_ENDPOINT_NO_GLOBAL_ACCESS = 48 - - # The packet is sent to the Private Service Connect backend (network - # endpoint group), but the producer PSC forwarding rule has multiple ports - # specified. - PSC_NEG_PRODUCER_FORWARDING_RULE_MULTIPLE_PORTS = 54 - - # The packet is sent to the Private Service Connect backend (network - # endpoint group) targeting a Cloud SQL service attachment, but this - # configuration is not supported. - CLOUD_SQL_PSC_NEG_UNSUPPORTED = 58 - - # No NAT subnets are defined for the PSC service attachment. - NO_NAT_SUBNETS_FOR_PSC_SERVICE_ATTACHMENT = 57 - - # PSC endpoint is accessed via NCC, but PSC transitivity configuration is - # not yet propagated. - PSC_TRANSITIVITY_NOT_PROPAGATED = 64 - - # The packet sent from the hybrid NEG proxy matches a non-dynamic route, - # but such a configuration is not supported. - HYBRID_NEG_NON_DYNAMIC_ROUTE_MATCHED = 55 - - # The packet sent from the hybrid NEG proxy matches a dynamic route with a - # next hop in a different region, but such a configuration is not - # supported. - HYBRID_NEG_NON_LOCAL_DYNAMIC_ROUTE_MATCHED = 56 - - # Packet sent from a Cloud Run revision that is not ready. - CLOUD_RUN_REVISION_NOT_READY = 29 - - # Packet was dropped inside Private Service Connect service producer. - DROPPED_INSIDE_PSC_SERVICE_PRODUCER = 37 - - # Packet sent to a load balancer, which requires a proxy-only subnet and - # the subnet is not found. - LOAD_BALANCER_HAS_NO_PROXY_SUBNET = 39 - - # Packet sent to Cloud Nat without active NAT IPs. - CLOUD_NAT_NO_ADDRESSES = 40 - - # Packet is stuck in a routing loop. - ROUTING_LOOP = 59 - - # Packet is dropped inside a Google-managed service due to being delivered - # in return trace to an endpoint that doesn't match the endpoint the packet - # was sent from in forward trace. Used only for return traces. - DROPPED_INSIDE_GOOGLE_MANAGED_SERVICE = 62 - - # Packet is dropped due to a load balancer backend instance not having a - # network interface in the network expected by the load balancer. - LOAD_BALANCER_BACKEND_INVALID_NETWORK = 65 - - # Packet is dropped due to a backend service named port not being defined - # on the instance group level. - BACKEND_SERVICE_NAMED_PORT_NOT_DEFINED = 66 - - # Packet is dropped due to a destination IP range being part of a Private - # NAT IP range. - DESTINATION_IS_PRIVATE_NAT_IP_RANGE = 67 - - # Generic drop cause for a packet being dropped inside a Redis Instance - # service project. - DROPPED_INSIDE_REDIS_INSTANCE_SERVICE = 70 - - # Packet is dropped due to an unsupported port being used to connect to a - # Redis Instance. Port 6379 should be used to connect to a Redis Instance. - REDIS_INSTANCE_UNSUPPORTED_PORT = 71 - - # Packet is dropped due to connecting from PUPI address to a PSA based - # Redis Instance. - REDIS_INSTANCE_CONNECTING_FROM_PUPI_ADDRESS = 72 - - # Packet is dropped due to no route to the destination network. - REDIS_INSTANCE_NO_ROUTE_TO_DESTINATION_NETWORK = 73 - - # Redis Instance does not have an external IP address. - REDIS_INSTANCE_NO_EXTERNAL_IP = 74 - - # Packet is dropped due to an unsupported protocol being used to connect to - # a Redis Instance. Only TCP connections are accepted by a Redis Instance. - REDIS_INSTANCE_UNSUPPORTED_PROTOCOL = 78 - - # Generic drop cause for a packet being dropped inside a Redis Cluster - # service project. - DROPPED_INSIDE_REDIS_CLUSTER_SERVICE = 75 - - # Packet is dropped due to an unsupported port being used to connect to a - # Redis Cluster. Ports 6379 and 11000 to 13047 should be used to connect to - # a Redis Cluster. - REDIS_CLUSTER_UNSUPPORTED_PORT = 76 - - # Redis Cluster does not have an external IP address. - REDIS_CLUSTER_NO_EXTERNAL_IP = 77 - - # Packet is dropped due to an unsupported protocol being used to connect to - # a Redis Cluster. Only TCP connections are accepted by a Redis Cluster. - REDIS_CLUSTER_UNSUPPORTED_PROTOCOL = 79 - - # Packet from the non-GCP (on-prem) or unknown GCP network is dropped due - # to the destination IP address not belonging to any IP prefix advertised - # via BGP by the Cloud Router. - NO_ADVERTISED_ROUTE_TO_GCP_DESTINATION = 80 - - # Packet from the non-GCP (on-prem) or unknown GCP network is dropped due - # to the destination IP address not belonging to any IP prefix included to - # the local traffic selector of the VPN tunnel. - NO_TRAFFIC_SELECTOR_TO_GCP_DESTINATION = 81 - - # Packet from the unknown peered network is dropped due to no known route - # from the source network to the destination IP address. - NO_KNOWN_ROUTE_FROM_PEERED_NETWORK_TO_DESTINATION = 82 - - # Sending packets processed by the Private NAT Gateways to the Private - # Service Connect endpoints is not supported. - PRIVATE_NAT_TO_PSC_ENDPOINT_UNSUPPORTED = 83 - - # Packet is sent to the PSC port mapping service, but its destination port - # does not match any port mapping rules. - PSC_PORT_MAPPING_PORT_MISMATCH = 86 - - # Sending packets directly to the PSC port mapping service without going - # through the PSC connection is not supported. - PSC_PORT_MAPPING_WITHOUT_PSC_CONNECTION_UNSUPPORTED = 87 - - # Packet with destination IP address within the reserved NAT64 range is - # dropped due to matching a route of an unsupported type. - UNSUPPORTED_ROUTE_MATCHED_FOR_NAT64_DESTINATION = 88 - - # Packet could be dropped because hybrid endpoint like a VPN gateway or - # Interconnect is not allowed to send traffic to the Internet. - TRAFFIC_FROM_HYBRID_ENDPOINT_TO_INTERNET_DISALLOWED = 89 - - # Packet with destination IP address within the reserved NAT64 range is - # dropped due to no matching NAT gateway in the subnet. - NO_MATCHING_NAT64_GATEWAY = 90 - - # Packet is dropped due to matching a Private NAT64 gateway with no rules - # for source IPv6 addresses. - NO_CONFIGURED_PRIVATE_NAT64_RULE = 107 - - # Packet is dropped due to being sent to a backend of a passthrough load - # balancer that doesn't use the same IP version as the frontend. - LOAD_BALANCER_BACKEND_IP_VERSION_MISMATCH = 96 - - # Packet from the unknown NCC network is dropped due to no known route - # from the source network to the destination IP address. - NO_KNOWN_ROUTE_FROM_NCC_NETWORK_TO_DESTINATION = 97 - - # Packet is dropped by Cloud NAT due to using an unsupported protocol. - CLOUD_NAT_PROTOCOL_UNSUPPORTED = 99 - - # Packet is dropped due to using an unsupported protocol (any other than - # UDP) for L2 Interconnect. - L2_INTERCONNECT_UNSUPPORTED_PROTOCOL = 100 - - # Packet is dropped due to using an unsupported port (any other than - # 6081) for L2 Interconnect. - L2_INTERCONNECT_UNSUPPORTED_PORT = 101 - - # Packet is dropped due to destination IP not matching the appliance - # mapping IPs configured on the L2 Interconnect attachment. - L2_INTERCONNECT_DESTINATION_IP_MISMATCH = 102 - - # Packet could be dropped because it matches a route associated with an NCC - # spoke in the hybrid subnet context, but such a configuration is not - # supported. - NCC_ROUTE_WITHIN_HYBRID_SUBNET_UNSUPPORTED = 104 - - # Packet is dropped because the region of the hybrid subnet is different - # from the region of the next hop of the route matched within this hybrid - # subnet. - HYBRID_SUBNET_REGION_MISMATCH = 105 - - # Packet is dropped because no matching route was found in the hybrid - # subnet. - HYBRID_SUBNET_NO_ROUTE = 106 - - # Packet is dropped by GKE Network Policy. - GKE_NETWORK_POLICY = 108 - - # Packet is dropped because there is no valid matching route from the - # network of the Google-managed service to the destination. - NO_VALID_ROUTE_FROM_GOOGLE_MANAGED_NETWORK_TO_DESTINATION = 110 - end - end - - # For display only. Metadata associated with a Google Kubernetes Engine (GKE) - # cluster master. - # @!attribute [rw] cluster_uri - # @return [::String] - # URI of a GKE cluster. - # @!attribute [rw] cluster_network_uri - # @return [::String] - # URI of a GKE cluster network. - # @!attribute [rw] internal_ip - # @return [::String] - # Internal IP address of a GKE cluster control plane. - # @!attribute [rw] external_ip - # @return [::String] - # External IP address of a GKE cluster control plane. - # @!attribute [rw] dns_endpoint - # @return [::String] - # DNS endpoint of a GKE cluster control plane. - class GKEMasterInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # For display only. Metadata associated with a Google Kubernetes Engine (GKE) - # Pod. - # @!attribute [rw] pod_uri - # @return [::String] - # URI of a GKE Pod. - # For Pods in regional Clusters, the URI format is: - # `projects/{project}/locations/{location}/clusters/{cluster}/k8s/namespaces/{namespace}/pods/{pod}` - # For Pods in zonal Clusters, the URI format is: - # `projects/{project}/zones/{zone}/clusters/{cluster}/k8s/namespaces/{namespace}/pods/{pod}` - # @!attribute [rw] ip_address - # @return [::String] - # IP address of a GKE Pod. If the Pod is dual-stack, this is the IP address - # relevant to the trace. - # @!attribute [rw] network_uri - # @return [::String] - # URI of the network containing the GKE Pod. - class GkePodInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # For display only. Contains information about why IP masquerading was skipped - # for the packet. - # @!attribute [rw] reason - # @return [::Google::Cloud::NetworkManagement::V1::IpMasqueradingSkippedInfo::Reason] - # Reason why IP masquerading was not applied. - # @!attribute [rw] non_masquerade_range - # @return [::String] - # The matched non-masquerade IP range. Only set if reason is - # DESTINATION_IP_IN_CONFIGURED_NON_MASQUERADE_RANGE or - # DESTINATION_IP_IN_DEFAULT_NON_MASQUERADE_RANGE. - class IpMasqueradingSkippedInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Reason why IP masquerading was skipped. - module Reason - # Unused default value. - REASON_UNSPECIFIED = 0 - - # Masquerading not applied because destination IP is in one of configured - # non-masquerade ranges. - DESTINATION_IP_IN_CONFIGURED_NON_MASQUERADE_RANGE = 1 - - # Masquerading not applied because destination IP is in one of default - # non-masquerade ranges. - DESTINATION_IP_IN_DEFAULT_NON_MASQUERADE_RANGE = 2 - - # Masquerading not applied because destination is on the same Node. - DESTINATION_ON_SAME_NODE = 3 - - # Masquerading not applied because ip-masq-agent doesn't exist and default - # SNAT is disabled. - DEFAULT_SNAT_DISABLED = 4 - - # Masquerading not applied because the packet's IP version is IPv6. - NO_MASQUERADING_FOR_IPV6 = 5 - - # Masquerading not applied because the source Pod uses the host Node's - # network namespace, including the Node's IP address. - POD_USES_NODE_NETWORK_NAMESPACE = 6 - - # Masquerading not applied because the packet is a return packet. - NO_MASQUERADING_FOR_RETURN_PACKET = 7 - end - end - - # For display only. Metadata associated with a GKE Network Policy. - # @!attribute [rw] display_name - # @return [::String] - # The name of the Network Policy. - # @!attribute [rw] uri - # @return [::String] - # The URI of the Network Policy. - # Format for a Network Policy in a zonal cluster: - # `projects//zones//clusters//k8s/namespaces//networking.k8s.io/networkpolicies/` - # Format for a Network Policy in a regional cluster: - # `projects//locations//clusters//k8s/namespaces//networking.k8s.io/networkpolicies/` - # @!attribute [rw] direction - # @return [::String] - # Possible values: INGRESS, EGRESS - # @!attribute [rw] action - # @return [::String] - # Possible values: ALLOW, DENY - class GkeNetworkPolicyInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # For display only. Contains information about why GKE Network Policy - # evaluation was skipped. - # @!attribute [rw] reason - # @return [::Google::Cloud::NetworkManagement::V1::GkeNetworkPolicySkippedInfo::Reason] - # Reason why Network Policy evaluation was skipped. - class GkeNetworkPolicySkippedInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - module Reason - # Unused default value. - REASON_UNSPECIFIED = 0 - - # Network Policy is disabled on the cluster. - NETWORK_POLICY_DISABLED = 1 - - # Ingress traffic to a Pod from a source on the same Node is always - # allowed. - INGRESS_SOURCE_ON_SAME_NODE = 2 - - # Egress traffic from a Pod that uses the Node's network namespace is not - # subject to Network Policy. - EGRESS_FROM_NODE_NETWORK_NAMESPACE_POD = 3 - - # Network Policy is not applied to response traffic. This is because GKE - # Network Policy evaluation is stateful in both GKE Dataplane V2 (eBPF) and - # legacy (iptables) implementations. - NETWORK_POLICY_NOT_APPLIED_TO_RESPONSE_TRAFFIC = 4 - - # Network Policy evaluation is currently not supported for clusters with - # FQDN Network Policies enabled. - NETWORK_POLICY_ANALYSIS_UNSUPPORTED = 100 - end - end - - # For display only. Metadata associated with a Cloud SQL instance. - # @!attribute [rw] display_name - # @return [::String] - # Name of a Cloud SQL instance. - # @!attribute [rw] uri - # @return [::String] - # URI of a Cloud SQL instance. - # @!attribute [rw] network_uri - # @return [::String] - # URI of a Cloud SQL instance network or empty string if the instance does - # not have one. - # @!attribute [rw] internal_ip - # @return [::String] - # Internal IP address of a Cloud SQL instance. - # @!attribute [rw] external_ip - # @return [::String] - # External IP address of a Cloud SQL instance. - # @!attribute [rw] region - # @return [::String] - # Region in which the Cloud SQL instance is running. - class CloudSQLInstanceInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # For display only. Metadata associated with a Cloud Redis Instance. - # @!attribute [rw] display_name - # @return [::String] - # Name of a Cloud Redis Instance. - # @!attribute [rw] uri - # @return [::String] - # URI of a Cloud Redis Instance. - # @!attribute [rw] network_uri - # @return [::String] - # URI of a Cloud Redis Instance network. - # @!attribute [rw] primary_endpoint_ip - # @return [::String] - # Primary endpoint IP address of a Cloud Redis Instance. - # @!attribute [rw] read_endpoint_ip - # @return [::String] - # Read endpoint IP address of a Cloud Redis Instance (if applicable). - # @!attribute [rw] region - # @return [::String] - # Region in which the Cloud Redis Instance is defined. - class RedisInstanceInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # For display only. Metadata associated with a Redis Cluster. - # @!attribute [rw] display_name - # @return [::String] - # Name of a Redis Cluster. - # @!attribute [rw] uri - # @return [::String] - # URI of a Redis Cluster in format - # "projects/\\{project_id}/locations/\\{location}/clusters/\\{cluster_id}" - # @!attribute [rw] network_uri - # @return [::String] - # URI of the network containing the Redis Cluster endpoints in format - # "projects/\\{project_id}/global/networks/\\{network_id}". - # @!attribute [rw] discovery_endpoint_ip_address - # @return [::String] - # Discovery endpoint IP address of a Redis Cluster. - # @!attribute [rw] secondary_endpoint_ip_address - # @return [::String] - # Secondary endpoint IP address of a Redis Cluster. - # @!attribute [rw] location - # @return [::String] - # Name of the region in which the Redis Cluster is defined. For example, - # "us-central1". - class RedisClusterInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # For display only. Metadata associated with a Cloud Function. - # @!attribute [rw] display_name - # @return [::String] - # Name of a Cloud Function. - # @!attribute [rw] uri - # @return [::String] - # URI of a Cloud Function. - # @!attribute [rw] location - # @return [::String] - # Location in which the Cloud Function is deployed. - # @!attribute [rw] version_id - # @return [::Integer] - # Latest successfully deployed version id of the Cloud Function. - class CloudFunctionInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # For display only. Metadata associated with a Cloud Run revision. - # @!attribute [rw] display_name - # @return [::String] - # Name of a Cloud Run revision. - # @!attribute [rw] uri - # @return [::String] - # URI of a Cloud Run revision. - # @!attribute [rw] location - # @return [::String] - # Location in which this revision is deployed. - # @!attribute [rw] service_uri - # @return [::String] - # URI of Cloud Run service this revision belongs to. - class CloudRunRevisionInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # For display only. Metadata associated with an App Engine version. - # @!attribute [rw] display_name - # @return [::String] - # Name of an App Engine version. - # @!attribute [rw] uri - # @return [::String] - # URI of an App Engine version. - # @!attribute [rw] runtime - # @return [::String] - # Runtime of the App Engine version. - # @!attribute [rw] environment - # @return [::String] - # App Engine execution environment for a version. - class AppEngineVersionInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # For display only. Metadata associated with a VPC connector. - # @!attribute [rw] display_name - # @return [::String] - # Name of a VPC connector. - # @!attribute [rw] uri - # @return [::String] - # URI of a VPC connector. - # @!attribute [rw] location - # @return [::String] - # Location in which the VPC connector is deployed. - class VpcConnectorInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # For display only. Metadata associated with a serverless direct VPC egress - # connection. - # @!attribute [rw] network_uri - # @return [::String] - # URI of direct access network. - # @!attribute [rw] subnetwork_uri - # @return [::String] - # URI of direct access subnetwork. - # @!attribute [rw] selected_ip_range - # @return [::String] - # Selected IP range. - # @!attribute [rw] selected_ip_address - # @return [::String] - # Selected starting IP address, from the selected IP range. - # @!attribute [rw] region - # @return [::String] - # Region in which the Direct VPC egress is deployed. - class DirectVpcEgressConnectionInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # For display only. Metadata associated with a serverless public connection. - # @!attribute [rw] selected_ip_address - # @return [::String] - # Selected starting IP address, from the Google dynamic address pool. - class ServerlessExternalConnectionInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # For display only. Metadata associated with NAT. - # @!attribute [rw] type - # @return [::Google::Cloud::NetworkManagement::V1::NatInfo::Type] - # Type of NAT. - # @!attribute [rw] protocol - # @return [::String] - # IP protocol in string format, for example: "TCP", "UDP", "ICMP". - # @!attribute [rw] network_uri - # @return [::String] - # URI of the network where NAT translation takes place. - # @!attribute [rw] old_source_ip - # @return [::String] - # Source IP address before NAT translation. - # @!attribute [rw] new_source_ip - # @return [::String] - # Source IP address after NAT translation. - # @!attribute [rw] old_destination_ip - # @return [::String] - # Destination IP address before NAT translation. - # @!attribute [rw] new_destination_ip - # @return [::String] - # Destination IP address after NAT translation. - # @!attribute [rw] old_source_port - # @return [::Integer] - # Source port before NAT translation. Only valid when protocol is TCP or UDP. - # @!attribute [rw] new_source_port - # @return [::Integer] - # Source port after NAT translation. Only valid when protocol is TCP or UDP. - # @!attribute [rw] old_destination_port - # @return [::Integer] - # Destination port before NAT translation. Only valid when protocol is TCP or - # UDP. - # @!attribute [rw] new_destination_port - # @return [::Integer] - # Destination port after NAT translation. Only valid when protocol is TCP or - # UDP. - # @!attribute [rw] router_uri - # @return [::String] - # Uri of the Cloud Router. Only valid when type is CLOUD_NAT. - # @!attribute [rw] nat_gateway_name - # @return [::String] - # The name of Cloud NAT Gateway. Only valid when type is CLOUD_NAT. - # @!attribute [rw] cloud_nat_gateway_type - # @return [::Google::Cloud::NetworkManagement::V1::NatInfo::CloudNatGatewayType] - # Type of Cloud NAT gateway. Only valid when `type` is CLOUD_NAT. - class NatInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Types of NAT. - module Type - # Type is unspecified. - TYPE_UNSPECIFIED = 0 - - # From Compute Engine instance's internal address to external address. - INTERNAL_TO_EXTERNAL = 1 - - # From Compute Engine instance's external address to internal address. - EXTERNAL_TO_INTERNAL = 2 - - # Cloud NAT Gateway. - CLOUD_NAT = 3 - - # Private service connect NAT. - PRIVATE_SERVICE_CONNECT = 4 - - # GKE Pod IP address masquerading. - GKE_POD_IP_MASQUERADING = 5 - end - - # Types of Cloud NAT gateway. - module CloudNatGatewayType - # Type is unspecified. - CLOUD_NAT_GATEWAY_TYPE_UNSPECIFIED = 0 - - # Public NAT gateway. - PUBLIC_NAT44 = 1 - - # Public NAT64 gateway. - PUBLIC_NAT64 = 2 - - # Private NAT gateway for NCC. - PRIVATE_NAT_NCC = 3 - - # Private NAT gateway for hybrid connectivity. - PRIVATE_NAT_HYBRID = 4 - - # Private NAT64 gateway. - PRIVATE_NAT64 = 5 - end - end - - # For display only. Metadata associated with ProxyConnection. - # @!attribute [rw] protocol - # @return [::String] - # IP protocol in string format, for example: "TCP", "UDP", "ICMP". - # @!attribute [rw] old_source_ip - # @return [::String] - # Source IP address of an original connection. - # @!attribute [rw] new_source_ip - # @return [::String] - # Source IP address of a new connection. - # @!attribute [rw] old_destination_ip - # @return [::String] - # Destination IP address of an original connection - # @!attribute [rw] new_destination_ip - # @return [::String] - # Destination IP address of a new connection. - # @!attribute [rw] old_source_port - # @return [::Integer] - # Source port of an original connection. Only valid when protocol is TCP or - # UDP. - # @!attribute [rw] new_source_port - # @return [::Integer] - # Source port of a new connection. Only valid when protocol is TCP or UDP. - # @!attribute [rw] old_destination_port - # @return [::Integer] - # Destination port of an original connection. Only valid when protocol is TCP - # or UDP. - # @!attribute [rw] new_destination_port - # @return [::Integer] - # Destination port of a new connection. Only valid when protocol is TCP or - # UDP. - # @!attribute [rw] subnet_uri - # @return [::String] - # Uri of proxy subnet. - # @!attribute [rw] network_uri - # @return [::String] - # URI of the network where connection is proxied. - class ProxyConnectionInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # For display only. Metadata associated with the load balancer backend. - # @!attribute [rw] name - # @return [::String] - # Display name of the backend. For example, it might be an instance name for - # the instance group backends, or an IP address and port for zonal network - # endpoint group backends. - # @!attribute [rw] instance_uri - # @return [::String] - # URI of the backend instance (if applicable). Populated for instance group - # backends, and zonal NEG backends. - # @!attribute [rw] backend_service_uri - # @return [::String] - # URI of the backend service this backend belongs to (if applicable). - # @!attribute [rw] instance_group_uri - # @return [::String] - # URI of the instance group this backend belongs to (if applicable). - # @!attribute [rw] network_endpoint_group_uri - # @return [::String] - # URI of the network endpoint group this backend belongs to (if applicable). - # @!attribute [rw] backend_bucket_uri - # @return [::String] - # URI of the backend bucket this backend targets (if applicable). - # @!attribute [rw] psc_service_attachment_uri - # @return [::String] - # URI of the PSC service attachment this PSC NEG backend targets (if - # applicable). - # @!attribute [rw] psc_google_api_target - # @return [::String] - # PSC Google API target this PSC NEG backend targets (if applicable). - # @!attribute [rw] health_check_uri - # @return [::String] - # URI of the health check attached to this backend (if applicable). - # @!attribute [r] health_check_firewalls_config_state - # @return [::Google::Cloud::NetworkManagement::V1::LoadBalancerBackendInfo::HealthCheckFirewallsConfigState] - # Output only. Health check firewalls configuration state for the backend. - # This is a result of the static firewall analysis (verifying that health - # check traffic from required IP ranges to the backend is allowed or not). - # The backend might still be unhealthy even if these firewalls are - # configured. Please refer to the documentation for more information: - # https://cloud.google.com/load-balancing/docs/firewall-rules - class LoadBalancerBackendInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Health check firewalls configuration state enum. - module HealthCheckFirewallsConfigState - # Configuration state unspecified. It usually means that the backend has - # no health check attached, or there was an unexpected configuration error - # preventing Connectivity tests from verifying health check configuration. - HEALTH_CHECK_FIREWALLS_CONFIG_STATE_UNSPECIFIED = 0 - - # Firewall rules (policies) allowing health check traffic from all required - # IP ranges to the backend are configured. - FIREWALLS_CONFIGURED = 1 - - # Firewall rules (policies) allow health check traffic only from a part of - # required IP ranges. - FIREWALLS_PARTIALLY_CONFIGURED = 2 - - # Firewall rules (policies) deny health check traffic from all required - # IP ranges to the backend. - FIREWALLS_NOT_CONFIGURED = 3 - - # The network contains firewall rules of unsupported types, so Connectivity - # tests were not able to verify health check configuration status. Please - # refer to the documentation for the list of unsupported configurations: - # https://cloud.google.com/network-intelligence-center/docs/connectivity-tests/concepts/overview#unsupported-configs - FIREWALLS_UNSUPPORTED = 4 - end - end - - # For display only. Metadata associated with Storage Bucket. - # @!attribute [rw] bucket - # @return [::String] - # Cloud Storage Bucket name. - class StorageBucketInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # For display only. Metadata associated with the serverless network endpoint - # group backend. - # @!attribute [rw] neg_uri - # @return [::String] - # URI of the serverless network endpoint group. - class ServerlessNegInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # For display only. Metadata associated with a layer 7 packet inspection by the - # firewall. - # @!attribute [rw] security_profile_group_uri - # @return [::String] - # URI of the security profile group associated with this firewall packet - # inspection. - class NgfwPacketInspectionInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Type of a load balancer. For more information, see [Summary of Google Cloud - # load - # balancers](https://cloud.google.com/load-balancing/docs/load-balancing-overview#summary-of-google-cloud-load-balancers). - module LoadBalancerType - # Forwarding rule points to a different target than a load balancer or a - # load balancer type is unknown. - LOAD_BALANCER_TYPE_UNSPECIFIED = 0 - - # Global external HTTP(S) load balancer. - HTTPS_ADVANCED_LOAD_BALANCER = 1 - - # Global external HTTP(S) load balancer (classic) - HTTPS_LOAD_BALANCER = 2 - - # Regional external HTTP(S) load balancer. - REGIONAL_HTTPS_LOAD_BALANCER = 3 - - # Internal HTTP(S) load balancer. - INTERNAL_HTTPS_LOAD_BALANCER = 4 - - # External SSL proxy load balancer. - SSL_PROXY_LOAD_BALANCER = 5 - - # External TCP proxy load balancer. - TCP_PROXY_LOAD_BALANCER = 6 - - # Internal regional TCP proxy load balancer. - INTERNAL_TCP_PROXY_LOAD_BALANCER = 7 - - # External TCP/UDP Network load balancer. - NETWORK_LOAD_BALANCER = 8 - - # Target-pool based external TCP/UDP Network load balancer. - LEGACY_NETWORK_LOAD_BALANCER = 9 - - # Internal TCP/UDP load balancer. - TCP_UDP_INTERNAL_LOAD_BALANCER = 10 - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-network_management-v1/proto_docs/google/cloud/networkmanagement/v1/vpc_flow_logs.rb b/owl-bot-staging/google-cloud-network_management-v1/proto_docs/google/cloud/networkmanagement/v1/vpc_flow_logs.rb deleted file mode 100644 index c3babe144944..000000000000 --- a/owl-bot-staging/google-cloud-network_management-v1/proto_docs/google/cloud/networkmanagement/v1/vpc_flow_logs.rb +++ /dev/null @@ -1,224 +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 NetworkManagement - module V1 - # Request for the `ListVpcFlowLogsConfigs` method. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent resource of the VpcFlowLogsConfig, - # in one of the following formats: - # - # - For project-level resources: `projects/{project_id}/locations/global` - # - # - For organization-level resources: - # `organizations/{organization_id}/locations/global` - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. Number of `VpcFlowLogsConfigs` to return. - # @!attribute [rw] page_token - # @return [::String] - # Optional. Page token from an earlier query, as returned in - # `next_page_token`. - # @!attribute [rw] filter - # @return [::String] - # Optional. Lists the `VpcFlowLogsConfigs` that match the filter expression. - # A filter expression must use the supported [CEL logic operators] - # (https://cloud.google.com/vpc/docs/about-flow-logs-records#supported_cel_logic_operators). - # @!attribute [rw] order_by - # @return [::String] - # Optional. Field to use to sort the list. - class ListVpcFlowLogsConfigsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response for the `ListVpcFlowLogsConfigs` method. - # @!attribute [rw] vpc_flow_logs_configs - # @return [::Array<::Google::Cloud::NetworkManagement::V1::VpcFlowLogsConfig>] - # List of VPC Flow Log configurations. - # @!attribute [rw] next_page_token - # @return [::String] - # Page token to fetch the next set of configurations. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Locations that could not be reached (when querying all locations with `-`). - class ListVpcFlowLogsConfigsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for the `GetVpcFlowLogsConfig` method. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the VpcFlowLogsConfig, - # in one of the following formats: - # - # - For project-level resources: - # `projects/{project_id}/locations/global/vpcFlowLogsConfigs/{vpc_flow_logs_config_id}` - # - # - For organization-level resources: - # `organizations/{organization_id}/locations/global/vpcFlowLogsConfigs/{vpc_flow_logs_config_id}` - class GetVpcFlowLogsConfigRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for the `CreateVpcFlowLogsConfig` method. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent resource of the VpcFlowLogsConfig to create, - # in one of the following formats: - # - # - For project-level resources: `projects/{project_id}/locations/global` - # - # - For organization-level resources: - # `organizations/{organization_id}/locations/global` - # @!attribute [rw] vpc_flow_logs_config_id - # @return [::String] - # Required. ID of the `VpcFlowLogsConfig`. - # @!attribute [rw] vpc_flow_logs_config - # @return [::Google::Cloud::NetworkManagement::V1::VpcFlowLogsConfig] - # Required. A `VpcFlowLogsConfig` resource - class CreateVpcFlowLogsConfigRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for the `UpdateVpcFlowLogsConfig` method. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. Mask of fields to update. At least one path must be supplied in - # this field. - # For example, to change the state of the configuration to ENABLED, specify - # `update_mask` = `"state"`, and the `vpc_flow_logs_config` would be: - # `vpc_flow_logs_config = { - # name = - # "projects/my-project/locations/global/vpcFlowLogsConfigs/my-config" - # state = "ENABLED" }` - # @!attribute [rw] vpc_flow_logs_config - # @return [::Google::Cloud::NetworkManagement::V1::VpcFlowLogsConfig] - # Required. Only fields specified in update_mask are updated. - class UpdateVpcFlowLogsConfigRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for the `DeleteVpcFlowLogsConfig` method. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the VpcFlowLogsConfig, - # in one of the following formats: - # - # - For a project-level resource: - # `projects/{project_id}/locations/global/vpcFlowLogsConfigs/{vpc_flow_logs_config_id}` - # - # - For an organization-level resource: - # `organizations/{organization_id}/locations/global/vpcFlowLogsConfigs/{vpc_flow_logs_config_id}` - class DeleteVpcFlowLogsConfigRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for the `QueryOrgVpcFlowLogsConfigs` method. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent resource of the VpcFlowLogsConfig, specified in - # the following format: `projects/{project_id}/locations/global` - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. Number of `VpcFlowLogsConfigs` to return. - # @!attribute [rw] page_token - # @return [::String] - # Optional. Page token from an earlier query, as returned in - # `next_page_token`. - # @!attribute [rw] filter - # @return [::String] - # Optional. Lists the `VpcFlowLogsConfigs` that match the filter expression. - # A filter expression must use the supported [CEL logic operators] - # (https://cloud.google.com/vpc/docs/about-flow-logs-records#supported_cel_logic_operators). - class QueryOrgVpcFlowLogsConfigsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response for the `QueryVpcFlowLogsConfigs` method. - # @!attribute [rw] vpc_flow_logs_configs - # @return [::Array<::Google::Cloud::NetworkManagement::V1::VpcFlowLogsConfig>] - # List of VPC Flow Log configurations. - # @!attribute [rw] next_page_token - # @return [::String] - # Page token to fetch the next set of configurations. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Locations that could not be reached (when querying all locations with `-`). - class QueryOrgVpcFlowLogsConfigsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for the `ShowEffectiveFlowLogsConfigs` method. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent resource of the VpcFlowLogsConfig, specified in - # the following format: `projects/{project_id}/locations/global` - # @!attribute [rw] resource - # @return [::String] - # Required. The resource to get the effective VPC Flow Logs configuration - # for. The resource must belong to the same project as the parent. The - # resource must be a network, subnetwork, interconnect attachment, VPN - # tunnel, or a project. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. Number of `EffectiveVpcFlowLogsConfigs` to return. Default is 30. - # @!attribute [rw] page_token - # @return [::String] - # Optional. Page token from an earlier query, as returned in - # `next_page_token`. - # @!attribute [rw] filter - # @return [::String] - # Optional. Lists the `EffectiveVpcFlowLogsConfigs` that match the filter - # expression. A filter expression must use the supported [CEL logic - # operators] - # (https://cloud.google.com/vpc/docs/about-flow-logs-records#supported_cel_logic_operators). - class ShowEffectiveFlowLogsConfigsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response for the `ShowEffectiveFlowLogsConfigs` method. - # @!attribute [rw] effective_flow_logs_configs - # @return [::Array<::Google::Cloud::NetworkManagement::V1::EffectiveVpcFlowLogsConfig>] - # List of Effective Vpc Flow Logs configurations. - # @!attribute [rw] next_page_token - # @return [::String] - # Page token to fetch the next set of configurations. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Locations that could not be reached (when querying all locations with `-`). - class ShowEffectiveFlowLogsConfigsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-network_management-v1/proto_docs/google/cloud/networkmanagement/v1/vpc_flow_logs_config.rb b/owl-bot-staging/google-cloud-network_management-v1/proto_docs/google/cloud/networkmanagement/v1/vpc_flow_logs_config.rb deleted file mode 100644 index 16d28d0a49dc..000000000000 --- a/owl-bot-staging/google-cloud-network_management-v1/proto_docs/google/cloud/networkmanagement/v1/vpc_flow_logs_config.rb +++ /dev/null @@ -1,312 +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 NetworkManagement - module V1 - # A configuration to generate VPC Flow Logs. - # @!attribute [rw] name - # @return [::String] - # Identifier. Unique name of the configuration. The name can have one of the - # following forms: - # - # - For project-level configurations: - # `projects/{project_id}/locations/global/vpcFlowLogsConfigs/{vpc_flow_logs_config_id}` - # - # - For organization-level configurations: - # `organizations/{organization_id}/locations/global/vpcFlowLogsConfigs/{vpc_flow_logs_config_id}` - # @!attribute [rw] description - # @return [::String] - # Optional. The user-supplied description of the VPC Flow Logs configuration. - # Maximum of 512 characters. - # @!attribute [rw] state - # @return [::Google::Cloud::NetworkManagement::V1::VpcFlowLogsConfig::State] - # Optional. The state of the VPC Flow Log configuration. Default value is - # ENABLED. When creating a new configuration, it must be enabled. Setting - # state=DISABLED will pause the log generation for this config. - # @!attribute [rw] aggregation_interval - # @return [::Google::Cloud::NetworkManagement::V1::VpcFlowLogsConfig::AggregationInterval] - # Optional. The aggregation interval for the logs. Default value is - # INTERVAL_5_SEC. - # @!attribute [rw] flow_sampling - # @return [::Float] - # Optional. The value of the field must be in (0, 1]. The sampling rate of - # VPC Flow Logs where 1.0 means all collected logs are reported. Setting the - # sampling rate to 0.0 is not allowed. If you want to disable VPC Flow Logs, - # use the state field instead. Default value is 1.0. - # @!attribute [rw] metadata - # @return [::Google::Cloud::NetworkManagement::V1::VpcFlowLogsConfig::Metadata] - # Optional. Configures whether all, none or a subset of metadata fields - # should be added to the reported VPC flow logs. Default value is - # INCLUDE_ALL_METADATA. - # @!attribute [rw] metadata_fields - # @return [::Array<::String>] - # Optional. Custom metadata fields to include in the reported VPC flow logs. - # Can only be specified if "metadata" was set to CUSTOM_METADATA. - # @!attribute [rw] filter_expr - # @return [::String] - # Optional. Export filter used to define which VPC Flow Logs should be - # logged. - # @!attribute [rw] cross_project_metadata - # @return [::Google::Cloud::NetworkManagement::V1::VpcFlowLogsConfig::CrossProjectMetadata] - # Optional. Determines whether to include cross project annotations in the - # logs. This field is available only for organization configurations. If not - # specified in org configs will be set to CROSS_PROJECT_METADATA_ENABLED. - # @!attribute [r] target_resource_state - # @return [::Google::Cloud::NetworkManagement::V1::VpcFlowLogsConfig::TargetResourceState] - # Output only. Describes the state of the configured target resource for - # diagnostic purposes. - # @!attribute [rw] network - # @return [::String] - # Traffic will be logged from VMs, VPN tunnels and Interconnect Attachments - # within the network. - # Format: projects/\\{project_id}/global/networks/\\{name} - # - # Note: The following fields are mutually exclusive: `network`, `subnet`, `interconnect_attachment`, `vpn_tunnel`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] subnet - # @return [::String] - # Traffic will be logged from VMs within the subnetwork. - # Format: projects/\\{project_id}/regions/\\{region}/subnetworks/\\{name} - # - # Note: The following fields are mutually exclusive: `subnet`, `network`, `interconnect_attachment`, `vpn_tunnel`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] interconnect_attachment - # @return [::String] - # Traffic will be logged from the Interconnect Attachment. - # Format: - # projects/\\{project_id}/regions/\\{region}/interconnectAttachments/\\{name} - # - # Note: The following fields are mutually exclusive: `interconnect_attachment`, `network`, `subnet`, `vpn_tunnel`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] vpn_tunnel - # @return [::String] - # Traffic will be logged from the VPN Tunnel. - # Format: projects/\\{project_id}/regions/\\{region}/vpnTunnels/\\{name} - # - # Note: The following fields are mutually exclusive: `vpn_tunnel`, `network`, `subnet`, `interconnect_attachment`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. Resource labels to represent user-provided metadata. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time the config was created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time the config was updated. - class VpcFlowLogsConfig - 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 - - # Determines whether this configuration will be generating logs. - module State - # If not specified, will default to ENABLED. - STATE_UNSPECIFIED = 0 - - # When ENABLED, this configuration will generate logs. - ENABLED = 1 - - # When DISABLED, this configuration will not generate logs. - DISABLED = 2 - end - - # Toggles the aggregation interval for collecting flow logs by 5-tuple. - module AggregationInterval - # If not specified, will default to INTERVAL_5_SEC. - AGGREGATION_INTERVAL_UNSPECIFIED = 0 - - # Aggregate logs in 5s intervals. - INTERVAL_5_SEC = 1 - - # Aggregate logs in 30s intervals. - INTERVAL_30_SEC = 2 - - # Aggregate logs in 1m intervals. - INTERVAL_1_MIN = 3 - - # Aggregate logs in 5m intervals. - INTERVAL_5_MIN = 4 - - # Aggregate logs in 10m intervals. - INTERVAL_10_MIN = 5 - - # Aggregate logs in 15m intervals. - INTERVAL_15_MIN = 6 - end - - # Configures which log fields would be included. - module Metadata - # If not specified, will default to INCLUDE_ALL_METADATA. - METADATA_UNSPECIFIED = 0 - - # Include all metadata fields. - INCLUDE_ALL_METADATA = 1 - - # Exclude all metadata fields. - EXCLUDE_ALL_METADATA = 2 - - # Include only custom fields (specified in metadata_fields). - CUSTOM_METADATA = 3 - end - - # Determines whether to include cross project annotations in the logs. - # Project configurations will always have CROSS_PROJECT_METADATA_DISABLED. - module CrossProjectMetadata - # If not specified, the default is CROSS_PROJECT_METADATA_ENABLED. - CROSS_PROJECT_METADATA_UNSPECIFIED = 0 - - # When CROSS_PROJECT_METADATA_ENABLED, metadata from other projects will be - # included in the logs. - CROSS_PROJECT_METADATA_ENABLED = 1 - - # When CROSS_PROJECT_METADATA_DISABLED, metadata from other projects will - # not be included in the logs. - CROSS_PROJECT_METADATA_DISABLED = 2 - end - - # Output only. Indicates whether the target resource exists, for diagnostic - # purposes. - module TargetResourceState - # Unspecified target resource state. - TARGET_RESOURCE_STATE_UNSPECIFIED = 0 - - # Indicates that the target resource exists. - TARGET_RESOURCE_EXISTS = 1 - - # Indicates that the target resource does not exist. - TARGET_RESOURCE_DOES_NOT_EXIST = 2 - end - end - - # A configuration to generate a response for GetEffectiveVpcFlowLogsConfig - # request. - # @!attribute [rw] name - # @return [::String] - # Unique name of the configuration. The name can have one of the following - # forms: - # - # - For project-level configurations: - # `projects/{project_id}/locations/global/vpcFlowLogsConfigs/{vpc_flow_logs_config_id}` - # - # - For organization-level configurations: - # `organizations/{organization_id}/locations/global/vpcFlowLogsConfigs/{vpc_flow_logs_config_id}` - # - # - For a Compute config, the name will be the path of the subnet: - # `projects/{project_id}/regions/{region}/subnetworks/{subnet_id}` - # @!attribute [rw] state - # @return [::Google::Cloud::NetworkManagement::V1::VpcFlowLogsConfig::State] - # The state of the VPC Flow Log configuration. Default value is ENABLED. - # When creating a new configuration, it must be enabled. - # Setting state=DISABLED will pause the log generation for this config. - # @!attribute [rw] aggregation_interval - # @return [::Google::Cloud::NetworkManagement::V1::VpcFlowLogsConfig::AggregationInterval] - # The aggregation interval for the logs. Default value is INTERVAL_5_SEC. - # @!attribute [rw] flow_sampling - # @return [::Float] - # The value of the field must be in (0, 1]. The sampling rate of VPC Flow - # Logs where 1.0 means all collected logs are reported. - # Setting the sampling rate to 0.0 is not allowed. If you want to disable VPC - # Flow Logs, use the state field instead. - # Default value is 1.0. - # @!attribute [rw] metadata - # @return [::Google::Cloud::NetworkManagement::V1::VpcFlowLogsConfig::Metadata] - # Configures whether all, none or a subset of metadata fields should be - # added to the reported VPC flow logs. - # Default value is INCLUDE_ALL_METADATA. - # @!attribute [rw] metadata_fields - # @return [::Array<::String>] - # Custom metadata fields to include in the reported VPC flow logs. - # Can only be specified if "metadata" was set to CUSTOM_METADATA. - # @!attribute [rw] filter_expr - # @return [::String] - # Export filter used to define which VPC Flow Logs should be logged. - # @!attribute [rw] cross_project_metadata - # @return [::Google::Cloud::NetworkManagement::V1::VpcFlowLogsConfig::CrossProjectMetadata] - # Determines whether to include cross project annotations in the logs. - # This field is available only for organization configurations. If not - # specified in org configs will be set to CROSS_PROJECT_METADATA_ENABLED. - # @!attribute [rw] network - # @return [::String] - # Traffic will be logged from VMs, VPN tunnels and Interconnect Attachments - # within the network. - # Format: projects/\\{project_id}/global/networks/\\{name} - # - # Note: The following fields are mutually exclusive: `network`, `subnet`, `interconnect_attachment`, `vpn_tunnel`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] subnet - # @return [::String] - # Traffic will be logged from VMs within the subnetwork. - # Format: projects/\\{project_id}/regions/\\{region}/subnetworks/\\{name} - # - # Note: The following fields are mutually exclusive: `subnet`, `network`, `interconnect_attachment`, `vpn_tunnel`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] interconnect_attachment - # @return [::String] - # Traffic will be logged from the Interconnect Attachment. - # Format: - # projects/\\{project_id}/regions/\\{region}/interconnectAttachments/\\{name} - # - # Note: The following fields are mutually exclusive: `interconnect_attachment`, `network`, `subnet`, `vpn_tunnel`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] vpn_tunnel - # @return [::String] - # Traffic will be logged from the VPN Tunnel. - # Format: projects/\\{project_id}/regions/\\{region}/vpnTunnels/\\{name} - # - # Note: The following fields are mutually exclusive: `vpn_tunnel`, `network`, `subnet`, `interconnect_attachment`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] scope - # @return [::Google::Cloud::NetworkManagement::V1::EffectiveVpcFlowLogsConfig::Scope] - # Specifies the scope of the config (e.g., SUBNET, NETWORK, ORGANIZATION..). - class EffectiveVpcFlowLogsConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The scope for this flow log configuration. - module Scope - # Scope is unspecified. - SCOPE_UNSPECIFIED = 0 - - # Target resource is a subnet (Network Management API). - SUBNET = 1 - - # Target resource is a subnet, and the config originates from the Compute - # API. - COMPUTE_API_SUBNET = 2 - - # Target resource is a network. - NETWORK = 3 - - # Target resource is a VPN tunnel. - VPN_TUNNEL = 4 - - # Target resource is an interconnect attachment. - INTERCONNECT_ATTACHMENT = 5 - - # Configuration applies to an entire organization. - ORGANIZATION = 6 - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-network_management-v1/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-cloud-network_management-v1/proto_docs/google/longrunning/operations.rb deleted file mode 100644 index 7a757f512165..000000000000 --- a/owl-bot-staging/google-cloud-network_management-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-network_management-v1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-network_management-v1/proto_docs/google/protobuf/any.rb deleted file mode 100644 index 58691995f02e..000000000000 --- a/owl-bot-staging/google-cloud-network_management-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-network_management-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-network_management-v1/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index ea59f1f91daf..000000000000 --- a/owl-bot-staging/google-cloud-network_management-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-network_management-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-network_management-v1/proto_docs/google/protobuf/empty.rb deleted file mode 100644 index 83e4481834a6..000000000000 --- a/owl-bot-staging/google-cloud-network_management-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-network_management-v1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-network_management-v1/proto_docs/google/protobuf/field_mask.rb deleted file mode 100644 index 7f3ffc78601a..000000000000 --- a/owl-bot-staging/google-cloud-network_management-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-network_management-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-network_management-v1/proto_docs/google/protobuf/timestamp.rb deleted file mode 100644 index 74352be9c58c..000000000000 --- a/owl-bot-staging/google-cloud-network_management-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-network_management-v1/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-network_management-v1/proto_docs/google/rpc/status.rb deleted file mode 100644 index c1a1c07eb2db..000000000000 --- a/owl-bot-staging/google-cloud-network_management-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-network_management-v1/proto_docs/google/type/expr.rb b/owl-bot-staging/google-cloud-network_management-v1/proto_docs/google/type/expr.rb deleted file mode 100644 index 53e7733b6592..000000000000 --- a/owl-bot-staging/google-cloud-network_management-v1/proto_docs/google/type/expr.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! - - -module Google - module Type - # Represents a textual expression in the Common Expression Language (CEL) - # syntax. CEL is a C-like expression language. The syntax and semantics of CEL - # are documented at https://github.com/google/cel-spec. - # - # Example (Comparison): - # - # title: "Summary size limit" - # description: "Determines if a summary is less than 100 chars" - # expression: "document.summary.size() < 100" - # - # Example (Equality): - # - # title: "Requestor is owner" - # description: "Determines if requestor is the document owner" - # expression: "document.owner == request.auth.claims.email" - # - # Example (Logic): - # - # title: "Public documents" - # description: "Determine whether the document should be publicly visible" - # expression: "document.type != 'private' && document.type != 'internal'" - # - # Example (Data Manipulation): - # - # title: "Notification string" - # description: "Create a notification string with a timestamp." - # expression: "'New message received at ' + string(document.create_time)" - # - # The exact variables and functions that may be referenced within an expression - # are determined by the service that evaluates it. See the service - # documentation for additional information. - # @!attribute [rw] expression - # @return [::String] - # Textual representation of an expression in Common Expression Language - # syntax. - # @!attribute [rw] title - # @return [::String] - # Optional. Title for the expression, i.e. a short string describing - # its purpose. This can be used e.g. in UIs which allow to enter the - # expression. - # @!attribute [rw] description - # @return [::String] - # Optional. Description of the expression. This is a longer text which - # describes the expression, e.g. when hovered over it in a UI. - # @!attribute [rw] location - # @return [::String] - # Optional. String indicating the location of the expression for error - # reporting, e.g. a file name and a position in the file. - class Expr - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-network_management-v1/snippets/Gemfile b/owl-bot-staging/google-cloud-network_management-v1/snippets/Gemfile deleted file mode 100644 index 0b6ee465b655..000000000000 --- a/owl-bot-staging/google-cloud-network_management-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-network_management-v1", path: "../" -else - gem "google-cloud-network_management-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-network_management-v1/snippets/organization_vpc_flow_logs_service/create_vpc_flow_logs_config.rb b/owl-bot-staging/google-cloud-network_management-v1/snippets/organization_vpc_flow_logs_service/create_vpc_flow_logs_config.rb deleted file mode 100644 index 9c633e926631..000000000000 --- a/owl-bot-staging/google-cloud-network_management-v1/snippets/organization_vpc_flow_logs_service/create_vpc_flow_logs_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 networkmanagement_v1_generated_OrganizationVpcFlowLogsService_CreateVpcFlowLogsConfig_sync] -require "google/cloud/network_management/v1" - -## -# Snippet for the create_vpc_flow_logs_config call in the OrganizationVpcFlowLogsService 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::NetworkManagement::V1::OrganizationVpcFlowLogsService::Client#create_vpc_flow_logs_config. -# -def create_vpc_flow_logs_config - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::NetworkManagement::V1::OrganizationVpcFlowLogsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::NetworkManagement::V1::CreateVpcFlowLogsConfigRequest.new - - # Call the create_vpc_flow_logs_config method. - result = client.create_vpc_flow_logs_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 networkmanagement_v1_generated_OrganizationVpcFlowLogsService_CreateVpcFlowLogsConfig_sync] diff --git a/owl-bot-staging/google-cloud-network_management-v1/snippets/organization_vpc_flow_logs_service/delete_vpc_flow_logs_config.rb b/owl-bot-staging/google-cloud-network_management-v1/snippets/organization_vpc_flow_logs_service/delete_vpc_flow_logs_config.rb deleted file mode 100644 index 9fcc13f907b3..000000000000 --- a/owl-bot-staging/google-cloud-network_management-v1/snippets/organization_vpc_flow_logs_service/delete_vpc_flow_logs_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 networkmanagement_v1_generated_OrganizationVpcFlowLogsService_DeleteVpcFlowLogsConfig_sync] -require "google/cloud/network_management/v1" - -## -# Snippet for the delete_vpc_flow_logs_config call in the OrganizationVpcFlowLogsService 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::NetworkManagement::V1::OrganizationVpcFlowLogsService::Client#delete_vpc_flow_logs_config. -# -def delete_vpc_flow_logs_config - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::NetworkManagement::V1::OrganizationVpcFlowLogsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::NetworkManagement::V1::DeleteVpcFlowLogsConfigRequest.new - - # Call the delete_vpc_flow_logs_config method. - result = client.delete_vpc_flow_logs_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 networkmanagement_v1_generated_OrganizationVpcFlowLogsService_DeleteVpcFlowLogsConfig_sync] diff --git a/owl-bot-staging/google-cloud-network_management-v1/snippets/organization_vpc_flow_logs_service/get_vpc_flow_logs_config.rb b/owl-bot-staging/google-cloud-network_management-v1/snippets/organization_vpc_flow_logs_service/get_vpc_flow_logs_config.rb deleted file mode 100644 index a6d8ebf8ef55..000000000000 --- a/owl-bot-staging/google-cloud-network_management-v1/snippets/organization_vpc_flow_logs_service/get_vpc_flow_logs_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 networkmanagement_v1_generated_OrganizationVpcFlowLogsService_GetVpcFlowLogsConfig_sync] -require "google/cloud/network_management/v1" - -## -# Snippet for the get_vpc_flow_logs_config call in the OrganizationVpcFlowLogsService 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::NetworkManagement::V1::OrganizationVpcFlowLogsService::Client#get_vpc_flow_logs_config. -# -def get_vpc_flow_logs_config - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::NetworkManagement::V1::OrganizationVpcFlowLogsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::NetworkManagement::V1::GetVpcFlowLogsConfigRequest.new - - # Call the get_vpc_flow_logs_config method. - result = client.get_vpc_flow_logs_config request - - # The returned object is of type Google::Cloud::NetworkManagement::V1::VpcFlowLogsConfig. - p result -end -# [END networkmanagement_v1_generated_OrganizationVpcFlowLogsService_GetVpcFlowLogsConfig_sync] diff --git a/owl-bot-staging/google-cloud-network_management-v1/snippets/organization_vpc_flow_logs_service/list_vpc_flow_logs_configs.rb b/owl-bot-staging/google-cloud-network_management-v1/snippets/organization_vpc_flow_logs_service/list_vpc_flow_logs_configs.rb deleted file mode 100644 index 8510a07760fe..000000000000 --- a/owl-bot-staging/google-cloud-network_management-v1/snippets/organization_vpc_flow_logs_service/list_vpc_flow_logs_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 networkmanagement_v1_generated_OrganizationVpcFlowLogsService_ListVpcFlowLogsConfigs_sync] -require "google/cloud/network_management/v1" - -## -# Snippet for the list_vpc_flow_logs_configs call in the OrganizationVpcFlowLogsService 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::NetworkManagement::V1::OrganizationVpcFlowLogsService::Client#list_vpc_flow_logs_configs. -# -def list_vpc_flow_logs_configs - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::NetworkManagement::V1::OrganizationVpcFlowLogsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::NetworkManagement::V1::ListVpcFlowLogsConfigsRequest.new - - # Call the list_vpc_flow_logs_configs method. - result = client.list_vpc_flow_logs_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::NetworkManagement::V1::VpcFlowLogsConfig. - p item - end -end -# [END networkmanagement_v1_generated_OrganizationVpcFlowLogsService_ListVpcFlowLogsConfigs_sync] diff --git a/owl-bot-staging/google-cloud-network_management-v1/snippets/organization_vpc_flow_logs_service/update_vpc_flow_logs_config.rb b/owl-bot-staging/google-cloud-network_management-v1/snippets/organization_vpc_flow_logs_service/update_vpc_flow_logs_config.rb deleted file mode 100644 index 20a60a6ebea7..000000000000 --- a/owl-bot-staging/google-cloud-network_management-v1/snippets/organization_vpc_flow_logs_service/update_vpc_flow_logs_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 networkmanagement_v1_generated_OrganizationVpcFlowLogsService_UpdateVpcFlowLogsConfig_sync] -require "google/cloud/network_management/v1" - -## -# Snippet for the update_vpc_flow_logs_config call in the OrganizationVpcFlowLogsService 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::NetworkManagement::V1::OrganizationVpcFlowLogsService::Client#update_vpc_flow_logs_config. -# -def update_vpc_flow_logs_config - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::NetworkManagement::V1::OrganizationVpcFlowLogsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::NetworkManagement::V1::UpdateVpcFlowLogsConfigRequest.new - - # Call the update_vpc_flow_logs_config method. - result = client.update_vpc_flow_logs_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 networkmanagement_v1_generated_OrganizationVpcFlowLogsService_UpdateVpcFlowLogsConfig_sync] diff --git a/owl-bot-staging/google-cloud-network_management-v1/snippets/reachability_service/create_connectivity_test.rb b/owl-bot-staging/google-cloud-network_management-v1/snippets/reachability_service/create_connectivity_test.rb deleted file mode 100644 index 21c2e041f623..000000000000 --- a/owl-bot-staging/google-cloud-network_management-v1/snippets/reachability_service/create_connectivity_test.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 networkmanagement_v1_generated_ReachabilityService_CreateConnectivityTest_sync] -require "google/cloud/network_management/v1" - -## -# Snippet for the create_connectivity_test call in the ReachabilityService 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::NetworkManagement::V1::ReachabilityService::Client#create_connectivity_test. -# -def create_connectivity_test - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::NetworkManagement::V1::ReachabilityService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::NetworkManagement::V1::CreateConnectivityTestRequest.new - - # Call the create_connectivity_test method. - result = client.create_connectivity_test 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 networkmanagement_v1_generated_ReachabilityService_CreateConnectivityTest_sync] diff --git a/owl-bot-staging/google-cloud-network_management-v1/snippets/reachability_service/delete_connectivity_test.rb b/owl-bot-staging/google-cloud-network_management-v1/snippets/reachability_service/delete_connectivity_test.rb deleted file mode 100644 index df1eedcd48ca..000000000000 --- a/owl-bot-staging/google-cloud-network_management-v1/snippets/reachability_service/delete_connectivity_test.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 networkmanagement_v1_generated_ReachabilityService_DeleteConnectivityTest_sync] -require "google/cloud/network_management/v1" - -## -# Snippet for the delete_connectivity_test call in the ReachabilityService 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::NetworkManagement::V1::ReachabilityService::Client#delete_connectivity_test. -# -def delete_connectivity_test - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::NetworkManagement::V1::ReachabilityService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::NetworkManagement::V1::DeleteConnectivityTestRequest.new - - # Call the delete_connectivity_test method. - result = client.delete_connectivity_test 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 networkmanagement_v1_generated_ReachabilityService_DeleteConnectivityTest_sync] diff --git a/owl-bot-staging/google-cloud-network_management-v1/snippets/reachability_service/get_connectivity_test.rb b/owl-bot-staging/google-cloud-network_management-v1/snippets/reachability_service/get_connectivity_test.rb deleted file mode 100644 index b30a43f9af1a..000000000000 --- a/owl-bot-staging/google-cloud-network_management-v1/snippets/reachability_service/get_connectivity_test.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 networkmanagement_v1_generated_ReachabilityService_GetConnectivityTest_sync] -require "google/cloud/network_management/v1" - -## -# Snippet for the get_connectivity_test call in the ReachabilityService 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::NetworkManagement::V1::ReachabilityService::Client#get_connectivity_test. -# -def get_connectivity_test - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::NetworkManagement::V1::ReachabilityService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::NetworkManagement::V1::GetConnectivityTestRequest.new - - # Call the get_connectivity_test method. - result = client.get_connectivity_test request - - # The returned object is of type Google::Cloud::NetworkManagement::V1::ConnectivityTest. - p result -end -# [END networkmanagement_v1_generated_ReachabilityService_GetConnectivityTest_sync] diff --git a/owl-bot-staging/google-cloud-network_management-v1/snippets/reachability_service/list_connectivity_tests.rb b/owl-bot-staging/google-cloud-network_management-v1/snippets/reachability_service/list_connectivity_tests.rb deleted file mode 100644 index 1cfcb6d7a3b9..000000000000 --- a/owl-bot-staging/google-cloud-network_management-v1/snippets/reachability_service/list_connectivity_tests.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 networkmanagement_v1_generated_ReachabilityService_ListConnectivityTests_sync] -require "google/cloud/network_management/v1" - -## -# Snippet for the list_connectivity_tests call in the ReachabilityService 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::NetworkManagement::V1::ReachabilityService::Client#list_connectivity_tests. -# -def list_connectivity_tests - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::NetworkManagement::V1::ReachabilityService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::NetworkManagement::V1::ListConnectivityTestsRequest.new - - # Call the list_connectivity_tests method. - result = client.list_connectivity_tests 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::NetworkManagement::V1::ConnectivityTest. - p item - end -end -# [END networkmanagement_v1_generated_ReachabilityService_ListConnectivityTests_sync] diff --git a/owl-bot-staging/google-cloud-network_management-v1/snippets/reachability_service/rerun_connectivity_test.rb b/owl-bot-staging/google-cloud-network_management-v1/snippets/reachability_service/rerun_connectivity_test.rb deleted file mode 100644 index 83f2373fa75f..000000000000 --- a/owl-bot-staging/google-cloud-network_management-v1/snippets/reachability_service/rerun_connectivity_test.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 networkmanagement_v1_generated_ReachabilityService_RerunConnectivityTest_sync] -require "google/cloud/network_management/v1" - -## -# Snippet for the rerun_connectivity_test call in the ReachabilityService 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::NetworkManagement::V1::ReachabilityService::Client#rerun_connectivity_test. -# -def rerun_connectivity_test - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::NetworkManagement::V1::ReachabilityService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::NetworkManagement::V1::RerunConnectivityTestRequest.new - - # Call the rerun_connectivity_test method. - result = client.rerun_connectivity_test 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 networkmanagement_v1_generated_ReachabilityService_RerunConnectivityTest_sync] diff --git a/owl-bot-staging/google-cloud-network_management-v1/snippets/reachability_service/update_connectivity_test.rb b/owl-bot-staging/google-cloud-network_management-v1/snippets/reachability_service/update_connectivity_test.rb deleted file mode 100644 index 46f847fcd050..000000000000 --- a/owl-bot-staging/google-cloud-network_management-v1/snippets/reachability_service/update_connectivity_test.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 networkmanagement_v1_generated_ReachabilityService_UpdateConnectivityTest_sync] -require "google/cloud/network_management/v1" - -## -# Snippet for the update_connectivity_test call in the ReachabilityService 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::NetworkManagement::V1::ReachabilityService::Client#update_connectivity_test. -# -def update_connectivity_test - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::NetworkManagement::V1::ReachabilityService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::NetworkManagement::V1::UpdateConnectivityTestRequest.new - - # Call the update_connectivity_test method. - result = client.update_connectivity_test 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 networkmanagement_v1_generated_ReachabilityService_UpdateConnectivityTest_sync] diff --git a/owl-bot-staging/google-cloud-network_management-v1/snippets/snippet_metadata_google.cloud.networkmanagement.v1.json b/owl-bot-staging/google-cloud-network_management-v1/snippets/snippet_metadata_google.cloud.networkmanagement.v1.json deleted file mode 100644 index eb7362dd7c3f..000000000000 --- a/owl-bot-staging/google-cloud-network_management-v1/snippets/snippet_metadata_google.cloud.networkmanagement.v1.json +++ /dev/null @@ -1,735 +0,0 @@ -{ - "client_library": { - "name": "google-cloud-network_management-v1", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "google.cloud.networkmanagement.v1", - "version": "v1" - } - ] - }, - "snippets": [ - { - "region_tag": "networkmanagement_v1_generated_ReachabilityService_ListConnectivityTests_sync", - "title": "Snippet for the list_connectivity_tests call in the ReachabilityService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkManagement::V1::ReachabilityService::Client#list_connectivity_tests.", - "file": "reachability_service/list_connectivity_tests.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_connectivity_tests", - "full_name": "::Google::Cloud::NetworkManagement::V1::ReachabilityService::Client#list_connectivity_tests", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::NetworkManagement::V1::ListConnectivityTestsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::NetworkManagement::V1::ListConnectivityTestsResponse", - "client": { - "short_name": "ReachabilityService::Client", - "full_name": "::Google::Cloud::NetworkManagement::V1::ReachabilityService::Client" - }, - "method": { - "short_name": "ListConnectivityTests", - "full_name": "google.cloud.networkmanagement.v1.ReachabilityService.ListConnectivityTests", - "service": { - "short_name": "ReachabilityService", - "full_name": "google.cloud.networkmanagement.v1.ReachabilityService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "networkmanagement_v1_generated_ReachabilityService_GetConnectivityTest_sync", - "title": "Snippet for the get_connectivity_test call in the ReachabilityService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkManagement::V1::ReachabilityService::Client#get_connectivity_test.", - "file": "reachability_service/get_connectivity_test.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_connectivity_test", - "full_name": "::Google::Cloud::NetworkManagement::V1::ReachabilityService::Client#get_connectivity_test", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::NetworkManagement::V1::GetConnectivityTestRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::NetworkManagement::V1::ConnectivityTest", - "client": { - "short_name": "ReachabilityService::Client", - "full_name": "::Google::Cloud::NetworkManagement::V1::ReachabilityService::Client" - }, - "method": { - "short_name": "GetConnectivityTest", - "full_name": "google.cloud.networkmanagement.v1.ReachabilityService.GetConnectivityTest", - "service": { - "short_name": "ReachabilityService", - "full_name": "google.cloud.networkmanagement.v1.ReachabilityService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "networkmanagement_v1_generated_ReachabilityService_CreateConnectivityTest_sync", - "title": "Snippet for the create_connectivity_test call in the ReachabilityService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkManagement::V1::ReachabilityService::Client#create_connectivity_test.", - "file": "reachability_service/create_connectivity_test.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_connectivity_test", - "full_name": "::Google::Cloud::NetworkManagement::V1::ReachabilityService::Client#create_connectivity_test", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::NetworkManagement::V1::CreateConnectivityTestRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "ReachabilityService::Client", - "full_name": "::Google::Cloud::NetworkManagement::V1::ReachabilityService::Client" - }, - "method": { - "short_name": "CreateConnectivityTest", - "full_name": "google.cloud.networkmanagement.v1.ReachabilityService.CreateConnectivityTest", - "service": { - "short_name": "ReachabilityService", - "full_name": "google.cloud.networkmanagement.v1.ReachabilityService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "networkmanagement_v1_generated_ReachabilityService_UpdateConnectivityTest_sync", - "title": "Snippet for the update_connectivity_test call in the ReachabilityService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkManagement::V1::ReachabilityService::Client#update_connectivity_test.", - "file": "reachability_service/update_connectivity_test.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_connectivity_test", - "full_name": "::Google::Cloud::NetworkManagement::V1::ReachabilityService::Client#update_connectivity_test", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::NetworkManagement::V1::UpdateConnectivityTestRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "ReachabilityService::Client", - "full_name": "::Google::Cloud::NetworkManagement::V1::ReachabilityService::Client" - }, - "method": { - "short_name": "UpdateConnectivityTest", - "full_name": "google.cloud.networkmanagement.v1.ReachabilityService.UpdateConnectivityTest", - "service": { - "short_name": "ReachabilityService", - "full_name": "google.cloud.networkmanagement.v1.ReachabilityService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "networkmanagement_v1_generated_ReachabilityService_RerunConnectivityTest_sync", - "title": "Snippet for the rerun_connectivity_test call in the ReachabilityService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkManagement::V1::ReachabilityService::Client#rerun_connectivity_test.", - "file": "reachability_service/rerun_connectivity_test.rb", - "language": "RUBY", - "client_method": { - "short_name": "rerun_connectivity_test", - "full_name": "::Google::Cloud::NetworkManagement::V1::ReachabilityService::Client#rerun_connectivity_test", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::NetworkManagement::V1::RerunConnectivityTestRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "ReachabilityService::Client", - "full_name": "::Google::Cloud::NetworkManagement::V1::ReachabilityService::Client" - }, - "method": { - "short_name": "RerunConnectivityTest", - "full_name": "google.cloud.networkmanagement.v1.ReachabilityService.RerunConnectivityTest", - "service": { - "short_name": "ReachabilityService", - "full_name": "google.cloud.networkmanagement.v1.ReachabilityService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "networkmanagement_v1_generated_ReachabilityService_DeleteConnectivityTest_sync", - "title": "Snippet for the delete_connectivity_test call in the ReachabilityService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkManagement::V1::ReachabilityService::Client#delete_connectivity_test.", - "file": "reachability_service/delete_connectivity_test.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_connectivity_test", - "full_name": "::Google::Cloud::NetworkManagement::V1::ReachabilityService::Client#delete_connectivity_test", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::NetworkManagement::V1::DeleteConnectivityTestRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "ReachabilityService::Client", - "full_name": "::Google::Cloud::NetworkManagement::V1::ReachabilityService::Client" - }, - "method": { - "short_name": "DeleteConnectivityTest", - "full_name": "google.cloud.networkmanagement.v1.ReachabilityService.DeleteConnectivityTest", - "service": { - "short_name": "ReachabilityService", - "full_name": "google.cloud.networkmanagement.v1.ReachabilityService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "networkmanagement_v1_generated_VpcFlowLogsService_ListVpcFlowLogsConfigs_sync", - "title": "Snippet for the list_vpc_flow_logs_configs call in the VpcFlowLogsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkManagement::V1::VpcFlowLogsService::Client#list_vpc_flow_logs_configs.", - "file": "vpc_flow_logs_service/list_vpc_flow_logs_configs.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_vpc_flow_logs_configs", - "full_name": "::Google::Cloud::NetworkManagement::V1::VpcFlowLogsService::Client#list_vpc_flow_logs_configs", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::NetworkManagement::V1::ListVpcFlowLogsConfigsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::NetworkManagement::V1::ListVpcFlowLogsConfigsResponse", - "client": { - "short_name": "VpcFlowLogsService::Client", - "full_name": "::Google::Cloud::NetworkManagement::V1::VpcFlowLogsService::Client" - }, - "method": { - "short_name": "ListVpcFlowLogsConfigs", - "full_name": "google.cloud.networkmanagement.v1.VpcFlowLogsService.ListVpcFlowLogsConfigs", - "service": { - "short_name": "VpcFlowLogsService", - "full_name": "google.cloud.networkmanagement.v1.VpcFlowLogsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "networkmanagement_v1_generated_VpcFlowLogsService_GetVpcFlowLogsConfig_sync", - "title": "Snippet for the get_vpc_flow_logs_config call in the VpcFlowLogsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkManagement::V1::VpcFlowLogsService::Client#get_vpc_flow_logs_config.", - "file": "vpc_flow_logs_service/get_vpc_flow_logs_config.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_vpc_flow_logs_config", - "full_name": "::Google::Cloud::NetworkManagement::V1::VpcFlowLogsService::Client#get_vpc_flow_logs_config", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::NetworkManagement::V1::GetVpcFlowLogsConfigRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::NetworkManagement::V1::VpcFlowLogsConfig", - "client": { - "short_name": "VpcFlowLogsService::Client", - "full_name": "::Google::Cloud::NetworkManagement::V1::VpcFlowLogsService::Client" - }, - "method": { - "short_name": "GetVpcFlowLogsConfig", - "full_name": "google.cloud.networkmanagement.v1.VpcFlowLogsService.GetVpcFlowLogsConfig", - "service": { - "short_name": "VpcFlowLogsService", - "full_name": "google.cloud.networkmanagement.v1.VpcFlowLogsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "networkmanagement_v1_generated_VpcFlowLogsService_CreateVpcFlowLogsConfig_sync", - "title": "Snippet for the create_vpc_flow_logs_config call in the VpcFlowLogsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkManagement::V1::VpcFlowLogsService::Client#create_vpc_flow_logs_config.", - "file": "vpc_flow_logs_service/create_vpc_flow_logs_config.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_vpc_flow_logs_config", - "full_name": "::Google::Cloud::NetworkManagement::V1::VpcFlowLogsService::Client#create_vpc_flow_logs_config", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::NetworkManagement::V1::CreateVpcFlowLogsConfigRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "VpcFlowLogsService::Client", - "full_name": "::Google::Cloud::NetworkManagement::V1::VpcFlowLogsService::Client" - }, - "method": { - "short_name": "CreateVpcFlowLogsConfig", - "full_name": "google.cloud.networkmanagement.v1.VpcFlowLogsService.CreateVpcFlowLogsConfig", - "service": { - "short_name": "VpcFlowLogsService", - "full_name": "google.cloud.networkmanagement.v1.VpcFlowLogsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "networkmanagement_v1_generated_VpcFlowLogsService_UpdateVpcFlowLogsConfig_sync", - "title": "Snippet for the update_vpc_flow_logs_config call in the VpcFlowLogsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkManagement::V1::VpcFlowLogsService::Client#update_vpc_flow_logs_config.", - "file": "vpc_flow_logs_service/update_vpc_flow_logs_config.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_vpc_flow_logs_config", - "full_name": "::Google::Cloud::NetworkManagement::V1::VpcFlowLogsService::Client#update_vpc_flow_logs_config", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::NetworkManagement::V1::UpdateVpcFlowLogsConfigRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "VpcFlowLogsService::Client", - "full_name": "::Google::Cloud::NetworkManagement::V1::VpcFlowLogsService::Client" - }, - "method": { - "short_name": "UpdateVpcFlowLogsConfig", - "full_name": "google.cloud.networkmanagement.v1.VpcFlowLogsService.UpdateVpcFlowLogsConfig", - "service": { - "short_name": "VpcFlowLogsService", - "full_name": "google.cloud.networkmanagement.v1.VpcFlowLogsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "networkmanagement_v1_generated_VpcFlowLogsService_DeleteVpcFlowLogsConfig_sync", - "title": "Snippet for the delete_vpc_flow_logs_config call in the VpcFlowLogsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkManagement::V1::VpcFlowLogsService::Client#delete_vpc_flow_logs_config.", - "file": "vpc_flow_logs_service/delete_vpc_flow_logs_config.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_vpc_flow_logs_config", - "full_name": "::Google::Cloud::NetworkManagement::V1::VpcFlowLogsService::Client#delete_vpc_flow_logs_config", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::NetworkManagement::V1::DeleteVpcFlowLogsConfigRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "VpcFlowLogsService::Client", - "full_name": "::Google::Cloud::NetworkManagement::V1::VpcFlowLogsService::Client" - }, - "method": { - "short_name": "DeleteVpcFlowLogsConfig", - "full_name": "google.cloud.networkmanagement.v1.VpcFlowLogsService.DeleteVpcFlowLogsConfig", - "service": { - "short_name": "VpcFlowLogsService", - "full_name": "google.cloud.networkmanagement.v1.VpcFlowLogsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "networkmanagement_v1_generated_VpcFlowLogsService_QueryOrgVpcFlowLogsConfigs_sync", - "title": "Snippet for the query_org_vpc_flow_logs_configs call in the VpcFlowLogsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkManagement::V1::VpcFlowLogsService::Client#query_org_vpc_flow_logs_configs.", - "file": "vpc_flow_logs_service/query_org_vpc_flow_logs_configs.rb", - "language": "RUBY", - "client_method": { - "short_name": "query_org_vpc_flow_logs_configs", - "full_name": "::Google::Cloud::NetworkManagement::V1::VpcFlowLogsService::Client#query_org_vpc_flow_logs_configs", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::NetworkManagement::V1::QueryOrgVpcFlowLogsConfigsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::NetworkManagement::V1::QueryOrgVpcFlowLogsConfigsResponse", - "client": { - "short_name": "VpcFlowLogsService::Client", - "full_name": "::Google::Cloud::NetworkManagement::V1::VpcFlowLogsService::Client" - }, - "method": { - "short_name": "QueryOrgVpcFlowLogsConfigs", - "full_name": "google.cloud.networkmanagement.v1.VpcFlowLogsService.QueryOrgVpcFlowLogsConfigs", - "service": { - "short_name": "VpcFlowLogsService", - "full_name": "google.cloud.networkmanagement.v1.VpcFlowLogsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "networkmanagement_v1_generated_VpcFlowLogsService_ShowEffectiveFlowLogsConfigs_sync", - "title": "Snippet for the show_effective_flow_logs_configs call in the VpcFlowLogsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkManagement::V1::VpcFlowLogsService::Client#show_effective_flow_logs_configs.", - "file": "vpc_flow_logs_service/show_effective_flow_logs_configs.rb", - "language": "RUBY", - "client_method": { - "short_name": "show_effective_flow_logs_configs", - "full_name": "::Google::Cloud::NetworkManagement::V1::VpcFlowLogsService::Client#show_effective_flow_logs_configs", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::NetworkManagement::V1::ShowEffectiveFlowLogsConfigsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::NetworkManagement::V1::ShowEffectiveFlowLogsConfigsResponse", - "client": { - "short_name": "VpcFlowLogsService::Client", - "full_name": "::Google::Cloud::NetworkManagement::V1::VpcFlowLogsService::Client" - }, - "method": { - "short_name": "ShowEffectiveFlowLogsConfigs", - "full_name": "google.cloud.networkmanagement.v1.VpcFlowLogsService.ShowEffectiveFlowLogsConfigs", - "service": { - "short_name": "VpcFlowLogsService", - "full_name": "google.cloud.networkmanagement.v1.VpcFlowLogsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "networkmanagement_v1_generated_OrganizationVpcFlowLogsService_ListVpcFlowLogsConfigs_sync", - "title": "Snippet for the list_vpc_flow_logs_configs call in the OrganizationVpcFlowLogsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkManagement::V1::OrganizationVpcFlowLogsService::Client#list_vpc_flow_logs_configs.", - "file": "organization_vpc_flow_logs_service/list_vpc_flow_logs_configs.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_vpc_flow_logs_configs", - "full_name": "::Google::Cloud::NetworkManagement::V1::OrganizationVpcFlowLogsService::Client#list_vpc_flow_logs_configs", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::NetworkManagement::V1::ListVpcFlowLogsConfigsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::NetworkManagement::V1::ListVpcFlowLogsConfigsResponse", - "client": { - "short_name": "OrganizationVpcFlowLogsService::Client", - "full_name": "::Google::Cloud::NetworkManagement::V1::OrganizationVpcFlowLogsService::Client" - }, - "method": { - "short_name": "ListVpcFlowLogsConfigs", - "full_name": "google.cloud.networkmanagement.v1.OrganizationVpcFlowLogsService.ListVpcFlowLogsConfigs", - "service": { - "short_name": "OrganizationVpcFlowLogsService", - "full_name": "google.cloud.networkmanagement.v1.OrganizationVpcFlowLogsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "networkmanagement_v1_generated_OrganizationVpcFlowLogsService_GetVpcFlowLogsConfig_sync", - "title": "Snippet for the get_vpc_flow_logs_config call in the OrganizationVpcFlowLogsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkManagement::V1::OrganizationVpcFlowLogsService::Client#get_vpc_flow_logs_config.", - "file": "organization_vpc_flow_logs_service/get_vpc_flow_logs_config.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_vpc_flow_logs_config", - "full_name": "::Google::Cloud::NetworkManagement::V1::OrganizationVpcFlowLogsService::Client#get_vpc_flow_logs_config", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::NetworkManagement::V1::GetVpcFlowLogsConfigRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::NetworkManagement::V1::VpcFlowLogsConfig", - "client": { - "short_name": "OrganizationVpcFlowLogsService::Client", - "full_name": "::Google::Cloud::NetworkManagement::V1::OrganizationVpcFlowLogsService::Client" - }, - "method": { - "short_name": "GetVpcFlowLogsConfig", - "full_name": "google.cloud.networkmanagement.v1.OrganizationVpcFlowLogsService.GetVpcFlowLogsConfig", - "service": { - "short_name": "OrganizationVpcFlowLogsService", - "full_name": "google.cloud.networkmanagement.v1.OrganizationVpcFlowLogsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "networkmanagement_v1_generated_OrganizationVpcFlowLogsService_CreateVpcFlowLogsConfig_sync", - "title": "Snippet for the create_vpc_flow_logs_config call in the OrganizationVpcFlowLogsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkManagement::V1::OrganizationVpcFlowLogsService::Client#create_vpc_flow_logs_config.", - "file": "organization_vpc_flow_logs_service/create_vpc_flow_logs_config.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_vpc_flow_logs_config", - "full_name": "::Google::Cloud::NetworkManagement::V1::OrganizationVpcFlowLogsService::Client#create_vpc_flow_logs_config", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::NetworkManagement::V1::CreateVpcFlowLogsConfigRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "OrganizationVpcFlowLogsService::Client", - "full_name": "::Google::Cloud::NetworkManagement::V1::OrganizationVpcFlowLogsService::Client" - }, - "method": { - "short_name": "CreateVpcFlowLogsConfig", - "full_name": "google.cloud.networkmanagement.v1.OrganizationVpcFlowLogsService.CreateVpcFlowLogsConfig", - "service": { - "short_name": "OrganizationVpcFlowLogsService", - "full_name": "google.cloud.networkmanagement.v1.OrganizationVpcFlowLogsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "networkmanagement_v1_generated_OrganizationVpcFlowLogsService_UpdateVpcFlowLogsConfig_sync", - "title": "Snippet for the update_vpc_flow_logs_config call in the OrganizationVpcFlowLogsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkManagement::V1::OrganizationVpcFlowLogsService::Client#update_vpc_flow_logs_config.", - "file": "organization_vpc_flow_logs_service/update_vpc_flow_logs_config.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_vpc_flow_logs_config", - "full_name": "::Google::Cloud::NetworkManagement::V1::OrganizationVpcFlowLogsService::Client#update_vpc_flow_logs_config", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::NetworkManagement::V1::UpdateVpcFlowLogsConfigRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "OrganizationVpcFlowLogsService::Client", - "full_name": "::Google::Cloud::NetworkManagement::V1::OrganizationVpcFlowLogsService::Client" - }, - "method": { - "short_name": "UpdateVpcFlowLogsConfig", - "full_name": "google.cloud.networkmanagement.v1.OrganizationVpcFlowLogsService.UpdateVpcFlowLogsConfig", - "service": { - "short_name": "OrganizationVpcFlowLogsService", - "full_name": "google.cloud.networkmanagement.v1.OrganizationVpcFlowLogsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "networkmanagement_v1_generated_OrganizationVpcFlowLogsService_DeleteVpcFlowLogsConfig_sync", - "title": "Snippet for the delete_vpc_flow_logs_config call in the OrganizationVpcFlowLogsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkManagement::V1::OrganizationVpcFlowLogsService::Client#delete_vpc_flow_logs_config.", - "file": "organization_vpc_flow_logs_service/delete_vpc_flow_logs_config.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_vpc_flow_logs_config", - "full_name": "::Google::Cloud::NetworkManagement::V1::OrganizationVpcFlowLogsService::Client#delete_vpc_flow_logs_config", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::NetworkManagement::V1::DeleteVpcFlowLogsConfigRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "OrganizationVpcFlowLogsService::Client", - "full_name": "::Google::Cloud::NetworkManagement::V1::OrganizationVpcFlowLogsService::Client" - }, - "method": { - "short_name": "DeleteVpcFlowLogsConfig", - "full_name": "google.cloud.networkmanagement.v1.OrganizationVpcFlowLogsService.DeleteVpcFlowLogsConfig", - "service": { - "short_name": "OrganizationVpcFlowLogsService", - "full_name": "google.cloud.networkmanagement.v1.OrganizationVpcFlowLogsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - } - ] -} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-network_management-v1/snippets/vpc_flow_logs_service/create_vpc_flow_logs_config.rb b/owl-bot-staging/google-cloud-network_management-v1/snippets/vpc_flow_logs_service/create_vpc_flow_logs_config.rb deleted file mode 100644 index 30a78d9aed8c..000000000000 --- a/owl-bot-staging/google-cloud-network_management-v1/snippets/vpc_flow_logs_service/create_vpc_flow_logs_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 networkmanagement_v1_generated_VpcFlowLogsService_CreateVpcFlowLogsConfig_sync] -require "google/cloud/network_management/v1" - -## -# Snippet for the create_vpc_flow_logs_config call in the VpcFlowLogsService 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::NetworkManagement::V1::VpcFlowLogsService::Client#create_vpc_flow_logs_config. -# -def create_vpc_flow_logs_config - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::NetworkManagement::V1::VpcFlowLogsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::NetworkManagement::V1::CreateVpcFlowLogsConfigRequest.new - - # Call the create_vpc_flow_logs_config method. - result = client.create_vpc_flow_logs_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 networkmanagement_v1_generated_VpcFlowLogsService_CreateVpcFlowLogsConfig_sync] diff --git a/owl-bot-staging/google-cloud-network_management-v1/snippets/vpc_flow_logs_service/delete_vpc_flow_logs_config.rb b/owl-bot-staging/google-cloud-network_management-v1/snippets/vpc_flow_logs_service/delete_vpc_flow_logs_config.rb deleted file mode 100644 index 51c13a0ef243..000000000000 --- a/owl-bot-staging/google-cloud-network_management-v1/snippets/vpc_flow_logs_service/delete_vpc_flow_logs_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 networkmanagement_v1_generated_VpcFlowLogsService_DeleteVpcFlowLogsConfig_sync] -require "google/cloud/network_management/v1" - -## -# Snippet for the delete_vpc_flow_logs_config call in the VpcFlowLogsService 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::NetworkManagement::V1::VpcFlowLogsService::Client#delete_vpc_flow_logs_config. -# -def delete_vpc_flow_logs_config - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::NetworkManagement::V1::VpcFlowLogsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::NetworkManagement::V1::DeleteVpcFlowLogsConfigRequest.new - - # Call the delete_vpc_flow_logs_config method. - result = client.delete_vpc_flow_logs_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 networkmanagement_v1_generated_VpcFlowLogsService_DeleteVpcFlowLogsConfig_sync] diff --git a/owl-bot-staging/google-cloud-network_management-v1/snippets/vpc_flow_logs_service/get_vpc_flow_logs_config.rb b/owl-bot-staging/google-cloud-network_management-v1/snippets/vpc_flow_logs_service/get_vpc_flow_logs_config.rb deleted file mode 100644 index 8d8c03008f82..000000000000 --- a/owl-bot-staging/google-cloud-network_management-v1/snippets/vpc_flow_logs_service/get_vpc_flow_logs_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 networkmanagement_v1_generated_VpcFlowLogsService_GetVpcFlowLogsConfig_sync] -require "google/cloud/network_management/v1" - -## -# Snippet for the get_vpc_flow_logs_config call in the VpcFlowLogsService 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::NetworkManagement::V1::VpcFlowLogsService::Client#get_vpc_flow_logs_config. -# -def get_vpc_flow_logs_config - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::NetworkManagement::V1::VpcFlowLogsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::NetworkManagement::V1::GetVpcFlowLogsConfigRequest.new - - # Call the get_vpc_flow_logs_config method. - result = client.get_vpc_flow_logs_config request - - # The returned object is of type Google::Cloud::NetworkManagement::V1::VpcFlowLogsConfig. - p result -end -# [END networkmanagement_v1_generated_VpcFlowLogsService_GetVpcFlowLogsConfig_sync] diff --git a/owl-bot-staging/google-cloud-network_management-v1/snippets/vpc_flow_logs_service/list_vpc_flow_logs_configs.rb b/owl-bot-staging/google-cloud-network_management-v1/snippets/vpc_flow_logs_service/list_vpc_flow_logs_configs.rb deleted file mode 100644 index 9587077a8704..000000000000 --- a/owl-bot-staging/google-cloud-network_management-v1/snippets/vpc_flow_logs_service/list_vpc_flow_logs_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 networkmanagement_v1_generated_VpcFlowLogsService_ListVpcFlowLogsConfigs_sync] -require "google/cloud/network_management/v1" - -## -# Snippet for the list_vpc_flow_logs_configs call in the VpcFlowLogsService 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::NetworkManagement::V1::VpcFlowLogsService::Client#list_vpc_flow_logs_configs. -# -def list_vpc_flow_logs_configs - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::NetworkManagement::V1::VpcFlowLogsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::NetworkManagement::V1::ListVpcFlowLogsConfigsRequest.new - - # Call the list_vpc_flow_logs_configs method. - result = client.list_vpc_flow_logs_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::NetworkManagement::V1::VpcFlowLogsConfig. - p item - end -end -# [END networkmanagement_v1_generated_VpcFlowLogsService_ListVpcFlowLogsConfigs_sync] diff --git a/owl-bot-staging/google-cloud-network_management-v1/snippets/vpc_flow_logs_service/query_org_vpc_flow_logs_configs.rb b/owl-bot-staging/google-cloud-network_management-v1/snippets/vpc_flow_logs_service/query_org_vpc_flow_logs_configs.rb deleted file mode 100644 index 549bd301b646..000000000000 --- a/owl-bot-staging/google-cloud-network_management-v1/snippets/vpc_flow_logs_service/query_org_vpc_flow_logs_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 networkmanagement_v1_generated_VpcFlowLogsService_QueryOrgVpcFlowLogsConfigs_sync] -require "google/cloud/network_management/v1" - -## -# Snippet for the query_org_vpc_flow_logs_configs call in the VpcFlowLogsService 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::NetworkManagement::V1::VpcFlowLogsService::Client#query_org_vpc_flow_logs_configs. -# -def query_org_vpc_flow_logs_configs - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::NetworkManagement::V1::VpcFlowLogsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::NetworkManagement::V1::QueryOrgVpcFlowLogsConfigsRequest.new - - # Call the query_org_vpc_flow_logs_configs method. - result = client.query_org_vpc_flow_logs_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::NetworkManagement::V1::VpcFlowLogsConfig. - p item - end -end -# [END networkmanagement_v1_generated_VpcFlowLogsService_QueryOrgVpcFlowLogsConfigs_sync] diff --git a/owl-bot-staging/google-cloud-network_management-v1/snippets/vpc_flow_logs_service/show_effective_flow_logs_configs.rb b/owl-bot-staging/google-cloud-network_management-v1/snippets/vpc_flow_logs_service/show_effective_flow_logs_configs.rb deleted file mode 100644 index a1bacbc41c68..000000000000 --- a/owl-bot-staging/google-cloud-network_management-v1/snippets/vpc_flow_logs_service/show_effective_flow_logs_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 networkmanagement_v1_generated_VpcFlowLogsService_ShowEffectiveFlowLogsConfigs_sync] -require "google/cloud/network_management/v1" - -## -# Snippet for the show_effective_flow_logs_configs call in the VpcFlowLogsService 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::NetworkManagement::V1::VpcFlowLogsService::Client#show_effective_flow_logs_configs. -# -def show_effective_flow_logs_configs - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::NetworkManagement::V1::VpcFlowLogsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::NetworkManagement::V1::ShowEffectiveFlowLogsConfigsRequest.new - - # Call the show_effective_flow_logs_configs method. - result = client.show_effective_flow_logs_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::NetworkManagement::V1::EffectiveVpcFlowLogsConfig. - p item - end -end -# [END networkmanagement_v1_generated_VpcFlowLogsService_ShowEffectiveFlowLogsConfigs_sync] diff --git a/owl-bot-staging/google-cloud-network_management-v1/snippets/vpc_flow_logs_service/update_vpc_flow_logs_config.rb b/owl-bot-staging/google-cloud-network_management-v1/snippets/vpc_flow_logs_service/update_vpc_flow_logs_config.rb deleted file mode 100644 index 7b75358df2b0..000000000000 --- a/owl-bot-staging/google-cloud-network_management-v1/snippets/vpc_flow_logs_service/update_vpc_flow_logs_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 networkmanagement_v1_generated_VpcFlowLogsService_UpdateVpcFlowLogsConfig_sync] -require "google/cloud/network_management/v1" - -## -# Snippet for the update_vpc_flow_logs_config call in the VpcFlowLogsService 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::NetworkManagement::V1::VpcFlowLogsService::Client#update_vpc_flow_logs_config. -# -def update_vpc_flow_logs_config - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::NetworkManagement::V1::VpcFlowLogsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::NetworkManagement::V1::UpdateVpcFlowLogsConfigRequest.new - - # Call the update_vpc_flow_logs_config method. - result = client.update_vpc_flow_logs_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 networkmanagement_v1_generated_VpcFlowLogsService_UpdateVpcFlowLogsConfig_sync] diff --git a/owl-bot-staging/google-cloud-network_management-v1/test/google/cloud/network_management/v1/organization_vpc_flow_logs_service_operations_test.rb b/owl-bot-staging/google-cloud-network_management-v1/test/google/cloud/network_management/v1/organization_vpc_flow_logs_service_operations_test.rb deleted file mode 100644 index a448fb1f440a..000000000000 --- a/owl-bot-staging/google-cloud-network_management-v1/test/google/cloud/network_management/v1/organization_vpc_flow_logs_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/networkmanagement/v1/vpc_flow_logs_pb" -require "google/cloud/networkmanagement/v1/vpc_flow_logs_services_pb" -require "google/cloud/network_management/v1/organization_vpc_flow_logs_service" - -class ::Google::Cloud::NetworkManagement::V1::OrganizationVpcFlowLogsService::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::NetworkManagement::V1::OrganizationVpcFlowLogsService::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::NetworkManagement::V1::OrganizationVpcFlowLogsService::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::NetworkManagement::V1::OrganizationVpcFlowLogsService::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::NetworkManagement::V1::OrganizationVpcFlowLogsService::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::NetworkManagement::V1::OrganizationVpcFlowLogsService::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::NetworkManagement::V1::OrganizationVpcFlowLogsService::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::NetworkManagement::V1::OrganizationVpcFlowLogsService::Operations::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-network_management-v1/test/google/cloud/network_management/v1/organization_vpc_flow_logs_service_paths_test.rb b/owl-bot-staging/google-cloud-network_management-v1/test/google/cloud/network_management/v1/organization_vpc_flow_logs_service_paths_test.rb deleted file mode 100644 index 11252bd84220..000000000000 --- a/owl-bot-staging/google-cloud-network_management-v1/test/google/cloud/network_management/v1/organization_vpc_flow_logs_service_paths_test.rb +++ /dev/null @@ -1,82 +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/network_management/v1/organization_vpc_flow_logs_service" - -class ::Google::Cloud::NetworkManagement::V1::OrganizationVpcFlowLogsService::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_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::NetworkManagement::V1::OrganizationVpcFlowLogsService::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_organization_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::NetworkManagement::V1::OrganizationVpcFlowLogsService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.organization_location_path organization: "value0", location: "value1" - assert_equal "organizations/value0/locations/value1", path - end - end - - def test_vpc_flow_logs_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::NetworkManagement::V1::OrganizationVpcFlowLogsService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.vpc_flow_logs_config_path project: "value0", location: "value1", vpc_flow_logs_config: "value2" - assert_equal "projects/value0/locations/value1/vpcFlowLogsConfigs/value2", path - - path = client.vpc_flow_logs_config_path organization: "value0", location: "value1", vpc_flow_logs_config: "value2" - assert_equal "organizations/value0/locations/value1/vpcFlowLogsConfigs/value2", path - end - end -end diff --git a/owl-bot-staging/google-cloud-network_management-v1/test/google/cloud/network_management/v1/organization_vpc_flow_logs_service_rest_test.rb b/owl-bot-staging/google-cloud-network_management-v1/test/google/cloud/network_management/v1/organization_vpc_flow_logs_service_rest_test.rb deleted file mode 100644 index ec569eb321c0..000000000000 --- a/owl-bot-staging/google-cloud-network_management-v1/test/google/cloud/network_management/v1/organization_vpc_flow_logs_service_rest_test.rb +++ /dev/null @@ -1,376 +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/networkmanagement/v1/vpc_flow_logs_pb" -require "google/cloud/network_management/v1/organization_vpc_flow_logs_service/rest" - - -class ::Google::Cloud::NetworkManagement::V1::OrganizationVpcFlowLogsService::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_vpc_flow_logs_configs - # Create test objects. - client_result = ::Google::Cloud::NetworkManagement::V1::ListVpcFlowLogsConfigsResponse.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_vpc_flow_logs_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::NetworkManagement::V1::OrganizationVpcFlowLogsService::Rest::ServiceStub.stub :transcode_list_vpc_flow_logs_configs_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_vpc_flow_logs_configs_client_stub do - # Create client - client = ::Google::Cloud::NetworkManagement::V1::OrganizationVpcFlowLogsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_vpc_flow_logs_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_vpc_flow_logs_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_vpc_flow_logs_configs ::Google::Cloud::NetworkManagement::V1::ListVpcFlowLogsConfigsRequest.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_vpc_flow_logs_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_vpc_flow_logs_configs(::Google::Cloud::NetworkManagement::V1::ListVpcFlowLogsConfigsRequest.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_vpc_flow_logs_configs_client_stub.call_count - end - end - end - - def test_get_vpc_flow_logs_config - # Create test objects. - client_result = ::Google::Cloud::NetworkManagement::V1::VpcFlowLogsConfig.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_vpc_flow_logs_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::NetworkManagement::V1::OrganizationVpcFlowLogsService::Rest::ServiceStub.stub :transcode_get_vpc_flow_logs_config_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_vpc_flow_logs_config_client_stub do - # Create client - client = ::Google::Cloud::NetworkManagement::V1::OrganizationVpcFlowLogsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_vpc_flow_logs_config({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_vpc_flow_logs_config name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_vpc_flow_logs_config ::Google::Cloud::NetworkManagement::V1::GetVpcFlowLogsConfigRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_vpc_flow_logs_config({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_vpc_flow_logs_config(::Google::Cloud::NetworkManagement::V1::GetVpcFlowLogsConfigRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_vpc_flow_logs_config_client_stub.call_count - end - end - end - - def test_create_vpc_flow_logs_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" - vpc_flow_logs_config_id = "hello world" - vpc_flow_logs_config = {} - - create_vpc_flow_logs_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::NetworkManagement::V1::OrganizationVpcFlowLogsService::Rest::ServiceStub.stub :transcode_create_vpc_flow_logs_config_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_vpc_flow_logs_config_client_stub do - # Create client - client = ::Google::Cloud::NetworkManagement::V1::OrganizationVpcFlowLogsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_vpc_flow_logs_config({ parent: parent, vpc_flow_logs_config_id: vpc_flow_logs_config_id, vpc_flow_logs_config: vpc_flow_logs_config }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_vpc_flow_logs_config parent: parent, vpc_flow_logs_config_id: vpc_flow_logs_config_id, vpc_flow_logs_config: vpc_flow_logs_config do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_vpc_flow_logs_config ::Google::Cloud::NetworkManagement::V1::CreateVpcFlowLogsConfigRequest.new(parent: parent, vpc_flow_logs_config_id: vpc_flow_logs_config_id, vpc_flow_logs_config: vpc_flow_logs_config) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_vpc_flow_logs_config({ parent: parent, vpc_flow_logs_config_id: vpc_flow_logs_config_id, vpc_flow_logs_config: vpc_flow_logs_config }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_vpc_flow_logs_config(::Google::Cloud::NetworkManagement::V1::CreateVpcFlowLogsConfigRequest.new(parent: parent, vpc_flow_logs_config_id: vpc_flow_logs_config_id, vpc_flow_logs_config: vpc_flow_logs_config), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_vpc_flow_logs_config_client_stub.call_count - end - end - end - - def test_update_vpc_flow_logs_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. - update_mask = {} - vpc_flow_logs_config = {} - - update_vpc_flow_logs_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::NetworkManagement::V1::OrganizationVpcFlowLogsService::Rest::ServiceStub.stub :transcode_update_vpc_flow_logs_config_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_vpc_flow_logs_config_client_stub do - # Create client - client = ::Google::Cloud::NetworkManagement::V1::OrganizationVpcFlowLogsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_vpc_flow_logs_config({ update_mask: update_mask, vpc_flow_logs_config: vpc_flow_logs_config }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_vpc_flow_logs_config update_mask: update_mask, vpc_flow_logs_config: vpc_flow_logs_config do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_vpc_flow_logs_config ::Google::Cloud::NetworkManagement::V1::UpdateVpcFlowLogsConfigRequest.new(update_mask: update_mask, vpc_flow_logs_config: vpc_flow_logs_config) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_vpc_flow_logs_config({ update_mask: update_mask, vpc_flow_logs_config: vpc_flow_logs_config }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_vpc_flow_logs_config(::Google::Cloud::NetworkManagement::V1::UpdateVpcFlowLogsConfigRequest.new(update_mask: update_mask, vpc_flow_logs_config: vpc_flow_logs_config), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_vpc_flow_logs_config_client_stub.call_count - end - end - end - - def test_delete_vpc_flow_logs_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" - - delete_vpc_flow_logs_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::NetworkManagement::V1::OrganizationVpcFlowLogsService::Rest::ServiceStub.stub :transcode_delete_vpc_flow_logs_config_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_vpc_flow_logs_config_client_stub do - # Create client - client = ::Google::Cloud::NetworkManagement::V1::OrganizationVpcFlowLogsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_vpc_flow_logs_config({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_vpc_flow_logs_config name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_vpc_flow_logs_config ::Google::Cloud::NetworkManagement::V1::DeleteVpcFlowLogsConfigRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_vpc_flow_logs_config({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_vpc_flow_logs_config(::Google::Cloud::NetworkManagement::V1::DeleteVpcFlowLogsConfigRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_vpc_flow_logs_config_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::NetworkManagement::V1::OrganizationVpcFlowLogsService::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::NetworkManagement::V1::OrganizationVpcFlowLogsService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-network_management-v1/test/google/cloud/network_management/v1/organization_vpc_flow_logs_service_test.rb b/owl-bot-staging/google-cloud-network_management-v1/test/google/cloud/network_management/v1/organization_vpc_flow_logs_service_test.rb deleted file mode 100644 index ba373a39ecfb..000000000000 --- a/owl-bot-staging/google-cloud-network_management-v1/test/google/cloud/network_management/v1/organization_vpc_flow_logs_service_test.rb +++ /dev/null @@ -1,442 +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/networkmanagement/v1/vpc_flow_logs_pb" -require "google/cloud/network_management/v1/organization_vpc_flow_logs_service" - -class ::Google::Cloud::NetworkManagement::V1::OrganizationVpcFlowLogsService::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_vpc_flow_logs_configs - # Create GRPC objects. - grpc_response = ::Google::Cloud::NetworkManagement::V1::ListVpcFlowLogsConfigsResponse.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_vpc_flow_logs_configs_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_vpc_flow_logs_configs, name - assert_kind_of ::Google::Cloud::NetworkManagement::V1::ListVpcFlowLogsConfigsRequest, 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_vpc_flow_logs_configs_client_stub do - # Create client - client = ::Google::Cloud::NetworkManagement::V1::OrganizationVpcFlowLogsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_vpc_flow_logs_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_vpc_flow_logs_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_vpc_flow_logs_configs ::Google::Cloud::NetworkManagement::V1::ListVpcFlowLogsConfigsRequest.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_vpc_flow_logs_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_vpc_flow_logs_configs(::Google::Cloud::NetworkManagement::V1::ListVpcFlowLogsConfigsRequest.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_vpc_flow_logs_configs_client_stub.call_rpc_count - end - end - - def test_get_vpc_flow_logs_config - # Create GRPC objects. - grpc_response = ::Google::Cloud::NetworkManagement::V1::VpcFlowLogsConfig.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_vpc_flow_logs_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_vpc_flow_logs_config, name - assert_kind_of ::Google::Cloud::NetworkManagement::V1::GetVpcFlowLogsConfigRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_vpc_flow_logs_config_client_stub do - # Create client - client = ::Google::Cloud::NetworkManagement::V1::OrganizationVpcFlowLogsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_vpc_flow_logs_config({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_vpc_flow_logs_config name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_vpc_flow_logs_config ::Google::Cloud::NetworkManagement::V1::GetVpcFlowLogsConfigRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_vpc_flow_logs_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_vpc_flow_logs_config(::Google::Cloud::NetworkManagement::V1::GetVpcFlowLogsConfigRequest.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_vpc_flow_logs_config_client_stub.call_rpc_count - end - end - - def test_create_vpc_flow_logs_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" - vpc_flow_logs_config_id = "hello world" - vpc_flow_logs_config = {} - - create_vpc_flow_logs_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_vpc_flow_logs_config, name - assert_kind_of ::Google::Cloud::NetworkManagement::V1::CreateVpcFlowLogsConfigRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["vpc_flow_logs_config_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::NetworkManagement::V1::VpcFlowLogsConfig), request["vpc_flow_logs_config"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_vpc_flow_logs_config_client_stub do - # Create client - client = ::Google::Cloud::NetworkManagement::V1::OrganizationVpcFlowLogsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_vpc_flow_logs_config({ parent: parent, vpc_flow_logs_config_id: vpc_flow_logs_config_id, vpc_flow_logs_config: vpc_flow_logs_config }) 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_vpc_flow_logs_config parent: parent, vpc_flow_logs_config_id: vpc_flow_logs_config_id, vpc_flow_logs_config: vpc_flow_logs_config 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_vpc_flow_logs_config ::Google::Cloud::NetworkManagement::V1::CreateVpcFlowLogsConfigRequest.new(parent: parent, vpc_flow_logs_config_id: vpc_flow_logs_config_id, vpc_flow_logs_config: vpc_flow_logs_config) 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_vpc_flow_logs_config({ parent: parent, vpc_flow_logs_config_id: vpc_flow_logs_config_id, vpc_flow_logs_config: vpc_flow_logs_config }, 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_vpc_flow_logs_config(::Google::Cloud::NetworkManagement::V1::CreateVpcFlowLogsConfigRequest.new(parent: parent, vpc_flow_logs_config_id: vpc_flow_logs_config_id, vpc_flow_logs_config: vpc_flow_logs_config), 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_vpc_flow_logs_config_client_stub.call_rpc_count - end - end - - def test_update_vpc_flow_logs_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. - update_mask = {} - vpc_flow_logs_config = {} - - update_vpc_flow_logs_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_vpc_flow_logs_config, name - assert_kind_of ::Google::Cloud::NetworkManagement::V1::UpdateVpcFlowLogsConfigRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::NetworkManagement::V1::VpcFlowLogsConfig), request["vpc_flow_logs_config"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_vpc_flow_logs_config_client_stub do - # Create client - client = ::Google::Cloud::NetworkManagement::V1::OrganizationVpcFlowLogsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_vpc_flow_logs_config({ update_mask: update_mask, vpc_flow_logs_config: vpc_flow_logs_config }) 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_vpc_flow_logs_config update_mask: update_mask, vpc_flow_logs_config: vpc_flow_logs_config 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_vpc_flow_logs_config ::Google::Cloud::NetworkManagement::V1::UpdateVpcFlowLogsConfigRequest.new(update_mask: update_mask, vpc_flow_logs_config: vpc_flow_logs_config) 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_vpc_flow_logs_config({ update_mask: update_mask, vpc_flow_logs_config: vpc_flow_logs_config }, 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_vpc_flow_logs_config(::Google::Cloud::NetworkManagement::V1::UpdateVpcFlowLogsConfigRequest.new(update_mask: update_mask, vpc_flow_logs_config: vpc_flow_logs_config), 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_vpc_flow_logs_config_client_stub.call_rpc_count - end - end - - def test_delete_vpc_flow_logs_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" - - delete_vpc_flow_logs_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_vpc_flow_logs_config, name - assert_kind_of ::Google::Cloud::NetworkManagement::V1::DeleteVpcFlowLogsConfigRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_vpc_flow_logs_config_client_stub do - # Create client - client = ::Google::Cloud::NetworkManagement::V1::OrganizationVpcFlowLogsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_vpc_flow_logs_config({ 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_vpc_flow_logs_config 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_vpc_flow_logs_config ::Google::Cloud::NetworkManagement::V1::DeleteVpcFlowLogsConfigRequest.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_vpc_flow_logs_config({ 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_vpc_flow_logs_config(::Google::Cloud::NetworkManagement::V1::DeleteVpcFlowLogsConfigRequest.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_vpc_flow_logs_config_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::NetworkManagement::V1::OrganizationVpcFlowLogsService::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::NetworkManagement::V1::OrganizationVpcFlowLogsService::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::NetworkManagement::V1::OrganizationVpcFlowLogsService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::NetworkManagement::V1::OrganizationVpcFlowLogsService::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::NetworkManagement::V1::OrganizationVpcFlowLogsService::Client.new do |config| - config.credentials = grpc_channel - end - end - - assert_kind_of ::Google::Cloud::NetworkManagement::V1::OrganizationVpcFlowLogsService::Operations, client.operations_client - end -end diff --git a/owl-bot-staging/google-cloud-network_management-v1/test/google/cloud/network_management/v1/reachability_service_operations_test.rb b/owl-bot-staging/google-cloud-network_management-v1/test/google/cloud/network_management/v1/reachability_service_operations_test.rb deleted file mode 100644 index eb836b0f3ceb..000000000000 --- a/owl-bot-staging/google-cloud-network_management-v1/test/google/cloud/network_management/v1/reachability_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/networkmanagement/v1/reachability_pb" -require "google/cloud/networkmanagement/v1/reachability_services_pb" -require "google/cloud/network_management/v1/reachability_service" - -class ::Google::Cloud::NetworkManagement::V1::ReachabilityService::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::NetworkManagement::V1::ReachabilityService::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::NetworkManagement::V1::ReachabilityService::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::NetworkManagement::V1::ReachabilityService::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::NetworkManagement::V1::ReachabilityService::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::NetworkManagement::V1::ReachabilityService::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::NetworkManagement::V1::ReachabilityService::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::NetworkManagement::V1::ReachabilityService::Operations::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-network_management-v1/test/google/cloud/network_management/v1/reachability_service_paths_test.rb b/owl-bot-staging/google-cloud-network_management-v1/test/google/cloud/network_management/v1/reachability_service_paths_test.rb deleted file mode 100644 index 9c92881d643a..000000000000 --- a/owl-bot-staging/google-cloud-network_management-v1/test/google/cloud/network_management/v1/reachability_service_paths_test.rb +++ /dev/null @@ -1,67 +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/network_management/v1/reachability_service" - -class ::Google::Cloud::NetworkManagement::V1::ReachabilityService::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_connectivity_test_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::NetworkManagement::V1::ReachabilityService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.connectivity_test_path project: "value0", test: "value1" - assert_equal "projects/value0/locations/global/connectivityTests/value1", path - end - end - - def test_project_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::NetworkManagement::V1::ReachabilityService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.project_path project: "value0" - assert_equal "projects/value0", path - end - end -end diff --git a/owl-bot-staging/google-cloud-network_management-v1/test/google/cloud/network_management/v1/reachability_service_rest_test.rb b/owl-bot-staging/google-cloud-network_management-v1/test/google/cloud/network_management/v1/reachability_service_rest_test.rb deleted file mode 100644 index 1169e991f13c..000000000000 --- a/owl-bot-staging/google-cloud-network_management-v1/test/google/cloud/network_management/v1/reachability_service_rest_test.rb +++ /dev/null @@ -1,430 +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/networkmanagement/v1/reachability_pb" -require "google/cloud/network_management/v1/reachability_service/rest" - - -class ::Google::Cloud::NetworkManagement::V1::ReachabilityService::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_connectivity_tests - # Create test objects. - client_result = ::Google::Cloud::NetworkManagement::V1::ListConnectivityTestsResponse.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_connectivity_tests_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::NetworkManagement::V1::ReachabilityService::Rest::ServiceStub.stub :transcode_list_connectivity_tests_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_connectivity_tests_client_stub do - # Create client - client = ::Google::Cloud::NetworkManagement::V1::ReachabilityService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_connectivity_tests({ 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_connectivity_tests 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_connectivity_tests ::Google::Cloud::NetworkManagement::V1::ListConnectivityTestsRequest.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_connectivity_tests({ 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_connectivity_tests(::Google::Cloud::NetworkManagement::V1::ListConnectivityTestsRequest.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_connectivity_tests_client_stub.call_count - end - end - end - - def test_get_connectivity_test - # Create test objects. - client_result = ::Google::Cloud::NetworkManagement::V1::ConnectivityTest.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_connectivity_test_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::NetworkManagement::V1::ReachabilityService::Rest::ServiceStub.stub :transcode_get_connectivity_test_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_connectivity_test_client_stub do - # Create client - client = ::Google::Cloud::NetworkManagement::V1::ReachabilityService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_connectivity_test({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_connectivity_test name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_connectivity_test ::Google::Cloud::NetworkManagement::V1::GetConnectivityTestRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_connectivity_test({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_connectivity_test(::Google::Cloud::NetworkManagement::V1::GetConnectivityTestRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_connectivity_test_client_stub.call_count - end - end - end - - def test_create_connectivity_test - # 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" - test_id = "hello world" - resource = {} - - create_connectivity_test_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::NetworkManagement::V1::ReachabilityService::Rest::ServiceStub.stub :transcode_create_connectivity_test_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_connectivity_test_client_stub do - # Create client - client = ::Google::Cloud::NetworkManagement::V1::ReachabilityService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_connectivity_test({ parent: parent, test_id: test_id, resource: resource }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_connectivity_test parent: parent, test_id: test_id, resource: resource do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_connectivity_test ::Google::Cloud::NetworkManagement::V1::CreateConnectivityTestRequest.new(parent: parent, test_id: test_id, resource: resource) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_connectivity_test({ parent: parent, test_id: test_id, resource: resource }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_connectivity_test(::Google::Cloud::NetworkManagement::V1::CreateConnectivityTestRequest.new(parent: parent, test_id: test_id, resource: resource), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_connectivity_test_client_stub.call_count - end - end - end - - def test_update_connectivity_test - # 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 = {} - resource = {} - - update_connectivity_test_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::NetworkManagement::V1::ReachabilityService::Rest::ServiceStub.stub :transcode_update_connectivity_test_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_connectivity_test_client_stub do - # Create client - client = ::Google::Cloud::NetworkManagement::V1::ReachabilityService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_connectivity_test({ update_mask: update_mask, resource: resource }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_connectivity_test update_mask: update_mask, resource: resource do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_connectivity_test ::Google::Cloud::NetworkManagement::V1::UpdateConnectivityTestRequest.new(update_mask: update_mask, resource: resource) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_connectivity_test({ update_mask: update_mask, resource: resource }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_connectivity_test(::Google::Cloud::NetworkManagement::V1::UpdateConnectivityTestRequest.new(update_mask: update_mask, resource: resource), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_connectivity_test_client_stub.call_count - end - end - end - - def test_rerun_connectivity_test - # 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" - - rerun_connectivity_test_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::NetworkManagement::V1::ReachabilityService::Rest::ServiceStub.stub :transcode_rerun_connectivity_test_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, rerun_connectivity_test_client_stub do - # Create client - client = ::Google::Cloud::NetworkManagement::V1::ReachabilityService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.rerun_connectivity_test({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.rerun_connectivity_test name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.rerun_connectivity_test ::Google::Cloud::NetworkManagement::V1::RerunConnectivityTestRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.rerun_connectivity_test({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.rerun_connectivity_test(::Google::Cloud::NetworkManagement::V1::RerunConnectivityTestRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, rerun_connectivity_test_client_stub.call_count - end - end - end - - def test_delete_connectivity_test - # 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_connectivity_test_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::NetworkManagement::V1::ReachabilityService::Rest::ServiceStub.stub :transcode_delete_connectivity_test_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_connectivity_test_client_stub do - # Create client - client = ::Google::Cloud::NetworkManagement::V1::ReachabilityService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_connectivity_test({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_connectivity_test name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_connectivity_test ::Google::Cloud::NetworkManagement::V1::DeleteConnectivityTestRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_connectivity_test({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_connectivity_test(::Google::Cloud::NetworkManagement::V1::DeleteConnectivityTestRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_connectivity_test_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::NetworkManagement::V1::ReachabilityService::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::NetworkManagement::V1::ReachabilityService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-network_management-v1/test/google/cloud/network_management/v1/reachability_service_test.rb b/owl-bot-staging/google-cloud-network_management-v1/test/google/cloud/network_management/v1/reachability_service_test.rb deleted file mode 100644 index 02b05bd128af..000000000000 --- a/owl-bot-staging/google-cloud-network_management-v1/test/google/cloud/network_management/v1/reachability_service_test.rb +++ /dev/null @@ -1,505 +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/networkmanagement/v1/reachability_pb" -require "google/cloud/network_management/v1/reachability_service" - -class ::Google::Cloud::NetworkManagement::V1::ReachabilityService::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_connectivity_tests - # Create GRPC objects. - grpc_response = ::Google::Cloud::NetworkManagement::V1::ListConnectivityTestsResponse.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_connectivity_tests_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_connectivity_tests, name - assert_kind_of ::Google::Cloud::NetworkManagement::V1::ListConnectivityTestsRequest, 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_connectivity_tests_client_stub do - # Create client - client = ::Google::Cloud::NetworkManagement::V1::ReachabilityService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_connectivity_tests({ 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_connectivity_tests 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_connectivity_tests ::Google::Cloud::NetworkManagement::V1::ListConnectivityTestsRequest.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_connectivity_tests({ 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_connectivity_tests(::Google::Cloud::NetworkManagement::V1::ListConnectivityTestsRequest.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_connectivity_tests_client_stub.call_rpc_count - end - end - - def test_get_connectivity_test - # Create GRPC objects. - grpc_response = ::Google::Cloud::NetworkManagement::V1::ConnectivityTest.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_connectivity_test_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_connectivity_test, name - assert_kind_of ::Google::Cloud::NetworkManagement::V1::GetConnectivityTestRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_connectivity_test_client_stub do - # Create client - client = ::Google::Cloud::NetworkManagement::V1::ReachabilityService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_connectivity_test({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_connectivity_test name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_connectivity_test ::Google::Cloud::NetworkManagement::V1::GetConnectivityTestRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_connectivity_test({ 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_connectivity_test(::Google::Cloud::NetworkManagement::V1::GetConnectivityTestRequest.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_connectivity_test_client_stub.call_rpc_count - end - end - - def test_create_connectivity_test - # 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" - test_id = "hello world" - resource = {} - - create_connectivity_test_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_connectivity_test, name - assert_kind_of ::Google::Cloud::NetworkManagement::V1::CreateConnectivityTestRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["test_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::NetworkManagement::V1::ConnectivityTest), request["resource"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_connectivity_test_client_stub do - # Create client - client = ::Google::Cloud::NetworkManagement::V1::ReachabilityService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_connectivity_test({ parent: parent, test_id: test_id, resource: resource }) 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_connectivity_test parent: parent, test_id: test_id, resource: resource 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_connectivity_test ::Google::Cloud::NetworkManagement::V1::CreateConnectivityTestRequest.new(parent: parent, test_id: test_id, resource: resource) 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_connectivity_test({ parent: parent, test_id: test_id, resource: resource }, 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_connectivity_test(::Google::Cloud::NetworkManagement::V1::CreateConnectivityTestRequest.new(parent: parent, test_id: test_id, resource: resource), 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_connectivity_test_client_stub.call_rpc_count - end - end - - def test_update_connectivity_test - # 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 = {} - resource = {} - - update_connectivity_test_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_connectivity_test, name - assert_kind_of ::Google::Cloud::NetworkManagement::V1::UpdateConnectivityTestRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::NetworkManagement::V1::ConnectivityTest), request["resource"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_connectivity_test_client_stub do - # Create client - client = ::Google::Cloud::NetworkManagement::V1::ReachabilityService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_connectivity_test({ update_mask: update_mask, resource: resource }) 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_connectivity_test update_mask: update_mask, resource: resource 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_connectivity_test ::Google::Cloud::NetworkManagement::V1::UpdateConnectivityTestRequest.new(update_mask: update_mask, resource: resource) 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_connectivity_test({ update_mask: update_mask, resource: resource }, 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_connectivity_test(::Google::Cloud::NetworkManagement::V1::UpdateConnectivityTestRequest.new(update_mask: update_mask, resource: resource), 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_connectivity_test_client_stub.call_rpc_count - end - end - - def test_rerun_connectivity_test - # 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" - - rerun_connectivity_test_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :rerun_connectivity_test, name - assert_kind_of ::Google::Cloud::NetworkManagement::V1::RerunConnectivityTestRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, rerun_connectivity_test_client_stub do - # Create client - client = ::Google::Cloud::NetworkManagement::V1::ReachabilityService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.rerun_connectivity_test({ 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.rerun_connectivity_test 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.rerun_connectivity_test ::Google::Cloud::NetworkManagement::V1::RerunConnectivityTestRequest.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.rerun_connectivity_test({ 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.rerun_connectivity_test(::Google::Cloud::NetworkManagement::V1::RerunConnectivityTestRequest.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, rerun_connectivity_test_client_stub.call_rpc_count - end - end - - def test_delete_connectivity_test - # 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_connectivity_test_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_connectivity_test, name - assert_kind_of ::Google::Cloud::NetworkManagement::V1::DeleteConnectivityTestRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_connectivity_test_client_stub do - # Create client - client = ::Google::Cloud::NetworkManagement::V1::ReachabilityService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_connectivity_test({ 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_connectivity_test 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_connectivity_test ::Google::Cloud::NetworkManagement::V1::DeleteConnectivityTestRequest.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_connectivity_test({ 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_connectivity_test(::Google::Cloud::NetworkManagement::V1::DeleteConnectivityTestRequest.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_connectivity_test_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::NetworkManagement::V1::ReachabilityService::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::NetworkManagement::V1::ReachabilityService::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::NetworkManagement::V1::ReachabilityService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::NetworkManagement::V1::ReachabilityService::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::NetworkManagement::V1::ReachabilityService::Client.new do |config| - config.credentials = grpc_channel - end - end - - assert_kind_of ::Google::Cloud::NetworkManagement::V1::ReachabilityService::Operations, client.operations_client - end -end diff --git a/owl-bot-staging/google-cloud-network_management-v1/test/google/cloud/network_management/v1/vpc_flow_logs_service_operations_test.rb b/owl-bot-staging/google-cloud-network_management-v1/test/google/cloud/network_management/v1/vpc_flow_logs_service_operations_test.rb deleted file mode 100644 index 3d255398170b..000000000000 --- a/owl-bot-staging/google-cloud-network_management-v1/test/google/cloud/network_management/v1/vpc_flow_logs_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/networkmanagement/v1/vpc_flow_logs_pb" -require "google/cloud/networkmanagement/v1/vpc_flow_logs_services_pb" -require "google/cloud/network_management/v1/vpc_flow_logs_service" - -class ::Google::Cloud::NetworkManagement::V1::VpcFlowLogsService::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::NetworkManagement::V1::VpcFlowLogsService::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::NetworkManagement::V1::VpcFlowLogsService::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::NetworkManagement::V1::VpcFlowLogsService::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::NetworkManagement::V1::VpcFlowLogsService::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::NetworkManagement::V1::VpcFlowLogsService::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::NetworkManagement::V1::VpcFlowLogsService::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::NetworkManagement::V1::VpcFlowLogsService::Operations::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-network_management-v1/test/google/cloud/network_management/v1/vpc_flow_logs_service_paths_test.rb b/owl-bot-staging/google-cloud-network_management-v1/test/google/cloud/network_management/v1/vpc_flow_logs_service_paths_test.rb deleted file mode 100644 index 75de4e917967..000000000000 --- a/owl-bot-staging/google-cloud-network_management-v1/test/google/cloud/network_management/v1/vpc_flow_logs_service_paths_test.rb +++ /dev/null @@ -1,82 +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/network_management/v1/vpc_flow_logs_service" - -class ::Google::Cloud::NetworkManagement::V1::VpcFlowLogsService::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_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::NetworkManagement::V1::VpcFlowLogsService::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_organization_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::NetworkManagement::V1::VpcFlowLogsService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.organization_location_path organization: "value0", location: "value1" - assert_equal "organizations/value0/locations/value1", path - end - end - - def test_vpc_flow_logs_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::NetworkManagement::V1::VpcFlowLogsService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.vpc_flow_logs_config_path project: "value0", location: "value1", vpc_flow_logs_config: "value2" - assert_equal "projects/value0/locations/value1/vpcFlowLogsConfigs/value2", path - - path = client.vpc_flow_logs_config_path organization: "value0", location: "value1", vpc_flow_logs_config: "value2" - assert_equal "organizations/value0/locations/value1/vpcFlowLogsConfigs/value2", path - end - end -end diff --git a/owl-bot-staging/google-cloud-network_management-v1/test/google/cloud/network_management/v1/vpc_flow_logs_service_rest_test.rb b/owl-bot-staging/google-cloud-network_management-v1/test/google/cloud/network_management/v1/vpc_flow_logs_service_rest_test.rb deleted file mode 100644 index 6cfad29d0daa..000000000000 --- a/owl-bot-staging/google-cloud-network_management-v1/test/google/cloud/network_management/v1/vpc_flow_logs_service_rest_test.rb +++ /dev/null @@ -1,491 +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/networkmanagement/v1/vpc_flow_logs_pb" -require "google/cloud/network_management/v1/vpc_flow_logs_service/rest" - - -class ::Google::Cloud::NetworkManagement::V1::VpcFlowLogsService::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_vpc_flow_logs_configs - # Create test objects. - client_result = ::Google::Cloud::NetworkManagement::V1::ListVpcFlowLogsConfigsResponse.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_vpc_flow_logs_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::NetworkManagement::V1::VpcFlowLogsService::Rest::ServiceStub.stub :transcode_list_vpc_flow_logs_configs_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_vpc_flow_logs_configs_client_stub do - # Create client - client = ::Google::Cloud::NetworkManagement::V1::VpcFlowLogsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_vpc_flow_logs_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_vpc_flow_logs_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_vpc_flow_logs_configs ::Google::Cloud::NetworkManagement::V1::ListVpcFlowLogsConfigsRequest.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_vpc_flow_logs_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_vpc_flow_logs_configs(::Google::Cloud::NetworkManagement::V1::ListVpcFlowLogsConfigsRequest.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_vpc_flow_logs_configs_client_stub.call_count - end - end - end - - def test_get_vpc_flow_logs_config - # Create test objects. - client_result = ::Google::Cloud::NetworkManagement::V1::VpcFlowLogsConfig.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_vpc_flow_logs_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::NetworkManagement::V1::VpcFlowLogsService::Rest::ServiceStub.stub :transcode_get_vpc_flow_logs_config_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_vpc_flow_logs_config_client_stub do - # Create client - client = ::Google::Cloud::NetworkManagement::V1::VpcFlowLogsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_vpc_flow_logs_config({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_vpc_flow_logs_config name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_vpc_flow_logs_config ::Google::Cloud::NetworkManagement::V1::GetVpcFlowLogsConfigRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_vpc_flow_logs_config({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_vpc_flow_logs_config(::Google::Cloud::NetworkManagement::V1::GetVpcFlowLogsConfigRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_vpc_flow_logs_config_client_stub.call_count - end - end - end - - def test_create_vpc_flow_logs_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" - vpc_flow_logs_config_id = "hello world" - vpc_flow_logs_config = {} - - create_vpc_flow_logs_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::NetworkManagement::V1::VpcFlowLogsService::Rest::ServiceStub.stub :transcode_create_vpc_flow_logs_config_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_vpc_flow_logs_config_client_stub do - # Create client - client = ::Google::Cloud::NetworkManagement::V1::VpcFlowLogsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_vpc_flow_logs_config({ parent: parent, vpc_flow_logs_config_id: vpc_flow_logs_config_id, vpc_flow_logs_config: vpc_flow_logs_config }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_vpc_flow_logs_config parent: parent, vpc_flow_logs_config_id: vpc_flow_logs_config_id, vpc_flow_logs_config: vpc_flow_logs_config do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_vpc_flow_logs_config ::Google::Cloud::NetworkManagement::V1::CreateVpcFlowLogsConfigRequest.new(parent: parent, vpc_flow_logs_config_id: vpc_flow_logs_config_id, vpc_flow_logs_config: vpc_flow_logs_config) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_vpc_flow_logs_config({ parent: parent, vpc_flow_logs_config_id: vpc_flow_logs_config_id, vpc_flow_logs_config: vpc_flow_logs_config }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_vpc_flow_logs_config(::Google::Cloud::NetworkManagement::V1::CreateVpcFlowLogsConfigRequest.new(parent: parent, vpc_flow_logs_config_id: vpc_flow_logs_config_id, vpc_flow_logs_config: vpc_flow_logs_config), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_vpc_flow_logs_config_client_stub.call_count - end - end - end - - def test_update_vpc_flow_logs_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. - update_mask = {} - vpc_flow_logs_config = {} - - update_vpc_flow_logs_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::NetworkManagement::V1::VpcFlowLogsService::Rest::ServiceStub.stub :transcode_update_vpc_flow_logs_config_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_vpc_flow_logs_config_client_stub do - # Create client - client = ::Google::Cloud::NetworkManagement::V1::VpcFlowLogsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_vpc_flow_logs_config({ update_mask: update_mask, vpc_flow_logs_config: vpc_flow_logs_config }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_vpc_flow_logs_config update_mask: update_mask, vpc_flow_logs_config: vpc_flow_logs_config do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_vpc_flow_logs_config ::Google::Cloud::NetworkManagement::V1::UpdateVpcFlowLogsConfigRequest.new(update_mask: update_mask, vpc_flow_logs_config: vpc_flow_logs_config) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_vpc_flow_logs_config({ update_mask: update_mask, vpc_flow_logs_config: vpc_flow_logs_config }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_vpc_flow_logs_config(::Google::Cloud::NetworkManagement::V1::UpdateVpcFlowLogsConfigRequest.new(update_mask: update_mask, vpc_flow_logs_config: vpc_flow_logs_config), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_vpc_flow_logs_config_client_stub.call_count - end - end - end - - def test_delete_vpc_flow_logs_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" - - delete_vpc_flow_logs_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::NetworkManagement::V1::VpcFlowLogsService::Rest::ServiceStub.stub :transcode_delete_vpc_flow_logs_config_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_vpc_flow_logs_config_client_stub do - # Create client - client = ::Google::Cloud::NetworkManagement::V1::VpcFlowLogsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_vpc_flow_logs_config({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_vpc_flow_logs_config name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_vpc_flow_logs_config ::Google::Cloud::NetworkManagement::V1::DeleteVpcFlowLogsConfigRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_vpc_flow_logs_config({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_vpc_flow_logs_config(::Google::Cloud::NetworkManagement::V1::DeleteVpcFlowLogsConfigRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_vpc_flow_logs_config_client_stub.call_count - end - end - end - - def test_query_org_vpc_flow_logs_configs - # Create test objects. - client_result = ::Google::Cloud::NetworkManagement::V1::QueryOrgVpcFlowLogsConfigsResponse.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" - - query_org_vpc_flow_logs_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::NetworkManagement::V1::VpcFlowLogsService::Rest::ServiceStub.stub :transcode_query_org_vpc_flow_logs_configs_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, query_org_vpc_flow_logs_configs_client_stub do - # Create client - client = ::Google::Cloud::NetworkManagement::V1::VpcFlowLogsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.query_org_vpc_flow_logs_configs({ 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.query_org_vpc_flow_logs_configs 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.query_org_vpc_flow_logs_configs ::Google::Cloud::NetworkManagement::V1::QueryOrgVpcFlowLogsConfigsRequest.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.query_org_vpc_flow_logs_configs({ 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.query_org_vpc_flow_logs_configs(::Google::Cloud::NetworkManagement::V1::QueryOrgVpcFlowLogsConfigsRequest.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, query_org_vpc_flow_logs_configs_client_stub.call_count - end - end - end - - def test_show_effective_flow_logs_configs - # Create test objects. - client_result = ::Google::Cloud::NetworkManagement::V1::ShowEffectiveFlowLogsConfigsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - resource = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - - show_effective_flow_logs_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::NetworkManagement::V1::VpcFlowLogsService::Rest::ServiceStub.stub :transcode_show_effective_flow_logs_configs_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, show_effective_flow_logs_configs_client_stub do - # Create client - client = ::Google::Cloud::NetworkManagement::V1::VpcFlowLogsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.show_effective_flow_logs_configs({ parent: parent, resource: resource, 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.show_effective_flow_logs_configs parent: parent, resource: resource, 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.show_effective_flow_logs_configs ::Google::Cloud::NetworkManagement::V1::ShowEffectiveFlowLogsConfigsRequest.new(parent: parent, resource: resource, 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.show_effective_flow_logs_configs({ parent: parent, resource: resource, 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.show_effective_flow_logs_configs(::Google::Cloud::NetworkManagement::V1::ShowEffectiveFlowLogsConfigsRequest.new(parent: parent, resource: resource, 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, show_effective_flow_logs_configs_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::NetworkManagement::V1::VpcFlowLogsService::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::NetworkManagement::V1::VpcFlowLogsService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-network_management-v1/test/google/cloud/network_management/v1/vpc_flow_logs_service_test.rb b/owl-bot-staging/google-cloud-network_management-v1/test/google/cloud/network_management/v1/vpc_flow_logs_service_test.rb deleted file mode 100644 index 4f6704b39236..000000000000 --- a/owl-bot-staging/google-cloud-network_management-v1/test/google/cloud/network_management/v1/vpc_flow_logs_service_test.rb +++ /dev/null @@ -1,582 +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/networkmanagement/v1/vpc_flow_logs_pb" -require "google/cloud/network_management/v1/vpc_flow_logs_service" - -class ::Google::Cloud::NetworkManagement::V1::VpcFlowLogsService::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_vpc_flow_logs_configs - # Create GRPC objects. - grpc_response = ::Google::Cloud::NetworkManagement::V1::ListVpcFlowLogsConfigsResponse.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_vpc_flow_logs_configs_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_vpc_flow_logs_configs, name - assert_kind_of ::Google::Cloud::NetworkManagement::V1::ListVpcFlowLogsConfigsRequest, 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_vpc_flow_logs_configs_client_stub do - # Create client - client = ::Google::Cloud::NetworkManagement::V1::VpcFlowLogsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_vpc_flow_logs_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_vpc_flow_logs_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_vpc_flow_logs_configs ::Google::Cloud::NetworkManagement::V1::ListVpcFlowLogsConfigsRequest.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_vpc_flow_logs_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_vpc_flow_logs_configs(::Google::Cloud::NetworkManagement::V1::ListVpcFlowLogsConfigsRequest.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_vpc_flow_logs_configs_client_stub.call_rpc_count - end - end - - def test_get_vpc_flow_logs_config - # Create GRPC objects. - grpc_response = ::Google::Cloud::NetworkManagement::V1::VpcFlowLogsConfig.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_vpc_flow_logs_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_vpc_flow_logs_config, name - assert_kind_of ::Google::Cloud::NetworkManagement::V1::GetVpcFlowLogsConfigRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_vpc_flow_logs_config_client_stub do - # Create client - client = ::Google::Cloud::NetworkManagement::V1::VpcFlowLogsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_vpc_flow_logs_config({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_vpc_flow_logs_config name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_vpc_flow_logs_config ::Google::Cloud::NetworkManagement::V1::GetVpcFlowLogsConfigRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_vpc_flow_logs_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_vpc_flow_logs_config(::Google::Cloud::NetworkManagement::V1::GetVpcFlowLogsConfigRequest.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_vpc_flow_logs_config_client_stub.call_rpc_count - end - end - - def test_create_vpc_flow_logs_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" - vpc_flow_logs_config_id = "hello world" - vpc_flow_logs_config = {} - - create_vpc_flow_logs_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_vpc_flow_logs_config, name - assert_kind_of ::Google::Cloud::NetworkManagement::V1::CreateVpcFlowLogsConfigRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["vpc_flow_logs_config_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::NetworkManagement::V1::VpcFlowLogsConfig), request["vpc_flow_logs_config"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_vpc_flow_logs_config_client_stub do - # Create client - client = ::Google::Cloud::NetworkManagement::V1::VpcFlowLogsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_vpc_flow_logs_config({ parent: parent, vpc_flow_logs_config_id: vpc_flow_logs_config_id, vpc_flow_logs_config: vpc_flow_logs_config }) 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_vpc_flow_logs_config parent: parent, vpc_flow_logs_config_id: vpc_flow_logs_config_id, vpc_flow_logs_config: vpc_flow_logs_config 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_vpc_flow_logs_config ::Google::Cloud::NetworkManagement::V1::CreateVpcFlowLogsConfigRequest.new(parent: parent, vpc_flow_logs_config_id: vpc_flow_logs_config_id, vpc_flow_logs_config: vpc_flow_logs_config) 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_vpc_flow_logs_config({ parent: parent, vpc_flow_logs_config_id: vpc_flow_logs_config_id, vpc_flow_logs_config: vpc_flow_logs_config }, 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_vpc_flow_logs_config(::Google::Cloud::NetworkManagement::V1::CreateVpcFlowLogsConfigRequest.new(parent: parent, vpc_flow_logs_config_id: vpc_flow_logs_config_id, vpc_flow_logs_config: vpc_flow_logs_config), 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_vpc_flow_logs_config_client_stub.call_rpc_count - end - end - - def test_update_vpc_flow_logs_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. - update_mask = {} - vpc_flow_logs_config = {} - - update_vpc_flow_logs_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_vpc_flow_logs_config, name - assert_kind_of ::Google::Cloud::NetworkManagement::V1::UpdateVpcFlowLogsConfigRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::NetworkManagement::V1::VpcFlowLogsConfig), request["vpc_flow_logs_config"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_vpc_flow_logs_config_client_stub do - # Create client - client = ::Google::Cloud::NetworkManagement::V1::VpcFlowLogsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_vpc_flow_logs_config({ update_mask: update_mask, vpc_flow_logs_config: vpc_flow_logs_config }) 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_vpc_flow_logs_config update_mask: update_mask, vpc_flow_logs_config: vpc_flow_logs_config 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_vpc_flow_logs_config ::Google::Cloud::NetworkManagement::V1::UpdateVpcFlowLogsConfigRequest.new(update_mask: update_mask, vpc_flow_logs_config: vpc_flow_logs_config) 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_vpc_flow_logs_config({ update_mask: update_mask, vpc_flow_logs_config: vpc_flow_logs_config }, 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_vpc_flow_logs_config(::Google::Cloud::NetworkManagement::V1::UpdateVpcFlowLogsConfigRequest.new(update_mask: update_mask, vpc_flow_logs_config: vpc_flow_logs_config), 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_vpc_flow_logs_config_client_stub.call_rpc_count - end - end - - def test_delete_vpc_flow_logs_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" - - delete_vpc_flow_logs_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_vpc_flow_logs_config, name - assert_kind_of ::Google::Cloud::NetworkManagement::V1::DeleteVpcFlowLogsConfigRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_vpc_flow_logs_config_client_stub do - # Create client - client = ::Google::Cloud::NetworkManagement::V1::VpcFlowLogsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_vpc_flow_logs_config({ 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_vpc_flow_logs_config 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_vpc_flow_logs_config ::Google::Cloud::NetworkManagement::V1::DeleteVpcFlowLogsConfigRequest.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_vpc_flow_logs_config({ 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_vpc_flow_logs_config(::Google::Cloud::NetworkManagement::V1::DeleteVpcFlowLogsConfigRequest.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_vpc_flow_logs_config_client_stub.call_rpc_count - end - end - - def test_query_org_vpc_flow_logs_configs - # Create GRPC objects. - grpc_response = ::Google::Cloud::NetworkManagement::V1::QueryOrgVpcFlowLogsConfigsResponse.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" - - query_org_vpc_flow_logs_configs_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :query_org_vpc_flow_logs_configs, name - assert_kind_of ::Google::Cloud::NetworkManagement::V1::QueryOrgVpcFlowLogsConfigsRequest, 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, query_org_vpc_flow_logs_configs_client_stub do - # Create client - client = ::Google::Cloud::NetworkManagement::V1::VpcFlowLogsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.query_org_vpc_flow_logs_configs({ 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.query_org_vpc_flow_logs_configs 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.query_org_vpc_flow_logs_configs ::Google::Cloud::NetworkManagement::V1::QueryOrgVpcFlowLogsConfigsRequest.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.query_org_vpc_flow_logs_configs({ 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.query_org_vpc_flow_logs_configs(::Google::Cloud::NetworkManagement::V1::QueryOrgVpcFlowLogsConfigsRequest.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, query_org_vpc_flow_logs_configs_client_stub.call_rpc_count - end - end - - def test_show_effective_flow_logs_configs - # Create GRPC objects. - grpc_response = ::Google::Cloud::NetworkManagement::V1::ShowEffectiveFlowLogsConfigsResponse.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" - resource = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - - show_effective_flow_logs_configs_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :show_effective_flow_logs_configs, name - assert_kind_of ::Google::Cloud::NetworkManagement::V1::ShowEffectiveFlowLogsConfigsRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["resource"] - 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, show_effective_flow_logs_configs_client_stub do - # Create client - client = ::Google::Cloud::NetworkManagement::V1::VpcFlowLogsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.show_effective_flow_logs_configs({ parent: parent, resource: resource, 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.show_effective_flow_logs_configs parent: parent, resource: resource, 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.show_effective_flow_logs_configs ::Google::Cloud::NetworkManagement::V1::ShowEffectiveFlowLogsConfigsRequest.new(parent: parent, resource: resource, 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.show_effective_flow_logs_configs({ parent: parent, resource: resource, 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.show_effective_flow_logs_configs(::Google::Cloud::NetworkManagement::V1::ShowEffectiveFlowLogsConfigsRequest.new(parent: parent, resource: resource, 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, show_effective_flow_logs_configs_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::NetworkManagement::V1::VpcFlowLogsService::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::NetworkManagement::V1::VpcFlowLogsService::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::NetworkManagement::V1::VpcFlowLogsService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::NetworkManagement::V1::VpcFlowLogsService::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::NetworkManagement::V1::VpcFlowLogsService::Client.new do |config| - config.credentials = grpc_channel - end - end - - assert_kind_of ::Google::Cloud::NetworkManagement::V1::VpcFlowLogsService::Operations, client.operations_client - end -end diff --git a/owl-bot-staging/google-cloud-network_management-v1/test/helper.rb b/owl-bot-staging/google-cloud-network_management-v1/test/helper.rb deleted file mode 100644 index f0e715458fa2..000000000000 --- a/owl-bot-staging/google-cloud-network_management-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"