From 2b2c56ff7e4aacf014450cebbd252d48d44cb27b Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Thu, 11 Jun 2026 19:04:12 +0000 Subject: [PATCH 1/3] feat: add AgentGateway resource and associated RPCs feat: support regional EndpointPolicy, GrpcRoute, HttpRoute, Mesh, TcpRoute, and TlsRoute resources feat: add EXT_AUTHZ_GRPC wire format and BodySendMode enum in dep.proto feat: add forward_attributes, request_body_send_mode, and response_body_send_mode to Extension feat: support generic artifacts for Wasm plugin images and configuration feat: add all_ports and allow_global_access fields to Gateway feat: add filter to ListHttpRoutesRequest and request_id to CreateHttpRouteRequest feat: add target_proxies and labels to TlsRoute docs: update Gateway port limits for SECURE_WEB_GATEWAY docs: update RouteView resource patterns to use project numbers docs: update TlsRoute sni_host limit documentation PiperOrigin-RevId: 930601609 Source-Link: https://github.com/googleapis/googleapis/commit/f93e046328794785ad89869f00c0358dfcff2c35 Source-Link: https://github.com/googleapis/googleapis-gen/commit/4e4e8622dd53e1aa5b166e1e6ba0273915101f41 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLW5ldHdvcmtfc2VydmljZXMtdjEvLk93bEJvdC55YW1sIiwiaCI6IjRlNGU4NjIyZGQ1M2UxYWE1YjE2NmUxZTZiYTAyNzM5MTUxMDFmNDEifQ== --- .../.gitignore | 22 + .../.repo-metadata.json | 17 + .../.rubocop.yml | 33 + .../google-cloud-network_services-v1/.toys.rb | 28 + .../.yardopts | 12 + .../AUTHENTICATION.md | 122 + .../CHANGELOG.md | 2 + .../google-cloud-network_services-v1/Gemfile | 14 + .../LICENSE.md | 201 + .../README.md | 154 + .../google-cloud-network_services-v1/Rakefile | 169 + .../gapic_metadata.json | 442 ++ .../google-cloud-network_services-v1.gemspec | 30 + .../lib/google-cloud-network_services-v1.rb | 21 + .../lib/google/cloud/network_services/v1.rb | 46 + .../network_services/v1/bindings_override.rb | 252 + .../cloud/network_services/v1/dep_service.rb | 56 + .../network_services/v1/dep_service/client.rb | 2670 +++++++ .../v1/dep_service/credentials.rb | 47 + .../v1/dep_service/operations.rb | 843 ++ .../network_services/v1/dep_service/paths.rb | 126 + .../network_services/v1/dep_service/rest.rb | 54 + .../v1/dep_service/rest/client.rb | 2496 ++++++ .../v1/dep_service/rest/operations.rb | 927 +++ .../v1/dep_service/rest/service_stub.rb | 1309 ++++ .../network_services/v1/network_services.rb | 56 + .../v1/network_services/client.rb | 6946 +++++++++++++++++ .../v1/network_services/credentials.rb | 47 + .../v1/network_services/operations.rb | 843 ++ .../v1/network_services/paths.rb | 531 ++ .../v1/network_services/rest.rb | 54 + .../v1/network_services/rest/client.rb | 6471 +++++++++++++++ .../v1/network_services/rest/operations.rb | 927 +++ .../v1/network_services/rest/service_stub.rb | 3947 ++++++++++ .../google/cloud/network_services/v1/rest.rb | 39 + .../cloud/network_services/v1/version.rb | 28 + .../networkservices/v1/agent_gateway_pb.rb | 41 + .../cloud/networkservices/v1/common_pb.rb | 30 + .../google/cloud/networkservices/v1/dep_pb.rb | 68 + .../networkservices/v1/dep_services_pb.rb | 86 + .../networkservices/v1/endpoint_policy_pb.rb | 34 + .../networkservices/v1/extensibility_pb.rb | 43 + .../cloud/networkservices/v1/gateway_pb.rb | 36 + .../cloud/networkservices/v1/grpc_route_pb.rb | 46 + .../cloud/networkservices/v1/http_route_pb.rb | 53 + .../cloud/networkservices/v1/mesh_pb.rb | 33 + .../networkservices/v1/network_services_pb.rb | 38 + .../v1/network_services_services_pb.rb | 173 + .../cloud/networkservices/v1/route_view_pb.rb | 31 + .../networkservices/v1/service_binding_pb.rb | 33 + .../v1/service_lb_policy_pb.rb | 38 + .../cloud/networkservices/v1/tcp_route_pb.rb | 37 + .../cloud/networkservices/v1/tls_route_pb.rb | 37 + .../proto_docs/README.md | 4 + .../proto_docs/google/api/client.rb | 593 ++ .../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 + .../cloud/networkservices/v1/agent_gateway.rb | 302 + .../google/cloud/networkservices/v1/common.rb | 164 + .../google/cloud/networkservices/v1/dep.rb | 1209 +++ .../networkservices/v1/endpoint_policy.rb | 205 + .../cloud/networkservices/v1/extensibility.rb | 575 ++ .../cloud/networkservices/v1/gateway.rb | 285 + .../cloud/networkservices/v1/grpc_route.rb | 474 ++ .../cloud/networkservices/v1/http_route.rb | 785 ++ .../google/cloud/networkservices/v1/mesh.rb | 170 + .../cloud/networkservices/v1/route_view.rb | 168 + .../networkservices/v1/service_binding.rb | 168 + .../networkservices/v1/service_lb_policy.rb | 258 + .../cloud/networkservices/v1/tcp_route.rb | 263 + .../cloud/networkservices/v1/tls_route.rb | 256 + .../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/struct.rb | 108 + .../proto_docs/google/protobuf/timestamp.rb | 127 + .../proto_docs/google/rpc/status.rb | 48 + .../proto_docs/google/type/expr.rb | 75 + .../snippets/Gemfile | 32 + .../dep_service/create_authz_extension.rb | 54 + .../dep_service/create_lb_edge_extension.rb | 54 + .../dep_service/create_lb_route_extension.rb | 54 + .../create_lb_traffic_extension.rb | 54 + .../dep_service/delete_authz_extension.rb | 54 + .../dep_service/delete_lb_edge_extension.rb | 54 + .../dep_service/delete_lb_route_extension.rb | 54 + .../delete_lb_traffic_extension.rb | 54 + .../dep_service/get_authz_extension.rb | 47 + .../dep_service/get_lb_edge_extension.rb | 47 + .../dep_service/get_lb_route_extension.rb | 47 + .../dep_service/get_lb_traffic_extension.rb | 47 + .../dep_service/list_authz_extensions.rb | 51 + .../dep_service/list_lb_edge_extensions.rb | 51 + .../dep_service/list_lb_route_extensions.rb | 51 + .../dep_service/list_lb_traffic_extensions.rb | 51 + .../dep_service/update_authz_extension.rb | 54 + .../dep_service/update_lb_edge_extension.rb | 54 + .../dep_service/update_lb_route_extension.rb | 54 + .../update_lb_traffic_extension.rb | 54 + .../network_services/create_agent_gateway.rb | 54 + .../create_endpoint_policy.rb | 54 + .../network_services/create_gateway.rb | 54 + .../network_services/create_grpc_route.rb | 54 + .../network_services/create_http_route.rb | 54 + .../snippets/network_services/create_mesh.rb | 54 + .../create_service_binding.rb | 54 + .../create_service_lb_policy.rb | 54 + .../network_services/create_tcp_route.rb | 54 + .../network_services/create_tls_route.rb | 54 + .../network_services/create_wasm_plugin.rb | 54 + .../create_wasm_plugin_version.rb | 54 + .../network_services/delete_agent_gateway.rb | 54 + .../delete_endpoint_policy.rb | 54 + .../network_services/delete_gateway.rb | 54 + .../network_services/delete_grpc_route.rb | 54 + .../network_services/delete_http_route.rb | 54 + .../snippets/network_services/delete_mesh.rb | 54 + .../delete_service_binding.rb | 54 + .../delete_service_lb_policy.rb | 54 + .../network_services/delete_tcp_route.rb | 54 + .../network_services/delete_tls_route.rb | 54 + .../network_services/delete_wasm_plugin.rb | 54 + .../delete_wasm_plugin_version.rb | 54 + .../network_services/get_agent_gateway.rb | 47 + .../network_services/get_endpoint_policy.rb | 47 + .../snippets/network_services/get_gateway.rb | 47 + .../get_gateway_route_view.rb | 47 + .../network_services/get_grpc_route.rb | 47 + .../network_services/get_http_route.rb | 47 + .../snippets/network_services/get_mesh.rb | 47 + .../network_services/get_mesh_route_view.rb | 47 + .../network_services/get_service_binding.rb | 47 + .../network_services/get_service_lb_policy.rb | 47 + .../network_services/get_tcp_route.rb | 47 + .../network_services/get_tls_route.rb | 47 + .../network_services/get_wasm_plugin.rb | 47 + .../get_wasm_plugin_version.rb | 47 + .../network_services/list_agent_gateways.rb | 51 + .../list_endpoint_policies.rb | 51 + .../list_gateway_route_views.rb | 51 + .../network_services/list_gateways.rb | 51 + .../network_services/list_grpc_routes.rb | 51 + .../network_services/list_http_routes.rb | 51 + .../network_services/list_mesh_route_views.rb | 51 + .../snippets/network_services/list_meshes.rb | 51 + .../network_services/list_service_bindings.rb | 51 + .../list_service_lb_policies.rb | 51 + .../network_services/list_tcp_routes.rb | 51 + .../network_services/list_tls_routes.rb | 51 + .../list_wasm_plugin_versions.rb | 51 + .../network_services/list_wasm_plugins.rb | 51 + .../network_services/update_agent_gateway.rb | 54 + .../update_endpoint_policy.rb | 54 + .../network_services/update_gateway.rb | 54 + .../network_services/update_grpc_route.rb | 54 + .../network_services/update_http_route.rb | 54 + .../snippets/network_services/update_mesh.rb | 54 + .../update_service_binding.rb | 54 + .../update_service_lb_policy.rb | 54 + .../network_services/update_tcp_route.rb | 54 + .../network_services/update_tls_route.rb | 54 + .../network_services/update_wasm_plugin.rb | 54 + ...adata_google.cloud.networkservices.v1.json | 3335 ++++++++ .../v1/dep_service_operations_test.rb | 400 + .../v1/dep_service_paths_test.rb | 103 + .../v1/dep_service_rest_test.rb | 1219 +++ .../network_services/v1/dep_service_test.rb | 1438 ++++ .../v1/network_services_operations_test.rb | 400 + .../v1/network_services_paths_test.rb | 355 + .../v1/network_services_rest_test.rb | 3575 +++++++++ .../v1/network_services_test.rb | 4165 ++++++++++ .../test/helper.rb | 26 + 176 files changed, 57594 insertions(+) create mode 100644 owl-bot-staging/google-cloud-network_services-v1/.gitignore create mode 100644 owl-bot-staging/google-cloud-network_services-v1/.repo-metadata.json create mode 100644 owl-bot-staging/google-cloud-network_services-v1/.rubocop.yml create mode 100644 owl-bot-staging/google-cloud-network_services-v1/.toys.rb create mode 100644 owl-bot-staging/google-cloud-network_services-v1/.yardopts create mode 100644 owl-bot-staging/google-cloud-network_services-v1/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-cloud-network_services-v1/CHANGELOG.md create mode 100644 owl-bot-staging/google-cloud-network_services-v1/Gemfile create mode 100644 owl-bot-staging/google-cloud-network_services-v1/LICENSE.md create mode 100644 owl-bot-staging/google-cloud-network_services-v1/README.md create mode 100644 owl-bot-staging/google-cloud-network_services-v1/Rakefile create mode 100644 owl-bot-staging/google-cloud-network_services-v1/gapic_metadata.json create mode 100644 owl-bot-staging/google-cloud-network_services-v1/google-cloud-network_services-v1.gemspec create mode 100644 owl-bot-staging/google-cloud-network_services-v1/lib/google-cloud-network_services-v1.rb create mode 100644 owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1.rb create mode 100644 owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/bindings_override.rb create mode 100644 owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/dep_service.rb create mode 100644 owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/dep_service/client.rb create mode 100644 owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/dep_service/credentials.rb create mode 100644 owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/dep_service/operations.rb create mode 100644 owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/dep_service/paths.rb create mode 100644 owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/dep_service/rest.rb create mode 100644 owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/dep_service/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/dep_service/rest/operations.rb create mode 100644 owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/dep_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/network_services.rb create mode 100644 owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/network_services/client.rb create mode 100644 owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/network_services/credentials.rb create mode 100644 owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/network_services/operations.rb create mode 100644 owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/network_services/paths.rb create mode 100644 owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/network_services/rest.rb create mode 100644 owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/network_services/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/network_services/rest/operations.rb create mode 100644 owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/network_services/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/rest.rb create mode 100644 owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/version.rb create mode 100644 owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/agent_gateway_pb.rb create mode 100644 owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/common_pb.rb create mode 100644 owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/dep_pb.rb create mode 100644 owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/dep_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/endpoint_policy_pb.rb create mode 100644 owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/extensibility_pb.rb create mode 100644 owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/gateway_pb.rb create mode 100644 owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/grpc_route_pb.rb create mode 100644 owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/http_route_pb.rb create mode 100644 owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/mesh_pb.rb create mode 100644 owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/network_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/network_services_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/route_view_pb.rb create mode 100644 owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/service_binding_pb.rb create mode 100644 owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/service_lb_policy_pb.rb create mode 100644 owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/tcp_route_pb.rb create mode 100644 owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/tls_route_pb.rb create mode 100644 owl-bot-staging/google-cloud-network_services-v1/proto_docs/README.md create mode 100644 owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/api/client.rb create mode 100644 owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/api/field_behavior.rb create mode 100644 owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/api/field_info.rb create mode 100644 owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/api/launch_stage.rb create mode 100644 owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/api/resource.rb create mode 100644 owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/agent_gateway.rb create mode 100644 owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/common.rb create mode 100644 owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/dep.rb create mode 100644 owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/endpoint_policy.rb create mode 100644 owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/extensibility.rb create mode 100644 owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/gateway.rb create mode 100644 owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/grpc_route.rb create mode 100644 owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/http_route.rb create mode 100644 owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/mesh.rb create mode 100644 owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/route_view.rb create mode 100644 owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/service_binding.rb create mode 100644 owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/service_lb_policy.rb create mode 100644 owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/tcp_route.rb create mode 100644 owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/tls_route.rb create mode 100644 owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/longrunning/operations.rb create mode 100644 owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/protobuf/any.rb create mode 100644 owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/protobuf/duration.rb create mode 100644 owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/protobuf/empty.rb create mode 100644 owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/protobuf/field_mask.rb create mode 100644 owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/protobuf/struct.rb create mode 100644 owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/protobuf/timestamp.rb create mode 100644 owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/rpc/status.rb create mode 100644 owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/type/expr.rb create mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/Gemfile create mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/create_authz_extension.rb create mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/create_lb_edge_extension.rb create mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/create_lb_route_extension.rb create mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/create_lb_traffic_extension.rb create mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/delete_authz_extension.rb create mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/delete_lb_edge_extension.rb create mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/delete_lb_route_extension.rb create mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/delete_lb_traffic_extension.rb create mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/get_authz_extension.rb create mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/get_lb_edge_extension.rb create mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/get_lb_route_extension.rb create mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/get_lb_traffic_extension.rb create mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/list_authz_extensions.rb create mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/list_lb_edge_extensions.rb create mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/list_lb_route_extensions.rb create mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/list_lb_traffic_extensions.rb create mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/update_authz_extension.rb create mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/update_lb_edge_extension.rb create mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/update_lb_route_extension.rb create mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/update_lb_traffic_extension.rb create mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/create_agent_gateway.rb create mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/create_endpoint_policy.rb create mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/create_gateway.rb create mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/create_grpc_route.rb create mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/create_http_route.rb create mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/create_mesh.rb create mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/create_service_binding.rb create mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/create_service_lb_policy.rb create mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/create_tcp_route.rb create mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/create_tls_route.rb create mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/create_wasm_plugin.rb create mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/create_wasm_plugin_version.rb create mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/delete_agent_gateway.rb create mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/delete_endpoint_policy.rb create mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/delete_gateway.rb create mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/delete_grpc_route.rb create mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/delete_http_route.rb create mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/delete_mesh.rb create mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/delete_service_binding.rb create mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/delete_service_lb_policy.rb create mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/delete_tcp_route.rb create mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/delete_tls_route.rb create mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/delete_wasm_plugin.rb create mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/delete_wasm_plugin_version.rb create mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/get_agent_gateway.rb create mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/get_endpoint_policy.rb create mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/get_gateway.rb create mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/get_gateway_route_view.rb create mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/get_grpc_route.rb create mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/get_http_route.rb create mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/get_mesh.rb create mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/get_mesh_route_view.rb create mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/get_service_binding.rb create mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/get_service_lb_policy.rb create mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/get_tcp_route.rb create mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/get_tls_route.rb create mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/get_wasm_plugin.rb create mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/get_wasm_plugin_version.rb create mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/list_agent_gateways.rb create mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/list_endpoint_policies.rb create mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/list_gateway_route_views.rb create mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/list_gateways.rb create mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/list_grpc_routes.rb create mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/list_http_routes.rb create mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/list_mesh_route_views.rb create mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/list_meshes.rb create mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/list_service_bindings.rb create mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/list_service_lb_policies.rb create mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/list_tcp_routes.rb create mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/list_tls_routes.rb create mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/list_wasm_plugin_versions.rb create mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/list_wasm_plugins.rb create mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/update_agent_gateway.rb create mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/update_endpoint_policy.rb create mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/update_gateway.rb create mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/update_grpc_route.rb create mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/update_http_route.rb create mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/update_mesh.rb create mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/update_service_binding.rb create mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/update_service_lb_policy.rb create mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/update_tcp_route.rb create mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/update_tls_route.rb create mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/update_wasm_plugin.rb create mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/snippet_metadata_google.cloud.networkservices.v1.json create mode 100644 owl-bot-staging/google-cloud-network_services-v1/test/google/cloud/network_services/v1/dep_service_operations_test.rb create mode 100644 owl-bot-staging/google-cloud-network_services-v1/test/google/cloud/network_services/v1/dep_service_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-network_services-v1/test/google/cloud/network_services/v1/dep_service_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-network_services-v1/test/google/cloud/network_services/v1/dep_service_test.rb create mode 100644 owl-bot-staging/google-cloud-network_services-v1/test/google/cloud/network_services/v1/network_services_operations_test.rb create mode 100644 owl-bot-staging/google-cloud-network_services-v1/test/google/cloud/network_services/v1/network_services_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-network_services-v1/test/google/cloud/network_services/v1/network_services_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-network_services-v1/test/google/cloud/network_services/v1/network_services_test.rb create mode 100644 owl-bot-staging/google-cloud-network_services-v1/test/helper.rb diff --git a/owl-bot-staging/google-cloud-network_services-v1/.gitignore b/owl-bot-staging/google-cloud-network_services-v1/.gitignore new file mode 100644 index 000000000000..0135b6bc6cfc --- /dev/null +++ b/owl-bot-staging/google-cloud-network_services-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_services-v1/.repo-metadata.json b/owl-bot-staging/google-cloud-network_services-v1/.repo-metadata.json new file mode 100644 index 000000000000..22508f7ad38b --- /dev/null +++ b/owl-bot-staging/google-cloud-network_services-v1/.repo-metadata.json @@ -0,0 +1,17 @@ +{ + "api_id": "networkservices.googleapis.com", + "api_shortname": "networkservices", + "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-network_services-v1/latest", + "distribution_name": "google-cloud-network_services-v1", + "is_cloud": true, + "language": "ruby", + "name": "networkservices", + "name_pretty": "Network Services V1 API", + "product_documentation": "https://cloud.google.com/products/networking", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "google-cloud-network_services-v1 is the official client library for the Network Services V1 API. Note that google-cloud-network_services-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-network_services instead. See the readme for more details.", + "ruby-cloud-product-url": "https://cloud.google.com/products/networking", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-cloud-network_services-v1/.rubocop.yml b/owl-bot-staging/google-cloud-network_services-v1/.rubocop.yml new file mode 100644 index 000000000000..7cf0c71c9775 --- /dev/null +++ b/owl-bot-staging/google-cloud-network_services-v1/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-cloud-network_services-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_services-v1.rb" diff --git a/owl-bot-staging/google-cloud-network_services-v1/.toys.rb b/owl-bot-staging/google-cloud-network_services-v1/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-cloud-network_services-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_services-v1/.yardopts b/owl-bot-staging/google-cloud-network_services-v1/.yardopts new file mode 100644 index 000000000000..386b136a01eb --- /dev/null +++ b/owl-bot-staging/google-cloud-network_services-v1/.yardopts @@ -0,0 +1,12 @@ +--no-private +--title="Network Services 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_services-v1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-network_services-v1/AUTHENTICATION.md new file mode 100644 index 000000000000..9d309720ea10 --- /dev/null +++ b/owl-bot-staging/google-cloud-network_services-v1/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-cloud-network_services-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_services-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_services/v1" + +client = ::Google::Cloud::NetworkServices::V1::DepService::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_services/v1" + +::Google::Cloud::NetworkServices::V1::DepService::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Cloud::NetworkServices::V1::DepService::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_services-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_services/v1" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Cloud::NetworkServices::V1::DepService::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_services-v1/CHANGELOG.md b/owl-bot-staging/google-cloud-network_services-v1/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-cloud-network_services-v1/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-cloud-network_services-v1/Gemfile b/owl-bot-staging/google-cloud-network_services-v1/Gemfile new file mode 100644 index 000000000000..1d08558908d8 --- /dev/null +++ b/owl-bot-staging/google-cloud-network_services-v1/Gemfile @@ -0,0 +1,14 @@ +source "https://rubygems.org" + +gemspec + +gem "google-style", "~> 1.32.0" +gem "irb", "~> 1.17" +gem "minitest", "~> 6.0.2" +gem "minitest-focus", "~> 1.4" +gem "minitest-mock", "~> 5.27" +gem "minitest-rg", "~> 5.3" +gem "ostruct", "~> 0.5.5" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-network_services-v1/LICENSE.md b/owl-bot-staging/google-cloud-network_services-v1/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-cloud-network_services-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_services-v1/README.md b/owl-bot-staging/google-cloud-network_services-v1/README.md new file mode 100644 index 000000000000..2c9d05e41146 --- /dev/null +++ b/owl-bot-staging/google-cloud-network_services-v1/README.md @@ -0,0 +1,154 @@ +# Ruby Client for the Network Services V1 API + +API Client library for the Network Services V1 API + +google-cloud-network_services-v1 is the official client library for the Network Services V1 API. + +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 Services V1 API. Most users should consider using +the main client gem, +[google-cloud-network_services](https://rubygems.org/gems/google-cloud-network_services). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-cloud-network_services-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/networkservices.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## Quick Start + +```ruby +require "google/cloud/network_services/v1" + +client = ::Google::Cloud::NetworkServices::V1::DepService::Client.new +request = ::Google::Cloud::NetworkServices::V1::ListLbTrafficExtensionsRequest.new # (request fields as keyword arguments...) +response = client.list_lb_traffic_extensions request +``` + +View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-network_services-v1/latest) +for class and method documentation. + +See also the [Product Documentation](https://cloud.google.com/products/networking) +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_services/v1" +require "logger" + +client = ::Google::Cloud::NetworkServices::V1::DepService::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.2+. + +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_services`, +and lower-level _versioned_ client libraries with names such as +`google-cloud-network_services-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_services`. +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_services-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_services-v1/Rakefile b/owl-bot-staging/google-cloud-network_services-v1/Rakefile new file mode 100644 index 000000000000..40c3ff775533 --- /dev/null +++ b/owl-bot-staging/google-cloud-network_services-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_services-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_services/v1/dep_service/credentials" + ::Google::Cloud::NetworkServices::V1::DepService::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_services-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_services-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_services-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_services-v1 gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-cloud-network_services-v1" + header "google-cloud-network_services-v1 rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-cloud-network_services-v1 yard", "*" + Rake::Task[:yard].invoke + header "google-cloud-network_services-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_services-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_services-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_services-v1/gapic_metadata.json b/owl-bot-staging/google-cloud-network_services-v1/gapic_metadata.json new file mode 100644 index 000000000000..b9bc5946fba2 --- /dev/null +++ b/owl-bot-staging/google-cloud-network_services-v1/gapic_metadata.json @@ -0,0 +1,442 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "ruby", + "protoPackage": "google.cloud.networkservices.v1", + "libraryPackage": "::Google::Cloud::NetworkServices::V1", + "services": { + "DepService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::NetworkServices::V1::DepService::Client", + "rpcs": { + "ListLbTrafficExtensions": { + "methods": [ + "list_lb_traffic_extensions" + ] + }, + "GetLbTrafficExtension": { + "methods": [ + "get_lb_traffic_extension" + ] + }, + "CreateLbTrafficExtension": { + "methods": [ + "create_lb_traffic_extension" + ] + }, + "UpdateLbTrafficExtension": { + "methods": [ + "update_lb_traffic_extension" + ] + }, + "DeleteLbTrafficExtension": { + "methods": [ + "delete_lb_traffic_extension" + ] + }, + "ListLbRouteExtensions": { + "methods": [ + "list_lb_route_extensions" + ] + }, + "GetLbRouteExtension": { + "methods": [ + "get_lb_route_extension" + ] + }, + "CreateLbRouteExtension": { + "methods": [ + "create_lb_route_extension" + ] + }, + "UpdateLbRouteExtension": { + "methods": [ + "update_lb_route_extension" + ] + }, + "DeleteLbRouteExtension": { + "methods": [ + "delete_lb_route_extension" + ] + }, + "ListLbEdgeExtensions": { + "methods": [ + "list_lb_edge_extensions" + ] + }, + "GetLbEdgeExtension": { + "methods": [ + "get_lb_edge_extension" + ] + }, + "CreateLbEdgeExtension": { + "methods": [ + "create_lb_edge_extension" + ] + }, + "UpdateLbEdgeExtension": { + "methods": [ + "update_lb_edge_extension" + ] + }, + "DeleteLbEdgeExtension": { + "methods": [ + "delete_lb_edge_extension" + ] + }, + "ListAuthzExtensions": { + "methods": [ + "list_authz_extensions" + ] + }, + "GetAuthzExtension": { + "methods": [ + "get_authz_extension" + ] + }, + "CreateAuthzExtension": { + "methods": [ + "create_authz_extension" + ] + }, + "UpdateAuthzExtension": { + "methods": [ + "update_authz_extension" + ] + }, + "DeleteAuthzExtension": { + "methods": [ + "delete_authz_extension" + ] + } + } + } + } + }, + "NetworkServices": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client", + "rpcs": { + "ListEndpointPolicies": { + "methods": [ + "list_endpoint_policies" + ] + }, + "GetEndpointPolicy": { + "methods": [ + "get_endpoint_policy" + ] + }, + "CreateEndpointPolicy": { + "methods": [ + "create_endpoint_policy" + ] + }, + "UpdateEndpointPolicy": { + "methods": [ + "update_endpoint_policy" + ] + }, + "DeleteEndpointPolicy": { + "methods": [ + "delete_endpoint_policy" + ] + }, + "ListWasmPluginVersions": { + "methods": [ + "list_wasm_plugin_versions" + ] + }, + "GetWasmPluginVersion": { + "methods": [ + "get_wasm_plugin_version" + ] + }, + "CreateWasmPluginVersion": { + "methods": [ + "create_wasm_plugin_version" + ] + }, + "DeleteWasmPluginVersion": { + "methods": [ + "delete_wasm_plugin_version" + ] + }, + "ListWasmPlugins": { + "methods": [ + "list_wasm_plugins" + ] + }, + "GetWasmPlugin": { + "methods": [ + "get_wasm_plugin" + ] + }, + "CreateWasmPlugin": { + "methods": [ + "create_wasm_plugin" + ] + }, + "UpdateWasmPlugin": { + "methods": [ + "update_wasm_plugin" + ] + }, + "DeleteWasmPlugin": { + "methods": [ + "delete_wasm_plugin" + ] + }, + "ListGateways": { + "methods": [ + "list_gateways" + ] + }, + "GetGateway": { + "methods": [ + "get_gateway" + ] + }, + "CreateGateway": { + "methods": [ + "create_gateway" + ] + }, + "UpdateGateway": { + "methods": [ + "update_gateway" + ] + }, + "DeleteGateway": { + "methods": [ + "delete_gateway" + ] + }, + "ListGrpcRoutes": { + "methods": [ + "list_grpc_routes" + ] + }, + "GetGrpcRoute": { + "methods": [ + "get_grpc_route" + ] + }, + "CreateGrpcRoute": { + "methods": [ + "create_grpc_route" + ] + }, + "UpdateGrpcRoute": { + "methods": [ + "update_grpc_route" + ] + }, + "DeleteGrpcRoute": { + "methods": [ + "delete_grpc_route" + ] + }, + "ListHttpRoutes": { + "methods": [ + "list_http_routes" + ] + }, + "GetHttpRoute": { + "methods": [ + "get_http_route" + ] + }, + "CreateHttpRoute": { + "methods": [ + "create_http_route" + ] + }, + "UpdateHttpRoute": { + "methods": [ + "update_http_route" + ] + }, + "DeleteHttpRoute": { + "methods": [ + "delete_http_route" + ] + }, + "ListTcpRoutes": { + "methods": [ + "list_tcp_routes" + ] + }, + "GetTcpRoute": { + "methods": [ + "get_tcp_route" + ] + }, + "CreateTcpRoute": { + "methods": [ + "create_tcp_route" + ] + }, + "UpdateTcpRoute": { + "methods": [ + "update_tcp_route" + ] + }, + "DeleteTcpRoute": { + "methods": [ + "delete_tcp_route" + ] + }, + "ListTlsRoutes": { + "methods": [ + "list_tls_routes" + ] + }, + "GetTlsRoute": { + "methods": [ + "get_tls_route" + ] + }, + "CreateTlsRoute": { + "methods": [ + "create_tls_route" + ] + }, + "UpdateTlsRoute": { + "methods": [ + "update_tls_route" + ] + }, + "DeleteTlsRoute": { + "methods": [ + "delete_tls_route" + ] + }, + "ListServiceBindings": { + "methods": [ + "list_service_bindings" + ] + }, + "GetServiceBinding": { + "methods": [ + "get_service_binding" + ] + }, + "CreateServiceBinding": { + "methods": [ + "create_service_binding" + ] + }, + "UpdateServiceBinding": { + "methods": [ + "update_service_binding" + ] + }, + "DeleteServiceBinding": { + "methods": [ + "delete_service_binding" + ] + }, + "ListMeshes": { + "methods": [ + "list_meshes" + ] + }, + "GetMesh": { + "methods": [ + "get_mesh" + ] + }, + "CreateMesh": { + "methods": [ + "create_mesh" + ] + }, + "UpdateMesh": { + "methods": [ + "update_mesh" + ] + }, + "DeleteMesh": { + "methods": [ + "delete_mesh" + ] + }, + "ListServiceLbPolicies": { + "methods": [ + "list_service_lb_policies" + ] + }, + "GetServiceLbPolicy": { + "methods": [ + "get_service_lb_policy" + ] + }, + "CreateServiceLbPolicy": { + "methods": [ + "create_service_lb_policy" + ] + }, + "UpdateServiceLbPolicy": { + "methods": [ + "update_service_lb_policy" + ] + }, + "DeleteServiceLbPolicy": { + "methods": [ + "delete_service_lb_policy" + ] + }, + "GetGatewayRouteView": { + "methods": [ + "get_gateway_route_view" + ] + }, + "GetMeshRouteView": { + "methods": [ + "get_mesh_route_view" + ] + }, + "ListGatewayRouteViews": { + "methods": [ + "list_gateway_route_views" + ] + }, + "ListMeshRouteViews": { + "methods": [ + "list_mesh_route_views" + ] + }, + "ListAgentGateways": { + "methods": [ + "list_agent_gateways" + ] + }, + "GetAgentGateway": { + "methods": [ + "get_agent_gateway" + ] + }, + "CreateAgentGateway": { + "methods": [ + "create_agent_gateway" + ] + }, + "UpdateAgentGateway": { + "methods": [ + "update_agent_gateway" + ] + }, + "DeleteAgentGateway": { + "methods": [ + "delete_agent_gateway" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-cloud-network_services-v1/google-cloud-network_services-v1.gemspec b/owl-bot-staging/google-cloud-network_services-v1/google-cloud-network_services-v1.gemspec new file mode 100644 index 000000000000..69e143b54323 --- /dev/null +++ b/owl-bot-staging/google-cloud-network_services-v1/google-cloud-network_services-v1.gemspec @@ -0,0 +1,30 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/cloud/network_services/v1/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-cloud-network_services-v1" + gem.version = Google::Cloud::NetworkServices::V1::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "google-cloud-network_services-v1 is the official client library for the Network Services V1 API. Note that google-cloud-network_services-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-network_services instead. See the readme for more details." + gem.summary = "API Client library for the Network Services V1 API" + 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.2" + + gem.add_dependency "gapic-common", "~> 1.3" + 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_services-v1/lib/google-cloud-network_services-v1.rb b/owl-bot-staging/google-cloud-network_services-v1/lib/google-cloud-network_services-v1.rb new file mode 100644 index 000000000000..3a282b9851bf --- /dev/null +++ b/owl-bot-staging/google-cloud-network_services-v1/lib/google-cloud-network_services-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_services/v1" diff --git a/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1.rb b/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1.rb new file mode 100644 index 000000000000..b9f5c2321503 --- /dev/null +++ b/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1.rb @@ -0,0 +1,46 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/network_services/v1/dep_service" +require "google/cloud/network_services/v1/network_services" +require "google/cloud/network_services/v1/version" + +module Google + module Cloud + module NetworkServices + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/cloud/network_services/v1" + # client = ::Google::Cloud::NetworkServices::V1::DepService::Client.new + # + # @example Load this package, including all its services, and instantiate a REST client + # + # require "google/cloud/network_services/v1" + # client = ::Google::Cloud::NetworkServices::V1::DepService::Rest::Client.new + # + module V1 + end + end + end +end + +helper_path = ::File.join __dir__, "v1", "_helpers.rb" +require "google/cloud/network_services/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/bindings_override.rb b/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/bindings_override.rb new file mode 100644 index 000000000000..dd83f9cbf7ab --- /dev/null +++ b/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/bindings_override.rb @@ -0,0 +1,252 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 NetworkServices + ## + # @example Loading just the REST part of this package, including all its services, and instantiating a REST client + # + # require "google/cloud/network_services/v1/rest" + # client = ::Google::Cloud::NetworkServices::V1::DepService::Rest::Client.new + # + module V1 + ## + # @private + # Initialize the mixin bindings configuration + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "NetworkServices"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + + default_config = ::Gapic::Rest::HttpBindingOverrideConfiguration.new parent_config + default_config.bindings_override["google.cloud.location.Locations.GetLocation"] = [ + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ], + body: nil + ) + ] + default_config.bindings_override["google.cloud.location.Locations.ListLocations"] = [ + + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :get, + uri_template: "/v1/{name}/locations", + matches: [ + ["name", %r{^projects/[^/]+/?$}, false] + ], + body: nil + ) + ] + default_config.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/[^/]+/edgeCacheKeysets/[^/]+/?$}, false] + ], + body: nil + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :get, + uri_template: "/v1/{resource}:getIamPolicy", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/edgeCacheOrigins/[^/]+/?$}, false] + ], + body: nil + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :get, + uri_template: "/v1/{resource}:getIamPolicy", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/edgeCacheServices/[^/]+/?$}, false] + ], + body: nil + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :get, + uri_template: "/v1/{resource}:getIamPolicy", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/endpointPolicies/[^/]+/?$}, false] + ], + body: nil + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :get, + uri_template: "/v1/{resource}:getIamPolicy", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/serviceBindings/[^/]+/?$}, false] + ], + body: nil + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :get, + uri_template: "/v1/{resource}:getIamPolicy", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/meshes/[^/]+/?$}, false] + ], + body: nil + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :get, + uri_template: "/v1/{resource}:getIamPolicy", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/gateways/[^/]+/?$}, 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/[^/]+/edgeCacheKeysets/[^/]+/?$}, false] + ], + body: "*" + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :post, + uri_template: "/v1/{resource}:setIamPolicy", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/edgeCacheOrigins/[^/]+/?$}, false] + ], + body: "*" + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :post, + uri_template: "/v1/{resource}:setIamPolicy", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/edgeCacheServices/[^/]+/?$}, false] + ], + body: "*" + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :post, + uri_template: "/v1/{resource}:setIamPolicy", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/endpointPolicies/[^/]+/?$}, false] + ], + body: "*" + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :post, + uri_template: "/v1/{resource}:setIamPolicy", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/serviceBindings/[^/]+/?$}, false] + ], + body: "*" + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :post, + uri_template: "/v1/{resource}:setIamPolicy", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/meshes/[^/]+/?$}, false] + ], + body: "*" + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :post, + uri_template: "/v1/{resource}:setIamPolicy", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/gateways/[^/]+/?$}, 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/[^/]+/edgeCacheKeysets/[^/]+/?$}, false] + ], + body: "*" + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :post, + uri_template: "/v1/{resource}:testIamPermissions", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/edgeCacheOrigins/[^/]+/?$}, false] + ], + body: "*" + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :post, + uri_template: "/v1/{resource}:testIamPermissions", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/edgeCacheServices/[^/]+/?$}, false] + ], + body: "*" + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :post, + uri_template: "/v1/{resource}:testIamPermissions", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/endpointPolicies/[^/]+/?$}, false] + ], + body: "*" + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :post, + uri_template: "/v1/{resource}:testIamPermissions", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/serviceBindings/[^/]+/?$}, false] + ], + body: "*" + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :post, + uri_template: "/v1/{resource}:testIamPermissions", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/meshes/[^/]+/?$}, false] + ], + body: "*" + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :post, + uri_template: "/v1/{resource}:testIamPermissions", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/gateways/[^/]+/?$}, 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_services-v1/lib/google/cloud/network_services/v1/dep_service.rb b/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/dep_service.rb new file mode 100644 index 000000000000..90828e3419ac --- /dev/null +++ b/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/dep_service.rb @@ -0,0 +1,56 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/network_services/v1/version" + +require "google/cloud/network_services/v1/dep_service/credentials" +require "google/cloud/network_services/v1/dep_service/paths" +require "google/cloud/network_services/v1/dep_service/operations" +require "google/cloud/network_services/v1/dep_service/client" +require "google/cloud/network_services/v1/dep_service/rest" + +module Google + module Cloud + module NetworkServices + module V1 + ## + # Service describing handlers for resources. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/network_services/v1/dep_service" + # client = ::Google::Cloud::NetworkServices::V1::DepService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/network_services/v1/dep_service/rest" + # client = ::Google::Cloud::NetworkServices::V1::DepService::Rest::Client.new + # + module DepService + end + end + end + end +end + +helper_path = ::File.join __dir__, "dep_service", "helpers.rb" +require "google/cloud/network_services/v1/dep_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/dep_service/client.rb b/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/dep_service/client.rb new file mode 100644 index 000000000000..554ebe4a2ca0 --- /dev/null +++ b/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/dep_service/client.rb @@ -0,0 +1,2670 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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/networkservices/v1/dep_pb" +require "google/cloud/location" +require "google/iam/v1" + +module Google + module Cloud + module NetworkServices + module V1 + module DepService + ## + # Client for the DepService service. + # + # Service describing handlers for resources. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "networkservices.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :dep_service_stub + + ## + # Configure the DepService Client class. + # + # See {::Google::Cloud::NetworkServices::V1::DepService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all DepService clients + # ::Google::Cloud::NetworkServices::V1::DepService::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", "NetworkServices", "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 DepService 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::NetworkServices::V1::DepService::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 + @dep_service_stub.universe_domain + end + + ## + # Create a new DepService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::NetworkServices::V1::DepService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::NetworkServices::V1::DepService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the DepService 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/networkservices/v1/dep_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 + + @dep_service_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::NetworkServices::V1::DepService::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 + ) + + @dep_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 = @dep_service_stub.endpoint + config.universe_domain = @dep_service_stub.universe_domain + config.logger = @dep_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 = @dep_service_stub.endpoint + config.universe_domain = @dep_service_stub.universe_domain + config.logger = @dep_service_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::NetworkServices::V1::DepService::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 + @dep_service_stub.logger + end + + # Service calls + + ## + # Lists `LbTrafficExtension` resources in a given project and location. + # + # @overload list_lb_traffic_extensions(request, options = nil) + # Pass arguments to `list_lb_traffic_extensions` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::ListLbTrafficExtensionsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::ListLbTrafficExtensionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_lb_traffic_extensions(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_lb_traffic_extensions` via keyword arguments. Note that at + # least one keyword argument is 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 project and location from which the `LbTrafficExtension` + # resources are listed. These values are specified in the following format: + # `projects/{project}/locations/{location}`. + # @param page_size [::Integer] + # Optional. Requested page size. The server might return fewer items than + # requested. If unspecified, the server picks an appropriate default. + # @param page_token [::String] + # Optional. A token identifying a page of results that the server returns. + # @param filter [::String] + # Optional. Filtering results. + # @param order_by [::String] + # Optional. Hint about how to order the results. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::NetworkServices::V1::LbTrafficExtension>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::NetworkServices::V1::LbTrafficExtension>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/network_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::DepService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::ListLbTrafficExtensionsRequest.new + # + # # Call the list_lb_traffic_extensions method. + # result = client.list_lb_traffic_extensions 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::NetworkServices::V1::LbTrafficExtension. + # p item + # end + # + def list_lb_traffic_extensions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::ListLbTrafficExtensionsRequest + + # Converts hash 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_lb_traffic_extensions.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::NetworkServices::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_lb_traffic_extensions.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_lb_traffic_extensions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dep_service_stub.call_rpc :list_lb_traffic_extensions, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @dep_service_stub, :list_lb_traffic_extensions, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets details of the specified `LbTrafficExtension` resource. + # + # @overload get_lb_traffic_extension(request, options = nil) + # Pass arguments to `get_lb_traffic_extension` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::GetLbTrafficExtensionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::GetLbTrafficExtensionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_lb_traffic_extension(name: nil) + # Pass arguments to `get_lb_traffic_extension` via keyword arguments. Note that at + # least one keyword argument is 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. A name of the `LbTrafficExtension` resource to get. Must be in + # the format + # `projects/{project}/locations/{location}/lbTrafficExtensions/{lb_traffic_extension}`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::NetworkServices::V1::LbTrafficExtension] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::NetworkServices::V1::LbTrafficExtension] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/network_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::DepService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::GetLbTrafficExtensionRequest.new + # + # # Call the get_lb_traffic_extension method. + # result = client.get_lb_traffic_extension request + # + # # The returned object is of type Google::Cloud::NetworkServices::V1::LbTrafficExtension. + # p result + # + def get_lb_traffic_extension request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::GetLbTrafficExtensionRequest + + # Converts hash 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_lb_traffic_extension.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::NetworkServices::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_lb_traffic_extension.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_lb_traffic_extension.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dep_service_stub.call_rpc :get_lb_traffic_extension, 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 `LbTrafficExtension` resource in a given project and + # location. + # + # @overload create_lb_traffic_extension(request, options = nil) + # Pass arguments to `create_lb_traffic_extension` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::CreateLbTrafficExtensionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::CreateLbTrafficExtensionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_lb_traffic_extension(parent: nil, lb_traffic_extension_id: nil, lb_traffic_extension: nil, request_id: nil) + # Pass arguments to `create_lb_traffic_extension` via keyword arguments. Note that at + # least one keyword argument is 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 `LbTrafficExtension` resource. Must be + # in the format `projects/{project}/locations/{location}`. + # @param lb_traffic_extension_id [::String] + # Required. User-provided ID of the `LbTrafficExtension` resource to be + # created. + # @param lb_traffic_extension [::Google::Cloud::NetworkServices::V1::LbTrafficExtension, ::Hash] + # Required. `LbTrafficExtension` resource to be created. + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server can ignore + # the request if it has already been completed. The server guarantees + # that for 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server ignores the second request This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # + # @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_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::DepService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::CreateLbTrafficExtensionRequest.new + # + # # Call the create_lb_traffic_extension method. + # result = client.create_lb_traffic_extension 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_lb_traffic_extension request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::CreateLbTrafficExtensionRequest + + # Converts hash 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_lb_traffic_extension.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::NetworkServices::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_lb_traffic_extension.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_lb_traffic_extension.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dep_service_stub.call_rpc :create_lb_traffic_extension, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates the parameters of the specified `LbTrafficExtension` resource. + # + # @overload update_lb_traffic_extension(request, options = nil) + # Pass arguments to `update_lb_traffic_extension` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::UpdateLbTrafficExtensionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::UpdateLbTrafficExtensionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_lb_traffic_extension(update_mask: nil, lb_traffic_extension: nil, request_id: nil) + # Pass arguments to `update_lb_traffic_extension` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. Used to specify the fields to be overwritten in the + # `LbTrafficExtension` resource by the update. + # The fields specified in the `update_mask` are relative to the resource, not + # the full request. A field is overwritten if it is in the mask. If the + # user does not specify a mask, then all fields are overwritten. + # @param lb_traffic_extension [::Google::Cloud::NetworkServices::V1::LbTrafficExtension, ::Hash] + # Required. `LbTrafficExtension` resource being updated. + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server can ignore + # the request if it has already been completed. The server guarantees + # that for 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server ignores the second request This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # + # @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_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::DepService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::UpdateLbTrafficExtensionRequest.new + # + # # Call the update_lb_traffic_extension method. + # result = client.update_lb_traffic_extension 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_lb_traffic_extension request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::UpdateLbTrafficExtensionRequest + + # Converts hash 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_lb_traffic_extension.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::NetworkServices::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.lb_traffic_extension&.name + header_params["lb_traffic_extension.name"] = request.lb_traffic_extension.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_lb_traffic_extension.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_lb_traffic_extension.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dep_service_stub.call_rpc :update_lb_traffic_extension, 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 the specified `LbTrafficExtension` resource. + # + # @overload delete_lb_traffic_extension(request, options = nil) + # Pass arguments to `delete_lb_traffic_extension` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::DeleteLbTrafficExtensionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::DeleteLbTrafficExtensionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_lb_traffic_extension(name: nil, request_id: nil) + # Pass arguments to `delete_lb_traffic_extension` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the `LbTrafficExtension` resource to delete. Must be + # in the format + # `projects/{project}/locations/{location}/lbTrafficExtensions/{lb_traffic_extension}`. + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server can ignore + # the request if it has already been completed. The server guarantees + # that for 60 minutes after the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server ignores the second request This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # + # @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_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::DepService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::DeleteLbTrafficExtensionRequest.new + # + # # Call the delete_lb_traffic_extension method. + # result = client.delete_lb_traffic_extension 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_lb_traffic_extension request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::DeleteLbTrafficExtensionRequest + + # Converts hash 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_lb_traffic_extension.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::NetworkServices::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_lb_traffic_extension.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_lb_traffic_extension.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dep_service_stub.call_rpc :delete_lb_traffic_extension, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists `LbRouteExtension` resources in a given project and location. + # + # @overload list_lb_route_extensions(request, options = nil) + # Pass arguments to `list_lb_route_extensions` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::ListLbRouteExtensionsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::ListLbRouteExtensionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_lb_route_extensions(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_lb_route_extensions` via keyword arguments. Note that at + # least one keyword argument is 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 project and location from which the `LbRouteExtension` + # resources are listed. These values are specified in the following format: + # `projects/{project}/locations/{location}`. + # @param page_size [::Integer] + # Optional. Requested page size. The server might return fewer items than + # requested. If unspecified, the server picks an appropriate default. + # @param page_token [::String] + # Optional. A token identifying a page of results that the server returns. + # @param filter [::String] + # Optional. Filtering results. + # @param order_by [::String] + # Optional. Hint about how to order the results. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::NetworkServices::V1::LbRouteExtension>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::NetworkServices::V1::LbRouteExtension>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/network_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::DepService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::ListLbRouteExtensionsRequest.new + # + # # Call the list_lb_route_extensions method. + # result = client.list_lb_route_extensions 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::NetworkServices::V1::LbRouteExtension. + # p item + # end + # + def list_lb_route_extensions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::ListLbRouteExtensionsRequest + + # Converts hash 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_lb_route_extensions.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::NetworkServices::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_lb_route_extensions.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_lb_route_extensions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dep_service_stub.call_rpc :list_lb_route_extensions, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @dep_service_stub, :list_lb_route_extensions, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets details of the specified `LbRouteExtension` resource. + # + # @overload get_lb_route_extension(request, options = nil) + # Pass arguments to `get_lb_route_extension` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::GetLbRouteExtensionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::GetLbRouteExtensionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_lb_route_extension(name: nil) + # Pass arguments to `get_lb_route_extension` via keyword arguments. Note that at + # least one keyword argument is 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. A name of the `LbRouteExtension` resource to get. Must be in the + # format + # `projects/{project}/locations/{location}/lbRouteExtensions/{lb_route_extension}`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::NetworkServices::V1::LbRouteExtension] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::NetworkServices::V1::LbRouteExtension] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/network_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::DepService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::GetLbRouteExtensionRequest.new + # + # # Call the get_lb_route_extension method. + # result = client.get_lb_route_extension request + # + # # The returned object is of type Google::Cloud::NetworkServices::V1::LbRouteExtension. + # p result + # + def get_lb_route_extension request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::GetLbRouteExtensionRequest + + # Converts hash 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_lb_route_extension.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::NetworkServices::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_lb_route_extension.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_lb_route_extension.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dep_service_stub.call_rpc :get_lb_route_extension, 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 `LbRouteExtension` resource in a given project and location. + # + # @overload create_lb_route_extension(request, options = nil) + # Pass arguments to `create_lb_route_extension` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::CreateLbRouteExtensionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::CreateLbRouteExtensionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_lb_route_extension(parent: nil, lb_route_extension_id: nil, lb_route_extension: nil, request_id: nil) + # Pass arguments to `create_lb_route_extension` via keyword arguments. Note that at + # least one keyword argument is 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 `LbRouteExtension` resource. Must be + # in the format `projects/{project}/locations/{location}`. + # @param lb_route_extension_id [::String] + # Required. User-provided ID of the `LbRouteExtension` resource to be + # created. + # @param lb_route_extension [::Google::Cloud::NetworkServices::V1::LbRouteExtension, ::Hash] + # Required. `LbRouteExtension` resource to be created. + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server can ignore + # the request if it has already been completed. The server guarantees + # that for 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server ignores the second request This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # + # @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_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::DepService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::CreateLbRouteExtensionRequest.new + # + # # Call the create_lb_route_extension method. + # result = client.create_lb_route_extension 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_lb_route_extension request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::CreateLbRouteExtensionRequest + + # Converts hash 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_lb_route_extension.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::NetworkServices::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_lb_route_extension.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_lb_route_extension.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dep_service_stub.call_rpc :create_lb_route_extension, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates the parameters of the specified `LbRouteExtension` resource. + # + # @overload update_lb_route_extension(request, options = nil) + # Pass arguments to `update_lb_route_extension` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::UpdateLbRouteExtensionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::UpdateLbRouteExtensionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_lb_route_extension(update_mask: nil, lb_route_extension: nil, request_id: nil) + # Pass arguments to `update_lb_route_extension` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. Used to specify the fields to be overwritten in the + # `LbRouteExtension` resource by the update. + # The fields specified in the `update_mask` are relative to the resource, not + # the full request. A field is overwritten if it is in the mask. If the + # user does not specify a mask, then all fields are overwritten. + # @param lb_route_extension [::Google::Cloud::NetworkServices::V1::LbRouteExtension, ::Hash] + # Required. `LbRouteExtension` resource being updated. + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server can ignore + # the request if it has already been completed. The server guarantees + # that for 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server ignores the second request This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # + # @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_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::DepService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::UpdateLbRouteExtensionRequest.new + # + # # Call the update_lb_route_extension method. + # result = client.update_lb_route_extension 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_lb_route_extension request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::UpdateLbRouteExtensionRequest + + # Converts hash 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_lb_route_extension.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::NetworkServices::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.lb_route_extension&.name + header_params["lb_route_extension.name"] = request.lb_route_extension.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_lb_route_extension.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_lb_route_extension.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dep_service_stub.call_rpc :update_lb_route_extension, 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 the specified `LbRouteExtension` resource. + # + # @overload delete_lb_route_extension(request, options = nil) + # Pass arguments to `delete_lb_route_extension` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::DeleteLbRouteExtensionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::DeleteLbRouteExtensionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_lb_route_extension(name: nil, request_id: nil) + # Pass arguments to `delete_lb_route_extension` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the `LbRouteExtension` resource to delete. Must be in + # the format + # `projects/{project}/locations/{location}/lbRouteExtensions/{lb_route_extension}`. + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server can ignore + # the request if it has already been completed. The server guarantees + # that for 60 minutes after the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server ignores the second request This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # + # @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_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::DepService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::DeleteLbRouteExtensionRequest.new + # + # # Call the delete_lb_route_extension method. + # result = client.delete_lb_route_extension 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_lb_route_extension request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::DeleteLbRouteExtensionRequest + + # Converts hash 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_lb_route_extension.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::NetworkServices::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_lb_route_extension.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_lb_route_extension.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dep_service_stub.call_rpc :delete_lb_route_extension, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists `LbEdgeExtension` resources in a given project and location. + # + # @overload list_lb_edge_extensions(request, options = nil) + # Pass arguments to `list_lb_edge_extensions` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::ListLbEdgeExtensionsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::ListLbEdgeExtensionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_lb_edge_extensions(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_lb_edge_extensions` via keyword arguments. Note that at + # least one keyword argument is 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 project and location from which the `LbEdgeExtension` + # resources are listed. These values are specified in the following format: + # `projects/{project}/locations/{location}`. + # @param page_size [::Integer] + # Optional. Requested page size. The server might return fewer items than + # requested. If unspecified, the server picks an appropriate default. + # @param page_token [::String] + # Optional. A token identifying a page of results that the server returns. + # @param filter [::String] + # Optional. Filtering results. + # @param order_by [::String] + # Optional. Hint about how to order the results. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::NetworkServices::V1::LbEdgeExtension>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::NetworkServices::V1::LbEdgeExtension>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/network_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::DepService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::ListLbEdgeExtensionsRequest.new + # + # # Call the list_lb_edge_extensions method. + # result = client.list_lb_edge_extensions 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::NetworkServices::V1::LbEdgeExtension. + # p item + # end + # + def list_lb_edge_extensions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::ListLbEdgeExtensionsRequest + + # Converts hash 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_lb_edge_extensions.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::NetworkServices::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_lb_edge_extensions.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_lb_edge_extensions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dep_service_stub.call_rpc :list_lb_edge_extensions, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @dep_service_stub, :list_lb_edge_extensions, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets details of the specified `LbEdgeExtension` resource. + # + # @overload get_lb_edge_extension(request, options = nil) + # Pass arguments to `get_lb_edge_extension` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::GetLbEdgeExtensionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::GetLbEdgeExtensionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_lb_edge_extension(name: nil) + # Pass arguments to `get_lb_edge_extension` via keyword arguments. Note that at + # least one keyword argument is 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. A name of the `LbEdgeExtension` resource to get. Must be in the + # format + # `projects/{project}/locations/{location}/lbEdgeExtensions/{lb_edge_extension}`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::NetworkServices::V1::LbEdgeExtension] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::NetworkServices::V1::LbEdgeExtension] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/network_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::DepService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::GetLbEdgeExtensionRequest.new + # + # # Call the get_lb_edge_extension method. + # result = client.get_lb_edge_extension request + # + # # The returned object is of type Google::Cloud::NetworkServices::V1::LbEdgeExtension. + # p result + # + def get_lb_edge_extension request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::GetLbEdgeExtensionRequest + + # Converts hash 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_lb_edge_extension.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::NetworkServices::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_lb_edge_extension.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_lb_edge_extension.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dep_service_stub.call_rpc :get_lb_edge_extension, 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 `LbEdgeExtension` resource in a given project and location. + # + # @overload create_lb_edge_extension(request, options = nil) + # Pass arguments to `create_lb_edge_extension` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::CreateLbEdgeExtensionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::CreateLbEdgeExtensionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_lb_edge_extension(parent: nil, lb_edge_extension_id: nil, lb_edge_extension: nil, request_id: nil) + # Pass arguments to `create_lb_edge_extension` via keyword arguments. Note that at + # least one keyword argument is 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 `LbEdgeExtension` resource. Must be in + # the format `projects/{project}/locations/{location}`. + # @param lb_edge_extension_id [::String] + # Required. User-provided ID of the `LbEdgeExtension` resource to be created. + # @param lb_edge_extension [::Google::Cloud::NetworkServices::V1::LbEdgeExtension, ::Hash] + # Required. `LbEdgeExtension` resource to be created. + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server can ignore + # the request if it has already been completed. The server guarantees + # that for 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server ignores the second request This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # + # @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_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::DepService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::CreateLbEdgeExtensionRequest.new + # + # # Call the create_lb_edge_extension method. + # result = client.create_lb_edge_extension 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_lb_edge_extension request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::CreateLbEdgeExtensionRequest + + # Converts hash 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_lb_edge_extension.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::NetworkServices::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_lb_edge_extension.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_lb_edge_extension.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dep_service_stub.call_rpc :create_lb_edge_extension, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates the parameters of the specified `LbEdgeExtension` resource. + # + # @overload update_lb_edge_extension(request, options = nil) + # Pass arguments to `update_lb_edge_extension` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::UpdateLbEdgeExtensionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::UpdateLbEdgeExtensionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_lb_edge_extension(update_mask: nil, lb_edge_extension: nil, request_id: nil) + # Pass arguments to `update_lb_edge_extension` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. Used to specify the fields to be overwritten in the + # `LbEdgeExtension` resource by the update. + # The fields specified in the `update_mask` are relative to the resource, not + # the full request. A field is overwritten if it is in the mask. If the + # user does not specify a mask, then all fields are overwritten. + # @param lb_edge_extension [::Google::Cloud::NetworkServices::V1::LbEdgeExtension, ::Hash] + # Required. `LbEdgeExtension` resource being updated. + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server can ignore + # the request if it has already been completed. The server guarantees + # that for 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server ignores the second request This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # + # @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_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::DepService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::UpdateLbEdgeExtensionRequest.new + # + # # Call the update_lb_edge_extension method. + # result = client.update_lb_edge_extension 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_lb_edge_extension request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::UpdateLbEdgeExtensionRequest + + # Converts hash 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_lb_edge_extension.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::NetworkServices::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.lb_edge_extension&.name + header_params["lb_edge_extension.name"] = request.lb_edge_extension.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_lb_edge_extension.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_lb_edge_extension.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dep_service_stub.call_rpc :update_lb_edge_extension, 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 the specified `LbEdgeExtension` resource. + # + # @overload delete_lb_edge_extension(request, options = nil) + # Pass arguments to `delete_lb_edge_extension` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::DeleteLbEdgeExtensionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::DeleteLbEdgeExtensionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_lb_edge_extension(name: nil, request_id: nil) + # Pass arguments to `delete_lb_edge_extension` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the `LbEdgeExtension` resource to delete. Must be in + # the format + # `projects/{project}/locations/{location}/lbEdgeExtensions/{lb_edge_extension}`. + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server can ignore + # the request if it has already been completed. The server guarantees + # that for 60 minutes after the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server ignores the second request This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # + # @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_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::DepService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::DeleteLbEdgeExtensionRequest.new + # + # # Call the delete_lb_edge_extension method. + # result = client.delete_lb_edge_extension 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_lb_edge_extension request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::DeleteLbEdgeExtensionRequest + + # Converts hash 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_lb_edge_extension.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::NetworkServices::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_lb_edge_extension.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_lb_edge_extension.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dep_service_stub.call_rpc :delete_lb_edge_extension, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists `AuthzExtension` resources in a given project and location. + # + # @overload list_authz_extensions(request, options = nil) + # Pass arguments to `list_authz_extensions` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::ListAuthzExtensionsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::ListAuthzExtensionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_authz_extensions(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_authz_extensions` via keyword arguments. Note that at + # least one keyword argument is 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 project and location from which the `AuthzExtension` + # resources are listed. These values are specified in the following format: + # `projects/{project}/locations/{location}`. + # @param page_size [::Integer] + # Optional. Requested page size. The server might return fewer items than + # requested. If unspecified, the server picks an appropriate default. + # @param page_token [::String] + # Optional. A token identifying a page of results that the server returns. + # @param filter [::String] + # Optional. Filtering results. + # @param order_by [::String] + # Optional. Hint about how to order the results. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::NetworkServices::V1::AuthzExtension>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::NetworkServices::V1::AuthzExtension>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/network_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::DepService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::ListAuthzExtensionsRequest.new + # + # # Call the list_authz_extensions method. + # result = client.list_authz_extensions 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::NetworkServices::V1::AuthzExtension. + # p item + # end + # + def list_authz_extensions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::ListAuthzExtensionsRequest + + # Converts hash 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_authz_extensions.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::NetworkServices::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_authz_extensions.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_authz_extensions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dep_service_stub.call_rpc :list_authz_extensions, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @dep_service_stub, :list_authz_extensions, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets details of the specified `AuthzExtension` resource. + # + # @overload get_authz_extension(request, options = nil) + # Pass arguments to `get_authz_extension` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::GetAuthzExtensionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::GetAuthzExtensionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_authz_extension(name: nil) + # Pass arguments to `get_authz_extension` via keyword arguments. Note that at + # least one keyword argument is 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. A name of the `AuthzExtension` resource to get. Must be in + # the format + # `projects/{project}/locations/{location}/authzExtensions/{authz_extension}`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::NetworkServices::V1::AuthzExtension] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::NetworkServices::V1::AuthzExtension] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/network_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::DepService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::GetAuthzExtensionRequest.new + # + # # Call the get_authz_extension method. + # result = client.get_authz_extension request + # + # # The returned object is of type Google::Cloud::NetworkServices::V1::AuthzExtension. + # p result + # + def get_authz_extension request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::GetAuthzExtensionRequest + + # Converts hash 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_authz_extension.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::NetworkServices::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_authz_extension.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_authz_extension.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dep_service_stub.call_rpc :get_authz_extension, 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 `AuthzExtension` resource in a given project + # and location. + # + # @overload create_authz_extension(request, options = nil) + # Pass arguments to `create_authz_extension` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::CreateAuthzExtensionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::CreateAuthzExtensionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_authz_extension(parent: nil, authz_extension_id: nil, authz_extension: nil, request_id: nil) + # Pass arguments to `create_authz_extension` via keyword arguments. Note that at + # least one keyword argument is 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 `AuthzExtension` resource. Must + # be in the format `projects/{project}/locations/{location}`. + # @param authz_extension_id [::String] + # Required. User-provided ID of the `AuthzExtension` resource to be + # created. + # @param authz_extension [::Google::Cloud::NetworkServices::V1::AuthzExtension, ::Hash] + # Required. `AuthzExtension` resource to be created. + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server can ignore + # the request if it has already been completed. The server guarantees + # that for 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server ignores the second request This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # + # @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_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::DepService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::CreateAuthzExtensionRequest.new + # + # # Call the create_authz_extension method. + # result = client.create_authz_extension 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_authz_extension request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::CreateAuthzExtensionRequest + + # Converts hash 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_authz_extension.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::NetworkServices::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_authz_extension.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_authz_extension.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dep_service_stub.call_rpc :create_authz_extension, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates the parameters of the specified `AuthzExtension` + # resource. + # + # @overload update_authz_extension(request, options = nil) + # Pass arguments to `update_authz_extension` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::UpdateAuthzExtensionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::UpdateAuthzExtensionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_authz_extension(update_mask: nil, authz_extension: nil, request_id: nil) + # Pass arguments to `update_authz_extension` via keyword arguments. Note that at + # least one keyword argument is 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. Used to specify the fields to be overwritten in the + # `AuthzExtension` resource by the update. + # The fields specified in the `update_mask` are relative to the resource, not + # the full request. A field is overwritten if it is in the mask. If the + # user does not specify a mask, then all fields are overwritten. + # @param authz_extension [::Google::Cloud::NetworkServices::V1::AuthzExtension, ::Hash] + # Required. `AuthzExtension` resource being updated. + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server can ignore + # the request if it has already been completed. The server guarantees + # that for 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server ignores the second request This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # + # @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_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::DepService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::UpdateAuthzExtensionRequest.new + # + # # Call the update_authz_extension method. + # result = client.update_authz_extension 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_authz_extension request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::UpdateAuthzExtensionRequest + + # Converts hash 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_authz_extension.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::NetworkServices::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.authz_extension&.name + header_params["authz_extension.name"] = request.authz_extension.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_authz_extension.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_authz_extension.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dep_service_stub.call_rpc :update_authz_extension, 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 the specified `AuthzExtension` resource. + # + # @overload delete_authz_extension(request, options = nil) + # Pass arguments to `delete_authz_extension` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::DeleteAuthzExtensionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::DeleteAuthzExtensionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_authz_extension(name: nil, request_id: nil) + # Pass arguments to `delete_authz_extension` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the `AuthzExtension` resource to delete. Must + # be in the format + # `projects/{project}/locations/{location}/authzExtensions/{authz_extension}`. + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server can ignore + # the request if it has already been completed. The server guarantees + # that for 60 minutes after the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server ignores the second request This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # + # @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_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::DepService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::DeleteAuthzExtensionRequest.new + # + # # Call the delete_authz_extension method. + # result = client.delete_authz_extension 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_authz_extension request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::DeleteAuthzExtensionRequest + + # Converts hash 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_authz_extension.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::NetworkServices::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_authz_extension.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_authz_extension.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dep_service_stub.call_rpc :delete_authz_extension, 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 DepService API. + # + # This class represents the configuration for DepService, + # 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::NetworkServices::V1::DepService::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_lb_traffic_extensions to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::NetworkServices::V1::DepService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_lb_traffic_extensions.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::NetworkServices::V1::DepService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_lb_traffic_extensions.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::NetworkServices::V1::DepService::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. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `: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 = "networkservices.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 DepService 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. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_lb_traffic_extensions` + # @return [::Gapic::Config::Method] + # + attr_reader :list_lb_traffic_extensions + ## + # RPC-specific configuration for `get_lb_traffic_extension` + # @return [::Gapic::Config::Method] + # + attr_reader :get_lb_traffic_extension + ## + # RPC-specific configuration for `create_lb_traffic_extension` + # @return [::Gapic::Config::Method] + # + attr_reader :create_lb_traffic_extension + ## + # RPC-specific configuration for `update_lb_traffic_extension` + # @return [::Gapic::Config::Method] + # + attr_reader :update_lb_traffic_extension + ## + # RPC-specific configuration for `delete_lb_traffic_extension` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_lb_traffic_extension + ## + # RPC-specific configuration for `list_lb_route_extensions` + # @return [::Gapic::Config::Method] + # + attr_reader :list_lb_route_extensions + ## + # RPC-specific configuration for `get_lb_route_extension` + # @return [::Gapic::Config::Method] + # + attr_reader :get_lb_route_extension + ## + # RPC-specific configuration for `create_lb_route_extension` + # @return [::Gapic::Config::Method] + # + attr_reader :create_lb_route_extension + ## + # RPC-specific configuration for `update_lb_route_extension` + # @return [::Gapic::Config::Method] + # + attr_reader :update_lb_route_extension + ## + # RPC-specific configuration for `delete_lb_route_extension` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_lb_route_extension + ## + # RPC-specific configuration for `list_lb_edge_extensions` + # @return [::Gapic::Config::Method] + # + attr_reader :list_lb_edge_extensions + ## + # RPC-specific configuration for `get_lb_edge_extension` + # @return [::Gapic::Config::Method] + # + attr_reader :get_lb_edge_extension + ## + # RPC-specific configuration for `create_lb_edge_extension` + # @return [::Gapic::Config::Method] + # + attr_reader :create_lb_edge_extension + ## + # RPC-specific configuration for `update_lb_edge_extension` + # @return [::Gapic::Config::Method] + # + attr_reader :update_lb_edge_extension + ## + # RPC-specific configuration for `delete_lb_edge_extension` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_lb_edge_extension + ## + # RPC-specific configuration for `list_authz_extensions` + # @return [::Gapic::Config::Method] + # + attr_reader :list_authz_extensions + ## + # RPC-specific configuration for `get_authz_extension` + # @return [::Gapic::Config::Method] + # + attr_reader :get_authz_extension + ## + # RPC-specific configuration for `create_authz_extension` + # @return [::Gapic::Config::Method] + # + attr_reader :create_authz_extension + ## + # RPC-specific configuration for `update_authz_extension` + # @return [::Gapic::Config::Method] + # + attr_reader :update_authz_extension + ## + # RPC-specific configuration for `delete_authz_extension` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_authz_extension + + # @private + def initialize parent_rpcs = nil + list_lb_traffic_extensions_config = parent_rpcs.list_lb_traffic_extensions if parent_rpcs.respond_to? :list_lb_traffic_extensions + @list_lb_traffic_extensions = ::Gapic::Config::Method.new list_lb_traffic_extensions_config + get_lb_traffic_extension_config = parent_rpcs.get_lb_traffic_extension if parent_rpcs.respond_to? :get_lb_traffic_extension + @get_lb_traffic_extension = ::Gapic::Config::Method.new get_lb_traffic_extension_config + create_lb_traffic_extension_config = parent_rpcs.create_lb_traffic_extension if parent_rpcs.respond_to? :create_lb_traffic_extension + @create_lb_traffic_extension = ::Gapic::Config::Method.new create_lb_traffic_extension_config + update_lb_traffic_extension_config = parent_rpcs.update_lb_traffic_extension if parent_rpcs.respond_to? :update_lb_traffic_extension + @update_lb_traffic_extension = ::Gapic::Config::Method.new update_lb_traffic_extension_config + delete_lb_traffic_extension_config = parent_rpcs.delete_lb_traffic_extension if parent_rpcs.respond_to? :delete_lb_traffic_extension + @delete_lb_traffic_extension = ::Gapic::Config::Method.new delete_lb_traffic_extension_config + list_lb_route_extensions_config = parent_rpcs.list_lb_route_extensions if parent_rpcs.respond_to? :list_lb_route_extensions + @list_lb_route_extensions = ::Gapic::Config::Method.new list_lb_route_extensions_config + get_lb_route_extension_config = parent_rpcs.get_lb_route_extension if parent_rpcs.respond_to? :get_lb_route_extension + @get_lb_route_extension = ::Gapic::Config::Method.new get_lb_route_extension_config + create_lb_route_extension_config = parent_rpcs.create_lb_route_extension if parent_rpcs.respond_to? :create_lb_route_extension + @create_lb_route_extension = ::Gapic::Config::Method.new create_lb_route_extension_config + update_lb_route_extension_config = parent_rpcs.update_lb_route_extension if parent_rpcs.respond_to? :update_lb_route_extension + @update_lb_route_extension = ::Gapic::Config::Method.new update_lb_route_extension_config + delete_lb_route_extension_config = parent_rpcs.delete_lb_route_extension if parent_rpcs.respond_to? :delete_lb_route_extension + @delete_lb_route_extension = ::Gapic::Config::Method.new delete_lb_route_extension_config + list_lb_edge_extensions_config = parent_rpcs.list_lb_edge_extensions if parent_rpcs.respond_to? :list_lb_edge_extensions + @list_lb_edge_extensions = ::Gapic::Config::Method.new list_lb_edge_extensions_config + get_lb_edge_extension_config = parent_rpcs.get_lb_edge_extension if parent_rpcs.respond_to? :get_lb_edge_extension + @get_lb_edge_extension = ::Gapic::Config::Method.new get_lb_edge_extension_config + create_lb_edge_extension_config = parent_rpcs.create_lb_edge_extension if parent_rpcs.respond_to? :create_lb_edge_extension + @create_lb_edge_extension = ::Gapic::Config::Method.new create_lb_edge_extension_config + update_lb_edge_extension_config = parent_rpcs.update_lb_edge_extension if parent_rpcs.respond_to? :update_lb_edge_extension + @update_lb_edge_extension = ::Gapic::Config::Method.new update_lb_edge_extension_config + delete_lb_edge_extension_config = parent_rpcs.delete_lb_edge_extension if parent_rpcs.respond_to? :delete_lb_edge_extension + @delete_lb_edge_extension = ::Gapic::Config::Method.new delete_lb_edge_extension_config + list_authz_extensions_config = parent_rpcs.list_authz_extensions if parent_rpcs.respond_to? :list_authz_extensions + @list_authz_extensions = ::Gapic::Config::Method.new list_authz_extensions_config + get_authz_extension_config = parent_rpcs.get_authz_extension if parent_rpcs.respond_to? :get_authz_extension + @get_authz_extension = ::Gapic::Config::Method.new get_authz_extension_config + create_authz_extension_config = parent_rpcs.create_authz_extension if parent_rpcs.respond_to? :create_authz_extension + @create_authz_extension = ::Gapic::Config::Method.new create_authz_extension_config + update_authz_extension_config = parent_rpcs.update_authz_extension if parent_rpcs.respond_to? :update_authz_extension + @update_authz_extension = ::Gapic::Config::Method.new update_authz_extension_config + delete_authz_extension_config = parent_rpcs.delete_authz_extension if parent_rpcs.respond_to? :delete_authz_extension + @delete_authz_extension = ::Gapic::Config::Method.new delete_authz_extension_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/dep_service/credentials.rb b/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/dep_service/credentials.rb new file mode 100644 index 000000000000..103a25485138 --- /dev/null +++ b/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/dep_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 NetworkServices + module V1 + module DepService + # Credentials for the DepService 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_services-v1/lib/google/cloud/network_services/v1/dep_service/operations.rb b/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/dep_service/operations.rb new file mode 100644 index 000000000000..b4f64b0b9b5f --- /dev/null +++ b/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/dep_service/operations.rb @@ -0,0 +1,843 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 NetworkServices + module V1 + module DepService + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "networkservices.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the DepService 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 DepService 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::NetworkServices::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::NetworkServices::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::NetworkServices::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::NetworkServices::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::NetworkServices::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. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `: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 = "networkservices.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. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `: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_services-v1/lib/google/cloud/network_services/v1/dep_service/paths.rb b/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/dep_service/paths.rb new file mode 100644 index 000000000000..72e3552bd4e6 --- /dev/null +++ b/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/dep_service/paths.rb @@ -0,0 +1,126 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 NetworkServices + module V1 + module DepService + # Path helper methods for the DepService API. + module Paths + ## + # Create a fully-qualified AuthzExtension resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/authzExtensions/{authz_extension}` + # + # @param project [String] + # @param location [String] + # @param authz_extension [String] + # + # @return [::String] + def authz_extension_path project:, location:, authz_extension: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/authzExtensions/#{authz_extension}" + end + + ## + # Create a fully-qualified LbEdgeExtension resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/lbEdgeExtensions/{lb_edge_extension}` + # + # @param project [String] + # @param location [String] + # @param lb_edge_extension [String] + # + # @return [::String] + def lb_edge_extension_path project:, location:, lb_edge_extension: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/lbEdgeExtensions/#{lb_edge_extension}" + end + + ## + # Create a fully-qualified LbRouteExtension resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/lbRouteExtensions/{lb_route_extension}` + # + # @param project [String] + # @param location [String] + # @param lb_route_extension [String] + # + # @return [::String] + def lb_route_extension_path project:, location:, lb_route_extension: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/lbRouteExtensions/#{lb_route_extension}" + end + + ## + # Create a fully-qualified LbTrafficExtension resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/lbTrafficExtensions/{lb_traffic_extension}` + # + # @param project [String] + # @param location [String] + # @param lb_traffic_extension [String] + # + # @return [::String] + def lb_traffic_extension_path project:, location:, lb_traffic_extension: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/lbTrafficExtensions/#{lb_traffic_extension}" + end + + ## + # Create a fully-qualified Location resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}` + # + # @param project [String] + # @param location [String] + # + # @return [::String] + def location_path project:, location: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + + "projects/#{project}/locations/#{location}" + end + + extend self + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/dep_service/rest.rb b/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/dep_service/rest.rb new file mode 100644 index 000000000000..064a2772797b --- /dev/null +++ b/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/dep_service/rest.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/rest" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/network_services/v1/version" +require "google/cloud/network_services/v1/bindings_override" + +require "google/cloud/network_services/v1/dep_service/credentials" +require "google/cloud/network_services/v1/dep_service/paths" +require "google/cloud/network_services/v1/dep_service/rest/operations" +require "google/cloud/network_services/v1/dep_service/rest/client" + +module Google + module Cloud + module NetworkServices + module V1 + ## + # Service describing handlers for resources. + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/network_services/v1/dep_service/rest" + # client = ::Google::Cloud::NetworkServices::V1::DepService::Rest::Client.new + # + module DepService + # 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_services/v1/dep_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/dep_service/rest/client.rb b/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/dep_service/rest/client.rb new file mode 100644 index 000000000000..ed3ddf2e75ff --- /dev/null +++ b/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/dep_service/rest/client.rb @@ -0,0 +1,2496 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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/networkservices/v1/dep_pb" +require "google/cloud/network_services/v1/dep_service/rest/service_stub" +require "google/cloud/location/rest" +require "google/iam/v1/rest" + +module Google + module Cloud + module NetworkServices + module V1 + module DepService + module Rest + ## + # REST client for the DepService service. + # + # Service describing handlers for resources. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "networkservices.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :dep_service_stub + + ## + # Configure the DepService Client class. + # + # See {::Google::Cloud::NetworkServices::V1::DepService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all DepService clients + # ::Google::Cloud::NetworkServices::V1::DepService::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", "NetworkServices", "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 DepService 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::NetworkServices::V1::DepService::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 + @dep_service_stub.universe_domain + end + + ## + # Create a new DepService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::NetworkServices::V1::DepService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::NetworkServices::V1::DepService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the DepService 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::NetworkServices::V1::DepService::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 + + @dep_service_stub = ::Google::Cloud::NetworkServices::V1::DepService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @dep_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 = @dep_service_stub.endpoint + config.universe_domain = @dep_service_stub.universe_domain + config.bindings_override = @config.bindings_override + config.logger = @dep_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 = @dep_service_stub.endpoint + config.universe_domain = @dep_service_stub.universe_domain + config.bindings_override = @config.bindings_override + config.logger = @dep_service_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::NetworkServices::V1::DepService::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 + @dep_service_stub.logger + end + + # Service calls + + ## + # Lists `LbTrafficExtension` resources in a given project and location. + # + # @overload list_lb_traffic_extensions(request, options = nil) + # Pass arguments to `list_lb_traffic_extensions` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::ListLbTrafficExtensionsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::ListLbTrafficExtensionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_lb_traffic_extensions(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_lb_traffic_extensions` via keyword arguments. Note that at + # least one keyword argument is 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 project and location from which the `LbTrafficExtension` + # resources are listed. These values are specified in the following format: + # `projects/{project}/locations/{location}`. + # @param page_size [::Integer] + # Optional. Requested page size. The server might return fewer items than + # requested. If unspecified, the server picks an appropriate default. + # @param page_token [::String] + # Optional. A token identifying a page of results that the server returns. + # @param filter [::String] + # Optional. Filtering results. + # @param order_by [::String] + # Optional. Hint about how to order the results. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::LbTrafficExtension>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::LbTrafficExtension>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/network_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::DepService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::ListLbTrafficExtensionsRequest.new + # + # # Call the list_lb_traffic_extensions method. + # result = client.list_lb_traffic_extensions 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::NetworkServices::V1::LbTrafficExtension. + # p item + # end + # + def list_lb_traffic_extensions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::ListLbTrafficExtensionsRequest + + # Converts hash 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_lb_traffic_extensions.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::NetworkServices::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_lb_traffic_extensions.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_lb_traffic_extensions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dep_service_stub.list_lb_traffic_extensions request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @dep_service_stub, :list_lb_traffic_extensions, "lb_traffic_extensions", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets details of the specified `LbTrafficExtension` resource. + # + # @overload get_lb_traffic_extension(request, options = nil) + # Pass arguments to `get_lb_traffic_extension` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::GetLbTrafficExtensionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::GetLbTrafficExtensionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_lb_traffic_extension(name: nil) + # Pass arguments to `get_lb_traffic_extension` via keyword arguments. Note that at + # least one keyword argument is 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. A name of the `LbTrafficExtension` resource to get. Must be in + # the format + # `projects/{project}/locations/{location}/lbTrafficExtensions/{lb_traffic_extension}`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::NetworkServices::V1::LbTrafficExtension] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::NetworkServices::V1::LbTrafficExtension] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/network_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::DepService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::GetLbTrafficExtensionRequest.new + # + # # Call the get_lb_traffic_extension method. + # result = client.get_lb_traffic_extension request + # + # # The returned object is of type Google::Cloud::NetworkServices::V1::LbTrafficExtension. + # p result + # + def get_lb_traffic_extension request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::GetLbTrafficExtensionRequest + + # Converts hash 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_lb_traffic_extension.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::NetworkServices::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_lb_traffic_extension.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_lb_traffic_extension.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dep_service_stub.get_lb_traffic_extension 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 `LbTrafficExtension` resource in a given project and + # location. + # + # @overload create_lb_traffic_extension(request, options = nil) + # Pass arguments to `create_lb_traffic_extension` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::CreateLbTrafficExtensionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::CreateLbTrafficExtensionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_lb_traffic_extension(parent: nil, lb_traffic_extension_id: nil, lb_traffic_extension: nil, request_id: nil) + # Pass arguments to `create_lb_traffic_extension` via keyword arguments. Note that at + # least one keyword argument is 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 `LbTrafficExtension` resource. Must be + # in the format `projects/{project}/locations/{location}`. + # @param lb_traffic_extension_id [::String] + # Required. User-provided ID of the `LbTrafficExtension` resource to be + # created. + # @param lb_traffic_extension [::Google::Cloud::NetworkServices::V1::LbTrafficExtension, ::Hash] + # Required. `LbTrafficExtension` resource to be created. + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server can ignore + # the request if it has already been completed. The server guarantees + # that for 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server ignores the second request This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @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_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::DepService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::CreateLbTrafficExtensionRequest.new + # + # # Call the create_lb_traffic_extension method. + # result = client.create_lb_traffic_extension 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_lb_traffic_extension request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::CreateLbTrafficExtensionRequest + + # Converts hash 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_lb_traffic_extension.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::NetworkServices::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_lb_traffic_extension.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_lb_traffic_extension.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dep_service_stub.create_lb_traffic_extension request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates the parameters of the specified `LbTrafficExtension` resource. + # + # @overload update_lb_traffic_extension(request, options = nil) + # Pass arguments to `update_lb_traffic_extension` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::UpdateLbTrafficExtensionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::UpdateLbTrafficExtensionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_lb_traffic_extension(update_mask: nil, lb_traffic_extension: nil, request_id: nil) + # Pass arguments to `update_lb_traffic_extension` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. Used to specify the fields to be overwritten in the + # `LbTrafficExtension` resource by the update. + # The fields specified in the `update_mask` are relative to the resource, not + # the full request. A field is overwritten if it is in the mask. If the + # user does not specify a mask, then all fields are overwritten. + # @param lb_traffic_extension [::Google::Cloud::NetworkServices::V1::LbTrafficExtension, ::Hash] + # Required. `LbTrafficExtension` resource being updated. + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server can ignore + # the request if it has already been completed. The server guarantees + # that for 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server ignores the second request This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @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_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::DepService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::UpdateLbTrafficExtensionRequest.new + # + # # Call the update_lb_traffic_extension method. + # result = client.update_lb_traffic_extension 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_lb_traffic_extension request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::UpdateLbTrafficExtensionRequest + + # Converts hash 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_lb_traffic_extension.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::NetworkServices::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_lb_traffic_extension.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_lb_traffic_extension.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dep_service_stub.update_lb_traffic_extension 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 the specified `LbTrafficExtension` resource. + # + # @overload delete_lb_traffic_extension(request, options = nil) + # Pass arguments to `delete_lb_traffic_extension` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::DeleteLbTrafficExtensionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::DeleteLbTrafficExtensionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_lb_traffic_extension(name: nil, request_id: nil) + # Pass arguments to `delete_lb_traffic_extension` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the `LbTrafficExtension` resource to delete. Must be + # in the format + # `projects/{project}/locations/{location}/lbTrafficExtensions/{lb_traffic_extension}`. + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server can ignore + # the request if it has already been completed. The server guarantees + # that for 60 minutes after the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server ignores the second request This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @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_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::DepService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::DeleteLbTrafficExtensionRequest.new + # + # # Call the delete_lb_traffic_extension method. + # result = client.delete_lb_traffic_extension 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_lb_traffic_extension request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::DeleteLbTrafficExtensionRequest + + # Converts hash 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_lb_traffic_extension.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::NetworkServices::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_lb_traffic_extension.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_lb_traffic_extension.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dep_service_stub.delete_lb_traffic_extension request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists `LbRouteExtension` resources in a given project and location. + # + # @overload list_lb_route_extensions(request, options = nil) + # Pass arguments to `list_lb_route_extensions` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::ListLbRouteExtensionsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::ListLbRouteExtensionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_lb_route_extensions(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_lb_route_extensions` via keyword arguments. Note that at + # least one keyword argument is 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 project and location from which the `LbRouteExtension` + # resources are listed. These values are specified in the following format: + # `projects/{project}/locations/{location}`. + # @param page_size [::Integer] + # Optional. Requested page size. The server might return fewer items than + # requested. If unspecified, the server picks an appropriate default. + # @param page_token [::String] + # Optional. A token identifying a page of results that the server returns. + # @param filter [::String] + # Optional. Filtering results. + # @param order_by [::String] + # Optional. Hint about how to order the results. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::LbRouteExtension>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::LbRouteExtension>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/network_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::DepService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::ListLbRouteExtensionsRequest.new + # + # # Call the list_lb_route_extensions method. + # result = client.list_lb_route_extensions 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::NetworkServices::V1::LbRouteExtension. + # p item + # end + # + def list_lb_route_extensions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::ListLbRouteExtensionsRequest + + # Converts hash 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_lb_route_extensions.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::NetworkServices::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_lb_route_extensions.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_lb_route_extensions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dep_service_stub.list_lb_route_extensions request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @dep_service_stub, :list_lb_route_extensions, "lb_route_extensions", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets details of the specified `LbRouteExtension` resource. + # + # @overload get_lb_route_extension(request, options = nil) + # Pass arguments to `get_lb_route_extension` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::GetLbRouteExtensionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::GetLbRouteExtensionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_lb_route_extension(name: nil) + # Pass arguments to `get_lb_route_extension` via keyword arguments. Note that at + # least one keyword argument is 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. A name of the `LbRouteExtension` resource to get. Must be in the + # format + # `projects/{project}/locations/{location}/lbRouteExtensions/{lb_route_extension}`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::NetworkServices::V1::LbRouteExtension] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::NetworkServices::V1::LbRouteExtension] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/network_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::DepService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::GetLbRouteExtensionRequest.new + # + # # Call the get_lb_route_extension method. + # result = client.get_lb_route_extension request + # + # # The returned object is of type Google::Cloud::NetworkServices::V1::LbRouteExtension. + # p result + # + def get_lb_route_extension request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::GetLbRouteExtensionRequest + + # Converts hash 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_lb_route_extension.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::NetworkServices::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_lb_route_extension.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_lb_route_extension.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dep_service_stub.get_lb_route_extension 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 `LbRouteExtension` resource in a given project and location. + # + # @overload create_lb_route_extension(request, options = nil) + # Pass arguments to `create_lb_route_extension` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::CreateLbRouteExtensionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::CreateLbRouteExtensionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_lb_route_extension(parent: nil, lb_route_extension_id: nil, lb_route_extension: nil, request_id: nil) + # Pass arguments to `create_lb_route_extension` via keyword arguments. Note that at + # least one keyword argument is 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 `LbRouteExtension` resource. Must be + # in the format `projects/{project}/locations/{location}`. + # @param lb_route_extension_id [::String] + # Required. User-provided ID of the `LbRouteExtension` resource to be + # created. + # @param lb_route_extension [::Google::Cloud::NetworkServices::V1::LbRouteExtension, ::Hash] + # Required. `LbRouteExtension` resource to be created. + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server can ignore + # the request if it has already been completed. The server guarantees + # that for 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server ignores the second request This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @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_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::DepService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::CreateLbRouteExtensionRequest.new + # + # # Call the create_lb_route_extension method. + # result = client.create_lb_route_extension 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_lb_route_extension request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::CreateLbRouteExtensionRequest + + # Converts hash 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_lb_route_extension.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::NetworkServices::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_lb_route_extension.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_lb_route_extension.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dep_service_stub.create_lb_route_extension request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates the parameters of the specified `LbRouteExtension` resource. + # + # @overload update_lb_route_extension(request, options = nil) + # Pass arguments to `update_lb_route_extension` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::UpdateLbRouteExtensionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::UpdateLbRouteExtensionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_lb_route_extension(update_mask: nil, lb_route_extension: nil, request_id: nil) + # Pass arguments to `update_lb_route_extension` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. Used to specify the fields to be overwritten in the + # `LbRouteExtension` resource by the update. + # The fields specified in the `update_mask` are relative to the resource, not + # the full request. A field is overwritten if it is in the mask. If the + # user does not specify a mask, then all fields are overwritten. + # @param lb_route_extension [::Google::Cloud::NetworkServices::V1::LbRouteExtension, ::Hash] + # Required. `LbRouteExtension` resource being updated. + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server can ignore + # the request if it has already been completed. The server guarantees + # that for 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server ignores the second request This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @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_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::DepService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::UpdateLbRouteExtensionRequest.new + # + # # Call the update_lb_route_extension method. + # result = client.update_lb_route_extension 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_lb_route_extension request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::UpdateLbRouteExtensionRequest + + # Converts hash 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_lb_route_extension.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::NetworkServices::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_lb_route_extension.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_lb_route_extension.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dep_service_stub.update_lb_route_extension 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 the specified `LbRouteExtension` resource. + # + # @overload delete_lb_route_extension(request, options = nil) + # Pass arguments to `delete_lb_route_extension` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::DeleteLbRouteExtensionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::DeleteLbRouteExtensionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_lb_route_extension(name: nil, request_id: nil) + # Pass arguments to `delete_lb_route_extension` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the `LbRouteExtension` resource to delete. Must be in + # the format + # `projects/{project}/locations/{location}/lbRouteExtensions/{lb_route_extension}`. + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server can ignore + # the request if it has already been completed. The server guarantees + # that for 60 minutes after the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server ignores the second request This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @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_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::DepService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::DeleteLbRouteExtensionRequest.new + # + # # Call the delete_lb_route_extension method. + # result = client.delete_lb_route_extension 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_lb_route_extension request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::DeleteLbRouteExtensionRequest + + # Converts hash 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_lb_route_extension.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::NetworkServices::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_lb_route_extension.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_lb_route_extension.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dep_service_stub.delete_lb_route_extension request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists `LbEdgeExtension` resources in a given project and location. + # + # @overload list_lb_edge_extensions(request, options = nil) + # Pass arguments to `list_lb_edge_extensions` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::ListLbEdgeExtensionsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::ListLbEdgeExtensionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_lb_edge_extensions(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_lb_edge_extensions` via keyword arguments. Note that at + # least one keyword argument is 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 project and location from which the `LbEdgeExtension` + # resources are listed. These values are specified in the following format: + # `projects/{project}/locations/{location}`. + # @param page_size [::Integer] + # Optional. Requested page size. The server might return fewer items than + # requested. If unspecified, the server picks an appropriate default. + # @param page_token [::String] + # Optional. A token identifying a page of results that the server returns. + # @param filter [::String] + # Optional. Filtering results. + # @param order_by [::String] + # Optional. Hint about how to order the results. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::LbEdgeExtension>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::LbEdgeExtension>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/network_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::DepService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::ListLbEdgeExtensionsRequest.new + # + # # Call the list_lb_edge_extensions method. + # result = client.list_lb_edge_extensions 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::NetworkServices::V1::LbEdgeExtension. + # p item + # end + # + def list_lb_edge_extensions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::ListLbEdgeExtensionsRequest + + # Converts hash 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_lb_edge_extensions.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::NetworkServices::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_lb_edge_extensions.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_lb_edge_extensions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dep_service_stub.list_lb_edge_extensions request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @dep_service_stub, :list_lb_edge_extensions, "lb_edge_extensions", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets details of the specified `LbEdgeExtension` resource. + # + # @overload get_lb_edge_extension(request, options = nil) + # Pass arguments to `get_lb_edge_extension` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::GetLbEdgeExtensionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::GetLbEdgeExtensionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_lb_edge_extension(name: nil) + # Pass arguments to `get_lb_edge_extension` via keyword arguments. Note that at + # least one keyword argument is 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. A name of the `LbEdgeExtension` resource to get. Must be in the + # format + # `projects/{project}/locations/{location}/lbEdgeExtensions/{lb_edge_extension}`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::NetworkServices::V1::LbEdgeExtension] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::NetworkServices::V1::LbEdgeExtension] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/network_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::DepService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::GetLbEdgeExtensionRequest.new + # + # # Call the get_lb_edge_extension method. + # result = client.get_lb_edge_extension request + # + # # The returned object is of type Google::Cloud::NetworkServices::V1::LbEdgeExtension. + # p result + # + def get_lb_edge_extension request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::GetLbEdgeExtensionRequest + + # Converts hash 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_lb_edge_extension.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::NetworkServices::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_lb_edge_extension.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_lb_edge_extension.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dep_service_stub.get_lb_edge_extension 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 `LbEdgeExtension` resource in a given project and location. + # + # @overload create_lb_edge_extension(request, options = nil) + # Pass arguments to `create_lb_edge_extension` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::CreateLbEdgeExtensionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::CreateLbEdgeExtensionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_lb_edge_extension(parent: nil, lb_edge_extension_id: nil, lb_edge_extension: nil, request_id: nil) + # Pass arguments to `create_lb_edge_extension` via keyword arguments. Note that at + # least one keyword argument is 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 `LbEdgeExtension` resource. Must be in + # the format `projects/{project}/locations/{location}`. + # @param lb_edge_extension_id [::String] + # Required. User-provided ID of the `LbEdgeExtension` resource to be created. + # @param lb_edge_extension [::Google::Cloud::NetworkServices::V1::LbEdgeExtension, ::Hash] + # Required. `LbEdgeExtension` resource to be created. + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server can ignore + # the request if it has already been completed. The server guarantees + # that for 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server ignores the second request This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @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_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::DepService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::CreateLbEdgeExtensionRequest.new + # + # # Call the create_lb_edge_extension method. + # result = client.create_lb_edge_extension 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_lb_edge_extension request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::CreateLbEdgeExtensionRequest + + # Converts hash 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_lb_edge_extension.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::NetworkServices::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_lb_edge_extension.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_lb_edge_extension.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dep_service_stub.create_lb_edge_extension request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates the parameters of the specified `LbEdgeExtension` resource. + # + # @overload update_lb_edge_extension(request, options = nil) + # Pass arguments to `update_lb_edge_extension` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::UpdateLbEdgeExtensionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::UpdateLbEdgeExtensionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_lb_edge_extension(update_mask: nil, lb_edge_extension: nil, request_id: nil) + # Pass arguments to `update_lb_edge_extension` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. Used to specify the fields to be overwritten in the + # `LbEdgeExtension` resource by the update. + # The fields specified in the `update_mask` are relative to the resource, not + # the full request. A field is overwritten if it is in the mask. If the + # user does not specify a mask, then all fields are overwritten. + # @param lb_edge_extension [::Google::Cloud::NetworkServices::V1::LbEdgeExtension, ::Hash] + # Required. `LbEdgeExtension` resource being updated. + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server can ignore + # the request if it has already been completed. The server guarantees + # that for 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server ignores the second request This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @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_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::DepService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::UpdateLbEdgeExtensionRequest.new + # + # # Call the update_lb_edge_extension method. + # result = client.update_lb_edge_extension 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_lb_edge_extension request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::UpdateLbEdgeExtensionRequest + + # Converts hash 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_lb_edge_extension.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::NetworkServices::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_lb_edge_extension.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_lb_edge_extension.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dep_service_stub.update_lb_edge_extension 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 the specified `LbEdgeExtension` resource. + # + # @overload delete_lb_edge_extension(request, options = nil) + # Pass arguments to `delete_lb_edge_extension` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::DeleteLbEdgeExtensionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::DeleteLbEdgeExtensionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_lb_edge_extension(name: nil, request_id: nil) + # Pass arguments to `delete_lb_edge_extension` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the `LbEdgeExtension` resource to delete. Must be in + # the format + # `projects/{project}/locations/{location}/lbEdgeExtensions/{lb_edge_extension}`. + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server can ignore + # the request if it has already been completed. The server guarantees + # that for 60 minutes after the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server ignores the second request This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @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_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::DepService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::DeleteLbEdgeExtensionRequest.new + # + # # Call the delete_lb_edge_extension method. + # result = client.delete_lb_edge_extension 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_lb_edge_extension request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::DeleteLbEdgeExtensionRequest + + # Converts hash 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_lb_edge_extension.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::NetworkServices::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_lb_edge_extension.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_lb_edge_extension.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dep_service_stub.delete_lb_edge_extension request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists `AuthzExtension` resources in a given project and location. + # + # @overload list_authz_extensions(request, options = nil) + # Pass arguments to `list_authz_extensions` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::ListAuthzExtensionsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::ListAuthzExtensionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_authz_extensions(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_authz_extensions` via keyword arguments. Note that at + # least one keyword argument is 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 project and location from which the `AuthzExtension` + # resources are listed. These values are specified in the following format: + # `projects/{project}/locations/{location}`. + # @param page_size [::Integer] + # Optional. Requested page size. The server might return fewer items than + # requested. If unspecified, the server picks an appropriate default. + # @param page_token [::String] + # Optional. A token identifying a page of results that the server returns. + # @param filter [::String] + # Optional. Filtering results. + # @param order_by [::String] + # Optional. Hint about how to order the results. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::AuthzExtension>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::AuthzExtension>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/network_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::DepService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::ListAuthzExtensionsRequest.new + # + # # Call the list_authz_extensions method. + # result = client.list_authz_extensions 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::NetworkServices::V1::AuthzExtension. + # p item + # end + # + def list_authz_extensions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::ListAuthzExtensionsRequest + + # Converts hash 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_authz_extensions.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::NetworkServices::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_authz_extensions.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_authz_extensions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dep_service_stub.list_authz_extensions request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @dep_service_stub, :list_authz_extensions, "authz_extensions", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets details of the specified `AuthzExtension` resource. + # + # @overload get_authz_extension(request, options = nil) + # Pass arguments to `get_authz_extension` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::GetAuthzExtensionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::GetAuthzExtensionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_authz_extension(name: nil) + # Pass arguments to `get_authz_extension` via keyword arguments. Note that at + # least one keyword argument is 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. A name of the `AuthzExtension` resource to get. Must be in + # the format + # `projects/{project}/locations/{location}/authzExtensions/{authz_extension}`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::NetworkServices::V1::AuthzExtension] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::NetworkServices::V1::AuthzExtension] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/network_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::DepService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::GetAuthzExtensionRequest.new + # + # # Call the get_authz_extension method. + # result = client.get_authz_extension request + # + # # The returned object is of type Google::Cloud::NetworkServices::V1::AuthzExtension. + # p result + # + def get_authz_extension request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::GetAuthzExtensionRequest + + # Converts hash 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_authz_extension.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::NetworkServices::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_authz_extension.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_authz_extension.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dep_service_stub.get_authz_extension 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 `AuthzExtension` resource in a given project + # and location. + # + # @overload create_authz_extension(request, options = nil) + # Pass arguments to `create_authz_extension` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::CreateAuthzExtensionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::CreateAuthzExtensionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_authz_extension(parent: nil, authz_extension_id: nil, authz_extension: nil, request_id: nil) + # Pass arguments to `create_authz_extension` via keyword arguments. Note that at + # least one keyword argument is 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 `AuthzExtension` resource. Must + # be in the format `projects/{project}/locations/{location}`. + # @param authz_extension_id [::String] + # Required. User-provided ID of the `AuthzExtension` resource to be + # created. + # @param authz_extension [::Google::Cloud::NetworkServices::V1::AuthzExtension, ::Hash] + # Required. `AuthzExtension` resource to be created. + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server can ignore + # the request if it has already been completed. The server guarantees + # that for 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server ignores the second request This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @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_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::DepService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::CreateAuthzExtensionRequest.new + # + # # Call the create_authz_extension method. + # result = client.create_authz_extension 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_authz_extension request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::CreateAuthzExtensionRequest + + # Converts hash 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_authz_extension.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::NetworkServices::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_authz_extension.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_authz_extension.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dep_service_stub.create_authz_extension request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates the parameters of the specified `AuthzExtension` + # resource. + # + # @overload update_authz_extension(request, options = nil) + # Pass arguments to `update_authz_extension` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::UpdateAuthzExtensionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::UpdateAuthzExtensionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_authz_extension(update_mask: nil, authz_extension: nil, request_id: nil) + # Pass arguments to `update_authz_extension` via keyword arguments. Note that at + # least one keyword argument is 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. Used to specify the fields to be overwritten in the + # `AuthzExtension` resource by the update. + # The fields specified in the `update_mask` are relative to the resource, not + # the full request. A field is overwritten if it is in the mask. If the + # user does not specify a mask, then all fields are overwritten. + # @param authz_extension [::Google::Cloud::NetworkServices::V1::AuthzExtension, ::Hash] + # Required. `AuthzExtension` resource being updated. + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server can ignore + # the request if it has already been completed. The server guarantees + # that for 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server ignores the second request This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @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_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::DepService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::UpdateAuthzExtensionRequest.new + # + # # Call the update_authz_extension method. + # result = client.update_authz_extension 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_authz_extension request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::UpdateAuthzExtensionRequest + + # Converts hash 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_authz_extension.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::NetworkServices::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_authz_extension.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_authz_extension.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dep_service_stub.update_authz_extension 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 the specified `AuthzExtension` resource. + # + # @overload delete_authz_extension(request, options = nil) + # Pass arguments to `delete_authz_extension` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::DeleteAuthzExtensionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::DeleteAuthzExtensionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_authz_extension(name: nil, request_id: nil) + # Pass arguments to `delete_authz_extension` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the `AuthzExtension` resource to delete. Must + # be in the format + # `projects/{project}/locations/{location}/authzExtensions/{authz_extension}`. + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server can ignore + # the request if it has already been completed. The server guarantees + # that for 60 minutes after the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server ignores the second request This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @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_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::DepService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::DeleteAuthzExtensionRequest.new + # + # # Call the delete_authz_extension method. + # result = client.delete_authz_extension 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_authz_extension request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::DeleteAuthzExtensionRequest + + # Converts hash 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_authz_extension.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::NetworkServices::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_authz_extension.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_authz_extension.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dep_service_stub.delete_authz_extension 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 DepService REST API. + # + # This class represents the configuration for DepService 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::NetworkServices::V1::DepService::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_lb_traffic_extensions to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::NetworkServices::V1::DepService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_lb_traffic_extensions.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::NetworkServices::V1::DepService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_lb_traffic_extensions.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. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `: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 = "networkservices.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 DepService 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. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_lb_traffic_extensions` + # @return [::Gapic::Config::Method] + # + attr_reader :list_lb_traffic_extensions + ## + # RPC-specific configuration for `get_lb_traffic_extension` + # @return [::Gapic::Config::Method] + # + attr_reader :get_lb_traffic_extension + ## + # RPC-specific configuration for `create_lb_traffic_extension` + # @return [::Gapic::Config::Method] + # + attr_reader :create_lb_traffic_extension + ## + # RPC-specific configuration for `update_lb_traffic_extension` + # @return [::Gapic::Config::Method] + # + attr_reader :update_lb_traffic_extension + ## + # RPC-specific configuration for `delete_lb_traffic_extension` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_lb_traffic_extension + ## + # RPC-specific configuration for `list_lb_route_extensions` + # @return [::Gapic::Config::Method] + # + attr_reader :list_lb_route_extensions + ## + # RPC-specific configuration for `get_lb_route_extension` + # @return [::Gapic::Config::Method] + # + attr_reader :get_lb_route_extension + ## + # RPC-specific configuration for `create_lb_route_extension` + # @return [::Gapic::Config::Method] + # + attr_reader :create_lb_route_extension + ## + # RPC-specific configuration for `update_lb_route_extension` + # @return [::Gapic::Config::Method] + # + attr_reader :update_lb_route_extension + ## + # RPC-specific configuration for `delete_lb_route_extension` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_lb_route_extension + ## + # RPC-specific configuration for `list_lb_edge_extensions` + # @return [::Gapic::Config::Method] + # + attr_reader :list_lb_edge_extensions + ## + # RPC-specific configuration for `get_lb_edge_extension` + # @return [::Gapic::Config::Method] + # + attr_reader :get_lb_edge_extension + ## + # RPC-specific configuration for `create_lb_edge_extension` + # @return [::Gapic::Config::Method] + # + attr_reader :create_lb_edge_extension + ## + # RPC-specific configuration for `update_lb_edge_extension` + # @return [::Gapic::Config::Method] + # + attr_reader :update_lb_edge_extension + ## + # RPC-specific configuration for `delete_lb_edge_extension` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_lb_edge_extension + ## + # RPC-specific configuration for `list_authz_extensions` + # @return [::Gapic::Config::Method] + # + attr_reader :list_authz_extensions + ## + # RPC-specific configuration for `get_authz_extension` + # @return [::Gapic::Config::Method] + # + attr_reader :get_authz_extension + ## + # RPC-specific configuration for `create_authz_extension` + # @return [::Gapic::Config::Method] + # + attr_reader :create_authz_extension + ## + # RPC-specific configuration for `update_authz_extension` + # @return [::Gapic::Config::Method] + # + attr_reader :update_authz_extension + ## + # RPC-specific configuration for `delete_authz_extension` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_authz_extension + + # @private + def initialize parent_rpcs = nil + list_lb_traffic_extensions_config = parent_rpcs.list_lb_traffic_extensions if parent_rpcs.respond_to? :list_lb_traffic_extensions + @list_lb_traffic_extensions = ::Gapic::Config::Method.new list_lb_traffic_extensions_config + get_lb_traffic_extension_config = parent_rpcs.get_lb_traffic_extension if parent_rpcs.respond_to? :get_lb_traffic_extension + @get_lb_traffic_extension = ::Gapic::Config::Method.new get_lb_traffic_extension_config + create_lb_traffic_extension_config = parent_rpcs.create_lb_traffic_extension if parent_rpcs.respond_to? :create_lb_traffic_extension + @create_lb_traffic_extension = ::Gapic::Config::Method.new create_lb_traffic_extension_config + update_lb_traffic_extension_config = parent_rpcs.update_lb_traffic_extension if parent_rpcs.respond_to? :update_lb_traffic_extension + @update_lb_traffic_extension = ::Gapic::Config::Method.new update_lb_traffic_extension_config + delete_lb_traffic_extension_config = parent_rpcs.delete_lb_traffic_extension if parent_rpcs.respond_to? :delete_lb_traffic_extension + @delete_lb_traffic_extension = ::Gapic::Config::Method.new delete_lb_traffic_extension_config + list_lb_route_extensions_config = parent_rpcs.list_lb_route_extensions if parent_rpcs.respond_to? :list_lb_route_extensions + @list_lb_route_extensions = ::Gapic::Config::Method.new list_lb_route_extensions_config + get_lb_route_extension_config = parent_rpcs.get_lb_route_extension if parent_rpcs.respond_to? :get_lb_route_extension + @get_lb_route_extension = ::Gapic::Config::Method.new get_lb_route_extension_config + create_lb_route_extension_config = parent_rpcs.create_lb_route_extension if parent_rpcs.respond_to? :create_lb_route_extension + @create_lb_route_extension = ::Gapic::Config::Method.new create_lb_route_extension_config + update_lb_route_extension_config = parent_rpcs.update_lb_route_extension if parent_rpcs.respond_to? :update_lb_route_extension + @update_lb_route_extension = ::Gapic::Config::Method.new update_lb_route_extension_config + delete_lb_route_extension_config = parent_rpcs.delete_lb_route_extension if parent_rpcs.respond_to? :delete_lb_route_extension + @delete_lb_route_extension = ::Gapic::Config::Method.new delete_lb_route_extension_config + list_lb_edge_extensions_config = parent_rpcs.list_lb_edge_extensions if parent_rpcs.respond_to? :list_lb_edge_extensions + @list_lb_edge_extensions = ::Gapic::Config::Method.new list_lb_edge_extensions_config + get_lb_edge_extension_config = parent_rpcs.get_lb_edge_extension if parent_rpcs.respond_to? :get_lb_edge_extension + @get_lb_edge_extension = ::Gapic::Config::Method.new get_lb_edge_extension_config + create_lb_edge_extension_config = parent_rpcs.create_lb_edge_extension if parent_rpcs.respond_to? :create_lb_edge_extension + @create_lb_edge_extension = ::Gapic::Config::Method.new create_lb_edge_extension_config + update_lb_edge_extension_config = parent_rpcs.update_lb_edge_extension if parent_rpcs.respond_to? :update_lb_edge_extension + @update_lb_edge_extension = ::Gapic::Config::Method.new update_lb_edge_extension_config + delete_lb_edge_extension_config = parent_rpcs.delete_lb_edge_extension if parent_rpcs.respond_to? :delete_lb_edge_extension + @delete_lb_edge_extension = ::Gapic::Config::Method.new delete_lb_edge_extension_config + list_authz_extensions_config = parent_rpcs.list_authz_extensions if parent_rpcs.respond_to? :list_authz_extensions + @list_authz_extensions = ::Gapic::Config::Method.new list_authz_extensions_config + get_authz_extension_config = parent_rpcs.get_authz_extension if parent_rpcs.respond_to? :get_authz_extension + @get_authz_extension = ::Gapic::Config::Method.new get_authz_extension_config + create_authz_extension_config = parent_rpcs.create_authz_extension if parent_rpcs.respond_to? :create_authz_extension + @create_authz_extension = ::Gapic::Config::Method.new create_authz_extension_config + update_authz_extension_config = parent_rpcs.update_authz_extension if parent_rpcs.respond_to? :update_authz_extension + @update_authz_extension = ::Gapic::Config::Method.new update_authz_extension_config + delete_authz_extension_config = parent_rpcs.delete_authz_extension if parent_rpcs.respond_to? :delete_authz_extension + @delete_authz_extension = ::Gapic::Config::Method.new delete_authz_extension_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_services-v1/lib/google/cloud/network_services/v1/dep_service/rest/operations.rb b/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/dep_service/rest/operations.rb new file mode 100644 index 000000000000..cfac5b24bc2c --- /dev/null +++ b/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/dep_service/rest/operations.rb @@ -0,0 +1,927 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 NetworkServices + module V1 + module DepService + module Rest + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "networkservices.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the DepService 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 DepService 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::NetworkServices::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::NetworkServices::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::NetworkServices::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::NetworkServices::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. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `: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 = "networkservices.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. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_operations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_operations + ## + # RPC-specific configuration for `get_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_operation + ## + # RPC-specific configuration for `delete_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_operation + ## + # RPC-specific configuration for `cancel_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :cancel_operation + + # @private + def initialize parent_rpcs = nil + list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations + @list_operations = ::Gapic::Config::Method.new list_operations_config + get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation + @get_operation = ::Gapic::Config::Method.new get_operation_config + delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation + @delete_operation = ::Gapic::Config::Method.new delete_operation_config + cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation + @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config + + yield self if block_given? + end + end + end + end + + ## + # @private + # REST service stub for the Longrunning Operations API. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + class OperationsServiceStub + def initialize endpoint:, endpoint_template:, universe_domain:, credentials: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials + end + + ## + # Baseline implementation for the list_operations REST call + # + # @param request_pb [::Google::Longrunning::ListOperationsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::ListOperationsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::ListOperationsResponse] + # A result object deserialized from the server's reply + def list_operations request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_list_operations_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_operations", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::ListOperationsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_operation REST call + # + # @param request_pb [::Google::Longrunning::GetOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def get_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_get_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_operation REST call + # + # @param request_pb [::Google::Longrunning::DeleteOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def delete_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_delete_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the cancel_operation REST call + # + # @param request_pb [::Google::Longrunning::CancelOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def cancel_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_cancel_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "cancel_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # @private + # + # GRPC transcoding helper method for the list_operations REST call + # + # @param request_pb [::Google::Longrunning::ListOperationsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_operations_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}/operations", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_operation REST call + # + # @param request_pb [::Google::Longrunning::GetOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_operation REST call + # + # @param request_pb [::Google::Longrunning::DeleteOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the cancel_operation REST call + # + # @param request_pb [::Google::Longrunning::CancelOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_cancel_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:cancel", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/dep_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/dep_service/rest/service_stub.rb new file mode 100644 index 000000000000..7a87a810b6ef --- /dev/null +++ b/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/dep_service/rest/service_stub.rb @@ -0,0 +1,1309 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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/networkservices/v1/dep_pb" + +module Google + module Cloud + module NetworkServices + module V1 + module DepService + module Rest + ## + # REST service stub for the DepService 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_lb_traffic_extensions REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::ListLbTrafficExtensionsRequest] + # 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::NetworkServices::V1::ListLbTrafficExtensionsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::NetworkServices::V1::ListLbTrafficExtensionsResponse] + # A result object deserialized from the server's reply + def list_lb_traffic_extensions request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_lb_traffic_extensions_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_lb_traffic_extensions", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::NetworkServices::V1::ListLbTrafficExtensionsResponse.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_lb_traffic_extension REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::GetLbTrafficExtensionRequest] + # 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::NetworkServices::V1::LbTrafficExtension] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::NetworkServices::V1::LbTrafficExtension] + # A result object deserialized from the server's reply + def get_lb_traffic_extension request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_lb_traffic_extension_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_lb_traffic_extension", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::NetworkServices::V1::LbTrafficExtension.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_lb_traffic_extension REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::CreateLbTrafficExtensionRequest] + # 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_lb_traffic_extension request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_lb_traffic_extension_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_lb_traffic_extension", + 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_lb_traffic_extension REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::UpdateLbTrafficExtensionRequest] + # 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_lb_traffic_extension request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_lb_traffic_extension_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_lb_traffic_extension", + 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_lb_traffic_extension REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::DeleteLbTrafficExtensionRequest] + # 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_lb_traffic_extension request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_lb_traffic_extension_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_lb_traffic_extension", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_lb_route_extensions REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::ListLbRouteExtensionsRequest] + # 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::NetworkServices::V1::ListLbRouteExtensionsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::NetworkServices::V1::ListLbRouteExtensionsResponse] + # A result object deserialized from the server's reply + def list_lb_route_extensions request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_lb_route_extensions_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_lb_route_extensions", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::NetworkServices::V1::ListLbRouteExtensionsResponse.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_lb_route_extension REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::GetLbRouteExtensionRequest] + # 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::NetworkServices::V1::LbRouteExtension] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::NetworkServices::V1::LbRouteExtension] + # A result object deserialized from the server's reply + def get_lb_route_extension request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_lb_route_extension_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_lb_route_extension", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::NetworkServices::V1::LbRouteExtension.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_lb_route_extension REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::CreateLbRouteExtensionRequest] + # 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_lb_route_extension request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_lb_route_extension_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_lb_route_extension", + 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_lb_route_extension REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::UpdateLbRouteExtensionRequest] + # 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_lb_route_extension request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_lb_route_extension_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_lb_route_extension", + 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_lb_route_extension REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::DeleteLbRouteExtensionRequest] + # 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_lb_route_extension request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_lb_route_extension_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_lb_route_extension", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_lb_edge_extensions REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::ListLbEdgeExtensionsRequest] + # 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::NetworkServices::V1::ListLbEdgeExtensionsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::NetworkServices::V1::ListLbEdgeExtensionsResponse] + # A result object deserialized from the server's reply + def list_lb_edge_extensions request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_lb_edge_extensions_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_lb_edge_extensions", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::NetworkServices::V1::ListLbEdgeExtensionsResponse.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_lb_edge_extension REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::GetLbEdgeExtensionRequest] + # 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::NetworkServices::V1::LbEdgeExtension] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::NetworkServices::V1::LbEdgeExtension] + # A result object deserialized from the server's reply + def get_lb_edge_extension request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_lb_edge_extension_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_lb_edge_extension", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::NetworkServices::V1::LbEdgeExtension.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_lb_edge_extension REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::CreateLbEdgeExtensionRequest] + # 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_lb_edge_extension request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_lb_edge_extension_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_lb_edge_extension", + 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_lb_edge_extension REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::UpdateLbEdgeExtensionRequest] + # 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_lb_edge_extension request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_lb_edge_extension_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_lb_edge_extension", + 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_lb_edge_extension REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::DeleteLbEdgeExtensionRequest] + # 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_lb_edge_extension request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_lb_edge_extension_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_lb_edge_extension", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_authz_extensions REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::ListAuthzExtensionsRequest] + # 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::NetworkServices::V1::ListAuthzExtensionsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::NetworkServices::V1::ListAuthzExtensionsResponse] + # A result object deserialized from the server's reply + def list_authz_extensions request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_authz_extensions_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_authz_extensions", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::NetworkServices::V1::ListAuthzExtensionsResponse.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_authz_extension REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::GetAuthzExtensionRequest] + # 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::NetworkServices::V1::AuthzExtension] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::NetworkServices::V1::AuthzExtension] + # A result object deserialized from the server's reply + def get_authz_extension request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_authz_extension_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_authz_extension", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::NetworkServices::V1::AuthzExtension.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_authz_extension REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::CreateAuthzExtensionRequest] + # 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_authz_extension request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_authz_extension_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_authz_extension", + 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_authz_extension REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::UpdateAuthzExtensionRequest] + # 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_authz_extension request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_authz_extension_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_authz_extension", + 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_authz_extension REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::DeleteAuthzExtensionRequest] + # 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_authz_extension request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_authz_extension_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_authz_extension", + 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_lb_traffic_extensions REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::ListLbTrafficExtensionsRequest] + # 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_lb_traffic_extensions_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/lbTrafficExtensions", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_lb_traffic_extension REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::GetLbTrafficExtensionRequest] + # 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_lb_traffic_extension_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/lbTrafficExtensions/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_lb_traffic_extension REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::CreateLbTrafficExtensionRequest] + # 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_lb_traffic_extension_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/lbTrafficExtensions", + body: "lb_traffic_extension", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_lb_traffic_extension REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::UpdateLbTrafficExtensionRequest] + # 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_lb_traffic_extension_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{lb_traffic_extension.name}", + body: "lb_traffic_extension", + matches: [ + ["lb_traffic_extension.name", %r{^projects/[^/]+/locations/[^/]+/lbTrafficExtensions/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_lb_traffic_extension REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::DeleteLbTrafficExtensionRequest] + # 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_lb_traffic_extension_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/lbTrafficExtensions/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_lb_route_extensions REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::ListLbRouteExtensionsRequest] + # 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_lb_route_extensions_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/lbRouteExtensions", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_lb_route_extension REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::GetLbRouteExtensionRequest] + # 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_lb_route_extension_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/lbRouteExtensions/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_lb_route_extension REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::CreateLbRouteExtensionRequest] + # 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_lb_route_extension_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/lbRouteExtensions", + body: "lb_route_extension", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_lb_route_extension REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::UpdateLbRouteExtensionRequest] + # 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_lb_route_extension_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{lb_route_extension.name}", + body: "lb_route_extension", + matches: [ + ["lb_route_extension.name", %r{^projects/[^/]+/locations/[^/]+/lbRouteExtensions/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_lb_route_extension REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::DeleteLbRouteExtensionRequest] + # 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_lb_route_extension_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/lbRouteExtensions/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_lb_edge_extensions REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::ListLbEdgeExtensionsRequest] + # 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_lb_edge_extensions_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/lbEdgeExtensions", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_lb_edge_extension REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::GetLbEdgeExtensionRequest] + # 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_lb_edge_extension_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/lbEdgeExtensions/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_lb_edge_extension REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::CreateLbEdgeExtensionRequest] + # 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_lb_edge_extension_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/lbEdgeExtensions", + body: "lb_edge_extension", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_lb_edge_extension REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::UpdateLbEdgeExtensionRequest] + # 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_lb_edge_extension_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{lb_edge_extension.name}", + body: "lb_edge_extension", + matches: [ + ["lb_edge_extension.name", %r{^projects/[^/]+/locations/[^/]+/lbEdgeExtensions/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_lb_edge_extension REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::DeleteLbEdgeExtensionRequest] + # 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_lb_edge_extension_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/lbEdgeExtensions/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_authz_extensions REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::ListAuthzExtensionsRequest] + # 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_authz_extensions_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/authzExtensions", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_authz_extension REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::GetAuthzExtensionRequest] + # 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_authz_extension_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/authzExtensions/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_authz_extension REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::CreateAuthzExtensionRequest] + # 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_authz_extension_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/authzExtensions", + body: "authz_extension", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_authz_extension REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::UpdateAuthzExtensionRequest] + # 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_authz_extension_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{authz_extension.name}", + body: "authz_extension", + matches: [ + ["authz_extension.name", %r{^projects/[^/]+/locations/[^/]+/authzExtensions/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_authz_extension REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::DeleteAuthzExtensionRequest] + # 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_authz_extension_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/authzExtensions/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/network_services.rb b/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/network_services.rb new file mode 100644 index 000000000000..7bb1dcbb0480 --- /dev/null +++ b/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/network_services.rb @@ -0,0 +1,56 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/network_services/v1/version" + +require "google/cloud/network_services/v1/network_services/credentials" +require "google/cloud/network_services/v1/network_services/paths" +require "google/cloud/network_services/v1/network_services/operations" +require "google/cloud/network_services/v1/network_services/client" +require "google/cloud/network_services/v1/network_services/rest" + +module Google + module Cloud + module NetworkServices + module V1 + ## + # Service describing handlers for resources. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/network_services/v1/network_services" + # client = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/network_services/v1/network_services/rest" + # client = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new + # + module NetworkServices + end + end + end + end +end + +helper_path = ::File.join __dir__, "network_services", "helpers.rb" +require "google/cloud/network_services/v1/network_services/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/network_services/client.rb b/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/network_services/client.rb new file mode 100644 index 000000000000..fbe7a359c85d --- /dev/null +++ b/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/network_services/client.rb @@ -0,0 +1,6946 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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/networkservices/v1/network_services_pb" +require "google/cloud/location" +require "google/iam/v1" + +module Google + module Cloud + module NetworkServices + module V1 + module NetworkServices + ## + # Client for the NetworkServices service. + # + # Service describing handlers for resources. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "networkservices.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :network_services_stub + + ## + # Configure the NetworkServices Client class. + # + # See {::Google::Cloud::NetworkServices::V1::NetworkServices::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all NetworkServices clients + # ::Google::Cloud::NetworkServices::V1::NetworkServices::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", "NetworkServices", "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 NetworkServices 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::NetworkServices::V1::NetworkServices::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 + @network_services_stub.universe_domain + end + + ## + # Create a new NetworkServices client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the NetworkServices 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/networkservices/v1/network_services_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 + + @network_services_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::NetworkServices::V1::NetworkServices::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 + ) + + @network_services_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 = @network_services_stub.endpoint + config.universe_domain = @network_services_stub.universe_domain + config.logger = @network_services_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 = @network_services_stub.endpoint + config.universe_domain = @network_services_stub.universe_domain + config.logger = @network_services_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::NetworkServices::V1::NetworkServices::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 + @network_services_stub.logger + end + + # Service calls + + ## + # Lists EndpointPolicies in a given project and location. + # + # @overload list_endpoint_policies(request, options = nil) + # Pass arguments to `list_endpoint_policies` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::ListEndpointPoliciesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::ListEndpointPoliciesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_endpoint_policies(parent: nil, page_size: nil, page_token: nil, return_partial_success: nil) + # Pass arguments to `list_endpoint_policies` via keyword arguments. Note that at + # least one keyword argument is 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 project and location from which the EndpointPolicies should + # be listed, specified in the format `projects/*/locations/*`. + # @param page_size [::Integer] + # Maximum number of EndpointPolicies to return per call. + # @param page_token [::String] + # The value returned by the last `ListEndpointPoliciesResponse` + # Indicates that this is a continuation of a prior + # `ListEndpointPolicies` call, and that the system should return the + # next page of data. + # @param return_partial_success [::Boolean] + # Optional. If true, allow partial responses for multi-regional Aggregated + # List requests. Otherwise if one of the locations is down or unreachable, + # the Aggregated List request will fail. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::NetworkServices::V1::EndpointPolicy>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::NetworkServices::V1::EndpointPolicy>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/network_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::ListEndpointPoliciesRequest.new + # + # # Call the list_endpoint_policies method. + # result = client.list_endpoint_policies 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::NetworkServices::V1::EndpointPolicy. + # p item + # end + # + def list_endpoint_policies request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::ListEndpointPoliciesRequest + + # Converts hash 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_endpoint_policies.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::NetworkServices::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_endpoint_policies.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_endpoint_policies.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @network_services_stub.call_rpc :list_endpoint_policies, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @network_services_stub, :list_endpoint_policies, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets details of a single EndpointPolicy. + # + # @overload get_endpoint_policy(request, options = nil) + # Pass arguments to `get_endpoint_policy` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::GetEndpointPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::GetEndpointPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_endpoint_policy(name: nil) + # Pass arguments to `get_endpoint_policy` via keyword arguments. Note that at + # least one keyword argument is 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. A name of the EndpointPolicy to get. Must be in the format + # `projects/*/locations/*/endpointPolicies/*`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::NetworkServices::V1::EndpointPolicy] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::NetworkServices::V1::EndpointPolicy] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/network_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::GetEndpointPolicyRequest.new + # + # # Call the get_endpoint_policy method. + # result = client.get_endpoint_policy request + # + # # The returned object is of type Google::Cloud::NetworkServices::V1::EndpointPolicy. + # p result + # + def get_endpoint_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::GetEndpointPolicyRequest + + # Converts hash 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_endpoint_policy.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::NetworkServices::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_endpoint_policy.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_endpoint_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @network_services_stub.call_rpc :get_endpoint_policy, 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 EndpointPolicy in a given project and location. + # + # @overload create_endpoint_policy(request, options = nil) + # Pass arguments to `create_endpoint_policy` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::CreateEndpointPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::CreateEndpointPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_endpoint_policy(parent: nil, endpoint_policy_id: nil, endpoint_policy: nil) + # Pass arguments to `create_endpoint_policy` via keyword arguments. Note that at + # least one keyword argument is 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 EndpointPolicy. Must be in the + # format `projects/*/locations/*`. + # @param endpoint_policy_id [::String] + # Required. Short name of the EndpointPolicy resource to be created. + # E.g. "CustomECS". + # @param endpoint_policy [::Google::Cloud::NetworkServices::V1::EndpointPolicy, ::Hash] + # Required. EndpointPolicy resource to be created. + # + # @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_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::CreateEndpointPolicyRequest.new + # + # # Call the create_endpoint_policy method. + # result = client.create_endpoint_policy 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_endpoint_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::CreateEndpointPolicyRequest + + # Converts hash 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_endpoint_policy.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::NetworkServices::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_endpoint_policy.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_endpoint_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @network_services_stub.call_rpc :create_endpoint_policy, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates the parameters of a single EndpointPolicy. + # + # @overload update_endpoint_policy(request, options = nil) + # Pass arguments to `update_endpoint_policy` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::UpdateEndpointPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::UpdateEndpointPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_endpoint_policy(update_mask: nil, endpoint_policy: nil) + # Pass arguments to `update_endpoint_policy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. Field mask is used to specify the fields to be overwritten in the + # EndpointPolicy resource by the update. + # The fields specified in the update_mask are relative to the resource, not + # the full request. A field will be overwritten if it is in the mask. If the + # user does not provide a mask then all fields will be overwritten. + # @param endpoint_policy [::Google::Cloud::NetworkServices::V1::EndpointPolicy, ::Hash] + # Required. Updated EndpointPolicy 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_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::UpdateEndpointPolicyRequest.new + # + # # Call the update_endpoint_policy method. + # result = client.update_endpoint_policy 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_endpoint_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::UpdateEndpointPolicyRequest + + # Converts hash 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_endpoint_policy.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::NetworkServices::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.endpoint_policy&.name + header_params["endpoint_policy.name"] = request.endpoint_policy.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_endpoint_policy.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_endpoint_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @network_services_stub.call_rpc :update_endpoint_policy, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a single EndpointPolicy. + # + # @overload delete_endpoint_policy(request, options = nil) + # Pass arguments to `delete_endpoint_policy` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::DeleteEndpointPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::DeleteEndpointPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_endpoint_policy(name: nil) + # Pass arguments to `delete_endpoint_policy` via keyword arguments. Note that at + # least one keyword argument is 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. A name of the EndpointPolicy to delete. Must be in the format + # `projects/*/locations/*/endpointPolicies/*`. + # + # @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_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::DeleteEndpointPolicyRequest.new + # + # # Call the delete_endpoint_policy method. + # result = client.delete_endpoint_policy 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_endpoint_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::DeleteEndpointPolicyRequest + + # Converts hash 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_endpoint_policy.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::NetworkServices::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_endpoint_policy.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_endpoint_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @network_services_stub.call_rpc :delete_endpoint_policy, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists `WasmPluginVersion` resources in a given project and + # location. + # + # @overload list_wasm_plugin_versions(request, options = nil) + # Pass arguments to `list_wasm_plugin_versions` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::ListWasmPluginVersionsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::ListWasmPluginVersionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_wasm_plugin_versions(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_wasm_plugin_versions` via keyword arguments. Note that at + # least one keyword argument is 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 `WasmPlugin` resource whose `WasmPluginVersion`s + # are listed, specified in the following format: + # `projects/{project}/locations/global/wasmPlugins/{wasm_plugin}`. + # @param page_size [::Integer] + # Maximum number of `WasmPluginVersion` resources to return per + # call. If not specified, at most 50 `WasmPluginVersion` resources are + # returned. The maximum value is 1000; values above 1000 are coerced to + # 1000. + # @param page_token [::String] + # The value returned by the last `ListWasmPluginVersionsResponse` call. + # Indicates that this is a continuation of a prior + # `ListWasmPluginVersions` call, and that the + # next page of data is to be returned. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::NetworkServices::V1::WasmPluginVersion>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::NetworkServices::V1::WasmPluginVersion>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/network_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::ListWasmPluginVersionsRequest.new + # + # # Call the list_wasm_plugin_versions method. + # result = client.list_wasm_plugin_versions 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::NetworkServices::V1::WasmPluginVersion. + # p item + # end + # + def list_wasm_plugin_versions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::ListWasmPluginVersionsRequest + + # Converts hash 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_wasm_plugin_versions.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::NetworkServices::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_wasm_plugin_versions.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_wasm_plugin_versions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @network_services_stub.call_rpc :list_wasm_plugin_versions, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @network_services_stub, :list_wasm_plugin_versions, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets details of the specified `WasmPluginVersion` resource. + # + # @overload get_wasm_plugin_version(request, options = nil) + # Pass arguments to `get_wasm_plugin_version` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::GetWasmPluginVersionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::GetWasmPluginVersionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_wasm_plugin_version(name: nil) + # Pass arguments to `get_wasm_plugin_version` via keyword arguments. Note that at + # least one keyword argument is 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. A name of the `WasmPluginVersion` resource to get. Must be in + # the format + # `projects/{project}/locations/global/wasmPlugins/{wasm_plugin}/versions/{wasm_plugin_version}`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::NetworkServices::V1::WasmPluginVersion] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::NetworkServices::V1::WasmPluginVersion] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/network_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::GetWasmPluginVersionRequest.new + # + # # Call the get_wasm_plugin_version method. + # result = client.get_wasm_plugin_version request + # + # # The returned object is of type Google::Cloud::NetworkServices::V1::WasmPluginVersion. + # p result + # + def get_wasm_plugin_version request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::GetWasmPluginVersionRequest + + # Converts hash 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_wasm_plugin_version.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::NetworkServices::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_wasm_plugin_version.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_wasm_plugin_version.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @network_services_stub.call_rpc :get_wasm_plugin_version, 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 `WasmPluginVersion` resource in a given project + # and location. + # + # @overload create_wasm_plugin_version(request, options = nil) + # Pass arguments to `create_wasm_plugin_version` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::CreateWasmPluginVersionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::CreateWasmPluginVersionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_wasm_plugin_version(parent: nil, wasm_plugin_version_id: nil, wasm_plugin_version: nil) + # Pass arguments to `create_wasm_plugin_version` via keyword arguments. Note that at + # least one keyword argument is 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 `WasmPluginVersion` resource. Must be + # in the format + # `projects/{project}/locations/global/wasmPlugins/{wasm_plugin}`. + # @param wasm_plugin_version_id [::String] + # Required. User-provided ID of the `WasmPluginVersion` resource to be + # created. + # @param wasm_plugin_version [::Google::Cloud::NetworkServices::V1::WasmPluginVersion, ::Hash] + # Required. `WasmPluginVersion` resource to be created. + # + # @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_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::CreateWasmPluginVersionRequest.new + # + # # Call the create_wasm_plugin_version method. + # result = client.create_wasm_plugin_version 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_wasm_plugin_version request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::CreateWasmPluginVersionRequest + + # Converts hash 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_wasm_plugin_version.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::NetworkServices::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_wasm_plugin_version.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_wasm_plugin_version.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @network_services_stub.call_rpc :create_wasm_plugin_version, 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 the specified `WasmPluginVersion` resource. + # + # @overload delete_wasm_plugin_version(request, options = nil) + # Pass arguments to `delete_wasm_plugin_version` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::DeleteWasmPluginVersionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::DeleteWasmPluginVersionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_wasm_plugin_version(name: nil) + # Pass arguments to `delete_wasm_plugin_version` via keyword arguments. Note that at + # least one keyword argument is 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. A name of the `WasmPluginVersion` resource to delete. Must be in + # the format + # `projects/{project}/locations/global/wasmPlugins/{wasm_plugin}/versions/{wasm_plugin_version}`. + # + # @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_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::DeleteWasmPluginVersionRequest.new + # + # # Call the delete_wasm_plugin_version method. + # result = client.delete_wasm_plugin_version 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_wasm_plugin_version request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::DeleteWasmPluginVersionRequest + + # Converts hash 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_wasm_plugin_version.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::NetworkServices::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_wasm_plugin_version.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_wasm_plugin_version.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @network_services_stub.call_rpc :delete_wasm_plugin_version, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists `WasmPlugin` resources in a given project and + # location. + # + # @overload list_wasm_plugins(request, options = nil) + # Pass arguments to `list_wasm_plugins` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::ListWasmPluginsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::ListWasmPluginsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_wasm_plugins(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_wasm_plugins` via keyword arguments. Note that at + # least one keyword argument is 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 project and location from which the `WasmPlugin` resources + # are listed, specified in the following format: + # `projects/{project}/locations/global`. + # @param page_size [::Integer] + # Maximum number of `WasmPlugin` resources to return per call. + # If not specified, at most 50 `WasmPlugin` resources are returned. + # The maximum value is 1000; values above 1000 are coerced to 1000. + # @param page_token [::String] + # The value returned by the last `ListWasmPluginsResponse` call. + # Indicates that this is a continuation of a prior + # `ListWasmPlugins` call, and that the + # next page of data is to be returned. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::NetworkServices::V1::WasmPlugin>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::NetworkServices::V1::WasmPlugin>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/network_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::ListWasmPluginsRequest.new + # + # # Call the list_wasm_plugins method. + # result = client.list_wasm_plugins 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::NetworkServices::V1::WasmPlugin. + # p item + # end + # + def list_wasm_plugins request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::ListWasmPluginsRequest + + # Converts hash 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_wasm_plugins.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::NetworkServices::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_wasm_plugins.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_wasm_plugins.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @network_services_stub.call_rpc :list_wasm_plugins, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @network_services_stub, :list_wasm_plugins, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets details of the specified `WasmPlugin` resource. + # + # @overload get_wasm_plugin(request, options = nil) + # Pass arguments to `get_wasm_plugin` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::GetWasmPluginRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::GetWasmPluginRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_wasm_plugin(name: nil, view: nil) + # Pass arguments to `get_wasm_plugin` via keyword arguments. Note that at + # least one keyword argument is 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. A name of the `WasmPlugin` resource to get. Must be in the + # format `projects/{project}/locations/global/wasmPlugins/{wasm_plugin}`. + # @param view [::Google::Cloud::NetworkServices::V1::WasmPluginView] + # Determines how much data must be returned in the response. See + # [AIP-157](https://google.aip.dev/157). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::NetworkServices::V1::WasmPlugin] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::NetworkServices::V1::WasmPlugin] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/network_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::GetWasmPluginRequest.new + # + # # Call the get_wasm_plugin method. + # result = client.get_wasm_plugin request + # + # # The returned object is of type Google::Cloud::NetworkServices::V1::WasmPlugin. + # p result + # + def get_wasm_plugin request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::GetWasmPluginRequest + + # Converts hash 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_wasm_plugin.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::NetworkServices::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_wasm_plugin.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_wasm_plugin.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @network_services_stub.call_rpc :get_wasm_plugin, 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 `WasmPlugin` resource in a given project + # and location. + # + # @overload create_wasm_plugin(request, options = nil) + # Pass arguments to `create_wasm_plugin` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::CreateWasmPluginRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::CreateWasmPluginRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_wasm_plugin(parent: nil, wasm_plugin_id: nil, wasm_plugin: nil) + # Pass arguments to `create_wasm_plugin` via keyword arguments. Note that at + # least one keyword argument is 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 `WasmPlugin` resource. Must be in the + # format `projects/{project}/locations/global`. + # @param wasm_plugin_id [::String] + # Required. User-provided ID of the `WasmPlugin` resource to be created. + # @param wasm_plugin [::Google::Cloud::NetworkServices::V1::WasmPlugin, ::Hash] + # Required. `WasmPlugin` resource to be created. + # + # @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_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::CreateWasmPluginRequest.new + # + # # Call the create_wasm_plugin method. + # result = client.create_wasm_plugin 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_wasm_plugin request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::CreateWasmPluginRequest + + # Converts hash 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_wasm_plugin.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::NetworkServices::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_wasm_plugin.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_wasm_plugin.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @network_services_stub.call_rpc :create_wasm_plugin, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates the parameters of the specified `WasmPlugin` resource. + # + # @overload update_wasm_plugin(request, options = nil) + # Pass arguments to `update_wasm_plugin` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::UpdateWasmPluginRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::UpdateWasmPluginRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_wasm_plugin(update_mask: nil, wasm_plugin: nil) + # Pass arguments to `update_wasm_plugin` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. Used to specify the fields to be overwritten in the + # `WasmPlugin` resource by the update. + # The fields specified in the `update_mask` field are relative to the + # resource, not the full request. + # An omitted `update_mask` field is treated as an implied `update_mask` + # field equivalent to all fields that are populated (that have a non-empty + # value). + # The `update_mask` field supports a special value `*`, which means that + # each field in the given `WasmPlugin` resource (including the empty ones) + # replaces the current value. + # @param wasm_plugin [::Google::Cloud::NetworkServices::V1::WasmPlugin, ::Hash] + # Required. Updated `WasmPlugin` 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_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::UpdateWasmPluginRequest.new + # + # # Call the update_wasm_plugin method. + # result = client.update_wasm_plugin 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_wasm_plugin request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::UpdateWasmPluginRequest + + # Converts hash 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_wasm_plugin.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::NetworkServices::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.wasm_plugin&.name + header_params["wasm_plugin.name"] = request.wasm_plugin.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_wasm_plugin.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_wasm_plugin.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @network_services_stub.call_rpc :update_wasm_plugin, 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 the specified `WasmPlugin` resource. + # + # @overload delete_wasm_plugin(request, options = nil) + # Pass arguments to `delete_wasm_plugin` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::DeleteWasmPluginRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::DeleteWasmPluginRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_wasm_plugin(name: nil) + # Pass arguments to `delete_wasm_plugin` via keyword arguments. Note that at + # least one keyword argument is 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. A name of the `WasmPlugin` resource to delete. Must be in the + # format `projects/{project}/locations/global/wasmPlugins/{wasm_plugin}`. + # + # @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_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::DeleteWasmPluginRequest.new + # + # # Call the delete_wasm_plugin method. + # result = client.delete_wasm_plugin 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_wasm_plugin request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::DeleteWasmPluginRequest + + # Converts hash 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_wasm_plugin.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::NetworkServices::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_wasm_plugin.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_wasm_plugin.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @network_services_stub.call_rpc :delete_wasm_plugin, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists Gateways in a given project and location. + # + # @overload list_gateways(request, options = nil) + # Pass arguments to `list_gateways` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::ListGatewaysRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::ListGatewaysRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_gateways(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_gateways` via keyword arguments. Note that at + # least one keyword argument is 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 project and location from which the Gateways should be + # listed, specified in the format `projects/*/locations/*`. + # @param page_size [::Integer] + # Maximum number of Gateways to return per call. + # @param page_token [::String] + # The value returned by the last `ListGatewaysResponse` + # Indicates that this is a continuation of a prior `ListGateways` call, + # and that the system should return the next page of data. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::NetworkServices::V1::Gateway>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::NetworkServices::V1::Gateway>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/network_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::ListGatewaysRequest.new + # + # # Call the list_gateways method. + # result = client.list_gateways 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::NetworkServices::V1::Gateway. + # p item + # end + # + def list_gateways request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::ListGatewaysRequest + + # Converts hash 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_gateways.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::NetworkServices::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_gateways.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_gateways.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @network_services_stub.call_rpc :list_gateways, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @network_services_stub, :list_gateways, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets details of a single Gateway. + # + # @overload get_gateway(request, options = nil) + # Pass arguments to `get_gateway` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::GetGatewayRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::GetGatewayRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_gateway(name: nil) + # Pass arguments to `get_gateway` via keyword arguments. Note that at + # least one keyword argument is 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. A name of the Gateway to get. Must be in the format + # `projects/*/locations/*/gateways/*`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::NetworkServices::V1::Gateway] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::NetworkServices::V1::Gateway] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/network_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::GetGatewayRequest.new + # + # # Call the get_gateway method. + # result = client.get_gateway request + # + # # The returned object is of type Google::Cloud::NetworkServices::V1::Gateway. + # p result + # + def get_gateway request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::GetGatewayRequest + + # Converts hash 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_gateway.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::NetworkServices::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_gateway.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_gateway.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @network_services_stub.call_rpc :get_gateway, 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 Gateway in a given project and location. + # + # @overload create_gateway(request, options = nil) + # Pass arguments to `create_gateway` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::CreateGatewayRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::CreateGatewayRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_gateway(parent: nil, gateway_id: nil, gateway: nil) + # Pass arguments to `create_gateway` via keyword arguments. Note that at + # least one keyword argument is 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 Gateway. Must be in the + # format `projects/*/locations/*`. + # @param gateway_id [::String] + # Required. Short name of the Gateway resource to be created. + # @param gateway [::Google::Cloud::NetworkServices::V1::Gateway, ::Hash] + # Required. Gateway resource to be created. + # + # @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_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::CreateGatewayRequest.new + # + # # Call the create_gateway method. + # result = client.create_gateway 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_gateway request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::CreateGatewayRequest + + # Converts hash 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_gateway.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::NetworkServices::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_gateway.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_gateway.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @network_services_stub.call_rpc :create_gateway, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates the parameters of a single Gateway. + # + # @overload update_gateway(request, options = nil) + # Pass arguments to `update_gateway` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::UpdateGatewayRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::UpdateGatewayRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_gateway(update_mask: nil, gateway: nil) + # Pass arguments to `update_gateway` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. Field mask is used to specify the fields to be overwritten in the + # Gateway resource by the update. + # The fields specified in the update_mask are relative to the resource, not + # the full request. A field will be overwritten if it is in the mask. If the + # user does not provide a mask then all fields will be overwritten. + # @param gateway [::Google::Cloud::NetworkServices::V1::Gateway, ::Hash] + # Required. Updated Gateway 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_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::UpdateGatewayRequest.new + # + # # Call the update_gateway method. + # result = client.update_gateway 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_gateway request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::UpdateGatewayRequest + + # Converts hash 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_gateway.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::NetworkServices::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.gateway&.name + header_params["gateway.name"] = request.gateway.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_gateway.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_gateway.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @network_services_stub.call_rpc :update_gateway, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a single Gateway. + # + # @overload delete_gateway(request, options = nil) + # Pass arguments to `delete_gateway` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::DeleteGatewayRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::DeleteGatewayRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_gateway(name: nil) + # Pass arguments to `delete_gateway` via keyword arguments. Note that at + # least one keyword argument is 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. A name of the Gateway to delete. Must be in the format + # `projects/*/locations/*/gateways/*`. + # + # @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_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::DeleteGatewayRequest.new + # + # # Call the delete_gateway method. + # result = client.delete_gateway 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_gateway request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::DeleteGatewayRequest + + # Converts hash 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_gateway.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::NetworkServices::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_gateway.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_gateway.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @network_services_stub.call_rpc :delete_gateway, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists GrpcRoutes in a given project and location. + # + # @overload list_grpc_routes(request, options = nil) + # Pass arguments to `list_grpc_routes` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::ListGrpcRoutesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::ListGrpcRoutesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_grpc_routes(parent: nil, page_size: nil, page_token: nil, return_partial_success: nil) + # Pass arguments to `list_grpc_routes` via keyword arguments. Note that at + # least one keyword argument is 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 project and location from which the GrpcRoutes should be + # listed, specified in the format `projects/*/locations/*`. + # @param page_size [::Integer] + # Maximum number of GrpcRoutes to return per call. + # @param page_token [::String] + # The value returned by the last `ListGrpcRoutesResponse` + # Indicates that this is a continuation of a prior `ListGrpcRoutes` call, + # and that the system should return the next page of data. + # @param return_partial_success [::Boolean] + # Optional. If true, allow partial responses for multi-regional Aggregated + # List requests. Otherwise if one of the locations is down or unreachable, + # the Aggregated List request will fail. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::NetworkServices::V1::GrpcRoute>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::NetworkServices::V1::GrpcRoute>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/network_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::ListGrpcRoutesRequest.new + # + # # Call the list_grpc_routes method. + # result = client.list_grpc_routes 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::NetworkServices::V1::GrpcRoute. + # p item + # end + # + def list_grpc_routes request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::ListGrpcRoutesRequest + + # Converts hash 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_grpc_routes.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::NetworkServices::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_grpc_routes.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_grpc_routes.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @network_services_stub.call_rpc :list_grpc_routes, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @network_services_stub, :list_grpc_routes, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets details of a single GrpcRoute. + # + # @overload get_grpc_route(request, options = nil) + # Pass arguments to `get_grpc_route` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::GetGrpcRouteRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::GetGrpcRouteRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_grpc_route(name: nil) + # Pass arguments to `get_grpc_route` via keyword arguments. Note that at + # least one keyword argument is 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. A name of the GrpcRoute to get. Must be in the format + # `projects/*/locations/*/grpcRoutes/*`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::NetworkServices::V1::GrpcRoute] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::NetworkServices::V1::GrpcRoute] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/network_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::GetGrpcRouteRequest.new + # + # # Call the get_grpc_route method. + # result = client.get_grpc_route request + # + # # The returned object is of type Google::Cloud::NetworkServices::V1::GrpcRoute. + # p result + # + def get_grpc_route request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::GetGrpcRouteRequest + + # Converts hash 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_grpc_route.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::NetworkServices::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_grpc_route.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_grpc_route.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @network_services_stub.call_rpc :get_grpc_route, 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 GrpcRoute in a given project and location. + # + # @overload create_grpc_route(request, options = nil) + # Pass arguments to `create_grpc_route` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::CreateGrpcRouteRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::CreateGrpcRouteRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_grpc_route(parent: nil, grpc_route_id: nil, grpc_route: nil) + # Pass arguments to `create_grpc_route` via keyword arguments. Note that at + # least one keyword argument is 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 GrpcRoute. Must be in the + # format `projects/*/locations/*`. + # @param grpc_route_id [::String] + # Required. Short name of the GrpcRoute resource to be created. + # @param grpc_route [::Google::Cloud::NetworkServices::V1::GrpcRoute, ::Hash] + # Required. GrpcRoute resource to be created. + # + # @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_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::CreateGrpcRouteRequest.new + # + # # Call the create_grpc_route method. + # result = client.create_grpc_route 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_grpc_route request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::CreateGrpcRouteRequest + + # Converts hash 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_grpc_route.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::NetworkServices::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_grpc_route.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_grpc_route.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @network_services_stub.call_rpc :create_grpc_route, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates the parameters of a single GrpcRoute. + # + # @overload update_grpc_route(request, options = nil) + # Pass arguments to `update_grpc_route` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::UpdateGrpcRouteRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::UpdateGrpcRouteRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_grpc_route(update_mask: nil, grpc_route: nil) + # Pass arguments to `update_grpc_route` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. Field mask is used to specify the fields to be overwritten in the + # GrpcRoute resource by the update. + # The fields specified in the update_mask are relative to the resource, not + # the full request. A field will be overwritten if it is in the mask. If the + # user does not provide a mask then all fields will be overwritten. + # @param grpc_route [::Google::Cloud::NetworkServices::V1::GrpcRoute, ::Hash] + # Required. Updated GrpcRoute 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_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::UpdateGrpcRouteRequest.new + # + # # Call the update_grpc_route method. + # result = client.update_grpc_route 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_grpc_route request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::UpdateGrpcRouteRequest + + # Converts hash 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_grpc_route.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::NetworkServices::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.grpc_route&.name + header_params["grpc_route.name"] = request.grpc_route.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_grpc_route.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_grpc_route.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @network_services_stub.call_rpc :update_grpc_route, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a single GrpcRoute. + # + # @overload delete_grpc_route(request, options = nil) + # Pass arguments to `delete_grpc_route` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::DeleteGrpcRouteRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::DeleteGrpcRouteRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_grpc_route(name: nil) + # Pass arguments to `delete_grpc_route` via keyword arguments. Note that at + # least one keyword argument is 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. A name of the GrpcRoute to delete. Must be in the format + # `projects/*/locations/*/grpcRoutes/*`. + # + # @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_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::DeleteGrpcRouteRequest.new + # + # # Call the delete_grpc_route method. + # result = client.delete_grpc_route 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_grpc_route request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::DeleteGrpcRouteRequest + + # Converts hash 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_grpc_route.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::NetworkServices::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_grpc_route.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_grpc_route.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @network_services_stub.call_rpc :delete_grpc_route, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists HttpRoute in a given project and location. + # + # @overload list_http_routes(request, options = nil) + # Pass arguments to `list_http_routes` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::ListHttpRoutesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::ListHttpRoutesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_http_routes(parent: nil, page_size: nil, page_token: nil, return_partial_success: nil, filter: nil) + # Pass arguments to `list_http_routes` via keyword arguments. Note that at + # least one keyword argument is 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 project and location from which the HttpRoutes should be + # listed, specified in the format `projects/*/locations/*`. + # @param page_size [::Integer] + # Maximum number of HttpRoutes to return per call. + # @param page_token [::String] + # The value returned by the last `ListHttpRoutesResponse` + # Indicates that this is a continuation of a prior `ListHttpRoutes` call, + # and that the system should return the next page of data. + # @param return_partial_success [::Boolean] + # Optional. If true, allow partial responses for multi-regional Aggregated + # List requests. Otherwise if one of the locations is down or unreachable, + # the Aggregated List request will fail. + # @param filter [::String] + # Optional. Filter expression to restrict the list. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::NetworkServices::V1::HttpRoute>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::NetworkServices::V1::HttpRoute>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/network_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::ListHttpRoutesRequest.new + # + # # Call the list_http_routes method. + # result = client.list_http_routes 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::NetworkServices::V1::HttpRoute. + # p item + # end + # + def list_http_routes request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::ListHttpRoutesRequest + + # Converts hash 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_http_routes.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::NetworkServices::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_http_routes.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_http_routes.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @network_services_stub.call_rpc :list_http_routes, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @network_services_stub, :list_http_routes, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets details of a single HttpRoute. + # + # @overload get_http_route(request, options = nil) + # Pass arguments to `get_http_route` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::GetHttpRouteRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::GetHttpRouteRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_http_route(name: nil) + # Pass arguments to `get_http_route` via keyword arguments. Note that at + # least one keyword argument is 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. A name of the HttpRoute to get. Must be in the format + # `projects/*/locations/*/httpRoutes/*`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::NetworkServices::V1::HttpRoute] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::NetworkServices::V1::HttpRoute] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/network_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::GetHttpRouteRequest.new + # + # # Call the get_http_route method. + # result = client.get_http_route request + # + # # The returned object is of type Google::Cloud::NetworkServices::V1::HttpRoute. + # p result + # + def get_http_route request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::GetHttpRouteRequest + + # Converts hash 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_http_route.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::NetworkServices::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_http_route.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_http_route.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @network_services_stub.call_rpc :get_http_route, 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 HttpRoute in a given project and location. + # + # @overload create_http_route(request, options = nil) + # Pass arguments to `create_http_route` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::CreateHttpRouteRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::CreateHttpRouteRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_http_route(parent: nil, http_route_id: nil, http_route: nil, request_id: nil) + # Pass arguments to `create_http_route` via keyword arguments. Note that at + # least one keyword argument is 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 HttpRoute. Must be in the + # format `projects/*/locations/*`. + # @param http_route_id [::String] + # Required. Short name of the HttpRoute resource to be created. + # @param http_route [::Google::Cloud::NetworkServices::V1::HttpRoute, ::Hash] + # Required. HttpRoute resource to be created. + # @param request_id [::String] + # Optional. Idempotent request UUID. + # + # @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_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::CreateHttpRouteRequest.new + # + # # Call the create_http_route method. + # result = client.create_http_route 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_http_route request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::CreateHttpRouteRequest + + # Converts hash 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_http_route.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::NetworkServices::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_http_route.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_http_route.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @network_services_stub.call_rpc :create_http_route, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates the parameters of a single HttpRoute. + # + # @overload update_http_route(request, options = nil) + # Pass arguments to `update_http_route` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::UpdateHttpRouteRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::UpdateHttpRouteRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_http_route(update_mask: nil, http_route: nil) + # Pass arguments to `update_http_route` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. Field mask is used to specify the fields to be overwritten in the + # HttpRoute resource by the update. + # The fields specified in the update_mask are relative to the resource, not + # the full request. A field will be overwritten if it is in the mask. If the + # user does not provide a mask then all fields will be overwritten. + # @param http_route [::Google::Cloud::NetworkServices::V1::HttpRoute, ::Hash] + # Required. Updated HttpRoute 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_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::UpdateHttpRouteRequest.new + # + # # Call the update_http_route method. + # result = client.update_http_route 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_http_route request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::UpdateHttpRouteRequest + + # Converts hash 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_http_route.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::NetworkServices::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.http_route&.name + header_params["http_route.name"] = request.http_route.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_http_route.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_http_route.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @network_services_stub.call_rpc :update_http_route, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a single HttpRoute. + # + # @overload delete_http_route(request, options = nil) + # Pass arguments to `delete_http_route` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::DeleteHttpRouteRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::DeleteHttpRouteRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_http_route(name: nil) + # Pass arguments to `delete_http_route` via keyword arguments. Note that at + # least one keyword argument is 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. A name of the HttpRoute to delete. Must be in the format + # `projects/*/locations/*/httpRoutes/*`. + # + # @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_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::DeleteHttpRouteRequest.new + # + # # Call the delete_http_route method. + # result = client.delete_http_route 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_http_route request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::DeleteHttpRouteRequest + + # Converts hash 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_http_route.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::NetworkServices::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_http_route.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_http_route.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @network_services_stub.call_rpc :delete_http_route, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists TcpRoute in a given project and location. + # + # @overload list_tcp_routes(request, options = nil) + # Pass arguments to `list_tcp_routes` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::ListTcpRoutesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::ListTcpRoutesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_tcp_routes(parent: nil, page_size: nil, page_token: nil, return_partial_success: nil) + # Pass arguments to `list_tcp_routes` via keyword arguments. Note that at + # least one keyword argument is 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 project and location from which the TcpRoutes should be + # listed, specified in the format `projects/*/locations/*`. + # @param page_size [::Integer] + # Maximum number of TcpRoutes to return per call. + # @param page_token [::String] + # The value returned by the last `ListTcpRoutesResponse` + # Indicates that this is a continuation of a prior `ListTcpRoutes` call, + # and that the system should return the next page of data. + # @param return_partial_success [::Boolean] + # Optional. If true, allow partial responses for multi-regional Aggregated + # List requests. Otherwise if one of the locations is down or unreachable, + # the Aggregated List request will fail. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::NetworkServices::V1::TcpRoute>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::NetworkServices::V1::TcpRoute>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/network_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::ListTcpRoutesRequest.new + # + # # Call the list_tcp_routes method. + # result = client.list_tcp_routes 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::NetworkServices::V1::TcpRoute. + # p item + # end + # + def list_tcp_routes request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::ListTcpRoutesRequest + + # Converts hash 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_tcp_routes.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::NetworkServices::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_tcp_routes.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_tcp_routes.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @network_services_stub.call_rpc :list_tcp_routes, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @network_services_stub, :list_tcp_routes, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets details of a single TcpRoute. + # + # @overload get_tcp_route(request, options = nil) + # Pass arguments to `get_tcp_route` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::GetTcpRouteRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::GetTcpRouteRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_tcp_route(name: nil) + # Pass arguments to `get_tcp_route` via keyword arguments. Note that at + # least one keyword argument is 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. A name of the TcpRoute to get. Must be in the format + # `projects/*/locations/*/tcpRoutes/*`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::NetworkServices::V1::TcpRoute] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::NetworkServices::V1::TcpRoute] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/network_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::GetTcpRouteRequest.new + # + # # Call the get_tcp_route method. + # result = client.get_tcp_route request + # + # # The returned object is of type Google::Cloud::NetworkServices::V1::TcpRoute. + # p result + # + def get_tcp_route request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::GetTcpRouteRequest + + # Converts hash 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_tcp_route.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::NetworkServices::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_tcp_route.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_tcp_route.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @network_services_stub.call_rpc :get_tcp_route, 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 TcpRoute in a given project and location. + # + # @overload create_tcp_route(request, options = nil) + # Pass arguments to `create_tcp_route` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::CreateTcpRouteRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::CreateTcpRouteRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_tcp_route(parent: nil, tcp_route_id: nil, tcp_route: nil) + # Pass arguments to `create_tcp_route` via keyword arguments. Note that at + # least one keyword argument is 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 TcpRoute. Must be in the + # format `projects/*/locations/*`. + # @param tcp_route_id [::String] + # Required. Short name of the TcpRoute resource to be created. + # @param tcp_route [::Google::Cloud::NetworkServices::V1::TcpRoute, ::Hash] + # Required. TcpRoute resource to be created. + # + # @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_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::CreateTcpRouteRequest.new + # + # # Call the create_tcp_route method. + # result = client.create_tcp_route 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_tcp_route request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::CreateTcpRouteRequest + + # Converts hash 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_tcp_route.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::NetworkServices::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_tcp_route.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_tcp_route.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @network_services_stub.call_rpc :create_tcp_route, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates the parameters of a single TcpRoute. + # + # @overload update_tcp_route(request, options = nil) + # Pass arguments to `update_tcp_route` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::UpdateTcpRouteRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::UpdateTcpRouteRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_tcp_route(update_mask: nil, tcp_route: nil) + # Pass arguments to `update_tcp_route` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. Field mask is used to specify the fields to be overwritten in the + # TcpRoute resource by the update. + # The fields specified in the update_mask are relative to the resource, not + # the full request. A field will be overwritten if it is in the mask. If the + # user does not provide a mask then all fields will be overwritten. + # @param tcp_route [::Google::Cloud::NetworkServices::V1::TcpRoute, ::Hash] + # Required. Updated TcpRoute 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_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::UpdateTcpRouteRequest.new + # + # # Call the update_tcp_route method. + # result = client.update_tcp_route 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_tcp_route request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::UpdateTcpRouteRequest + + # Converts hash 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_tcp_route.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::NetworkServices::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.tcp_route&.name + header_params["tcp_route.name"] = request.tcp_route.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_tcp_route.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_tcp_route.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @network_services_stub.call_rpc :update_tcp_route, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a single TcpRoute. + # + # @overload delete_tcp_route(request, options = nil) + # Pass arguments to `delete_tcp_route` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::DeleteTcpRouteRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::DeleteTcpRouteRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_tcp_route(name: nil) + # Pass arguments to `delete_tcp_route` via keyword arguments. Note that at + # least one keyword argument is 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. A name of the TcpRoute to delete. Must be in the format + # `projects/*/locations/*/tcpRoutes/*`. + # + # @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_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::DeleteTcpRouteRequest.new + # + # # Call the delete_tcp_route method. + # result = client.delete_tcp_route 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_tcp_route request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::DeleteTcpRouteRequest + + # Converts hash 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_tcp_route.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::NetworkServices::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_tcp_route.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_tcp_route.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @network_services_stub.call_rpc :delete_tcp_route, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists TlsRoute in a given project and location. + # + # @overload list_tls_routes(request, options = nil) + # Pass arguments to `list_tls_routes` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::ListTlsRoutesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::ListTlsRoutesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_tls_routes(parent: nil, page_size: nil, page_token: nil, return_partial_success: nil) + # Pass arguments to `list_tls_routes` via keyword arguments. Note that at + # least one keyword argument is 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 project and location from which the TlsRoutes should be + # listed, specified in the format `projects/*/locations/*`. + # @param page_size [::Integer] + # Maximum number of TlsRoutes to return per call. + # @param page_token [::String] + # The value returned by the last `ListTlsRoutesResponse` + # Indicates that this is a continuation of a prior `ListTlsRoutes` call, + # and that the system should return the next page of data. + # @param return_partial_success [::Boolean] + # Optional. If true, allow partial responses for multi-regional Aggregated + # List requests. Otherwise if one of the locations is down or unreachable, + # the Aggregated List request will fail. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::NetworkServices::V1::TlsRoute>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::NetworkServices::V1::TlsRoute>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/network_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::ListTlsRoutesRequest.new + # + # # Call the list_tls_routes method. + # result = client.list_tls_routes 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::NetworkServices::V1::TlsRoute. + # p item + # end + # + def list_tls_routes request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::ListTlsRoutesRequest + + # Converts hash 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_tls_routes.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::NetworkServices::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_tls_routes.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_tls_routes.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @network_services_stub.call_rpc :list_tls_routes, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @network_services_stub, :list_tls_routes, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets details of a single TlsRoute. + # + # @overload get_tls_route(request, options = nil) + # Pass arguments to `get_tls_route` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::GetTlsRouteRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::GetTlsRouteRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_tls_route(name: nil) + # Pass arguments to `get_tls_route` via keyword arguments. Note that at + # least one keyword argument is 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. A name of the TlsRoute to get. Must be in the format + # `projects/*/locations/*/tlsRoutes/*`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::NetworkServices::V1::TlsRoute] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::NetworkServices::V1::TlsRoute] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/network_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::GetTlsRouteRequest.new + # + # # Call the get_tls_route method. + # result = client.get_tls_route request + # + # # The returned object is of type Google::Cloud::NetworkServices::V1::TlsRoute. + # p result + # + def get_tls_route request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::GetTlsRouteRequest + + # Converts hash 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_tls_route.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::NetworkServices::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_tls_route.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_tls_route.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @network_services_stub.call_rpc :get_tls_route, 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 TlsRoute in a given project and location. + # + # @overload create_tls_route(request, options = nil) + # Pass arguments to `create_tls_route` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::CreateTlsRouteRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::CreateTlsRouteRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_tls_route(parent: nil, tls_route_id: nil, tls_route: nil) + # Pass arguments to `create_tls_route` via keyword arguments. Note that at + # least one keyword argument is 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 TlsRoute. Must be in the + # format `projects/*/locations/*`. + # @param tls_route_id [::String] + # Required. Short name of the TlsRoute resource to be created. + # @param tls_route [::Google::Cloud::NetworkServices::V1::TlsRoute, ::Hash] + # Required. TlsRoute resource to be created. + # + # @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_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::CreateTlsRouteRequest.new + # + # # Call the create_tls_route method. + # result = client.create_tls_route 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_tls_route request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::CreateTlsRouteRequest + + # Converts hash 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_tls_route.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::NetworkServices::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_tls_route.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_tls_route.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @network_services_stub.call_rpc :create_tls_route, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates the parameters of a single TlsRoute. + # + # @overload update_tls_route(request, options = nil) + # Pass arguments to `update_tls_route` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::UpdateTlsRouteRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::UpdateTlsRouteRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_tls_route(update_mask: nil, tls_route: nil) + # Pass arguments to `update_tls_route` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. Field mask is used to specify the fields to be overwritten in the + # TlsRoute resource by the update. + # The fields specified in the update_mask are relative to the resource, not + # the full request. A field will be overwritten if it is in the mask. If the + # user does not provide a mask then all fields will be overwritten. + # @param tls_route [::Google::Cloud::NetworkServices::V1::TlsRoute, ::Hash] + # Required. Updated TlsRoute 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_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::UpdateTlsRouteRequest.new + # + # # Call the update_tls_route method. + # result = client.update_tls_route 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_tls_route request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::UpdateTlsRouteRequest + + # Converts hash 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_tls_route.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::NetworkServices::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.tls_route&.name + header_params["tls_route.name"] = request.tls_route.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_tls_route.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_tls_route.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @network_services_stub.call_rpc :update_tls_route, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a single TlsRoute. + # + # @overload delete_tls_route(request, options = nil) + # Pass arguments to `delete_tls_route` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::DeleteTlsRouteRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::DeleteTlsRouteRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_tls_route(name: nil) + # Pass arguments to `delete_tls_route` via keyword arguments. Note that at + # least one keyword argument is 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. A name of the TlsRoute to delete. Must be in the format + # `projects/*/locations/*/tlsRoutes/*`. + # + # @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_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::DeleteTlsRouteRequest.new + # + # # Call the delete_tls_route method. + # result = client.delete_tls_route 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_tls_route request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::DeleteTlsRouteRequest + + # Converts hash 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_tls_route.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::NetworkServices::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_tls_route.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_tls_route.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @network_services_stub.call_rpc :delete_tls_route, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists ServiceBinding in a given project and location. + # + # @overload list_service_bindings(request, options = nil) + # Pass arguments to `list_service_bindings` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::ListServiceBindingsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::ListServiceBindingsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_service_bindings(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_service_bindings` via keyword arguments. Note that at + # least one keyword argument is 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 project and location from which the ServiceBindings should be + # listed, specified in the format `projects/*/locations/*`. + # @param page_size [::Integer] + # Maximum number of ServiceBindings to return per call. + # @param page_token [::String] + # The value returned by the last `ListServiceBindingsResponse` + # Indicates that this is a continuation of a prior `ListRouters` call, + # and that the system should return the next page of data. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::NetworkServices::V1::ServiceBinding>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::NetworkServices::V1::ServiceBinding>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/network_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::ListServiceBindingsRequest.new + # + # # Call the list_service_bindings method. + # result = client.list_service_bindings 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::NetworkServices::V1::ServiceBinding. + # p item + # end + # + def list_service_bindings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::ListServiceBindingsRequest + + # Converts hash 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_service_bindings.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::NetworkServices::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_service_bindings.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_service_bindings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @network_services_stub.call_rpc :list_service_bindings, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @network_services_stub, :list_service_bindings, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets details of a single ServiceBinding. + # + # @overload get_service_binding(request, options = nil) + # Pass arguments to `get_service_binding` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::GetServiceBindingRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::GetServiceBindingRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_service_binding(name: nil) + # Pass arguments to `get_service_binding` via keyword arguments. Note that at + # least one keyword argument is 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. A name of the ServiceBinding to get. Must be in the format + # `projects/*/locations/*/serviceBindings/*`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::NetworkServices::V1::ServiceBinding] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::NetworkServices::V1::ServiceBinding] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/network_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::GetServiceBindingRequest.new + # + # # Call the get_service_binding method. + # result = client.get_service_binding request + # + # # The returned object is of type Google::Cloud::NetworkServices::V1::ServiceBinding. + # p result + # + def get_service_binding request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::GetServiceBindingRequest + + # Converts hash 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_service_binding.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::NetworkServices::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_service_binding.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_service_binding.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @network_services_stub.call_rpc :get_service_binding, 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 ServiceBinding in a given project and location. + # + # @overload create_service_binding(request, options = nil) + # Pass arguments to `create_service_binding` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::CreateServiceBindingRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::CreateServiceBindingRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_service_binding(parent: nil, service_binding_id: nil, service_binding: nil) + # Pass arguments to `create_service_binding` via keyword arguments. Note that at + # least one keyword argument is 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 ServiceBinding. Must be in the + # format `projects/*/locations/*`. + # @param service_binding_id [::String] + # Required. Short name of the ServiceBinding resource to be created. + # @param service_binding [::Google::Cloud::NetworkServices::V1::ServiceBinding, ::Hash] + # Required. ServiceBinding resource to be created. + # + # @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_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::CreateServiceBindingRequest.new + # + # # Call the create_service_binding method. + # result = client.create_service_binding 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_service_binding request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::CreateServiceBindingRequest + + # Converts hash 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_service_binding.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::NetworkServices::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_service_binding.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_service_binding.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @network_services_stub.call_rpc :create_service_binding, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates the parameters of a single ServiceBinding. + # + # @overload update_service_binding(request, options = nil) + # Pass arguments to `update_service_binding` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::UpdateServiceBindingRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::UpdateServiceBindingRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_service_binding(update_mask: nil, service_binding: nil) + # Pass arguments to `update_service_binding` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. Field mask is used to specify the fields to be overwritten in the + # ServiceBinding resource by the update. + # The fields specified in the update_mask are relative to the resource, not + # the full request. A field will be overwritten if it is in the mask. If the + # user does not provide a mask then all fields will be overwritten. + # @param service_binding [::Google::Cloud::NetworkServices::V1::ServiceBinding, ::Hash] + # Required. Updated ServiceBinding 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_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::UpdateServiceBindingRequest.new + # + # # Call the update_service_binding method. + # result = client.update_service_binding 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_service_binding request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::UpdateServiceBindingRequest + + # Converts hash 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_service_binding.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::NetworkServices::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.service_binding&.name + header_params["service_binding.name"] = request.service_binding.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_service_binding.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_service_binding.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @network_services_stub.call_rpc :update_service_binding, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a single ServiceBinding. + # + # @overload delete_service_binding(request, options = nil) + # Pass arguments to `delete_service_binding` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::DeleteServiceBindingRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::DeleteServiceBindingRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_service_binding(name: nil) + # Pass arguments to `delete_service_binding` via keyword arguments. Note that at + # least one keyword argument is 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. A name of the ServiceBinding to delete. Must be in the format + # `projects/*/locations/*/serviceBindings/*`. + # + # @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_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::DeleteServiceBindingRequest.new + # + # # Call the delete_service_binding method. + # result = client.delete_service_binding 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_service_binding request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::DeleteServiceBindingRequest + + # Converts hash 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_service_binding.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::NetworkServices::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_service_binding.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_service_binding.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @network_services_stub.call_rpc :delete_service_binding, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists Meshes in a given project and location. + # + # @overload list_meshes(request, options = nil) + # Pass arguments to `list_meshes` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::ListMeshesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::ListMeshesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_meshes(parent: nil, page_size: nil, page_token: nil, return_partial_success: nil) + # Pass arguments to `list_meshes` via keyword arguments. Note that at + # least one keyword argument is 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 project and location from which the Meshes should be + # listed, specified in the format `projects/*/locations/*`. + # @param page_size [::Integer] + # Maximum number of Meshes to return per call. + # @param page_token [::String] + # The value returned by the last `ListMeshesResponse` + # Indicates that this is a continuation of a prior `ListMeshes` call, + # and that the system should return the next page of data. + # @param return_partial_success [::Boolean] + # Optional. If true, allow partial responses for multi-regional Aggregated + # List requests. Otherwise if one of the locations is down or unreachable, + # the Aggregated List request will fail. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::NetworkServices::V1::Mesh>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::NetworkServices::V1::Mesh>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/network_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::ListMeshesRequest.new + # + # # Call the list_meshes method. + # result = client.list_meshes 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::NetworkServices::V1::Mesh. + # p item + # end + # + def list_meshes request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::ListMeshesRequest + + # Converts hash 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_meshes.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::NetworkServices::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_meshes.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_meshes.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @network_services_stub.call_rpc :list_meshes, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @network_services_stub, :list_meshes, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets details of a single Mesh. + # + # @overload get_mesh(request, options = nil) + # Pass arguments to `get_mesh` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::GetMeshRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::GetMeshRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_mesh(name: nil) + # Pass arguments to `get_mesh` via keyword arguments. Note that at + # least one keyword argument is 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. A name of the Mesh to get. Must be in the format + # `projects/*/locations/*/meshes/*`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::NetworkServices::V1::Mesh] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::NetworkServices::V1::Mesh] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/network_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::GetMeshRequest.new + # + # # Call the get_mesh method. + # result = client.get_mesh request + # + # # The returned object is of type Google::Cloud::NetworkServices::V1::Mesh. + # p result + # + def get_mesh request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::GetMeshRequest + + # Converts hash 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_mesh.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::NetworkServices::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_mesh.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_mesh.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @network_services_stub.call_rpc :get_mesh, 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 Mesh in a given project and location. + # + # @overload create_mesh(request, options = nil) + # Pass arguments to `create_mesh` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::CreateMeshRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::CreateMeshRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_mesh(parent: nil, mesh_id: nil, mesh: nil) + # Pass arguments to `create_mesh` via keyword arguments. Note that at + # least one keyword argument is 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 Mesh. Must be in the + # format `projects/*/locations/*`. + # @param mesh_id [::String] + # Required. Short name of the Mesh resource to be created. + # @param mesh [::Google::Cloud::NetworkServices::V1::Mesh, ::Hash] + # Required. Mesh resource to be created. + # + # @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_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::CreateMeshRequest.new + # + # # Call the create_mesh method. + # result = client.create_mesh 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_mesh request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::CreateMeshRequest + + # Converts hash 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_mesh.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::NetworkServices::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_mesh.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_mesh.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @network_services_stub.call_rpc :create_mesh, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates the parameters of a single Mesh. + # + # @overload update_mesh(request, options = nil) + # Pass arguments to `update_mesh` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::UpdateMeshRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::UpdateMeshRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_mesh(update_mask: nil, mesh: nil) + # Pass arguments to `update_mesh` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. Field mask is used to specify the fields to be overwritten in the + # Mesh resource by the update. + # The fields specified in the update_mask are relative to the resource, not + # the full request. A field will be overwritten if it is in the mask. If the + # user does not provide a mask then all fields will be overwritten. + # @param mesh [::Google::Cloud::NetworkServices::V1::Mesh, ::Hash] + # Required. Updated Mesh 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_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::UpdateMeshRequest.new + # + # # Call the update_mesh method. + # result = client.update_mesh 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_mesh request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::UpdateMeshRequest + + # Converts hash 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_mesh.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::NetworkServices::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.mesh&.name + header_params["mesh.name"] = request.mesh.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_mesh.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_mesh.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @network_services_stub.call_rpc :update_mesh, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a single Mesh. + # + # @overload delete_mesh(request, options = nil) + # Pass arguments to `delete_mesh` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::DeleteMeshRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::DeleteMeshRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_mesh(name: nil) + # Pass arguments to `delete_mesh` via keyword arguments. Note that at + # least one keyword argument is 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. A name of the Mesh to delete. Must be in the format + # `projects/*/locations/*/meshes/*`. + # + # @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_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::DeleteMeshRequest.new + # + # # Call the delete_mesh method. + # result = client.delete_mesh 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_mesh request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::DeleteMeshRequest + + # Converts hash 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_mesh.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::NetworkServices::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_mesh.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_mesh.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @network_services_stub.call_rpc :delete_mesh, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists ServiceLbPolicies in a given project and location. + # + # @overload list_service_lb_policies(request, options = nil) + # Pass arguments to `list_service_lb_policies` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::ListServiceLbPoliciesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::ListServiceLbPoliciesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_service_lb_policies(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_service_lb_policies` via keyword arguments. Note that at + # least one keyword argument is 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 project and location from which the ServiceLbPolicies should + # be listed, specified in the format + # `projects/{project}/locations/{location}`. + # @param page_size [::Integer] + # Maximum number of ServiceLbPolicies to return per call. + # @param page_token [::String] + # The value returned by the last `ListServiceLbPoliciesResponse` + # Indicates that this is a continuation of a prior `ListRouters` call, + # and that the system should return the next page of data. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::NetworkServices::V1::ServiceLbPolicy>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::NetworkServices::V1::ServiceLbPolicy>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/network_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::ListServiceLbPoliciesRequest.new + # + # # Call the list_service_lb_policies method. + # result = client.list_service_lb_policies 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::NetworkServices::V1::ServiceLbPolicy. + # p item + # end + # + def list_service_lb_policies request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::ListServiceLbPoliciesRequest + + # Converts hash 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_service_lb_policies.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::NetworkServices::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_service_lb_policies.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_service_lb_policies.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @network_services_stub.call_rpc :list_service_lb_policies, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @network_services_stub, :list_service_lb_policies, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets details of a single ServiceLbPolicy. + # + # @overload get_service_lb_policy(request, options = nil) + # Pass arguments to `get_service_lb_policy` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::GetServiceLbPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::GetServiceLbPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_service_lb_policy(name: nil) + # Pass arguments to `get_service_lb_policy` via keyword arguments. Note that at + # least one keyword argument is 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. A name of the ServiceLbPolicy to get. Must be in the format + # `projects/{project}/locations/{location}/serviceLbPolicies/*`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::NetworkServices::V1::ServiceLbPolicy] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::NetworkServices::V1::ServiceLbPolicy] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/network_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::GetServiceLbPolicyRequest.new + # + # # Call the get_service_lb_policy method. + # result = client.get_service_lb_policy request + # + # # The returned object is of type Google::Cloud::NetworkServices::V1::ServiceLbPolicy. + # p result + # + def get_service_lb_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::GetServiceLbPolicyRequest + + # Converts hash 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_service_lb_policy.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::NetworkServices::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_service_lb_policy.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_service_lb_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @network_services_stub.call_rpc :get_service_lb_policy, 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 ServiceLbPolicy in a given project and location. + # + # @overload create_service_lb_policy(request, options = nil) + # Pass arguments to `create_service_lb_policy` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::CreateServiceLbPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::CreateServiceLbPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_service_lb_policy(parent: nil, service_lb_policy_id: nil, service_lb_policy: nil) + # Pass arguments to `create_service_lb_policy` via keyword arguments. Note that at + # least one keyword argument is 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 ServiceLbPolicy. Must be in the + # format `projects/{project}/locations/{location}`. + # @param service_lb_policy_id [::String] + # Required. Short name of the ServiceLbPolicy resource to be created. + # E.g. for resource name + # `projects/{project}/locations/{location}/serviceLbPolicies/{service_lb_policy_name}`. + # the id is value of \\{service_lb_policy_name} + # @param service_lb_policy [::Google::Cloud::NetworkServices::V1::ServiceLbPolicy, ::Hash] + # Required. ServiceLbPolicy resource to be created. + # + # @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_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::CreateServiceLbPolicyRequest.new + # + # # Call the create_service_lb_policy method. + # result = client.create_service_lb_policy 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_service_lb_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::CreateServiceLbPolicyRequest + + # Converts hash 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_service_lb_policy.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::NetworkServices::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_service_lb_policy.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_service_lb_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @network_services_stub.call_rpc :create_service_lb_policy, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates the parameters of a single ServiceLbPolicy. + # + # @overload update_service_lb_policy(request, options = nil) + # Pass arguments to `update_service_lb_policy` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::UpdateServiceLbPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::UpdateServiceLbPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_service_lb_policy(update_mask: nil, service_lb_policy: nil) + # Pass arguments to `update_service_lb_policy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. Field mask is used to specify the fields to be overwritten in the + # ServiceLbPolicy resource by the update. + # The fields specified in the update_mask are relative to the resource, not + # the full request. A field will be overwritten if it is in the mask. If the + # user does not provide a mask then all fields will be overwritten. + # @param service_lb_policy [::Google::Cloud::NetworkServices::V1::ServiceLbPolicy, ::Hash] + # Required. Updated ServiceLbPolicy 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_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::UpdateServiceLbPolicyRequest.new + # + # # Call the update_service_lb_policy method. + # result = client.update_service_lb_policy 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_service_lb_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::UpdateServiceLbPolicyRequest + + # Converts hash 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_service_lb_policy.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::NetworkServices::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.service_lb_policy&.name + header_params["service_lb_policy.name"] = request.service_lb_policy.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_service_lb_policy.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_service_lb_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @network_services_stub.call_rpc :update_service_lb_policy, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a single ServiceLbPolicy. + # + # @overload delete_service_lb_policy(request, options = nil) + # Pass arguments to `delete_service_lb_policy` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::DeleteServiceLbPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::DeleteServiceLbPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_service_lb_policy(name: nil) + # Pass arguments to `delete_service_lb_policy` via keyword arguments. Note that at + # least one keyword argument is 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. A name of the ServiceLbPolicy to delete. Must be in the format + # `projects/{project}/locations/{location}/serviceLbPolicies/*`. + # + # @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_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::DeleteServiceLbPolicyRequest.new + # + # # Call the delete_service_lb_policy method. + # result = client.delete_service_lb_policy 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_service_lb_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::DeleteServiceLbPolicyRequest + + # Converts hash 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_service_lb_policy.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::NetworkServices::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_service_lb_policy.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_service_lb_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @network_services_stub.call_rpc :delete_service_lb_policy, 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 + + ## + # Get a single RouteView of a Gateway. + # + # @overload get_gateway_route_view(request, options = nil) + # Pass arguments to `get_gateway_route_view` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::GetGatewayRouteViewRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::GetGatewayRouteViewRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_gateway_route_view(name: nil) + # Pass arguments to `get_gateway_route_view` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the GatewayRouteView resource. + # Formats: + # projects/\\{project}/locations/\\{location}/gateways/\\{gateway}/routeViews/\\{route_view} + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::NetworkServices::V1::GatewayRouteView] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::NetworkServices::V1::GatewayRouteView] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/network_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::GetGatewayRouteViewRequest.new + # + # # Call the get_gateway_route_view method. + # result = client.get_gateway_route_view request + # + # # The returned object is of type Google::Cloud::NetworkServices::V1::GatewayRouteView. + # p result + # + def get_gateway_route_view request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::GetGatewayRouteViewRequest + + # Converts hash 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_gateway_route_view.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::NetworkServices::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_gateway_route_view.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_gateway_route_view.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @network_services_stub.call_rpc :get_gateway_route_view, 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 + + ## + # Get a single RouteView of a Mesh. + # + # @overload get_mesh_route_view(request, options = nil) + # Pass arguments to `get_mesh_route_view` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::GetMeshRouteViewRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::GetMeshRouteViewRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_mesh_route_view(name: nil) + # Pass arguments to `get_mesh_route_view` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the MeshRouteView resource. + # Format: + # projects/\\{project}/locations/\\{location}/meshes/\\{mesh}/routeViews/\\{route_view} + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::NetworkServices::V1::MeshRouteView] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::NetworkServices::V1::MeshRouteView] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/network_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::GetMeshRouteViewRequest.new + # + # # Call the get_mesh_route_view method. + # result = client.get_mesh_route_view request + # + # # The returned object is of type Google::Cloud::NetworkServices::V1::MeshRouteView. + # p result + # + def get_mesh_route_view request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::GetMeshRouteViewRequest + + # Converts hash 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_mesh_route_view.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::NetworkServices::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_mesh_route_view.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_mesh_route_view.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @network_services_stub.call_rpc :get_mesh_route_view, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists RouteViews + # + # @overload list_gateway_route_views(request, options = nil) + # Pass arguments to `list_gateway_route_views` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::ListGatewayRouteViewsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::ListGatewayRouteViewsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_gateway_route_views(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_gateway_route_views` via keyword arguments. Note that at + # least one keyword argument is 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 Gateway to which a Route is associated. + # Formats: + # projects/\\{project}/locations/\\{location}/gateways/\\{gateway} + # @param page_size [::Integer] + # Maximum number of GatewayRouteViews to return per call. + # @param page_token [::String] + # The value returned by the last `ListGatewayRouteViewsResponse` + # Indicates that this is a continuation of a prior `ListGatewayRouteViews` + # call, and that the system should return the next page of data. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::NetworkServices::V1::GatewayRouteView>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::NetworkServices::V1::GatewayRouteView>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/network_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::ListGatewayRouteViewsRequest.new + # + # # Call the list_gateway_route_views method. + # result = client.list_gateway_route_views 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::NetworkServices::V1::GatewayRouteView. + # p item + # end + # + def list_gateway_route_views request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::ListGatewayRouteViewsRequest + + # Converts hash 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_gateway_route_views.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::NetworkServices::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_gateway_route_views.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_gateway_route_views.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @network_services_stub.call_rpc :list_gateway_route_views, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @network_services_stub, :list_gateway_route_views, 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 + + ## + # Lists RouteViews + # + # @overload list_mesh_route_views(request, options = nil) + # Pass arguments to `list_mesh_route_views` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::ListMeshRouteViewsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::ListMeshRouteViewsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_mesh_route_views(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_mesh_route_views` via keyword arguments. Note that at + # least one keyword argument is 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 Mesh to which a Route is associated. + # Format: + # projects/\\{project}/locations/\\{location}/meshes/\\{mesh} + # @param page_size [::Integer] + # Maximum number of MeshRouteViews to return per call. + # @param page_token [::String] + # The value returned by the last `ListMeshRouteViewsResponse` + # Indicates that this is a continuation of a prior `ListMeshRouteViews` call, + # and that the system should return the next page of data. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::NetworkServices::V1::MeshRouteView>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::NetworkServices::V1::MeshRouteView>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/network_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::ListMeshRouteViewsRequest.new + # + # # Call the list_mesh_route_views method. + # result = client.list_mesh_route_views 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::NetworkServices::V1::MeshRouteView. + # p item + # end + # + def list_mesh_route_views request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::ListMeshRouteViewsRequest + + # Converts hash 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_mesh_route_views.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::NetworkServices::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_mesh_route_views.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_mesh_route_views.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @network_services_stub.call_rpc :list_mesh_route_views, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @network_services_stub, :list_mesh_route_views, 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 + + ## + # Lists AgentGateways in a given project and location. + # + # @overload list_agent_gateways(request, options = nil) + # Pass arguments to `list_agent_gateways` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::ListAgentGatewaysRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::ListAgentGatewaysRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_agent_gateways(parent: nil, page_size: nil, page_token: nil, return_partial_success: nil) + # Pass arguments to `list_agent_gateways` via keyword arguments. Note that at + # least one keyword argument is 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 project and location from which the AgentGateways should be + # listed, specified in the format `projects/*/locations/*`. + # @param page_size [::Integer] + # Optional. Maximum number of AgentGateways to return per call. + # @param page_token [::String] + # Optional. The value returned by the last `ListAgentGatewaysResponse` + # Indicates that this is a continuation of a prior `ListAgentGateways` + # call, and that the system should return the next page of data. + # @param return_partial_success [::Boolean] + # Optional. If true, allow partial responses for multi-regional Aggregated + # List requests. Otherwise if one of the locations is down or unreachable, + # the Aggregated List request will fail. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::NetworkServices::V1::AgentGateway>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::NetworkServices::V1::AgentGateway>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/network_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::ListAgentGatewaysRequest.new + # + # # Call the list_agent_gateways method. + # result = client.list_agent_gateways 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::NetworkServices::V1::AgentGateway. + # p item + # end + # + def list_agent_gateways request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::ListAgentGatewaysRequest + + # Converts hash 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_agent_gateways.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::NetworkServices::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_agent_gateways.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_agent_gateways.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @network_services_stub.call_rpc :list_agent_gateways, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @network_services_stub, :list_agent_gateways, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets details of a single AgentGateway. + # + # @overload get_agent_gateway(request, options = nil) + # Pass arguments to `get_agent_gateway` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::GetAgentGatewayRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::GetAgentGatewayRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_agent_gateway(name: nil) + # Pass arguments to `get_agent_gateway` via keyword arguments. Note that at + # least one keyword argument is 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. A name of the AgentGateway to get. Must be in the format + # `projects/*/locations/*/agentGateways/*`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::NetworkServices::V1::AgentGateway] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::NetworkServices::V1::AgentGateway] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/network_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::GetAgentGatewayRequest.new + # + # # Call the get_agent_gateway method. + # result = client.get_agent_gateway request + # + # # The returned object is of type Google::Cloud::NetworkServices::V1::AgentGateway. + # p result + # + def get_agent_gateway request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::GetAgentGatewayRequest + + # Converts hash 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_agent_gateway.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::NetworkServices::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_agent_gateway.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_agent_gateway.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @network_services_stub.call_rpc :get_agent_gateway, 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 AgentGateway in a given project and location. + # + # @overload create_agent_gateway(request, options = nil) + # Pass arguments to `create_agent_gateway` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::CreateAgentGatewayRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::CreateAgentGatewayRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_agent_gateway(parent: nil, agent_gateway_id: nil, agent_gateway: nil) + # Pass arguments to `create_agent_gateway` via keyword arguments. Note that at + # least one keyword argument is 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 AgentGateway. Must be in the + # format `projects/*/locations/*`. + # @param agent_gateway_id [::String] + # Required. Short name of the AgentGateway resource to be created. + # @param agent_gateway [::Google::Cloud::NetworkServices::V1::AgentGateway, ::Hash] + # Required. AgentGateway resource to be created. + # + # @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_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::CreateAgentGatewayRequest.new + # + # # Call the create_agent_gateway method. + # result = client.create_agent_gateway 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_agent_gateway request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::CreateAgentGatewayRequest + + # Converts hash 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_agent_gateway.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::NetworkServices::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_agent_gateway.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_agent_gateway.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @network_services_stub.call_rpc :create_agent_gateway, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates the parameters of a single AgentGateway. + # + # @overload update_agent_gateway(request, options = nil) + # Pass arguments to `update_agent_gateway` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::UpdateAgentGatewayRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::UpdateAgentGatewayRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_agent_gateway(update_mask: nil, agent_gateway: nil) + # Pass arguments to `update_agent_gateway` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. Field mask is used to specify the fields to be overwritten in the + # AgentGateway resource by the update. + # The fields specified in the update_mask are relative to the resource, not + # the full request. A field will be overwritten if it is in the mask. If the + # user does not provide a mask then all fields will be overwritten. + # @param agent_gateway [::Google::Cloud::NetworkServices::V1::AgentGateway, ::Hash] + # Required. Updated AgentGateway 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_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::UpdateAgentGatewayRequest.new + # + # # Call the update_agent_gateway method. + # result = client.update_agent_gateway 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_agent_gateway request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::UpdateAgentGatewayRequest + + # Converts hash 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_agent_gateway.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::NetworkServices::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.agent_gateway&.name + header_params["agent_gateway.name"] = request.agent_gateway.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_agent_gateway.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_agent_gateway.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @network_services_stub.call_rpc :update_agent_gateway, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a single AgentGateway. + # + # @overload delete_agent_gateway(request, options = nil) + # Pass arguments to `delete_agent_gateway` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::DeleteAgentGatewayRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::DeleteAgentGatewayRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_agent_gateway(name: nil, etag: nil) + # Pass arguments to `delete_agent_gateway` via keyword arguments. Note that at + # least one keyword argument is 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. A name of the AgentGateway to delete. Must be in the format + # `projects/*/locations/*/agentGateways/*`. + # @param etag [::String] + # Optional. The etag of the AgentGateway to delete. + # + # @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_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::DeleteAgentGatewayRequest.new + # + # # Call the delete_agent_gateway method. + # result = client.delete_agent_gateway 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_agent_gateway request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::DeleteAgentGatewayRequest + + # Converts hash 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_agent_gateway.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::NetworkServices::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_agent_gateway.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_agent_gateway.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @network_services_stub.call_rpc :delete_agent_gateway, 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 NetworkServices API. + # + # This class represents the configuration for NetworkServices, + # 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::NetworkServices::V1::NetworkServices::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_endpoint_policies to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_endpoint_policies.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_endpoint_policies.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::NetworkServices::V1::NetworkServices::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. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `: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 = "networkservices.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 NetworkServices 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. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_endpoint_policies` + # @return [::Gapic::Config::Method] + # + attr_reader :list_endpoint_policies + ## + # RPC-specific configuration for `get_endpoint_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :get_endpoint_policy + ## + # RPC-specific configuration for `create_endpoint_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :create_endpoint_policy + ## + # RPC-specific configuration for `update_endpoint_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :update_endpoint_policy + ## + # RPC-specific configuration for `delete_endpoint_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_endpoint_policy + ## + # RPC-specific configuration for `list_wasm_plugin_versions` + # @return [::Gapic::Config::Method] + # + attr_reader :list_wasm_plugin_versions + ## + # RPC-specific configuration for `get_wasm_plugin_version` + # @return [::Gapic::Config::Method] + # + attr_reader :get_wasm_plugin_version + ## + # RPC-specific configuration for `create_wasm_plugin_version` + # @return [::Gapic::Config::Method] + # + attr_reader :create_wasm_plugin_version + ## + # RPC-specific configuration for `delete_wasm_plugin_version` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_wasm_plugin_version + ## + # RPC-specific configuration for `list_wasm_plugins` + # @return [::Gapic::Config::Method] + # + attr_reader :list_wasm_plugins + ## + # RPC-specific configuration for `get_wasm_plugin` + # @return [::Gapic::Config::Method] + # + attr_reader :get_wasm_plugin + ## + # RPC-specific configuration for `create_wasm_plugin` + # @return [::Gapic::Config::Method] + # + attr_reader :create_wasm_plugin + ## + # RPC-specific configuration for `update_wasm_plugin` + # @return [::Gapic::Config::Method] + # + attr_reader :update_wasm_plugin + ## + # RPC-specific configuration for `delete_wasm_plugin` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_wasm_plugin + ## + # RPC-specific configuration for `list_gateways` + # @return [::Gapic::Config::Method] + # + attr_reader :list_gateways + ## + # RPC-specific configuration for `get_gateway` + # @return [::Gapic::Config::Method] + # + attr_reader :get_gateway + ## + # RPC-specific configuration for `create_gateway` + # @return [::Gapic::Config::Method] + # + attr_reader :create_gateway + ## + # RPC-specific configuration for `update_gateway` + # @return [::Gapic::Config::Method] + # + attr_reader :update_gateway + ## + # RPC-specific configuration for `delete_gateway` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_gateway + ## + # RPC-specific configuration for `list_grpc_routes` + # @return [::Gapic::Config::Method] + # + attr_reader :list_grpc_routes + ## + # RPC-specific configuration for `get_grpc_route` + # @return [::Gapic::Config::Method] + # + attr_reader :get_grpc_route + ## + # RPC-specific configuration for `create_grpc_route` + # @return [::Gapic::Config::Method] + # + attr_reader :create_grpc_route + ## + # RPC-specific configuration for `update_grpc_route` + # @return [::Gapic::Config::Method] + # + attr_reader :update_grpc_route + ## + # RPC-specific configuration for `delete_grpc_route` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_grpc_route + ## + # RPC-specific configuration for `list_http_routes` + # @return [::Gapic::Config::Method] + # + attr_reader :list_http_routes + ## + # RPC-specific configuration for `get_http_route` + # @return [::Gapic::Config::Method] + # + attr_reader :get_http_route + ## + # RPC-specific configuration for `create_http_route` + # @return [::Gapic::Config::Method] + # + attr_reader :create_http_route + ## + # RPC-specific configuration for `update_http_route` + # @return [::Gapic::Config::Method] + # + attr_reader :update_http_route + ## + # RPC-specific configuration for `delete_http_route` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_http_route + ## + # RPC-specific configuration for `list_tcp_routes` + # @return [::Gapic::Config::Method] + # + attr_reader :list_tcp_routes + ## + # RPC-specific configuration for `get_tcp_route` + # @return [::Gapic::Config::Method] + # + attr_reader :get_tcp_route + ## + # RPC-specific configuration for `create_tcp_route` + # @return [::Gapic::Config::Method] + # + attr_reader :create_tcp_route + ## + # RPC-specific configuration for `update_tcp_route` + # @return [::Gapic::Config::Method] + # + attr_reader :update_tcp_route + ## + # RPC-specific configuration for `delete_tcp_route` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_tcp_route + ## + # RPC-specific configuration for `list_tls_routes` + # @return [::Gapic::Config::Method] + # + attr_reader :list_tls_routes + ## + # RPC-specific configuration for `get_tls_route` + # @return [::Gapic::Config::Method] + # + attr_reader :get_tls_route + ## + # RPC-specific configuration for `create_tls_route` + # @return [::Gapic::Config::Method] + # + attr_reader :create_tls_route + ## + # RPC-specific configuration for `update_tls_route` + # @return [::Gapic::Config::Method] + # + attr_reader :update_tls_route + ## + # RPC-specific configuration for `delete_tls_route` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_tls_route + ## + # RPC-specific configuration for `list_service_bindings` + # @return [::Gapic::Config::Method] + # + attr_reader :list_service_bindings + ## + # RPC-specific configuration for `get_service_binding` + # @return [::Gapic::Config::Method] + # + attr_reader :get_service_binding + ## + # RPC-specific configuration for `create_service_binding` + # @return [::Gapic::Config::Method] + # + attr_reader :create_service_binding + ## + # RPC-specific configuration for `update_service_binding` + # @return [::Gapic::Config::Method] + # + attr_reader :update_service_binding + ## + # RPC-specific configuration for `delete_service_binding` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_service_binding + ## + # RPC-specific configuration for `list_meshes` + # @return [::Gapic::Config::Method] + # + attr_reader :list_meshes + ## + # RPC-specific configuration for `get_mesh` + # @return [::Gapic::Config::Method] + # + attr_reader :get_mesh + ## + # RPC-specific configuration for `create_mesh` + # @return [::Gapic::Config::Method] + # + attr_reader :create_mesh + ## + # RPC-specific configuration for `update_mesh` + # @return [::Gapic::Config::Method] + # + attr_reader :update_mesh + ## + # RPC-specific configuration for `delete_mesh` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_mesh + ## + # RPC-specific configuration for `list_service_lb_policies` + # @return [::Gapic::Config::Method] + # + attr_reader :list_service_lb_policies + ## + # RPC-specific configuration for `get_service_lb_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :get_service_lb_policy + ## + # RPC-specific configuration for `create_service_lb_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :create_service_lb_policy + ## + # RPC-specific configuration for `update_service_lb_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :update_service_lb_policy + ## + # RPC-specific configuration for `delete_service_lb_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_service_lb_policy + ## + # RPC-specific configuration for `get_gateway_route_view` + # @return [::Gapic::Config::Method] + # + attr_reader :get_gateway_route_view + ## + # RPC-specific configuration for `get_mesh_route_view` + # @return [::Gapic::Config::Method] + # + attr_reader :get_mesh_route_view + ## + # RPC-specific configuration for `list_gateway_route_views` + # @return [::Gapic::Config::Method] + # + attr_reader :list_gateway_route_views + ## + # RPC-specific configuration for `list_mesh_route_views` + # @return [::Gapic::Config::Method] + # + attr_reader :list_mesh_route_views + ## + # RPC-specific configuration for `list_agent_gateways` + # @return [::Gapic::Config::Method] + # + attr_reader :list_agent_gateways + ## + # RPC-specific configuration for `get_agent_gateway` + # @return [::Gapic::Config::Method] + # + attr_reader :get_agent_gateway + ## + # RPC-specific configuration for `create_agent_gateway` + # @return [::Gapic::Config::Method] + # + attr_reader :create_agent_gateway + ## + # RPC-specific configuration for `update_agent_gateway` + # @return [::Gapic::Config::Method] + # + attr_reader :update_agent_gateway + ## + # RPC-specific configuration for `delete_agent_gateway` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_agent_gateway + + # @private + def initialize parent_rpcs = nil + list_endpoint_policies_config = parent_rpcs.list_endpoint_policies if parent_rpcs.respond_to? :list_endpoint_policies + @list_endpoint_policies = ::Gapic::Config::Method.new list_endpoint_policies_config + get_endpoint_policy_config = parent_rpcs.get_endpoint_policy if parent_rpcs.respond_to? :get_endpoint_policy + @get_endpoint_policy = ::Gapic::Config::Method.new get_endpoint_policy_config + create_endpoint_policy_config = parent_rpcs.create_endpoint_policy if parent_rpcs.respond_to? :create_endpoint_policy + @create_endpoint_policy = ::Gapic::Config::Method.new create_endpoint_policy_config + update_endpoint_policy_config = parent_rpcs.update_endpoint_policy if parent_rpcs.respond_to? :update_endpoint_policy + @update_endpoint_policy = ::Gapic::Config::Method.new update_endpoint_policy_config + delete_endpoint_policy_config = parent_rpcs.delete_endpoint_policy if parent_rpcs.respond_to? :delete_endpoint_policy + @delete_endpoint_policy = ::Gapic::Config::Method.new delete_endpoint_policy_config + list_wasm_plugin_versions_config = parent_rpcs.list_wasm_plugin_versions if parent_rpcs.respond_to? :list_wasm_plugin_versions + @list_wasm_plugin_versions = ::Gapic::Config::Method.new list_wasm_plugin_versions_config + get_wasm_plugin_version_config = parent_rpcs.get_wasm_plugin_version if parent_rpcs.respond_to? :get_wasm_plugin_version + @get_wasm_plugin_version = ::Gapic::Config::Method.new get_wasm_plugin_version_config + create_wasm_plugin_version_config = parent_rpcs.create_wasm_plugin_version if parent_rpcs.respond_to? :create_wasm_plugin_version + @create_wasm_plugin_version = ::Gapic::Config::Method.new create_wasm_plugin_version_config + delete_wasm_plugin_version_config = parent_rpcs.delete_wasm_plugin_version if parent_rpcs.respond_to? :delete_wasm_plugin_version + @delete_wasm_plugin_version = ::Gapic::Config::Method.new delete_wasm_plugin_version_config + list_wasm_plugins_config = parent_rpcs.list_wasm_plugins if parent_rpcs.respond_to? :list_wasm_plugins + @list_wasm_plugins = ::Gapic::Config::Method.new list_wasm_plugins_config + get_wasm_plugin_config = parent_rpcs.get_wasm_plugin if parent_rpcs.respond_to? :get_wasm_plugin + @get_wasm_plugin = ::Gapic::Config::Method.new get_wasm_plugin_config + create_wasm_plugin_config = parent_rpcs.create_wasm_plugin if parent_rpcs.respond_to? :create_wasm_plugin + @create_wasm_plugin = ::Gapic::Config::Method.new create_wasm_plugin_config + update_wasm_plugin_config = parent_rpcs.update_wasm_plugin if parent_rpcs.respond_to? :update_wasm_plugin + @update_wasm_plugin = ::Gapic::Config::Method.new update_wasm_plugin_config + delete_wasm_plugin_config = parent_rpcs.delete_wasm_plugin if parent_rpcs.respond_to? :delete_wasm_plugin + @delete_wasm_plugin = ::Gapic::Config::Method.new delete_wasm_plugin_config + list_gateways_config = parent_rpcs.list_gateways if parent_rpcs.respond_to? :list_gateways + @list_gateways = ::Gapic::Config::Method.new list_gateways_config + get_gateway_config = parent_rpcs.get_gateway if parent_rpcs.respond_to? :get_gateway + @get_gateway = ::Gapic::Config::Method.new get_gateway_config + create_gateway_config = parent_rpcs.create_gateway if parent_rpcs.respond_to? :create_gateway + @create_gateway = ::Gapic::Config::Method.new create_gateway_config + update_gateway_config = parent_rpcs.update_gateway if parent_rpcs.respond_to? :update_gateway + @update_gateway = ::Gapic::Config::Method.new update_gateway_config + delete_gateway_config = parent_rpcs.delete_gateway if parent_rpcs.respond_to? :delete_gateway + @delete_gateway = ::Gapic::Config::Method.new delete_gateway_config + list_grpc_routes_config = parent_rpcs.list_grpc_routes if parent_rpcs.respond_to? :list_grpc_routes + @list_grpc_routes = ::Gapic::Config::Method.new list_grpc_routes_config + get_grpc_route_config = parent_rpcs.get_grpc_route if parent_rpcs.respond_to? :get_grpc_route + @get_grpc_route = ::Gapic::Config::Method.new get_grpc_route_config + create_grpc_route_config = parent_rpcs.create_grpc_route if parent_rpcs.respond_to? :create_grpc_route + @create_grpc_route = ::Gapic::Config::Method.new create_grpc_route_config + update_grpc_route_config = parent_rpcs.update_grpc_route if parent_rpcs.respond_to? :update_grpc_route + @update_grpc_route = ::Gapic::Config::Method.new update_grpc_route_config + delete_grpc_route_config = parent_rpcs.delete_grpc_route if parent_rpcs.respond_to? :delete_grpc_route + @delete_grpc_route = ::Gapic::Config::Method.new delete_grpc_route_config + list_http_routes_config = parent_rpcs.list_http_routes if parent_rpcs.respond_to? :list_http_routes + @list_http_routes = ::Gapic::Config::Method.new list_http_routes_config + get_http_route_config = parent_rpcs.get_http_route if parent_rpcs.respond_to? :get_http_route + @get_http_route = ::Gapic::Config::Method.new get_http_route_config + create_http_route_config = parent_rpcs.create_http_route if parent_rpcs.respond_to? :create_http_route + @create_http_route = ::Gapic::Config::Method.new create_http_route_config + update_http_route_config = parent_rpcs.update_http_route if parent_rpcs.respond_to? :update_http_route + @update_http_route = ::Gapic::Config::Method.new update_http_route_config + delete_http_route_config = parent_rpcs.delete_http_route if parent_rpcs.respond_to? :delete_http_route + @delete_http_route = ::Gapic::Config::Method.new delete_http_route_config + list_tcp_routes_config = parent_rpcs.list_tcp_routes if parent_rpcs.respond_to? :list_tcp_routes + @list_tcp_routes = ::Gapic::Config::Method.new list_tcp_routes_config + get_tcp_route_config = parent_rpcs.get_tcp_route if parent_rpcs.respond_to? :get_tcp_route + @get_tcp_route = ::Gapic::Config::Method.new get_tcp_route_config + create_tcp_route_config = parent_rpcs.create_tcp_route if parent_rpcs.respond_to? :create_tcp_route + @create_tcp_route = ::Gapic::Config::Method.new create_tcp_route_config + update_tcp_route_config = parent_rpcs.update_tcp_route if parent_rpcs.respond_to? :update_tcp_route + @update_tcp_route = ::Gapic::Config::Method.new update_tcp_route_config + delete_tcp_route_config = parent_rpcs.delete_tcp_route if parent_rpcs.respond_to? :delete_tcp_route + @delete_tcp_route = ::Gapic::Config::Method.new delete_tcp_route_config + list_tls_routes_config = parent_rpcs.list_tls_routes if parent_rpcs.respond_to? :list_tls_routes + @list_tls_routes = ::Gapic::Config::Method.new list_tls_routes_config + get_tls_route_config = parent_rpcs.get_tls_route if parent_rpcs.respond_to? :get_tls_route + @get_tls_route = ::Gapic::Config::Method.new get_tls_route_config + create_tls_route_config = parent_rpcs.create_tls_route if parent_rpcs.respond_to? :create_tls_route + @create_tls_route = ::Gapic::Config::Method.new create_tls_route_config + update_tls_route_config = parent_rpcs.update_tls_route if parent_rpcs.respond_to? :update_tls_route + @update_tls_route = ::Gapic::Config::Method.new update_tls_route_config + delete_tls_route_config = parent_rpcs.delete_tls_route if parent_rpcs.respond_to? :delete_tls_route + @delete_tls_route = ::Gapic::Config::Method.new delete_tls_route_config + list_service_bindings_config = parent_rpcs.list_service_bindings if parent_rpcs.respond_to? :list_service_bindings + @list_service_bindings = ::Gapic::Config::Method.new list_service_bindings_config + get_service_binding_config = parent_rpcs.get_service_binding if parent_rpcs.respond_to? :get_service_binding + @get_service_binding = ::Gapic::Config::Method.new get_service_binding_config + create_service_binding_config = parent_rpcs.create_service_binding if parent_rpcs.respond_to? :create_service_binding + @create_service_binding = ::Gapic::Config::Method.new create_service_binding_config + update_service_binding_config = parent_rpcs.update_service_binding if parent_rpcs.respond_to? :update_service_binding + @update_service_binding = ::Gapic::Config::Method.new update_service_binding_config + delete_service_binding_config = parent_rpcs.delete_service_binding if parent_rpcs.respond_to? :delete_service_binding + @delete_service_binding = ::Gapic::Config::Method.new delete_service_binding_config + list_meshes_config = parent_rpcs.list_meshes if parent_rpcs.respond_to? :list_meshes + @list_meshes = ::Gapic::Config::Method.new list_meshes_config + get_mesh_config = parent_rpcs.get_mesh if parent_rpcs.respond_to? :get_mesh + @get_mesh = ::Gapic::Config::Method.new get_mesh_config + create_mesh_config = parent_rpcs.create_mesh if parent_rpcs.respond_to? :create_mesh + @create_mesh = ::Gapic::Config::Method.new create_mesh_config + update_mesh_config = parent_rpcs.update_mesh if parent_rpcs.respond_to? :update_mesh + @update_mesh = ::Gapic::Config::Method.new update_mesh_config + delete_mesh_config = parent_rpcs.delete_mesh if parent_rpcs.respond_to? :delete_mesh + @delete_mesh = ::Gapic::Config::Method.new delete_mesh_config + list_service_lb_policies_config = parent_rpcs.list_service_lb_policies if parent_rpcs.respond_to? :list_service_lb_policies + @list_service_lb_policies = ::Gapic::Config::Method.new list_service_lb_policies_config + get_service_lb_policy_config = parent_rpcs.get_service_lb_policy if parent_rpcs.respond_to? :get_service_lb_policy + @get_service_lb_policy = ::Gapic::Config::Method.new get_service_lb_policy_config + create_service_lb_policy_config = parent_rpcs.create_service_lb_policy if parent_rpcs.respond_to? :create_service_lb_policy + @create_service_lb_policy = ::Gapic::Config::Method.new create_service_lb_policy_config + update_service_lb_policy_config = parent_rpcs.update_service_lb_policy if parent_rpcs.respond_to? :update_service_lb_policy + @update_service_lb_policy = ::Gapic::Config::Method.new update_service_lb_policy_config + delete_service_lb_policy_config = parent_rpcs.delete_service_lb_policy if parent_rpcs.respond_to? :delete_service_lb_policy + @delete_service_lb_policy = ::Gapic::Config::Method.new delete_service_lb_policy_config + get_gateway_route_view_config = parent_rpcs.get_gateway_route_view if parent_rpcs.respond_to? :get_gateway_route_view + @get_gateway_route_view = ::Gapic::Config::Method.new get_gateway_route_view_config + get_mesh_route_view_config = parent_rpcs.get_mesh_route_view if parent_rpcs.respond_to? :get_mesh_route_view + @get_mesh_route_view = ::Gapic::Config::Method.new get_mesh_route_view_config + list_gateway_route_views_config = parent_rpcs.list_gateway_route_views if parent_rpcs.respond_to? :list_gateway_route_views + @list_gateway_route_views = ::Gapic::Config::Method.new list_gateway_route_views_config + list_mesh_route_views_config = parent_rpcs.list_mesh_route_views if parent_rpcs.respond_to? :list_mesh_route_views + @list_mesh_route_views = ::Gapic::Config::Method.new list_mesh_route_views_config + list_agent_gateways_config = parent_rpcs.list_agent_gateways if parent_rpcs.respond_to? :list_agent_gateways + @list_agent_gateways = ::Gapic::Config::Method.new list_agent_gateways_config + get_agent_gateway_config = parent_rpcs.get_agent_gateway if parent_rpcs.respond_to? :get_agent_gateway + @get_agent_gateway = ::Gapic::Config::Method.new get_agent_gateway_config + create_agent_gateway_config = parent_rpcs.create_agent_gateway if parent_rpcs.respond_to? :create_agent_gateway + @create_agent_gateway = ::Gapic::Config::Method.new create_agent_gateway_config + update_agent_gateway_config = parent_rpcs.update_agent_gateway if parent_rpcs.respond_to? :update_agent_gateway + @update_agent_gateway = ::Gapic::Config::Method.new update_agent_gateway_config + delete_agent_gateway_config = parent_rpcs.delete_agent_gateway if parent_rpcs.respond_to? :delete_agent_gateway + @delete_agent_gateway = ::Gapic::Config::Method.new delete_agent_gateway_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/network_services/credentials.rb b/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/network_services/credentials.rb new file mode 100644 index 000000000000..2c356ec37e85 --- /dev/null +++ b/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/network_services/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 NetworkServices + module V1 + module NetworkServices + # Credentials for the NetworkServices 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_services-v1/lib/google/cloud/network_services/v1/network_services/operations.rb b/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/network_services/operations.rb new file mode 100644 index 000000000000..415eb7efdc3e --- /dev/null +++ b/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/network_services/operations.rb @@ -0,0 +1,843 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 NetworkServices + module V1 + module NetworkServices + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "networkservices.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the NetworkServices 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 NetworkServices 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::NetworkServices::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::NetworkServices::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::NetworkServices::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::NetworkServices::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::NetworkServices::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. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `: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 = "networkservices.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. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `: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_services-v1/lib/google/cloud/network_services/v1/network_services/paths.rb b/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/network_services/paths.rb new file mode 100644 index 000000000000..a3ea409e1195 --- /dev/null +++ b/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/network_services/paths.rb @@ -0,0 +1,531 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 NetworkServices + module V1 + module NetworkServices + # Path helper methods for the NetworkServices API. + module Paths + ## + # Create a fully-qualified Address resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/regions/{region}/addresses/{address}` + # + # @param project [String] + # @param region [String] + # @param address [String] + # + # @return [::String] + def address_path project:, region:, address: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "region cannot contain /" if region.to_s.include? "/" + + "projects/#{project}/regions/#{region}/addresses/#{address}" + end + + ## + # Create a fully-qualified AgentGateway resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/agentGateways/{agent_gateway}` + # + # @param project [String] + # @param location [String] + # @param agent_gateway [String] + # + # @return [::String] + def agent_gateway_path project:, location:, agent_gateway: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/agentGateways/#{agent_gateway}" + end + + ## + # Create a fully-qualified AuthorizationPolicy resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/authorizationPolicies/{authorization_policy}` + # + # @param project [String] + # @param location [String] + # @param authorization_policy [String] + # + # @return [::String] + def authorization_policy_path project:, location:, authorization_policy: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/authorizationPolicies/#{authorization_policy}" + end + + ## + # Create a fully-qualified BackendService resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/backendServices/{backend_service}` + # + # @param project [String] + # @param location [String] + # @param backend_service [String] + # + # @return [::String] + def backend_service_path project:, location:, backend_service: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/backendServices/#{backend_service}" + end + + ## + # Create a fully-qualified Certificate resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/certificates/{certificate}` + # + # @param project [String] + # @param location [String] + # @param certificate [String] + # + # @return [::String] + def certificate_path project:, location:, certificate: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/certificates/#{certificate}" + end + + ## + # Create a fully-qualified ClientTlsPolicy resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/clientTlsPolicies/{client_tls_policy}` + # + # @param project [String] + # @param location [String] + # @param client_tls_policy [String] + # + # @return [::String] + def client_tls_policy_path project:, location:, client_tls_policy: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/clientTlsPolicies/#{client_tls_policy}" + end + + ## + # Create a fully-qualified EndpointPolicy resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/endpointPolicies/{endpoint_policy}` + # + # @param project [String] + # @param location [String] + # @param endpoint_policy [String] + # + # @return [::String] + def endpoint_policy_path project:, location:, endpoint_policy: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/endpointPolicies/#{endpoint_policy}" + end + + ## + # Create a fully-qualified Gateway resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/gateways/{gateway}` + # + # @param project [String] + # @param location [String] + # @param gateway [String] + # + # @return [::String] + def gateway_path project:, location:, gateway: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/gateways/#{gateway}" + end + + ## + # Create a fully-qualified GatewayRouteView resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/gateways/{gateway}/routeViews/{route_view}` + # + # @param project [String] + # @param location [String] + # @param gateway [String] + # @param route_view [String] + # + # @return [::String] + def gateway_route_view_path project:, location:, gateway:, route_view: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "gateway cannot contain /" if gateway.to_s.include? "/" + + "projects/#{project}/locations/#{location}/gateways/#{gateway}/routeViews/#{route_view}" + end + + ## + # Create a fully-qualified GatewaySecurityPolicy resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/gatewaySecurityPolicies/{gateway_security_policy}` + # + # @param project [String] + # @param location [String] + # @param gateway_security_policy [String] + # + # @return [::String] + def gateway_security_policy_path project:, location:, gateway_security_policy: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/gatewaySecurityPolicies/#{gateway_security_policy}" + end + + ## + # Create a fully-qualified GrpcRoute resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/grpcRoutes/{grpc_route}` + # + # @param project [String] + # @param location [String] + # @param grpc_route [String] + # + # @return [::String] + def grpc_route_path project:, location:, grpc_route: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/grpcRoutes/#{grpc_route}" + end + + ## + # Create a fully-qualified HttpRoute resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/httpRoutes/{http_route}` + # + # @param project [String] + # @param location [String] + # @param http_route [String] + # + # @return [::String] + def http_route_path project:, location:, http_route: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/httpRoutes/#{http_route}" + end + + ## + # Create a fully-qualified Location resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}` + # + # @param project [String] + # @param location [String] + # + # @return [::String] + def location_path project:, location: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + + "projects/#{project}/locations/#{location}" + end + + ## + # Create a fully-qualified Mesh resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/meshes/{mesh}` + # + # @param project [String] + # @param location [String] + # @param mesh [String] + # + # @return [::String] + def mesh_path project:, location:, mesh: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/meshes/#{mesh}" + end + + ## + # Create a fully-qualified MeshRouteView resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/meshes/{mesh}/routeViews/{route_view}` + # + # @param project [String] + # @param location [String] + # @param mesh [String] + # @param route_view [String] + # + # @return [::String] + def mesh_route_view_path project:, location:, mesh:, route_view: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "mesh cannot contain /" if mesh.to_s.include? "/" + + "projects/#{project}/locations/#{location}/meshes/#{mesh}/routeViews/#{route_view}" + end + + ## + # Create a fully-qualified Network resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/global/networks/{network}` + # + # @param project [String] + # @param network [String] + # + # @return [::String] + def network_path project:, network: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + + "projects/#{project}/global/networks/#{network}" + end + + ## + # Create a fully-qualified ServerTlsPolicy resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/serverTlsPolicies/{server_tls_policy}` + # + # @param project [String] + # @param location [String] + # @param server_tls_policy [String] + # + # @return [::String] + def server_tls_policy_path project:, location:, server_tls_policy: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/serverTlsPolicies/#{server_tls_policy}" + end + + ## + # Create a fully-qualified Service resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/namespaces/{namespace}/services/{service}` + # + # @param project [String] + # @param location [String] + # @param namespace [String] + # @param service [String] + # + # @return [::String] + def service_path project:, location:, namespace:, service: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "namespace cannot contain /" if namespace.to_s.include? "/" + + "projects/#{project}/locations/#{location}/namespaces/#{namespace}/services/#{service}" + end + + ## + # Create a fully-qualified ServiceBinding resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/serviceBindings/{service_binding}` + # + # @param project [String] + # @param location [String] + # @param service_binding [String] + # + # @return [::String] + def service_binding_path project:, location:, service_binding: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/serviceBindings/#{service_binding}" + end + + ## + # Create a fully-qualified ServiceLbPolicy resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/serviceLbPolicies/{service_lb_policy}` + # + # @param project [String] + # @param location [String] + # @param service_lb_policy [String] + # + # @return [::String] + def service_lb_policy_path project:, location:, service_lb_policy: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/serviceLbPolicies/#{service_lb_policy}" + end + + ## + # Create a fully-qualified Subnetwork resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/regions/{region}/subnetworks/{subnetwork}` + # + # @param project [String] + # @param region [String] + # @param subnetwork [String] + # + # @return [::String] + def subnetwork_path project:, region:, subnetwork: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "region cannot contain /" if region.to_s.include? "/" + + "projects/#{project}/regions/#{region}/subnetworks/#{subnetwork}" + end + + ## + # Create a fully-qualified TargetTcpProxy resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/targetTcpProxies/{target_tcp_proxy}` + # + # @param project [String] + # @param location [String] + # @param target_tcp_proxy [String] + # + # @return [::String] + def target_tcp_proxy_path project:, location:, target_tcp_proxy: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/targetTcpProxies/#{target_tcp_proxy}" + end + + ## + # Create a fully-qualified TcpRoute resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/tcpRoutes/{tcp_route}` + # + # @param project [String] + # @param location [String] + # @param tcp_route [String] + # + # @return [::String] + def tcp_route_path project:, location:, tcp_route: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/tcpRoutes/#{tcp_route}" + end + + ## + # Create a fully-qualified TlsRoute resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/tlsRoutes/{tls_route}` + # + # @param project [String] + # @param location [String] + # @param tls_route [String] + # + # @return [::String] + def tls_route_path project:, location:, tls_route: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/tlsRoutes/#{tls_route}" + end + + ## + # Create a fully-qualified WasmPlugin resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/wasmPlugins/{wasm_plugin}` + # + # @param project [String] + # @param location [String] + # @param wasm_plugin [String] + # + # @return [::String] + def wasm_plugin_path project:, location:, wasm_plugin: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/wasmPlugins/#{wasm_plugin}" + end + + ## + # Create a fully-qualified WasmPluginVersion resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/wasmPlugins/{wasm_plugin}/versions/{wasm_plugin_version}` + # + # @param project [String] + # @param location [String] + # @param wasm_plugin [String] + # @param wasm_plugin_version [String] + # + # @return [::String] + def wasm_plugin_version_path project:, location:, wasm_plugin:, wasm_plugin_version: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "wasm_plugin cannot contain /" if wasm_plugin.to_s.include? "/" + + "projects/#{project}/locations/#{location}/wasmPlugins/#{wasm_plugin}/versions/#{wasm_plugin_version}" + end + + extend self + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/network_services/rest.rb b/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/network_services/rest.rb new file mode 100644 index 000000000000..0820eaf0d414 --- /dev/null +++ b/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/network_services/rest.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/rest" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/network_services/v1/version" +require "google/cloud/network_services/v1/bindings_override" + +require "google/cloud/network_services/v1/network_services/credentials" +require "google/cloud/network_services/v1/network_services/paths" +require "google/cloud/network_services/v1/network_services/rest/operations" +require "google/cloud/network_services/v1/network_services/rest/client" + +module Google + module Cloud + module NetworkServices + module V1 + ## + # Service describing handlers for resources. + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/network_services/v1/network_services/rest" + # client = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new + # + module NetworkServices + # 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_services/v1/network_services/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/network_services/rest/client.rb b/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/network_services/rest/client.rb new file mode 100644 index 000000000000..15f371e0f354 --- /dev/null +++ b/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/network_services/rest/client.rb @@ -0,0 +1,6471 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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/networkservices/v1/network_services_pb" +require "google/cloud/network_services/v1/network_services/rest/service_stub" +require "google/cloud/location/rest" +require "google/iam/v1/rest" + +module Google + module Cloud + module NetworkServices + module V1 + module NetworkServices + module Rest + ## + # REST client for the NetworkServices service. + # + # Service describing handlers for resources. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "networkservices.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :network_services_stub + + ## + # Configure the NetworkServices Client class. + # + # See {::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all NetworkServices clients + # ::Google::Cloud::NetworkServices::V1::NetworkServices::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", "NetworkServices", "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 NetworkServices 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::NetworkServices::V1::NetworkServices::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 + @network_services_stub.universe_domain + end + + ## + # Create a new NetworkServices REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the NetworkServices 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::NetworkServices::V1::NetworkServices::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 + + @network_services_stub = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @network_services_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 = @network_services_stub.endpoint + config.universe_domain = @network_services_stub.universe_domain + config.bindings_override = @config.bindings_override + config.logger = @network_services_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 = @network_services_stub.endpoint + config.universe_domain = @network_services_stub.universe_domain + config.bindings_override = @config.bindings_override + config.logger = @network_services_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::NetworkServices::V1::NetworkServices::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 + @network_services_stub.logger + end + + # Service calls + + ## + # Lists EndpointPolicies in a given project and location. + # + # @overload list_endpoint_policies(request, options = nil) + # Pass arguments to `list_endpoint_policies` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::ListEndpointPoliciesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::ListEndpointPoliciesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_endpoint_policies(parent: nil, page_size: nil, page_token: nil, return_partial_success: nil) + # Pass arguments to `list_endpoint_policies` via keyword arguments. Note that at + # least one keyword argument is 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 project and location from which the EndpointPolicies should + # be listed, specified in the format `projects/*/locations/*`. + # @param page_size [::Integer] + # Maximum number of EndpointPolicies to return per call. + # @param page_token [::String] + # The value returned by the last `ListEndpointPoliciesResponse` + # Indicates that this is a continuation of a prior + # `ListEndpointPolicies` call, and that the system should return the + # next page of data. + # @param return_partial_success [::Boolean] + # Optional. If true, allow partial responses for multi-regional Aggregated + # List requests. Otherwise if one of the locations is down or unreachable, + # the Aggregated List request will fail. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::EndpointPolicy>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::EndpointPolicy>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/network_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::ListEndpointPoliciesRequest.new + # + # # Call the list_endpoint_policies method. + # result = client.list_endpoint_policies 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::NetworkServices::V1::EndpointPolicy. + # p item + # end + # + def list_endpoint_policies request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::ListEndpointPoliciesRequest + + # Converts hash 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_endpoint_policies.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::NetworkServices::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_endpoint_policies.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_endpoint_policies.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @network_services_stub.list_endpoint_policies request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @network_services_stub, :list_endpoint_policies, "endpoint_policies", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets details of a single EndpointPolicy. + # + # @overload get_endpoint_policy(request, options = nil) + # Pass arguments to `get_endpoint_policy` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::GetEndpointPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::GetEndpointPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_endpoint_policy(name: nil) + # Pass arguments to `get_endpoint_policy` via keyword arguments. Note that at + # least one keyword argument is 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. A name of the EndpointPolicy to get. Must be in the format + # `projects/*/locations/*/endpointPolicies/*`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::NetworkServices::V1::EndpointPolicy] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::NetworkServices::V1::EndpointPolicy] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/network_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::GetEndpointPolicyRequest.new + # + # # Call the get_endpoint_policy method. + # result = client.get_endpoint_policy request + # + # # The returned object is of type Google::Cloud::NetworkServices::V1::EndpointPolicy. + # p result + # + def get_endpoint_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::GetEndpointPolicyRequest + + # Converts hash 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_endpoint_policy.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::NetworkServices::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_endpoint_policy.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_endpoint_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @network_services_stub.get_endpoint_policy 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 EndpointPolicy in a given project and location. + # + # @overload create_endpoint_policy(request, options = nil) + # Pass arguments to `create_endpoint_policy` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::CreateEndpointPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::CreateEndpointPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_endpoint_policy(parent: nil, endpoint_policy_id: nil, endpoint_policy: nil) + # Pass arguments to `create_endpoint_policy` via keyword arguments. Note that at + # least one keyword argument is 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 EndpointPolicy. Must be in the + # format `projects/*/locations/*`. + # @param endpoint_policy_id [::String] + # Required. Short name of the EndpointPolicy resource to be created. + # E.g. "CustomECS". + # @param endpoint_policy [::Google::Cloud::NetworkServices::V1::EndpointPolicy, ::Hash] + # Required. EndpointPolicy resource to be created. + # @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_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::CreateEndpointPolicyRequest.new + # + # # Call the create_endpoint_policy method. + # result = client.create_endpoint_policy 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_endpoint_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::CreateEndpointPolicyRequest + + # Converts hash 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_endpoint_policy.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::NetworkServices::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_endpoint_policy.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_endpoint_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @network_services_stub.create_endpoint_policy request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates the parameters of a single EndpointPolicy. + # + # @overload update_endpoint_policy(request, options = nil) + # Pass arguments to `update_endpoint_policy` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::UpdateEndpointPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::UpdateEndpointPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_endpoint_policy(update_mask: nil, endpoint_policy: nil) + # Pass arguments to `update_endpoint_policy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. Field mask is used to specify the fields to be overwritten in the + # EndpointPolicy resource by the update. + # The fields specified in the update_mask are relative to the resource, not + # the full request. A field will be overwritten if it is in the mask. If the + # user does not provide a mask then all fields will be overwritten. + # @param endpoint_policy [::Google::Cloud::NetworkServices::V1::EndpointPolicy, ::Hash] + # Required. Updated EndpointPolicy 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_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::UpdateEndpointPolicyRequest.new + # + # # Call the update_endpoint_policy method. + # result = client.update_endpoint_policy 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_endpoint_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::UpdateEndpointPolicyRequest + + # Converts hash 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_endpoint_policy.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::NetworkServices::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_endpoint_policy.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_endpoint_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @network_services_stub.update_endpoint_policy request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a single EndpointPolicy. + # + # @overload delete_endpoint_policy(request, options = nil) + # Pass arguments to `delete_endpoint_policy` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::DeleteEndpointPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::DeleteEndpointPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_endpoint_policy(name: nil) + # Pass arguments to `delete_endpoint_policy` via keyword arguments. Note that at + # least one keyword argument is 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. A name of the EndpointPolicy to delete. Must be in the format + # `projects/*/locations/*/endpointPolicies/*`. + # @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_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::DeleteEndpointPolicyRequest.new + # + # # Call the delete_endpoint_policy method. + # result = client.delete_endpoint_policy 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_endpoint_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::DeleteEndpointPolicyRequest + + # Converts hash 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_endpoint_policy.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::NetworkServices::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_endpoint_policy.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_endpoint_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @network_services_stub.delete_endpoint_policy request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists `WasmPluginVersion` resources in a given project and + # location. + # + # @overload list_wasm_plugin_versions(request, options = nil) + # Pass arguments to `list_wasm_plugin_versions` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::ListWasmPluginVersionsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::ListWasmPluginVersionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_wasm_plugin_versions(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_wasm_plugin_versions` via keyword arguments. Note that at + # least one keyword argument is 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 `WasmPlugin` resource whose `WasmPluginVersion`s + # are listed, specified in the following format: + # `projects/{project}/locations/global/wasmPlugins/{wasm_plugin}`. + # @param page_size [::Integer] + # Maximum number of `WasmPluginVersion` resources to return per + # call. If not specified, at most 50 `WasmPluginVersion` resources are + # returned. The maximum value is 1000; values above 1000 are coerced to + # 1000. + # @param page_token [::String] + # The value returned by the last `ListWasmPluginVersionsResponse` call. + # Indicates that this is a continuation of a prior + # `ListWasmPluginVersions` call, and that the + # next page of data is to be returned. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::WasmPluginVersion>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::WasmPluginVersion>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/network_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::ListWasmPluginVersionsRequest.new + # + # # Call the list_wasm_plugin_versions method. + # result = client.list_wasm_plugin_versions 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::NetworkServices::V1::WasmPluginVersion. + # p item + # end + # + def list_wasm_plugin_versions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::ListWasmPluginVersionsRequest + + # Converts hash 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_wasm_plugin_versions.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::NetworkServices::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_wasm_plugin_versions.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_wasm_plugin_versions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @network_services_stub.list_wasm_plugin_versions request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @network_services_stub, :list_wasm_plugin_versions, "wasm_plugin_versions", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets details of the specified `WasmPluginVersion` resource. + # + # @overload get_wasm_plugin_version(request, options = nil) + # Pass arguments to `get_wasm_plugin_version` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::GetWasmPluginVersionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::GetWasmPluginVersionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_wasm_plugin_version(name: nil) + # Pass arguments to `get_wasm_plugin_version` via keyword arguments. Note that at + # least one keyword argument is 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. A name of the `WasmPluginVersion` resource to get. Must be in + # the format + # `projects/{project}/locations/global/wasmPlugins/{wasm_plugin}/versions/{wasm_plugin_version}`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::NetworkServices::V1::WasmPluginVersion] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::NetworkServices::V1::WasmPluginVersion] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/network_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::GetWasmPluginVersionRequest.new + # + # # Call the get_wasm_plugin_version method. + # result = client.get_wasm_plugin_version request + # + # # The returned object is of type Google::Cloud::NetworkServices::V1::WasmPluginVersion. + # p result + # + def get_wasm_plugin_version request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::GetWasmPluginVersionRequest + + # Converts hash 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_wasm_plugin_version.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::NetworkServices::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_wasm_plugin_version.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_wasm_plugin_version.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @network_services_stub.get_wasm_plugin_version 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 `WasmPluginVersion` resource in a given project + # and location. + # + # @overload create_wasm_plugin_version(request, options = nil) + # Pass arguments to `create_wasm_plugin_version` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::CreateWasmPluginVersionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::CreateWasmPluginVersionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_wasm_plugin_version(parent: nil, wasm_plugin_version_id: nil, wasm_plugin_version: nil) + # Pass arguments to `create_wasm_plugin_version` via keyword arguments. Note that at + # least one keyword argument is 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 `WasmPluginVersion` resource. Must be + # in the format + # `projects/{project}/locations/global/wasmPlugins/{wasm_plugin}`. + # @param wasm_plugin_version_id [::String] + # Required. User-provided ID of the `WasmPluginVersion` resource to be + # created. + # @param wasm_plugin_version [::Google::Cloud::NetworkServices::V1::WasmPluginVersion, ::Hash] + # Required. `WasmPluginVersion` resource to be created. + # @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_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::CreateWasmPluginVersionRequest.new + # + # # Call the create_wasm_plugin_version method. + # result = client.create_wasm_plugin_version 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_wasm_plugin_version request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::CreateWasmPluginVersionRequest + + # Converts hash 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_wasm_plugin_version.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::NetworkServices::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_wasm_plugin_version.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_wasm_plugin_version.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @network_services_stub.create_wasm_plugin_version 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 the specified `WasmPluginVersion` resource. + # + # @overload delete_wasm_plugin_version(request, options = nil) + # Pass arguments to `delete_wasm_plugin_version` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::DeleteWasmPluginVersionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::DeleteWasmPluginVersionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_wasm_plugin_version(name: nil) + # Pass arguments to `delete_wasm_plugin_version` via keyword arguments. Note that at + # least one keyword argument is 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. A name of the `WasmPluginVersion` resource to delete. Must be in + # the format + # `projects/{project}/locations/global/wasmPlugins/{wasm_plugin}/versions/{wasm_plugin_version}`. + # @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_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::DeleteWasmPluginVersionRequest.new + # + # # Call the delete_wasm_plugin_version method. + # result = client.delete_wasm_plugin_version 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_wasm_plugin_version request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::DeleteWasmPluginVersionRequest + + # Converts hash 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_wasm_plugin_version.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::NetworkServices::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_wasm_plugin_version.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_wasm_plugin_version.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @network_services_stub.delete_wasm_plugin_version request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists `WasmPlugin` resources in a given project and + # location. + # + # @overload list_wasm_plugins(request, options = nil) + # Pass arguments to `list_wasm_plugins` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::ListWasmPluginsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::ListWasmPluginsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_wasm_plugins(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_wasm_plugins` via keyword arguments. Note that at + # least one keyword argument is 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 project and location from which the `WasmPlugin` resources + # are listed, specified in the following format: + # `projects/{project}/locations/global`. + # @param page_size [::Integer] + # Maximum number of `WasmPlugin` resources to return per call. + # If not specified, at most 50 `WasmPlugin` resources are returned. + # The maximum value is 1000; values above 1000 are coerced to 1000. + # @param page_token [::String] + # The value returned by the last `ListWasmPluginsResponse` call. + # Indicates that this is a continuation of a prior + # `ListWasmPlugins` call, and that the + # next page of data is to be returned. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::WasmPlugin>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::WasmPlugin>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/network_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::ListWasmPluginsRequest.new + # + # # Call the list_wasm_plugins method. + # result = client.list_wasm_plugins 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::NetworkServices::V1::WasmPlugin. + # p item + # end + # + def list_wasm_plugins request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::ListWasmPluginsRequest + + # Converts hash 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_wasm_plugins.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::NetworkServices::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_wasm_plugins.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_wasm_plugins.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @network_services_stub.list_wasm_plugins request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @network_services_stub, :list_wasm_plugins, "wasm_plugins", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets details of the specified `WasmPlugin` resource. + # + # @overload get_wasm_plugin(request, options = nil) + # Pass arguments to `get_wasm_plugin` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::GetWasmPluginRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::GetWasmPluginRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_wasm_plugin(name: nil, view: nil) + # Pass arguments to `get_wasm_plugin` via keyword arguments. Note that at + # least one keyword argument is 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. A name of the `WasmPlugin` resource to get. Must be in the + # format `projects/{project}/locations/global/wasmPlugins/{wasm_plugin}`. + # @param view [::Google::Cloud::NetworkServices::V1::WasmPluginView] + # Determines how much data must be returned in the response. See + # [AIP-157](https://google.aip.dev/157). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::NetworkServices::V1::WasmPlugin] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::NetworkServices::V1::WasmPlugin] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/network_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::GetWasmPluginRequest.new + # + # # Call the get_wasm_plugin method. + # result = client.get_wasm_plugin request + # + # # The returned object is of type Google::Cloud::NetworkServices::V1::WasmPlugin. + # p result + # + def get_wasm_plugin request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::GetWasmPluginRequest + + # Converts hash 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_wasm_plugin.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::NetworkServices::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_wasm_plugin.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_wasm_plugin.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @network_services_stub.get_wasm_plugin 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 `WasmPlugin` resource in a given project + # and location. + # + # @overload create_wasm_plugin(request, options = nil) + # Pass arguments to `create_wasm_plugin` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::CreateWasmPluginRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::CreateWasmPluginRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_wasm_plugin(parent: nil, wasm_plugin_id: nil, wasm_plugin: nil) + # Pass arguments to `create_wasm_plugin` via keyword arguments. Note that at + # least one keyword argument is 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 `WasmPlugin` resource. Must be in the + # format `projects/{project}/locations/global`. + # @param wasm_plugin_id [::String] + # Required. User-provided ID of the `WasmPlugin` resource to be created. + # @param wasm_plugin [::Google::Cloud::NetworkServices::V1::WasmPlugin, ::Hash] + # Required. `WasmPlugin` resource to be created. + # @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_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::CreateWasmPluginRequest.new + # + # # Call the create_wasm_plugin method. + # result = client.create_wasm_plugin 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_wasm_plugin request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::CreateWasmPluginRequest + + # Converts hash 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_wasm_plugin.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::NetworkServices::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_wasm_plugin.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_wasm_plugin.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @network_services_stub.create_wasm_plugin request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates the parameters of the specified `WasmPlugin` resource. + # + # @overload update_wasm_plugin(request, options = nil) + # Pass arguments to `update_wasm_plugin` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::UpdateWasmPluginRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::UpdateWasmPluginRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_wasm_plugin(update_mask: nil, wasm_plugin: nil) + # Pass arguments to `update_wasm_plugin` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. Used to specify the fields to be overwritten in the + # `WasmPlugin` resource by the update. + # The fields specified in the `update_mask` field are relative to the + # resource, not the full request. + # An omitted `update_mask` field is treated as an implied `update_mask` + # field equivalent to all fields that are populated (that have a non-empty + # value). + # The `update_mask` field supports a special value `*`, which means that + # each field in the given `WasmPlugin` resource (including the empty ones) + # replaces the current value. + # @param wasm_plugin [::Google::Cloud::NetworkServices::V1::WasmPlugin, ::Hash] + # Required. Updated `WasmPlugin` 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_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::UpdateWasmPluginRequest.new + # + # # Call the update_wasm_plugin method. + # result = client.update_wasm_plugin 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_wasm_plugin request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::UpdateWasmPluginRequest + + # Converts hash 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_wasm_plugin.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::NetworkServices::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_wasm_plugin.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_wasm_plugin.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @network_services_stub.update_wasm_plugin 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 the specified `WasmPlugin` resource. + # + # @overload delete_wasm_plugin(request, options = nil) + # Pass arguments to `delete_wasm_plugin` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::DeleteWasmPluginRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::DeleteWasmPluginRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_wasm_plugin(name: nil) + # Pass arguments to `delete_wasm_plugin` via keyword arguments. Note that at + # least one keyword argument is 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. A name of the `WasmPlugin` resource to delete. Must be in the + # format `projects/{project}/locations/global/wasmPlugins/{wasm_plugin}`. + # @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_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::DeleteWasmPluginRequest.new + # + # # Call the delete_wasm_plugin method. + # result = client.delete_wasm_plugin 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_wasm_plugin request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::DeleteWasmPluginRequest + + # Converts hash 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_wasm_plugin.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::NetworkServices::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_wasm_plugin.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_wasm_plugin.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @network_services_stub.delete_wasm_plugin request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists Gateways in a given project and location. + # + # @overload list_gateways(request, options = nil) + # Pass arguments to `list_gateways` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::ListGatewaysRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::ListGatewaysRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_gateways(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_gateways` via keyword arguments. Note that at + # least one keyword argument is 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 project and location from which the Gateways should be + # listed, specified in the format `projects/*/locations/*`. + # @param page_size [::Integer] + # Maximum number of Gateways to return per call. + # @param page_token [::String] + # The value returned by the last `ListGatewaysResponse` + # Indicates that this is a continuation of a prior `ListGateways` call, + # and that the system should return the next page of data. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::Gateway>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::Gateway>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/network_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::ListGatewaysRequest.new + # + # # Call the list_gateways method. + # result = client.list_gateways 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::NetworkServices::V1::Gateway. + # p item + # end + # + def list_gateways request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::ListGatewaysRequest + + # Converts hash 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_gateways.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::NetworkServices::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_gateways.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_gateways.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @network_services_stub.list_gateways request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @network_services_stub, :list_gateways, "gateways", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets details of a single Gateway. + # + # @overload get_gateway(request, options = nil) + # Pass arguments to `get_gateway` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::GetGatewayRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::GetGatewayRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_gateway(name: nil) + # Pass arguments to `get_gateway` via keyword arguments. Note that at + # least one keyword argument is 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. A name of the Gateway to get. Must be in the format + # `projects/*/locations/*/gateways/*`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::NetworkServices::V1::Gateway] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::NetworkServices::V1::Gateway] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/network_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::GetGatewayRequest.new + # + # # Call the get_gateway method. + # result = client.get_gateway request + # + # # The returned object is of type Google::Cloud::NetworkServices::V1::Gateway. + # p result + # + def get_gateway request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::GetGatewayRequest + + # Converts hash 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_gateway.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::NetworkServices::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_gateway.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_gateway.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @network_services_stub.get_gateway 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 Gateway in a given project and location. + # + # @overload create_gateway(request, options = nil) + # Pass arguments to `create_gateway` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::CreateGatewayRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::CreateGatewayRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_gateway(parent: nil, gateway_id: nil, gateway: nil) + # Pass arguments to `create_gateway` via keyword arguments. Note that at + # least one keyword argument is 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 Gateway. Must be in the + # format `projects/*/locations/*`. + # @param gateway_id [::String] + # Required. Short name of the Gateway resource to be created. + # @param gateway [::Google::Cloud::NetworkServices::V1::Gateway, ::Hash] + # Required. Gateway resource to be created. + # @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_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::CreateGatewayRequest.new + # + # # Call the create_gateway method. + # result = client.create_gateway 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_gateway request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::CreateGatewayRequest + + # Converts hash 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_gateway.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::NetworkServices::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_gateway.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_gateway.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @network_services_stub.create_gateway request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates the parameters of a single Gateway. + # + # @overload update_gateway(request, options = nil) + # Pass arguments to `update_gateway` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::UpdateGatewayRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::UpdateGatewayRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_gateway(update_mask: nil, gateway: nil) + # Pass arguments to `update_gateway` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. Field mask is used to specify the fields to be overwritten in the + # Gateway resource by the update. + # The fields specified in the update_mask are relative to the resource, not + # the full request. A field will be overwritten if it is in the mask. If the + # user does not provide a mask then all fields will be overwritten. + # @param gateway [::Google::Cloud::NetworkServices::V1::Gateway, ::Hash] + # Required. Updated Gateway 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_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::UpdateGatewayRequest.new + # + # # Call the update_gateway method. + # result = client.update_gateway 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_gateway request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::UpdateGatewayRequest + + # Converts hash 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_gateway.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::NetworkServices::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_gateway.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_gateway.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @network_services_stub.update_gateway request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a single Gateway. + # + # @overload delete_gateway(request, options = nil) + # Pass arguments to `delete_gateway` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::DeleteGatewayRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::DeleteGatewayRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_gateway(name: nil) + # Pass arguments to `delete_gateway` via keyword arguments. Note that at + # least one keyword argument is 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. A name of the Gateway to delete. Must be in the format + # `projects/*/locations/*/gateways/*`. + # @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_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::DeleteGatewayRequest.new + # + # # Call the delete_gateway method. + # result = client.delete_gateway 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_gateway request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::DeleteGatewayRequest + + # Converts hash 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_gateway.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::NetworkServices::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_gateway.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_gateway.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @network_services_stub.delete_gateway request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists GrpcRoutes in a given project and location. + # + # @overload list_grpc_routes(request, options = nil) + # Pass arguments to `list_grpc_routes` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::ListGrpcRoutesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::ListGrpcRoutesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_grpc_routes(parent: nil, page_size: nil, page_token: nil, return_partial_success: nil) + # Pass arguments to `list_grpc_routes` via keyword arguments. Note that at + # least one keyword argument is 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 project and location from which the GrpcRoutes should be + # listed, specified in the format `projects/*/locations/*`. + # @param page_size [::Integer] + # Maximum number of GrpcRoutes to return per call. + # @param page_token [::String] + # The value returned by the last `ListGrpcRoutesResponse` + # Indicates that this is a continuation of a prior `ListGrpcRoutes` call, + # and that the system should return the next page of data. + # @param return_partial_success [::Boolean] + # Optional. If true, allow partial responses for multi-regional Aggregated + # List requests. Otherwise if one of the locations is down or unreachable, + # the Aggregated List request will fail. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::GrpcRoute>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::GrpcRoute>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/network_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::ListGrpcRoutesRequest.new + # + # # Call the list_grpc_routes method. + # result = client.list_grpc_routes 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::NetworkServices::V1::GrpcRoute. + # p item + # end + # + def list_grpc_routes request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::ListGrpcRoutesRequest + + # Converts hash 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_grpc_routes.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::NetworkServices::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_grpc_routes.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_grpc_routes.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @network_services_stub.list_grpc_routes request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @network_services_stub, :list_grpc_routes, "grpc_routes", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets details of a single GrpcRoute. + # + # @overload get_grpc_route(request, options = nil) + # Pass arguments to `get_grpc_route` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::GetGrpcRouteRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::GetGrpcRouteRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_grpc_route(name: nil) + # Pass arguments to `get_grpc_route` via keyword arguments. Note that at + # least one keyword argument is 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. A name of the GrpcRoute to get. Must be in the format + # `projects/*/locations/*/grpcRoutes/*`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::NetworkServices::V1::GrpcRoute] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::NetworkServices::V1::GrpcRoute] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/network_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::GetGrpcRouteRequest.new + # + # # Call the get_grpc_route method. + # result = client.get_grpc_route request + # + # # The returned object is of type Google::Cloud::NetworkServices::V1::GrpcRoute. + # p result + # + def get_grpc_route request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::GetGrpcRouteRequest + + # Converts hash 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_grpc_route.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::NetworkServices::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_grpc_route.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_grpc_route.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @network_services_stub.get_grpc_route 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 GrpcRoute in a given project and location. + # + # @overload create_grpc_route(request, options = nil) + # Pass arguments to `create_grpc_route` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::CreateGrpcRouteRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::CreateGrpcRouteRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_grpc_route(parent: nil, grpc_route_id: nil, grpc_route: nil) + # Pass arguments to `create_grpc_route` via keyword arguments. Note that at + # least one keyword argument is 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 GrpcRoute. Must be in the + # format `projects/*/locations/*`. + # @param grpc_route_id [::String] + # Required. Short name of the GrpcRoute resource to be created. + # @param grpc_route [::Google::Cloud::NetworkServices::V1::GrpcRoute, ::Hash] + # Required. GrpcRoute resource to be created. + # @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_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::CreateGrpcRouteRequest.new + # + # # Call the create_grpc_route method. + # result = client.create_grpc_route 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_grpc_route request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::CreateGrpcRouteRequest + + # Converts hash 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_grpc_route.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::NetworkServices::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_grpc_route.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_grpc_route.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @network_services_stub.create_grpc_route request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates the parameters of a single GrpcRoute. + # + # @overload update_grpc_route(request, options = nil) + # Pass arguments to `update_grpc_route` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::UpdateGrpcRouteRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::UpdateGrpcRouteRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_grpc_route(update_mask: nil, grpc_route: nil) + # Pass arguments to `update_grpc_route` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. Field mask is used to specify the fields to be overwritten in the + # GrpcRoute resource by the update. + # The fields specified in the update_mask are relative to the resource, not + # the full request. A field will be overwritten if it is in the mask. If the + # user does not provide a mask then all fields will be overwritten. + # @param grpc_route [::Google::Cloud::NetworkServices::V1::GrpcRoute, ::Hash] + # Required. Updated GrpcRoute 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_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::UpdateGrpcRouteRequest.new + # + # # Call the update_grpc_route method. + # result = client.update_grpc_route 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_grpc_route request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::UpdateGrpcRouteRequest + + # Converts hash 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_grpc_route.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::NetworkServices::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_grpc_route.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_grpc_route.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @network_services_stub.update_grpc_route request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a single GrpcRoute. + # + # @overload delete_grpc_route(request, options = nil) + # Pass arguments to `delete_grpc_route` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::DeleteGrpcRouteRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::DeleteGrpcRouteRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_grpc_route(name: nil) + # Pass arguments to `delete_grpc_route` via keyword arguments. Note that at + # least one keyword argument is 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. A name of the GrpcRoute to delete. Must be in the format + # `projects/*/locations/*/grpcRoutes/*`. + # @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_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::DeleteGrpcRouteRequest.new + # + # # Call the delete_grpc_route method. + # result = client.delete_grpc_route 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_grpc_route request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::DeleteGrpcRouteRequest + + # Converts hash 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_grpc_route.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::NetworkServices::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_grpc_route.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_grpc_route.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @network_services_stub.delete_grpc_route request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists HttpRoute in a given project and location. + # + # @overload list_http_routes(request, options = nil) + # Pass arguments to `list_http_routes` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::ListHttpRoutesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::ListHttpRoutesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_http_routes(parent: nil, page_size: nil, page_token: nil, return_partial_success: nil, filter: nil) + # Pass arguments to `list_http_routes` via keyword arguments. Note that at + # least one keyword argument is 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 project and location from which the HttpRoutes should be + # listed, specified in the format `projects/*/locations/*`. + # @param page_size [::Integer] + # Maximum number of HttpRoutes to return per call. + # @param page_token [::String] + # The value returned by the last `ListHttpRoutesResponse` + # Indicates that this is a continuation of a prior `ListHttpRoutes` call, + # and that the system should return the next page of data. + # @param return_partial_success [::Boolean] + # Optional. If true, allow partial responses for multi-regional Aggregated + # List requests. Otherwise if one of the locations is down or unreachable, + # the Aggregated List request will fail. + # @param filter [::String] + # Optional. Filter expression to restrict the list. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::HttpRoute>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::HttpRoute>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/network_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::ListHttpRoutesRequest.new + # + # # Call the list_http_routes method. + # result = client.list_http_routes 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::NetworkServices::V1::HttpRoute. + # p item + # end + # + def list_http_routes request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::ListHttpRoutesRequest + + # Converts hash 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_http_routes.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::NetworkServices::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_http_routes.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_http_routes.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @network_services_stub.list_http_routes request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @network_services_stub, :list_http_routes, "http_routes", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets details of a single HttpRoute. + # + # @overload get_http_route(request, options = nil) + # Pass arguments to `get_http_route` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::GetHttpRouteRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::GetHttpRouteRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_http_route(name: nil) + # Pass arguments to `get_http_route` via keyword arguments. Note that at + # least one keyword argument is 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. A name of the HttpRoute to get. Must be in the format + # `projects/*/locations/*/httpRoutes/*`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::NetworkServices::V1::HttpRoute] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::NetworkServices::V1::HttpRoute] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/network_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::GetHttpRouteRequest.new + # + # # Call the get_http_route method. + # result = client.get_http_route request + # + # # The returned object is of type Google::Cloud::NetworkServices::V1::HttpRoute. + # p result + # + def get_http_route request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::GetHttpRouteRequest + + # Converts hash 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_http_route.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::NetworkServices::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_http_route.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_http_route.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @network_services_stub.get_http_route 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 HttpRoute in a given project and location. + # + # @overload create_http_route(request, options = nil) + # Pass arguments to `create_http_route` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::CreateHttpRouteRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::CreateHttpRouteRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_http_route(parent: nil, http_route_id: nil, http_route: nil, request_id: nil) + # Pass arguments to `create_http_route` via keyword arguments. Note that at + # least one keyword argument is 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 HttpRoute. Must be in the + # format `projects/*/locations/*`. + # @param http_route_id [::String] + # Required. Short name of the HttpRoute resource to be created. + # @param http_route [::Google::Cloud::NetworkServices::V1::HttpRoute, ::Hash] + # Required. HttpRoute resource to be created. + # @param request_id [::String] + # Optional. Idempotent request UUID. + # @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_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::CreateHttpRouteRequest.new + # + # # Call the create_http_route method. + # result = client.create_http_route 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_http_route request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::CreateHttpRouteRequest + + # Converts hash 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_http_route.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::NetworkServices::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_http_route.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_http_route.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @network_services_stub.create_http_route request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates the parameters of a single HttpRoute. + # + # @overload update_http_route(request, options = nil) + # Pass arguments to `update_http_route` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::UpdateHttpRouteRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::UpdateHttpRouteRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_http_route(update_mask: nil, http_route: nil) + # Pass arguments to `update_http_route` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. Field mask is used to specify the fields to be overwritten in the + # HttpRoute resource by the update. + # The fields specified in the update_mask are relative to the resource, not + # the full request. A field will be overwritten if it is in the mask. If the + # user does not provide a mask then all fields will be overwritten. + # @param http_route [::Google::Cloud::NetworkServices::V1::HttpRoute, ::Hash] + # Required. Updated HttpRoute 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_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::UpdateHttpRouteRequest.new + # + # # Call the update_http_route method. + # result = client.update_http_route 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_http_route request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::UpdateHttpRouteRequest + + # Converts hash 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_http_route.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::NetworkServices::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_http_route.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_http_route.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @network_services_stub.update_http_route request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a single HttpRoute. + # + # @overload delete_http_route(request, options = nil) + # Pass arguments to `delete_http_route` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::DeleteHttpRouteRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::DeleteHttpRouteRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_http_route(name: nil) + # Pass arguments to `delete_http_route` via keyword arguments. Note that at + # least one keyword argument is 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. A name of the HttpRoute to delete. Must be in the format + # `projects/*/locations/*/httpRoutes/*`. + # @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_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::DeleteHttpRouteRequest.new + # + # # Call the delete_http_route method. + # result = client.delete_http_route 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_http_route request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::DeleteHttpRouteRequest + + # Converts hash 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_http_route.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::NetworkServices::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_http_route.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_http_route.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @network_services_stub.delete_http_route request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists TcpRoute in a given project and location. + # + # @overload list_tcp_routes(request, options = nil) + # Pass arguments to `list_tcp_routes` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::ListTcpRoutesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::ListTcpRoutesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_tcp_routes(parent: nil, page_size: nil, page_token: nil, return_partial_success: nil) + # Pass arguments to `list_tcp_routes` via keyword arguments. Note that at + # least one keyword argument is 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 project and location from which the TcpRoutes should be + # listed, specified in the format `projects/*/locations/*`. + # @param page_size [::Integer] + # Maximum number of TcpRoutes to return per call. + # @param page_token [::String] + # The value returned by the last `ListTcpRoutesResponse` + # Indicates that this is a continuation of a prior `ListTcpRoutes` call, + # and that the system should return the next page of data. + # @param return_partial_success [::Boolean] + # Optional. If true, allow partial responses for multi-regional Aggregated + # List requests. Otherwise if one of the locations is down or unreachable, + # the Aggregated List request will fail. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::TcpRoute>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::TcpRoute>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/network_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::ListTcpRoutesRequest.new + # + # # Call the list_tcp_routes method. + # result = client.list_tcp_routes 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::NetworkServices::V1::TcpRoute. + # p item + # end + # + def list_tcp_routes request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::ListTcpRoutesRequest + + # Converts hash 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_tcp_routes.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::NetworkServices::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_tcp_routes.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_tcp_routes.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @network_services_stub.list_tcp_routes request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @network_services_stub, :list_tcp_routes, "tcp_routes", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets details of a single TcpRoute. + # + # @overload get_tcp_route(request, options = nil) + # Pass arguments to `get_tcp_route` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::GetTcpRouteRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::GetTcpRouteRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_tcp_route(name: nil) + # Pass arguments to `get_tcp_route` via keyword arguments. Note that at + # least one keyword argument is 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. A name of the TcpRoute to get. Must be in the format + # `projects/*/locations/*/tcpRoutes/*`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::NetworkServices::V1::TcpRoute] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::NetworkServices::V1::TcpRoute] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/network_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::GetTcpRouteRequest.new + # + # # Call the get_tcp_route method. + # result = client.get_tcp_route request + # + # # The returned object is of type Google::Cloud::NetworkServices::V1::TcpRoute. + # p result + # + def get_tcp_route request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::GetTcpRouteRequest + + # Converts hash 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_tcp_route.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::NetworkServices::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_tcp_route.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_tcp_route.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @network_services_stub.get_tcp_route 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 TcpRoute in a given project and location. + # + # @overload create_tcp_route(request, options = nil) + # Pass arguments to `create_tcp_route` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::CreateTcpRouteRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::CreateTcpRouteRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_tcp_route(parent: nil, tcp_route_id: nil, tcp_route: nil) + # Pass arguments to `create_tcp_route` via keyword arguments. Note that at + # least one keyword argument is 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 TcpRoute. Must be in the + # format `projects/*/locations/*`. + # @param tcp_route_id [::String] + # Required. Short name of the TcpRoute resource to be created. + # @param tcp_route [::Google::Cloud::NetworkServices::V1::TcpRoute, ::Hash] + # Required. TcpRoute resource to be created. + # @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_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::CreateTcpRouteRequest.new + # + # # Call the create_tcp_route method. + # result = client.create_tcp_route 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_tcp_route request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::CreateTcpRouteRequest + + # Converts hash 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_tcp_route.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::NetworkServices::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_tcp_route.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_tcp_route.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @network_services_stub.create_tcp_route request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates the parameters of a single TcpRoute. + # + # @overload update_tcp_route(request, options = nil) + # Pass arguments to `update_tcp_route` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::UpdateTcpRouteRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::UpdateTcpRouteRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_tcp_route(update_mask: nil, tcp_route: nil) + # Pass arguments to `update_tcp_route` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. Field mask is used to specify the fields to be overwritten in the + # TcpRoute resource by the update. + # The fields specified in the update_mask are relative to the resource, not + # the full request. A field will be overwritten if it is in the mask. If the + # user does not provide a mask then all fields will be overwritten. + # @param tcp_route [::Google::Cloud::NetworkServices::V1::TcpRoute, ::Hash] + # Required. Updated TcpRoute 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_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::UpdateTcpRouteRequest.new + # + # # Call the update_tcp_route method. + # result = client.update_tcp_route 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_tcp_route request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::UpdateTcpRouteRequest + + # Converts hash 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_tcp_route.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::NetworkServices::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_tcp_route.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_tcp_route.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @network_services_stub.update_tcp_route request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a single TcpRoute. + # + # @overload delete_tcp_route(request, options = nil) + # Pass arguments to `delete_tcp_route` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::DeleteTcpRouteRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::DeleteTcpRouteRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_tcp_route(name: nil) + # Pass arguments to `delete_tcp_route` via keyword arguments. Note that at + # least one keyword argument is 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. A name of the TcpRoute to delete. Must be in the format + # `projects/*/locations/*/tcpRoutes/*`. + # @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_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::DeleteTcpRouteRequest.new + # + # # Call the delete_tcp_route method. + # result = client.delete_tcp_route 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_tcp_route request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::DeleteTcpRouteRequest + + # Converts hash 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_tcp_route.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::NetworkServices::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_tcp_route.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_tcp_route.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @network_services_stub.delete_tcp_route request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists TlsRoute in a given project and location. + # + # @overload list_tls_routes(request, options = nil) + # Pass arguments to `list_tls_routes` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::ListTlsRoutesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::ListTlsRoutesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_tls_routes(parent: nil, page_size: nil, page_token: nil, return_partial_success: nil) + # Pass arguments to `list_tls_routes` via keyword arguments. Note that at + # least one keyword argument is 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 project and location from which the TlsRoutes should be + # listed, specified in the format `projects/*/locations/*`. + # @param page_size [::Integer] + # Maximum number of TlsRoutes to return per call. + # @param page_token [::String] + # The value returned by the last `ListTlsRoutesResponse` + # Indicates that this is a continuation of a prior `ListTlsRoutes` call, + # and that the system should return the next page of data. + # @param return_partial_success [::Boolean] + # Optional. If true, allow partial responses for multi-regional Aggregated + # List requests. Otherwise if one of the locations is down or unreachable, + # the Aggregated List request will fail. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::TlsRoute>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::TlsRoute>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/network_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::ListTlsRoutesRequest.new + # + # # Call the list_tls_routes method. + # result = client.list_tls_routes 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::NetworkServices::V1::TlsRoute. + # p item + # end + # + def list_tls_routes request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::ListTlsRoutesRequest + + # Converts hash 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_tls_routes.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::NetworkServices::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_tls_routes.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_tls_routes.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @network_services_stub.list_tls_routes request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @network_services_stub, :list_tls_routes, "tls_routes", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets details of a single TlsRoute. + # + # @overload get_tls_route(request, options = nil) + # Pass arguments to `get_tls_route` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::GetTlsRouteRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::GetTlsRouteRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_tls_route(name: nil) + # Pass arguments to `get_tls_route` via keyword arguments. Note that at + # least one keyword argument is 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. A name of the TlsRoute to get. Must be in the format + # `projects/*/locations/*/tlsRoutes/*`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::NetworkServices::V1::TlsRoute] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::NetworkServices::V1::TlsRoute] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/network_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::GetTlsRouteRequest.new + # + # # Call the get_tls_route method. + # result = client.get_tls_route request + # + # # The returned object is of type Google::Cloud::NetworkServices::V1::TlsRoute. + # p result + # + def get_tls_route request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::GetTlsRouteRequest + + # Converts hash 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_tls_route.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::NetworkServices::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_tls_route.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_tls_route.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @network_services_stub.get_tls_route 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 TlsRoute in a given project and location. + # + # @overload create_tls_route(request, options = nil) + # Pass arguments to `create_tls_route` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::CreateTlsRouteRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::CreateTlsRouteRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_tls_route(parent: nil, tls_route_id: nil, tls_route: nil) + # Pass arguments to `create_tls_route` via keyword arguments. Note that at + # least one keyword argument is 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 TlsRoute. Must be in the + # format `projects/*/locations/*`. + # @param tls_route_id [::String] + # Required. Short name of the TlsRoute resource to be created. + # @param tls_route [::Google::Cloud::NetworkServices::V1::TlsRoute, ::Hash] + # Required. TlsRoute resource to be created. + # @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_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::CreateTlsRouteRequest.new + # + # # Call the create_tls_route method. + # result = client.create_tls_route 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_tls_route request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::CreateTlsRouteRequest + + # Converts hash 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_tls_route.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::NetworkServices::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_tls_route.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_tls_route.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @network_services_stub.create_tls_route request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates the parameters of a single TlsRoute. + # + # @overload update_tls_route(request, options = nil) + # Pass arguments to `update_tls_route` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::UpdateTlsRouteRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::UpdateTlsRouteRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_tls_route(update_mask: nil, tls_route: nil) + # Pass arguments to `update_tls_route` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. Field mask is used to specify the fields to be overwritten in the + # TlsRoute resource by the update. + # The fields specified in the update_mask are relative to the resource, not + # the full request. A field will be overwritten if it is in the mask. If the + # user does not provide a mask then all fields will be overwritten. + # @param tls_route [::Google::Cloud::NetworkServices::V1::TlsRoute, ::Hash] + # Required. Updated TlsRoute 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_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::UpdateTlsRouteRequest.new + # + # # Call the update_tls_route method. + # result = client.update_tls_route 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_tls_route request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::UpdateTlsRouteRequest + + # Converts hash 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_tls_route.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::NetworkServices::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_tls_route.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_tls_route.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @network_services_stub.update_tls_route request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a single TlsRoute. + # + # @overload delete_tls_route(request, options = nil) + # Pass arguments to `delete_tls_route` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::DeleteTlsRouteRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::DeleteTlsRouteRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_tls_route(name: nil) + # Pass arguments to `delete_tls_route` via keyword arguments. Note that at + # least one keyword argument is 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. A name of the TlsRoute to delete. Must be in the format + # `projects/*/locations/*/tlsRoutes/*`. + # @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_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::DeleteTlsRouteRequest.new + # + # # Call the delete_tls_route method. + # result = client.delete_tls_route 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_tls_route request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::DeleteTlsRouteRequest + + # Converts hash 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_tls_route.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::NetworkServices::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_tls_route.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_tls_route.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @network_services_stub.delete_tls_route request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists ServiceBinding in a given project and location. + # + # @overload list_service_bindings(request, options = nil) + # Pass arguments to `list_service_bindings` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::ListServiceBindingsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::ListServiceBindingsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_service_bindings(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_service_bindings` via keyword arguments. Note that at + # least one keyword argument is 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 project and location from which the ServiceBindings should be + # listed, specified in the format `projects/*/locations/*`. + # @param page_size [::Integer] + # Maximum number of ServiceBindings to return per call. + # @param page_token [::String] + # The value returned by the last `ListServiceBindingsResponse` + # Indicates that this is a continuation of a prior `ListRouters` call, + # and that the system should return the next page of data. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::ServiceBinding>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::ServiceBinding>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/network_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::ListServiceBindingsRequest.new + # + # # Call the list_service_bindings method. + # result = client.list_service_bindings 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::NetworkServices::V1::ServiceBinding. + # p item + # end + # + def list_service_bindings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::ListServiceBindingsRequest + + # Converts hash 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_service_bindings.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::NetworkServices::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_service_bindings.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_service_bindings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @network_services_stub.list_service_bindings request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @network_services_stub, :list_service_bindings, "service_bindings", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets details of a single ServiceBinding. + # + # @overload get_service_binding(request, options = nil) + # Pass arguments to `get_service_binding` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::GetServiceBindingRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::GetServiceBindingRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_service_binding(name: nil) + # Pass arguments to `get_service_binding` via keyword arguments. Note that at + # least one keyword argument is 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. A name of the ServiceBinding to get. Must be in the format + # `projects/*/locations/*/serviceBindings/*`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::NetworkServices::V1::ServiceBinding] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::NetworkServices::V1::ServiceBinding] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/network_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::GetServiceBindingRequest.new + # + # # Call the get_service_binding method. + # result = client.get_service_binding request + # + # # The returned object is of type Google::Cloud::NetworkServices::V1::ServiceBinding. + # p result + # + def get_service_binding request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::GetServiceBindingRequest + + # Converts hash 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_service_binding.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::NetworkServices::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_service_binding.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_service_binding.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @network_services_stub.get_service_binding 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 ServiceBinding in a given project and location. + # + # @overload create_service_binding(request, options = nil) + # Pass arguments to `create_service_binding` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::CreateServiceBindingRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::CreateServiceBindingRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_service_binding(parent: nil, service_binding_id: nil, service_binding: nil) + # Pass arguments to `create_service_binding` via keyword arguments. Note that at + # least one keyword argument is 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 ServiceBinding. Must be in the + # format `projects/*/locations/*`. + # @param service_binding_id [::String] + # Required. Short name of the ServiceBinding resource to be created. + # @param service_binding [::Google::Cloud::NetworkServices::V1::ServiceBinding, ::Hash] + # Required. ServiceBinding resource to be created. + # @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_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::CreateServiceBindingRequest.new + # + # # Call the create_service_binding method. + # result = client.create_service_binding 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_service_binding request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::CreateServiceBindingRequest + + # Converts hash 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_service_binding.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::NetworkServices::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_service_binding.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_service_binding.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @network_services_stub.create_service_binding request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates the parameters of a single ServiceBinding. + # + # @overload update_service_binding(request, options = nil) + # Pass arguments to `update_service_binding` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::UpdateServiceBindingRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::UpdateServiceBindingRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_service_binding(update_mask: nil, service_binding: nil) + # Pass arguments to `update_service_binding` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. Field mask is used to specify the fields to be overwritten in the + # ServiceBinding resource by the update. + # The fields specified in the update_mask are relative to the resource, not + # the full request. A field will be overwritten if it is in the mask. If the + # user does not provide a mask then all fields will be overwritten. + # @param service_binding [::Google::Cloud::NetworkServices::V1::ServiceBinding, ::Hash] + # Required. Updated ServiceBinding 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_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::UpdateServiceBindingRequest.new + # + # # Call the update_service_binding method. + # result = client.update_service_binding 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_service_binding request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::UpdateServiceBindingRequest + + # Converts hash 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_service_binding.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::NetworkServices::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_service_binding.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_service_binding.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @network_services_stub.update_service_binding request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a single ServiceBinding. + # + # @overload delete_service_binding(request, options = nil) + # Pass arguments to `delete_service_binding` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::DeleteServiceBindingRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::DeleteServiceBindingRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_service_binding(name: nil) + # Pass arguments to `delete_service_binding` via keyword arguments. Note that at + # least one keyword argument is 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. A name of the ServiceBinding to delete. Must be in the format + # `projects/*/locations/*/serviceBindings/*`. + # @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_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::DeleteServiceBindingRequest.new + # + # # Call the delete_service_binding method. + # result = client.delete_service_binding 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_service_binding request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::DeleteServiceBindingRequest + + # Converts hash 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_service_binding.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::NetworkServices::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_service_binding.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_service_binding.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @network_services_stub.delete_service_binding request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists Meshes in a given project and location. + # + # @overload list_meshes(request, options = nil) + # Pass arguments to `list_meshes` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::ListMeshesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::ListMeshesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_meshes(parent: nil, page_size: nil, page_token: nil, return_partial_success: nil) + # Pass arguments to `list_meshes` via keyword arguments. Note that at + # least one keyword argument is 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 project and location from which the Meshes should be + # listed, specified in the format `projects/*/locations/*`. + # @param page_size [::Integer] + # Maximum number of Meshes to return per call. + # @param page_token [::String] + # The value returned by the last `ListMeshesResponse` + # Indicates that this is a continuation of a prior `ListMeshes` call, + # and that the system should return the next page of data. + # @param return_partial_success [::Boolean] + # Optional. If true, allow partial responses for multi-regional Aggregated + # List requests. Otherwise if one of the locations is down or unreachable, + # the Aggregated List request will fail. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::Mesh>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::Mesh>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/network_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::ListMeshesRequest.new + # + # # Call the list_meshes method. + # result = client.list_meshes 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::NetworkServices::V1::Mesh. + # p item + # end + # + def list_meshes request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::ListMeshesRequest + + # Converts hash 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_meshes.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::NetworkServices::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_meshes.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_meshes.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @network_services_stub.list_meshes request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @network_services_stub, :list_meshes, "meshes", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets details of a single Mesh. + # + # @overload get_mesh(request, options = nil) + # Pass arguments to `get_mesh` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::GetMeshRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::GetMeshRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_mesh(name: nil) + # Pass arguments to `get_mesh` via keyword arguments. Note that at + # least one keyword argument is 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. A name of the Mesh to get. Must be in the format + # `projects/*/locations/*/meshes/*`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::NetworkServices::V1::Mesh] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::NetworkServices::V1::Mesh] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/network_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::GetMeshRequest.new + # + # # Call the get_mesh method. + # result = client.get_mesh request + # + # # The returned object is of type Google::Cloud::NetworkServices::V1::Mesh. + # p result + # + def get_mesh request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::GetMeshRequest + + # Converts hash 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_mesh.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::NetworkServices::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_mesh.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_mesh.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @network_services_stub.get_mesh 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 Mesh in a given project and location. + # + # @overload create_mesh(request, options = nil) + # Pass arguments to `create_mesh` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::CreateMeshRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::CreateMeshRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_mesh(parent: nil, mesh_id: nil, mesh: nil) + # Pass arguments to `create_mesh` via keyword arguments. Note that at + # least one keyword argument is 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 Mesh. Must be in the + # format `projects/*/locations/*`. + # @param mesh_id [::String] + # Required. Short name of the Mesh resource to be created. + # @param mesh [::Google::Cloud::NetworkServices::V1::Mesh, ::Hash] + # Required. Mesh resource to be created. + # @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_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::CreateMeshRequest.new + # + # # Call the create_mesh method. + # result = client.create_mesh 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_mesh request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::CreateMeshRequest + + # Converts hash 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_mesh.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::NetworkServices::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_mesh.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_mesh.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @network_services_stub.create_mesh request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates the parameters of a single Mesh. + # + # @overload update_mesh(request, options = nil) + # Pass arguments to `update_mesh` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::UpdateMeshRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::UpdateMeshRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_mesh(update_mask: nil, mesh: nil) + # Pass arguments to `update_mesh` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. Field mask is used to specify the fields to be overwritten in the + # Mesh resource by the update. + # The fields specified in the update_mask are relative to the resource, not + # the full request. A field will be overwritten if it is in the mask. If the + # user does not provide a mask then all fields will be overwritten. + # @param mesh [::Google::Cloud::NetworkServices::V1::Mesh, ::Hash] + # Required. Updated Mesh 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_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::UpdateMeshRequest.new + # + # # Call the update_mesh method. + # result = client.update_mesh 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_mesh request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::UpdateMeshRequest + + # Converts hash 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_mesh.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::NetworkServices::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_mesh.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_mesh.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @network_services_stub.update_mesh request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a single Mesh. + # + # @overload delete_mesh(request, options = nil) + # Pass arguments to `delete_mesh` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::DeleteMeshRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::DeleteMeshRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_mesh(name: nil) + # Pass arguments to `delete_mesh` via keyword arguments. Note that at + # least one keyword argument is 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. A name of the Mesh to delete. Must be in the format + # `projects/*/locations/*/meshes/*`. + # @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_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::DeleteMeshRequest.new + # + # # Call the delete_mesh method. + # result = client.delete_mesh 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_mesh request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::DeleteMeshRequest + + # Converts hash 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_mesh.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::NetworkServices::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_mesh.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_mesh.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @network_services_stub.delete_mesh request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists ServiceLbPolicies in a given project and location. + # + # @overload list_service_lb_policies(request, options = nil) + # Pass arguments to `list_service_lb_policies` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::ListServiceLbPoliciesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::ListServiceLbPoliciesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_service_lb_policies(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_service_lb_policies` via keyword arguments. Note that at + # least one keyword argument is 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 project and location from which the ServiceLbPolicies should + # be listed, specified in the format + # `projects/{project}/locations/{location}`. + # @param page_size [::Integer] + # Maximum number of ServiceLbPolicies to return per call. + # @param page_token [::String] + # The value returned by the last `ListServiceLbPoliciesResponse` + # Indicates that this is a continuation of a prior `ListRouters` call, + # and that the system should return the next page of data. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::ServiceLbPolicy>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::ServiceLbPolicy>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/network_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::ListServiceLbPoliciesRequest.new + # + # # Call the list_service_lb_policies method. + # result = client.list_service_lb_policies 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::NetworkServices::V1::ServiceLbPolicy. + # p item + # end + # + def list_service_lb_policies request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::ListServiceLbPoliciesRequest + + # Converts hash 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_service_lb_policies.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::NetworkServices::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_service_lb_policies.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_service_lb_policies.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @network_services_stub.list_service_lb_policies request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @network_services_stub, :list_service_lb_policies, "service_lb_policies", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets details of a single ServiceLbPolicy. + # + # @overload get_service_lb_policy(request, options = nil) + # Pass arguments to `get_service_lb_policy` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::GetServiceLbPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::GetServiceLbPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_service_lb_policy(name: nil) + # Pass arguments to `get_service_lb_policy` via keyword arguments. Note that at + # least one keyword argument is 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. A name of the ServiceLbPolicy to get. Must be in the format + # `projects/{project}/locations/{location}/serviceLbPolicies/*`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::NetworkServices::V1::ServiceLbPolicy] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::NetworkServices::V1::ServiceLbPolicy] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/network_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::GetServiceLbPolicyRequest.new + # + # # Call the get_service_lb_policy method. + # result = client.get_service_lb_policy request + # + # # The returned object is of type Google::Cloud::NetworkServices::V1::ServiceLbPolicy. + # p result + # + def get_service_lb_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::GetServiceLbPolicyRequest + + # Converts hash 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_service_lb_policy.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::NetworkServices::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_service_lb_policy.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_service_lb_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @network_services_stub.get_service_lb_policy 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 ServiceLbPolicy in a given project and location. + # + # @overload create_service_lb_policy(request, options = nil) + # Pass arguments to `create_service_lb_policy` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::CreateServiceLbPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::CreateServiceLbPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_service_lb_policy(parent: nil, service_lb_policy_id: nil, service_lb_policy: nil) + # Pass arguments to `create_service_lb_policy` via keyword arguments. Note that at + # least one keyword argument is 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 ServiceLbPolicy. Must be in the + # format `projects/{project}/locations/{location}`. + # @param service_lb_policy_id [::String] + # Required. Short name of the ServiceLbPolicy resource to be created. + # E.g. for resource name + # `projects/{project}/locations/{location}/serviceLbPolicies/{service_lb_policy_name}`. + # the id is value of \\{service_lb_policy_name} + # @param service_lb_policy [::Google::Cloud::NetworkServices::V1::ServiceLbPolicy, ::Hash] + # Required. ServiceLbPolicy resource to be created. + # @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_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::CreateServiceLbPolicyRequest.new + # + # # Call the create_service_lb_policy method. + # result = client.create_service_lb_policy 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_service_lb_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::CreateServiceLbPolicyRequest + + # Converts hash 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_service_lb_policy.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::NetworkServices::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_service_lb_policy.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_service_lb_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @network_services_stub.create_service_lb_policy request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates the parameters of a single ServiceLbPolicy. + # + # @overload update_service_lb_policy(request, options = nil) + # Pass arguments to `update_service_lb_policy` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::UpdateServiceLbPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::UpdateServiceLbPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_service_lb_policy(update_mask: nil, service_lb_policy: nil) + # Pass arguments to `update_service_lb_policy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. Field mask is used to specify the fields to be overwritten in the + # ServiceLbPolicy resource by the update. + # The fields specified in the update_mask are relative to the resource, not + # the full request. A field will be overwritten if it is in the mask. If the + # user does not provide a mask then all fields will be overwritten. + # @param service_lb_policy [::Google::Cloud::NetworkServices::V1::ServiceLbPolicy, ::Hash] + # Required. Updated ServiceLbPolicy 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_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::UpdateServiceLbPolicyRequest.new + # + # # Call the update_service_lb_policy method. + # result = client.update_service_lb_policy 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_service_lb_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::UpdateServiceLbPolicyRequest + + # Converts hash 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_service_lb_policy.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::NetworkServices::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_service_lb_policy.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_service_lb_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @network_services_stub.update_service_lb_policy request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a single ServiceLbPolicy. + # + # @overload delete_service_lb_policy(request, options = nil) + # Pass arguments to `delete_service_lb_policy` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::DeleteServiceLbPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::DeleteServiceLbPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_service_lb_policy(name: nil) + # Pass arguments to `delete_service_lb_policy` via keyword arguments. Note that at + # least one keyword argument is 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. A name of the ServiceLbPolicy to delete. Must be in the format + # `projects/{project}/locations/{location}/serviceLbPolicies/*`. + # @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_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::DeleteServiceLbPolicyRequest.new + # + # # Call the delete_service_lb_policy method. + # result = client.delete_service_lb_policy 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_service_lb_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::DeleteServiceLbPolicyRequest + + # Converts hash 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_service_lb_policy.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::NetworkServices::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_service_lb_policy.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_service_lb_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @network_services_stub.delete_service_lb_policy 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 + + ## + # Get a single RouteView of a Gateway. + # + # @overload get_gateway_route_view(request, options = nil) + # Pass arguments to `get_gateway_route_view` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::GetGatewayRouteViewRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::GetGatewayRouteViewRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_gateway_route_view(name: nil) + # Pass arguments to `get_gateway_route_view` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the GatewayRouteView resource. + # Formats: + # projects/\\{project}/locations/\\{location}/gateways/\\{gateway}/routeViews/\\{route_view} + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::NetworkServices::V1::GatewayRouteView] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::NetworkServices::V1::GatewayRouteView] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/network_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::GetGatewayRouteViewRequest.new + # + # # Call the get_gateway_route_view method. + # result = client.get_gateway_route_view request + # + # # The returned object is of type Google::Cloud::NetworkServices::V1::GatewayRouteView. + # p result + # + def get_gateway_route_view request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::GetGatewayRouteViewRequest + + # Converts hash 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_gateway_route_view.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::NetworkServices::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_gateway_route_view.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_gateway_route_view.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @network_services_stub.get_gateway_route_view 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 + + ## + # Get a single RouteView of a Mesh. + # + # @overload get_mesh_route_view(request, options = nil) + # Pass arguments to `get_mesh_route_view` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::GetMeshRouteViewRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::GetMeshRouteViewRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_mesh_route_view(name: nil) + # Pass arguments to `get_mesh_route_view` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the MeshRouteView resource. + # Format: + # projects/\\{project}/locations/\\{location}/meshes/\\{mesh}/routeViews/\\{route_view} + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::NetworkServices::V1::MeshRouteView] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::NetworkServices::V1::MeshRouteView] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/network_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::GetMeshRouteViewRequest.new + # + # # Call the get_mesh_route_view method. + # result = client.get_mesh_route_view request + # + # # The returned object is of type Google::Cloud::NetworkServices::V1::MeshRouteView. + # p result + # + def get_mesh_route_view request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::GetMeshRouteViewRequest + + # Converts hash 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_mesh_route_view.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::NetworkServices::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_mesh_route_view.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_mesh_route_view.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @network_services_stub.get_mesh_route_view request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists RouteViews + # + # @overload list_gateway_route_views(request, options = nil) + # Pass arguments to `list_gateway_route_views` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::ListGatewayRouteViewsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::ListGatewayRouteViewsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_gateway_route_views(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_gateway_route_views` via keyword arguments. Note that at + # least one keyword argument is 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 Gateway to which a Route is associated. + # Formats: + # projects/\\{project}/locations/\\{location}/gateways/\\{gateway} + # @param page_size [::Integer] + # Maximum number of GatewayRouteViews to return per call. + # @param page_token [::String] + # The value returned by the last `ListGatewayRouteViewsResponse` + # Indicates that this is a continuation of a prior `ListGatewayRouteViews` + # call, and that the system should return the next page of data. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::GatewayRouteView>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::GatewayRouteView>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/network_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::ListGatewayRouteViewsRequest.new + # + # # Call the list_gateway_route_views method. + # result = client.list_gateway_route_views 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::NetworkServices::V1::GatewayRouteView. + # p item + # end + # + def list_gateway_route_views request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::ListGatewayRouteViewsRequest + + # Converts hash 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_gateway_route_views.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::NetworkServices::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_gateway_route_views.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_gateway_route_views.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @network_services_stub.list_gateway_route_views request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @network_services_stub, :list_gateway_route_views, "gateway_route_views", 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 + + ## + # Lists RouteViews + # + # @overload list_mesh_route_views(request, options = nil) + # Pass arguments to `list_mesh_route_views` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::ListMeshRouteViewsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::ListMeshRouteViewsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_mesh_route_views(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_mesh_route_views` via keyword arguments. Note that at + # least one keyword argument is 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 Mesh to which a Route is associated. + # Format: + # projects/\\{project}/locations/\\{location}/meshes/\\{mesh} + # @param page_size [::Integer] + # Maximum number of MeshRouteViews to return per call. + # @param page_token [::String] + # The value returned by the last `ListMeshRouteViewsResponse` + # Indicates that this is a continuation of a prior `ListMeshRouteViews` call, + # and that the system should return the next page of data. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::MeshRouteView>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::MeshRouteView>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/network_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::ListMeshRouteViewsRequest.new + # + # # Call the list_mesh_route_views method. + # result = client.list_mesh_route_views 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::NetworkServices::V1::MeshRouteView. + # p item + # end + # + def list_mesh_route_views request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::ListMeshRouteViewsRequest + + # Converts hash 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_mesh_route_views.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::NetworkServices::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_mesh_route_views.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_mesh_route_views.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @network_services_stub.list_mesh_route_views request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @network_services_stub, :list_mesh_route_views, "mesh_route_views", 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 + + ## + # Lists AgentGateways in a given project and location. + # + # @overload list_agent_gateways(request, options = nil) + # Pass arguments to `list_agent_gateways` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::ListAgentGatewaysRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::ListAgentGatewaysRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_agent_gateways(parent: nil, page_size: nil, page_token: nil, return_partial_success: nil) + # Pass arguments to `list_agent_gateways` via keyword arguments. Note that at + # least one keyword argument is 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 project and location from which the AgentGateways should be + # listed, specified in the format `projects/*/locations/*`. + # @param page_size [::Integer] + # Optional. Maximum number of AgentGateways to return per call. + # @param page_token [::String] + # Optional. The value returned by the last `ListAgentGatewaysResponse` + # Indicates that this is a continuation of a prior `ListAgentGateways` + # call, and that the system should return the next page of data. + # @param return_partial_success [::Boolean] + # Optional. If true, allow partial responses for multi-regional Aggregated + # List requests. Otherwise if one of the locations is down or unreachable, + # the Aggregated List request will fail. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::AgentGateway>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::AgentGateway>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/network_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::ListAgentGatewaysRequest.new + # + # # Call the list_agent_gateways method. + # result = client.list_agent_gateways 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::NetworkServices::V1::AgentGateway. + # p item + # end + # + def list_agent_gateways request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::ListAgentGatewaysRequest + + # Converts hash 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_agent_gateways.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::NetworkServices::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_agent_gateways.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_agent_gateways.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @network_services_stub.list_agent_gateways request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @network_services_stub, :list_agent_gateways, "agent_gateways", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets details of a single AgentGateway. + # + # @overload get_agent_gateway(request, options = nil) + # Pass arguments to `get_agent_gateway` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::GetAgentGatewayRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::GetAgentGatewayRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_agent_gateway(name: nil) + # Pass arguments to `get_agent_gateway` via keyword arguments. Note that at + # least one keyword argument is 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. A name of the AgentGateway to get. Must be in the format + # `projects/*/locations/*/agentGateways/*`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::NetworkServices::V1::AgentGateway] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::NetworkServices::V1::AgentGateway] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/network_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::GetAgentGatewayRequest.new + # + # # Call the get_agent_gateway method. + # result = client.get_agent_gateway request + # + # # The returned object is of type Google::Cloud::NetworkServices::V1::AgentGateway. + # p result + # + def get_agent_gateway request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::GetAgentGatewayRequest + + # Converts hash 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_agent_gateway.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::NetworkServices::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_agent_gateway.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_agent_gateway.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @network_services_stub.get_agent_gateway 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 AgentGateway in a given project and location. + # + # @overload create_agent_gateway(request, options = nil) + # Pass arguments to `create_agent_gateway` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::CreateAgentGatewayRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::CreateAgentGatewayRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_agent_gateway(parent: nil, agent_gateway_id: nil, agent_gateway: nil) + # Pass arguments to `create_agent_gateway` via keyword arguments. Note that at + # least one keyword argument is 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 AgentGateway. Must be in the + # format `projects/*/locations/*`. + # @param agent_gateway_id [::String] + # Required. Short name of the AgentGateway resource to be created. + # @param agent_gateway [::Google::Cloud::NetworkServices::V1::AgentGateway, ::Hash] + # Required. AgentGateway resource to be created. + # @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_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::CreateAgentGatewayRequest.new + # + # # Call the create_agent_gateway method. + # result = client.create_agent_gateway 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_agent_gateway request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::CreateAgentGatewayRequest + + # Converts hash 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_agent_gateway.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::NetworkServices::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_agent_gateway.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_agent_gateway.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @network_services_stub.create_agent_gateway request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates the parameters of a single AgentGateway. + # + # @overload update_agent_gateway(request, options = nil) + # Pass arguments to `update_agent_gateway` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::UpdateAgentGatewayRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::UpdateAgentGatewayRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_agent_gateway(update_mask: nil, agent_gateway: nil) + # Pass arguments to `update_agent_gateway` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. Field mask is used to specify the fields to be overwritten in the + # AgentGateway resource by the update. + # The fields specified in the update_mask are relative to the resource, not + # the full request. A field will be overwritten if it is in the mask. If the + # user does not provide a mask then all fields will be overwritten. + # @param agent_gateway [::Google::Cloud::NetworkServices::V1::AgentGateway, ::Hash] + # Required. Updated AgentGateway 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_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::UpdateAgentGatewayRequest.new + # + # # Call the update_agent_gateway method. + # result = client.update_agent_gateway 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_agent_gateway request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::UpdateAgentGatewayRequest + + # Converts hash 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_agent_gateway.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::NetworkServices::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_agent_gateway.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_agent_gateway.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @network_services_stub.update_agent_gateway request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a single AgentGateway. + # + # @overload delete_agent_gateway(request, options = nil) + # Pass arguments to `delete_agent_gateway` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::DeleteAgentGatewayRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::DeleteAgentGatewayRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_agent_gateway(name: nil, etag: nil) + # Pass arguments to `delete_agent_gateway` via keyword arguments. Note that at + # least one keyword argument is 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. A name of the AgentGateway to delete. Must be in the format + # `projects/*/locations/*/agentGateways/*`. + # @param etag [::String] + # Optional. The etag of the AgentGateway to delete. + # @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_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::DeleteAgentGatewayRequest.new + # + # # Call the delete_agent_gateway method. + # result = client.delete_agent_gateway 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_agent_gateway request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::DeleteAgentGatewayRequest + + # Converts hash 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_agent_gateway.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::NetworkServices::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_agent_gateway.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_agent_gateway.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @network_services_stub.delete_agent_gateway 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 NetworkServices REST API. + # + # This class represents the configuration for NetworkServices 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::NetworkServices::V1::NetworkServices::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_endpoint_policies to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_endpoint_policies.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_endpoint_policies.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. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `: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 = "networkservices.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 NetworkServices 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. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_endpoint_policies` + # @return [::Gapic::Config::Method] + # + attr_reader :list_endpoint_policies + ## + # RPC-specific configuration for `get_endpoint_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :get_endpoint_policy + ## + # RPC-specific configuration for `create_endpoint_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :create_endpoint_policy + ## + # RPC-specific configuration for `update_endpoint_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :update_endpoint_policy + ## + # RPC-specific configuration for `delete_endpoint_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_endpoint_policy + ## + # RPC-specific configuration for `list_wasm_plugin_versions` + # @return [::Gapic::Config::Method] + # + attr_reader :list_wasm_plugin_versions + ## + # RPC-specific configuration for `get_wasm_plugin_version` + # @return [::Gapic::Config::Method] + # + attr_reader :get_wasm_plugin_version + ## + # RPC-specific configuration for `create_wasm_plugin_version` + # @return [::Gapic::Config::Method] + # + attr_reader :create_wasm_plugin_version + ## + # RPC-specific configuration for `delete_wasm_plugin_version` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_wasm_plugin_version + ## + # RPC-specific configuration for `list_wasm_plugins` + # @return [::Gapic::Config::Method] + # + attr_reader :list_wasm_plugins + ## + # RPC-specific configuration for `get_wasm_plugin` + # @return [::Gapic::Config::Method] + # + attr_reader :get_wasm_plugin + ## + # RPC-specific configuration for `create_wasm_plugin` + # @return [::Gapic::Config::Method] + # + attr_reader :create_wasm_plugin + ## + # RPC-specific configuration for `update_wasm_plugin` + # @return [::Gapic::Config::Method] + # + attr_reader :update_wasm_plugin + ## + # RPC-specific configuration for `delete_wasm_plugin` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_wasm_plugin + ## + # RPC-specific configuration for `list_gateways` + # @return [::Gapic::Config::Method] + # + attr_reader :list_gateways + ## + # RPC-specific configuration for `get_gateway` + # @return [::Gapic::Config::Method] + # + attr_reader :get_gateway + ## + # RPC-specific configuration for `create_gateway` + # @return [::Gapic::Config::Method] + # + attr_reader :create_gateway + ## + # RPC-specific configuration for `update_gateway` + # @return [::Gapic::Config::Method] + # + attr_reader :update_gateway + ## + # RPC-specific configuration for `delete_gateway` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_gateway + ## + # RPC-specific configuration for `list_grpc_routes` + # @return [::Gapic::Config::Method] + # + attr_reader :list_grpc_routes + ## + # RPC-specific configuration for `get_grpc_route` + # @return [::Gapic::Config::Method] + # + attr_reader :get_grpc_route + ## + # RPC-specific configuration for `create_grpc_route` + # @return [::Gapic::Config::Method] + # + attr_reader :create_grpc_route + ## + # RPC-specific configuration for `update_grpc_route` + # @return [::Gapic::Config::Method] + # + attr_reader :update_grpc_route + ## + # RPC-specific configuration for `delete_grpc_route` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_grpc_route + ## + # RPC-specific configuration for `list_http_routes` + # @return [::Gapic::Config::Method] + # + attr_reader :list_http_routes + ## + # RPC-specific configuration for `get_http_route` + # @return [::Gapic::Config::Method] + # + attr_reader :get_http_route + ## + # RPC-specific configuration for `create_http_route` + # @return [::Gapic::Config::Method] + # + attr_reader :create_http_route + ## + # RPC-specific configuration for `update_http_route` + # @return [::Gapic::Config::Method] + # + attr_reader :update_http_route + ## + # RPC-specific configuration for `delete_http_route` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_http_route + ## + # RPC-specific configuration for `list_tcp_routes` + # @return [::Gapic::Config::Method] + # + attr_reader :list_tcp_routes + ## + # RPC-specific configuration for `get_tcp_route` + # @return [::Gapic::Config::Method] + # + attr_reader :get_tcp_route + ## + # RPC-specific configuration for `create_tcp_route` + # @return [::Gapic::Config::Method] + # + attr_reader :create_tcp_route + ## + # RPC-specific configuration for `update_tcp_route` + # @return [::Gapic::Config::Method] + # + attr_reader :update_tcp_route + ## + # RPC-specific configuration for `delete_tcp_route` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_tcp_route + ## + # RPC-specific configuration for `list_tls_routes` + # @return [::Gapic::Config::Method] + # + attr_reader :list_tls_routes + ## + # RPC-specific configuration for `get_tls_route` + # @return [::Gapic::Config::Method] + # + attr_reader :get_tls_route + ## + # RPC-specific configuration for `create_tls_route` + # @return [::Gapic::Config::Method] + # + attr_reader :create_tls_route + ## + # RPC-specific configuration for `update_tls_route` + # @return [::Gapic::Config::Method] + # + attr_reader :update_tls_route + ## + # RPC-specific configuration for `delete_tls_route` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_tls_route + ## + # RPC-specific configuration for `list_service_bindings` + # @return [::Gapic::Config::Method] + # + attr_reader :list_service_bindings + ## + # RPC-specific configuration for `get_service_binding` + # @return [::Gapic::Config::Method] + # + attr_reader :get_service_binding + ## + # RPC-specific configuration for `create_service_binding` + # @return [::Gapic::Config::Method] + # + attr_reader :create_service_binding + ## + # RPC-specific configuration for `update_service_binding` + # @return [::Gapic::Config::Method] + # + attr_reader :update_service_binding + ## + # RPC-specific configuration for `delete_service_binding` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_service_binding + ## + # RPC-specific configuration for `list_meshes` + # @return [::Gapic::Config::Method] + # + attr_reader :list_meshes + ## + # RPC-specific configuration for `get_mesh` + # @return [::Gapic::Config::Method] + # + attr_reader :get_mesh + ## + # RPC-specific configuration for `create_mesh` + # @return [::Gapic::Config::Method] + # + attr_reader :create_mesh + ## + # RPC-specific configuration for `update_mesh` + # @return [::Gapic::Config::Method] + # + attr_reader :update_mesh + ## + # RPC-specific configuration for `delete_mesh` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_mesh + ## + # RPC-specific configuration for `list_service_lb_policies` + # @return [::Gapic::Config::Method] + # + attr_reader :list_service_lb_policies + ## + # RPC-specific configuration for `get_service_lb_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :get_service_lb_policy + ## + # RPC-specific configuration for `create_service_lb_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :create_service_lb_policy + ## + # RPC-specific configuration for `update_service_lb_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :update_service_lb_policy + ## + # RPC-specific configuration for `delete_service_lb_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_service_lb_policy + ## + # RPC-specific configuration for `get_gateway_route_view` + # @return [::Gapic::Config::Method] + # + attr_reader :get_gateway_route_view + ## + # RPC-specific configuration for `get_mesh_route_view` + # @return [::Gapic::Config::Method] + # + attr_reader :get_mesh_route_view + ## + # RPC-specific configuration for `list_gateway_route_views` + # @return [::Gapic::Config::Method] + # + attr_reader :list_gateway_route_views + ## + # RPC-specific configuration for `list_mesh_route_views` + # @return [::Gapic::Config::Method] + # + attr_reader :list_mesh_route_views + ## + # RPC-specific configuration for `list_agent_gateways` + # @return [::Gapic::Config::Method] + # + attr_reader :list_agent_gateways + ## + # RPC-specific configuration for `get_agent_gateway` + # @return [::Gapic::Config::Method] + # + attr_reader :get_agent_gateway + ## + # RPC-specific configuration for `create_agent_gateway` + # @return [::Gapic::Config::Method] + # + attr_reader :create_agent_gateway + ## + # RPC-specific configuration for `update_agent_gateway` + # @return [::Gapic::Config::Method] + # + attr_reader :update_agent_gateway + ## + # RPC-specific configuration for `delete_agent_gateway` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_agent_gateway + + # @private + def initialize parent_rpcs = nil + list_endpoint_policies_config = parent_rpcs.list_endpoint_policies if parent_rpcs.respond_to? :list_endpoint_policies + @list_endpoint_policies = ::Gapic::Config::Method.new list_endpoint_policies_config + get_endpoint_policy_config = parent_rpcs.get_endpoint_policy if parent_rpcs.respond_to? :get_endpoint_policy + @get_endpoint_policy = ::Gapic::Config::Method.new get_endpoint_policy_config + create_endpoint_policy_config = parent_rpcs.create_endpoint_policy if parent_rpcs.respond_to? :create_endpoint_policy + @create_endpoint_policy = ::Gapic::Config::Method.new create_endpoint_policy_config + update_endpoint_policy_config = parent_rpcs.update_endpoint_policy if parent_rpcs.respond_to? :update_endpoint_policy + @update_endpoint_policy = ::Gapic::Config::Method.new update_endpoint_policy_config + delete_endpoint_policy_config = parent_rpcs.delete_endpoint_policy if parent_rpcs.respond_to? :delete_endpoint_policy + @delete_endpoint_policy = ::Gapic::Config::Method.new delete_endpoint_policy_config + list_wasm_plugin_versions_config = parent_rpcs.list_wasm_plugin_versions if parent_rpcs.respond_to? :list_wasm_plugin_versions + @list_wasm_plugin_versions = ::Gapic::Config::Method.new list_wasm_plugin_versions_config + get_wasm_plugin_version_config = parent_rpcs.get_wasm_plugin_version if parent_rpcs.respond_to? :get_wasm_plugin_version + @get_wasm_plugin_version = ::Gapic::Config::Method.new get_wasm_plugin_version_config + create_wasm_plugin_version_config = parent_rpcs.create_wasm_plugin_version if parent_rpcs.respond_to? :create_wasm_plugin_version + @create_wasm_plugin_version = ::Gapic::Config::Method.new create_wasm_plugin_version_config + delete_wasm_plugin_version_config = parent_rpcs.delete_wasm_plugin_version if parent_rpcs.respond_to? :delete_wasm_plugin_version + @delete_wasm_plugin_version = ::Gapic::Config::Method.new delete_wasm_plugin_version_config + list_wasm_plugins_config = parent_rpcs.list_wasm_plugins if parent_rpcs.respond_to? :list_wasm_plugins + @list_wasm_plugins = ::Gapic::Config::Method.new list_wasm_plugins_config + get_wasm_plugin_config = parent_rpcs.get_wasm_plugin if parent_rpcs.respond_to? :get_wasm_plugin + @get_wasm_plugin = ::Gapic::Config::Method.new get_wasm_plugin_config + create_wasm_plugin_config = parent_rpcs.create_wasm_plugin if parent_rpcs.respond_to? :create_wasm_plugin + @create_wasm_plugin = ::Gapic::Config::Method.new create_wasm_plugin_config + update_wasm_plugin_config = parent_rpcs.update_wasm_plugin if parent_rpcs.respond_to? :update_wasm_plugin + @update_wasm_plugin = ::Gapic::Config::Method.new update_wasm_plugin_config + delete_wasm_plugin_config = parent_rpcs.delete_wasm_plugin if parent_rpcs.respond_to? :delete_wasm_plugin + @delete_wasm_plugin = ::Gapic::Config::Method.new delete_wasm_plugin_config + list_gateways_config = parent_rpcs.list_gateways if parent_rpcs.respond_to? :list_gateways + @list_gateways = ::Gapic::Config::Method.new list_gateways_config + get_gateway_config = parent_rpcs.get_gateway if parent_rpcs.respond_to? :get_gateway + @get_gateway = ::Gapic::Config::Method.new get_gateway_config + create_gateway_config = parent_rpcs.create_gateway if parent_rpcs.respond_to? :create_gateway + @create_gateway = ::Gapic::Config::Method.new create_gateway_config + update_gateway_config = parent_rpcs.update_gateway if parent_rpcs.respond_to? :update_gateway + @update_gateway = ::Gapic::Config::Method.new update_gateway_config + delete_gateway_config = parent_rpcs.delete_gateway if parent_rpcs.respond_to? :delete_gateway + @delete_gateway = ::Gapic::Config::Method.new delete_gateway_config + list_grpc_routes_config = parent_rpcs.list_grpc_routes if parent_rpcs.respond_to? :list_grpc_routes + @list_grpc_routes = ::Gapic::Config::Method.new list_grpc_routes_config + get_grpc_route_config = parent_rpcs.get_grpc_route if parent_rpcs.respond_to? :get_grpc_route + @get_grpc_route = ::Gapic::Config::Method.new get_grpc_route_config + create_grpc_route_config = parent_rpcs.create_grpc_route if parent_rpcs.respond_to? :create_grpc_route + @create_grpc_route = ::Gapic::Config::Method.new create_grpc_route_config + update_grpc_route_config = parent_rpcs.update_grpc_route if parent_rpcs.respond_to? :update_grpc_route + @update_grpc_route = ::Gapic::Config::Method.new update_grpc_route_config + delete_grpc_route_config = parent_rpcs.delete_grpc_route if parent_rpcs.respond_to? :delete_grpc_route + @delete_grpc_route = ::Gapic::Config::Method.new delete_grpc_route_config + list_http_routes_config = parent_rpcs.list_http_routes if parent_rpcs.respond_to? :list_http_routes + @list_http_routes = ::Gapic::Config::Method.new list_http_routes_config + get_http_route_config = parent_rpcs.get_http_route if parent_rpcs.respond_to? :get_http_route + @get_http_route = ::Gapic::Config::Method.new get_http_route_config + create_http_route_config = parent_rpcs.create_http_route if parent_rpcs.respond_to? :create_http_route + @create_http_route = ::Gapic::Config::Method.new create_http_route_config + update_http_route_config = parent_rpcs.update_http_route if parent_rpcs.respond_to? :update_http_route + @update_http_route = ::Gapic::Config::Method.new update_http_route_config + delete_http_route_config = parent_rpcs.delete_http_route if parent_rpcs.respond_to? :delete_http_route + @delete_http_route = ::Gapic::Config::Method.new delete_http_route_config + list_tcp_routes_config = parent_rpcs.list_tcp_routes if parent_rpcs.respond_to? :list_tcp_routes + @list_tcp_routes = ::Gapic::Config::Method.new list_tcp_routes_config + get_tcp_route_config = parent_rpcs.get_tcp_route if parent_rpcs.respond_to? :get_tcp_route + @get_tcp_route = ::Gapic::Config::Method.new get_tcp_route_config + create_tcp_route_config = parent_rpcs.create_tcp_route if parent_rpcs.respond_to? :create_tcp_route + @create_tcp_route = ::Gapic::Config::Method.new create_tcp_route_config + update_tcp_route_config = parent_rpcs.update_tcp_route if parent_rpcs.respond_to? :update_tcp_route + @update_tcp_route = ::Gapic::Config::Method.new update_tcp_route_config + delete_tcp_route_config = parent_rpcs.delete_tcp_route if parent_rpcs.respond_to? :delete_tcp_route + @delete_tcp_route = ::Gapic::Config::Method.new delete_tcp_route_config + list_tls_routes_config = parent_rpcs.list_tls_routes if parent_rpcs.respond_to? :list_tls_routes + @list_tls_routes = ::Gapic::Config::Method.new list_tls_routes_config + get_tls_route_config = parent_rpcs.get_tls_route if parent_rpcs.respond_to? :get_tls_route + @get_tls_route = ::Gapic::Config::Method.new get_tls_route_config + create_tls_route_config = parent_rpcs.create_tls_route if parent_rpcs.respond_to? :create_tls_route + @create_tls_route = ::Gapic::Config::Method.new create_tls_route_config + update_tls_route_config = parent_rpcs.update_tls_route if parent_rpcs.respond_to? :update_tls_route + @update_tls_route = ::Gapic::Config::Method.new update_tls_route_config + delete_tls_route_config = parent_rpcs.delete_tls_route if parent_rpcs.respond_to? :delete_tls_route + @delete_tls_route = ::Gapic::Config::Method.new delete_tls_route_config + list_service_bindings_config = parent_rpcs.list_service_bindings if parent_rpcs.respond_to? :list_service_bindings + @list_service_bindings = ::Gapic::Config::Method.new list_service_bindings_config + get_service_binding_config = parent_rpcs.get_service_binding if parent_rpcs.respond_to? :get_service_binding + @get_service_binding = ::Gapic::Config::Method.new get_service_binding_config + create_service_binding_config = parent_rpcs.create_service_binding if parent_rpcs.respond_to? :create_service_binding + @create_service_binding = ::Gapic::Config::Method.new create_service_binding_config + update_service_binding_config = parent_rpcs.update_service_binding if parent_rpcs.respond_to? :update_service_binding + @update_service_binding = ::Gapic::Config::Method.new update_service_binding_config + delete_service_binding_config = parent_rpcs.delete_service_binding if parent_rpcs.respond_to? :delete_service_binding + @delete_service_binding = ::Gapic::Config::Method.new delete_service_binding_config + list_meshes_config = parent_rpcs.list_meshes if parent_rpcs.respond_to? :list_meshes + @list_meshes = ::Gapic::Config::Method.new list_meshes_config + get_mesh_config = parent_rpcs.get_mesh if parent_rpcs.respond_to? :get_mesh + @get_mesh = ::Gapic::Config::Method.new get_mesh_config + create_mesh_config = parent_rpcs.create_mesh if parent_rpcs.respond_to? :create_mesh + @create_mesh = ::Gapic::Config::Method.new create_mesh_config + update_mesh_config = parent_rpcs.update_mesh if parent_rpcs.respond_to? :update_mesh + @update_mesh = ::Gapic::Config::Method.new update_mesh_config + delete_mesh_config = parent_rpcs.delete_mesh if parent_rpcs.respond_to? :delete_mesh + @delete_mesh = ::Gapic::Config::Method.new delete_mesh_config + list_service_lb_policies_config = parent_rpcs.list_service_lb_policies if parent_rpcs.respond_to? :list_service_lb_policies + @list_service_lb_policies = ::Gapic::Config::Method.new list_service_lb_policies_config + get_service_lb_policy_config = parent_rpcs.get_service_lb_policy if parent_rpcs.respond_to? :get_service_lb_policy + @get_service_lb_policy = ::Gapic::Config::Method.new get_service_lb_policy_config + create_service_lb_policy_config = parent_rpcs.create_service_lb_policy if parent_rpcs.respond_to? :create_service_lb_policy + @create_service_lb_policy = ::Gapic::Config::Method.new create_service_lb_policy_config + update_service_lb_policy_config = parent_rpcs.update_service_lb_policy if parent_rpcs.respond_to? :update_service_lb_policy + @update_service_lb_policy = ::Gapic::Config::Method.new update_service_lb_policy_config + delete_service_lb_policy_config = parent_rpcs.delete_service_lb_policy if parent_rpcs.respond_to? :delete_service_lb_policy + @delete_service_lb_policy = ::Gapic::Config::Method.new delete_service_lb_policy_config + get_gateway_route_view_config = parent_rpcs.get_gateway_route_view if parent_rpcs.respond_to? :get_gateway_route_view + @get_gateway_route_view = ::Gapic::Config::Method.new get_gateway_route_view_config + get_mesh_route_view_config = parent_rpcs.get_mesh_route_view if parent_rpcs.respond_to? :get_mesh_route_view + @get_mesh_route_view = ::Gapic::Config::Method.new get_mesh_route_view_config + list_gateway_route_views_config = parent_rpcs.list_gateway_route_views if parent_rpcs.respond_to? :list_gateway_route_views + @list_gateway_route_views = ::Gapic::Config::Method.new list_gateway_route_views_config + list_mesh_route_views_config = parent_rpcs.list_mesh_route_views if parent_rpcs.respond_to? :list_mesh_route_views + @list_mesh_route_views = ::Gapic::Config::Method.new list_mesh_route_views_config + list_agent_gateways_config = parent_rpcs.list_agent_gateways if parent_rpcs.respond_to? :list_agent_gateways + @list_agent_gateways = ::Gapic::Config::Method.new list_agent_gateways_config + get_agent_gateway_config = parent_rpcs.get_agent_gateway if parent_rpcs.respond_to? :get_agent_gateway + @get_agent_gateway = ::Gapic::Config::Method.new get_agent_gateway_config + create_agent_gateway_config = parent_rpcs.create_agent_gateway if parent_rpcs.respond_to? :create_agent_gateway + @create_agent_gateway = ::Gapic::Config::Method.new create_agent_gateway_config + update_agent_gateway_config = parent_rpcs.update_agent_gateway if parent_rpcs.respond_to? :update_agent_gateway + @update_agent_gateway = ::Gapic::Config::Method.new update_agent_gateway_config + delete_agent_gateway_config = parent_rpcs.delete_agent_gateway if parent_rpcs.respond_to? :delete_agent_gateway + @delete_agent_gateway = ::Gapic::Config::Method.new delete_agent_gateway_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_services-v1/lib/google/cloud/network_services/v1/network_services/rest/operations.rb b/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/network_services/rest/operations.rb new file mode 100644 index 000000000000..d15dfc0a95b5 --- /dev/null +++ b/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/network_services/rest/operations.rb @@ -0,0 +1,927 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 NetworkServices + module V1 + module NetworkServices + module Rest + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "networkservices.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the NetworkServices 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 NetworkServices 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::NetworkServices::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::NetworkServices::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::NetworkServices::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::NetworkServices::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. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `: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 = "networkservices.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. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_operations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_operations + ## + # RPC-specific configuration for `get_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_operation + ## + # RPC-specific configuration for `delete_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_operation + ## + # RPC-specific configuration for `cancel_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :cancel_operation + + # @private + def initialize parent_rpcs = nil + list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations + @list_operations = ::Gapic::Config::Method.new list_operations_config + get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation + @get_operation = ::Gapic::Config::Method.new get_operation_config + delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation + @delete_operation = ::Gapic::Config::Method.new delete_operation_config + cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation + @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config + + yield self if block_given? + end + end + end + end + + ## + # @private + # REST service stub for the Longrunning Operations API. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + class OperationsServiceStub + def initialize endpoint:, endpoint_template:, universe_domain:, credentials: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials + end + + ## + # Baseline implementation for the list_operations REST call + # + # @param request_pb [::Google::Longrunning::ListOperationsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::ListOperationsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::ListOperationsResponse] + # A result object deserialized from the server's reply + def list_operations request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_list_operations_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_operations", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::ListOperationsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_operation REST call + # + # @param request_pb [::Google::Longrunning::GetOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def get_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_get_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_operation REST call + # + # @param request_pb [::Google::Longrunning::DeleteOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def delete_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_delete_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the cancel_operation REST call + # + # @param request_pb [::Google::Longrunning::CancelOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def cancel_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_cancel_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "cancel_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # @private + # + # GRPC transcoding helper method for the list_operations REST call + # + # @param request_pb [::Google::Longrunning::ListOperationsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_operations_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}/operations", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_operation REST call + # + # @param request_pb [::Google::Longrunning::GetOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_operation REST call + # + # @param request_pb [::Google::Longrunning::DeleteOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the cancel_operation REST call + # + # @param request_pb [::Google::Longrunning::CancelOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_cancel_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:cancel", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/network_services/rest/service_stub.rb b/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/network_services/rest/service_stub.rb new file mode 100644 index 000000000000..573b572e8d03 --- /dev/null +++ b/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/network_services/rest/service_stub.rb @@ -0,0 +1,3947 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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/networkservices/v1/network_services_pb" + +module Google + module Cloud + module NetworkServices + module V1 + module NetworkServices + module Rest + ## + # REST service stub for the NetworkServices 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_endpoint_policies REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::ListEndpointPoliciesRequest] + # 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::NetworkServices::V1::ListEndpointPoliciesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::NetworkServices::V1::ListEndpointPoliciesResponse] + # A result object deserialized from the server's reply + def list_endpoint_policies request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_endpoint_policies_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_endpoint_policies", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::NetworkServices::V1::ListEndpointPoliciesResponse.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_endpoint_policy REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::GetEndpointPolicyRequest] + # 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::NetworkServices::V1::EndpointPolicy] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::NetworkServices::V1::EndpointPolicy] + # A result object deserialized from the server's reply + def get_endpoint_policy request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_endpoint_policy_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_endpoint_policy", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::NetworkServices::V1::EndpointPolicy.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_endpoint_policy REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::CreateEndpointPolicyRequest] + # 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_endpoint_policy request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_endpoint_policy_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_endpoint_policy", + 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_endpoint_policy REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::UpdateEndpointPolicyRequest] + # 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_endpoint_policy request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_endpoint_policy_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_endpoint_policy", + 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_endpoint_policy REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::DeleteEndpointPolicyRequest] + # 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_endpoint_policy request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_endpoint_policy_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_endpoint_policy", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_wasm_plugin_versions REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::ListWasmPluginVersionsRequest] + # 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::NetworkServices::V1::ListWasmPluginVersionsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::NetworkServices::V1::ListWasmPluginVersionsResponse] + # A result object deserialized from the server's reply + def list_wasm_plugin_versions request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_wasm_plugin_versions_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_wasm_plugin_versions", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::NetworkServices::V1::ListWasmPluginVersionsResponse.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_wasm_plugin_version REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::GetWasmPluginVersionRequest] + # 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::NetworkServices::V1::WasmPluginVersion] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::NetworkServices::V1::WasmPluginVersion] + # A result object deserialized from the server's reply + def get_wasm_plugin_version request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_wasm_plugin_version_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_wasm_plugin_version", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::NetworkServices::V1::WasmPluginVersion.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_wasm_plugin_version REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::CreateWasmPluginVersionRequest] + # 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_wasm_plugin_version request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_wasm_plugin_version_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_wasm_plugin_version", + 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_wasm_plugin_version REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::DeleteWasmPluginVersionRequest] + # 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_wasm_plugin_version request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_wasm_plugin_version_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_wasm_plugin_version", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_wasm_plugins REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::ListWasmPluginsRequest] + # 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::NetworkServices::V1::ListWasmPluginsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::NetworkServices::V1::ListWasmPluginsResponse] + # A result object deserialized from the server's reply + def list_wasm_plugins request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_wasm_plugins_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_wasm_plugins", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::NetworkServices::V1::ListWasmPluginsResponse.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_wasm_plugin REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::GetWasmPluginRequest] + # 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::NetworkServices::V1::WasmPlugin] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::NetworkServices::V1::WasmPlugin] + # A result object deserialized from the server's reply + def get_wasm_plugin request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_wasm_plugin_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_wasm_plugin", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::NetworkServices::V1::WasmPlugin.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_wasm_plugin REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::CreateWasmPluginRequest] + # 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_wasm_plugin request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_wasm_plugin_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_wasm_plugin", + 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_wasm_plugin REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::UpdateWasmPluginRequest] + # 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_wasm_plugin request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_wasm_plugin_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_wasm_plugin", + 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_wasm_plugin REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::DeleteWasmPluginRequest] + # 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_wasm_plugin request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_wasm_plugin_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_wasm_plugin", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_gateways REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::ListGatewaysRequest] + # 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::NetworkServices::V1::ListGatewaysResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::NetworkServices::V1::ListGatewaysResponse] + # A result object deserialized from the server's reply + def list_gateways request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_gateways_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_gateways", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::NetworkServices::V1::ListGatewaysResponse.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_gateway REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::GetGatewayRequest] + # 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::NetworkServices::V1::Gateway] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::NetworkServices::V1::Gateway] + # A result object deserialized from the server's reply + def get_gateway request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_gateway_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_gateway", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::NetworkServices::V1::Gateway.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_gateway REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::CreateGatewayRequest] + # 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_gateway request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_gateway_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_gateway", + 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_gateway REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::UpdateGatewayRequest] + # 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_gateway request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_gateway_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_gateway", + 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_gateway REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::DeleteGatewayRequest] + # 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_gateway request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_gateway_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_gateway", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_grpc_routes REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::ListGrpcRoutesRequest] + # 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::NetworkServices::V1::ListGrpcRoutesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::NetworkServices::V1::ListGrpcRoutesResponse] + # A result object deserialized from the server's reply + def list_grpc_routes request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_grpc_routes_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_grpc_routes", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::NetworkServices::V1::ListGrpcRoutesResponse.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_grpc_route REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::GetGrpcRouteRequest] + # 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::NetworkServices::V1::GrpcRoute] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::NetworkServices::V1::GrpcRoute] + # A result object deserialized from the server's reply + def get_grpc_route request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_grpc_route_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_grpc_route", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::NetworkServices::V1::GrpcRoute.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_grpc_route REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::CreateGrpcRouteRequest] + # 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_grpc_route request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_grpc_route_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_grpc_route", + 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_grpc_route REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::UpdateGrpcRouteRequest] + # 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_grpc_route request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_grpc_route_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_grpc_route", + 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_grpc_route REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::DeleteGrpcRouteRequest] + # 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_grpc_route request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_grpc_route_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_grpc_route", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_http_routes REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::ListHttpRoutesRequest] + # 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::NetworkServices::V1::ListHttpRoutesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::NetworkServices::V1::ListHttpRoutesResponse] + # A result object deserialized from the server's reply + def list_http_routes request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_http_routes_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_http_routes", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::NetworkServices::V1::ListHttpRoutesResponse.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_http_route REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::GetHttpRouteRequest] + # 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::NetworkServices::V1::HttpRoute] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::NetworkServices::V1::HttpRoute] + # A result object deserialized from the server's reply + def get_http_route request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_http_route_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_http_route", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::NetworkServices::V1::HttpRoute.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_http_route REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::CreateHttpRouteRequest] + # 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_http_route request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_http_route_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_http_route", + 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_http_route REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::UpdateHttpRouteRequest] + # 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_http_route request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_http_route_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_http_route", + 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_http_route REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::DeleteHttpRouteRequest] + # 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_http_route request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_http_route_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_http_route", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_tcp_routes REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::ListTcpRoutesRequest] + # 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::NetworkServices::V1::ListTcpRoutesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::NetworkServices::V1::ListTcpRoutesResponse] + # A result object deserialized from the server's reply + def list_tcp_routes request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_tcp_routes_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_tcp_routes", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::NetworkServices::V1::ListTcpRoutesResponse.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_tcp_route REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::GetTcpRouteRequest] + # 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::NetworkServices::V1::TcpRoute] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::NetworkServices::V1::TcpRoute] + # A result object deserialized from the server's reply + def get_tcp_route request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_tcp_route_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_tcp_route", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::NetworkServices::V1::TcpRoute.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_tcp_route REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::CreateTcpRouteRequest] + # 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_tcp_route request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_tcp_route_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_tcp_route", + 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_tcp_route REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::UpdateTcpRouteRequest] + # 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_tcp_route request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_tcp_route_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_tcp_route", + 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_tcp_route REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::DeleteTcpRouteRequest] + # 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_tcp_route request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_tcp_route_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_tcp_route", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_tls_routes REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::ListTlsRoutesRequest] + # 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::NetworkServices::V1::ListTlsRoutesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::NetworkServices::V1::ListTlsRoutesResponse] + # A result object deserialized from the server's reply + def list_tls_routes request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_tls_routes_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_tls_routes", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::NetworkServices::V1::ListTlsRoutesResponse.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_tls_route REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::GetTlsRouteRequest] + # 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::NetworkServices::V1::TlsRoute] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::NetworkServices::V1::TlsRoute] + # A result object deserialized from the server's reply + def get_tls_route request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_tls_route_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_tls_route", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::NetworkServices::V1::TlsRoute.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_tls_route REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::CreateTlsRouteRequest] + # 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_tls_route request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_tls_route_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_tls_route", + 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_tls_route REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::UpdateTlsRouteRequest] + # 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_tls_route request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_tls_route_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_tls_route", + 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_tls_route REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::DeleteTlsRouteRequest] + # 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_tls_route request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_tls_route_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_tls_route", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_service_bindings REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::ListServiceBindingsRequest] + # 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::NetworkServices::V1::ListServiceBindingsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::NetworkServices::V1::ListServiceBindingsResponse] + # A result object deserialized from the server's reply + def list_service_bindings request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_service_bindings_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_service_bindings", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::NetworkServices::V1::ListServiceBindingsResponse.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_service_binding REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::GetServiceBindingRequest] + # 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::NetworkServices::V1::ServiceBinding] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::NetworkServices::V1::ServiceBinding] + # A result object deserialized from the server's reply + def get_service_binding request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_service_binding_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_service_binding", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::NetworkServices::V1::ServiceBinding.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_service_binding REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::CreateServiceBindingRequest] + # 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_service_binding request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_service_binding_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_service_binding", + 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_service_binding REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::UpdateServiceBindingRequest] + # 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_service_binding request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_service_binding_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_service_binding", + 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_service_binding REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::DeleteServiceBindingRequest] + # 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_service_binding request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_service_binding_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_service_binding", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_meshes REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::ListMeshesRequest] + # 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::NetworkServices::V1::ListMeshesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::NetworkServices::V1::ListMeshesResponse] + # A result object deserialized from the server's reply + def list_meshes request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_meshes_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_meshes", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::NetworkServices::V1::ListMeshesResponse.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_mesh REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::GetMeshRequest] + # 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::NetworkServices::V1::Mesh] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::NetworkServices::V1::Mesh] + # A result object deserialized from the server's reply + def get_mesh request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_mesh_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_mesh", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::NetworkServices::V1::Mesh.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_mesh REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::CreateMeshRequest] + # 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_mesh request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_mesh_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_mesh", + 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_mesh REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::UpdateMeshRequest] + # 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_mesh request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_mesh_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_mesh", + 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_mesh REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::DeleteMeshRequest] + # 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_mesh request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_mesh_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_mesh", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_service_lb_policies REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::ListServiceLbPoliciesRequest] + # 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::NetworkServices::V1::ListServiceLbPoliciesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::NetworkServices::V1::ListServiceLbPoliciesResponse] + # A result object deserialized from the server's reply + def list_service_lb_policies request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_service_lb_policies_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_service_lb_policies", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::NetworkServices::V1::ListServiceLbPoliciesResponse.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_service_lb_policy REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::GetServiceLbPolicyRequest] + # 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::NetworkServices::V1::ServiceLbPolicy] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::NetworkServices::V1::ServiceLbPolicy] + # A result object deserialized from the server's reply + def get_service_lb_policy request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_service_lb_policy_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_service_lb_policy", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::NetworkServices::V1::ServiceLbPolicy.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_service_lb_policy REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::CreateServiceLbPolicyRequest] + # 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_service_lb_policy request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_service_lb_policy_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_service_lb_policy", + 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_service_lb_policy REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::UpdateServiceLbPolicyRequest] + # 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_service_lb_policy request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_service_lb_policy_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_service_lb_policy", + 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_service_lb_policy REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::DeleteServiceLbPolicyRequest] + # 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_service_lb_policy request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_service_lb_policy_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_service_lb_policy", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_gateway_route_view REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::GetGatewayRouteViewRequest] + # 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::NetworkServices::V1::GatewayRouteView] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::NetworkServices::V1::GatewayRouteView] + # A result object deserialized from the server's reply + def get_gateway_route_view request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_gateway_route_view_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_gateway_route_view", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::NetworkServices::V1::GatewayRouteView.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_mesh_route_view REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::GetMeshRouteViewRequest] + # 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::NetworkServices::V1::MeshRouteView] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::NetworkServices::V1::MeshRouteView] + # A result object deserialized from the server's reply + def get_mesh_route_view request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_mesh_route_view_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_mesh_route_view", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::NetworkServices::V1::MeshRouteView.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_gateway_route_views REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::ListGatewayRouteViewsRequest] + # 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::NetworkServices::V1::ListGatewayRouteViewsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::NetworkServices::V1::ListGatewayRouteViewsResponse] + # A result object deserialized from the server's reply + def list_gateway_route_views request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_gateway_route_views_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_gateway_route_views", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::NetworkServices::V1::ListGatewayRouteViewsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_mesh_route_views REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::ListMeshRouteViewsRequest] + # 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::NetworkServices::V1::ListMeshRouteViewsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::NetworkServices::V1::ListMeshRouteViewsResponse] + # A result object deserialized from the server's reply + def list_mesh_route_views request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_mesh_route_views_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_mesh_route_views", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::NetworkServices::V1::ListMeshRouteViewsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_agent_gateways REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::ListAgentGatewaysRequest] + # 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::NetworkServices::V1::ListAgentGatewaysResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::NetworkServices::V1::ListAgentGatewaysResponse] + # A result object deserialized from the server's reply + def list_agent_gateways request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_agent_gateways_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_agent_gateways", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::NetworkServices::V1::ListAgentGatewaysResponse.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_agent_gateway REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::GetAgentGatewayRequest] + # 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::NetworkServices::V1::AgentGateway] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::NetworkServices::V1::AgentGateway] + # A result object deserialized from the server's reply + def get_agent_gateway request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_agent_gateway_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_agent_gateway", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::NetworkServices::V1::AgentGateway.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_agent_gateway REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::CreateAgentGatewayRequest] + # 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_agent_gateway request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_agent_gateway_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_agent_gateway", + 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_agent_gateway REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::UpdateAgentGatewayRequest] + # 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_agent_gateway request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_agent_gateway_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_agent_gateway", + 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_agent_gateway REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::DeleteAgentGatewayRequest] + # 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_agent_gateway request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_agent_gateway_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_agent_gateway", + 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_endpoint_policies REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::ListEndpointPoliciesRequest] + # 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_endpoint_policies_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/endpointPolicies", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_endpoint_policy REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::GetEndpointPolicyRequest] + # 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_endpoint_policy_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/endpointPolicies/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_endpoint_policy REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::CreateEndpointPolicyRequest] + # 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_endpoint_policy_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/endpointPolicies", + body: "endpoint_policy", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_endpoint_policy REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::UpdateEndpointPolicyRequest] + # 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_endpoint_policy_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{endpoint_policy.name}", + body: "endpoint_policy", + matches: [ + ["endpoint_policy.name", %r{^projects/[^/]+/locations/[^/]+/endpointPolicies/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_endpoint_policy REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::DeleteEndpointPolicyRequest] + # 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_endpoint_policy_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/endpointPolicies/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_wasm_plugin_versions REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::ListWasmPluginVersionsRequest] + # 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_wasm_plugin_versions_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/versions", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/wasmPlugins/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_wasm_plugin_version REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::GetWasmPluginVersionRequest] + # 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_wasm_plugin_version_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/wasmPlugins/[^/]+/versions/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_wasm_plugin_version REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::CreateWasmPluginVersionRequest] + # 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_wasm_plugin_version_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/versions", + body: "wasm_plugin_version", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/wasmPlugins/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_wasm_plugin_version REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::DeleteWasmPluginVersionRequest] + # 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_wasm_plugin_version_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/wasmPlugins/[^/]+/versions/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_wasm_plugins REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::ListWasmPluginsRequest] + # 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_wasm_plugins_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/wasmPlugins", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_wasm_plugin REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::GetWasmPluginRequest] + # 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_wasm_plugin_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/wasmPlugins/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_wasm_plugin REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::CreateWasmPluginRequest] + # 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_wasm_plugin_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/wasmPlugins", + body: "wasm_plugin", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_wasm_plugin REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::UpdateWasmPluginRequest] + # 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_wasm_plugin_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{wasm_plugin.name}", + body: "wasm_plugin", + matches: [ + ["wasm_plugin.name", %r{^projects/[^/]+/locations/[^/]+/wasmPlugins/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_wasm_plugin REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::DeleteWasmPluginRequest] + # 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_wasm_plugin_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/wasmPlugins/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_gateways REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::ListGatewaysRequest] + # 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_gateways_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/gateways", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_gateway REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::GetGatewayRequest] + # 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_gateway_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/gateways/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_gateway REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::CreateGatewayRequest] + # 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_gateway_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/gateways", + body: "gateway", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_gateway REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::UpdateGatewayRequest] + # 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_gateway_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{gateway.name}", + body: "gateway", + matches: [ + ["gateway.name", %r{^projects/[^/]+/locations/[^/]+/gateways/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_gateway REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::DeleteGatewayRequest] + # 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_gateway_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/gateways/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_grpc_routes REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::ListGrpcRoutesRequest] + # 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_grpc_routes_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/grpcRoutes", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_grpc_route REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::GetGrpcRouteRequest] + # 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_grpc_route_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/grpcRoutes/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_grpc_route REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::CreateGrpcRouteRequest] + # 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_grpc_route_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/grpcRoutes", + body: "grpc_route", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_grpc_route REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::UpdateGrpcRouteRequest] + # 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_grpc_route_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{grpc_route.name}", + body: "grpc_route", + matches: [ + ["grpc_route.name", %r{^projects/[^/]+/locations/[^/]+/grpcRoutes/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_grpc_route REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::DeleteGrpcRouteRequest] + # 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_grpc_route_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/grpcRoutes/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_http_routes REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::ListHttpRoutesRequest] + # 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_http_routes_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/httpRoutes", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_http_route REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::GetHttpRouteRequest] + # 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_http_route_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/httpRoutes/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_http_route REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::CreateHttpRouteRequest] + # 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_http_route_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/httpRoutes", + body: "http_route", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_http_route REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::UpdateHttpRouteRequest] + # 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_http_route_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{http_route.name}", + body: "http_route", + matches: [ + ["http_route.name", %r{^projects/[^/]+/locations/[^/]+/httpRoutes/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_http_route REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::DeleteHttpRouteRequest] + # 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_http_route_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/httpRoutes/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_tcp_routes REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::ListTcpRoutesRequest] + # 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_tcp_routes_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/tcpRoutes", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_tcp_route REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::GetTcpRouteRequest] + # 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_tcp_route_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/tcpRoutes/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_tcp_route REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::CreateTcpRouteRequest] + # 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_tcp_route_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/tcpRoutes", + body: "tcp_route", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_tcp_route REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::UpdateTcpRouteRequest] + # 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_tcp_route_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{tcp_route.name}", + body: "tcp_route", + matches: [ + ["tcp_route.name", %r{^projects/[^/]+/locations/[^/]+/tcpRoutes/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_tcp_route REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::DeleteTcpRouteRequest] + # 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_tcp_route_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/tcpRoutes/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_tls_routes REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::ListTlsRoutesRequest] + # 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_tls_routes_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/tlsRoutes", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_tls_route REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::GetTlsRouteRequest] + # 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_tls_route_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/tlsRoutes/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_tls_route REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::CreateTlsRouteRequest] + # 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_tls_route_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/tlsRoutes", + body: "tls_route", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_tls_route REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::UpdateTlsRouteRequest] + # 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_tls_route_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{tls_route.name}", + body: "tls_route", + matches: [ + ["tls_route.name", %r{^projects/[^/]+/locations/[^/]+/tlsRoutes/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_tls_route REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::DeleteTlsRouteRequest] + # 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_tls_route_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/tlsRoutes/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_service_bindings REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::ListServiceBindingsRequest] + # 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_service_bindings_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/serviceBindings", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_service_binding REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::GetServiceBindingRequest] + # 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_service_binding_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/serviceBindings/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_service_binding REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::CreateServiceBindingRequest] + # 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_service_binding_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/serviceBindings", + body: "service_binding", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_service_binding REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::UpdateServiceBindingRequest] + # 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_service_binding_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{service_binding.name}", + body: "service_binding", + matches: [ + ["service_binding.name", %r{^projects/[^/]+/locations/[^/]+/serviceBindings/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_service_binding REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::DeleteServiceBindingRequest] + # 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_service_binding_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/serviceBindings/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_meshes REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::ListMeshesRequest] + # 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_meshes_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/meshes", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_mesh REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::GetMeshRequest] + # 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_mesh_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/meshes/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_mesh REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::CreateMeshRequest] + # 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_mesh_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/meshes", + body: "mesh", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_mesh REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::UpdateMeshRequest] + # 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_mesh_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{mesh.name}", + body: "mesh", + matches: [ + ["mesh.name", %r{^projects/[^/]+/locations/[^/]+/meshes/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_mesh REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::DeleteMeshRequest] + # 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_mesh_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/meshes/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_service_lb_policies REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::ListServiceLbPoliciesRequest] + # 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_service_lb_policies_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/serviceLbPolicies", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_service_lb_policy REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::GetServiceLbPolicyRequest] + # 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_service_lb_policy_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/serviceLbPolicies/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_service_lb_policy REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::CreateServiceLbPolicyRequest] + # 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_service_lb_policy_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/serviceLbPolicies", + body: "service_lb_policy", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_service_lb_policy REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::UpdateServiceLbPolicyRequest] + # 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_service_lb_policy_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{service_lb_policy.name}", + body: "service_lb_policy", + matches: [ + ["service_lb_policy.name", %r{^projects/[^/]+/locations/[^/]+/serviceLbPolicies/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_service_lb_policy REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::DeleteServiceLbPolicyRequest] + # 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_service_lb_policy_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/serviceLbPolicies/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_gateway_route_view REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::GetGatewayRouteViewRequest] + # 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_gateway_route_view_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/gateways/[^/]+/routeViews/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_mesh_route_view REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::GetMeshRouteViewRequest] + # 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_mesh_route_view_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/meshes/[^/]+/routeViews/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_gateway_route_views REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::ListGatewayRouteViewsRequest] + # 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_gateway_route_views_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/routeViews", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/gateways/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_mesh_route_views REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::ListMeshRouteViewsRequest] + # 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_mesh_route_views_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/routeViews", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/meshes/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_agent_gateways REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::ListAgentGatewaysRequest] + # 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_agent_gateways_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/agentGateways", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_agent_gateway REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::GetAgentGatewayRequest] + # 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_agent_gateway_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/agentGateways/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_agent_gateway REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::CreateAgentGatewayRequest] + # 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_agent_gateway_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/agentGateways", + body: "agent_gateway", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_agent_gateway REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::UpdateAgentGatewayRequest] + # 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_agent_gateway_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{agent_gateway.name}", + body: "agent_gateway", + matches: [ + ["agent_gateway.name", %r{^projects/[^/]+/locations/[^/]+/agentGateways/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_agent_gateway REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::DeleteAgentGatewayRequest] + # 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_agent_gateway_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/agentGateways/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/rest.rb b/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/rest.rb new file mode 100644 index 000000000000..d1fd99053120 --- /dev/null +++ b/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/rest.rb @@ -0,0 +1,39 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/network_services/v1/dep_service/rest" +require "google/cloud/network_services/v1/network_services/rest" +require "google/cloud/network_services/v1/bindings_override" +require "google/cloud/network_services/v1/version" + +module Google + module Cloud + module NetworkServices + ## + # To load just the REST part of this package, including all its services, and instantiate a REST client: + # + # @example + # + # require "google/cloud/network_services/v1/rest" + # client = ::Google::Cloud::NetworkServices::V1::DepService::Rest::Client.new + # + module V1 + end + end + end +end diff --git a/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/version.rb b/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/version.rb new file mode 100644 index 000000000000..dc762e5120ec --- /dev/null +++ b/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/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 NetworkServices + module V1 + VERSION = "0.0.1" + end + end + end +end diff --git a/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/agent_gateway_pb.rb b/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/agent_gateway_pb.rb new file mode 100644 index 000000000000..f25b5dc1f198 --- /dev/null +++ b/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/agent_gateway_pb.rb @@ -0,0 +1,41 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/networkservices/v1/agent_gateway.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/field_mask_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n3google/cloud/networkservices/v1/agent_gateway.proto\x12\x1fgoogle.cloud.networkservices.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xbf\x0f\n\x0c\x41gentGateway\x12Z\n\x0egoogle_managed\x18\x08 \x01(\x0b\x32;.google.cloud.networkservices.v1.AgentGateway.GoogleManagedB\x03\xe0\x41\x01H\x00\x12V\n\x0cself_managed\x18\t \x01(\x0b\x32\x39.google.cloud.networkservices.v1.AgentGateway.SelfManagedB\x03\xe0\x41\x01H\x00\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12N\n\x06labels\x18\x04 \x03(\x0b\x32\x39.google.cloud.networkservices.v1.AgentGateway.LabelsEntryB\x03\xe0\x41\x01\x12\x18\n\x0b\x64\x65scription\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x11\n\x04\x65tag\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12P\n\tprotocols\x18\x0c \x03(\x0e\x32\x36.google.cloud.networkservices.v1.AgentGateway.ProtocolB\x05\x18\x01\xe0\x41\x01\x12\x17\n\nregistries\x18\r \x03(\tB\x03\xe0\x41\x01\x12X\n\x0enetwork_config\x18\n \x01(\x0b\x32;.google.cloud.networkservices.v1.AgentGateway.NetworkConfigB\x03\xe0\x41\x01\x12\x65\n\x12\x61gent_gateway_card\x18\x0b \x01(\x0b\x32\x44.google.cloud.networkservices.v1.AgentGateway.AgentGatewayOutputCardB\x03\xe0\x41\x03\x1a\xea\x01\n\rGoogleManaged\x12q\n\x14governed_access_path\x18\x01 \x01(\x0e\x32N.google.cloud.networkservices.v1.AgentGateway.GoogleManaged.GovernedAccessPathB\x03\xe0\x41\x01\"f\n\x12GovernedAccessPath\x12$\n GOVERNED_ACCESS_PATH_UNSPECIFIED\x10\x00\x12\x15\n\x11\x41GENT_TO_ANYWHERE\x10\x01\x12\x13\n\x0f\x43LIENT_TO_AGENT\x10\x02\x1a.\n\x0bSelfManaged\x12\x1f\n\x0cresource_uri\x18\x01 \x01(\tB\t\xe0\x41\x01\xfa\x41\x03\n\x01*\x1a\xa4\x04\n\rNetworkConfig\x12W\n\x06\x65gress\x18\x01 \x01(\x0b\x32\x42.google.cloud.networkservices.v1.AgentGateway.NetworkConfig.EgressB\x03\xe0\x41\x01\x12m\n\x12\x64ns_peering_config\x18\x02 \x01(\x0b\x32L.google.cloud.networkservices.v1.AgentGateway.NetworkConfig.DnsPeeringConfigB\x03\xe0\x41\x01\x1a\xc2\x01\n\x06\x45gress\x12\x1f\n\x12network_attachment\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12i\n\x0ctrust_config\x18\x02 \x01(\x0b\x32N.google.cloud.networkservices.v1.AgentGateway.NetworkConfig.Egress.TrustConfigB\x03\xe0\x41\x01\x1a,\n\x0bTrustConfig\x12\x1d\n\x10pem_certificates\x18\x01 \x03(\tB\x03\xe0\x41\x02\x1a\x85\x01\n\x10\x44nsPeeringConfig\x12\x14\n\x07\x64omains\x18\x01 \x03(\tB\x03\xe0\x41\x02\x12\x1b\n\x0etarget_project\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12>\n\x0etarget_network\x18\x03 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1e\x63ompute.googleapis.com/Network\x1a\x85\x01\n\x16\x41gentGatewayOutputCard\x12\x1a\n\rmtls_endpoint\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x1e\n\x11root_certificates\x18\x05 \x03(\tB\x03\xe0\x41\x03\x12/\n\"service_extensions_service_account\x18\x04 \x01(\tB\x03\xe0\x41\x03\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"-\n\x08Protocol\x12\x18\n\x14PROTOCOL_UNSPECIFIED\x10\x00\x12\x07\n\x03MCP\x10\x01:\x95\x01\xea\x41\x91\x01\n+networkservices.googleapis.com/AgentGateway\x12\x45projects/{project}/locations/{location}/agentGateways/{agent_gateway}*\ragentGateways2\x0c\x61gentGatewayB\x11\n\x0f\x64\x65ployment_mode\"\xb5\x01\n\x18ListAgentGatewaysRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\x12+networkservices.googleapis.com/AgentGateway\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12#\n\x16return_partial_success\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"\x90\x01\n\x19ListAgentGatewaysResponse\x12\x45\n\x0e\x61gent_gateways\x18\x01 \x03(\x0b\x32-.google.cloud.networkservices.v1.AgentGateway\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"[\n\x16GetAgentGatewayRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+networkservices.googleapis.com/AgentGateway\"\xca\x01\n\x19\x43reateAgentGatewayRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\x12+networkservices.googleapis.com/AgentGateway\x12\x1d\n\x10\x61gent_gateway_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12I\n\ragent_gateway\x18\x03 \x01(\x0b\x32-.google.cloud.networkservices.v1.AgentGatewayB\x03\xe0\x41\x02\"\x9c\x01\n\x19UpdateAgentGatewayRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x12I\n\ragent_gateway\x18\x02 \x01(\x0b\x32-.google.cloud.networkservices.v1.AgentGatewayB\x03\xe0\x41\x02\"q\n\x19\x44\x65leteAgentGatewayRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+networkservices.googleapis.com/AgentGateway\x12\x11\n\x04\x65tag\x18\x02 \x01(\tB\x03\xe0\x41\x01\x42\xf2\x01\n#com.google.cloud.networkservices.v1B\x11\x41gentGatewayProtoP\x01ZMcloud.google.com/go/networkservices/apiv1/networkservicespb;networkservicespb\xaa\x02\x1fGoogle.Cloud.NetworkServices.V1\xca\x02\x1fGoogle\\Cloud\\NetworkServices\\V1\xea\x02\"Google::Cloud::NetworkServices::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module NetworkServices + module V1 + AgentGateway = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.AgentGateway").msgclass + AgentGateway::GoogleManaged = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.AgentGateway.GoogleManaged").msgclass + AgentGateway::GoogleManaged::GovernedAccessPath = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.AgentGateway.GoogleManaged.GovernedAccessPath").enummodule + AgentGateway::SelfManaged = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.AgentGateway.SelfManaged").msgclass + AgentGateway::NetworkConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.AgentGateway.NetworkConfig").msgclass + AgentGateway::NetworkConfig::Egress = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.AgentGateway.NetworkConfig.Egress").msgclass + AgentGateway::NetworkConfig::Egress::TrustConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.AgentGateway.NetworkConfig.Egress.TrustConfig").msgclass + AgentGateway::NetworkConfig::DnsPeeringConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.AgentGateway.NetworkConfig.DnsPeeringConfig").msgclass + AgentGateway::AgentGatewayOutputCard = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.AgentGateway.AgentGatewayOutputCard").msgclass + AgentGateway::Protocol = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.AgentGateway.Protocol").enummodule + ListAgentGatewaysRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.ListAgentGatewaysRequest").msgclass + ListAgentGatewaysResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.ListAgentGatewaysResponse").msgclass + GetAgentGatewayRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.GetAgentGatewayRequest").msgclass + CreateAgentGatewayRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.CreateAgentGatewayRequest").msgclass + UpdateAgentGatewayRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.UpdateAgentGatewayRequest").msgclass + DeleteAgentGatewayRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.DeleteAgentGatewayRequest").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/common_pb.rb b/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/common_pb.rb new file mode 100644 index 000000000000..0265ca12a387 --- /dev/null +++ b/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/common_pb.rb @@ -0,0 +1,30 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/networkservices/v1/common.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n,google/cloud/networkservices/v1/common.proto\x12\x1fgoogle.cloud.networkservices.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x80\x02\n\x11OperationMetadata\x12\x34\n\x0b\x63reate_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x31\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x13\n\x06target\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x11\n\x04verb\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\x1b\n\x0estatus_message\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12#\n\x16requested_cancellation\x18\x06 \x01(\x08\x42\x03\xe0\x41\x03\x12\x18\n\x0b\x61pi_version\x18\x07 \x01(\tB\x03\xe0\x41\x03\")\n\x13TrafficPortSelector\x12\x12\n\x05ports\x18\x01 \x03(\tB\x03\xe0\x41\x01\"\xcc\x04\n\x0f\x45ndpointMatcher\x12g\n\x16metadata_label_matcher\x18\x01 \x01(\x0b\x32\x45.google.cloud.networkservices.v1.EndpointMatcher.MetadataLabelMatcherH\x00\x1a\xbf\x03\n\x14MetadataLabelMatcher\x12\x87\x01\n\x1dmetadata_label_match_criteria\x18\x01 \x01(\x0e\x32`.google.cloud.networkservices.v1.EndpointMatcher.MetadataLabelMatcher.MetadataLabelMatchCriteria\x12m\n\x0fmetadata_labels\x18\x02 \x03(\x0b\x32T.google.cloud.networkservices.v1.EndpointMatcher.MetadataLabelMatcher.MetadataLabels\x1a\x43\n\x0eMetadataLabels\x12\x17\n\nlabel_name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0blabel_value\x18\x02 \x01(\tB\x03\xe0\x41\x02\"i\n\x1aMetadataLabelMatchCriteria\x12-\n)METADATA_LABEL_MATCH_CRITERIA_UNSPECIFIED\x10\x00\x12\r\n\tMATCH_ANY\x10\x01\x12\r\n\tMATCH_ALL\x10\x02\x42\x0e\n\x0cmatcher_type*J\n\x0c\x45nvoyHeaders\x12\x1d\n\x19\x45NVOY_HEADERS_UNSPECIFIED\x10\x00\x12\x08\n\x04NONE\x10\x01\x12\x11\n\rDEBUG_HEADERS\x10\x02\x42\xec\x01\n#com.google.cloud.networkservices.v1B\x0b\x43ommonProtoP\x01ZMcloud.google.com/go/networkservices/apiv1/networkservicespb;networkservicespb\xaa\x02\x1fGoogle.Cloud.NetworkServices.V1\xca\x02\x1fGoogle\\Cloud\\NetworkServices\\V1\xea\x02\"Google::Cloud::NetworkServices::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module NetworkServices + module V1 + OperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.OperationMetadata").msgclass + TrafficPortSelector = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.TrafficPortSelector").msgclass + EndpointMatcher = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.EndpointMatcher").msgclass + EndpointMatcher::MetadataLabelMatcher = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.EndpointMatcher.MetadataLabelMatcher").msgclass + EndpointMatcher::MetadataLabelMatcher::MetadataLabels = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.EndpointMatcher.MetadataLabelMatcher.MetadataLabels").msgclass + EndpointMatcher::MetadataLabelMatcher::MetadataLabelMatchCriteria = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.EndpointMatcher.MetadataLabelMatcher.MetadataLabelMatchCriteria").enummodule + EnvoyHeaders = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.EnvoyHeaders").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/dep_pb.rb b/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/dep_pb.rb new file mode 100644 index 000000000000..189ed93ceeaf --- /dev/null +++ b/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/dep_pb.rb @@ -0,0 +1,68 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/networkservices/v1/dep.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/field_info_pb' +require 'google/api/resource_pb' +require 'google/cloud/networkservices/v1/common_pb' +require 'google/longrunning/operations_pb' +require 'google/protobuf/duration_pb' +require 'google/protobuf/empty_pb' +require 'google/protobuf/field_mask_pb' +require 'google/protobuf/struct_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n)google/cloud/networkservices/v1/dep.proto\x12\x1fgoogle.cloud.networkservices.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1bgoogle/api/field_info.proto\x1a\x19google/api/resource.proto\x1a,google/cloud/networkservices/v1/common.proto\x1a#google/longrunning/operations.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xa0\x06\n\x0e\x45xtensionChain\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\\\n\x0fmatch_condition\x18\x02 \x01(\x0b\x32>.google.cloud.networkservices.v1.ExtensionChain.MatchConditionB\x03\xe0\x41\x02\x12R\n\nextensions\x18\x03 \x03(\x0b\x32\x39.google.cloud.networkservices.v1.ExtensionChain.ExtensionB\x03\xe0\x41\x02\x1a-\n\x0eMatchCondition\x12\x1b\n\x0e\x63\x65l_expression\x18\x01 \x01(\tB\x03\xe0\x41\x02\x1a\x99\x04\n\tExtension\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tauthority\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x14\n\x07service\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12I\n\x10supported_events\x18\x04 \x03(\x0e\x32*.google.cloud.networkservices.v1.EventTypeB\x03\xe0\x41\x01\x12/\n\x07timeout\x18\x05 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x01\x12\x16\n\tfail_open\x18\x06 \x01(\x08\x42\x03\xe0\x41\x01\x12\x1c\n\x0f\x66orward_headers\x18\x07 \x03(\tB\x03\xe0\x41\x01\x12\x1f\n\x12\x66orward_attributes\x18\x08 \x03(\tB\x03\xe0\x41\x01\x12.\n\x08metadata\x18\t \x01(\x0b\x32\x17.google.protobuf.StructB\x03\xe0\x41\x01\x12R\n\x16request_body_send_mode\x18\x0e \x01(\x0e\x32-.google.cloud.networkservices.v1.BodySendModeB\x03\xe0\x41\x01\x12S\n\x17response_body_send_mode\x18\x0f \x01(\x0e\x32-.google.cloud.networkservices.v1.BodySendModeB\x03\xe0\x41\x01\x12\x1f\n\x12observability_mode\x18\x10 \x01(\x08\x42\x03\xe0\x41\x01\"\xe5\x05\n\x12LbTrafficExtension\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x08\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\t \x01(\tB\x03\xe0\x41\x01\x12T\n\x06labels\x18\x04 \x03(\x0b\x32?.google.cloud.networkservices.v1.LbTrafficExtension.LabelsEntryB\x03\xe0\x41\x01\x12\x1d\n\x10\x66orwarding_rules\x18\x05 \x03(\tB\x03\xe0\x41\x01\x12N\n\x10\x65xtension_chains\x18\x07 \x03(\x0b\x32/.google.cloud.networkservices.v1.ExtensionChainB\x03\xe0\x41\x02\x12X\n\x15load_balancing_scheme\x18\x08 \x01(\x0e\x32\x34.google.cloud.networkservices.v1.LoadBalancingSchemeB\x03\xe0\x41\x02\x12.\n\x08metadata\x18\n \x01(\x0b\x32\x17.google.protobuf.StructB\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\xb4\x01\xea\x41\xb0\x01\n1networkservices.googleapis.com/LbTrafficExtension\x12Rprojects/{project}/locations/{location}/lbTrafficExtensions/{lb_traffic_extension}*\x13lbTrafficExtensions2\x12lbTrafficExtension\"\xc8\x01\n\x1eListLbTrafficExtensionsRequest\x12I\n\x06parent\x18\x01 \x01(\tB9\xe0\x41\x02\xfa\x41\x33\x12\x31networkservices.googleapis.com/LbTrafficExtension\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\xa3\x01\n\x1fListLbTrafficExtensionsResponse\x12R\n\x15lb_traffic_extensions\x18\x01 \x03(\x0b\x32\x33.google.cloud.networkservices.v1.LbTrafficExtension\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"g\n\x1cGetLbTrafficExtensionRequest\x12G\n\x04name\x18\x01 \x01(\tB9\xe0\x41\x02\xfa\x41\x33\n1networkservices.googleapis.com/LbTrafficExtension\"\x8b\x02\n\x1f\x43reateLbTrafficExtensionRequest\x12I\n\x06parent\x18\x01 \x01(\tB9\xe0\x41\x02\xfa\x41\x33\x12\x31networkservices.googleapis.com/LbTrafficExtension\x12$\n\x17lb_traffic_extension_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12V\n\x14lb_traffic_extension\x18\x03 \x01(\x0b\x32\x33.google.cloud.networkservices.v1.LbTrafficExtensionB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x04 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\xd0\x01\n\x1fUpdateLbTrafficExtensionRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x12V\n\x14lb_traffic_extension\x18\x02 \x01(\x0b\x32\x33.google.cloud.networkservices.v1.LbTrafficExtensionB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x03 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\x8b\x01\n\x1f\x44\x65leteLbTrafficExtensionRequest\x12G\n\x04name\x18\x01 \x01(\tB9\xe0\x41\x02\xfa\x41\x33\n1networkservices.googleapis.com/LbTrafficExtension\x12\x1f\n\nrequest_id\x18\x02 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\xd7\x05\n\x10LbRouteExtension\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x08\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\t \x01(\tB\x03\xe0\x41\x01\x12R\n\x06labels\x18\x04 \x03(\x0b\x32=.google.cloud.networkservices.v1.LbRouteExtension.LabelsEntryB\x03\xe0\x41\x01\x12\x1d\n\x10\x66orwarding_rules\x18\x05 \x03(\tB\x03\xe0\x41\x02\x12N\n\x10\x65xtension_chains\x18\x07 \x03(\x0b\x32/.google.cloud.networkservices.v1.ExtensionChainB\x03\xe0\x41\x02\x12X\n\x15load_balancing_scheme\x18\x08 \x01(\x0e\x32\x34.google.cloud.networkservices.v1.LoadBalancingSchemeB\x03\xe0\x41\x02\x12.\n\x08metadata\x18\n \x01(\x0b\x32\x17.google.protobuf.StructB\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\xaa\x01\xea\x41\xa6\x01\n/networkservices.googleapis.com/LbRouteExtension\x12Nprojects/{project}/locations/{location}/lbRouteExtensions/{lb_route_extension}*\x11lbRouteExtensions2\x10lbRouteExtension\"\xc4\x01\n\x1cListLbRouteExtensionsRequest\x12G\n\x06parent\x18\x01 \x01(\tB7\xe0\x41\x02\xfa\x41\x31\x12/networkservices.googleapis.com/LbRouteExtension\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x9d\x01\n\x1dListLbRouteExtensionsResponse\x12N\n\x13lb_route_extensions\x18\x01 \x03(\x0b\x32\x31.google.cloud.networkservices.v1.LbRouteExtension\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"c\n\x1aGetLbRouteExtensionRequest\x12\x45\n\x04name\x18\x01 \x01(\tB7\xe0\x41\x02\xfa\x41\x31\n/networkservices.googleapis.com/LbRouteExtension\"\x81\x02\n\x1d\x43reateLbRouteExtensionRequest\x12G\n\x06parent\x18\x01 \x01(\tB7\xe0\x41\x02\xfa\x41\x31\x12/networkservices.googleapis.com/LbRouteExtension\x12\"\n\x15lb_route_extension_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12R\n\x12lb_route_extension\x18\x03 \x01(\x0b\x32\x31.google.cloud.networkservices.v1.LbRouteExtensionB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x04 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\xca\x01\n\x1dUpdateLbRouteExtensionRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x12R\n\x12lb_route_extension\x18\x02 \x01(\x0b\x32\x31.google.cloud.networkservices.v1.LbRouteExtensionB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x03 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\x87\x01\n\x1d\x44\x65leteLbRouteExtensionRequest\x12\x45\n\x04name\x18\x01 \x01(\tB7\xe0\x41\x02\xfa\x41\x31\n/networkservices.googleapis.com/LbRouteExtension\x12\x1f\n\nrequest_id\x18\x02 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\xa0\x05\n\x0fLbEdgeExtension\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x08\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\t \x01(\tB\x03\xe0\x41\x01\x12Q\n\x06labels\x18\x04 \x03(\x0b\x32<.google.cloud.networkservices.v1.LbEdgeExtension.LabelsEntryB\x03\xe0\x41\x01\x12\x1d\n\x10\x66orwarding_rules\x18\x05 \x03(\tB\x03\xe0\x41\x02\x12N\n\x10\x65xtension_chains\x18\x06 \x03(\x0b\x32/.google.cloud.networkservices.v1.ExtensionChainB\x03\xe0\x41\x02\x12X\n\x15load_balancing_scheme\x18\x07 \x01(\x0e\x32\x34.google.cloud.networkservices.v1.LoadBalancingSchemeB\x03\xe0\x41\x02\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\xa5\x01\xea\x41\xa1\x01\n.networkservices.googleapis.com/LbEdgeExtension\x12Lprojects/{project}/locations/{location}/lbEdgeExtensions/{lb_edge_extension}*\x10lbEdgeExtensions2\x0flbEdgeExtension\"\xc2\x01\n\x1bListLbEdgeExtensionsRequest\x12\x46\n\x06parent\x18\x01 \x01(\tB6\xe0\x41\x02\xfa\x41\x30\x12.networkservices.googleapis.com/LbEdgeExtension\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x9a\x01\n\x1cListLbEdgeExtensionsResponse\x12L\n\x12lb_edge_extensions\x18\x01 \x03(\x0b\x32\x30.google.cloud.networkservices.v1.LbEdgeExtension\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"a\n\x19GetLbEdgeExtensionRequest\x12\x44\n\x04name\x18\x01 \x01(\tB6\xe0\x41\x02\xfa\x41\x30\n.networkservices.googleapis.com/LbEdgeExtension\"\xfc\x01\n\x1c\x43reateLbEdgeExtensionRequest\x12\x46\n\x06parent\x18\x01 \x01(\tB6\xe0\x41\x02\xfa\x41\x30\x12.networkservices.googleapis.com/LbEdgeExtension\x12!\n\x14lb_edge_extension_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12P\n\x11lb_edge_extension\x18\x03 \x01(\x0b\x32\x30.google.cloud.networkservices.v1.LbEdgeExtensionB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x04 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\xc7\x01\n\x1cUpdateLbEdgeExtensionRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x12P\n\x11lb_edge_extension\x18\x02 \x01(\x0b\x32\x30.google.cloud.networkservices.v1.LbEdgeExtensionB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x03 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\x85\x01\n\x1c\x44\x65leteLbEdgeExtensionRequest\x12\x44\n\x04name\x18\x01 \x01(\tB6\xe0\x41\x02\xfa\x41\x30\n.networkservices.googleapis.com/LbEdgeExtension\x12\x1f\n\nrequest_id\x18\x02 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\xd6\x06\n\x0e\x41uthzExtension\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x08\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12P\n\x06labels\x18\x05 \x03(\x0b\x32;.google.cloud.networkservices.v1.AuthzExtension.LabelsEntryB\x03\xe0\x41\x01\x12X\n\x15load_balancing_scheme\x18\x06 \x01(\x0e\x32\x34.google.cloud.networkservices.v1.LoadBalancingSchemeB\x03\xe0\x41\x01\x12\x16\n\tauthority\x18\x07 \x01(\tB\x03\xe0\x41\x01\x12\x14\n\x07service\x18\x08 \x01(\tB\x03\xe0\x41\x02\x12/\n\x07timeout\x18\t \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x02\x12\x16\n\tfail_open\x18\n \x01(\x08\x42\x03\xe0\x41\x01\x12.\n\x08metadata\x18\x0b \x01(\x0b\x32\x17.google.protobuf.StructB\x03\xe0\x41\x01\x12\x1c\n\x0f\x66orward_headers\x18\x0c \x03(\tB\x03\xe0\x41\x01\x12\x1f\n\x12\x66orward_attributes\x18\r \x03(\tB\x03\xe0\x41\x01\x12\x45\n\x0bwire_format\x18\x0e \x01(\x0e\x32+.google.cloud.networkservices.v1.WireFormatB\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\x9f\x01\xea\x41\x9b\x01\n-networkservices.googleapis.com/AuthzExtension\x12Iprojects/{project}/locations/{location}/authzExtensions/{authz_extension}*\x0f\x61uthzExtensions2\x0e\x61uthzExtension\"\xc0\x01\n\x1aListAuthzExtensionsRequest\x12\x45\n\x06parent\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\x12-networkservices.googleapis.com/AuthzExtension\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x96\x01\n\x1bListAuthzExtensionsResponse\x12I\n\x10\x61uthz_extensions\x18\x01 \x03(\x0b\x32/.google.cloud.networkservices.v1.AuthzExtension\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"_\n\x18GetAuthzExtensionRequest\x12\x43\n\x04name\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-networkservices.googleapis.com/AuthzExtension\"\xf5\x01\n\x1b\x43reateAuthzExtensionRequest\x12\x45\n\x06parent\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\x12-networkservices.googleapis.com/AuthzExtension\x12\x1f\n\x12\x61uthz_extension_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12M\n\x0f\x61uthz_extension\x18\x03 \x01(\x0b\x32/.google.cloud.networkservices.v1.AuthzExtensionB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x04 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\xc3\x01\n\x1bUpdateAuthzExtensionRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12M\n\x0f\x61uthz_extension\x18\x02 \x01(\x0b\x32/.google.cloud.networkservices.v1.AuthzExtensionB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x03 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\x83\x01\n\x1b\x44\x65leteAuthzExtensionRequest\x12\x43\n\x04name\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-networkservices.googleapis.com/AuthzExtension\x12\x1f\n\nrequest_id\x18\x02 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01*\xa4\x01\n\tEventType\x12\x1a\n\x16\x45VENT_TYPE_UNSPECIFIED\x10\x00\x12\x13\n\x0fREQUEST_HEADERS\x10\x01\x12\x10\n\x0cREQUEST_BODY\x10\x02\x12\x14\n\x10RESPONSE_HEADERS\x10\x03\x12\x11\n\rRESPONSE_BODY\x10\x04\x12\x14\n\x10REQUEST_TRAILERS\x10\x05\x12\x15\n\x11RESPONSE_TRAILERS\x10\x06*h\n\x13LoadBalancingScheme\x12%\n!LOAD_BALANCING_SCHEME_UNSPECIFIED\x10\x00\x12\x14\n\x10INTERNAL_MANAGED\x10\x01\x12\x14\n\x10\x45XTERNAL_MANAGED\x10\x02*P\n\nWireFormat\x12\x1b\n\x17WIRE_FORMAT_UNSPECIFIED\x10\x00\x12\x11\n\rEXT_PROC_GRPC\x10\x01\x12\x12\n\x0e\x45XT_AUTHZ_GRPC\x10\x03*t\n\x0c\x42odySendMode\x12\x1e\n\x1a\x42ODY_SEND_MODE_UNSPECIFIED\x10\x00\x12\x1b\n\x17\x42ODY_SEND_MODE_STREAMED\x10\x01\x12\'\n#BODY_SEND_MODE_FULL_DUPLEX_STREAMED\x10\x02\x32\xf9\'\n\nDepService\x12\xe6\x01\n\x17ListLbTrafficExtensions\x12?.google.cloud.networkservices.v1.ListLbTrafficExtensionsRequest\x1a@.google.cloud.networkservices.v1.ListLbTrafficExtensionsResponse\"H\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x39\x12\x37/v1/{parent=projects/*/locations/*}/lbTrafficExtensions\x12\xd3\x01\n\x15GetLbTrafficExtension\x12=.google.cloud.networkservices.v1.GetLbTrafficExtensionRequest\x1a\x33.google.cloud.networkservices.v1.LbTrafficExtension\"F\xda\x41\x04name\x82\xd3\xe4\x93\x02\x39\x12\x37/v1/{name=projects/*/locations/*/lbTrafficExtensions/*}\x12\xb3\x02\n\x18\x43reateLbTrafficExtension\x12@.google.cloud.networkservices.v1.CreateLbTrafficExtensionRequest\x1a\x1d.google.longrunning.Operation\"\xb5\x01\xca\x41\'\n\x12LbTrafficExtension\x12\x11OperationMetadata\xda\x41\x33parent,lb_traffic_extension,lb_traffic_extension_id\x82\xd3\xe4\x93\x02O\"7/v1/{parent=projects/*/locations/*}/lbTrafficExtensions:\x14lb_traffic_extension\x12\xb5\x02\n\x18UpdateLbTrafficExtension\x12@.google.cloud.networkservices.v1.UpdateLbTrafficExtensionRequest\x1a\x1d.google.longrunning.Operation\"\xb7\x01\xca\x41\'\n\x12LbTrafficExtension\x12\x11OperationMetadata\xda\x41 lb_traffic_extension,update_mask\x82\xd3\xe4\x93\x02\x64\x32L/v1/{lb_traffic_extension.name=projects/*/locations/*/lbTrafficExtensions/*}:\x14lb_traffic_extension\x12\xf0\x01\n\x18\x44\x65leteLbTrafficExtension\x12@.google.cloud.networkservices.v1.DeleteLbTrafficExtensionRequest\x1a\x1d.google.longrunning.Operation\"s\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x39*7/v1/{name=projects/*/locations/*/lbTrafficExtensions/*}\x12\xde\x01\n\x15ListLbRouteExtensions\x12=.google.cloud.networkservices.v1.ListLbRouteExtensionsRequest\x1a>.google.cloud.networkservices.v1.ListLbRouteExtensionsResponse\"F\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x37\x12\x35/v1/{parent=projects/*/locations/*}/lbRouteExtensions\x12\xcb\x01\n\x13GetLbRouteExtension\x12;.google.cloud.networkservices.v1.GetLbRouteExtensionRequest\x1a\x31.google.cloud.networkservices.v1.LbRouteExtension\"D\xda\x41\x04name\x82\xd3\xe4\x93\x02\x37\x12\x35/v1/{name=projects/*/locations/*/lbRouteExtensions/*}\x12\xa5\x02\n\x16\x43reateLbRouteExtension\x12>.google.cloud.networkservices.v1.CreateLbRouteExtensionRequest\x1a\x1d.google.longrunning.Operation\"\xab\x01\xca\x41%\n\x10LbRouteExtension\x12\x11OperationMetadata\xda\x41/parent,lb_route_extension,lb_route_extension_id\x82\xd3\xe4\x93\x02K\"5/v1/{parent=projects/*/locations/*}/lbRouteExtensions:\x12lb_route_extension\x12\xa7\x02\n\x16UpdateLbRouteExtension\x12>.google.cloud.networkservices.v1.UpdateLbRouteExtensionRequest\x1a\x1d.google.longrunning.Operation\"\xad\x01\xca\x41%\n\x10LbRouteExtension\x12\x11OperationMetadata\xda\x41\x1elb_route_extension,update_mask\x82\xd3\xe4\x93\x02^2H/v1/{lb_route_extension.name=projects/*/locations/*/lbRouteExtensions/*}:\x12lb_route_extension\x12\xea\x01\n\x16\x44\x65leteLbRouteExtension\x12>.google.cloud.networkservices.v1.DeleteLbRouteExtensionRequest\x1a\x1d.google.longrunning.Operation\"q\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x37*5/v1/{name=projects/*/locations/*/lbRouteExtensions/*}\x12\xda\x01\n\x14ListLbEdgeExtensions\x12<.google.cloud.networkservices.v1.ListLbEdgeExtensionsRequest\x1a=.google.cloud.networkservices.v1.ListLbEdgeExtensionsResponse\"E\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x36\x12\x34/v1/{parent=projects/*/locations/*}/lbEdgeExtensions\x12\xc7\x01\n\x12GetLbEdgeExtension\x12:.google.cloud.networkservices.v1.GetLbEdgeExtensionRequest\x1a\x30.google.cloud.networkservices.v1.LbEdgeExtension\"C\xda\x41\x04name\x82\xd3\xe4\x93\x02\x36\x12\x34/v1/{name=projects/*/locations/*/lbEdgeExtensions/*}\x12\x9e\x02\n\x15\x43reateLbEdgeExtension\x12=.google.cloud.networkservices.v1.CreateLbEdgeExtensionRequest\x1a\x1d.google.longrunning.Operation\"\xa6\x01\xca\x41$\n\x0fLbEdgeExtension\x12\x11OperationMetadata\xda\x41-parent,lb_edge_extension,lb_edge_extension_id\x82\xd3\xe4\x93\x02I\"4/v1/{parent=projects/*/locations/*}/lbEdgeExtensions:\x11lb_edge_extension\x12\xa0\x02\n\x15UpdateLbEdgeExtension\x12=.google.cloud.networkservices.v1.UpdateLbEdgeExtensionRequest\x1a\x1d.google.longrunning.Operation\"\xa8\x01\xca\x41$\n\x0fLbEdgeExtension\x12\x11OperationMetadata\xda\x41\x1dlb_edge_extension,update_mask\x82\xd3\xe4\x93\x02[2F/v1/{lb_edge_extension.name=projects/*/locations/*/lbEdgeExtensions/*}:\x11lb_edge_extension\x12\xe7\x01\n\x15\x44\x65leteLbEdgeExtension\x12=.google.cloud.networkservices.v1.DeleteLbEdgeExtensionRequest\x1a\x1d.google.longrunning.Operation\"p\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x36*4/v1/{name=projects/*/locations/*/lbEdgeExtensions/*}\x12\xd6\x01\n\x13ListAuthzExtensions\x12;.google.cloud.networkservices.v1.ListAuthzExtensionsRequest\x1a<.google.cloud.networkservices.v1.ListAuthzExtensionsResponse\"D\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x35\x12\x33/v1/{parent=projects/*/locations/*}/authzExtensions\x12\xc3\x01\n\x11GetAuthzExtension\x12\x39.google.cloud.networkservices.v1.GetAuthzExtensionRequest\x1a/.google.cloud.networkservices.v1.AuthzExtension\"B\xda\x41\x04name\x82\xd3\xe4\x93\x02\x35\x12\x33/v1/{name=projects/*/locations/*/authzExtensions/*}\x12\x94\x02\n\x14\x43reateAuthzExtension\x12<.google.cloud.networkservices.v1.CreateAuthzExtensionRequest\x1a\x1d.google.longrunning.Operation\"\x9e\x01\xca\x41#\n\x0e\x41uthzExtension\x12\x11OperationMetadata\xda\x41)parent,authz_extension,authz_extension_id\x82\xd3\xe4\x93\x02\x46\"3/v1/{parent=projects/*/locations/*}/authzExtensions:\x0f\x61uthz_extension\x12\x96\x02\n\x14UpdateAuthzExtension\x12<.google.cloud.networkservices.v1.UpdateAuthzExtensionRequest\x1a\x1d.google.longrunning.Operation\"\xa0\x01\xca\x41#\n\x0e\x41uthzExtension\x12\x11OperationMetadata\xda\x41\x1b\x61uthz_extension,update_mask\x82\xd3\xe4\x93\x02V2C/v1/{authz_extension.name=projects/*/locations/*/authzExtensions/*}:\x0f\x61uthz_extension\x12\xe4\x01\n\x14\x44\x65leteAuthzExtension\x12<.google.cloud.networkservices.v1.DeleteAuthzExtensionRequest\x1a\x1d.google.longrunning.Operation\"o\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x35*3/v1/{name=projects/*/locations/*/authzExtensions/*}\x1aR\xca\x41\x1enetworkservices.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xe9\x01\n#com.google.cloud.networkservices.v1B\x08\x44\x65pProtoP\x01ZMcloud.google.com/go/networkservices/apiv1/networkservicespb;networkservicespb\xaa\x02\x1fGoogle.Cloud.NetworkServices.V1\xca\x02\x1fGoogle\\Cloud\\NetworkServices\\V1\xea\x02\"Google::Cloud::NetworkServices::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module NetworkServices + module V1 + ExtensionChain = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.ExtensionChain").msgclass + ExtensionChain::MatchCondition = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.ExtensionChain.MatchCondition").msgclass + ExtensionChain::Extension = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.ExtensionChain.Extension").msgclass + LbTrafficExtension = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.LbTrafficExtension").msgclass + ListLbTrafficExtensionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.ListLbTrafficExtensionsRequest").msgclass + ListLbTrafficExtensionsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.ListLbTrafficExtensionsResponse").msgclass + GetLbTrafficExtensionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.GetLbTrafficExtensionRequest").msgclass + CreateLbTrafficExtensionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.CreateLbTrafficExtensionRequest").msgclass + UpdateLbTrafficExtensionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.UpdateLbTrafficExtensionRequest").msgclass + DeleteLbTrafficExtensionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.DeleteLbTrafficExtensionRequest").msgclass + LbRouteExtension = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.LbRouteExtension").msgclass + ListLbRouteExtensionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.ListLbRouteExtensionsRequest").msgclass + ListLbRouteExtensionsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.ListLbRouteExtensionsResponse").msgclass + GetLbRouteExtensionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.GetLbRouteExtensionRequest").msgclass + CreateLbRouteExtensionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.CreateLbRouteExtensionRequest").msgclass + UpdateLbRouteExtensionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.UpdateLbRouteExtensionRequest").msgclass + DeleteLbRouteExtensionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.DeleteLbRouteExtensionRequest").msgclass + LbEdgeExtension = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.LbEdgeExtension").msgclass + ListLbEdgeExtensionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.ListLbEdgeExtensionsRequest").msgclass + ListLbEdgeExtensionsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.ListLbEdgeExtensionsResponse").msgclass + GetLbEdgeExtensionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.GetLbEdgeExtensionRequest").msgclass + CreateLbEdgeExtensionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.CreateLbEdgeExtensionRequest").msgclass + UpdateLbEdgeExtensionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.UpdateLbEdgeExtensionRequest").msgclass + DeleteLbEdgeExtensionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.DeleteLbEdgeExtensionRequest").msgclass + AuthzExtension = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.AuthzExtension").msgclass + ListAuthzExtensionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.ListAuthzExtensionsRequest").msgclass + ListAuthzExtensionsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.ListAuthzExtensionsResponse").msgclass + GetAuthzExtensionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.GetAuthzExtensionRequest").msgclass + CreateAuthzExtensionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.CreateAuthzExtensionRequest").msgclass + UpdateAuthzExtensionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.UpdateAuthzExtensionRequest").msgclass + DeleteAuthzExtensionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.DeleteAuthzExtensionRequest").msgclass + EventType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.EventType").enummodule + LoadBalancingScheme = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.LoadBalancingScheme").enummodule + WireFormat = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.WireFormat").enummodule + BodySendMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.BodySendMode").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/dep_services_pb.rb b/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/dep_services_pb.rb new file mode 100644 index 000000000000..2a220e2e005d --- /dev/null +++ b/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/dep_services_pb.rb @@ -0,0 +1,86 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/cloud/networkservices/v1/dep.proto for package 'Google.Cloud.NetworkServices.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/networkservices/v1/dep_pb' + +module Google + module Cloud + module NetworkServices + module V1 + module DepService + # Service describing handlers for resources. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.cloud.networkservices.v1.DepService' + + # Lists `LbTrafficExtension` resources in a given project and location. + rpc :ListLbTrafficExtensions, ::Google::Cloud::NetworkServices::V1::ListLbTrafficExtensionsRequest, ::Google::Cloud::NetworkServices::V1::ListLbTrafficExtensionsResponse + # Gets details of the specified `LbTrafficExtension` resource. + rpc :GetLbTrafficExtension, ::Google::Cloud::NetworkServices::V1::GetLbTrafficExtensionRequest, ::Google::Cloud::NetworkServices::V1::LbTrafficExtension + # Creates a new `LbTrafficExtension` resource in a given project and + # location. + rpc :CreateLbTrafficExtension, ::Google::Cloud::NetworkServices::V1::CreateLbTrafficExtensionRequest, ::Google::Longrunning::Operation + # Updates the parameters of the specified `LbTrafficExtension` resource. + rpc :UpdateLbTrafficExtension, ::Google::Cloud::NetworkServices::V1::UpdateLbTrafficExtensionRequest, ::Google::Longrunning::Operation + # Deletes the specified `LbTrafficExtension` resource. + rpc :DeleteLbTrafficExtension, ::Google::Cloud::NetworkServices::V1::DeleteLbTrafficExtensionRequest, ::Google::Longrunning::Operation + # Lists `LbRouteExtension` resources in a given project and location. + rpc :ListLbRouteExtensions, ::Google::Cloud::NetworkServices::V1::ListLbRouteExtensionsRequest, ::Google::Cloud::NetworkServices::V1::ListLbRouteExtensionsResponse + # Gets details of the specified `LbRouteExtension` resource. + rpc :GetLbRouteExtension, ::Google::Cloud::NetworkServices::V1::GetLbRouteExtensionRequest, ::Google::Cloud::NetworkServices::V1::LbRouteExtension + # Creates a new `LbRouteExtension` resource in a given project and location. + rpc :CreateLbRouteExtension, ::Google::Cloud::NetworkServices::V1::CreateLbRouteExtensionRequest, ::Google::Longrunning::Operation + # Updates the parameters of the specified `LbRouteExtension` resource. + rpc :UpdateLbRouteExtension, ::Google::Cloud::NetworkServices::V1::UpdateLbRouteExtensionRequest, ::Google::Longrunning::Operation + # Deletes the specified `LbRouteExtension` resource. + rpc :DeleteLbRouteExtension, ::Google::Cloud::NetworkServices::V1::DeleteLbRouteExtensionRequest, ::Google::Longrunning::Operation + # Lists `LbEdgeExtension` resources in a given project and location. + rpc :ListLbEdgeExtensions, ::Google::Cloud::NetworkServices::V1::ListLbEdgeExtensionsRequest, ::Google::Cloud::NetworkServices::V1::ListLbEdgeExtensionsResponse + # Gets details of the specified `LbEdgeExtension` resource. + rpc :GetLbEdgeExtension, ::Google::Cloud::NetworkServices::V1::GetLbEdgeExtensionRequest, ::Google::Cloud::NetworkServices::V1::LbEdgeExtension + # Creates a new `LbEdgeExtension` resource in a given project and location. + rpc :CreateLbEdgeExtension, ::Google::Cloud::NetworkServices::V1::CreateLbEdgeExtensionRequest, ::Google::Longrunning::Operation + # Updates the parameters of the specified `LbEdgeExtension` resource. + rpc :UpdateLbEdgeExtension, ::Google::Cloud::NetworkServices::V1::UpdateLbEdgeExtensionRequest, ::Google::Longrunning::Operation + # Deletes the specified `LbEdgeExtension` resource. + rpc :DeleteLbEdgeExtension, ::Google::Cloud::NetworkServices::V1::DeleteLbEdgeExtensionRequest, ::Google::Longrunning::Operation + # Lists `AuthzExtension` resources in a given project and location. + rpc :ListAuthzExtensions, ::Google::Cloud::NetworkServices::V1::ListAuthzExtensionsRequest, ::Google::Cloud::NetworkServices::V1::ListAuthzExtensionsResponse + # Gets details of the specified `AuthzExtension` resource. + rpc :GetAuthzExtension, ::Google::Cloud::NetworkServices::V1::GetAuthzExtensionRequest, ::Google::Cloud::NetworkServices::V1::AuthzExtension + # Creates a new `AuthzExtension` resource in a given project + # and location. + rpc :CreateAuthzExtension, ::Google::Cloud::NetworkServices::V1::CreateAuthzExtensionRequest, ::Google::Longrunning::Operation + # Updates the parameters of the specified `AuthzExtension` + # resource. + rpc :UpdateAuthzExtension, ::Google::Cloud::NetworkServices::V1::UpdateAuthzExtensionRequest, ::Google::Longrunning::Operation + # Deletes the specified `AuthzExtension` resource. + rpc :DeleteAuthzExtension, ::Google::Cloud::NetworkServices::V1::DeleteAuthzExtensionRequest, ::Google::Longrunning::Operation + end + + Stub = Service.rpc_stub_class + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/endpoint_policy_pb.rb b/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/endpoint_policy_pb.rb new file mode 100644 index 000000000000..ce1896ec04f0 --- /dev/null +++ b/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/endpoint_policy_pb.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/networkservices/v1/endpoint_policy.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/cloud/networkservices/v1/common_pb' +require 'google/protobuf/field_mask_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n5google/cloud/networkservices/v1/endpoint_policy.proto\x12\x1fgoogle.cloud.networkservices.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a,google/cloud/networkservices/v1/common.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x8c\x08\n\x0e\x45ndpointPolicy\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12P\n\x06labels\x18\x04 \x03(\x0b\x32;.google.cloud.networkservices.v1.EndpointPolicy.LabelsEntryB\x03\xe0\x41\x01\x12U\n\x04type\x18\x05 \x01(\x0e\x32\x42.google.cloud.networkservices.v1.EndpointPolicy.EndpointPolicyTypeB\x03\xe0\x41\x02\x12X\n\x14\x61uthorization_policy\x18\x07 \x01(\tB:\xe0\x41\x01\xfa\x41\x34\n2networksecurity.googleapis.com/AuthorizationPolicy\x12O\n\x10\x65ndpoint_matcher\x18\t \x01(\x0b\x32\x30.google.cloud.networkservices.v1.EndpointMatcherB\x03\xe0\x41\x02\x12X\n\x15traffic_port_selector\x18\n \x01(\x0b\x32\x34.google.cloud.networkservices.v1.TrafficPortSelectorB\x03\xe0\x41\x01\x12\x18\n\x0b\x64\x65scription\x18\x0b \x01(\tB\x03\xe0\x41\x01\x12Q\n\x11server_tls_policy\x18\x0c \x01(\tB6\xe0\x41\x01\xfa\x41\x30\n.networksecurity.googleapis.com/ServerTlsPolicy\x12Q\n\x11\x63lient_tls_policy\x18\r \x01(\tB6\xe0\x41\x01\xfa\x41\x30\n.networksecurity.googleapis.com/ClientTlsPolicy\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"^\n\x12\x45ndpointPolicyType\x12$\n ENDPOINT_POLICY_TYPE_UNSPECIFIED\x10\x00\x12\x11\n\rSIDECAR_PROXY\x10\x01\x12\x0f\n\x0bGRPC_SERVER\x10\x02:~\xea\x41{\n-networkservices.googleapis.com/EndpointPolicy\x12Jprojects/{project}/locations/{location}/endpointPolicies/{endpoint_policy}\"\xb0\x01\n\x1bListEndpointPoliciesRequest\x12\x45\n\x06parent\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\x12-networkservices.googleapis.com/EndpointPolicy\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12#\n\x16return_partial_success\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"\x98\x01\n\x1cListEndpointPoliciesResponse\x12J\n\x11\x65ndpoint_policies\x18\x01 \x03(\x0b\x32/.google.cloud.networkservices.v1.EndpointPolicy\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"_\n\x18GetEndpointPolicyRequest\x12\x43\n\x04name\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-networkservices.googleapis.com/EndpointPolicy\"\xd4\x01\n\x1b\x43reateEndpointPolicyRequest\x12\x45\n\x06parent\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\x12-networkservices.googleapis.com/EndpointPolicy\x12\x1f\n\x12\x65ndpoint_policy_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12M\n\x0f\x65ndpoint_policy\x18\x03 \x01(\x0b\x32/.google.cloud.networkservices.v1.EndpointPolicyB\x03\xe0\x41\x02\"\xa2\x01\n\x1bUpdateEndpointPolicyRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x12M\n\x0f\x65ndpoint_policy\x18\x02 \x01(\x0b\x32/.google.cloud.networkservices.v1.EndpointPolicyB\x03\xe0\x41\x02\"b\n\x1b\x44\x65leteEndpointPolicyRequest\x12\x43\n\x04name\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-networkservices.googleapis.com/EndpointPolicyB\x86\x05\n#com.google.cloud.networkservices.v1B\x13\x45ndpointPolicyProtoP\x01ZMcloud.google.com/go/networkservices/apiv1/networkservicespb;networkservicespb\xaa\x02\x1fGoogle.Cloud.NetworkServices.V1\xca\x02\x1fGoogle\\Cloud\\NetworkServices\\V1\xea\x02\"Google::Cloud::NetworkServices::V1\xea\x41\x8a\x01\n2networksecurity.googleapis.com/AuthorizationPolicy\x12Tprojects/{project}/locations/{location}/authorizationPolicies/{authorization_policy}\xea\x41\x7f\n.networksecurity.googleapis.com/ServerTlsPolicy\x12Mprojects/{project}/locations/{location}/serverTlsPolicies/{server_tls_policy}\xea\x41\x7f\n.networksecurity.googleapis.com/ClientTlsPolicy\x12Mprojects/{project}/locations/{location}/clientTlsPolicies/{client_tls_policy}b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module NetworkServices + module V1 + EndpointPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.EndpointPolicy").msgclass + EndpointPolicy::EndpointPolicyType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.EndpointPolicy.EndpointPolicyType").enummodule + ListEndpointPoliciesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.ListEndpointPoliciesRequest").msgclass + ListEndpointPoliciesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.ListEndpointPoliciesResponse").msgclass + GetEndpointPolicyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.GetEndpointPolicyRequest").msgclass + CreateEndpointPolicyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.CreateEndpointPolicyRequest").msgclass + UpdateEndpointPolicyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.UpdateEndpointPolicyRequest").msgclass + DeleteEndpointPolicyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.DeleteEndpointPolicyRequest").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/extensibility_pb.rb b/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/extensibility_pb.rb new file mode 100644 index 000000000000..45e4540b73bd --- /dev/null +++ b/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/extensibility_pb.rb @@ -0,0 +1,43 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/networkservices/v1/extensibility.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/field_mask_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n3google/cloud/networkservices/v1/extensibility.proto\x12\x1fgoogle.cloud.networkservices.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xfa\x0b\n\nWasmPlugin\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12L\n\x06labels\x18\x05 \x03(\x0b\x32\x37.google.cloud.networkservices.v1.WasmPlugin.LabelsEntryB\x03\xe0\x41\x01\x12\x1c\n\x0fmain_version_id\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12N\n\nlog_config\x18\t \x01(\x0b\x32\x35.google.cloud.networkservices.v1.WasmPlugin.LogConfigB\x03\xe0\x41\x01\x12P\n\x08versions\x18\n \x03(\x0b\x32\x39.google.cloud.networkservices.v1.WasmPlugin.VersionsEntryB\x03\xe0\x41\x01\x12H\n\x07used_by\x18\x0b \x03(\x0b\x32\x32.google.cloud.networkservices.v1.WasmPlugin.UsedByB\x03\xe0\x41\x03\x1a\xcb\x03\n\x0eVersionDetails\x12\x1c\n\x12plugin_config_data\x18\t \x01(\x0cH\x00\x12\x1b\n\x11plugin_config_uri\x18\n \x01(\tH\x00\x12\x34\n\x0b\x63reate_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12[\n\x06labels\x18\x04 \x03(\x0b\x32\x46.google.cloud.networkservices.v1.WasmPlugin.VersionDetails.LabelsEntryB\x03\xe0\x41\x01\x12\x16\n\timage_uri\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x19\n\x0cimage_digest\x18\x06 \x01(\tB\x03\xe0\x41\x03\x12!\n\x14plugin_config_digest\x18\x0b \x01(\tB\x03\xe0\x41\x03\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x16\n\x14plugin_config_source\x1a\x80\x02\n\tLogConfig\x12\x13\n\x06\x65nable\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01\x12\x18\n\x0bsample_rate\x18\x02 \x01(\x02\x42\x03\xe0\x41\x07\x12Z\n\rmin_log_level\x18\x03 \x01(\x0e\x32>.google.cloud.networkservices.v1.WasmPlugin.LogConfig.LogLevelB\x03\xe0\x41\x07\"h\n\x08LogLevel\x12\x19\n\x15LOG_LEVEL_UNSPECIFIED\x10\x00\x12\t\n\x05TRACE\x10\x01\x12\t\n\x05\x44\x45\x42UG\x10\x02\x12\x08\n\x04INFO\x10\x03\x12\x08\n\x04WARN\x10\x04\x12\t\n\x05\x45RROR\x10\x05\x12\x0c\n\x08\x43RITICAL\x10\x06\x1a\x1b\n\x06UsedBy\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1ak\n\rVersionsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12I\n\x05value\x18\x02 \x01(\x0b\x32:.google.cloud.networkservices.v1.WasmPlugin.VersionDetails:\x02\x38\x01:q\xea\x41n\n)networkservices.googleapis.com/WasmPlugin\x12\x41projects/{project}/locations/{location}/wasmPlugins/{wasm_plugin}\"\xf4\x04\n\x11WasmPluginVersion\x12\x1c\n\x12plugin_config_data\x18\x0c \x01(\x0cH\x00\x12\x1b\n\x11plugin_config_uri\x18\r \x01(\tH\x00\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x34\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12S\n\x06labels\x18\x06 \x03(\x0b\x32>.google.cloud.networkservices.v1.WasmPluginVersion.LabelsEntryB\x03\xe0\x41\x01\x12\x16\n\timage_uri\x18\x08 \x01(\tB\x03\xe0\x41\x01\x12\x19\n\x0cimage_digest\x18\t \x01(\tB\x03\xe0\x41\x03\x12!\n\x14plugin_config_digest\x18\x0e \x01(\tB\x03\xe0\x41\x03\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\x98\x01\xea\x41\x94\x01\n0networkservices.googleapis.com/WasmPluginVersion\x12`projects/{project}/locations/{location}/wasmPlugins/{wasm_plugin}/versions/{wasm_plugin_version}B\x16\n\x14plugin_config_source\"\x82\x01\n\x16ListWasmPluginsRequest\x12\x41\n\x06parent\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\x12)networkservices.googleapis.com/WasmPlugin\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"\x8a\x01\n\x17ListWasmPluginsResponse\x12\x41\n\x0cwasm_plugins\x18\x01 \x03(\x0b\x32+.google.cloud.networkservices.v1.WasmPlugin\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"\x96\x01\n\x14GetWasmPluginRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)networkservices.googleapis.com/WasmPlugin\x12=\n\x04view\x18\x02 \x01(\x0e\x32/.google.cloud.networkservices.v1.WasmPluginView\"\xc0\x01\n\x17\x43reateWasmPluginRequest\x12\x41\n\x06parent\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\x12)networkservices.googleapis.com/WasmPlugin\x12\x1b\n\x0ewasm_plugin_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x45\n\x0bwasm_plugin\x18\x03 \x01(\x0b\x32+.google.cloud.networkservices.v1.WasmPluginB\x03\xe0\x41\x02\"\x96\x01\n\x17UpdateWasmPluginRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x12\x45\n\x0bwasm_plugin\x18\x02 \x01(\x0b\x32+.google.cloud.networkservices.v1.WasmPluginB\x03\xe0\x41\x02\"Z\n\x17\x44\x65leteWasmPluginRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)networkservices.googleapis.com/WasmPlugin\"\x90\x01\n\x1dListWasmPluginVersionsRequest\x12H\n\x06parent\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\x12\x30networkservices.googleapis.com/WasmPluginVersion\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"\xa0\x01\n\x1eListWasmPluginVersionsResponse\x12P\n\x14wasm_plugin_versions\x18\x01 \x03(\x0b\x32\x32.google.cloud.networkservices.v1.WasmPluginVersion\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"e\n\x1bGetWasmPluginVersionRequest\x12\x46\n\x04name\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\n0networkservices.googleapis.com/WasmPluginVersion\"\xe5\x01\n\x1e\x43reateWasmPluginVersionRequest\x12H\n\x06parent\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\x12\x30networkservices.googleapis.com/WasmPluginVersion\x12#\n\x16wasm_plugin_version_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12T\n\x13wasm_plugin_version\x18\x03 \x01(\x0b\x32\x32.google.cloud.networkservices.v1.WasmPluginVersionB\x03\xe0\x41\x02\"h\n\x1e\x44\x65leteWasmPluginVersionRequest\x12\x46\n\x04name\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\n0networkservices.googleapis.com/WasmPluginVersion*i\n\x0eWasmPluginView\x12 \n\x1cWASM_PLUGIN_VIEW_UNSPECIFIED\x10\x00\x12\x1a\n\x16WASM_PLUGIN_VIEW_BASIC\x10\x01\x12\x19\n\x15WASM_PLUGIN_VIEW_FULL\x10\x02\x42\xf3\x01\n#com.google.cloud.networkservices.v1B\x12\x45xtensibilityProtoP\x01ZMcloud.google.com/go/networkservices/apiv1/networkservicespb;networkservicespb\xaa\x02\x1fGoogle.Cloud.NetworkServices.V1\xca\x02\x1fGoogle\\Cloud\\NetworkServices\\V1\xea\x02\"Google::Cloud::NetworkServices::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module NetworkServices + module V1 + WasmPlugin = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.WasmPlugin").msgclass + WasmPlugin::VersionDetails = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.WasmPlugin.VersionDetails").msgclass + WasmPlugin::LogConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.WasmPlugin.LogConfig").msgclass + WasmPlugin::LogConfig::LogLevel = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.WasmPlugin.LogConfig.LogLevel").enummodule + WasmPlugin::UsedBy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.WasmPlugin.UsedBy").msgclass + WasmPluginVersion = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.WasmPluginVersion").msgclass + ListWasmPluginsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.ListWasmPluginsRequest").msgclass + ListWasmPluginsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.ListWasmPluginsResponse").msgclass + GetWasmPluginRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.GetWasmPluginRequest").msgclass + CreateWasmPluginRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.CreateWasmPluginRequest").msgclass + UpdateWasmPluginRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.UpdateWasmPluginRequest").msgclass + DeleteWasmPluginRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.DeleteWasmPluginRequest").msgclass + ListWasmPluginVersionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.ListWasmPluginVersionsRequest").msgclass + ListWasmPluginVersionsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.ListWasmPluginVersionsResponse").msgclass + GetWasmPluginVersionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.GetWasmPluginVersionRequest").msgclass + CreateWasmPluginVersionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.CreateWasmPluginVersionRequest").msgclass + DeleteWasmPluginVersionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.DeleteWasmPluginVersionRequest").msgclass + WasmPluginView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.WasmPluginView").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/gateway_pb.rb b/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/gateway_pb.rb new file mode 100644 index 000000000000..69ea84d4661a --- /dev/null +++ b/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/gateway_pb.rb @@ -0,0 +1,36 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/networkservices/v1/gateway.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/cloud/networkservices/v1/common_pb' +require 'google/protobuf/field_mask_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n-google/cloud/networkservices/v1/gateway.proto\x12\x1fgoogle.cloud.networkservices.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a,google/cloud/networkservices/v1/common.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xbe\x0b\n\x07Gateway\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x16\n\tself_link\x18\r \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12I\n\x06labels\x18\x04 \x03(\x0b\x32\x34.google.cloud.networkservices.v1.Gateway.LabelsEntryB\x03\xe0\x41\x01\x12\x18\n\x0b\x64\x65scription\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12@\n\x04type\x18\x06 \x01(\x0e\x32-.google.cloud.networkservices.v1.Gateway.TypeB\x03\xe0\x41\x05\x12\x39\n\taddresses\x18\x07 \x03(\tB&\xe0\x41\x01\xfa\x41 \n\x1e\x63ompute.googleapis.com/Address\x12\x12\n\x05ports\x18\x0b \x03(\x05\x42\x03\xe0\x41\x02\x12\x16\n\tall_ports\x18\" \x01(\x08\x42\x03\xe0\x41\x01\x12\x12\n\x05scope\x18\x08 \x01(\tB\x03\xe0\x41\x01\x12Q\n\x11server_tls_policy\x18\t \x01(\tB6\xe0\x41\x01\xfa\x41\x30\n.networksecurity.googleapis.com/ServerTlsPolicy\x12O\n\x10\x63\x65rtificate_urls\x18\x0e \x03(\tB5\xe0\x41\x01\xfa\x41/\n-certificatemanager.googleapis.com/Certificate\x12]\n\x17gateway_security_policy\x18\x12 \x01(\tB<\xe0\x41\x01\xfa\x41\x36\n4networksecurity.googleapis.com/GatewaySecurityPolicy\x12\x37\n\x07network\x18\x10 \x01(\tB&\xe0\x41\x01\xfa\x41 \n\x1e\x63ompute.googleapis.com/Network\x12=\n\nsubnetwork\x18\x11 \x01(\tB)\xe0\x41\x01\xfa\x41#\n!compute.googleapis.com/Subnetwork\x12K\n\nip_version\x18\x15 \x01(\x0e\x32\x32.google.cloud.networkservices.v1.Gateway.IpVersionB\x03\xe0\x41\x01\x12N\n\renvoy_headers\x18\x1c \x01(\x0e\x32-.google.cloud.networkservices.v1.EnvoyHeadersB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12O\n\x0crouting_mode\x18 \x01(\x0e\x32\x34.google.cloud.networkservices.v1.Gateway.RoutingModeB\x03\xe0\x41\x01\x12 \n\x13\x61llow_global_access\x18! \x01(\x08\x42\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"C\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\r\n\tOPEN_MESH\x10\x01\x12\x16\n\x12SECURE_WEB_GATEWAY\x10\x02\";\n\tIpVersion\x12\x1a\n\x16IP_VERSION_UNSPECIFIED\x10\x00\x12\x08\n\x04IPV4\x10\x01\x12\x08\n\x04IPV6\x10\x02\"C\n\x0bRoutingMode\x12\x19\n\x15\x45XPLICIT_ROUTING_MODE\x10\x00\x12\x19\n\x15NEXT_HOP_ROUTING_MODE\x10\x01:g\xea\x41\x64\n&networkservices.googleapis.com/Gateway\x12:projects/{project}/locations/{location}/gateways/{gateway}B\x10\n\x0e_envoy_headers\"|\n\x13ListGatewaysRequest\x12>\n\x06parent\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\x12&networkservices.googleapis.com/Gateway\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"\x80\x01\n\x14ListGatewaysResponse\x12:\n\x08gateways\x18\x01 \x03(\x0b\x32(.google.cloud.networkservices.v1.Gateway\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"Q\n\x11GetGatewayRequest\x12<\n\x04name\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\n&networkservices.googleapis.com/Gateway\"\xaf\x01\n\x14\x43reateGatewayRequest\x12>\n\x06parent\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\x12&networkservices.googleapis.com/Gateway\x12\x17\n\ngateway_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12>\n\x07gateway\x18\x03 \x01(\x0b\x32(.google.cloud.networkservices.v1.GatewayB\x03\xe0\x41\x02\"\x8c\x01\n\x14UpdateGatewayRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x12>\n\x07gateway\x18\x02 \x01(\x0b\x32(.google.cloud.networkservices.v1.GatewayB\x03\xe0\x41\x02\"T\n\x14\x44\x65leteGatewayRequest\x12<\n\x04name\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\n&networkservices.googleapis.com/GatewayB\x89\x06\n#com.google.cloud.networkservices.v1B\x0cGatewayProtoP\x01ZMcloud.google.com/go/networkservices/apiv1/networkservicespb;networkservicespb\xaa\x02\x1fGoogle.Cloud.NetworkServices.V1\xca\x02\x1fGoogle\\Cloud\\NetworkServices\\V1\xea\x02\"Google::Cloud::NetworkServices::V1\xea\x41\x91\x01\n4networksecurity.googleapis.com/GatewaySecurityPolicy\x12Yprojects/{project}/locations/{location}/gatewaySecurityPolicies/{gateway_security_policy}\xea\x41\x61\n!compute.googleapis.com/Subnetwork\x12\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(networkservices.googleapis.com/GrpcRoute\"\xbb\x01\n\x16\x43reateGrpcRouteRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\x12(networkservices.googleapis.com/GrpcRoute\x12\x1a\n\rgrpc_route_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x43\n\ngrpc_route\x18\x03 \x01(\x0b\x32*.google.cloud.networkservices.v1.GrpcRouteB\x03\xe0\x41\x02\"\x93\x01\n\x16UpdateGrpcRouteRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x12\x43\n\ngrpc_route\x18\x02 \x01(\x0b\x32*.google.cloud.networkservices.v1.GrpcRouteB\x03\xe0\x41\x02\"X\n\x16\x44\x65leteGrpcRouteRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(networkservices.googleapis.com/GrpcRouteB\xe4\x02\n#com.google.cloud.networkservices.v1B\x0eGrpcRouteProtoP\x01ZMcloud.google.com/go/networkservices/apiv1/networkservicespb;networkservicespb\xaa\x02\x1fGoogle.Cloud.NetworkServices.V1\xca\x02\x1fGoogle\\Cloud\\NetworkServices\\V1\xea\x02\"Google::Cloud::NetworkServices::V1\xea\x41r\n%compute.googleapis.com/BackendService\x12Iprojects/{project}/locations/{location}/backendServices/{backend_service}b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module NetworkServices + module V1 + GrpcRoute = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.GrpcRoute").msgclass + GrpcRoute::MethodMatch = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.GrpcRoute.MethodMatch").msgclass + GrpcRoute::MethodMatch::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.GrpcRoute.MethodMatch.Type").enummodule + GrpcRoute::HeaderMatch = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.GrpcRoute.HeaderMatch").msgclass + GrpcRoute::HeaderMatch::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.GrpcRoute.HeaderMatch.Type").enummodule + GrpcRoute::RouteMatch = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.GrpcRoute.RouteMatch").msgclass + GrpcRoute::Destination = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.GrpcRoute.Destination").msgclass + GrpcRoute::FaultInjectionPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.GrpcRoute.FaultInjectionPolicy").msgclass + GrpcRoute::FaultInjectionPolicy::Delay = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.GrpcRoute.FaultInjectionPolicy.Delay").msgclass + GrpcRoute::FaultInjectionPolicy::Abort = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.GrpcRoute.FaultInjectionPolicy.Abort").msgclass + GrpcRoute::StatefulSessionAffinityPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.GrpcRoute.StatefulSessionAffinityPolicy").msgclass + GrpcRoute::RetryPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.GrpcRoute.RetryPolicy").msgclass + GrpcRoute::RouteAction = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.GrpcRoute.RouteAction").msgclass + GrpcRoute::RouteRule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.GrpcRoute.RouteRule").msgclass + ListGrpcRoutesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.ListGrpcRoutesRequest").msgclass + ListGrpcRoutesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.ListGrpcRoutesResponse").msgclass + GetGrpcRouteRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.GetGrpcRouteRequest").msgclass + CreateGrpcRouteRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.CreateGrpcRouteRequest").msgclass + UpdateGrpcRouteRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.UpdateGrpcRouteRequest").msgclass + DeleteGrpcRouteRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.DeleteGrpcRouteRequest").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/http_route_pb.rb b/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/http_route_pb.rb new file mode 100644 index 000000000000..2187729094d4 --- /dev/null +++ b/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/http_route_pb.rb @@ -0,0 +1,53 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/networkservices/v1/http_route.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/field_info_pb' +require 'google/api/resource_pb' +require 'google/protobuf/duration_pb' +require 'google/protobuf/field_mask_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n0google/cloud/networkservices/v1/http_route.proto\x12\x1fgoogle.cloud.networkservices.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1bgoogle/api/field_info.proto\x1a\x19google/api/resource.proto\x1a\x1egoogle/protobuf/duration.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x8f$\n\tHttpRoute\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x16\n\tself_link\x18\x0b \x01(\tB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x34\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x16\n\thostnames\x18\x05 \x03(\tB\x03\xe0\x41\x02\x12;\n\x06meshes\x18\x08 \x03(\tB+\xe0\x41\x01\xfa\x41%\n#networkservices.googleapis.com/Mesh\x12@\n\x08gateways\x18\t \x03(\tB.\xe0\x41\x01\xfa\x41(\n&networkservices.googleapis.com/Gateway\x12K\n\x06labels\x18\n \x03(\x0b\x32\x36.google.cloud.networkservices.v1.HttpRoute.LabelsEntryB\x03\xe0\x41\x01\x12H\n\x05rules\x18\x06 \x03(\x0b\x32\x34.google.cloud.networkservices.v1.HttpRoute.RouteRuleB\x03\xe0\x41\x02\x1a\xbf\x02\n\x0bHeaderMatch\x12\x15\n\x0b\x65xact_match\x18\x02 \x01(\tH\x00\x12\x15\n\x0bregex_match\x18\x03 \x01(\tH\x00\x12\x16\n\x0cprefix_match\x18\x04 \x01(\tH\x00\x12\x17\n\rpresent_match\x18\x05 \x01(\x08H\x00\x12\x16\n\x0csuffix_match\x18\x06 \x01(\tH\x00\x12Z\n\x0brange_match\x18\x07 \x01(\x0b\x32\x43.google.cloud.networkservices.v1.HttpRoute.HeaderMatch.IntegerRangeH\x00\x12\x0e\n\x06header\x18\x01 \x01(\t\x12\x14\n\x0cinvert_match\x18\x08 \x01(\x08\x1a*\n\x0cIntegerRange\x12\r\n\x05start\x18\x01 \x01(\x05\x12\x0b\n\x03\x65nd\x18\x02 \x01(\x05\x42\x0b\n\tMatchType\x1a\x82\x01\n\x13QueryParameterMatch\x12\x15\n\x0b\x65xact_match\x18\x02 \x01(\tH\x00\x12\x15\n\x0bregex_match\x18\x03 \x01(\tH\x00\x12\x17\n\rpresent_match\x18\x04 \x01(\x08H\x00\x12\x17\n\x0fquery_parameter\x18\x01 \x01(\tB\x0b\n\tMatchType\x1a\x9b\x02\n\nRouteMatch\x12\x19\n\x0f\x66ull_path_match\x18\x01 \x01(\tH\x00\x12\x16\n\x0cprefix_match\x18\x02 \x01(\tH\x00\x12\x15\n\x0bregex_match\x18\x03 \x01(\tH\x00\x12\x13\n\x0bignore_case\x18\x04 \x01(\x08\x12G\n\x07headers\x18\x05 \x03(\x0b\x32\x36.google.cloud.networkservices.v1.HttpRoute.HeaderMatch\x12X\n\x10query_parameters\x18\x06 \x03(\x0b\x32>.google.cloud.networkservices.v1.HttpRoute.QueryParameterMatchB\x0b\n\tPathMatch\x1a\xa2\x02\n\x0b\x44\x65stination\x12@\n\x0cservice_name\x18\x01 \x01(\tB*\xfa\x41\'\n%compute.googleapis.com/BackendService\x12\x0e\n\x06weight\x18\x02 \x01(\x05\x12_\n\x17request_header_modifier\x18\x03 \x01(\x0b\x32\x39.google.cloud.networkservices.v1.HttpRoute.HeaderModifierB\x03\xe0\x41\x01\x12`\n\x18response_header_modifier\x18\x04 \x01(\x0b\x32\x39.google.cloud.networkservices.v1.HttpRoute.HeaderModifierB\x03\xe0\x41\x01\x1a\x86\x03\n\x08Redirect\x12\x15\n\rhost_redirect\x18\x01 \x01(\t\x12\x15\n\rpath_redirect\x18\x02 \x01(\t\x12\x16\n\x0eprefix_rewrite\x18\x03 \x01(\t\x12W\n\rresponse_code\x18\x04 \x01(\x0e\x32@.google.cloud.networkservices.v1.HttpRoute.Redirect.ResponseCode\x12\x16\n\x0ehttps_redirect\x18\x05 \x01(\x08\x12\x13\n\x0bstrip_query\x18\x06 \x01(\x08\x12\x15\n\rport_redirect\x18\x07 \x01(\x05\"\x96\x01\n\x0cResponseCode\x12\x1d\n\x19RESPONSE_CODE_UNSPECIFIED\x10\x00\x12\x1d\n\x19MOVED_PERMANENTLY_DEFAULT\x10\x01\x12\t\n\x05\x46OUND\x10\x02\x12\r\n\tSEE_OTHER\x10\x03\x12\x16\n\x12TEMPORARY_REDIRECT\x10\x04\x12\x16\n\x12PERMANENT_REDIRECT\x10\x05\x1a\xc1\x02\n\x14\x46\x61ultInjectionPolicy\x12T\n\x05\x64\x65lay\x18\x01 \x01(\x0b\x32\x45.google.cloud.networkservices.v1.HttpRoute.FaultInjectionPolicy.Delay\x12T\n\x05\x61\x62ort\x18\x02 \x01(\x0b\x32\x45.google.cloud.networkservices.v1.HttpRoute.FaultInjectionPolicy.Abort\x1aK\n\x05\x44\x65lay\x12.\n\x0b\x66ixed_delay\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x12\n\npercentage\x18\x02 \x01(\x05\x1a\x30\n\x05\x41\x62ort\x12\x13\n\x0bhttp_status\x18\x01 \x01(\x05\x12\x12\n\npercentage\x18\x02 \x01(\x05\x1aS\n\x1dStatefulSessionAffinityPolicy\x12\x32\n\ncookie_ttl\x18\x01 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x02\x1a\x9a\x02\n\x0eHeaderModifier\x12O\n\x03set\x18\x01 \x03(\x0b\x32\x42.google.cloud.networkservices.v1.HttpRoute.HeaderModifier.SetEntry\x12O\n\x03\x61\x64\x64\x18\x02 \x03(\x0b\x32\x42.google.cloud.networkservices.v1.HttpRoute.HeaderModifier.AddEntry\x12\x0e\n\x06remove\x18\x03 \x03(\t\x1a*\n\x08SetEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a*\n\x08\x41\x64\x64\x45ntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a?\n\nURLRewrite\x12\x1b\n\x13path_prefix_rewrite\x18\x01 \x01(\t\x12\x14\n\x0chost_rewrite\x18\x02 \x01(\t\x1ap\n\x0bRetryPolicy\x12\x18\n\x10retry_conditions\x18\x01 \x03(\t\x12\x13\n\x0bnum_retries\x18\x02 \x01(\x05\x12\x32\n\x0fper_try_timeout\x18\x03 \x01(\x0b\x32\x19.google.protobuf.Duration\x1a\x7f\n\x13RequestMirrorPolicy\x12K\n\x0b\x64\x65stination\x18\x01 \x01(\x0b\x32\x36.google.cloud.networkservices.v1.HttpRoute.Destination\x12\x1b\n\x0emirror_percent\x18\x02 \x01(\x02\x42\x03\xe0\x41\x01\x1a\xc5\x01\n\nCorsPolicy\x12\x15\n\rallow_origins\x18\x01 \x03(\t\x12\x1c\n\x14\x61llow_origin_regexes\x18\x02 \x03(\t\x12\x15\n\rallow_methods\x18\x03 \x03(\t\x12\x15\n\rallow_headers\x18\x04 \x03(\t\x12\x16\n\x0e\x65xpose_headers\x18\x05 \x03(\t\x12\x0f\n\x07max_age\x18\x06 \x01(\t\x12\x19\n\x11\x61llow_credentials\x18\x07 \x01(\x08\x12\x10\n\x08\x64isabled\x18\x08 \x01(\x08\x1al\n\x12HttpDirectResponse\x12\x1a\n\x0bstring_body\x18\x02 \x01(\tB\x03\xe0\x41\x01H\x00\x12\x19\n\nbytes_body\x18\x03 \x01(\x0c\x42\x03\xe0\x41\x01H\x00\x12\x13\n\x06status\x18\x01 \x01(\x05\x42\x03\xe0\x41\x02\x42\n\n\x08HttpBody\x1a\xb2\x08\n\x0bRouteAction\x12L\n\x0c\x64\x65stinations\x18\x01 \x03(\x0b\x32\x36.google.cloud.networkservices.v1.HttpRoute.Destination\x12\x45\n\x08redirect\x18\x02 \x01(\x0b\x32\x33.google.cloud.networkservices.v1.HttpRoute.Redirect\x12_\n\x16\x66\x61ult_injection_policy\x18\x04 \x01(\x0b\x32?.google.cloud.networkservices.v1.HttpRoute.FaultInjectionPolicy\x12Z\n\x17request_header_modifier\x18\x05 \x01(\x0b\x32\x39.google.cloud.networkservices.v1.HttpRoute.HeaderModifier\x12[\n\x18response_header_modifier\x18\x06 \x01(\x0b\x32\x39.google.cloud.networkservices.v1.HttpRoute.HeaderModifier\x12J\n\x0burl_rewrite\x18\x07 \x01(\x0b\x32\x35.google.cloud.networkservices.v1.HttpRoute.URLRewrite\x12*\n\x07timeout\x18\x08 \x01(\x0b\x32\x19.google.protobuf.Duration\x12L\n\x0cretry_policy\x18\t \x01(\x0b\x32\x36.google.cloud.networkservices.v1.HttpRoute.RetryPolicy\x12]\n\x15request_mirror_policy\x18\n \x01(\x0b\x32>.google.cloud.networkservices.v1.HttpRoute.RequestMirrorPolicy\x12J\n\x0b\x63ors_policy\x18\x0b \x01(\x0b\x32\x35.google.cloud.networkservices.v1.HttpRoute.CorsPolicy\x12p\n\x19stateful_session_affinity\x18\x0c \x01(\x0b\x32H.google.cloud.networkservices.v1.HttpRoute.StatefulSessionAffinityPolicyB\x03\xe0\x41\x01\x12[\n\x0f\x64irect_response\x18\r \x01(\x0b\x32=.google.cloud.networkservices.v1.HttpRoute.HttpDirectResponseB\x03\xe0\x41\x01\x12\x34\n\x0cidle_timeout\x18\x0e \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x01\x1a\x9b\x01\n\tRouteRule\x12\x46\n\x07matches\x18\x01 \x03(\x0b\x32\x35.google.cloud.networkservices.v1.HttpRoute.RouteMatch\x12\x46\n\x06\x61\x63tion\x18\x02 \x01(\x0b\x32\x36.google.cloud.networkservices.v1.HttpRoute.RouteAction\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:n\xea\x41k\n(networkservices.googleapis.com/HttpRoute\x12?projects/{project}/locations/{location}/httpRoutes/{http_route}\"\xba\x01\n\x15ListHttpRoutesRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\x12(networkservices.googleapis.com/HttpRoute\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12#\n\x16return_partial_success\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x87\x01\n\x16ListHttpRoutesResponse\x12?\n\x0bhttp_routes\x18\x01 \x03(\x0b\x32*.google.cloud.networkservices.v1.HttpRoute\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"U\n\x13GetHttpRouteRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(networkservices.googleapis.com/HttpRoute\"\xdc\x01\n\x16\x43reateHttpRouteRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\x12(networkservices.googleapis.com/HttpRoute\x12\x1a\n\rhttp_route_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x43\n\nhttp_route\x18\x03 \x01(\x0b\x32*.google.cloud.networkservices.v1.HttpRouteB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x04 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\x93\x01\n\x16UpdateHttpRouteRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x12\x43\n\nhttp_route\x18\x02 \x01(\x0b\x32*.google.cloud.networkservices.v1.HttpRouteB\x03\xe0\x41\x02\"X\n\x16\x44\x65leteHttpRouteRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(networkservices.googleapis.com/HttpRouteB\xef\x01\n#com.google.cloud.networkservices.v1B\x0eHttpRouteProtoP\x01ZMcloud.google.com/go/networkservices/apiv1/networkservicespb;networkservicespb\xaa\x02\x1fGoogle.Cloud.NetworkServices.V1\xca\x02\x1fGoogle\\Cloud\\NetworkServices\\V1\xea\x02\"Google::Cloud::NetworkServices::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module NetworkServices + module V1 + HttpRoute = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.HttpRoute").msgclass + HttpRoute::HeaderMatch = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.HttpRoute.HeaderMatch").msgclass + HttpRoute::HeaderMatch::IntegerRange = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.HttpRoute.HeaderMatch.IntegerRange").msgclass + HttpRoute::QueryParameterMatch = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.HttpRoute.QueryParameterMatch").msgclass + HttpRoute::RouteMatch = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.HttpRoute.RouteMatch").msgclass + HttpRoute::Destination = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.HttpRoute.Destination").msgclass + HttpRoute::Redirect = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.HttpRoute.Redirect").msgclass + HttpRoute::Redirect::ResponseCode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.HttpRoute.Redirect.ResponseCode").enummodule + HttpRoute::FaultInjectionPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.HttpRoute.FaultInjectionPolicy").msgclass + HttpRoute::FaultInjectionPolicy::Delay = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.HttpRoute.FaultInjectionPolicy.Delay").msgclass + HttpRoute::FaultInjectionPolicy::Abort = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.HttpRoute.FaultInjectionPolicy.Abort").msgclass + HttpRoute::StatefulSessionAffinityPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.HttpRoute.StatefulSessionAffinityPolicy").msgclass + HttpRoute::HeaderModifier = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.HttpRoute.HeaderModifier").msgclass + HttpRoute::URLRewrite = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.HttpRoute.URLRewrite").msgclass + HttpRoute::RetryPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.HttpRoute.RetryPolicy").msgclass + HttpRoute::RequestMirrorPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.HttpRoute.RequestMirrorPolicy").msgclass + HttpRoute::CorsPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.HttpRoute.CorsPolicy").msgclass + HttpRoute::HttpDirectResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.HttpRoute.HttpDirectResponse").msgclass + HttpRoute::RouteAction = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.HttpRoute.RouteAction").msgclass + HttpRoute::RouteRule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.HttpRoute.RouteRule").msgclass + ListHttpRoutesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.ListHttpRoutesRequest").msgclass + ListHttpRoutesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.ListHttpRoutesResponse").msgclass + GetHttpRouteRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.GetHttpRouteRequest").msgclass + CreateHttpRouteRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.CreateHttpRouteRequest").msgclass + UpdateHttpRouteRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.UpdateHttpRouteRequest").msgclass + DeleteHttpRouteRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.DeleteHttpRouteRequest").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/mesh_pb.rb b/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/mesh_pb.rb new file mode 100644 index 000000000000..876e2212ea88 --- /dev/null +++ b/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/mesh_pb.rb @@ -0,0 +1,33 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/networkservices/v1/mesh.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/cloud/networkservices/v1/common_pb' +require 'google/protobuf/field_mask_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n*google/cloud/networkservices/v1/mesh.proto\x12\x1fgoogle.cloud.networkservices.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a,google/cloud/networkservices/v1/common.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x9f\x04\n\x04Mesh\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x16\n\tself_link\x18\t \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x46\n\x06labels\x18\x04 \x03(\x0b\x32\x31.google.cloud.networkservices.v1.Mesh.LabelsEntryB\x03\xe0\x41\x01\x12\x18\n\x0b\x64\x65scription\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x1e\n\x11interception_port\x18\x08 \x01(\x05\x42\x03\xe0\x41\x01\x12N\n\renvoy_headers\x18\x10 \x01(\x0e\x32-.google.cloud.networkservices.v1.EnvoyHeadersB\x03\xe0\x41\x01H\x00\x88\x01\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:m\xea\x41j\n#networkservices.googleapis.com/Mesh\x12\x35projects/{project}/locations/{location}/meshes/{mesh}*\x06meshes2\x04meshB\x10\n\x0e_envoy_headers\"\x9c\x01\n\x11ListMeshesRequest\x12;\n\x06parent\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\x12#networkservices.googleapis.com/Mesh\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12#\n\x16return_partial_success\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"y\n\x12ListMeshesResponse\x12\x35\n\x06meshes\x18\x01 \x03(\x0b\x32%.google.cloud.networkservices.v1.Mesh\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"K\n\x0eGetMeshRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#networkservices.googleapis.com/Mesh\"\xa0\x01\n\x11\x43reateMeshRequest\x12;\n\x06parent\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\x12#networkservices.googleapis.com/Mesh\x12\x14\n\x07mesh_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x38\n\x04mesh\x18\x03 \x01(\x0b\x32%.google.cloud.networkservices.v1.MeshB\x03\xe0\x41\x02\"\x83\x01\n\x11UpdateMeshRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x12\x38\n\x04mesh\x18\x02 \x01(\x0b\x32%.google.cloud.networkservices.v1.MeshB\x03\xe0\x41\x02\"N\n\x11\x44\x65leteMeshRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#networkservices.googleapis.com/MeshB\xe4\x02\n#com.google.cloud.networkservices.v1B\tMeshProtoP\x01ZMcloud.google.com/go/networkservices/apiv1/networkservicespb;networkservicespb\xaa\x02\x1fGoogle.Cloud.NetworkServices.V1\xca\x02\x1fGoogle\\Cloud\\NetworkServices\\V1\xea\x02\"Google::Cloud::NetworkServices::V1\xea\x41w\n(compute.googleapis.com/ServiceAttachment\x12Kprojects/{project}/regions/{region}/serviceAttachments/{service_attachment}b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module NetworkServices + module V1 + Mesh = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.Mesh").msgclass + ListMeshesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.ListMeshesRequest").msgclass + ListMeshesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.ListMeshesResponse").msgclass + GetMeshRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.GetMeshRequest").msgclass + CreateMeshRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.CreateMeshRequest").msgclass + UpdateMeshRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.UpdateMeshRequest").msgclass + DeleteMeshRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.DeleteMeshRequest").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/network_services_pb.rb b/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/network_services_pb.rb new file mode 100644 index 000000000000..83a16384a07d --- /dev/null +++ b/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/network_services_pb.rb @@ -0,0 +1,38 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/networkservices/v1/network_services.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/cloud/networkservices/v1/agent_gateway_pb' +require 'google/cloud/networkservices/v1/common_pb' +require 'google/cloud/networkservices/v1/endpoint_policy_pb' +require 'google/cloud/networkservices/v1/extensibility_pb' +require 'google/cloud/networkservices/v1/gateway_pb' +require 'google/cloud/networkservices/v1/grpc_route_pb' +require 'google/cloud/networkservices/v1/http_route_pb' +require 'google/cloud/networkservices/v1/mesh_pb' +require 'google/cloud/networkservices/v1/route_view_pb' +require 'google/cloud/networkservices/v1/service_binding_pb' +require 'google/cloud/networkservices/v1/service_lb_policy_pb' +require 'google/cloud/networkservices/v1/tcp_route_pb' +require 'google/cloud/networkservices/v1/tls_route_pb' +require 'google/longrunning/operations_pb' +require 'google/protobuf/empty_pb' + + +descriptor_data = "\n6google/cloud/networkservices/v1/network_services.proto\x12\x1fgoogle.cloud.networkservices.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x33google/cloud/networkservices/v1/agent_gateway.proto\x1a,google/cloud/networkservices/v1/common.proto\x1a\x35google/cloud/networkservices/v1/endpoint_policy.proto\x1a\x33google/cloud/networkservices/v1/extensibility.proto\x1a-google/cloud/networkservices/v1/gateway.proto\x1a\x30google/cloud/networkservices/v1/grpc_route.proto\x1a\x30google/cloud/networkservices/v1/http_route.proto\x1a*google/cloud/networkservices/v1/mesh.proto\x1a\x30google/cloud/networkservices/v1/route_view.proto\x1a\x35google/cloud/networkservices/v1/service_binding.proto\x1a\x37google/cloud/networkservices/v1/service_lb_policy.proto\x1a/google/cloud/networkservices/v1/tcp_route.proto\x1a/google/cloud/networkservices/v1/tls_route.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto2\xa7w\n\x0fNetworkServices\x12\xda\x01\n\x14ListEndpointPolicies\x12<.google.cloud.networkservices.v1.ListEndpointPoliciesRequest\x1a=.google.cloud.networkservices.v1.ListEndpointPoliciesResponse\"E\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x36\x12\x34/v1/{parent=projects/*/locations/*}/endpointPolicies\x12\xc4\x01\n\x11GetEndpointPolicy\x12\x39.google.cloud.networkservices.v1.GetEndpointPolicyRequest\x1a/.google.cloud.networkservices.v1.EndpointPolicy\"C\xda\x41\x04name\x82\xd3\xe4\x93\x02\x36\x12\x34/v1/{name=projects/*/locations/*/endpointPolicies/*}\x12\xb5\x02\n\x14\x43reateEndpointPolicy\x12<.google.cloud.networkservices.v1.CreateEndpointPolicyRequest\x1a\x1d.google.longrunning.Operation\"\xbf\x01\xca\x41\x43\n\x0e\x45ndpointPolicy\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41)parent,endpoint_policy,endpoint_policy_id\x82\xd3\xe4\x93\x02G\"4/v1/{parent=projects/*/locations/*}/endpointPolicies:\x0f\x65ndpoint_policy\x12\xb7\x02\n\x14UpdateEndpointPolicy\x12<.google.cloud.networkservices.v1.UpdateEndpointPolicyRequest\x1a\x1d.google.longrunning.Operation\"\xc1\x01\xca\x41\x43\n\x0e\x45ndpointPolicy\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x1b\x65ndpoint_policy,update_mask\x82\xd3\xe4\x93\x02W2D/v1/{endpoint_policy.name=projects/*/locations/*/endpointPolicies/*}:\x0f\x65ndpoint_policy\x12\x86\x02\n\x14\x44\x65leteEndpointPolicy\x12<.google.cloud.networkservices.v1.DeleteEndpointPolicyRequest\x1a\x1d.google.longrunning.Operation\"\x90\x01\xca\x41J\n\x15google.protobuf.Empty\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x36*4/v1/{name=projects/*/locations/*/endpointPolicies/*}\x12\xe6\x01\n\x16ListWasmPluginVersions\x12>.google.cloud.networkservices.v1.ListWasmPluginVersionsRequest\x1a?.google.cloud.networkservices.v1.ListWasmPluginVersionsResponse\"K\xda\x41\x06parent\x82\xd3\xe4\x93\x02<\x12:/v1/{parent=projects/*/locations/*/wasmPlugins/*}/versions\x12\xd3\x01\n\x14GetWasmPluginVersion\x12<.google.cloud.networkservices.v1.GetWasmPluginVersionRequest\x1a\x32.google.cloud.networkservices.v1.WasmPluginVersion\"I\xda\x41\x04name\x82\xd3\xe4\x93\x02<\x12:/v1/{name=projects/*/locations/*/wasmPlugins/*/versions/*}\x12\xd0\x02\n\x17\x43reateWasmPluginVersion\x12?.google.cloud.networkservices.v1.CreateWasmPluginVersionRequest\x1a\x1d.google.longrunning.Operation\"\xd4\x01\xca\x41\x46\n\x11WasmPluginVersion\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x31parent,wasm_plugin_version,wasm_plugin_version_id\x82\xd3\xe4\x93\x02Q\":/v1/{parent=projects/*/locations/*/wasmPlugins/*}/versions:\x13wasm_plugin_version\x12\x92\x02\n\x17\x44\x65leteWasmPluginVersion\x12?.google.cloud.networkservices.v1.DeleteWasmPluginVersionRequest\x1a\x1d.google.longrunning.Operation\"\x96\x01\xca\x41J\n\x15google.protobuf.Empty\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02<*:/v1/{name=projects/*/locations/*/wasmPlugins/*/versions/*}\x12\xc6\x01\n\x0fListWasmPlugins\x12\x37.google.cloud.networkservices.v1.ListWasmPluginsRequest\x1a\x38.google.cloud.networkservices.v1.ListWasmPluginsResponse\"@\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x31\x12//v1/{parent=projects/*/locations/*}/wasmPlugins\x12\xb3\x01\n\rGetWasmPlugin\x12\x35.google.cloud.networkservices.v1.GetWasmPluginRequest\x1a+.google.cloud.networkservices.v1.WasmPlugin\">\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31\x12//v1/{name=projects/*/locations/*/wasmPlugins/*}\x12\x98\x02\n\x10\x43reateWasmPlugin\x12\x38.google.cloud.networkservices.v1.CreateWasmPluginRequest\x1a\x1d.google.longrunning.Operation\"\xaa\x01\xca\x41?\n\nWasmPlugin\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41!parent,wasm_plugin,wasm_plugin_id\x82\xd3\xe4\x93\x02>\"//v1/{parent=projects/*/locations/*}/wasmPlugins:\x0bwasm_plugin\x12\x9a\x02\n\x10UpdateWasmPlugin\x12\x38.google.cloud.networkservices.v1.UpdateWasmPluginRequest\x1a\x1d.google.longrunning.Operation\"\xac\x01\xca\x41?\n\nWasmPlugin\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x17wasm_plugin,update_mask\x82\xd3\xe4\x93\x02J2;/v1/{wasm_plugin.name=projects/*/locations/*/wasmPlugins/*}:\x0bwasm_plugin\x12\xf9\x01\n\x10\x44\x65leteWasmPlugin\x12\x38.google.cloud.networkservices.v1.DeleteWasmPluginRequest\x1a\x1d.google.longrunning.Operation\"\x8b\x01\xca\x41J\n\x15google.protobuf.Empty\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31*//v1/{name=projects/*/locations/*/wasmPlugins/*}\x12\xba\x01\n\x0cListGateways\x12\x34.google.cloud.networkservices.v1.ListGatewaysRequest\x1a\x35.google.cloud.networkservices.v1.ListGatewaysResponse\"=\xda\x41\x06parent\x82\xd3\xe4\x93\x02.\x12,/v1/{parent=projects/*/locations/*}/gateways\x12\xa7\x01\n\nGetGateway\x12\x32.google.cloud.networkservices.v1.GetGatewayRequest\x1a(.google.cloud.networkservices.v1.Gateway\";\xda\x41\x04name\x82\xd3\xe4\x93\x02.\x12,/v1/{name=projects/*/locations/*/gateways/*}\x12\x80\x02\n\rCreateGateway\x12\x35.google.cloud.networkservices.v1.CreateGatewayRequest\x1a\x1d.google.longrunning.Operation\"\x98\x01\xca\x41<\n\x07Gateway\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x19parent,gateway,gateway_id\x82\xd3\xe4\x93\x02\x37\",/v1/{parent=projects/*/locations/*}/gateways:\x07gateway\x12\x82\x02\n\rUpdateGateway\x12\x35.google.cloud.networkservices.v1.UpdateGatewayRequest\x1a\x1d.google.longrunning.Operation\"\x9a\x01\xca\x41<\n\x07Gateway\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x13gateway,update_mask\x82\xd3\xe4\x93\x02?24/v1/{gateway.name=projects/*/locations/*/gateways/*}:\x07gateway\x12\xf0\x01\n\rDeleteGateway\x12\x35.google.cloud.networkservices.v1.DeleteGatewayRequest\x1a\x1d.google.longrunning.Operation\"\x88\x01\xca\x41J\n\x15google.protobuf.Empty\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02.*,/v1/{name=projects/*/locations/*/gateways/*}\x12\xc2\x01\n\x0eListGrpcRoutes\x12\x36.google.cloud.networkservices.v1.ListGrpcRoutesRequest\x1a\x37.google.cloud.networkservices.v1.ListGrpcRoutesResponse\"?\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x30\x12./v1/{parent=projects/*/locations/*}/grpcRoutes\x12\xaf\x01\n\x0cGetGrpcRoute\x12\x34.google.cloud.networkservices.v1.GetGrpcRouteRequest\x1a*.google.cloud.networkservices.v1.GrpcRoute\"=\xda\x41\x04name\x82\xd3\xe4\x93\x02\x30\x12./v1/{name=projects/*/locations/*/grpcRoutes/*}\x12\x91\x02\n\x0f\x43reateGrpcRoute\x12\x37.google.cloud.networkservices.v1.CreateGrpcRouteRequest\x1a\x1d.google.longrunning.Operation\"\xa5\x01\xca\x41>\n\tGrpcRoute\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x1fparent,grpc_route,grpc_route_id\x82\xd3\xe4\x93\x02<\"./v1/{parent=projects/*/locations/*}/grpcRoutes:\ngrpc_route\x12\x93\x02\n\x0fUpdateGrpcRoute\x12\x37.google.cloud.networkservices.v1.UpdateGrpcRouteRequest\x1a\x1d.google.longrunning.Operation\"\xa7\x01\xca\x41>\n\tGrpcRoute\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x16grpc_route,update_mask\x82\xd3\xe4\x93\x02G29/v1/{grpc_route.name=projects/*/locations/*/grpcRoutes/*}:\ngrpc_route\x12\xf6\x01\n\x0f\x44\x65leteGrpcRoute\x12\x37.google.cloud.networkservices.v1.DeleteGrpcRouteRequest\x1a\x1d.google.longrunning.Operation\"\x8a\x01\xca\x41J\n\x15google.protobuf.Empty\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x30*./v1/{name=projects/*/locations/*/grpcRoutes/*}\x12\xc2\x01\n\x0eListHttpRoutes\x12\x36.google.cloud.networkservices.v1.ListHttpRoutesRequest\x1a\x37.google.cloud.networkservices.v1.ListHttpRoutesResponse\"?\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x30\x12./v1/{parent=projects/*/locations/*}/httpRoutes\x12\xaf\x01\n\x0cGetHttpRoute\x12\x34.google.cloud.networkservices.v1.GetHttpRouteRequest\x1a*.google.cloud.networkservices.v1.HttpRoute\"=\xda\x41\x04name\x82\xd3\xe4\x93\x02\x30\x12./v1/{name=projects/*/locations/*/httpRoutes/*}\x12\x91\x02\n\x0f\x43reateHttpRoute\x12\x37.google.cloud.networkservices.v1.CreateHttpRouteRequest\x1a\x1d.google.longrunning.Operation\"\xa5\x01\xca\x41>\n\tHttpRoute\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x1fparent,http_route,http_route_id\x82\xd3\xe4\x93\x02<\"./v1/{parent=projects/*/locations/*}/httpRoutes:\nhttp_route\x12\x93\x02\n\x0fUpdateHttpRoute\x12\x37.google.cloud.networkservices.v1.UpdateHttpRouteRequest\x1a\x1d.google.longrunning.Operation\"\xa7\x01\xca\x41>\n\tHttpRoute\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x16http_route,update_mask\x82\xd3\xe4\x93\x02G29/v1/{http_route.name=projects/*/locations/*/httpRoutes/*}:\nhttp_route\x12\xf6\x01\n\x0f\x44\x65leteHttpRoute\x12\x37.google.cloud.networkservices.v1.DeleteHttpRouteRequest\x1a\x1d.google.longrunning.Operation\"\x8a\x01\xca\x41J\n\x15google.protobuf.Empty\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x30*./v1/{name=projects/*/locations/*/httpRoutes/*}\x12\xbe\x01\n\rListTcpRoutes\x12\x35.google.cloud.networkservices.v1.ListTcpRoutesRequest\x1a\x36.google.cloud.networkservices.v1.ListTcpRoutesResponse\">\xda\x41\x06parent\x82\xd3\xe4\x93\x02/\x12-/v1/{parent=projects/*/locations/*}/tcpRoutes\x12\xab\x01\n\x0bGetTcpRoute\x12\x33.google.cloud.networkservices.v1.GetTcpRouteRequest\x1a).google.cloud.networkservices.v1.TcpRoute\"<\xda\x41\x04name\x82\xd3\xe4\x93\x02/\x12-/v1/{name=projects/*/locations/*/tcpRoutes/*}\x12\x8a\x02\n\x0e\x43reateTcpRoute\x12\x36.google.cloud.networkservices.v1.CreateTcpRouteRequest\x1a\x1d.google.longrunning.Operation\"\xa0\x01\xca\x41=\n\x08TcpRoute\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x1dparent,tcp_route,tcp_route_id\x82\xd3\xe4\x93\x02:\"-/v1/{parent=projects/*/locations/*}/tcpRoutes:\ttcp_route\x12\x8c\x02\n\x0eUpdateTcpRoute\x12\x36.google.cloud.networkservices.v1.UpdateTcpRouteRequest\x1a\x1d.google.longrunning.Operation\"\xa2\x01\xca\x41=\n\x08TcpRoute\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x15tcp_route,update_mask\x82\xd3\xe4\x93\x02\x44\x32\x37/v1/{tcp_route.name=projects/*/locations/*/tcpRoutes/*}:\ttcp_route\x12\xf3\x01\n\x0e\x44\x65leteTcpRoute\x12\x36.google.cloud.networkservices.v1.DeleteTcpRouteRequest\x1a\x1d.google.longrunning.Operation\"\x89\x01\xca\x41J\n\x15google.protobuf.Empty\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02/*-/v1/{name=projects/*/locations/*/tcpRoutes/*}\x12\xbe\x01\n\rListTlsRoutes\x12\x35.google.cloud.networkservices.v1.ListTlsRoutesRequest\x1a\x36.google.cloud.networkservices.v1.ListTlsRoutesResponse\">\xda\x41\x06parent\x82\xd3\xe4\x93\x02/\x12-/v1/{parent=projects/*/locations/*}/tlsRoutes\x12\xab\x01\n\x0bGetTlsRoute\x12\x33.google.cloud.networkservices.v1.GetTlsRouteRequest\x1a).google.cloud.networkservices.v1.TlsRoute\"<\xda\x41\x04name\x82\xd3\xe4\x93\x02/\x12-/v1/{name=projects/*/locations/*/tlsRoutes/*}\x12\x8a\x02\n\x0e\x43reateTlsRoute\x12\x36.google.cloud.networkservices.v1.CreateTlsRouteRequest\x1a\x1d.google.longrunning.Operation\"\xa0\x01\xca\x41=\n\x08TlsRoute\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x1dparent,tls_route,tls_route_id\x82\xd3\xe4\x93\x02:\"-/v1/{parent=projects/*/locations/*}/tlsRoutes:\ttls_route\x12\x8c\x02\n\x0eUpdateTlsRoute\x12\x36.google.cloud.networkservices.v1.UpdateTlsRouteRequest\x1a\x1d.google.longrunning.Operation\"\xa2\x01\xca\x41=\n\x08TlsRoute\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x15tls_route,update_mask\x82\xd3\xe4\x93\x02\x44\x32\x37/v1/{tls_route.name=projects/*/locations/*/tlsRoutes/*}:\ttls_route\x12\xf3\x01\n\x0e\x44\x65leteTlsRoute\x12\x36.google.cloud.networkservices.v1.DeleteTlsRouteRequest\x1a\x1d.google.longrunning.Operation\"\x89\x01\xca\x41J\n\x15google.protobuf.Empty\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02/*-/v1/{name=projects/*/locations/*/tlsRoutes/*}\x12\xd6\x01\n\x13ListServiceBindings\x12;.google.cloud.networkservices.v1.ListServiceBindingsRequest\x1a<.google.cloud.networkservices.v1.ListServiceBindingsResponse\"D\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x35\x12\x33/v1/{parent=projects/*/locations/*}/serviceBindings\x12\xc3\x01\n\x11GetServiceBinding\x12\x39.google.cloud.networkservices.v1.GetServiceBindingRequest\x1a/.google.cloud.networkservices.v1.ServiceBinding\"B\xda\x41\x04name\x82\xd3\xe4\x93\x02\x35\x12\x33/v1/{name=projects/*/locations/*/serviceBindings/*}\x12\xb4\x02\n\x14\x43reateServiceBinding\x12<.google.cloud.networkservices.v1.CreateServiceBindingRequest\x1a\x1d.google.longrunning.Operation\"\xbe\x01\xca\x41\x43\n\x0eServiceBinding\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41)parent,service_binding,service_binding_id\x82\xd3\xe4\x93\x02\x46\"3/v1/{parent=projects/*/locations/*}/serviceBindings:\x0fservice_binding\x12\xb6\x02\n\x14UpdateServiceBinding\x12<.google.cloud.networkservices.v1.UpdateServiceBindingRequest\x1a\x1d.google.longrunning.Operation\"\xc0\x01\xca\x41\x43\n\x0eServiceBinding\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x1bservice_binding,update_mask\x82\xd3\xe4\x93\x02V2C/v1/{service_binding.name=projects/*/locations/*/serviceBindings/*}:\x0fservice_binding\x12\x85\x02\n\x14\x44\x65leteServiceBinding\x12<.google.cloud.networkservices.v1.DeleteServiceBindingRequest\x1a\x1d.google.longrunning.Operation\"\x8f\x01\xca\x41J\n\x15google.protobuf.Empty\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x35*3/v1/{name=projects/*/locations/*/serviceBindings/*}\x12\xb2\x01\n\nListMeshes\x12\x32.google.cloud.networkservices.v1.ListMeshesRequest\x1a\x33.google.cloud.networkservices.v1.ListMeshesResponse\";\xda\x41\x06parent\x82\xd3\xe4\x93\x02,\x12*/v1/{parent=projects/*/locations/*}/meshes\x12\x9c\x01\n\x07GetMesh\x12/.google.cloud.networkservices.v1.GetMeshRequest\x1a%.google.cloud.networkservices.v1.Mesh\"9\xda\x41\x04name\x82\xd3\xe4\x93\x02,\x12*/v1/{name=projects/*/locations/*/meshes/*}\x12\xec\x01\n\nCreateMesh\x12\x32.google.cloud.networkservices.v1.CreateMeshRequest\x1a\x1d.google.longrunning.Operation\"\x8a\x01\xca\x41\x39\n\x04Mesh\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x13parent,mesh,mesh_id\x82\xd3\xe4\x93\x02\x32\"*/v1/{parent=projects/*/locations/*}/meshes:\x04mesh\x12\xee\x01\n\nUpdateMesh\x12\x32.google.cloud.networkservices.v1.UpdateMeshRequest\x1a\x1d.google.longrunning.Operation\"\x8c\x01\xca\x41\x39\n\x04Mesh\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x10mesh,update_mask\x82\xd3\xe4\x93\x02\x37\x32//v1/{mesh.name=projects/*/locations/*/meshes/*}:\x04mesh\x12\xe8\x01\n\nDeleteMesh\x12\x32.google.cloud.networkservices.v1.DeleteMeshRequest\x1a\x1d.google.longrunning.Operation\"\x86\x01\xca\x41J\n\x15google.protobuf.Empty\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02,**/v1/{name=projects/*/locations/*/meshes/*}\x12\xde\x01\n\x15ListServiceLbPolicies\x12=.google.cloud.networkservices.v1.ListServiceLbPoliciesRequest\x1a>.google.cloud.networkservices.v1.ListServiceLbPoliciesResponse\"F\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x37\x12\x35/v1/{parent=projects/*/locations/*}/serviceLbPolicies\x12\xc8\x01\n\x12GetServiceLbPolicy\x12:.google.cloud.networkservices.v1.GetServiceLbPolicyRequest\x1a\x30.google.cloud.networkservices.v1.ServiceLbPolicy\"D\xda\x41\x04name\x82\xd3\xe4\x93\x02\x37\x12\x35/v1/{name=projects/*/locations/*/serviceLbPolicies/*}\x12\xbf\x02\n\x15\x43reateServiceLbPolicy\x12=.google.cloud.networkservices.v1.CreateServiceLbPolicyRequest\x1a\x1d.google.longrunning.Operation\"\xc7\x01\xca\x41\x44\n\x0fServiceLbPolicy\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41-parent,service_lb_policy,service_lb_policy_id\x82\xd3\xe4\x93\x02J\"5/v1/{parent=projects/*/locations/*}/serviceLbPolicies:\x11service_lb_policy\x12\xc1\x02\n\x15UpdateServiceLbPolicy\x12=.google.cloud.networkservices.v1.UpdateServiceLbPolicyRequest\x1a\x1d.google.longrunning.Operation\"\xc9\x01\xca\x41\x44\n\x0fServiceLbPolicy\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x1dservice_lb_policy,update_mask\x82\xd3\xe4\x93\x02\\2G/v1/{service_lb_policy.name=projects/*/locations/*/serviceLbPolicies/*}:\x11service_lb_policy\x12\x89\x02\n\x15\x44\x65leteServiceLbPolicy\x12=.google.cloud.networkservices.v1.DeleteServiceLbPolicyRequest\x1a\x1d.google.longrunning.Operation\"\x91\x01\xca\x41J\n\x15google.protobuf.Empty\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x37*5/v1/{name=projects/*/locations/*/serviceLbPolicies/*}\x12\xcf\x01\n\x13GetGatewayRouteView\x12;.google.cloud.networkservices.v1.GetGatewayRouteViewRequest\x1a\x31.google.cloud.networkservices.v1.GatewayRouteView\"H\xda\x41\x04name\x82\xd3\xe4\x93\x02;\x12\x39/v1/{name=projects/*/locations/*/gateways/*/routeViews/*}\x12\xc4\x01\n\x10GetMeshRouteView\x12\x38.google.cloud.networkservices.v1.GetMeshRouteViewRequest\x1a..google.cloud.networkservices.v1.MeshRouteView\"F\xda\x41\x04name\x82\xd3\xe4\x93\x02\x39\x12\x37/v1/{name=projects/*/locations/*/meshes/*/routeViews/*}\x12\xe2\x01\n\x15ListGatewayRouteViews\x12=.google.cloud.networkservices.v1.ListGatewayRouteViewsRequest\x1a>.google.cloud.networkservices.v1.ListGatewayRouteViewsResponse\"J\xda\x41\x06parent\x82\xd3\xe4\x93\x02;\x12\x39/v1/{parent=projects/*/locations/*/gateways/*}/routeViews\x12\xd7\x01\n\x12ListMeshRouteViews\x12:.google.cloud.networkservices.v1.ListMeshRouteViewsRequest\x1a;.google.cloud.networkservices.v1.ListMeshRouteViewsResponse\"H\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x39\x12\x37/v1/{parent=projects/*/locations/*/meshes/*}/routeViews\x12\xce\x01\n\x11ListAgentGateways\x12\x39.google.cloud.networkservices.v1.ListAgentGatewaysRequest\x1a:.google.cloud.networkservices.v1.ListAgentGatewaysResponse\"B\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x33\x12\x31/v1/{parent=projects/*/locations/*}/agentGateways\x12\xbb\x01\n\x0fGetAgentGateway\x12\x37.google.cloud.networkservices.v1.GetAgentGatewayRequest\x1a-.google.cloud.networkservices.v1.AgentGateway\"@\xda\x41\x04name\x82\xd3\xe4\x93\x02\x33\x12\x31/v1/{name=projects/*/locations/*/agentGateways/*}\x12\xa6\x02\n\x12\x43reateAgentGateway\x12:.google.cloud.networkservices.v1.CreateAgentGatewayRequest\x1a\x1d.google.longrunning.Operation\"\xb4\x01\xca\x41\x41\n\x0c\x41gentGateway\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41%parent,agent_gateway,agent_gateway_id\x82\xd3\xe4\x93\x02\x42\"1/v1/{parent=projects/*/locations/*}/agentGateways:\ragent_gateway\x12\xa8\x02\n\x12UpdateAgentGateway\x12:.google.cloud.networkservices.v1.UpdateAgentGatewayRequest\x1a\x1d.google.longrunning.Operation\"\xb6\x01\xca\x41\x41\n\x0c\x41gentGateway\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x19\x61gent_gateway,update_mask\x82\xd3\xe4\x93\x02P2?/v1/{agent_gateway.name=projects/*/locations/*/agentGateways/*}:\ragent_gateway\x12\xff\x01\n\x12\x44\x65leteAgentGateway\x12:.google.cloud.networkservices.v1.DeleteAgentGatewayRequest\x1a\x1d.google.longrunning.Operation\"\x8d\x01\xca\x41J\n\x15google.protobuf.Empty\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x33*1/v1/{name=projects/*/locations/*/agentGateways/*}\x1aR\xca\x41\x1enetworkservices.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xdf\x01\n#com.google.cloud.networkservices.v1P\x01ZMcloud.google.com/go/networkservices/apiv1/networkservicespb;networkservicespb\xaa\x02\x1fGoogle.Cloud.NetworkServices.V1\xca\x02\x1fGoogle\\Cloud\\NetworkServices\\V1\xea\x02\"Google::Cloud::NetworkServices::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module NetworkServices + module V1 + end + end + end +end diff --git a/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/network_services_services_pb.rb b/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/network_services_services_pb.rb new file mode 100644 index 000000000000..5b97cc3d7a24 --- /dev/null +++ b/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/network_services_services_pb.rb @@ -0,0 +1,173 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/cloud/networkservices/v1/network_services.proto for package 'Google.Cloud.NetworkServices.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/networkservices/v1/network_services_pb' + +module Google + module Cloud + module NetworkServices + module V1 + module NetworkServices + # Service describing handlers for resources. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.cloud.networkservices.v1.NetworkServices' + + # Lists EndpointPolicies in a given project and location. + rpc :ListEndpointPolicies, ::Google::Cloud::NetworkServices::V1::ListEndpointPoliciesRequest, ::Google::Cloud::NetworkServices::V1::ListEndpointPoliciesResponse + # Gets details of a single EndpointPolicy. + rpc :GetEndpointPolicy, ::Google::Cloud::NetworkServices::V1::GetEndpointPolicyRequest, ::Google::Cloud::NetworkServices::V1::EndpointPolicy + # Creates a new EndpointPolicy in a given project and location. + rpc :CreateEndpointPolicy, ::Google::Cloud::NetworkServices::V1::CreateEndpointPolicyRequest, ::Google::Longrunning::Operation + # Updates the parameters of a single EndpointPolicy. + rpc :UpdateEndpointPolicy, ::Google::Cloud::NetworkServices::V1::UpdateEndpointPolicyRequest, ::Google::Longrunning::Operation + # Deletes a single EndpointPolicy. + rpc :DeleteEndpointPolicy, ::Google::Cloud::NetworkServices::V1::DeleteEndpointPolicyRequest, ::Google::Longrunning::Operation + # Lists `WasmPluginVersion` resources in a given project and + # location. + rpc :ListWasmPluginVersions, ::Google::Cloud::NetworkServices::V1::ListWasmPluginVersionsRequest, ::Google::Cloud::NetworkServices::V1::ListWasmPluginVersionsResponse + # Gets details of the specified `WasmPluginVersion` resource. + rpc :GetWasmPluginVersion, ::Google::Cloud::NetworkServices::V1::GetWasmPluginVersionRequest, ::Google::Cloud::NetworkServices::V1::WasmPluginVersion + # Creates a new `WasmPluginVersion` resource in a given project + # and location. + rpc :CreateWasmPluginVersion, ::Google::Cloud::NetworkServices::V1::CreateWasmPluginVersionRequest, ::Google::Longrunning::Operation + # Deletes the specified `WasmPluginVersion` resource. + rpc :DeleteWasmPluginVersion, ::Google::Cloud::NetworkServices::V1::DeleteWasmPluginVersionRequest, ::Google::Longrunning::Operation + # Lists `WasmPlugin` resources in a given project and + # location. + rpc :ListWasmPlugins, ::Google::Cloud::NetworkServices::V1::ListWasmPluginsRequest, ::Google::Cloud::NetworkServices::V1::ListWasmPluginsResponse + # Gets details of the specified `WasmPlugin` resource. + rpc :GetWasmPlugin, ::Google::Cloud::NetworkServices::V1::GetWasmPluginRequest, ::Google::Cloud::NetworkServices::V1::WasmPlugin + # Creates a new `WasmPlugin` resource in a given project + # and location. + rpc :CreateWasmPlugin, ::Google::Cloud::NetworkServices::V1::CreateWasmPluginRequest, ::Google::Longrunning::Operation + # Updates the parameters of the specified `WasmPlugin` resource. + rpc :UpdateWasmPlugin, ::Google::Cloud::NetworkServices::V1::UpdateWasmPluginRequest, ::Google::Longrunning::Operation + # Deletes the specified `WasmPlugin` resource. + rpc :DeleteWasmPlugin, ::Google::Cloud::NetworkServices::V1::DeleteWasmPluginRequest, ::Google::Longrunning::Operation + # Lists Gateways in a given project and location. + rpc :ListGateways, ::Google::Cloud::NetworkServices::V1::ListGatewaysRequest, ::Google::Cloud::NetworkServices::V1::ListGatewaysResponse + # Gets details of a single Gateway. + rpc :GetGateway, ::Google::Cloud::NetworkServices::V1::GetGatewayRequest, ::Google::Cloud::NetworkServices::V1::Gateway + # Creates a new Gateway in a given project and location. + rpc :CreateGateway, ::Google::Cloud::NetworkServices::V1::CreateGatewayRequest, ::Google::Longrunning::Operation + # Updates the parameters of a single Gateway. + rpc :UpdateGateway, ::Google::Cloud::NetworkServices::V1::UpdateGatewayRequest, ::Google::Longrunning::Operation + # Deletes a single Gateway. + rpc :DeleteGateway, ::Google::Cloud::NetworkServices::V1::DeleteGatewayRequest, ::Google::Longrunning::Operation + # Lists GrpcRoutes in a given project and location. + rpc :ListGrpcRoutes, ::Google::Cloud::NetworkServices::V1::ListGrpcRoutesRequest, ::Google::Cloud::NetworkServices::V1::ListGrpcRoutesResponse + # Gets details of a single GrpcRoute. + rpc :GetGrpcRoute, ::Google::Cloud::NetworkServices::V1::GetGrpcRouteRequest, ::Google::Cloud::NetworkServices::V1::GrpcRoute + # Creates a new GrpcRoute in a given project and location. + rpc :CreateGrpcRoute, ::Google::Cloud::NetworkServices::V1::CreateGrpcRouteRequest, ::Google::Longrunning::Operation + # Updates the parameters of a single GrpcRoute. + rpc :UpdateGrpcRoute, ::Google::Cloud::NetworkServices::V1::UpdateGrpcRouteRequest, ::Google::Longrunning::Operation + # Deletes a single GrpcRoute. + rpc :DeleteGrpcRoute, ::Google::Cloud::NetworkServices::V1::DeleteGrpcRouteRequest, ::Google::Longrunning::Operation + # Lists HttpRoute in a given project and location. + rpc :ListHttpRoutes, ::Google::Cloud::NetworkServices::V1::ListHttpRoutesRequest, ::Google::Cloud::NetworkServices::V1::ListHttpRoutesResponse + # Gets details of a single HttpRoute. + rpc :GetHttpRoute, ::Google::Cloud::NetworkServices::V1::GetHttpRouteRequest, ::Google::Cloud::NetworkServices::V1::HttpRoute + # Creates a new HttpRoute in a given project and location. + rpc :CreateHttpRoute, ::Google::Cloud::NetworkServices::V1::CreateHttpRouteRequest, ::Google::Longrunning::Operation + # Updates the parameters of a single HttpRoute. + rpc :UpdateHttpRoute, ::Google::Cloud::NetworkServices::V1::UpdateHttpRouteRequest, ::Google::Longrunning::Operation + # Deletes a single HttpRoute. + rpc :DeleteHttpRoute, ::Google::Cloud::NetworkServices::V1::DeleteHttpRouteRequest, ::Google::Longrunning::Operation + # Lists TcpRoute in a given project and location. + rpc :ListTcpRoutes, ::Google::Cloud::NetworkServices::V1::ListTcpRoutesRequest, ::Google::Cloud::NetworkServices::V1::ListTcpRoutesResponse + # Gets details of a single TcpRoute. + rpc :GetTcpRoute, ::Google::Cloud::NetworkServices::V1::GetTcpRouteRequest, ::Google::Cloud::NetworkServices::V1::TcpRoute + # Creates a new TcpRoute in a given project and location. + rpc :CreateTcpRoute, ::Google::Cloud::NetworkServices::V1::CreateTcpRouteRequest, ::Google::Longrunning::Operation + # Updates the parameters of a single TcpRoute. + rpc :UpdateTcpRoute, ::Google::Cloud::NetworkServices::V1::UpdateTcpRouteRequest, ::Google::Longrunning::Operation + # Deletes a single TcpRoute. + rpc :DeleteTcpRoute, ::Google::Cloud::NetworkServices::V1::DeleteTcpRouteRequest, ::Google::Longrunning::Operation + # Lists TlsRoute in a given project and location. + rpc :ListTlsRoutes, ::Google::Cloud::NetworkServices::V1::ListTlsRoutesRequest, ::Google::Cloud::NetworkServices::V1::ListTlsRoutesResponse + # Gets details of a single TlsRoute. + rpc :GetTlsRoute, ::Google::Cloud::NetworkServices::V1::GetTlsRouteRequest, ::Google::Cloud::NetworkServices::V1::TlsRoute + # Creates a new TlsRoute in a given project and location. + rpc :CreateTlsRoute, ::Google::Cloud::NetworkServices::V1::CreateTlsRouteRequest, ::Google::Longrunning::Operation + # Updates the parameters of a single TlsRoute. + rpc :UpdateTlsRoute, ::Google::Cloud::NetworkServices::V1::UpdateTlsRouteRequest, ::Google::Longrunning::Operation + # Deletes a single TlsRoute. + rpc :DeleteTlsRoute, ::Google::Cloud::NetworkServices::V1::DeleteTlsRouteRequest, ::Google::Longrunning::Operation + # Lists ServiceBinding in a given project and location. + rpc :ListServiceBindings, ::Google::Cloud::NetworkServices::V1::ListServiceBindingsRequest, ::Google::Cloud::NetworkServices::V1::ListServiceBindingsResponse + # Gets details of a single ServiceBinding. + rpc :GetServiceBinding, ::Google::Cloud::NetworkServices::V1::GetServiceBindingRequest, ::Google::Cloud::NetworkServices::V1::ServiceBinding + # Creates a new ServiceBinding in a given project and location. + rpc :CreateServiceBinding, ::Google::Cloud::NetworkServices::V1::CreateServiceBindingRequest, ::Google::Longrunning::Operation + # Updates the parameters of a single ServiceBinding. + rpc :UpdateServiceBinding, ::Google::Cloud::NetworkServices::V1::UpdateServiceBindingRequest, ::Google::Longrunning::Operation + # Deletes a single ServiceBinding. + rpc :DeleteServiceBinding, ::Google::Cloud::NetworkServices::V1::DeleteServiceBindingRequest, ::Google::Longrunning::Operation + # Lists Meshes in a given project and location. + rpc :ListMeshes, ::Google::Cloud::NetworkServices::V1::ListMeshesRequest, ::Google::Cloud::NetworkServices::V1::ListMeshesResponse + # Gets details of a single Mesh. + rpc :GetMesh, ::Google::Cloud::NetworkServices::V1::GetMeshRequest, ::Google::Cloud::NetworkServices::V1::Mesh + # Creates a new Mesh in a given project and location. + rpc :CreateMesh, ::Google::Cloud::NetworkServices::V1::CreateMeshRequest, ::Google::Longrunning::Operation + # Updates the parameters of a single Mesh. + rpc :UpdateMesh, ::Google::Cloud::NetworkServices::V1::UpdateMeshRequest, ::Google::Longrunning::Operation + # Deletes a single Mesh. + rpc :DeleteMesh, ::Google::Cloud::NetworkServices::V1::DeleteMeshRequest, ::Google::Longrunning::Operation + # Lists ServiceLbPolicies in a given project and location. + rpc :ListServiceLbPolicies, ::Google::Cloud::NetworkServices::V1::ListServiceLbPoliciesRequest, ::Google::Cloud::NetworkServices::V1::ListServiceLbPoliciesResponse + # Gets details of a single ServiceLbPolicy. + rpc :GetServiceLbPolicy, ::Google::Cloud::NetworkServices::V1::GetServiceLbPolicyRequest, ::Google::Cloud::NetworkServices::V1::ServiceLbPolicy + # Creates a new ServiceLbPolicy in a given project and location. + rpc :CreateServiceLbPolicy, ::Google::Cloud::NetworkServices::V1::CreateServiceLbPolicyRequest, ::Google::Longrunning::Operation + # Updates the parameters of a single ServiceLbPolicy. + rpc :UpdateServiceLbPolicy, ::Google::Cloud::NetworkServices::V1::UpdateServiceLbPolicyRequest, ::Google::Longrunning::Operation + # Deletes a single ServiceLbPolicy. + rpc :DeleteServiceLbPolicy, ::Google::Cloud::NetworkServices::V1::DeleteServiceLbPolicyRequest, ::Google::Longrunning::Operation + # Get a single RouteView of a Gateway. + rpc :GetGatewayRouteView, ::Google::Cloud::NetworkServices::V1::GetGatewayRouteViewRequest, ::Google::Cloud::NetworkServices::V1::GatewayRouteView + # Get a single RouteView of a Mesh. + rpc :GetMeshRouteView, ::Google::Cloud::NetworkServices::V1::GetMeshRouteViewRequest, ::Google::Cloud::NetworkServices::V1::MeshRouteView + # Lists RouteViews + rpc :ListGatewayRouteViews, ::Google::Cloud::NetworkServices::V1::ListGatewayRouteViewsRequest, ::Google::Cloud::NetworkServices::V1::ListGatewayRouteViewsResponse + # Lists RouteViews + rpc :ListMeshRouteViews, ::Google::Cloud::NetworkServices::V1::ListMeshRouteViewsRequest, ::Google::Cloud::NetworkServices::V1::ListMeshRouteViewsResponse + # Lists AgentGateways in a given project and location. + rpc :ListAgentGateways, ::Google::Cloud::NetworkServices::V1::ListAgentGatewaysRequest, ::Google::Cloud::NetworkServices::V1::ListAgentGatewaysResponse + # Gets details of a single AgentGateway. + rpc :GetAgentGateway, ::Google::Cloud::NetworkServices::V1::GetAgentGatewayRequest, ::Google::Cloud::NetworkServices::V1::AgentGateway + # Creates a new AgentGateway in a given project and location. + rpc :CreateAgentGateway, ::Google::Cloud::NetworkServices::V1::CreateAgentGatewayRequest, ::Google::Longrunning::Operation + # Updates the parameters of a single AgentGateway. + rpc :UpdateAgentGateway, ::Google::Cloud::NetworkServices::V1::UpdateAgentGatewayRequest, ::Google::Longrunning::Operation + # Deletes a single AgentGateway. + rpc :DeleteAgentGateway, ::Google::Cloud::NetworkServices::V1::DeleteAgentGatewayRequest, ::Google::Longrunning::Operation + end + + Stub = Service.rpc_stub_class + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/route_view_pb.rb b/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/route_view_pb.rb new file mode 100644 index 000000000000..24479529c303 --- /dev/null +++ b/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/route_view_pb.rb @@ -0,0 +1,31 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/networkservices/v1/route_view.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\n0google/cloud/networkservices/v1/route_view.proto\x12\x1fgoogle.cloud.networkservices.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xc9\x02\n\x10GatewayRouteView\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x03\xe0\x41\x08\x12!\n\x14route_project_number\x18\x02 \x01(\x03\x42\x03\xe0\x41\x03\x12\x1b\n\x0eroute_location\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x17\n\nroute_type\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\x15\n\x08route_id\x18\x05 \x01(\tB\x03\xe0\x41\x03:\xae\x01\xea\x41\xaa\x01\n/networkservices.googleapis.com/GatewayRouteView\x12Rprojects/{project}/locations/{location}/gateways/{gateway}/routeViews/{route_view}*\x11gatewayRouteViews2\x10gatewayRouteView\"\xb8\x02\n\rMeshRouteView\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x03\xe0\x41\x08\x12!\n\x14route_project_number\x18\x02 \x01(\x03\x42\x03\xe0\x41\x03\x12\x1b\n\x0eroute_location\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x17\n\nroute_type\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\x15\n\x08route_id\x18\x05 \x01(\tB\x03\xe0\x41\x03:\xa0\x01\xea\x41\x9c\x01\n,networkservices.googleapis.com/MeshRouteView\x12Mprojects/{project}/locations/{location}/meshes/{mesh}/routeViews/{route_view}*\x0emeshRouteViews2\rmeshRouteView\"c\n\x1aGetGatewayRouteViewRequest\x12\x45\n\x04name\x18\x01 \x01(\tB7\xe0\x41\x02\xfa\x41\x31\n/networkservices.googleapis.com/GatewayRouteView\"]\n\x17GetMeshRouteViewRequest\x12\x42\n\x04name\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\n,networkservices.googleapis.com/MeshRouteView\"\x8e\x01\n\x1cListGatewayRouteViewsRequest\x12G\n\x06parent\x18\x01 \x01(\tB7\xe0\x41\x02\xfa\x41\x31\x12/networkservices.googleapis.com/GatewayRouteView\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"\x88\x01\n\x19ListMeshRouteViewsRequest\x12\x44\n\x06parent\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\x12,networkservices.googleapis.com/MeshRouteView\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"\x9d\x01\n\x1dListGatewayRouteViewsResponse\x12N\n\x13gateway_route_views\x18\x01 \x03(\x0b\x32\x31.google.cloud.networkservices.v1.GatewayRouteView\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"\x94\x01\n\x1aListMeshRouteViewsResponse\x12H\n\x10mesh_route_views\x18\x01 \x03(\x0b\x32..google.cloud.networkservices.v1.MeshRouteView\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\tB\xef\x01\n#com.google.cloud.networkservices.v1B\x0eRouteViewProtoP\x01ZMcloud.google.com/go/networkservices/apiv1/networkservicespb;networkservicespb\xaa\x02\x1fGoogle.Cloud.NetworkServices.V1\xca\x02\x1fGoogle\\Cloud\\NetworkServices\\V1\xea\x02\"Google::Cloud::NetworkServices::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module NetworkServices + module V1 + GatewayRouteView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.GatewayRouteView").msgclass + MeshRouteView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.MeshRouteView").msgclass + GetGatewayRouteViewRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.GetGatewayRouteViewRequest").msgclass + GetMeshRouteViewRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.GetMeshRouteViewRequest").msgclass + ListGatewayRouteViewsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.ListGatewayRouteViewsRequest").msgclass + ListMeshRouteViewsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.ListMeshRouteViewsRequest").msgclass + ListGatewayRouteViewsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.ListGatewayRouteViewsResponse").msgclass + ListMeshRouteViewsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.ListMeshRouteViewsResponse").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/service_binding_pb.rb b/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/service_binding_pb.rb new file mode 100644 index 000000000000..ee63ef59e8ca --- /dev/null +++ b/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/service_binding_pb.rb @@ -0,0 +1,33 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/networkservices/v1/service_binding.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/field_info_pb' +require 'google/api/resource_pb' +require 'google/protobuf/field_mask_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n5google/cloud/networkservices/v1/service_binding.proto\x12\x1fgoogle.cloud.networkservices.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1bgoogle/api/field_info.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x88\x04\n\x0eServiceBinding\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x18\n\x0b\x64\x65scription\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x34\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x42\n\x07service\x18\x05 \x01(\tB1\x18\x01\xe0\x41\x01\xfa\x41)\n\'servicedirectory.googleapis.com/Service\x12\x19\n\nservice_id\x18\x08 \x01(\tB\x05\x18\x01\xe0\x41\x03\x12P\n\x06labels\x18\x07 \x03(\x0b\x32;.google.cloud.networkservices.v1.ServiceBinding.LabelsEntryB\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:}\xea\x41z\n-networkservices.googleapis.com/ServiceBinding\x12Iprojects/{project}/locations/{location}/serviceBindings/{service_binding}\"\x8a\x01\n\x1aListServiceBindingsRequest\x12\x45\n\x06parent\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\x12-networkservices.googleapis.com/ServiceBinding\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"\x96\x01\n\x1bListServiceBindingsResponse\x12I\n\x10service_bindings\x18\x01 \x03(\x0b\x32/.google.cloud.networkservices.v1.ServiceBinding\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"_\n\x18GetServiceBindingRequest\x12\x43\n\x04name\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-networkservices.googleapis.com/ServiceBinding\"\xd4\x01\n\x1b\x43reateServiceBindingRequest\x12\x45\n\x06parent\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\x12-networkservices.googleapis.com/ServiceBinding\x12\x1f\n\x12service_binding_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12M\n\x0fservice_binding\x18\x03 \x01(\x0b\x32/.google.cloud.networkservices.v1.ServiceBindingB\x03\xe0\x41\x02\"\xa2\x01\n\x1bUpdateServiceBindingRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x12M\n\x0fservice_binding\x18\x02 \x01(\x0b\x32/.google.cloud.networkservices.v1.ServiceBindingB\x03\xe0\x41\x02\"b\n\x1b\x44\x65leteServiceBindingRequest\x12\x43\n\x04name\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-networkservices.googleapis.com/ServiceBindingB\xf3\x02\n#com.google.cloud.networkservices.v1B\x13ServiceBindingProtoP\x01ZMcloud.google.com/go/networkservices/apiv1/networkservicespb;networkservicespb\xaa\x02\x1fGoogle.Cloud.NetworkServices.V1\xca\x02\x1fGoogle\\Cloud\\NetworkServices\\V1\xea\x02\"Google::Cloud::NetworkServices::V1\xea\x41|\n\'servicedirectory.googleapis.com/Service\x12Qprojects/{project}/locations/{location}/namespaces/{namespace}/services/{service}b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module NetworkServices + module V1 + ServiceBinding = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.ServiceBinding").msgclass + ListServiceBindingsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.ListServiceBindingsRequest").msgclass + ListServiceBindingsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.ListServiceBindingsResponse").msgclass + GetServiceBindingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.GetServiceBindingRequest").msgclass + CreateServiceBindingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.CreateServiceBindingRequest").msgclass + UpdateServiceBindingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.UpdateServiceBindingRequest").msgclass + DeleteServiceBindingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.DeleteServiceBindingRequest").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/service_lb_policy_pb.rb b/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/service_lb_policy_pb.rb new file mode 100644 index 000000000000..c49e46670265 --- /dev/null +++ b/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/service_lb_policy_pb.rb @@ -0,0 +1,38 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/networkservices/v1/service_lb_policy.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/field_mask_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n7google/cloud/networkservices/v1/service_lb_policy.proto\x12\x1fgoogle.cloud.networkservices.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xba\x0b\n\x0fServiceLbPolicy\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12Q\n\x06labels\x18\x04 \x03(\x0b\x32<.google.cloud.networkservices.v1.ServiceLbPolicy.LabelsEntryB\x03\xe0\x41\x01\x12\x18\n\x0b\x64\x65scription\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12n\n\x18load_balancing_algorithm\x18\x06 \x01(\x0e\x32G.google.cloud.networkservices.v1.ServiceLbPolicy.LoadBalancingAlgorithmB\x03\xe0\x41\x01\x12\x64\n\x13\x61uto_capacity_drain\x18\x08 \x01(\x0b\x32\x42.google.cloud.networkservices.v1.ServiceLbPolicy.AutoCapacityDrainB\x03\xe0\x41\x01\x12]\n\x0f\x66\x61ilover_config\x18\n \x01(\x0b\x32?.google.cloud.networkservices.v1.ServiceLbPolicy.FailoverConfigB\x03\xe0\x41\x01\x12_\n\x10isolation_config\x18\x0b \x01(\x0b\x32@.google.cloud.networkservices.v1.ServiceLbPolicy.IsolationConfigB\x03\xe0\x41\x01\x1a(\n\x11\x41utoCapacityDrain\x12\x13\n\x06\x65nable\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01\x1a\x38\n\x0e\x46\x61iloverConfig\x12&\n\x19\x66\x61ilover_health_threshold\x18\x01 \x01(\x05\x42\x03\xe0\x41\x01\x1a\xd9\x01\n\x0fIsolationConfig\x12i\n\x15isolation_granularity\x18\x01 \x01(\x0e\x32\x45.google.cloud.networkservices.v1.ServiceLbPolicy.IsolationGranularityB\x03\xe0\x41\x01\x12[\n\x0eisolation_mode\x18\x02 \x01(\x0e\x32>.google.cloud.networkservices.v1.ServiceLbPolicy.IsolationModeB\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x9b\x01\n\x16LoadBalancingAlgorithm\x12(\n$LOAD_BALANCING_ALGORITHM_UNSPECIFIED\x10\x00\x12\x12\n\x0eSPRAY_TO_WORLD\x10\x03\x12\x13\n\x0fSPRAY_TO_REGION\x10\x04\x12\x17\n\x13WATERFALL_BY_REGION\x10\x05\x12\x15\n\x11WATERFALL_BY_ZONE\x10\x06\"I\n\x14IsolationGranularity\x12%\n!ISOLATION_GRANULARITY_UNSPECIFIED\x10\x00\x12\n\n\x06REGION\x10\x01\"H\n\rIsolationMode\x12\x1e\n\x1aISOLATION_MODE_UNSPECIFIED\x10\x00\x12\x0b\n\x07NEAREST\x10\x01\x12\n\n\x06STRICT\x10\x02:\x82\x01\xea\x41\x7f\n.networkservices.googleapis.com/ServiceLbPolicy\x12Mprojects/{project}/locations/{location}/serviceLbPolicies/{service_lb_policy}\"\x8d\x01\n\x1cListServiceLbPoliciesRequest\x12\x46\n\x06parent\x18\x01 \x01(\tB6\xe0\x41\x02\xfa\x41\x30\x12.networkservices.googleapis.com/ServiceLbPolicy\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"\x9c\x01\n\x1dListServiceLbPoliciesResponse\x12M\n\x13service_lb_policies\x18\x01 \x03(\x0b\x32\x30.google.cloud.networkservices.v1.ServiceLbPolicy\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"a\n\x19GetServiceLbPolicyRequest\x12\x44\n\x04name\x18\x01 \x01(\tB6\xe0\x41\x02\xfa\x41\x30\n.networkservices.googleapis.com/ServiceLbPolicy\"\xdb\x01\n\x1c\x43reateServiceLbPolicyRequest\x12\x46\n\x06parent\x18\x01 \x01(\tB6\xe0\x41\x02\xfa\x41\x30\x12.networkservices.googleapis.com/ServiceLbPolicy\x12!\n\x14service_lb_policy_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12P\n\x11service_lb_policy\x18\x03 \x01(\x0b\x32\x30.google.cloud.networkservices.v1.ServiceLbPolicyB\x03\xe0\x41\x02\"\xa6\x01\n\x1cUpdateServiceLbPolicyRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x12P\n\x11service_lb_policy\x18\x02 \x01(\x0b\x32\x30.google.cloud.networkservices.v1.ServiceLbPolicyB\x03\xe0\x41\x02\"d\n\x1c\x44\x65leteServiceLbPolicyRequest\x12\x44\n\x04name\x18\x01 \x01(\tB6\xe0\x41\x02\xfa\x41\x30\n.networkservices.googleapis.com/ServiceLbPolicyB\xf5\x01\n#com.google.cloud.networkservices.v1B\x14ServiceLbPolicyProtoP\x01ZMcloud.google.com/go/networkservices/apiv1/networkservicespb;networkservicespb\xaa\x02\x1fGoogle.Cloud.NetworkServices.V1\xca\x02\x1fGoogle\\Cloud\\NetworkServices\\V1\xea\x02\"Google::Cloud::NetworkServices::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module NetworkServices + module V1 + ServiceLbPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.ServiceLbPolicy").msgclass + ServiceLbPolicy::AutoCapacityDrain = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.ServiceLbPolicy.AutoCapacityDrain").msgclass + ServiceLbPolicy::FailoverConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.ServiceLbPolicy.FailoverConfig").msgclass + ServiceLbPolicy::IsolationConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.ServiceLbPolicy.IsolationConfig").msgclass + ServiceLbPolicy::LoadBalancingAlgorithm = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.ServiceLbPolicy.LoadBalancingAlgorithm").enummodule + ServiceLbPolicy::IsolationGranularity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.ServiceLbPolicy.IsolationGranularity").enummodule + ServiceLbPolicy::IsolationMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.ServiceLbPolicy.IsolationMode").enummodule + ListServiceLbPoliciesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.ListServiceLbPoliciesRequest").msgclass + ListServiceLbPoliciesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.ListServiceLbPoliciesResponse").msgclass + GetServiceLbPolicyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.GetServiceLbPolicyRequest").msgclass + CreateServiceLbPolicyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.CreateServiceLbPolicyRequest").msgclass + UpdateServiceLbPolicyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.UpdateServiceLbPolicyRequest").msgclass + DeleteServiceLbPolicyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.DeleteServiceLbPolicyRequest").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/tcp_route_pb.rb b/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/tcp_route_pb.rb new file mode 100644 index 000000000000..07d47a524db0 --- /dev/null +++ b/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/tcp_route_pb.rb @@ -0,0 +1,37 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/networkservices/v1/tcp_route.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/duration_pb' +require 'google/protobuf/field_mask_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n/google/cloud/networkservices/v1/tcp_route.proto\x12\x1fgoogle.cloud.networkservices.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1egoogle/protobuf/duration.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xf6\x08\n\x08TcpRoute\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x16\n\tself_link\x18\x0b \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12G\n\x05rules\x18\x05 \x03(\x0b\x32\x33.google.cloud.networkservices.v1.TcpRoute.RouteRuleB\x03\xe0\x41\x02\x12;\n\x06meshes\x18\x08 \x03(\tB+\xe0\x41\x01\xfa\x41%\n#networkservices.googleapis.com/Mesh\x12@\n\x08gateways\x18\t \x03(\tB.\xe0\x41\x01\xfa\x41(\n&networkservices.googleapis.com/Gateway\x12J\n\x06labels\x18\n \x03(\x0b\x32\x35.google.cloud.networkservices.v1.TcpRoute.LabelsEntryB\x03\xe0\x41\x01\x1a\xa3\x01\n\tRouteRule\x12J\n\x07matches\x18\x01 \x03(\x0b\x32\x34.google.cloud.networkservices.v1.TcpRoute.RouteMatchB\x03\xe0\x41\x01\x12J\n\x06\x61\x63tion\x18\x02 \x01(\x0b\x32\x35.google.cloud.networkservices.v1.TcpRoute.RouteActionB\x03\xe0\x41\x02\x1a\x35\n\nRouteMatch\x12\x14\n\x07\x61\x64\x64ress\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x11\n\x04port\x18\x02 \x01(\tB\x03\xe0\x41\x02\x1a\xbd\x01\n\x0bRouteAction\x12U\n\x0c\x64\x65stinations\x18\x01 \x03(\x0b\x32:.google.cloud.networkservices.v1.TcpRoute.RouteDestinationB\x03\xe0\x41\x01\x12!\n\x14original_destination\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\x12\x34\n\x0cidle_timeout\x18\x05 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x01\x1al\n\x10RouteDestination\x12\x43\n\x0cservice_name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%compute.googleapis.com/BackendService\x12\x13\n\x06weight\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:k\xea\x41h\n\'networkservices.googleapis.com/TcpRoute\x12=projects/{project}/locations/{location}/tcpRoutes/{tcp_route}\"\xa3\x01\n\x14ListTcpRoutesRequest\x12?\n\x06parent\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\x12\'networkservices.googleapis.com/TcpRoute\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12#\n\x16return_partial_success\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"\x84\x01\n\x15ListTcpRoutesResponse\x12=\n\ntcp_routes\x18\x01 \x03(\x0b\x32).google.cloud.networkservices.v1.TcpRoute\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"S\n\x12GetTcpRouteRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'networkservices.googleapis.com/TcpRoute\"\xb6\x01\n\x15\x43reateTcpRouteRequest\x12?\n\x06parent\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\x12\'networkservices.googleapis.com/TcpRoute\x12\x19\n\x0ctcp_route_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x41\n\ttcp_route\x18\x03 \x01(\x0b\x32).google.cloud.networkservices.v1.TcpRouteB\x03\xe0\x41\x02\"\x90\x01\n\x15UpdateTcpRouteRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x12\x41\n\ttcp_route\x18\x02 \x01(\x0b\x32).google.cloud.networkservices.v1.TcpRouteB\x03\xe0\x41\x02\"V\n\x15\x44\x65leteTcpRouteRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'networkservices.googleapis.com/TcpRouteB\xee\x01\n#com.google.cloud.networkservices.v1B\rTcpRouteProtoP\x01ZMcloud.google.com/go/networkservices/apiv1/networkservicespb;networkservicespb\xaa\x02\x1fGoogle.Cloud.NetworkServices.V1\xca\x02\x1fGoogle\\Cloud\\NetworkServices\\V1\xea\x02\"Google::Cloud::NetworkServices::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module NetworkServices + module V1 + TcpRoute = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.TcpRoute").msgclass + TcpRoute::RouteRule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.TcpRoute.RouteRule").msgclass + TcpRoute::RouteMatch = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.TcpRoute.RouteMatch").msgclass + TcpRoute::RouteAction = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.TcpRoute.RouteAction").msgclass + TcpRoute::RouteDestination = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.TcpRoute.RouteDestination").msgclass + ListTcpRoutesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.ListTcpRoutesRequest").msgclass + ListTcpRoutesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.ListTcpRoutesResponse").msgclass + GetTcpRouteRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.GetTcpRouteRequest").msgclass + CreateTcpRouteRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.CreateTcpRouteRequest").msgclass + UpdateTcpRouteRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.UpdateTcpRouteRequest").msgclass + DeleteTcpRouteRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.DeleteTcpRouteRequest").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/tls_route_pb.rb b/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/tls_route_pb.rb new file mode 100644 index 000000000000..3b1b6565b309 --- /dev/null +++ b/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/tls_route_pb.rb @@ -0,0 +1,37 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/networkservices/v1/tls_route.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/duration_pb' +require 'google/protobuf/field_mask_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n/google/cloud/networkservices/v1/tls_route.proto\x12\x1fgoogle.cloud.networkservices.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1egoogle/protobuf/duration.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x9b\t\n\x08TlsRoute\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x16\n\tself_link\x18\x08 \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12G\n\x05rules\x18\x05 \x03(\x0b\x32\x33.google.cloud.networkservices.v1.TlsRoute.RouteRuleB\x03\xe0\x41\x02\x12;\n\x06meshes\x18\x06 \x03(\tB+\xe0\x41\x01\xfa\x41%\n#networkservices.googleapis.com/Mesh\x12@\n\x08gateways\x18\x07 \x03(\tB.\xe0\x41\x01\xfa\x41(\n&networkservices.googleapis.com/Gateway\x12\x45\n\x0etarget_proxies\x18\r \x03(\tB-\xe0\x41\x01\xfa\x41\'\n%compute.googleapis.com/TargetTcpProxy\x12J\n\x06labels\x18\x0b \x03(\x0b\x32\x35.google.cloud.networkservices.v1.TlsRoute.LabelsEntryB\x03\xe0\x41\x01\x1a\xa3\x01\n\tRouteRule\x12J\n\x07matches\x18\x01 \x03(\x0b\x32\x34.google.cloud.networkservices.v1.TlsRoute.RouteMatchB\x03\xe0\x41\x02\x12J\n\x06\x61\x63tion\x18\x02 \x01(\x0b\x32\x35.google.cloud.networkservices.v1.TlsRoute.RouteActionB\x03\xe0\x41\x02\x1a\x36\n\nRouteMatch\x12\x15\n\x08sni_host\x18\x01 \x03(\tB\x03\xe0\x41\x01\x12\x11\n\x04\x61lpn\x18\x02 \x03(\tB\x03\xe0\x41\x01\x1a\x9a\x01\n\x0bRouteAction\x12U\n\x0c\x64\x65stinations\x18\x01 \x03(\x0b\x32:.google.cloud.networkservices.v1.TlsRoute.RouteDestinationB\x03\xe0\x41\x02\x12\x34\n\x0cidle_timeout\x18\x04 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x01\x1al\n\x10RouteDestination\x12\x43\n\x0cservice_name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%compute.googleapis.com/BackendService\x12\x13\n\x06weight\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:k\xea\x41h\n\'networkservices.googleapis.com/TlsRoute\x12=projects/{project}/locations/{location}/tlsRoutes/{tls_route}\"\xa3\x01\n\x14ListTlsRoutesRequest\x12?\n\x06parent\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\x12\'networkservices.googleapis.com/TlsRoute\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12#\n\x16return_partial_success\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"\x84\x01\n\x15ListTlsRoutesResponse\x12=\n\ntls_routes\x18\x01 \x03(\x0b\x32).google.cloud.networkservices.v1.TlsRoute\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"S\n\x12GetTlsRouteRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'networkservices.googleapis.com/TlsRoute\"\xb6\x01\n\x15\x43reateTlsRouteRequest\x12?\n\x06parent\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\x12\'networkservices.googleapis.com/TlsRoute\x12\x19\n\x0ctls_route_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x41\n\ttls_route\x18\x03 \x01(\x0b\x32).google.cloud.networkservices.v1.TlsRouteB\x03\xe0\x41\x02\"\x90\x01\n\x15UpdateTlsRouteRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x12\x41\n\ttls_route\x18\x02 \x01(\x0b\x32).google.cloud.networkservices.v1.TlsRouteB\x03\xe0\x41\x02\"V\n\x15\x44\x65leteTlsRouteRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'networkservices.googleapis.com/TlsRouteB\xe5\x02\n#com.google.cloud.networkservices.v1B\rTlsRouteProtoP\x01ZMcloud.google.com/go/networkservices/apiv1/networkservicespb;networkservicespb\xaa\x02\x1fGoogle.Cloud.NetworkServices.V1\xca\x02\x1fGoogle\\Cloud\\NetworkServices\\V1\xea\x02\"Google::Cloud::NetworkServices::V1\xea\x41t\n%compute.googleapis.com/TargetTcpProxy\x12Kprojects/{project}/locations/{location}/targetTcpProxies/{target_tcp_proxy}b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module NetworkServices + module V1 + TlsRoute = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.TlsRoute").msgclass + TlsRoute::RouteRule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.TlsRoute.RouteRule").msgclass + TlsRoute::RouteMatch = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.TlsRoute.RouteMatch").msgclass + TlsRoute::RouteAction = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.TlsRoute.RouteAction").msgclass + TlsRoute::RouteDestination = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.TlsRoute.RouteDestination").msgclass + ListTlsRoutesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.ListTlsRoutesRequest").msgclass + ListTlsRoutesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.ListTlsRoutesResponse").msgclass + GetTlsRouteRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.GetTlsRouteRequest").msgclass + CreateTlsRouteRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.CreateTlsRouteRequest").msgclass + UpdateTlsRouteRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.UpdateTlsRouteRequest").msgclass + DeleteTlsRouteRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.DeleteTlsRouteRequest").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-network_services-v1/proto_docs/README.md b/owl-bot-staging/google-cloud-network_services-v1/proto_docs/README.md new file mode 100644 index 000000000000..bede8b6f1ebd --- /dev/null +++ b/owl-bot-staging/google-cloud-network_services-v1/proto_docs/README.md @@ -0,0 +1,4 @@ +# Network Services 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_services-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/api/client.rb new file mode 100644 index 000000000000..3ab0b096d445 --- /dev/null +++ b/owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/api/client.rb @@ -0,0 +1,593 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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. + # + # Note: This field should not be used in most cases. + 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: + # library_settings: + # 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. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Php. Clobbers the php_namespace option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.php.package_name" field + # in gapic.yaml. API teams should use the protobuf php_namespace option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # php_settings: + # library_package: Google\Cloud\PubSub\V1 + 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. + # + # Example: + # + # 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 + # @!attribute [rw] batching + # @return [::Google::Api::BatchingConfigProto] + # Batching configuration for an API method in client libraries. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.BatchCreateExample + # batching: + # element_count_threshold: 1000 + # request_byte_threshold: 100000000 + # delay_threshold_millis: 10 + 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. + # + # Note: This feature should not be used in most cases. + # @!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 + + # `BatchingConfigProto` defines the batching configuration for an API method. + # @!attribute [rw] thresholds + # @return [::Google::Api::BatchingSettingsProto] + # The thresholds which trigger a batched request to be sent. + # @!attribute [rw] batch_descriptor + # @return [::Google::Api::BatchingDescriptorProto] + # The request and response fields used in batching. + class BatchingConfigProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingSettingsProto` specifies a set of batching thresholds, each of + # which acts as a trigger to send a batch of messages as a request. At least + # one threshold must be positive nonzero. + # @!attribute [rw] element_count_threshold + # @return [::Integer] + # The number of elements of a field collected into a batch which, if + # exceeded, causes the batch to be sent. + # @!attribute [rw] request_byte_threshold + # @return [::Integer] + # The aggregated size of the batched field which, if exceeded, causes the + # batch to be sent. This size is computed by aggregating the sizes of the + # request field to be batched, not of the entire request message. + # @!attribute [rw] delay_threshold + # @return [::Google::Protobuf::Duration] + # The duration after which a batch should be sent, starting from the addition + # of the first message to that batch. + # @!attribute [rw] element_count_limit + # @return [::Integer] + # The maximum number of elements collected in a batch that could be accepted + # by server. + # @!attribute [rw] request_byte_limit + # @return [::Integer] + # The maximum size of the request that could be accepted by server. + # @!attribute [rw] flow_control_element_limit + # @return [::Integer] + # The maximum number of elements allowed by flow control. + # @!attribute [rw] flow_control_byte_limit + # @return [::Integer] + # The maximum size of data allowed by flow control. + # @!attribute [rw] flow_control_limit_exceeded_behavior + # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] + # The behavior to take when the flow control limit is exceeded. + class BatchingSettingsProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingDescriptorProto` specifies the fields of the request message to be + # used for batching, and, optionally, the fields of the response message to be + # used for demultiplexing. + # @!attribute [rw] batched_field + # @return [::String] + # The repeated field in the request message to be aggregated by batching. + # @!attribute [rw] discriminator_fields + # @return [::Array<::String>] + # A list of the fields in the request message. Two requests will be batched + # together only if the values of every field specified in + # `request_discriminator_fields` is equal between the two requests. + # @!attribute [rw] subresponse_field + # @return [::String] + # Optional. When present, indicates the field in the response message to be + # used to demultiplex the response into multiple response messages, in + # correspondence with the multiple request messages originally batched + # together. + class BatchingDescriptorProto + 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 + + # The behavior to take when the flow control limit is exceeded. + module FlowControlLimitExceededBehaviorProto + # Default behavior, system-defined. + UNSET_BEHAVIOR = 0 + + # Stop operation, raise error. + THROW_EXCEPTION = 1 + + # Pause operation until limit clears. + BLOCK = 2 + + # Continue operation, disregard limit. + IGNORE = 3 + end + end +end diff --git a/owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..582be187d115 --- /dev/null +++ b/owl-bot-staging/google-cloud-network_services-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_services-v1/proto_docs/google/api/field_info.rb b/owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/api/field_info.rb new file mode 100644 index 000000000000..0f5acf0a5538 --- /dev/null +++ b/owl-bot-staging/google-cloud-network_services-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_services-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..9392a413fb1b --- /dev/null +++ b/owl-bot-staging/google-cloud-network_services-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_services-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..25dec4847ac1 --- /dev/null +++ b/owl-bot-staging/google-cloud-network_services-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_services-v1/proto_docs/google/cloud/networkservices/v1/agent_gateway.rb b/owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/agent_gateway.rb new file mode 100644 index 000000000000..1fb0c68cb71e --- /dev/null +++ b/owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/agent_gateway.rb @@ -0,0 +1,302 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 NetworkServices + module V1 + # AgentGateway represents the agent gateway resource. + # @!attribute [rw] google_managed + # @return [::Google::Cloud::NetworkServices::V1::AgentGateway::GoogleManaged] + # Optional. Proxy is orchestrated and managed by GoogleCloud in a tenant + # project. + # + # Note: The following fields are mutually exclusive: `google_managed`, `self_managed`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] self_managed + # @return [::Google::Cloud::NetworkServices::V1::AgentGateway::SelfManaged] + # Optional. Attach to existing Application Load Balancers or Secure Web + # Proxies. + # + # Note: The following fields are mutually exclusive: `self_managed`, `google_managed`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] name + # @return [::String] + # Identifier. Name of the AgentGateway resource. It matches pattern + # `projects/*/locations/*/agentGateways/`. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The timestamp when the resource was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The timestamp when the resource was updated. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. Set of label tags associated with the AgentGateway resource. + # @!attribute [rw] description + # @return [::String] + # Optional. A free-text description of the resource. Max length 1024 + # characters. + # @!attribute [rw] etag + # @return [::String] + # Optional. Etag of the resource. + # If this is provided, it must match the server's etag. If the provided etag + # does not match the server's etag, the request will fail with a 409 ABORTED + # error. + # @!attribute [rw] protocols + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::Array<::Google::Cloud::NetworkServices::V1::AgentGateway::Protocol>] + # Optional. Deprecated. + # @!attribute [rw] registries + # @return [::Array<::String>] + # Optional. A list of Agent registries containing the agents, MCP servers and + # tools governed by the Agent Gateway. Note: Currently limited to + # project-scoped registries Must be of format + # `//agentregistry.googleapis.com/projects/{project}/locations/{location}/ + # @!attribute [rw] network_config + # @return [::Google::Cloud::NetworkServices::V1::AgentGateway::NetworkConfig] + # Optional. Network configuration for the AgentGateway. + # @!attribute [r] agent_gateway_card + # @return [::Google::Cloud::NetworkServices::V1::AgentGateway::AgentGatewayOutputCard] + # Output only. Field for populated AgentGateway card. + class AgentGateway + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Configuration for Google Managed deployment mode. + # Proxy is orchestrated and managed by GoogleCloud in a tenant project. + # @!attribute [rw] governed_access_path + # @return [::Google::Cloud::NetworkServices::V1::AgentGateway::GoogleManaged::GovernedAccessPath] + # Optional. Operating Mode of Agent Gateway. + class GoogleManaged + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # GovernedAccessPath defines the type of access to protect. + module GovernedAccessPath + # Governed access path is not specified. + GOVERNED_ACCESS_PATH_UNSPECIFIED = 0 + + # Govern agent conections to destinations. + AGENT_TO_ANYWHERE = 1 + + # Protect connection to Agent or Tool. + CLIENT_TO_AGENT = 2 + end + end + + # Configuration for Self Managed deployment mode. + # Attach to existing Application Load Balancers or Secure Web Proxies. + # @!attribute [rw] resource_uri + # @return [::String] + # Optional. A supported Google Cloud networking proxy in the Project and + # Location + class SelfManaged + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # NetworkConfig contains network configurations for the AgentGateway. + # @!attribute [rw] egress + # @return [::Google::Cloud::NetworkServices::V1::AgentGateway::NetworkConfig::Egress] + # Optional. Optional PSC-Interface network attachment for connectivity to + # your private VPCs network. + # @!attribute [rw] dns_peering_config + # @return [::Google::Cloud::NetworkServices::V1::AgentGateway::NetworkConfig::DnsPeeringConfig] + # Optional. Optional DNS peering configuration for connectivity to your + # private VPC network. + class NetworkConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Configuration for Egress + # @!attribute [rw] network_attachment + # @return [::String] + # Optional. The URI of the Network Attachment resource. + # @!attribute [rw] trust_config + # @return [::Google::Cloud::NetworkServices::V1::AgentGateway::NetworkConfig::Egress::TrustConfig] + # Optional. TrustConfig defines the trust configuration for egress. + class Egress + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # TrustConfig defines the trust configuration for egress. + # @!attribute [rw] pem_certificates + # @return [::Array<::String>] + # Required. PEM encoded root certificates used to validate the identity + # of the upstream servers/destinations during egress connections. + class TrustConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # DNS peering config for the user VPC network. + # @!attribute [rw] domains + # @return [::Array<::String>] + # Required. Domain names for which DNS queries should be forwarded to the + # target network. + # @!attribute [rw] target_project + # @return [::String] + # Required. Target project ID to which DNS queries should be forwarded + # to. This can be the same project that contains the AgentGateway or a + # different project. + # @!attribute [rw] target_network + # @return [::String] + # Required. Target network in 'target project' to which DNS queries + # should be forwarded to. Must be in format of + # `projects/{project}/global/networks/{network}`. + class DnsPeeringConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # AgentGatewayOutputCard contains informational output-only fields + # @!attribute [r] mtls_endpoint + # @return [::String] + # Output only. mTLS Endpoint associated with this AgentGateway + # @!attribute [r] root_certificates + # @return [::Array<::String>] + # Output only. Root Certificates for Agents to validate this AgentGateway + # @!attribute [r] service_extensions_service_account + # @return [::String] + # Output only. Service Account used by Service Extensions to operate. + class AgentGatewayOutputCard + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class LabelsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Enums of all supported protocols + module Protocol + # Unspecified protocol. + PROTOCOL_UNSPECIFIED = 0 + + # Message Control Plane protocol. + MCP = 1 + end + end + + # Request used with the ListAgentGateways method. + # @!attribute [rw] parent + # @return [::String] + # Required. The project and location from which the AgentGateways should be + # listed, specified in the format `projects/*/locations/*`. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. Maximum number of AgentGateways to return per call. + # @!attribute [rw] page_token + # @return [::String] + # Optional. The value returned by the last `ListAgentGatewaysResponse` + # Indicates that this is a continuation of a prior `ListAgentGateways` + # call, and that the system should return the next page of data. + # @!attribute [rw] return_partial_success + # @return [::Boolean] + # Optional. If true, allow partial responses for multi-regional Aggregated + # List requests. Otherwise if one of the locations is down or unreachable, + # the Aggregated List request will fail. + class ListAgentGatewaysRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response returned by the ListAgentGateways method. + # @!attribute [rw] agent_gateways + # @return [::Array<::Google::Cloud::NetworkServices::V1::AgentGateway>] + # List of AgentGateway resources. + # @!attribute [rw] next_page_token + # @return [::String] + # If there might be more results than those appearing in this response, then + # `next_page_token` is included. To get the next set of results, call this + # method again using the value of `next_page_token` as `page_token`. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Unreachable resources. Populated when the request attempts to list all + # resources across all supported locations, while some locations are + # temporarily unavailable. + class ListAgentGatewaysResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request used by the GetAgentGateway method. + # @!attribute [rw] name + # @return [::String] + # Required. A name of the AgentGateway to get. Must be in the format + # `projects/*/locations/*/agentGateways/*`. + class GetAgentGatewayRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request used by the CreateAgentGateway method. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource of the AgentGateway. Must be in the + # format `projects/*/locations/*`. + # @!attribute [rw] agent_gateway_id + # @return [::String] + # Required. Short name of the AgentGateway resource to be created. + # @!attribute [rw] agent_gateway + # @return [::Google::Cloud::NetworkServices::V1::AgentGateway] + # Required. AgentGateway resource to be created. + class CreateAgentGatewayRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request used by the UpdateAgentGateway method. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Optional. Field mask is used to specify the fields to be overwritten in the + # AgentGateway resource by the update. + # The fields specified in the update_mask are relative to the resource, not + # the full request. A field will be overwritten if it is in the mask. If the + # user does not provide a mask then all fields will be overwritten. + # @!attribute [rw] agent_gateway + # @return [::Google::Cloud::NetworkServices::V1::AgentGateway] + # Required. Updated AgentGateway resource. + class UpdateAgentGatewayRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request used by the DeleteAgentGateway method. + # @!attribute [rw] name + # @return [::String] + # Required. A name of the AgentGateway to delete. Must be in the format + # `projects/*/locations/*/agentGateways/*`. + # @!attribute [rw] etag + # @return [::String] + # Optional. The etag of the AgentGateway to delete. + class DeleteAgentGatewayRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/common.rb b/owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/common.rb new file mode 100644 index 000000000000..c0a547efdb7c --- /dev/null +++ b/owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/common.rb @@ -0,0 +1,164 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 NetworkServices + module V1 + # Represents the metadata of the long-running operation. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time the operation was created. + # @!attribute [r] end_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time the operation finished running. + # @!attribute [r] target + # @return [::String] + # Output only. Server-defined resource path for the target of the operation. + # @!attribute [r] verb + # @return [::String] + # Output only. Name of the verb executed by the operation. + # @!attribute [r] status_message + # @return [::String] + # Output only. Human-readable status of the operation, if any. + # @!attribute [r] requested_cancellation + # @return [::Boolean] + # Output only. Identifies whether the user has requested cancellation + # of the operation. Operations that have successfully been cancelled + # have [Operation.error][] value with a + # {::Google::Rpc::Status#code google.rpc.Status.code} of 1, corresponding to + # `Code.CANCELLED`. + # @!attribute [r] api_version + # @return [::String] + # Output only. API version used to start the operation. + class OperationMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Specification of a port-based selector. + # @!attribute [rw] ports + # @return [::Array<::String>] + # Optional. A list of ports. Can be port numbers or port range + # (example, [80-90] specifies all ports from 80 to 90, including + # 80 and 90) or named ports or * to specify all ports. If the + # list is empty, all ports are selected. + class TrafficPortSelector + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A definition of a matcher that selects endpoints to which the policies + # should be applied. + # @!attribute [rw] metadata_label_matcher + # @return [::Google::Cloud::NetworkServices::V1::EndpointMatcher::MetadataLabelMatcher] + # The matcher is based on node metadata presented by xDS clients. + class EndpointMatcher + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The matcher that is based on node metadata presented by xDS clients. + # @!attribute [rw] metadata_label_match_criteria + # @return [::Google::Cloud::NetworkServices::V1::EndpointMatcher::MetadataLabelMatcher::MetadataLabelMatchCriteria] + # Specifies how matching should be done. + # + # Supported values are: + # MATCH_ANY: At least one of the Labels specified in the + # matcher should match the metadata presented by xDS client. + # MATCH_ALL: The metadata presented by the xDS client should + # contain all of the labels specified here. + # + # The selection is determined based on the best match. For + # example, suppose there are three EndpointPolicy + # resources P1, P2 and P3 and if P1 has a the matcher as + # MATCH_ANY , P2 has MATCH_ALL , and P3 has + # MATCH_ALL . + # + # If a client with label connects, the config from P1 + # will be selected. + # + # If a client with label connects, the config from P2 + # will be selected. + # + # If a client with label connects, the config + # from P3 will be selected. + # + # If there is more than one best match, (for example, if a + # config P4 with selector exists and if a client with + # label connects), pick up the one with older creation time. + # @!attribute [rw] metadata_labels + # @return [::Array<::Google::Cloud::NetworkServices::V1::EndpointMatcher::MetadataLabelMatcher::MetadataLabels>] + # The list of label value pairs that must match labels in the + # provided metadata based on filterMatchCriteria This list can + # have at most 64 entries. The list can be empty if the match + # criteria is MATCH_ANY, to specify a wildcard match (i.e this + # matches any client). + class MetadataLabelMatcher + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Defines a name-pair value for a single label. + # @!attribute [rw] label_name + # @return [::String] + # Required. Label name presented as key in xDS Node Metadata. + # @!attribute [rw] label_value + # @return [::String] + # Required. Label value presented as value corresponding to the above + # key, in xDS Node Metadata. + class MetadataLabels + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Possible criteria values that define logic of how matching is made. + module MetadataLabelMatchCriteria + # Default value. Should not be used. + METADATA_LABEL_MATCH_CRITERIA_UNSPECIFIED = 0 + + # At least one of the Labels specified in the matcher should match the + # metadata presented by xDS client. + MATCH_ANY = 1 + + # The metadata presented by the xDS client should contain all of the + # labels specified here. + MATCH_ALL = 2 + end + end + end + + # EnvoyHeader configuration for Mesh and Gateway + module EnvoyHeaders + # Defaults to NONE. + ENVOY_HEADERS_UNSPECIFIED = 0 + + # Suppress envoy debug headers. + NONE = 1 + + # Envoy will insert default internal debug headers into upstream requests: + # x-envoy-attempt-count, + # x-envoy-is-timeout-retry, + # x-envoy-expected-rq-timeout-ms, + # x-envoy-original-path, + # x-envoy-upstream-stream-duration-ms + DEBUG_HEADERS = 2 + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/dep.rb b/owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/dep.rb new file mode 100644 index 000000000000..d1cda59da9ce --- /dev/null +++ b/owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/dep.rb @@ -0,0 +1,1209 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 NetworkServices + module V1 + # A single extension chain wrapper that contains the match conditions and + # extensions to execute. + # @!attribute [rw] name + # @return [::String] + # Required. The name for this extension chain. + # The name is logged as part of the HTTP request logs. + # The name must conform with RFC-1034, is restricted to lower-cased letters, + # numbers and hyphens, and can have a maximum length of 63 characters. + # Additionally, the first character must be a letter and the last a letter or + # a number. + # @!attribute [rw] match_condition + # @return [::Google::Cloud::NetworkServices::V1::ExtensionChain::MatchCondition] + # Required. Conditions under which this chain is invoked for a request. + # @!attribute [rw] extensions + # @return [::Array<::Google::Cloud::NetworkServices::V1::ExtensionChain::Extension>] + # Required. A set of extensions to execute for the matching request. + # At least one extension is required. + # Up to 3 extensions can be defined for each extension chain + # for `LbTrafficExtension` resource. + # `LbRouteExtension` and `LbEdgeExtension` chains are limited to 1 extension + # per extension chain. + class ExtensionChain + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Conditions under which this chain is invoked for a request. + # @!attribute [rw] cel_expression + # @return [::String] + # Required. A Common Expression Language (CEL) expression that is used to + # match requests for which the extension chain is executed. + # + # For more information, see [CEL matcher language + # reference](https://cloud.google.com/service-extensions/docs/cel-matcher-language-reference). + class MatchCondition + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A single extension in the chain to execute for the matching request. + # @!attribute [rw] name + # @return [::String] + # Optional. The name for this extension. + # The name is logged as part of the HTTP request logs. + # The name must conform with RFC-1034, is restricted to lower-cased + # letters, numbers and hyphens, and can have a maximum length of 63 + # characters. Additionally, the first character must be a letter and the + # last a letter or a number. + # + # This field is required except for AuthzExtension. + # @!attribute [rw] authority + # @return [::String] + # Optional. The `:authority` header in the gRPC request sent from Envoy + # to the extension service. + # Required for Callout extensions. + # + # This field is not supported for plugin extensions. Setting it results in + # a validation error. + # @!attribute [rw] service + # @return [::String] + # Required. The reference to the service that runs the extension. + # + # To configure a callout extension, `service` must be a fully-qualified + # reference + # to a [backend + # service](https://cloud.google.com/compute/docs/reference/rest/v1/backendServices) + # in the format: + # `https://www.googleapis.com/compute/v1/projects/{project}/regions/{region}/backendServices/{backendService}` + # or + # `https://www.googleapis.com/compute/v1/projects/{project}/global/backendServices/{backendService}`. + # + # To configure a plugin extension, `service` must be a reference + # to a [`WasmPlugin` + # resource](https://cloud.google.com/service-extensions/docs/reference/rest/v1beta1/projects.locations.wasmPlugins) + # in the format: + # `projects/{project}/locations/{location}/wasmPlugins/{plugin}` + # or + # `//networkservices.googleapis.com/projects/{project}/locations/{location}/wasmPlugins/{wasmPlugin}`. + # + # Plugin extensions are currently supported for the + # `LbTrafficExtension`, the `LbRouteExtension`, and the `LbEdgeExtension` + # resources. + # @!attribute [rw] supported_events + # @return [::Array<::Google::Cloud::NetworkServices::V1::EventType>] + # Optional. A set of events during request or response processing for which + # this extension is called. + # + # For the `LbTrafficExtension` resource, this field is required. + # + # For the `LbRouteExtension` resource, this field is optional. If + # unspecified, `REQUEST_HEADERS` event is assumed as supported. + # + # For the `LbEdgeExtension` resource, this field is required and must only + # contain `REQUEST_HEADERS` event. + # + # For the `AuthzExtension` resource, this field is optional. + # `REQUEST_HEADERS` is the only supported event. If unspecified, + # `REQUEST_HEADERS` event is assumed as supported. + # @!attribute [rw] timeout + # @return [::Google::Protobuf::Duration] + # Optional. Specifies the timeout for each individual message on the + # stream. The timeout must be between `10`-`10000` milliseconds. Required + # for callout extensions. + # + # This field is not supported for plugin extensions. Setting it results in + # a validation error. + # @!attribute [rw] fail_open + # @return [::Boolean] + # Optional. Determines how the proxy behaves if the call to the extension + # fails or times out. + # + # When set to `TRUE`, request or response processing continues without + # error. Any subsequent extensions in the extension chain are also + # executed. When set to `FALSE` or the default setting of `FALSE` is used, + # one of the following happens: + # + # * If response headers have not been delivered to the downstream client, + # a generic 500 error is returned to the client. The error response can be + # tailored by configuring a custom error response in the load balancer. + # + # * If response headers have been delivered, then the HTTP stream to the + # downstream client is reset. + # @!attribute [rw] forward_headers + # @return [::Array<::String>] + # Optional. List of the HTTP headers to forward to the extension + # (from the client or backend). If omitted, all headers are sent. + # Each element is a string indicating the header name. + # @!attribute [rw] forward_attributes + # @return [::Array<::String>] + # Optional. List of the Envoy attributes to forward to the extension + # server. The attributes provided here are included as part of the + # `ProcessingRequest.attributes` field (of type + # `map`), where the keys are the attribute + # names. Refer to the + # [documentation](https://cloud.google.com/service-extensions/docs/cel-matcher-language-reference#attributes) + # for the names of attributes that can be forwarded. If omitted, no + # attributes are sent. Each element is a string indicating the + # attribute name. + # @!attribute [rw] metadata + # @return [::Google::Protobuf::Struct] + # Optional. The metadata provided here is included as part of the + # `metadata_context` (of type `google.protobuf.Struct`) in the + # `ProcessingRequest` message sent to the extension server. + # + # For `AuthzExtension` resources, the metadata is available under the + # namespace `com.google.authz_extension.`. + # For other types of extensions, the metadata is available under the + # namespace + # `com.google....`. + # For example: + # `com.google.lb_traffic_extension.lbtrafficextension1.chain1.ext1`. + # + # The following variables are supported in the metadata: + # + # `{forwarding_rule_id}` - substituted with the forwarding rule's fully + # qualified resource name. + # + # This field must not be set for plugin extensions. Setting it results in + # a validation error. + # + # You can set metadata at either the resource level or the extension level. + # The extension level metadata is recommended because you can pass a + # different set of metadata through each extension to the backend. + # + # This field is subject to following limitations: + # + # * The total size of the metadata must be less than 1KiB. + # * The total number of keys in the metadata must be less than 16. + # * The length of each key must be less than 64 characters. + # * The length of each value must be less than 1024 characters. + # * All values must be strings. + # @!attribute [rw] request_body_send_mode + # @return [::Google::Cloud::NetworkServices::V1::BodySendMode] + # Optional. Configures the send mode for request body processing. + # + # The field can only be set if `supported_events` includes `REQUEST_BODY`. + # If `supported_events` includes `REQUEST_BODY`, + # but `request_body_send_mode` is unset, the default value `STREAMED` is + # used. + # + # When this field is set to `FULL_DUPLEX_STREAMED`, `supported_events` + # must include both `REQUEST_BODY` and `REQUEST_TRAILERS`. + # + # This field can be set only for `LbTrafficExtension` and + # `LbRouteExtension` resources, and only when the `service` field of the + # extension points to a `BackendService`. Only `FULL_DUPLEX_STREAMED` mode + # is supported for `LbRouteExtension` resources. + # @!attribute [rw] response_body_send_mode + # @return [::Google::Cloud::NetworkServices::V1::BodySendMode] + # Optional. Configures the send mode for response processing. If + # unspecified, the default value `STREAMED` is used. + # + # The field can only be set if `supported_events` includes `RESPONSE_BODY`. + # If `supported_events` includes `RESPONSE_BODY`, but + # `response_body_send_mode` is unset, the default value `STREAMED` is used. + # + # When this field is set to `FULL_DUPLEX_STREAMED`, `supported_events` + # must include both `RESPONSE_BODY` and `RESPONSE_TRAILERS`. + # + # This field can be set only for `LbTrafficExtension` resources, and only + # when the `service` field of the extension points to a `BackendService`. + # @!attribute [rw] observability_mode + # @return [::Boolean] + # Optional. When set to `true`, the calls to the extension backend are + # performed asynchronously, without pausing the processing of the ongoing + # request. In this mode, only `STREAMED` (default) body processing is + # supported. Responses, if any, are ignored. + # + # Supported by regional `LbTrafficExtension` and `LbRouteExtension` + # resources. + class Extension + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # `LbTrafficExtension` is a resource that lets the extension service modify the + # headers and payloads of both requests and responses without impacting the + # choice of backend services or any other security policies associated with the + # backend service. + # @!attribute [rw] name + # @return [::String] + # Required. Identifier. Name of the `LbTrafficExtension` resource in the + # following format: + # `projects/{project}/locations/{location}/lbTrafficExtensions/{lb_traffic_extension}`. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The timestamp when the resource was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The timestamp when the resource was updated. + # @!attribute [rw] description + # @return [::String] + # Optional. A human-readable description of the resource. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. Set of labels associated with the `LbTrafficExtension` resource. + # + # The format must comply with [the requirements for + # labels](https://cloud.google.com/compute/docs/labeling-resources#requirements) + # for Google Cloud resources. + # @!attribute [rw] forwarding_rules + # @return [::Array<::String>] + # Optional. A list of references to the forwarding rules to which this + # service extension is attached. At least one forwarding rule is required. + # Only one `LbTrafficExtension` resource can be associated with a forwarding + # rule. + # @!attribute [rw] extension_chains + # @return [::Array<::Google::Cloud::NetworkServices::V1::ExtensionChain>] + # Required. A set of ordered extension chains that contain the match + # conditions and extensions to execute. Match conditions for each extension + # chain are evaluated in sequence for a given request. The first extension + # chain that has a condition that matches the request is executed. + # Any subsequent extension chains do not execute. + # Limited to 5 extension chains per resource. + # @!attribute [rw] load_balancing_scheme + # @return [::Google::Cloud::NetworkServices::V1::LoadBalancingScheme] + # Required. All backend services and forwarding rules referenced by this + # extension must share the same load balancing scheme. Supported values: + # `INTERNAL_MANAGED` and `EXTERNAL_MANAGED`. For more information, refer to + # [Backend services + # overview](https://cloud.google.com/load-balancing/docs/backend-service). + # @!attribute [rw] metadata + # @return [::Google::Protobuf::Struct] + # Optional. The metadata provided here is included as part of the + # `metadata_context` (of type `google.protobuf.Struct`) in the + # `ProcessingRequest` message sent to the extension server. + # + # The metadata applies to all extensions in all extensions chains in this + # resource. + # + # The metadata is available under the key + # `com.google.lb_traffic_extension.`. + # + # The following variables are supported in the metadata: + # + # `{forwarding_rule_id}` - substituted with the forwarding rule's fully + # qualified resource name. + # + # This field must not be set if at least one of the extension chains + # contains plugin extensions. Setting it results in a validation error. + # + # You can set metadata at either the resource level or the extension level. + # The extension level metadata is recommended because you can pass a + # different set of metadata through each extension to the backend. + class LbTrafficExtension + 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 + + # Message for requesting list of `LbTrafficExtension` resources. + # @!attribute [rw] parent + # @return [::String] + # Required. The project and location from which the `LbTrafficExtension` + # resources are listed. These values are specified in the following format: + # `projects/{project}/locations/{location}`. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. Requested page size. The server might return fewer items than + # requested. If unspecified, the server picks an appropriate default. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A token identifying a page of results that the server returns. + # @!attribute [rw] filter + # @return [::String] + # Optional. Filtering results. + # @!attribute [rw] order_by + # @return [::String] + # Optional. Hint about how to order the results. + class ListLbTrafficExtensionsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for response to listing `LbTrafficExtension` resources. + # @!attribute [rw] lb_traffic_extensions + # @return [::Array<::Google::Cloud::NetworkServices::V1::LbTrafficExtension>] + # The list of `LbTrafficExtension` resources. + # @!attribute [rw] next_page_token + # @return [::String] + # A token identifying a page of results that the server returns. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Locations that could not be reached. + class ListLbTrafficExtensionsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for getting a `LbTrafficExtension` resource. + # @!attribute [rw] name + # @return [::String] + # Required. A name of the `LbTrafficExtension` resource to get. Must be in + # the format + # `projects/{project}/locations/{location}/lbTrafficExtensions/{lb_traffic_extension}`. + class GetLbTrafficExtensionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for creating a `LbTrafficExtension` resource. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource of the `LbTrafficExtension` resource. Must be + # in the format `projects/{project}/locations/{location}`. + # @!attribute [rw] lb_traffic_extension_id + # @return [::String] + # Required. User-provided ID of the `LbTrafficExtension` resource to be + # created. + # @!attribute [rw] lb_traffic_extension + # @return [::Google::Cloud::NetworkServices::V1::LbTrafficExtension] + # Required. `LbTrafficExtension` resource to be created. + # @!attribute [rw] request_id + # @return [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server can ignore + # the request if it has already been completed. The server guarantees + # that for 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server ignores the second request This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + class CreateLbTrafficExtensionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for updating a `LbTrafficExtension` resource. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Optional. Used to specify the fields to be overwritten in the + # `LbTrafficExtension` resource by the update. + # The fields specified in the `update_mask` are relative to the resource, not + # the full request. A field is overwritten if it is in the mask. If the + # user does not specify a mask, then all fields are overwritten. + # @!attribute [rw] lb_traffic_extension + # @return [::Google::Cloud::NetworkServices::V1::LbTrafficExtension] + # Required. `LbTrafficExtension` resource being updated. + # @!attribute [rw] request_id + # @return [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server can ignore + # the request if it has already been completed. The server guarantees + # that for 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server ignores the second request This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + class UpdateLbTrafficExtensionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for deleting a `LbTrafficExtension` resource. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the `LbTrafficExtension` resource to delete. Must be + # in the format + # `projects/{project}/locations/{location}/lbTrafficExtensions/{lb_traffic_extension}`. + # @!attribute [rw] request_id + # @return [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server can ignore + # the request if it has already been completed. The server guarantees + # that for 60 minutes after the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server ignores the second request This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + class DeleteLbTrafficExtensionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `LbRouteExtension` is a resource that lets you control where traffic is + # routed to for a given request. + # @!attribute [rw] name + # @return [::String] + # Required. Identifier. Name of the `LbRouteExtension` resource in the + # following format: + # `projects/{project}/locations/{location}/lbRouteExtensions/{lb_route_extension}`. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The timestamp when the resource was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The timestamp when the resource was updated. + # @!attribute [rw] description + # @return [::String] + # Optional. A human-readable description of the resource. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. Set of labels associated with the `LbRouteExtension` resource. + # + # The format must comply with [the requirements for + # labels](https://cloud.google.com/compute/docs/labeling-resources#requirements) + # for Google Cloud resources. + # @!attribute [rw] forwarding_rules + # @return [::Array<::String>] + # Required. A list of references to the forwarding rules to which this + # service extension is attached. At least one forwarding rule is required. + # Only one `LbRouteExtension` resource can be associated with a forwarding + # rule. + # @!attribute [rw] extension_chains + # @return [::Array<::Google::Cloud::NetworkServices::V1::ExtensionChain>] + # Required. A set of ordered extension chains that contain the match + # conditions and extensions to execute. Match conditions for each extension + # chain are evaluated in sequence for a given request. The first extension + # chain that has a condition that matches the request is executed. + # Any subsequent extension chains do not execute. + # Limited to 5 extension chains per resource. + # @!attribute [rw] load_balancing_scheme + # @return [::Google::Cloud::NetworkServices::V1::LoadBalancingScheme] + # Required. All backend services and forwarding rules referenced by this + # extension must share the same load balancing scheme. Supported values: + # `INTERNAL_MANAGED`, `EXTERNAL_MANAGED`. For more information, refer to + # [Backend services + # overview](https://cloud.google.com/load-balancing/docs/backend-service). + # @!attribute [rw] metadata + # @return [::Google::Protobuf::Struct] + # Optional. The metadata provided here is included as part of the + # `metadata_context` (of type `google.protobuf.Struct`) in the + # `ProcessingRequest` message sent to the extension server. + # + # The metadata applies to all extensions in all extensions chains in this + # resource. + # + # The metadata is available under the key + # `com.google.lb_route_extension.`. + # + # The following variables are supported in the metadata: + # + # `{forwarding_rule_id}` - substituted with the forwarding rule's fully + # qualified resource name. + # + # This field must not be set if at least one of the extension chains + # contains plugin extensions. Setting it results in a validation error. + # + # You can set metadata at either the resource level or the extension level. + # The extension level metadata is recommended because you can pass a + # different set of metadata through each extension to the backend. + class LbRouteExtension + 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 + + # Message for requesting list of `LbRouteExtension` resources. + # @!attribute [rw] parent + # @return [::String] + # Required. The project and location from which the `LbRouteExtension` + # resources are listed. These values are specified in the following format: + # `projects/{project}/locations/{location}`. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. Requested page size. The server might return fewer items than + # requested. If unspecified, the server picks an appropriate default. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A token identifying a page of results that the server returns. + # @!attribute [rw] filter + # @return [::String] + # Optional. Filtering results. + # @!attribute [rw] order_by + # @return [::String] + # Optional. Hint about how to order the results. + class ListLbRouteExtensionsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for response to listing `LbRouteExtension` resources. + # @!attribute [rw] lb_route_extensions + # @return [::Array<::Google::Cloud::NetworkServices::V1::LbRouteExtension>] + # The list of `LbRouteExtension` resources. + # @!attribute [rw] next_page_token + # @return [::String] + # A token identifying a page of results that the server returns. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Locations that could not be reached. + class ListLbRouteExtensionsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for getting a `LbRouteExtension` resource. + # @!attribute [rw] name + # @return [::String] + # Required. A name of the `LbRouteExtension` resource to get. Must be in the + # format + # `projects/{project}/locations/{location}/lbRouteExtensions/{lb_route_extension}`. + class GetLbRouteExtensionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for creating a `LbRouteExtension` resource. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource of the `LbRouteExtension` resource. Must be + # in the format `projects/{project}/locations/{location}`. + # @!attribute [rw] lb_route_extension_id + # @return [::String] + # Required. User-provided ID of the `LbRouteExtension` resource to be + # created. + # @!attribute [rw] lb_route_extension + # @return [::Google::Cloud::NetworkServices::V1::LbRouteExtension] + # Required. `LbRouteExtension` resource to be created. + # @!attribute [rw] request_id + # @return [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server can ignore + # the request if it has already been completed. The server guarantees + # that for 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server ignores the second request This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + class CreateLbRouteExtensionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for updating a `LbRouteExtension` resource. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Optional. Used to specify the fields to be overwritten in the + # `LbRouteExtension` resource by the update. + # The fields specified in the `update_mask` are relative to the resource, not + # the full request. A field is overwritten if it is in the mask. If the + # user does not specify a mask, then all fields are overwritten. + # @!attribute [rw] lb_route_extension + # @return [::Google::Cloud::NetworkServices::V1::LbRouteExtension] + # Required. `LbRouteExtension` resource being updated. + # @!attribute [rw] request_id + # @return [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server can ignore + # the request if it has already been completed. The server guarantees + # that for 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server ignores the second request This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + class UpdateLbRouteExtensionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for deleting a `LbRouteExtension` resource. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the `LbRouteExtension` resource to delete. Must be in + # the format + # `projects/{project}/locations/{location}/lbRouteExtensions/{lb_route_extension}`. + # @!attribute [rw] request_id + # @return [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server can ignore + # the request if it has already been completed. The server guarantees + # that for 60 minutes after the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server ignores the second request This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + class DeleteLbRouteExtensionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `LbEdgeExtension` is a resource that lets the extension service influence + # the selection of backend services and Cloud CDN cache keys by modifying + # request headers. + # @!attribute [rw] name + # @return [::String] + # Required. Identifier. Name of the `LbEdgeExtension` resource in the + # following format: + # `projects/{project}/locations/{location}/lbEdgeExtensions/{lb_edge_extension}`. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The timestamp when the resource was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The timestamp when the resource was updated. + # @!attribute [rw] description + # @return [::String] + # Optional. A human-readable description of the resource. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. Set of labels associated with the `LbEdgeExtension` resource. + # + # The format must comply with [the requirements for + # labels](https://cloud.google.com/compute/docs/labeling-resources#requirements) + # for Google Cloud resources. + # @!attribute [rw] forwarding_rules + # @return [::Array<::String>] + # Required. A list of references to the forwarding rules to which this + # service extension is attached. At least one forwarding rule is required. + # Only one `LbEdgeExtension` resource can be associated with a forwarding + # rule. + # @!attribute [rw] extension_chains + # @return [::Array<::Google::Cloud::NetworkServices::V1::ExtensionChain>] + # Required. A set of ordered extension chains that contain the match + # conditions and extensions to execute. Match conditions for each extension + # chain are evaluated in sequence for a given request. The first extension + # chain that has a condition that matches the request is executed. + # Any subsequent extension chains do not execute. + # Limited to 5 extension chains per resource. + # @!attribute [rw] load_balancing_scheme + # @return [::Google::Cloud::NetworkServices::V1::LoadBalancingScheme] + # Required. All forwarding rules referenced by this extension must + # share the same load balancing scheme. + # Supported values: `EXTERNAL_MANAGED`. + class LbEdgeExtension + 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 + + # Message for requesting list of `LbEdgeExtension` resources. + # @!attribute [rw] parent + # @return [::String] + # Required. The project and location from which the `LbEdgeExtension` + # resources are listed. These values are specified in the following format: + # `projects/{project}/locations/{location}`. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. Requested page size. The server might return fewer items than + # requested. If unspecified, the server picks an appropriate default. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A token identifying a page of results that the server returns. + # @!attribute [rw] filter + # @return [::String] + # Optional. Filtering results. + # @!attribute [rw] order_by + # @return [::String] + # Optional. Hint about how to order the results. + class ListLbEdgeExtensionsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for response to listing `LbEdgeExtension` resources. + # @!attribute [rw] lb_edge_extensions + # @return [::Array<::Google::Cloud::NetworkServices::V1::LbEdgeExtension>] + # The list of `LbEdgeExtension` resources. + # @!attribute [rw] next_page_token + # @return [::String] + # A token identifying a page of results that the server returns. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Locations that could not be reached. + class ListLbEdgeExtensionsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for getting a `LbEdgeExtension` resource. + # @!attribute [rw] name + # @return [::String] + # Required. A name of the `LbEdgeExtension` resource to get. Must be in the + # format + # `projects/{project}/locations/{location}/lbEdgeExtensions/{lb_edge_extension}`. + class GetLbEdgeExtensionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for creating a `LbEdgeExtension` resource. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource of the `LbEdgeExtension` resource. Must be in + # the format `projects/{project}/locations/{location}`. + # @!attribute [rw] lb_edge_extension_id + # @return [::String] + # Required. User-provided ID of the `LbEdgeExtension` resource to be created. + # @!attribute [rw] lb_edge_extension + # @return [::Google::Cloud::NetworkServices::V1::LbEdgeExtension] + # Required. `LbEdgeExtension` resource to be created. + # @!attribute [rw] request_id + # @return [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server can ignore + # the request if it has already been completed. The server guarantees + # that for 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server ignores the second request This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + class CreateLbEdgeExtensionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for updating a `LbEdgeExtension` resource. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Optional. Used to specify the fields to be overwritten in the + # `LbEdgeExtension` resource by the update. + # The fields specified in the `update_mask` are relative to the resource, not + # the full request. A field is overwritten if it is in the mask. If the + # user does not specify a mask, then all fields are overwritten. + # @!attribute [rw] lb_edge_extension + # @return [::Google::Cloud::NetworkServices::V1::LbEdgeExtension] + # Required. `LbEdgeExtension` resource being updated. + # @!attribute [rw] request_id + # @return [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server can ignore + # the request if it has already been completed. The server guarantees + # that for 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server ignores the second request This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + class UpdateLbEdgeExtensionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for deleting a `LbEdgeExtension` resource. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the `LbEdgeExtension` resource to delete. Must be in + # the format + # `projects/{project}/locations/{location}/lbEdgeExtensions/{lb_edge_extension}`. + # @!attribute [rw] request_id + # @return [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server can ignore + # the request if it has already been completed. The server guarantees + # that for 60 minutes after the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server ignores the second request This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + class DeleteLbEdgeExtensionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `AuthzExtension` is a resource that allows traffic forwarding + # to a callout backend service to make an authorization decision. + # @!attribute [rw] name + # @return [::String] + # Required. Identifier. Name of the `AuthzExtension` resource in the + # following format: + # `projects/{project}/locations/{location}/authzExtensions/{authz_extension}`. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The timestamp when the resource was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The timestamp when the resource was updated. + # @!attribute [rw] description + # @return [::String] + # Optional. A human-readable description of the resource. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. Set of labels associated with the `AuthzExtension` + # resource. + # + # The format must comply with [the requirements for + # labels](/compute/docs/labeling-resources#requirements) for Google Cloud + # resources. + # @!attribute [rw] load_balancing_scheme + # @return [::Google::Cloud::NetworkServices::V1::LoadBalancingScheme] + # Optional. All backend services and forwarding rules referenced by this + # extension must share the same load balancing scheme. Supported values: + # `INTERNAL_MANAGED`, `EXTERNAL_MANAGED`. Can be omitted for AuthzExtensions + # that do not reference a backend service. For more information, refer to + # [Backend services + # overview](https://cloud.google.com/load-balancing/docs/backend-service). + # @!attribute [rw] authority + # @return [::String] + # Optional. The `:authority` header in the gRPC request sent from Envoy to + # the extension service. It is required when the `service` field points to a + # backend service or a wasm plugin. + # @!attribute [rw] service + # @return [::String] + # Required. The reference to the service that runs the extension. + # + # To configure a callout extension, `service` must be a fully-qualified + # reference + # to a [backend + # service](https://cloud.google.com/compute/docs/reference/rest/v1/backendServices) + # in the format: + # `https://www.googleapis.com/compute/v1/projects/{project}/regions/{region}/backendServices/{backendService}` + # or + # `https://www.googleapis.com/compute/v1/projects/{project}/global/backendServices/{backendService}`. + # @!attribute [rw] timeout + # @return [::Google::Protobuf::Duration] + # Required. Specifies the timeout for each individual message on the stream. + # The timeout must be between 10-10000 milliseconds. + # @!attribute [rw] fail_open + # @return [::Boolean] + # Optional. Determines how the proxy behaves if the call to the extension + # fails or times out. + # + # When set to `TRUE`, request or response processing continues without + # error. Any subsequent extensions in the extension chain are also + # executed. When set to `FALSE` or the default setting of `FALSE` is used, + # one of the following happens: + # + # * If response headers have not been delivered to the downstream client, + # a generic 500 error is returned to the client. The error response can be + # tailored by configuring a custom error response in the load balancer. + # + # * If response headers have been delivered, then the HTTP stream to the + # downstream client is reset. + # @!attribute [rw] metadata + # @return [::Google::Protobuf::Struct] + # Optional. The metadata provided here is included as part of the + # `metadata_context` (of type `google.protobuf.Struct`) in the + # `ProcessingRequest` message sent to the extension + # server. The metadata is available under the namespace + # `com.google.authz_extension.`. + # The following variables are supported in the metadata Struct: + # + # `{forwarding_rule_id}` - substituted with the forwarding rule's fully + # qualified resource name. + # @!attribute [rw] forward_headers + # @return [::Array<::String>] + # Optional. List of the HTTP headers to forward to the extension + # (from the client). If omitted, all headers are sent. + # Each element is a string indicating the header name. + # @!attribute [rw] forward_attributes + # @return [::Array<::String>] + # Optional. List of the Envoy attributes to forward to the extension server. + # The attributes provided here are included as part of the + # `ProcessingRequest.attributes` field (of type + # `map`), where the keys are the attribute + # names. Refer to the + # [documentation](https://cloud.google.com/service-extensions/docs/cel-matcher-language-reference#attributes) + # for the names of attributes that can be forwarded. If omitted, no + # attributes are sent. Each element is a string indicating the + # attribute name. + # @!attribute [rw] wire_format + # @return [::Google::Cloud::NetworkServices::V1::WireFormat] + # Optional. The format of communication supported by the callout extension. + # This field is supported only for regional `AuthzExtension` resources. If + # not specified, the default value `EXT_PROC_GRPC` is used. Global + # `AuthzExtension` resources use the `EXT_PROC_GRPC` wire format. + class AuthzExtension + 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 + + # Message for requesting list of `AuthzExtension` resources. + # @!attribute [rw] parent + # @return [::String] + # Required. The project and location from which the `AuthzExtension` + # resources are listed. These values are specified in the following format: + # `projects/{project}/locations/{location}`. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. Requested page size. The server might return fewer items than + # requested. If unspecified, the server picks an appropriate default. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A token identifying a page of results that the server returns. + # @!attribute [rw] filter + # @return [::String] + # Optional. Filtering results. + # @!attribute [rw] order_by + # @return [::String] + # Optional. Hint about how to order the results. + class ListAuthzExtensionsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for response to listing `AuthzExtension` resources. + # @!attribute [rw] authz_extensions + # @return [::Array<::Google::Cloud::NetworkServices::V1::AuthzExtension>] + # The list of `AuthzExtension` resources. + # @!attribute [rw] next_page_token + # @return [::String] + # A token identifying a page of results that the server returns. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Locations that could not be reached. + class ListAuthzExtensionsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for getting a `AuthzExtension` resource. + # @!attribute [rw] name + # @return [::String] + # Required. A name of the `AuthzExtension` resource to get. Must be in + # the format + # `projects/{project}/locations/{location}/authzExtensions/{authz_extension}`. + class GetAuthzExtensionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for creating a `AuthzExtension` resource. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource of the `AuthzExtension` resource. Must + # be in the format `projects/{project}/locations/{location}`. + # @!attribute [rw] authz_extension_id + # @return [::String] + # Required. User-provided ID of the `AuthzExtension` resource to be + # created. + # @!attribute [rw] authz_extension + # @return [::Google::Cloud::NetworkServices::V1::AuthzExtension] + # Required. `AuthzExtension` resource to be created. + # @!attribute [rw] request_id + # @return [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server can ignore + # the request if it has already been completed. The server guarantees + # that for 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server ignores the second request This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + class CreateAuthzExtensionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for updating a `AuthzExtension` resource. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. Used to specify the fields to be overwritten in the + # `AuthzExtension` resource by the update. + # The fields specified in the `update_mask` are relative to the resource, not + # the full request. A field is overwritten if it is in the mask. If the + # user does not specify a mask, then all fields are overwritten. + # @!attribute [rw] authz_extension + # @return [::Google::Cloud::NetworkServices::V1::AuthzExtension] + # Required. `AuthzExtension` resource being updated. + # @!attribute [rw] request_id + # @return [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server can ignore + # the request if it has already been completed. The server guarantees + # that for 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server ignores the second request This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + class UpdateAuthzExtensionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for deleting a `AuthzExtension` resource. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the `AuthzExtension` resource to delete. Must + # be in the format + # `projects/{project}/locations/{location}/authzExtensions/{authz_extension}`. + # @!attribute [rw] request_id + # @return [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server can ignore + # the request if it has already been completed. The server guarantees + # that for 60 minutes after the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server ignores the second request This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + class DeleteAuthzExtensionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The part of the request or response for which the extension is called. + module EventType + # Unspecified value. Do not use. + EVENT_TYPE_UNSPECIFIED = 0 + + # If included in `supported_events`, + # the extension is called when the HTTP request headers arrive. + REQUEST_HEADERS = 1 + + # If included in `supported_events`, + # the extension is called when the HTTP request body arrives. + REQUEST_BODY = 2 + + # If included in `supported_events`, + # the extension is called when the HTTP response headers arrive. + RESPONSE_HEADERS = 3 + + # If included in `supported_events`, + # the extension is called when the HTTP response body arrives. + RESPONSE_BODY = 4 + + # If included in `supported_events`, + # the extension is called when the HTTP request trailers arrives. + REQUEST_TRAILERS = 5 + + # If included in `supported_events`, + # the extension is called when the HTTP response trailers arrives. + RESPONSE_TRAILERS = 6 + end + + # Load balancing schemes supported by the `LbTrafficExtension`, + # `LbRouteExtension`, and `LbEdgeExtension` resources. + # For more information, refer to [Backend services + # overview](https://cloud.google.com/load-balancing/docs/backend-service). + module LoadBalancingScheme + # Default value. Do not use. + LOAD_BALANCING_SCHEME_UNSPECIFIED = 0 + + # Signifies that this is used for Internal HTTP(S) Load Balancing. + INTERNAL_MANAGED = 1 + + # Signifies that this is used for External Managed HTTP(S) Load + # Balancing. + EXTERNAL_MANAGED = 2 + end + + # The format of communication supported by the extension. + module WireFormat + # Not specified. + WIRE_FORMAT_UNSPECIFIED = 0 + + # The extension service uses ext_proc gRPC API over a gRPC stream. This is + # the default value if the wire format is not specified. The backend service + # for the extension must use HTTP2 or H2C as the protocol. All + # `supported_events` for a client request are sent as part of the same + # gRPC stream. + EXT_PROC_GRPC = 1 + + # The extension service uses Envoy's `ext_authz` gRPC API. The backend + # service for the extension must use HTTP2 or H2C as the protocol. + # `EXT_AUTHZ_GRPC` is only supported for regional `AuthzExtension` resources. + EXT_AUTHZ_GRPC = 3 + end + + # The send mode for body processing. + module BodySendMode + # Default value. Do not use. + BODY_SEND_MODE_UNSPECIFIED = 0 + + # Calls to the extension are executed in the streamed mode. Subsequent + # chunks will be sent only after the previous chunks have been processed. + # + # The content of the body chunks is sent one way to the extension. Extension + # may send modified chunks back. + # + # This is the default value if the processing mode is not specified. + BODY_SEND_MODE_STREAMED = 1 + + # Calls are executed in the full duplex mode. Subsequent chunks will be sent + # for processing without waiting for the response for the previous chunk or + # for the response for `REQUEST_HEADERS` event. + # + # Extension can freely modify or chunk the body contents. If the extension + # doesn't send the body contents back, the next extension in the chain or the + # upstream will receive an empty body. + BODY_SEND_MODE_FULL_DUPLEX_STREAMED = 2 + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/endpoint_policy.rb b/owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/endpoint_policy.rb new file mode 100644 index 000000000000..b58fcb2f402a --- /dev/null +++ b/owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/endpoint_policy.rb @@ -0,0 +1,205 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 NetworkServices + module V1 + # EndpointPolicy is a resource that helps apply desired configuration + # on the endpoints that match specific criteria. + # For example, this resource can be used to apply "authentication config" + # an all endpoints that serve on port 8080. + # @!attribute [rw] name + # @return [::String] + # Identifier. Name of the EndpointPolicy resource. It matches pattern + # `projects/{project}/locations/*/endpointPolicies/{endpoint_policy}`. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The timestamp when the resource was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The timestamp when the resource was updated. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. Set of label tags associated with the EndpointPolicy resource. + # @!attribute [rw] type + # @return [::Google::Cloud::NetworkServices::V1::EndpointPolicy::EndpointPolicyType] + # Required. The type of endpoint policy. This is primarily used to validate + # the configuration. + # @!attribute [rw] authorization_policy + # @return [::String] + # Optional. This field specifies the URL of AuthorizationPolicy resource that + # applies authorization policies to the inbound traffic at the + # matched endpoints. Refer to Authorization. If this field is not + # specified, authorization is disabled(no authz checks) for this + # endpoint. + # @!attribute [rw] endpoint_matcher + # @return [::Google::Cloud::NetworkServices::V1::EndpointMatcher] + # Required. A matcher that selects endpoints to which the policies should be + # applied. + # @!attribute [rw] traffic_port_selector + # @return [::Google::Cloud::NetworkServices::V1::TrafficPortSelector] + # Optional. Port selector for the (matched) endpoints. If no port selector is + # provided, the matched config is applied to all ports. + # @!attribute [rw] description + # @return [::String] + # Optional. A free-text description of the resource. Max length 1024 + # characters. + # @!attribute [rw] server_tls_policy + # @return [::String] + # Optional. A URL referring to ServerTlsPolicy resource. ServerTlsPolicy is + # used to determine the authentication policy to be applied to terminate the + # inbound traffic at the identified backends. If this field is not set, + # authentication is disabled(open) for this endpoint. + # @!attribute [rw] client_tls_policy + # @return [::String] + # Optional. A URL referring to a ClientTlsPolicy resource. ClientTlsPolicy + # can be set to specify the authentication for traffic from the proxy to the + # actual endpoints. More specifically, it is applied to the outgoing traffic + # from the proxy to the endpoint. This is typically used for sidecar model + # where the proxy identifies itself as endpoint to the control plane, with + # the connection between sidecar and endpoint requiring authentication. If + # this field is not set, authentication is disabled(open). Applicable only + # when EndpointPolicyType is SIDECAR_PROXY. + class EndpointPolicy + 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 + + # The type of endpoint policy. + module EndpointPolicyType + # Default value. Must not be used. + ENDPOINT_POLICY_TYPE_UNSPECIFIED = 0 + + # Represents a proxy deployed as a sidecar. + SIDECAR_PROXY = 1 + + # Represents a proxyless gRPC backend. + GRPC_SERVER = 2 + end + end + + # Request used with the ListEndpointPolicies method. + # @!attribute [rw] parent + # @return [::String] + # Required. The project and location from which the EndpointPolicies should + # be listed, specified in the format `projects/*/locations/*`. + # @!attribute [rw] page_size + # @return [::Integer] + # Maximum number of EndpointPolicies to return per call. + # @!attribute [rw] page_token + # @return [::String] + # The value returned by the last `ListEndpointPoliciesResponse` + # Indicates that this is a continuation of a prior + # `ListEndpointPolicies` call, and that the system should return the + # next page of data. + # @!attribute [rw] return_partial_success + # @return [::Boolean] + # Optional. If true, allow partial responses for multi-regional Aggregated + # List requests. Otherwise if one of the locations is down or unreachable, + # the Aggregated List request will fail. + class ListEndpointPoliciesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response returned by the ListEndpointPolicies method. + # @!attribute [rw] endpoint_policies + # @return [::Array<::Google::Cloud::NetworkServices::V1::EndpointPolicy>] + # List of EndpointPolicy resources. + # @!attribute [rw] next_page_token + # @return [::String] + # If there might be more results than those appearing in this response, then + # `next_page_token` is included. To get the next set of results, call this + # method again using the value of `next_page_token` as `page_token`. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Unreachable resources. Populated when the request opts into + # {::Google::Cloud::NetworkServices::V1::ListEndpointPoliciesRequest#return_partial_success return_partial_success} + # and reading across collections e.g. when + # attempting to list all resources across all supported locations. + class ListEndpointPoliciesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request used with the GetEndpointPolicy method. + # @!attribute [rw] name + # @return [::String] + # Required. A name of the EndpointPolicy to get. Must be in the format + # `projects/*/locations/*/endpointPolicies/*`. + class GetEndpointPolicyRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request used with the CreateEndpointPolicy method. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource of the EndpointPolicy. Must be in the + # format `projects/*/locations/*`. + # @!attribute [rw] endpoint_policy_id + # @return [::String] + # Required. Short name of the EndpointPolicy resource to be created. + # E.g. "CustomECS". + # @!attribute [rw] endpoint_policy + # @return [::Google::Cloud::NetworkServices::V1::EndpointPolicy] + # Required. EndpointPolicy resource to be created. + class CreateEndpointPolicyRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request used with the UpdateEndpointPolicy method. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Optional. Field mask is used to specify the fields to be overwritten in the + # EndpointPolicy resource by the update. + # The fields specified in the update_mask are relative to the resource, not + # the full request. A field will be overwritten if it is in the mask. If the + # user does not provide a mask then all fields will be overwritten. + # @!attribute [rw] endpoint_policy + # @return [::Google::Cloud::NetworkServices::V1::EndpointPolicy] + # Required. Updated EndpointPolicy resource. + class UpdateEndpointPolicyRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request used with the DeleteEndpointPolicy method. + # @!attribute [rw] name + # @return [::String] + # Required. A name of the EndpointPolicy to delete. Must be in the format + # `projects/*/locations/*/endpointPolicies/*`. + class DeleteEndpointPolicyRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/extensibility.rb b/owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/extensibility.rb new file mode 100644 index 000000000000..28a43c60a318 --- /dev/null +++ b/owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/extensibility.rb @@ -0,0 +1,575 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 NetworkServices + module V1 + # `WasmPlugin` is a resource representing a service executing + # a customer-provided Wasm module. + # @!attribute [rw] name + # @return [::String] + # Identifier. Name of the `WasmPlugin` resource in the following format: + # `projects/{project}/locations/{location}/wasmPlugins/{wasm_plugin}`. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The timestamp when the resource was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The timestamp when the resource was updated. + # @!attribute [rw] description + # @return [::String] + # Optional. A human-readable description of the resource. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. Set of labels associated with the `WasmPlugin` resource. + # + # The format must comply with [the following + # requirements](/compute/docs/labeling-resources#requirements). + # @!attribute [rw] main_version_id + # @return [::String] + # Optional. The ID of the `WasmPluginVersion` resource that is the + # currently serving one. The version referred to must be a child of this + # `WasmPlugin` resource. + # @!attribute [rw] log_config + # @return [::Google::Cloud::NetworkServices::V1::WasmPlugin::LogConfig] + # Optional. Specifies the logging options for the activity performed by this + # plugin. If logging is enabled, plugin logs are exported to + # Cloud Logging. + # Note that the settings relate to the logs generated by using + # logging statements in your Wasm code. + # @!attribute [rw] versions + # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::NetworkServices::V1::WasmPlugin::VersionDetails}] + # Optional. All versions of this `WasmPlugin` resource in the key-value + # format. The key is the resource ID, and the value is the `VersionDetails` + # object. + # + # Lets you create or update a `WasmPlugin` resource and its versions in a + # single request. When the `main_version_id` field is not empty, it must + # point to one of the `VersionDetails` objects in the map. + # + # If provided in a `PATCH` request, the new versions replace the + # previous set. Any version omitted from the `versions` field is removed. + # Because the `WasmPluginVersion` resource is immutable, if a + # `WasmPluginVersion` resource with the same name already exists and differs, + # the request fails. + # + # Note: In a `GET` request, this field is populated only if the field + # `GetWasmPluginRequest.view` is set to `WASM_PLUGIN_VIEW_FULL`. + # @!attribute [r] used_by + # @return [::Array<::Google::Cloud::NetworkServices::V1::WasmPlugin::UsedBy>] + # Output only. List of all + # [extensions](https://cloud.google.com/service-extensions/docs/overview) + # that use this `WasmPlugin` resource. + class WasmPlugin + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Details of a `WasmPluginVersion` resource to be inlined in the + # `WasmPlugin` resource. + # @!attribute [rw] plugin_config_data + # @return [::String] + # Configuration for the plugin. + # The configuration is provided to the plugin at runtime through + # the `ON_CONFIGURE` callback. When a new + # `WasmPluginVersion` version is created, the digest of the + # contents is saved in the `plugin_config_digest` field. + # + # Note: The following fields are mutually exclusive: `plugin_config_data`, `plugin_config_uri`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] plugin_config_uri + # @return [::String] + # URI of the plugin configuration stored in the Artifact Registry. + # The configuration is provided to the plugin at runtime through + # the `ON_CONFIGURE` callback. + # + # The URI can refer to one of the following repository formats: + # + # * Container images: the `plugin_config_uri` must point to a container + # that contains a single file with the name `plugin.config`. + # When a new `WasmPluginVersion` resource is created, the digest of the + # image is saved in the `plugin_config_digest` field. + # When pulling a container image from Artifact Registry, the digest + # value is used instead of an image tag. + # + # * Generic artifacts: the `plugin_config_uri` must be in this format: + # `projects/{project}/locations/{location}/repositories/{repository}/ + # genericArtifacts/\\{package}:\\{version}`. + # The specified package and version must contain a file with the name + # `plugin.config`. When a new `WasmPluginVersion` resource is + # created, the checksum of the contents of the file is saved in the + # `plugin_config_digest` field. + # + # Note: The following fields are mutually exclusive: `plugin_config_uri`, `plugin_config_data`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The timestamp when the resource was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The timestamp when the resource was updated. + # @!attribute [rw] description + # @return [::String] + # Optional. A human-readable description of the resource. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. Set of labels associated with the `WasmPluginVersion` + # resource. + # @!attribute [rw] image_uri + # @return [::String] + # Optional. URI of the image containing the Wasm module, stored in + # Artifact Registry. + # + # The URI can refer to one of the following repository formats: + # + # * Container images: the `image_uri` must point to a container that + # contains a single file with the name `plugin.wasm`. + # When a new `WasmPluginVersion` resource is created, the digest of the + # image is saved in the `image_digest` field. + # When pulling a container image from Artifact Registry, the digest value + # is used instead of an image tag. + # + # * Generic artifacts: the `image_uri` must be in this format: + # `projects/{project}/locations/{location}/repositories/{repository}/ + # genericArtifacts/\\{package}:\\{version}`. + # The specified package and version must contain a file with the name + # `plugin.wasm`. When a new `WasmPluginVersion` resource is created, the + # checksum of the contents of the file is saved in the `image_digest` + # field. + # @!attribute [r] image_digest + # @return [::String] + # Output only. This field holds the digest (usually checksum) value for the + # plugin image. The value is calculated based on the `image_uri` field. If + # the `image_uri` field refers to a container image, the digest value is + # obtained from the container image. If the `image_uri` field refers to + # a generic artifact, the digest value is calculated based on the + # contents of the file. + # @!attribute [r] plugin_config_digest + # @return [::String] + # Output only. This field holds the digest (usually checksum) value for the + # plugin configuration. The value is calculated based on the contents of + # `plugin_config_data` field or the image defined by the + # `plugin_config_uri` field. + class VersionDetails + 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 + + # Specifies the logging options for the activity performed by this + # plugin. If logging is enabled, plugin logs are exported to + # Cloud Logging. + # @!attribute [rw] enable + # @return [::Boolean] + # Optional. Specifies whether to enable logging for activity by this + # plugin. + # + # Defaults to `false`. + # @!attribute [rw] sample_rate + # @return [::Float] + # Non-empty default. Configures the sampling rate of activity logs, where + # `1.0` means all logged activity is reported and `0.0` means no activity + # is reported. A floating point value between `0.0` and `1.0` indicates + # that a percentage of log messages is stored. + # + # The default value when logging is enabled is `1.0`. The value of the + # field must be between `0` and `1` (inclusive). + # + # This field can be specified only if logging is enabled for this plugin. + # @!attribute [rw] min_log_level + # @return [::Google::Cloud::NetworkServices::V1::WasmPlugin::LogConfig::LogLevel] + # Non-empty default. Specifies the lowest level of the plugin logs that are + # exported to Cloud Logging. This setting relates to the logs generated by + # using logging statements in your Wasm code. + # + # This field is can be set only if logging is enabled for the plugin. + # + # If the field is not provided when logging is enabled, it is set to + # `INFO` by default. + class LogConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Possible values to specify the lowest level of logs to be exported to + # Cloud Logging. + module LogLevel + # Unspecified value. Defaults to `LogLevel.INFO`. + LOG_LEVEL_UNSPECIFIED = 0 + + # Report logs with TRACE level and above. + TRACE = 1 + + # Report logs with DEBUG level and above. + DEBUG = 2 + + # Report logs with INFO level and above. + INFO = 3 + + # Report logs with WARN level and above. + WARN = 4 + + # Report logs with ERROR level and above. + ERROR = 5 + + # Report logs with CRITICAL level only. + CRITICAL = 6 + end + end + + # Defines a resource that uses the `WasmPlugin` resource. + # @!attribute [r] name + # @return [::String] + # Output only. Full name of the resource + # https://google.aip.dev/122#full-resource-names, for example + # `//networkservices.googleapis.com/projects/{project}/locations/{location}/lbRouteExtensions/{extension}` + class UsedBy + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class LabelsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::Google::Cloud::NetworkServices::V1::WasmPlugin::VersionDetails] + class VersionsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # A single immutable version of a `WasmPlugin` resource. + # Defines the Wasm module used and optionally its runtime config. + # @!attribute [rw] plugin_config_data + # @return [::String] + # Configuration for the plugin. + # The configuration is provided to the plugin at runtime through + # the `ON_CONFIGURE` callback. When a new + # `WasmPluginVersion` resource is created, the digest of the + # contents is saved in the `plugin_config_digest` field. + # + # Note: The following fields are mutually exclusive: `plugin_config_data`, `plugin_config_uri`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] plugin_config_uri + # @return [::String] + # URI of the plugin configuration stored in the Artifact Registry. + # The configuration is provided to the plugin at runtime through + # the `ON_CONFIGURE` callback. + # + # The URI can refer to one of the following repository formats: + # + # * Container images: the `plugin_config_uri` must point to a container + # that contains a single file with the name `plugin.config`. + # When a new `WasmPluginVersion` resource is created, the digest of the + # image is saved in the `plugin_config_digest` field. + # When pulling a container image from Artifact Registry, the digest + # value is used instead of an image tag. + # + # * Generic artifacts: the `plugin_config_uri` must be in this format: + # `projects/{project}/locations/{location}/repositories/{repository}/ + # genericArtifacts/\\{package}:\\{version}`. + # The specified package and version must contain a file with the name + # `plugin.config`. When a new `WasmPluginVersion` resource is + # created, the checksum of the contents of the file is saved in the + # `plugin_config_digest` field. + # + # Note: The following fields are mutually exclusive: `plugin_config_uri`, `plugin_config_data`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] name + # @return [::String] + # Identifier. Name of the `WasmPluginVersion` resource in the following + # format: `projects/{project}/locations/{location}/wasmPlugins/{wasm_plugin}/ + # versions/\\{wasm_plugin_version}`. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The timestamp when the resource was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The timestamp when the resource was updated. + # @!attribute [rw] description + # @return [::String] + # Optional. A human-readable description of the resource. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. Set of labels associated with the `WasmPluginVersion` + # resource. + # @!attribute [rw] image_uri + # @return [::String] + # Optional. URI of the image containing the Wasm module, stored in + # Artifact Registry. + # + # The URI can refer to one of the following repository formats: + # + # * Container images: the `image_uri` must point to a container that + # contains a single file with the name `plugin.wasm`. + # When a new `WasmPluginVersion` resource is created, the digest of the + # image is saved in the `image_digest` field. + # When pulling a container image from Artifact Registry, the digest value + # is used instead of an image tag. + # + # * Generic artifacts: the `image_uri` must be in this format: + # `projects/{project}/locations/{location}/repositories/{repository}/ + # genericArtifacts/\\{package}:\\{version}`. + # The specified package and version must contain a file with the name + # `plugin.wasm`. When a new `WasmPluginVersion` resource is created, the + # checksum of the contents of the file is saved in the `image_digest` + # field. + # @!attribute [r] image_digest + # @return [::String] + # Output only. This field holds the digest (usually checksum) value for the + # plugin image. The value is calculated based on the `image_uri` field. If + # the `image_uri` field refers to a container image, the digest value is + # obtained from the container image. If the `image_uri` field refers to + # a generic artifact, the digest value is calculated based on the + # contents of the file. + # @!attribute [r] plugin_config_digest + # @return [::String] + # Output only. This field holds the digest (usually checksum) value for the + # plugin configuration. The value is calculated based on the contents of + # `plugin_config_data` field or the image defined by the + # `plugin_config_uri` field. + class WasmPluginVersion + 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 + + # Request used with the `ListWasmPlugins` method. + # @!attribute [rw] parent + # @return [::String] + # Required. The project and location from which the `WasmPlugin` resources + # are listed, specified in the following format: + # `projects/{project}/locations/global`. + # @!attribute [rw] page_size + # @return [::Integer] + # Maximum number of `WasmPlugin` resources to return per call. + # If not specified, at most 50 `WasmPlugin` resources are returned. + # The maximum value is 1000; values above 1000 are coerced to 1000. + # @!attribute [rw] page_token + # @return [::String] + # The value returned by the last `ListWasmPluginsResponse` call. + # Indicates that this is a continuation of a prior + # `ListWasmPlugins` call, and that the + # next page of data is to be returned. + class ListWasmPluginsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response returned by the `ListWasmPlugins` method. + # @!attribute [rw] wasm_plugins + # @return [::Array<::Google::Cloud::NetworkServices::V1::WasmPlugin>] + # List of `WasmPlugin` resources. + # @!attribute [rw] next_page_token + # @return [::String] + # If there might be more results than those appearing in this response, then + # `next_page_token` is included. To get the next set of results, + # call this method again using the value of `next_page_token` as + # `page_token`. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Unreachable resources. Populated when the request attempts to list all + # resources across all supported locations, while some locations are + # temporarily unavailable. + class ListWasmPluginsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request used by the `GetWasmPlugin` method. + # @!attribute [rw] name + # @return [::String] + # Required. A name of the `WasmPlugin` resource to get. Must be in the + # format `projects/{project}/locations/global/wasmPlugins/{wasm_plugin}`. + # @!attribute [rw] view + # @return [::Google::Cloud::NetworkServices::V1::WasmPluginView] + # Determines how much data must be returned in the response. See + # [AIP-157](https://google.aip.dev/157). + class GetWasmPluginRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request used by the `CreateWasmPlugin` method. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource of the `WasmPlugin` resource. Must be in the + # format `projects/{project}/locations/global`. + # @!attribute [rw] wasm_plugin_id + # @return [::String] + # Required. User-provided ID of the `WasmPlugin` resource to be created. + # @!attribute [rw] wasm_plugin + # @return [::Google::Cloud::NetworkServices::V1::WasmPlugin] + # Required. `WasmPlugin` resource to be created. + class CreateWasmPluginRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request used by the `UpdateWasmPlugin` method. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Optional. Used to specify the fields to be overwritten in the + # `WasmPlugin` resource by the update. + # The fields specified in the `update_mask` field are relative to the + # resource, not the full request. + # An omitted `update_mask` field is treated as an implied `update_mask` + # field equivalent to all fields that are populated (that have a non-empty + # value). + # The `update_mask` field supports a special value `*`, which means that + # each field in the given `WasmPlugin` resource (including the empty ones) + # replaces the current value. + # @!attribute [rw] wasm_plugin + # @return [::Google::Cloud::NetworkServices::V1::WasmPlugin] + # Required. Updated `WasmPlugin` resource. + class UpdateWasmPluginRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request used by the `DeleteWasmPlugin` method. + # @!attribute [rw] name + # @return [::String] + # Required. A name of the `WasmPlugin` resource to delete. Must be in the + # format `projects/{project}/locations/global/wasmPlugins/{wasm_plugin}`. + class DeleteWasmPluginRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request used with the `ListWasmPluginVersions` method. + # @!attribute [rw] parent + # @return [::String] + # Required. The `WasmPlugin` resource whose `WasmPluginVersion`s + # are listed, specified in the following format: + # `projects/{project}/locations/global/wasmPlugins/{wasm_plugin}`. + # @!attribute [rw] page_size + # @return [::Integer] + # Maximum number of `WasmPluginVersion` resources to return per + # call. If not specified, at most 50 `WasmPluginVersion` resources are + # returned. The maximum value is 1000; values above 1000 are coerced to + # 1000. + # @!attribute [rw] page_token + # @return [::String] + # The value returned by the last `ListWasmPluginVersionsResponse` call. + # Indicates that this is a continuation of a prior + # `ListWasmPluginVersions` call, and that the + # next page of data is to be returned. + class ListWasmPluginVersionsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response returned by the `ListWasmPluginVersions` method. + # @!attribute [rw] wasm_plugin_versions + # @return [::Array<::Google::Cloud::NetworkServices::V1::WasmPluginVersion>] + # List of `WasmPluginVersion` resources. + # @!attribute [rw] next_page_token + # @return [::String] + # If there might be more results than those appearing in this response, then + # `next_page_token` is included. To get the next set of results, + # call this method again using the value of `next_page_token` as + # `page_token`. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Unreachable resources. Populated when the request attempts to list all + # resources across all supported locations, while some locations are + # temporarily unavailable. + class ListWasmPluginVersionsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request used by the `GetWasmPluginVersion` method. + # @!attribute [rw] name + # @return [::String] + # Required. A name of the `WasmPluginVersion` resource to get. Must be in + # the format + # `projects/{project}/locations/global/wasmPlugins/{wasm_plugin}/versions/{wasm_plugin_version}`. + class GetWasmPluginVersionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request used by the `CreateWasmPluginVersion` method. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource of the `WasmPluginVersion` resource. Must be + # in the format + # `projects/{project}/locations/global/wasmPlugins/{wasm_plugin}`. + # @!attribute [rw] wasm_plugin_version_id + # @return [::String] + # Required. User-provided ID of the `WasmPluginVersion` resource to be + # created. + # @!attribute [rw] wasm_plugin_version + # @return [::Google::Cloud::NetworkServices::V1::WasmPluginVersion] + # Required. `WasmPluginVersion` resource to be created. + class CreateWasmPluginVersionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request used by the `DeleteWasmPluginVersion` method. + # @!attribute [rw] name + # @return [::String] + # Required. A name of the `WasmPluginVersion` resource to delete. Must be in + # the format + # `projects/{project}/locations/global/wasmPlugins/{wasm_plugin}/versions/{wasm_plugin_version}`. + class DeleteWasmPluginVersionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Determines the information that should be returned by the server. + module WasmPluginView + # Unspecified value. Do not use. + WASM_PLUGIN_VIEW_UNSPECIFIED = 0 + + # If specified in the `GET` request for a `WasmPlugin` resource, the server's + # response includes just the `WasmPlugin` resource. + WASM_PLUGIN_VIEW_BASIC = 1 + + # If specified in the `GET` request for a `WasmPlugin` resource, the server's + # response includes the `WasmPlugin` resource with all its versions. + WASM_PLUGIN_VIEW_FULL = 2 + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/gateway.rb b/owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/gateway.rb new file mode 100644 index 000000000000..5128a5599c3c --- /dev/null +++ b/owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/gateway.rb @@ -0,0 +1,285 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 NetworkServices + module V1 + # Gateway represents the configuration for a proxy, typically a load balancer. + # It captures the ip:port over which the services are exposed by the proxy, + # along with any policy configurations. Routes have reference to to Gateways to + # dictate how requests should be routed by this Gateway. + # @!attribute [rw] name + # @return [::String] + # Identifier. Name of the Gateway resource. It matches pattern + # `projects/*/locations/*/gateways/`. + # @!attribute [r] self_link + # @return [::String] + # Output only. Server-defined URL of this resource + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The timestamp when the resource was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The timestamp when the resource was updated. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. Set of label tags associated with the Gateway resource. + # @!attribute [rw] description + # @return [::String] + # Optional. A free-text description of the resource. Max length 1024 + # characters. + # @!attribute [rw] type + # @return [::Google::Cloud::NetworkServices::V1::Gateway::Type] + # Immutable. The type of the customer managed gateway. + # This field is required. If unspecified, an error is returned. + # @!attribute [rw] addresses + # @return [::Array<::String>] + # Optional. Zero or one IPv4 or IPv6 address on which the Gateway will + # receive the traffic. When no address is provided, an IP from the subnetwork + # is allocated + # + # This field only applies to gateways of type 'SECURE_WEB_GATEWAY'. + # Gateways of type 'OPEN_MESH' listen on 0.0.0.0 for IPv4 and :: for IPv6. + # @!attribute [rw] ports + # @return [::Array<::Integer>] + # Required. One or more port numbers (1-65535), on which the Gateway will + # receive traffic. The proxy binds to the specified ports. + # Gateways of type 'SECURE_WEB_GATEWAY' are limited to 5 ports. + # Gateways of type 'OPEN_MESH' listen on 0.0.0.0 for IPv4 and :: for IPv6 and + # support multiple ports. + # @!attribute [rw] all_ports + # @return [::Boolean] + # Optional. If true, the Gateway will listen on all ports. This is mutually + # exclusive with the `ports` field. This field only applies to gateways of + # type 'SECURE_WEB_GATEWAY'. + # @!attribute [rw] scope + # @return [::String] + # Optional. Scope determines how configuration across multiple Gateway + # instances are merged. The configuration for multiple Gateway instances with + # the same scope will be merged as presented as a single configuration to the + # proxy/load balancer. + # + # Max length 64 characters. + # Scope should start with a letter and can only have letters, numbers, + # hyphens. + # @!attribute [rw] server_tls_policy + # @return [::String] + # Optional. A fully-qualified ServerTLSPolicy URL reference. Specifies how + # TLS traffic is terminated. If empty, TLS termination is disabled. + # @!attribute [rw] certificate_urls + # @return [::Array<::String>] + # Optional. A fully-qualified Certificates URL reference. The proxy presents + # a Certificate (selected based on SNI) when establishing a TLS connection. + # This feature only applies to gateways of type 'SECURE_WEB_GATEWAY'. + # @!attribute [rw] gateway_security_policy + # @return [::String] + # Optional. A fully-qualified GatewaySecurityPolicy URL reference. + # Defines how a server should apply security policy to inbound + # (VM to Proxy) initiated connections. + # + # For example: + # `projects/*/locations/*/gatewaySecurityPolicies/swg-policy`. + # + # This policy is specific to gateways of type 'SECURE_WEB_GATEWAY'. + # @!attribute [rw] network + # @return [::String] + # Optional. The relative resource name identifying the VPC network that is + # using this configuration. For example: + # `projects/*/global/networks/network-1`. + # + # Currently, this field is specific to gateways of type 'SECURE_WEB_GATEWAY'. + # @!attribute [rw] subnetwork + # @return [::String] + # Optional. The relative resource name identifying the subnetwork in which + # this SWG is allocated. For example: + # `projects/*/regions/us-central1/subnetworks/network-1` + # + # Currently, this field is specific to gateways of type 'SECURE_WEB_GATEWAY". + # @!attribute [rw] ip_version + # @return [::Google::Cloud::NetworkServices::V1::Gateway::IpVersion] + # Optional. The IP Version that will be used by this gateway. Valid options + # are IPV4 or IPV6. Default is IPV4. + # @!attribute [rw] envoy_headers + # @return [::Google::Cloud::NetworkServices::V1::EnvoyHeaders] + # Optional. Determines if envoy will insert internal debug headers into + # upstream requests. Other Envoy headers may still be injected. By default, + # envoy will not insert any debug headers. + # @!attribute [rw] routing_mode + # @return [::Google::Cloud::NetworkServices::V1::Gateway::RoutingMode] + # Optional. The routing mode of the Gateway. + # This field is configurable only for gateways of type SECURE_WEB_GATEWAY. + # This field is required for gateways of type SECURE_WEB_GATEWAY. + # @!attribute [rw] allow_global_access + # @return [::Boolean] + # Optional. If true, the gateway will allow traffic from clients outside of + # the region where the gateway is located. + # This field is configurable only for gateways of type SECURE_WEB_GATEWAY. + class Gateway + 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 + + # The type of the customer-managed gateway. + # Possible values are: + # * OPEN_MESH + # * SECURE_WEB_GATEWAY + module Type + # The type of the customer managed gateway is unspecified. + TYPE_UNSPECIFIED = 0 + + # The type of the customer managed gateway is TrafficDirector Open + # Mesh. + OPEN_MESH = 1 + + # The type of the customer managed gateway is SecureWebGateway (SWG). + SECURE_WEB_GATEWAY = 2 + end + + # The types of IP version for the gateway. + # Possible values are: + # * IPV4 + # * IPV6 + module IpVersion + # The type when IP version is not specified. Defaults to IPV4. + IP_VERSION_UNSPECIFIED = 0 + + # The type for IP version 4. + IPV4 = 1 + + # The type for IP version 6. + IPV6 = 2 + end + + # The routing mode of the Gateway, to determine how the Gateway routes + # traffic. Today, this field only applies to Gateways of type + # SECURE_WEB_GATEWAY. Possible values are: + # * EXPLICIT_ROUTING_MODE + # * NEXT_HOP_ROUTING_MODE + module RoutingMode + # The routing mode is explicit; clients are configured to send + # traffic through the gateway. This is the default routing mode. + EXPLICIT_ROUTING_MODE = 0 + + # The routing mode is next-hop. Clients are unaware of the gateway, + # and a route (advanced route or other route type) + # can be configured to direct traffic from client to gateway. + # The gateway then acts as a next-hop to the destination. + NEXT_HOP_ROUTING_MODE = 1 + end + end + + # Request used with the ListGateways method. + # @!attribute [rw] parent + # @return [::String] + # Required. The project and location from which the Gateways should be + # listed, specified in the format `projects/*/locations/*`. + # @!attribute [rw] page_size + # @return [::Integer] + # Maximum number of Gateways to return per call. + # @!attribute [rw] page_token + # @return [::String] + # The value returned by the last `ListGatewaysResponse` + # Indicates that this is a continuation of a prior `ListGateways` call, + # and that the system should return the next page of data. + class ListGatewaysRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response returned by the ListGateways method. + # @!attribute [rw] gateways + # @return [::Array<::Google::Cloud::NetworkServices::V1::Gateway>] + # List of Gateway resources. + # @!attribute [rw] next_page_token + # @return [::String] + # If there might be more results than those appearing in this response, then + # `next_page_token` is included. To get the next set of results, call this + # method again using the value of `next_page_token` as `page_token`. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Locations that could not be reached. + class ListGatewaysResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request used by the GetGateway method. + # @!attribute [rw] name + # @return [::String] + # Required. A name of the Gateway to get. Must be in the format + # `projects/*/locations/*/gateways/*`. + class GetGatewayRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request used by the CreateGateway method. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource of the Gateway. Must be in the + # format `projects/*/locations/*`. + # @!attribute [rw] gateway_id + # @return [::String] + # Required. Short name of the Gateway resource to be created. + # @!attribute [rw] gateway + # @return [::Google::Cloud::NetworkServices::V1::Gateway] + # Required. Gateway resource to be created. + class CreateGatewayRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request used by the UpdateGateway method. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Optional. Field mask is used to specify the fields to be overwritten in the + # Gateway resource by the update. + # The fields specified in the update_mask are relative to the resource, not + # the full request. A field will be overwritten if it is in the mask. If the + # user does not provide a mask then all fields will be overwritten. + # @!attribute [rw] gateway + # @return [::Google::Cloud::NetworkServices::V1::Gateway] + # Required. Updated Gateway resource. + class UpdateGatewayRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request used by the DeleteGateway method. + # @!attribute [rw] name + # @return [::String] + # Required. A name of the Gateway to delete. Must be in the format + # `projects/*/locations/*/gateways/*`. + class DeleteGatewayRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/grpc_route.rb b/owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/grpc_route.rb new file mode 100644 index 000000000000..a90b494733c7 --- /dev/null +++ b/owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/grpc_route.rb @@ -0,0 +1,474 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 NetworkServices + module V1 + # GrpcRoute is the resource defining how gRPC traffic routed by a Mesh + # or Gateway resource is routed. + # @!attribute [rw] name + # @return [::String] + # Identifier. Name of the GrpcRoute resource. It matches pattern + # `projects/*/locations/*/grpcRoutes/` + # @!attribute [r] self_link + # @return [::String] + # Output only. Server-defined URL of this resource + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The timestamp when the resource was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The timestamp when the resource was updated. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. Set of label tags associated with the GrpcRoute resource. + # @!attribute [rw] description + # @return [::String] + # Optional. A free-text description of the resource. Max length 1024 + # characters. + # @!attribute [rw] hostnames + # @return [::Array<::String>] + # Required. Service hostnames with an optional port for which this route + # describes traffic. + # + # Format: [:] + # + # Hostname is the fully qualified domain name of a network host. This matches + # the RFC 1123 definition of a hostname with 2 notable exceptions: + # - IPs are not allowed. + # - A hostname may be prefixed with a wildcard label (`*.`). The wildcard + # label must appear by itself as the first label. + # + # Hostname can be "precise" which is a domain name without the terminating + # dot of a network host (e.g. `foo.example.com`) or "wildcard", which is a + # domain name prefixed with a single wildcard label (e.g. `*.example.com`). + # + # Note that as per RFC1035 and RFC1123, a label must consist of lower case + # alphanumeric characters or '-', and must start and end with an alphanumeric + # character. No other punctuation is allowed. + # + # The routes associated with a Mesh or Gateway must have unique hostnames. If + # you attempt to attach multiple routes with conflicting hostnames, the + # configuration will be rejected. + # + # For example, while it is acceptable for routes for the hostnames + # `*.foo.bar.com` and `*.bar.com` to be associated with the same route, it is + # not possible to associate two routes both with `*.bar.com` or both with + # `bar.com`. + # + # If a port is specified, then gRPC clients must use the channel URI with the + # port to match this rule (i.e. "xds:///service:123"), otherwise they must + # supply the URI without a port (i.e. "xds:///service"). + # @!attribute [rw] meshes + # @return [::Array<::String>] + # Optional. Meshes defines a list of meshes this GrpcRoute is attached to, as + # one of the routing rules to route the requests served by the mesh. + # + # Each mesh reference should match the pattern: + # `projects/*/locations/*/meshes/` + # @!attribute [rw] gateways + # @return [::Array<::String>] + # Optional. Gateways defines a list of gateways this GrpcRoute is attached + # to, as one of the routing rules to route the requests served by the + # gateway. + # + # Each gateway reference should match the pattern: + # `projects/*/locations/*/gateways/` + # @!attribute [rw] rules + # @return [::Array<::Google::Cloud::NetworkServices::V1::GrpcRoute::RouteRule>] + # Required. A list of detailed rules defining how to route traffic. + # + # Within a single GrpcRoute, the GrpcRoute.RouteAction associated with the + # first matching GrpcRoute.RouteRule will be executed. At least one rule + # must be supplied. + class GrpcRoute + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Specifies a match against a method. + # @!attribute [rw] type + # @return [::Google::Cloud::NetworkServices::V1::GrpcRoute::MethodMatch::Type] + # Optional. Specifies how to match against the name. If not specified, a + # default value of "EXACT" is used. + # @!attribute [rw] grpc_service + # @return [::String] + # Required. Name of the service to match against. If unspecified, will + # match all services. + # @!attribute [rw] grpc_method + # @return [::String] + # Required. Name of the method to match against. If unspecified, will match + # all methods. + # @!attribute [rw] case_sensitive + # @return [::Boolean] + # Optional. Specifies that matches are case sensitive. The default value + # is true. case_sensitive must not be used with a type of + # REGULAR_EXPRESSION. + class MethodMatch + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The type of the match. + module Type + # Unspecified. + TYPE_UNSPECIFIED = 0 + + # Will only match the exact name provided. + EXACT = 1 + + # Will interpret grpc_method and grpc_service as regexes. RE2 syntax is + # supported. + REGULAR_EXPRESSION = 2 + end + end + + # A match against a collection of headers. + # @!attribute [rw] type + # @return [::Google::Cloud::NetworkServices::V1::GrpcRoute::HeaderMatch::Type] + # Optional. Specifies how to match against the value of the header. If not + # specified, a default value of EXACT is used. + # @!attribute [rw] key + # @return [::String] + # Required. The key of the header. + # @!attribute [rw] value + # @return [::String] + # Required. The value of the header. + class HeaderMatch + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The type of match. + module Type + # Unspecified. + TYPE_UNSPECIFIED = 0 + + # Will only match the exact value provided. + EXACT = 1 + + # Will match paths conforming to the prefix specified by value. RE2 + # syntax is supported. + REGULAR_EXPRESSION = 2 + end + end + + # Criteria for matching traffic. A RouteMatch will be considered to match + # when all supplied fields match. + # @!attribute [rw] method + # @return [::Google::Cloud::NetworkServices::V1::GrpcRoute::MethodMatch] + # Optional. A gRPC method to match against. If this field is empty or + # omitted, will match all methods. + # @!attribute [rw] headers + # @return [::Array<::Google::Cloud::NetworkServices::V1::GrpcRoute::HeaderMatch>] + # Optional. Specifies a collection of headers to match. + class RouteMatch + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The destination to which traffic will be routed. + # @!attribute [rw] service_name + # @return [::String] + # Required. The URL of a destination service to which to route traffic. + # Must refer to either a BackendService or ServiceDirectoryService. + # @!attribute [rw] weight + # @return [::Integer] + # Optional. Specifies the proportion of requests forwarded to the backend + # referenced by the serviceName field. This is computed as: + # - weight/Sum(weights in this destination list). + # For non-zero values, there may be some epsilon from the exact proportion + # defined here depending on the precision an implementation supports. + # + # If only one serviceName is specified and it has a weight greater than 0, + # 100% of the traffic is forwarded to that backend. + # + # If weights are specified for any one service name, they need to be + # specified for all of them. + # + # If weights are unspecified for all services, then, traffic is distributed + # in equal proportions to all of them. + class Destination + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The specification for fault injection introduced into traffic to test the + # resiliency of clients to destination service failure. As part of fault + # injection, when clients send requests to a destination, delays can be + # introduced on a percentage of requests before sending those requests to the + # destination service. Similarly requests from clients can be aborted by for + # a percentage of requests. + # @!attribute [rw] delay + # @return [::Google::Cloud::NetworkServices::V1::GrpcRoute::FaultInjectionPolicy::Delay] + # The specification for injecting delay to client requests. + # @!attribute [rw] abort + # @return [::Google::Cloud::NetworkServices::V1::GrpcRoute::FaultInjectionPolicy::Abort] + # The specification for aborting to client requests. + class FaultInjectionPolicy + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Specification of how client requests are delayed as part of fault + # injection before being sent to a destination. + # @!attribute [rw] fixed_delay + # @return [::Google::Protobuf::Duration] + # Specify a fixed delay before forwarding the request. + # @!attribute [rw] percentage + # @return [::Integer] + # The percentage of traffic on which delay will be injected. + # + # The value must be between [0, 100] + class Delay + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Specification of how client requests are aborted as part of fault + # injection before being sent to a destination. + # @!attribute [rw] http_status + # @return [::Integer] + # The HTTP status code used to abort the request. + # + # The value must be between 200 and 599 inclusive. + # @!attribute [rw] percentage + # @return [::Integer] + # The percentage of traffic which will be aborted. + # + # The value must be between [0, 100] + class Abort + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # The specification for cookie-based stateful session affinity where the + # date plane supplies a “session cookie” with the name "GSSA" which encodes + # a specific destination host and each request containing that cookie will + # be directed to that host as long as the destination host remains up and + # healthy. + # + # The gRPC proxyless mesh library or sidecar proxy will manage the session + # cookie but the client application code is responsible for copying the + # cookie from each RPC in the session to the next. + # @!attribute [rw] cookie_ttl + # @return [::Google::Protobuf::Duration] + # Required. The cookie TTL value for the Set-Cookie header generated by the + # data plane. The lifetime of the cookie may be set to a value from 0 to + # 86400 seconds (24 hours) inclusive. + # + # Set this to 0s to use a session cookie and disable cookie expiration. + class StatefulSessionAffinityPolicy + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The specifications for retries. + # Specifies one or more conditions for which this retry rule applies. Valid + # values are: + # @!attribute [rw] retry_conditions + # @return [::Array<::String>] + # - connect-failure: Router will retry on failures connecting to Backend + # Services, for example due to connection timeouts. + # - refused-stream: Router will retry if the backend service resets the + # stream + # with a REFUSED_STREAM error code. This reset type indicates that it is + # safe to retry. + # - cancelled: Router will retry if the gRPC status code in the response + # header + # is set to cancelled + # - deadline-exceeded: Router will retry if the gRPC status code in the + # response + # header is set to deadline-exceeded + # - resource-exhausted: Router will retry if the gRPC status code in the + # response header is set to resource-exhausted + # - unavailable: Router will retry if the gRPC status code in the response + # header is set to unavailable + # @!attribute [rw] num_retries + # @return [::Integer] + # Specifies the allowed number of retries. This number must be > 0. If not + # specified, default to 1. + class RetryPolicy + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Specifies how to route matched traffic. + # @!attribute [rw] destinations + # @return [::Array<::Google::Cloud::NetworkServices::V1::GrpcRoute::Destination>] + # Optional. The destination services to which traffic should be forwarded. + # If multiple destinations are specified, traffic will be split between + # Backend Service(s) according to the weight field of these destinations. + # @!attribute [rw] fault_injection_policy + # @return [::Google::Cloud::NetworkServices::V1::GrpcRoute::FaultInjectionPolicy] + # Optional. The specification for fault injection introduced into traffic + # to test the resiliency of clients to destination service failure. As part + # of fault injection, when clients send requests to a destination, delays + # can be introduced on a percentage of requests before sending those + # requests to the destination service. Similarly requests from clients can + # be aborted by for a percentage of requests. + # + # timeout and retry_policy will be ignored by clients that are configured + # with a fault_injection_policy + # @!attribute [rw] timeout + # @return [::Google::Protobuf::Duration] + # Optional. Specifies the timeout for selected route. Timeout is computed + # from the time the request has been fully processed (i.e. end of stream) + # up until the response has been completely processed. Timeout includes all + # retries. + # @!attribute [rw] retry_policy + # @return [::Google::Cloud::NetworkServices::V1::GrpcRoute::RetryPolicy] + # Optional. Specifies the retry policy associated with this route. + # @!attribute [rw] stateful_session_affinity + # @return [::Google::Cloud::NetworkServices::V1::GrpcRoute::StatefulSessionAffinityPolicy] + # Optional. Specifies cookie-based stateful session affinity. + # @!attribute [rw] idle_timeout + # @return [::Google::Protobuf::Duration] + # Optional. Specifies the idle timeout for the selected route. The idle + # timeout is defined as the period in which there are no bytes sent or + # received on either the upstream or downstream connection. If not set, the + # default idle timeout is 1 hour. If set to 0s, the timeout will be + # disabled. + class RouteAction + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Describes how to route traffic. + # @!attribute [rw] matches + # @return [::Array<::Google::Cloud::NetworkServices::V1::GrpcRoute::RouteMatch>] + # Optional. Matches define conditions used for matching the rule against + # incoming gRPC requests. Each match is independent, i.e. this rule will be + # matched if ANY one of the matches is satisfied. If no matches field is + # specified, this rule will unconditionally match traffic. + # @!attribute [rw] action + # @return [::Google::Cloud::NetworkServices::V1::GrpcRoute::RouteAction] + # Required. A detailed rule defining how to route traffic. This field is + # required. + class RouteRule + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class LabelsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Request used with the ListGrpcRoutes method. + # @!attribute [rw] parent + # @return [::String] + # Required. The project and location from which the GrpcRoutes should be + # listed, specified in the format `projects/*/locations/*`. + # @!attribute [rw] page_size + # @return [::Integer] + # Maximum number of GrpcRoutes to return per call. + # @!attribute [rw] page_token + # @return [::String] + # The value returned by the last `ListGrpcRoutesResponse` + # Indicates that this is a continuation of a prior `ListGrpcRoutes` call, + # and that the system should return the next page of data. + # @!attribute [rw] return_partial_success + # @return [::Boolean] + # Optional. If true, allow partial responses for multi-regional Aggregated + # List requests. Otherwise if one of the locations is down or unreachable, + # the Aggregated List request will fail. + class ListGrpcRoutesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response returned by the ListGrpcRoutes method. + # @!attribute [rw] grpc_routes + # @return [::Array<::Google::Cloud::NetworkServices::V1::GrpcRoute>] + # List of GrpcRoute resources. + # @!attribute [rw] next_page_token + # @return [::String] + # If there might be more results than those appearing in this response, then + # `next_page_token` is included. To get the next set of results, call this + # method again using the value of `next_page_token` as `page_token`. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Unreachable resources. Populated when the request opts into + # {::Google::Cloud::NetworkServices::V1::ListGrpcRoutesRequest#return_partial_success return_partial_success} + # and reading across collections e.g. when attempting to list all resources + # across all supported locations. + class ListGrpcRoutesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request used by the GetGrpcRoute method. + # @!attribute [rw] name + # @return [::String] + # Required. A name of the GrpcRoute to get. Must be in the format + # `projects/*/locations/*/grpcRoutes/*`. + class GetGrpcRouteRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request used by the CreateGrpcRoute method. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource of the GrpcRoute. Must be in the + # format `projects/*/locations/*`. + # @!attribute [rw] grpc_route_id + # @return [::String] + # Required. Short name of the GrpcRoute resource to be created. + # @!attribute [rw] grpc_route + # @return [::Google::Cloud::NetworkServices::V1::GrpcRoute] + # Required. GrpcRoute resource to be created. + class CreateGrpcRouteRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request used by the UpdateGrpcRoute method. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Optional. Field mask is used to specify the fields to be overwritten in the + # GrpcRoute resource by the update. + # The fields specified in the update_mask are relative to the resource, not + # the full request. A field will be overwritten if it is in the mask. If the + # user does not provide a mask then all fields will be overwritten. + # @!attribute [rw] grpc_route + # @return [::Google::Cloud::NetworkServices::V1::GrpcRoute] + # Required. Updated GrpcRoute resource. + class UpdateGrpcRouteRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request used by the DeleteGrpcRoute method. + # @!attribute [rw] name + # @return [::String] + # Required. A name of the GrpcRoute to delete. Must be in the format + # `projects/*/locations/*/grpcRoutes/*`. + class DeleteGrpcRouteRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/http_route.rb b/owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/http_route.rb new file mode 100644 index 000000000000..9edca763e318 --- /dev/null +++ b/owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/http_route.rb @@ -0,0 +1,785 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 NetworkServices + module V1 + # HttpRoute is the resource defining how HTTP traffic should be routed by a + # Mesh or Gateway resource. + # @!attribute [rw] name + # @return [::String] + # Identifier. Name of the HttpRoute resource. It matches pattern + # `projects/*/locations/*/httpRoutes/http_route_name>`. + # @!attribute [r] self_link + # @return [::String] + # Output only. Server-defined URL of this resource + # @!attribute [rw] description + # @return [::String] + # Optional. A free-text description of the resource. Max length 1024 + # characters. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The timestamp when the resource was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The timestamp when the resource was updated. + # @!attribute [rw] hostnames + # @return [::Array<::String>] + # Required. Hostnames define a set of hosts that should match against the + # HTTP host header to select a HttpRoute to process the request. Hostname is + # the fully qualified domain name of a network host, as defined by RFC 1123 + # with the exception that: + # - IPs are not allowed. + # - A hostname may be prefixed with a wildcard label (`*.`). The wildcard + # label must appear by itself as the first label. + # + # Hostname can be "precise" which is a domain name without the terminating + # dot of a network host (e.g. `foo.example.com`) or "wildcard", which is a + # domain name prefixed with a single wildcard label (e.g. `*.example.com`). + # + # Note that as per RFC1035 and RFC1123, a label must consist of lower case + # alphanumeric characters or '-', and must start and end with an alphanumeric + # character. No other punctuation is allowed. + # + # The routes associated with a Mesh or Gateways must have unique hostnames. + # If you attempt to attach multiple routes with conflicting hostnames, + # the configuration will be rejected. + # + # For example, while it is acceptable for routes for the hostnames + # `*.foo.bar.com` and `*.bar.com` to be associated with the same Mesh (or + # Gateways under the same scope), it is not possible to associate two routes + # both with `*.bar.com` or both with `bar.com`. + # @!attribute [rw] meshes + # @return [::Array<::String>] + # Optional. Meshes defines a list of meshes this HttpRoute is attached to, as + # one of the routing rules to route the requests served by the mesh. + # + # Each mesh reference should match the pattern: + # `projects/*/locations/*/meshes/` + # + # The attached Mesh should be of a type SIDECAR + # @!attribute [rw] gateways + # @return [::Array<::String>] + # Optional. Gateways defines a list of gateways this HttpRoute is attached + # to, as one of the routing rules to route the requests served by the + # gateway. + # + # Each gateway reference should match the pattern: + # `projects/*/locations/*/gateways/` + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. Set of label tags associated with the HttpRoute resource. + # @!attribute [rw] rules + # @return [::Array<::Google::Cloud::NetworkServices::V1::HttpRoute::RouteRule>] + # Required. Rules that define how traffic is routed and handled. + # Rules will be matched sequentially based on the RouteMatch specified for + # the rule. + class HttpRoute + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Specifies how to select a route rule based on HTTP request headers. + # @!attribute [rw] exact_match + # @return [::String] + # The value of the header should match exactly the content of + # exact_match. + # + # Note: The following fields are mutually exclusive: `exact_match`, `regex_match`, `prefix_match`, `present_match`, `suffix_match`, `range_match`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] regex_match + # @return [::String] + # The value of the header must match the regular expression specified in + # regex_match. For regular expression grammar, please see: + # https://github.com/google/re2/wiki/Syntax + # + # Note: The following fields are mutually exclusive: `regex_match`, `exact_match`, `prefix_match`, `present_match`, `suffix_match`, `range_match`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] prefix_match + # @return [::String] + # The value of the header must start with the contents of prefix_match. + # + # Note: The following fields are mutually exclusive: `prefix_match`, `exact_match`, `regex_match`, `present_match`, `suffix_match`, `range_match`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] present_match + # @return [::Boolean] + # A header with header_name must exist. The match takes place whether or + # not the header has a value. + # + # Note: The following fields are mutually exclusive: `present_match`, `exact_match`, `regex_match`, `prefix_match`, `suffix_match`, `range_match`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] suffix_match + # @return [::String] + # The value of the header must end with the contents of suffix_match. + # + # Note: The following fields are mutually exclusive: `suffix_match`, `exact_match`, `regex_match`, `prefix_match`, `present_match`, `range_match`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] range_match + # @return [::Google::Cloud::NetworkServices::V1::HttpRoute::HeaderMatch::IntegerRange] + # If specified, the rule will match if the request header value is within + # the range. + # + # Note: The following fields are mutually exclusive: `range_match`, `exact_match`, `regex_match`, `prefix_match`, `present_match`, `suffix_match`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] header + # @return [::String] + # The name of the HTTP header to match against. + # @!attribute [rw] invert_match + # @return [::Boolean] + # If specified, the match result will be inverted before checking. Default + # value is set to false. + class HeaderMatch + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Represents an integer value range. + # @!attribute [rw] start + # @return [::Integer] + # Start of the range (inclusive) + # @!attribute [rw] end + # @return [::Integer] + # End of the range (exclusive) + class IntegerRange + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Specifications to match a query parameter in the request. + # @!attribute [rw] exact_match + # @return [::String] + # The value of the query parameter must exactly match the contents of + # exact_match. + # + # Only one of exact_match, regex_match, or present_match must be set. + # + # Note: The following fields are mutually exclusive: `exact_match`, `regex_match`, `present_match`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] regex_match + # @return [::String] + # The value of the query parameter must match the regular expression + # specified by regex_match. For regular expression grammar, please see + # https://github.com/google/re2/wiki/Syntax + # + # Only one of exact_match, regex_match, or present_match must be set. + # + # Note: The following fields are mutually exclusive: `regex_match`, `exact_match`, `present_match`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] present_match + # @return [::Boolean] + # Specifies that the QueryParameterMatcher matches if request contains + # query parameter, irrespective of whether the parameter has a value or + # not. + # + # Only one of exact_match, regex_match, or present_match must be set. + # + # Note: The following fields are mutually exclusive: `present_match`, `exact_match`, `regex_match`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] query_parameter + # @return [::String] + # The name of the query parameter to match. + class QueryParameterMatch + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # RouteMatch defines specifications used to match requests. If multiple match + # types are set, this RouteMatch will match if ALL type of matches are + # matched. + # @!attribute [rw] full_path_match + # @return [::String] + # The HTTP request path value should exactly match this value. + # + # Only one of full_path_match, prefix_match, or regex_match should be + # used. + # + # Note: The following fields are mutually exclusive: `full_path_match`, `prefix_match`, `regex_match`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] prefix_match + # @return [::String] + # The HTTP request path value must begin with specified prefix_match. + # prefix_match must begin with a /. + # + # Only one of full_path_match, prefix_match, or regex_match should be + # used. + # + # Note: The following fields are mutually exclusive: `prefix_match`, `full_path_match`, `regex_match`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] regex_match + # @return [::String] + # The HTTP request path value must satisfy the regular expression + # specified by regex_match after removing any query parameters and anchor + # supplied with the original URL. For regular expression grammar, please + # see https://github.com/google/re2/wiki/Syntax + # + # Only one of full_path_match, prefix_match, or regex_match should be + # used. + # + # Note: The following fields are mutually exclusive: `regex_match`, `full_path_match`, `prefix_match`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] ignore_case + # @return [::Boolean] + # Specifies if prefix_match and full_path_match matches are case sensitive. + # The default value is false. + # @!attribute [rw] headers + # @return [::Array<::Google::Cloud::NetworkServices::V1::HttpRoute::HeaderMatch>] + # Specifies a list of HTTP request headers to match against. ALL of the + # supplied headers must be matched. + # @!attribute [rw] query_parameters + # @return [::Array<::Google::Cloud::NetworkServices::V1::HttpRoute::QueryParameterMatch>] + # Specifies a list of query parameters to match against. ALL of the query + # parameters must be matched. + class RouteMatch + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Specifications of a destination to which the request should be routed to. + # @!attribute [rw] service_name + # @return [::String] + # The URL of a BackendService to route traffic to. + # @!attribute [rw] weight + # @return [::Integer] + # Specifies the proportion of requests forwarded to the backend referenced + # by the serviceName field. This is computed as: + # - weight/Sum(weights in this destination list). + # For non-zero values, there may be some epsilon from the exact proportion + # defined here depending on the precision an implementation supports. + # + # If only one serviceName is specified and it has a weight greater than 0, + # 100% of the traffic is forwarded to that backend. + # + # If weights are specified for any one service name, they need to be + # specified for all of them. + # + # If weights are unspecified for all services, then, traffic is distributed + # in equal proportions to all of them. + # @!attribute [rw] request_header_modifier + # @return [::Google::Cloud::NetworkServices::V1::HttpRoute::HeaderModifier] + # Optional. The specification for modifying the headers of a matching + # request prior to delivery of the request to the destination. If + # HeaderModifiers are set on both the Destination and the RouteAction, they + # will be merged. Conflicts between the two will not be resolved on the + # configuration. + # @!attribute [rw] response_header_modifier + # @return [::Google::Cloud::NetworkServices::V1::HttpRoute::HeaderModifier] + # Optional. The specification for modifying the headers of a response prior + # to sending the response back to the client. If HeaderModifiers are set on + # both the Destination and the RouteAction, they will be merged. Conflicts + # between the two will not be resolved on the configuration. + class Destination + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The specification for redirecting traffic. + # @!attribute [rw] host_redirect + # @return [::String] + # The host that will be used in the redirect response instead of the one + # that was supplied in the request. + # @!attribute [rw] path_redirect + # @return [::String] + # The path that will be used in the redirect response instead of the one + # that was supplied in the request. + # path_redirect can not be supplied together with prefix_redirect. Supply + # one alone or neither. If neither is supplied, the path of the original + # request will be used for the redirect. + # @!attribute [rw] prefix_rewrite + # @return [::String] + # Indicates that during redirection, the matched prefix (or path) should be + # swapped with this value. This option allows URLs be dynamically created + # based on the request. + # @!attribute [rw] response_code + # @return [::Google::Cloud::NetworkServices::V1::HttpRoute::Redirect::ResponseCode] + # The HTTP Status code to use for the redirect. + # @!attribute [rw] https_redirect + # @return [::Boolean] + # If set to true, the URL scheme in the redirected request is set to https. + # If set to false, the URL scheme of the redirected request will remain the + # same as that of the request. + # + # The default is set to false. + # @!attribute [rw] strip_query + # @return [::Boolean] + # if set to true, any accompanying query portion of the original URL is + # removed prior to redirecting the request. If set to false, the query + # portion of the original URL is retained. + # + # The default is set to false. + # @!attribute [rw] port_redirect + # @return [::Integer] + # The port that will be used in the redirected request instead of the one + # that was supplied in the request. + class Redirect + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Supported HTTP response code. + module ResponseCode + # Default value + RESPONSE_CODE_UNSPECIFIED = 0 + + # Corresponds to 301. + MOVED_PERMANENTLY_DEFAULT = 1 + + # Corresponds to 302. + FOUND = 2 + + # Corresponds to 303. + SEE_OTHER = 3 + + # Corresponds to 307. In this case, the request method will be retained. + TEMPORARY_REDIRECT = 4 + + # Corresponds to 308. In this case, the request method will be retained. + PERMANENT_REDIRECT = 5 + end + end + + # The specification for fault injection introduced into traffic to test the + # resiliency of clients to destination service failure. As part of fault + # injection, when clients send requests to a destination, delays can be + # introduced by client proxy on a percentage of requests before sending those + # requests to the destination service. Similarly requests can be aborted by + # client proxy for a percentage of requests. + # @!attribute [rw] delay + # @return [::Google::Cloud::NetworkServices::V1::HttpRoute::FaultInjectionPolicy::Delay] + # The specification for injecting delay to client requests. + # @!attribute [rw] abort + # @return [::Google::Cloud::NetworkServices::V1::HttpRoute::FaultInjectionPolicy::Abort] + # The specification for aborting to client requests. + class FaultInjectionPolicy + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Specification of how client requests are delayed as part of fault + # injection before being sent to a destination. + # @!attribute [rw] fixed_delay + # @return [::Google::Protobuf::Duration] + # Specify a fixed delay before forwarding the request. + # @!attribute [rw] percentage + # @return [::Integer] + # The percentage of traffic on which delay will be injected. + # + # The value must be between [0, 100] + class Delay + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Specification of how client requests are aborted as part of fault + # injection before being sent to a destination. + # @!attribute [rw] http_status + # @return [::Integer] + # The HTTP status code used to abort the request. + # + # The value must be between 200 and 599 inclusive. + # @!attribute [rw] percentage + # @return [::Integer] + # The percentage of traffic which will be aborted. + # + # The value must be between [0, 100] + class Abort + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # The specification for cookie-based stateful session affinity where the + # date plane supplies a “session cookie” with the name "GSSA" which encodes + # a specific destination host and each request containing that cookie will + # be directed to that host as long as the destination host remains up and + # healthy. + # + # The gRPC proxyless mesh library or sidecar proxy will manage the session + # cookie but the client application code is responsible for copying the + # cookie from each RPC in the session to the next. + # @!attribute [rw] cookie_ttl + # @return [::Google::Protobuf::Duration] + # Required. The cookie TTL value for the Set-Cookie header generated by + # the data plane. The lifetime of the cookie may be set to a value from 0 + # to 86400 seconds (24 hours) inclusive. + # + # Set this to 0s to use a session cookie and disable cookie expiration. + class StatefulSessionAffinityPolicy + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The specification for modifying HTTP header in HTTP request and HTTP + # response. + # @!attribute [rw] set + # @return [::Google::Protobuf::Map{::String => ::String}] + # Completely overwrite/replace the headers with given map where key is the + # name of the header, value is the value of the header. + # @!attribute [rw] add + # @return [::Google::Protobuf::Map{::String => ::String}] + # Add the headers with given map where key is the name of the header, value + # is the value of the header. + # @!attribute [rw] remove + # @return [::Array<::String>] + # Remove headers (matching by header names) specified in the list. + class HeaderModifier + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class SetEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class AddEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # The specification for modifying the URL of the request, prior to forwarding + # the request to the destination. + # @!attribute [rw] path_prefix_rewrite + # @return [::String] + # Prior to forwarding the request to the selected destination, the matching + # portion of the requests path is replaced by this value. + # @!attribute [rw] host_rewrite + # @return [::String] + # Prior to forwarding the request to the selected destination, the requests + # host header is replaced by this value. + class URLRewrite + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The specifications for retries. + # @!attribute [rw] retry_conditions + # @return [::Array<::String>] + # Specifies one or more conditions when this retry policy applies. Valid + # values are: + # 5xx: Proxy will attempt a retry if the destination service responds + # with any 5xx response code, of if the destination service does not + # respond at all, example: disconnect, reset, read timeout, connection + # failure and refused streams. + # + # gateway-error: Similar to 5xx, but only applies to response codes 502, + # 503, 504. + # + # reset: Proxy will attempt a retry if the destination service does not + # respond at all (disconnect/reset/read timeout) + # + # connect-failure: Proxy will retry on failures connecting to destination + # for example due to connection timeouts. + # + # retriable-4xx: Proxy will retry fro retriable 4xx response codes. + # Currently the only retriable error supported is 409. + # + # refused-stream: Proxy will retry if the destination resets the stream + # with a REFUSED_STREAM error code. This reset type indicates that it + # is safe to retry. + # @!attribute [rw] num_retries + # @return [::Integer] + # Specifies the allowed number of retries. This number must be > 0. If not + # specified, default to 1. + # @!attribute [rw] per_try_timeout + # @return [::Google::Protobuf::Duration] + # Specifies a non-zero timeout per retry attempt. + class RetryPolicy + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Specifies the policy on how requests are shadowed to a separate mirrored + # destination service. The proxy does not wait for responses from the + # shadow service. Prior to sending traffic to the shadow service, the + # host/authority header is suffixed with -shadow. + # Mirroring is currently not supported for Cloud Run destinations. + # @!attribute [rw] destination + # @return [::Google::Cloud::NetworkServices::V1::HttpRoute::Destination] + # The destination the requests will be mirrored to. The weight of the + # destination will be ignored. + # @!attribute [rw] mirror_percent + # @return [::Float] + # Optional. The percentage of requests to get mirrored to the desired + # destination. + class RequestMirrorPolicy + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The Specification for allowing client side cross-origin requests. + # @!attribute [rw] allow_origins + # @return [::Array<::String>] + # Specifies the list of origins that will be allowed to do CORS requests. + # An origin is allowed if it matches either an item in allow_origins or + # an item in allow_origin_regexes. + # @!attribute [rw] allow_origin_regexes + # @return [::Array<::String>] + # Specifies the regular expression patterns that match allowed origins. For + # regular expression grammar, please see + # https://github.com/google/re2/wiki/Syntax. + # @!attribute [rw] allow_methods + # @return [::Array<::String>] + # Specifies the content for Access-Control-Allow-Methods header. + # @!attribute [rw] allow_headers + # @return [::Array<::String>] + # Specifies the content for Access-Control-Allow-Headers header. + # @!attribute [rw] expose_headers + # @return [::Array<::String>] + # Specifies the content for Access-Control-Expose-Headers header. + # @!attribute [rw] max_age + # @return [::String] + # Specifies how long result of a preflight request can be cached in + # seconds. This translates to the Access-Control-Max-Age header. + # @!attribute [rw] allow_credentials + # @return [::Boolean] + # In response to a preflight request, setting this to true indicates that + # the actual request can include user credentials. This translates to the + # Access-Control-Allow-Credentials header. + # + # Default value is false. + # @!attribute [rw] disabled + # @return [::Boolean] + # If true, the CORS policy is disabled. The default value is false, which + # indicates that the CORS policy is in effect. + class CorsPolicy + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Static HTTP response object to be returned. + # @!attribute [rw] string_body + # @return [::String] + # Optional. Response body as a string. Maximum body length is 1024 + # characters. + # + # Note: The following fields are mutually exclusive: `string_body`, `bytes_body`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] bytes_body + # @return [::String] + # Optional. Response body as bytes. Maximum body size is 4096B. + # + # Note: The following fields are mutually exclusive: `bytes_body`, `string_body`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] status + # @return [::Integer] + # Required. Status to return as part of HTTP Response. Must be a positive + # integer. + class HttpDirectResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The specifications for routing traffic and applying associated policies. + # @!attribute [rw] destinations + # @return [::Array<::Google::Cloud::NetworkServices::V1::HttpRoute::Destination>] + # The destination to which traffic should be forwarded. + # @!attribute [rw] redirect + # @return [::Google::Cloud::NetworkServices::V1::HttpRoute::Redirect] + # If set, the request is directed as configured by this field. + # @!attribute [rw] fault_injection_policy + # @return [::Google::Cloud::NetworkServices::V1::HttpRoute::FaultInjectionPolicy] + # The specification for fault injection introduced into traffic to test the + # resiliency of clients to backend service failure. As part of fault + # injection, when clients send requests to a backend service, delays can be + # introduced on a percentage of requests before sending those requests to + # the backend service. Similarly requests from clients can be aborted for a + # percentage of requests. + # + # timeout and retry_policy will be ignored by clients that are configured + # with a fault_injection_policy + # @!attribute [rw] request_header_modifier + # @return [::Google::Cloud::NetworkServices::V1::HttpRoute::HeaderModifier] + # The specification for modifying the headers of a matching request prior + # to delivery of the request to the destination. If HeaderModifiers are set + # on both the Destination and the RouteAction, they will be merged. + # Conflicts between the two will not be resolved on the configuration. + # @!attribute [rw] response_header_modifier + # @return [::Google::Cloud::NetworkServices::V1::HttpRoute::HeaderModifier] + # The specification for modifying the headers of a response prior to + # sending the response back to the client. If HeaderModifiers are set + # on both the Destination and the RouteAction, they will be merged. + # Conflicts between the two will not be resolved on the configuration. + # @!attribute [rw] url_rewrite + # @return [::Google::Cloud::NetworkServices::V1::HttpRoute::URLRewrite] + # The specification for rewrite URL before forwarding requests to the + # destination. + # @!attribute [rw] timeout + # @return [::Google::Protobuf::Duration] + # Specifies the timeout for selected route. Timeout is computed from the + # time the request has been fully processed (i.e. end of stream) up until + # the response has been completely processed. Timeout includes all retries. + # @!attribute [rw] retry_policy + # @return [::Google::Cloud::NetworkServices::V1::HttpRoute::RetryPolicy] + # Specifies the retry policy associated with this route. + # @!attribute [rw] request_mirror_policy + # @return [::Google::Cloud::NetworkServices::V1::HttpRoute::RequestMirrorPolicy] + # Specifies the policy on how requests intended for the routes destination + # are shadowed to a separate mirrored destination. Proxy will not wait for + # the shadow destination to respond before returning the response. Prior to + # sending traffic to the shadow service, the host/authority header is + # suffixed with -shadow. + # @!attribute [rw] cors_policy + # @return [::Google::Cloud::NetworkServices::V1::HttpRoute::CorsPolicy] + # The specification for allowing client side cross-origin requests. + # @!attribute [rw] stateful_session_affinity + # @return [::Google::Cloud::NetworkServices::V1::HttpRoute::StatefulSessionAffinityPolicy] + # Optional. Specifies cookie-based stateful session affinity. + # @!attribute [rw] direct_response + # @return [::Google::Cloud::NetworkServices::V1::HttpRoute::HttpDirectResponse] + # Optional. Static HTTP Response object to be returned regardless of the + # request. + # @!attribute [rw] idle_timeout + # @return [::Google::Protobuf::Duration] + # Optional. Specifies the idle timeout for the selected route. The idle + # timeout is defined as the period in which there are no bytes sent or + # received on either the upstream or downstream connection. If not set, the + # default idle timeout is 1 hour. If set to 0s, the timeout will be + # disabled. + class RouteAction + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Specifies how to match traffic and how to route traffic when traffic is + # matched. + # @!attribute [rw] matches + # @return [::Array<::Google::Cloud::NetworkServices::V1::HttpRoute::RouteMatch>] + # A list of matches define conditions used for matching the rule against + # incoming HTTP requests. Each match is independent, i.e. this rule will be + # matched if ANY one of the matches is satisfied. + # + # If no matches field is specified, this rule will unconditionally match + # traffic. + # + # If a default rule is desired to be configured, add a rule with no matches + # specified to the end of the rules list. + # @!attribute [rw] action + # @return [::Google::Cloud::NetworkServices::V1::HttpRoute::RouteAction] + # The detailed rule defining how to route matched traffic. + class RouteRule + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class LabelsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Request used with the ListHttpRoutes method. + # @!attribute [rw] parent + # @return [::String] + # Required. The project and location from which the HttpRoutes should be + # listed, specified in the format `projects/*/locations/*`. + # @!attribute [rw] page_size + # @return [::Integer] + # Maximum number of HttpRoutes to return per call. + # @!attribute [rw] page_token + # @return [::String] + # The value returned by the last `ListHttpRoutesResponse` + # Indicates that this is a continuation of a prior `ListHttpRoutes` call, + # and that the system should return the next page of data. + # @!attribute [rw] return_partial_success + # @return [::Boolean] + # Optional. If true, allow partial responses for multi-regional Aggregated + # List requests. Otherwise if one of the locations is down or unreachable, + # the Aggregated List request will fail. + # @!attribute [rw] filter + # @return [::String] + # Optional. Filter expression to restrict the list. + class ListHttpRoutesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response returned by the ListHttpRoutes method. + # @!attribute [rw] http_routes + # @return [::Array<::Google::Cloud::NetworkServices::V1::HttpRoute>] + # List of HttpRoute resources. + # @!attribute [rw] next_page_token + # @return [::String] + # If there might be more results than those appearing in this response, then + # `next_page_token` is included. To get the next set of results, call this + # method again using the value of `next_page_token` as `page_token`. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Unreachable resources. Populated when the request opts into + # {::Google::Cloud::NetworkServices::V1::ListHttpRoutesRequest#return_partial_success return_partial_success} + # and reading across collections e.g. when attempting to list all resources + # across all supported locations. + class ListHttpRoutesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request used by the GetHttpRoute method. + # @!attribute [rw] name + # @return [::String] + # Required. A name of the HttpRoute to get. Must be in the format + # `projects/*/locations/*/httpRoutes/*`. + class GetHttpRouteRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request used by the HttpRoute method. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource of the HttpRoute. Must be in the + # format `projects/*/locations/*`. + # @!attribute [rw] http_route_id + # @return [::String] + # Required. Short name of the HttpRoute resource to be created. + # @!attribute [rw] http_route + # @return [::Google::Cloud::NetworkServices::V1::HttpRoute] + # Required. HttpRoute resource to be created. + # @!attribute [rw] request_id + # @return [::String] + # Optional. Idempotent request UUID. + class CreateHttpRouteRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request used by the UpdateHttpRoute method. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Optional. Field mask is used to specify the fields to be overwritten in the + # HttpRoute resource by the update. + # The fields specified in the update_mask are relative to the resource, not + # the full request. A field will be overwritten if it is in the mask. If the + # user does not provide a mask then all fields will be overwritten. + # @!attribute [rw] http_route + # @return [::Google::Cloud::NetworkServices::V1::HttpRoute] + # Required. Updated HttpRoute resource. + class UpdateHttpRouteRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request used by the DeleteHttpRoute method. + # @!attribute [rw] name + # @return [::String] + # Required. A name of the HttpRoute to delete. Must be in the format + # `projects/*/locations/*/httpRoutes/*`. + class DeleteHttpRouteRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/mesh.rb b/owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/mesh.rb new file mode 100644 index 000000000000..cab0f16c8a99 --- /dev/null +++ b/owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/mesh.rb @@ -0,0 +1,170 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 NetworkServices + module V1 + # Mesh represents a logical configuration grouping for workload to workload + # communication within a service mesh. Routes that point to mesh dictate how + # requests are routed within this logical mesh boundary. + # @!attribute [rw] name + # @return [::String] + # Identifier. Name of the Mesh resource. It matches pattern + # `projects/*/locations/*/meshes/`. + # @!attribute [r] self_link + # @return [::String] + # Output only. Server-defined URL of this resource + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The timestamp when the resource was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The timestamp when the resource was updated. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. Set of label tags associated with the Mesh resource. + # @!attribute [rw] description + # @return [::String] + # Optional. A free-text description of the resource. Max length 1024 + # characters. + # @!attribute [rw] interception_port + # @return [::Integer] + # Optional. If set to a valid TCP port (1-65535), instructs the SIDECAR proxy + # to listen on the specified port of localhost (127.0.0.1) address. The + # SIDECAR proxy will expect all traffic to be redirected to this port + # regardless of its actual ip:port destination. If unset, a port '15001' is + # used as the interception port. This is applicable only for sidecar proxy + # deployments. + # @!attribute [rw] envoy_headers + # @return [::Google::Cloud::NetworkServices::V1::EnvoyHeaders] + # Optional. Determines if envoy will insert internal debug headers into + # upstream requests. Other Envoy headers may still be injected. By default, + # envoy will not insert any debug headers. + class Mesh + 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 + + # Request used with the ListMeshes method. + # @!attribute [rw] parent + # @return [::String] + # Required. The project and location from which the Meshes should be + # listed, specified in the format `projects/*/locations/*`. + # @!attribute [rw] page_size + # @return [::Integer] + # Maximum number of Meshes to return per call. + # @!attribute [rw] page_token + # @return [::String] + # The value returned by the last `ListMeshesResponse` + # Indicates that this is a continuation of a prior `ListMeshes` call, + # and that the system should return the next page of data. + # @!attribute [rw] return_partial_success + # @return [::Boolean] + # Optional. If true, allow partial responses for multi-regional Aggregated + # List requests. Otherwise if one of the locations is down or unreachable, + # the Aggregated List request will fail. + class ListMeshesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response returned by the ListMeshes method. + # @!attribute [rw] meshes + # @return [::Array<::Google::Cloud::NetworkServices::V1::Mesh>] + # List of Mesh resources. + # @!attribute [rw] next_page_token + # @return [::String] + # If there might be more results than those appearing in this response, then + # `next_page_token` is included. To get the next set of results, call this + # method again using the value of `next_page_token` as `page_token`. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Unreachable resources. Populated when the request opts into + # `return_partial_success` and reading across collections e.g. when + # attempting to list all resources across all supported locations. + class ListMeshesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request used by the GetMesh method. + # @!attribute [rw] name + # @return [::String] + # Required. A name of the Mesh to get. Must be in the format + # `projects/*/locations/*/meshes/*`. + class GetMeshRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request used by the CreateMesh method. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource of the Mesh. Must be in the + # format `projects/*/locations/*`. + # @!attribute [rw] mesh_id + # @return [::String] + # Required. Short name of the Mesh resource to be created. + # @!attribute [rw] mesh + # @return [::Google::Cloud::NetworkServices::V1::Mesh] + # Required. Mesh resource to be created. + class CreateMeshRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request used by the UpdateMesh method. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Optional. Field mask is used to specify the fields to be overwritten in the + # Mesh resource by the update. + # The fields specified in the update_mask are relative to the resource, not + # the full request. A field will be overwritten if it is in the mask. If the + # user does not provide a mask then all fields will be overwritten. + # @!attribute [rw] mesh + # @return [::Google::Cloud::NetworkServices::V1::Mesh] + # Required. Updated Mesh resource. + class UpdateMeshRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request used by the DeleteMesh method. + # @!attribute [rw] name + # @return [::String] + # Required. A name of the Mesh to delete. Must be in the format + # `projects/*/locations/*/meshes/*`. + class DeleteMeshRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/route_view.rb b/owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/route_view.rb new file mode 100644 index 000000000000..3d4ace187fbe --- /dev/null +++ b/owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/route_view.rb @@ -0,0 +1,168 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 NetworkServices + module V1 + # GatewayRouteView defines view-only resource for Routes to a Gateway + # @!attribute [r] name + # @return [::String] + # Output only. Identifier. Full path name of the GatewayRouteView resource. + # Format: + # projects/\\{project_number}/locations/\\{location}/gateways/\\{gateway}/routeViews/\\{route_view} + # @!attribute [r] route_project_number + # @return [::Integer] + # Output only. Project number where the route exists. + # @!attribute [r] route_location + # @return [::String] + # Output only. Location where the route exists. + # @!attribute [r] route_type + # @return [::String] + # Output only. Type of the route: HttpRoute,GrpcRoute,TcpRoute, or TlsRoute + # @!attribute [r] route_id + # @return [::String] + # Output only. The resource id for the route. + class GatewayRouteView + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # MeshRouteView defines view-only resource for Routes to a Mesh + # @!attribute [r] name + # @return [::String] + # Output only. Identifier. Full path name of the MeshRouteView resource. + # Format: + # projects/\\{project}/locations/\\{location}/meshes/\\{mesh}/routeViews/\\{route_view} + # @!attribute [r] route_project_number + # @return [::Integer] + # Output only. Project number where the route exists. + # @!attribute [r] route_location + # @return [::String] + # Output only. Location where the route exists. + # @!attribute [r] route_type + # @return [::String] + # Output only. Type of the route: HttpRoute,GrpcRoute,TcpRoute, or TlsRoute + # @!attribute [r] route_id + # @return [::String] + # Output only. The resource id for the route. + class MeshRouteView + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request used with the GetGatewayRouteView method. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the GatewayRouteView resource. + # Formats: + # projects/\\{project}/locations/\\{location}/gateways/\\{gateway}/routeViews/\\{route_view} + class GetGatewayRouteViewRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request used with the GetMeshRouteView method. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the MeshRouteView resource. + # Format: + # projects/\\{project}/locations/\\{location}/meshes/\\{mesh}/routeViews/\\{route_view} + class GetMeshRouteViewRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request used with the ListGatewayRouteViews method. + # @!attribute [rw] parent + # @return [::String] + # Required. The Gateway to which a Route is associated. + # Formats: + # projects/\\{project}/locations/\\{location}/gateways/\\{gateway} + # @!attribute [rw] page_size + # @return [::Integer] + # Maximum number of GatewayRouteViews to return per call. + # @!attribute [rw] page_token + # @return [::String] + # The value returned by the last `ListGatewayRouteViewsResponse` + # Indicates that this is a continuation of a prior `ListGatewayRouteViews` + # call, and that the system should return the next page of data. + class ListGatewayRouteViewsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request used with the ListMeshRouteViews method. + # @!attribute [rw] parent + # @return [::String] + # Required. The Mesh to which a Route is associated. + # Format: + # projects/\\{project}/locations/\\{location}/meshes/\\{mesh} + # @!attribute [rw] page_size + # @return [::Integer] + # Maximum number of MeshRouteViews to return per call. + # @!attribute [rw] page_token + # @return [::String] + # The value returned by the last `ListMeshRouteViewsResponse` + # Indicates that this is a continuation of a prior `ListMeshRouteViews` call, + # and that the system should return the next page of data. + class ListMeshRouteViewsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response returned by the ListGatewayRouteViews method. + # @!attribute [rw] gateway_route_views + # @return [::Array<::Google::Cloud::NetworkServices::V1::GatewayRouteView>] + # List of GatewayRouteView resources. + # @!attribute [rw] next_page_token + # @return [::String] + # A token, which can be sent as `page_token` to retrieve the next page. + # If this field is omitted, there are no subsequent pages. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Unreachable resources. Populated when the request attempts to list all + # resources across all supported locations, while some locations are + # temporarily unavailable. + class ListGatewayRouteViewsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response returned by the ListMeshRouteViews method. + # @!attribute [rw] mesh_route_views + # @return [::Array<::Google::Cloud::NetworkServices::V1::MeshRouteView>] + # List of MeshRouteView resources. + # @!attribute [rw] next_page_token + # @return [::String] + # A token, which can be sent as `page_token` to retrieve the next page. + # If this field is omitted, there are no subsequent pages. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Unreachable resources. Populated when the request attempts to list all + # resources across all supported locations, while some locations are + # temporarily unavailable. + class ListMeshRouteViewsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/service_binding.rb b/owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/service_binding.rb new file mode 100644 index 000000000000..4ad24c25bac0 --- /dev/null +++ b/owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/service_binding.rb @@ -0,0 +1,168 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 NetworkServices + module V1 + # ServiceBinding can be used to: + # - Bind a Service Directory Service to be used in a BackendService resource. + # This feature will be deprecated soon. + # - Bind a Private Service Connect producer service to be used in consumer + # Cloud Service Mesh or Application Load Balancers. + # - Bind a Cloud Run service to be used in consumer Cloud Service Mesh or + # Application Load Balancers. + # @!attribute [rw] name + # @return [::String] + # Identifier. Name of the ServiceBinding resource. It matches pattern + # `projects/*/locations/*/serviceBindings/`. + # @!attribute [rw] description + # @return [::String] + # Optional. A free-text description of the resource. Max length 1024 + # characters. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The timestamp when the resource was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The timestamp when the resource was updated. + # @!attribute [rw] service + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::String] + # Optional. The full Service Directory Service name of the format + # `projects/*/locations/*/namespaces/*/services/*`. + # This field is for Service Directory integration which will be deprecated + # soon. + # @!attribute [r] service_id + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::String] + # Output only. The unique identifier of the Service Directory Service against + # which the ServiceBinding resource is validated. This is populated when the + # Service Binding resource is used in another resource (like Backend + # Service). This is of the UUID4 format. This field is for Service Directory + # integration which will be deprecated soon. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. Set of label tags associated with the ServiceBinding resource. + class ServiceBinding + 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 + + # Request used with the ListServiceBindings method. + # @!attribute [rw] parent + # @return [::String] + # Required. The project and location from which the ServiceBindings should be + # listed, specified in the format `projects/*/locations/*`. + # @!attribute [rw] page_size + # @return [::Integer] + # Maximum number of ServiceBindings to return per call. + # @!attribute [rw] page_token + # @return [::String] + # The value returned by the last `ListServiceBindingsResponse` + # Indicates that this is a continuation of a prior `ListRouters` call, + # and that the system should return the next page of data. + class ListServiceBindingsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response returned by the ListServiceBindings method. + # @!attribute [rw] service_bindings + # @return [::Array<::Google::Cloud::NetworkServices::V1::ServiceBinding>] + # List of ServiceBinding resources. + # @!attribute [rw] next_page_token + # @return [::String] + # If there might be more results than those appearing in this response, then + # `next_page_token` is included. To get the next set of results, call this + # method again using the value of `next_page_token` as `page_token`. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Unreachable resources. Populated when the request attempts to list all + # resources across all supported locations, while some locations are + # temporarily unavailable. + class ListServiceBindingsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request used by the GetServiceBinding method. + # @!attribute [rw] name + # @return [::String] + # Required. A name of the ServiceBinding to get. Must be in the format + # `projects/*/locations/*/serviceBindings/*`. + class GetServiceBindingRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request used by the ServiceBinding method. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource of the ServiceBinding. Must be in the + # format `projects/*/locations/*`. + # @!attribute [rw] service_binding_id + # @return [::String] + # Required. Short name of the ServiceBinding resource to be created. + # @!attribute [rw] service_binding + # @return [::Google::Cloud::NetworkServices::V1::ServiceBinding] + # Required. ServiceBinding resource to be created. + class CreateServiceBindingRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request used by the UpdateServiceBinding method. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Optional. Field mask is used to specify the fields to be overwritten in the + # ServiceBinding resource by the update. + # The fields specified in the update_mask are relative to the resource, not + # the full request. A field will be overwritten if it is in the mask. If the + # user does not provide a mask then all fields will be overwritten. + # @!attribute [rw] service_binding + # @return [::Google::Cloud::NetworkServices::V1::ServiceBinding] + # Required. Updated ServiceBinding resource. + class UpdateServiceBindingRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request used by the DeleteServiceBinding method. + # @!attribute [rw] name + # @return [::String] + # Required. A name of the ServiceBinding to delete. Must be in the format + # `projects/*/locations/*/serviceBindings/*`. + class DeleteServiceBindingRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/service_lb_policy.rb b/owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/service_lb_policy.rb new file mode 100644 index 000000000000..75a47e365ab3 --- /dev/null +++ b/owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/service_lb_policy.rb @@ -0,0 +1,258 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 NetworkServices + module V1 + # ServiceLbPolicy holds global load balancing and traffic distribution + # configuration that can be applied to a BackendService. + # @!attribute [rw] name + # @return [::String] + # Identifier. Name of the ServiceLbPolicy resource. It matches pattern + # `projects/{project}/locations/{location}/serviceLbPolicies/{service_lb_policy_name}`. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The timestamp when this resource was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The timestamp when this resource was last updated. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. Set of label tags associated with the ServiceLbPolicy resource. + # @!attribute [rw] description + # @return [::String] + # Optional. A free-text description of the resource. Max length 1024 + # characters. + # @!attribute [rw] load_balancing_algorithm + # @return [::Google::Cloud::NetworkServices::V1::ServiceLbPolicy::LoadBalancingAlgorithm] + # Optional. The type of load balancing algorithm to be used. The default + # behavior is WATERFALL_BY_REGION. + # @!attribute [rw] auto_capacity_drain + # @return [::Google::Cloud::NetworkServices::V1::ServiceLbPolicy::AutoCapacityDrain] + # Optional. Configuration to automatically move traffic away for unhealthy + # IG/NEG for the associated Backend Service. + # @!attribute [rw] failover_config + # @return [::Google::Cloud::NetworkServices::V1::ServiceLbPolicy::FailoverConfig] + # Optional. Configuration related to health based failover. + # @!attribute [rw] isolation_config + # @return [::Google::Cloud::NetworkServices::V1::ServiceLbPolicy::IsolationConfig] + # Optional. Configuration to provide isolation support for the associated + # Backend Service. + class ServiceLbPolicy + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Option to specify if an unhealthy IG/NEG should be considered for global + # load balancing and traffic routing. + # @!attribute [rw] enable + # @return [::Boolean] + # Optional. If set to 'True', an unhealthy IG/NEG will be set as drained. + # - An IG/NEG is considered unhealthy if less than 25% of the + # instances/endpoints in the IG/NEG are healthy. + # - This option will never result in draining more than 50% of the + # configured IGs/NEGs for the Backend Service. + class AutoCapacityDrain + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Option to specify health based failover behavior. + # This is not related to Network load balancer FailoverPolicy. + # @!attribute [rw] failover_health_threshold + # @return [::Integer] + # Optional. The percentage threshold that a load balancer will begin to + # send traffic to failover backends. If the percentage of endpoints in a + # MIG/NEG is smaller than this value, traffic would be sent to failover + # backends if possible. This field should be set to a value between 1 + # and 99. The default value is 50 for Global external HTTP(S) load balancer + # (classic) and Proxyless service mesh, and 70 for others. + class FailoverConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Configuration to provide isolation support for the associated Backend + # Service. + # @!attribute [rw] isolation_granularity + # @return [::Google::Cloud::NetworkServices::V1::ServiceLbPolicy::IsolationGranularity] + # Optional. The isolation granularity of the load balancer. + # @!attribute [rw] isolation_mode + # @return [::Google::Cloud::NetworkServices::V1::ServiceLbPolicy::IsolationMode] + # Optional. The isolation mode of the load balancer. + class IsolationConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class LabelsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The global load balancing algorithm to be used. + module LoadBalancingAlgorithm + # The type of the loadbalancing algorithm is unspecified. + LOAD_BALANCING_ALGORITHM_UNSPECIFIED = 0 + + # Balance traffic across all backends across the world proportionally based + # on capacity. + SPRAY_TO_WORLD = 3 + + # Direct traffic to the nearest region with endpoints and capacity before + # spilling over to other regions and spread the traffic from each client to + # all the MIGs/NEGs in a region. + SPRAY_TO_REGION = 4 + + # Direct traffic to the nearest region with endpoints and capacity before + # spilling over to other regions. All MIGs/NEGs within a region are evenly + # loaded but each client might not spread the traffic to all the MIGs/NEGs + # in the region. + WATERFALL_BY_REGION = 5 + + # Attempt to keep traffic in a single zone closest to the client, before + # spilling over to other zones. + WATERFALL_BY_ZONE = 6 + end + + # The granularity of this isolation restriction. + module IsolationGranularity + # No isolation is configured for the backend service. Traffic can overflow + # based on the load balancing algorithm. + ISOLATION_GRANULARITY_UNSPECIFIED = 0 + + # Traffic for this service will be isolated at the cloud region level. + REGION = 1 + end + + # The mode of this isolation restriction, defining whether clients in a given + # region are allowed to reach out to another region. + module IsolationMode + # No isolation mode is configured for the backend service. + ISOLATION_MODE_UNSPECIFIED = 0 + + # Traffic will be sent to the nearest region. + NEAREST = 1 + + # Traffic will fail if no serving backends are available in the same region + # as the load balancer. + STRICT = 2 + end + end + + # Request used with the ListServiceLbPolicies method. + # @!attribute [rw] parent + # @return [::String] + # Required. The project and location from which the ServiceLbPolicies should + # be listed, specified in the format + # `projects/{project}/locations/{location}`. + # @!attribute [rw] page_size + # @return [::Integer] + # Maximum number of ServiceLbPolicies to return per call. + # @!attribute [rw] page_token + # @return [::String] + # The value returned by the last `ListServiceLbPoliciesResponse` + # Indicates that this is a continuation of a prior `ListRouters` call, + # and that the system should return the next page of data. + class ListServiceLbPoliciesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response returned by the ListServiceLbPolicies method. + # @!attribute [rw] service_lb_policies + # @return [::Array<::Google::Cloud::NetworkServices::V1::ServiceLbPolicy>] + # List of ServiceLbPolicy resources. + # @!attribute [rw] next_page_token + # @return [::String] + # If there might be more results than those appearing in this response, then + # `next_page_token` is included. To get the next set of results, call this + # method again using the value of `next_page_token` as `page_token`. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Unreachable resources. Populated when the request attempts to list all + # resources across all supported locations, while some locations are + # temporarily unavailable. + class ListServiceLbPoliciesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request used by the GetServiceLbPolicy method. + # @!attribute [rw] name + # @return [::String] + # Required. A name of the ServiceLbPolicy to get. Must be in the format + # `projects/{project}/locations/{location}/serviceLbPolicies/*`. + class GetServiceLbPolicyRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request used by the ServiceLbPolicy method. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource of the ServiceLbPolicy. Must be in the + # format `projects/{project}/locations/{location}`. + # @!attribute [rw] service_lb_policy_id + # @return [::String] + # Required. Short name of the ServiceLbPolicy resource to be created. + # E.g. for resource name + # `projects/{project}/locations/{location}/serviceLbPolicies/{service_lb_policy_name}`. + # the id is value of \\{service_lb_policy_name} + # @!attribute [rw] service_lb_policy + # @return [::Google::Cloud::NetworkServices::V1::ServiceLbPolicy] + # Required. ServiceLbPolicy resource to be created. + class CreateServiceLbPolicyRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request used by the UpdateServiceLbPolicy method. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Optional. Field mask is used to specify the fields to be overwritten in the + # ServiceLbPolicy resource by the update. + # The fields specified in the update_mask are relative to the resource, not + # the full request. A field will be overwritten if it is in the mask. If the + # user does not provide a mask then all fields will be overwritten. + # @!attribute [rw] service_lb_policy + # @return [::Google::Cloud::NetworkServices::V1::ServiceLbPolicy] + # Required. Updated ServiceLbPolicy resource. + class UpdateServiceLbPolicyRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request used by the DeleteServiceLbPolicy method. + # @!attribute [rw] name + # @return [::String] + # Required. A name of the ServiceLbPolicy to delete. Must be in the format + # `projects/{project}/locations/{location}/serviceLbPolicies/*`. + class DeleteServiceLbPolicyRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/tcp_route.rb b/owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/tcp_route.rb new file mode 100644 index 000000000000..383484643d2d --- /dev/null +++ b/owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/tcp_route.rb @@ -0,0 +1,263 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 NetworkServices + module V1 + # TcpRoute is the resource defining how TCP traffic should be routed by a + # Mesh/Gateway resource. + # @!attribute [rw] name + # @return [::String] + # Identifier. Name of the TcpRoute resource. It matches pattern + # `projects/*/locations/*/tcpRoutes/tcp_route_name>`. + # @!attribute [r] self_link + # @return [::String] + # Output only. Server-defined URL of this resource + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The timestamp when the resource was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The timestamp when the resource was updated. + # @!attribute [rw] description + # @return [::String] + # Optional. A free-text description of the resource. Max length 1024 + # characters. + # @!attribute [rw] rules + # @return [::Array<::Google::Cloud::NetworkServices::V1::TcpRoute::RouteRule>] + # Required. Rules that define how traffic is routed and handled. At least one + # RouteRule must be supplied. If there are multiple rules then the action + # taken will be the first rule to match. + # @!attribute [rw] meshes + # @return [::Array<::String>] + # Optional. Meshes defines a list of meshes this TcpRoute is attached to, as + # one of the routing rules to route the requests served by the mesh. + # + # Each mesh reference should match the pattern: + # `projects/*/locations/*/meshes/` + # + # The attached Mesh should be of a type SIDECAR + # @!attribute [rw] gateways + # @return [::Array<::String>] + # Optional. Gateways defines a list of gateways this TcpRoute is attached to, + # as one of the routing rules to route the requests served by the gateway. + # + # Each gateway reference should match the pattern: + # `projects/*/locations/*/gateways/` + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. Set of label tags associated with the TcpRoute resource. + class TcpRoute + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Specifies how to match traffic and how to route traffic when traffic is + # matched. + # @!attribute [rw] matches + # @return [::Array<::Google::Cloud::NetworkServices::V1::TcpRoute::RouteMatch>] + # Optional. RouteMatch defines the predicate used to match requests to a + # given action. Multiple match types are "OR"ed for evaluation. If no + # routeMatch field is specified, this rule will unconditionally match + # traffic. + # @!attribute [rw] action + # @return [::Google::Cloud::NetworkServices::V1::TcpRoute::RouteAction] + # Required. The detailed rule defining how to route matched traffic. + class RouteRule + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # RouteMatch defines the predicate used to match requests to a given action. + # Multiple match types are "OR"ed for evaluation. + # If no routeMatch field is specified, this rule will unconditionally match + # traffic. + # @!attribute [rw] address + # @return [::String] + # Required. Must be specified in the CIDR range format. A CIDR range + # consists of an IP Address and a prefix length to construct the subnet + # mask. By default, the prefix length is 32 (i.e. matches a single IP + # address). Only IPV4 addresses are supported. Examples: "10.0.0.1" - + # matches against this exact IP address. "10.0.0.0/8" - matches against any + # IP address within the 10.0.0.0 subnet and 255.255.255.0 mask. "0.0.0.0/0" + # - matches against any IP address'. + # @!attribute [rw] port + # @return [::String] + # Required. Specifies the destination port to match against. + class RouteMatch + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The specifications for routing traffic and applying associated policies. + # @!attribute [rw] destinations + # @return [::Array<::Google::Cloud::NetworkServices::V1::TcpRoute::RouteDestination>] + # Optional. The destination services to which traffic should be forwarded. + # At least one destination service is required. Only one of route + # destination or original destination can be set. + # @!attribute [rw] original_destination + # @return [::Boolean] + # Optional. If true, Router will use the destination IP and port of the + # original connection as the destination of the request. Default is false. + # Only one of route destinations or original destination can be set. + # @!attribute [rw] idle_timeout + # @return [::Google::Protobuf::Duration] + # Optional. Specifies the idle timeout for the selected route. The idle + # timeout is defined as the period in which there are no bytes sent or + # received on either the upstream or downstream connection. If not set, the + # default idle timeout is 30 seconds. If set to 0s, the timeout will be + # disabled. + class RouteAction + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Describe the destination for traffic to be routed to. + # @!attribute [rw] service_name + # @return [::String] + # Required. The URL of a BackendService to route traffic to. + # @!attribute [rw] weight + # @return [::Integer] + # Optional. Specifies the proportion of requests forwarded to the backend + # referenced by the serviceName field. This is computed as: + # - weight/Sum(weights in this destination list). + # For non-zero values, there may be some epsilon from the exact proportion + # defined here depending on the precision an implementation supports. + # + # If only one serviceName is specified and it has a weight greater than 0, + # 100% of the traffic is forwarded to that backend. + # + # If weights are specified for any one service name, they need to be + # specified for all of them. + # + # If weights are unspecified for all services, then, traffic is distributed + # in equal proportions to all of them. + class RouteDestination + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class LabelsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Request used with the ListTcpRoutes method. + # @!attribute [rw] parent + # @return [::String] + # Required. The project and location from which the TcpRoutes should be + # listed, specified in the format `projects/*/locations/*`. + # @!attribute [rw] page_size + # @return [::Integer] + # Maximum number of TcpRoutes to return per call. + # @!attribute [rw] page_token + # @return [::String] + # The value returned by the last `ListTcpRoutesResponse` + # Indicates that this is a continuation of a prior `ListTcpRoutes` call, + # and that the system should return the next page of data. + # @!attribute [rw] return_partial_success + # @return [::Boolean] + # Optional. If true, allow partial responses for multi-regional Aggregated + # List requests. Otherwise if one of the locations is down or unreachable, + # the Aggregated List request will fail. + class ListTcpRoutesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response returned by the ListTcpRoutes method. + # @!attribute [rw] tcp_routes + # @return [::Array<::Google::Cloud::NetworkServices::V1::TcpRoute>] + # List of TcpRoute resources. + # @!attribute [rw] next_page_token + # @return [::String] + # If there might be more results than those appearing in this response, then + # `next_page_token` is included. To get the next set of results, call this + # method again using the value of `next_page_token` as `page_token`. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Unreachable resources. Populated when the request opts into + # {::Google::Cloud::NetworkServices::V1::ListTcpRoutesRequest#return_partial_success return_partial_success} + # and reading across collections e.g. when attempting to list all resources + # across all supported locations. + class ListTcpRoutesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request used by the GetTcpRoute method. + # @!attribute [rw] name + # @return [::String] + # Required. A name of the TcpRoute to get. Must be in the format + # `projects/*/locations/*/tcpRoutes/*`. + class GetTcpRouteRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request used by the TcpRoute method. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource of the TcpRoute. Must be in the + # format `projects/*/locations/*`. + # @!attribute [rw] tcp_route_id + # @return [::String] + # Required. Short name of the TcpRoute resource to be created. + # @!attribute [rw] tcp_route + # @return [::Google::Cloud::NetworkServices::V1::TcpRoute] + # Required. TcpRoute resource to be created. + class CreateTcpRouteRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request used by the UpdateTcpRoute method. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Optional. Field mask is used to specify the fields to be overwritten in the + # TcpRoute resource by the update. + # The fields specified in the update_mask are relative to the resource, not + # the full request. A field will be overwritten if it is in the mask. If the + # user does not provide a mask then all fields will be overwritten. + # @!attribute [rw] tcp_route + # @return [::Google::Cloud::NetworkServices::V1::TcpRoute] + # Required. Updated TcpRoute resource. + class UpdateTcpRouteRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request used by the DeleteTcpRoute method. + # @!attribute [rw] name + # @return [::String] + # Required. A name of the TcpRoute to delete. Must be in the format + # `projects/*/locations/*/tcpRoutes/*`. + class DeleteTcpRouteRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/tls_route.rb b/owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/tls_route.rb new file mode 100644 index 000000000000..9f64e59aba1f --- /dev/null +++ b/owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/tls_route.rb @@ -0,0 +1,256 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 NetworkServices + module V1 + # TlsRoute defines how traffic should be routed based on SNI and other matching + # L3 attributes. + # @!attribute [rw] name + # @return [::String] + # Identifier. Name of the TlsRoute resource. It matches pattern + # `projects/*/locations/*/tlsRoutes/tls_route_name>`. + # @!attribute [r] self_link + # @return [::String] + # Output only. Server-defined URL of this resource + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The timestamp when the resource was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The timestamp when the resource was updated. + # @!attribute [rw] description + # @return [::String] + # Optional. A free-text description of the resource. Max length 1024 + # characters. + # @!attribute [rw] rules + # @return [::Array<::Google::Cloud::NetworkServices::V1::TlsRoute::RouteRule>] + # Required. Rules that define how traffic is routed and handled. At least one + # RouteRule must be supplied. If there are multiple rules then the action + # taken will be the first rule to match. + # @!attribute [rw] meshes + # @return [::Array<::String>] + # Optional. Meshes defines a list of meshes this TlsRoute is attached to, as + # one of the routing rules to route the requests served by the mesh. + # + # Each mesh reference should match the pattern: + # `projects/*/locations/*/meshes/` + # + # The attached Mesh should be of a type SIDECAR + # @!attribute [rw] gateways + # @return [::Array<::String>] + # Optional. Gateways defines a list of gateways this TlsRoute is attached to, + # as one of the routing rules to route the requests served by the gateway. + # + # Each gateway reference should match the pattern: + # `projects/*/locations/*/gateways/` + # @!attribute [rw] target_proxies + # @return [::Array<::String>] + # Optional. TargetProxies defines a list of TargetTcpProxies this TlsRoute is + # attached to, as one of the routing rules to route the requests served by + # the TargetTcpProxy. + # + # Each TargetTcpProxy reference should match the pattern: + # `projects/*/locations/*/targetTcpProxies/` + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. Set of label tags associated with the TlsRoute resource. + class TlsRoute + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Specifies how to match traffic and how to route traffic when traffic is + # matched. + # @!attribute [rw] matches + # @return [::Array<::Google::Cloud::NetworkServices::V1::TlsRoute::RouteMatch>] + # Required. RouteMatch defines the predicate used to match requests to a + # given action. Multiple match types are "OR"ed for evaluation. Atleast one + # RouteMatch must be supplied. + # @!attribute [rw] action + # @return [::Google::Cloud::NetworkServices::V1::TlsRoute::RouteAction] + # Required. The detailed rule defining how to route matched traffic. + class RouteRule + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # RouteMatch defines the predicate used to match requests to a given action. + # Multiple match types are "AND"ed for evaluation. + # @!attribute [rw] sni_host + # @return [::Array<::String>] + # Optional. SNI (server name indicator) to match against. + # SNI will be matched against all wildcard domains, i.e. `www.example.com` + # will be first matched against `www.example.com`, then `*.example.com`, + # then `*.com.` + # Partial wildcards are not supported, and values like *w.example.com are + # invalid. + # At least one of sni_host and alpn is required. + # Up to 100 sni hosts across all matches can be set. + # @!attribute [rw] alpn + # @return [::Array<::String>] + # Optional. ALPN (Application-Layer Protocol Negotiation) to match against. + # Examples: "http/1.1", "h2". + # At least one of sni_host and alpn is required. + # Up to 5 alpns across all matches can be set. + class RouteMatch + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The specifications for routing traffic and applying associated policies. + # @!attribute [rw] destinations + # @return [::Array<::Google::Cloud::NetworkServices::V1::TlsRoute::RouteDestination>] + # Required. The destination services to which traffic should be forwarded. + # At least one destination service is required. + # @!attribute [rw] idle_timeout + # @return [::Google::Protobuf::Duration] + # Optional. Specifies the idle timeout for the selected route. The idle + # timeout is defined as the period in which there are no bytes sent or + # received on either the upstream or downstream connection. If not set, the + # default idle timeout is 1 hour. If set to 0s, the timeout will be + # disabled. + class RouteAction + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Describe the destination for traffic to be routed to. + # @!attribute [rw] service_name + # @return [::String] + # Required. The URL of a BackendService to route traffic to. + # @!attribute [rw] weight + # @return [::Integer] + # Optional. Specifies the proportion of requests forwarded to the backend + # referenced by the service_name field. This is computed as: + # - weight/Sum(weights in destinations) + # Weights in all destinations does not need to sum up to 100. + class RouteDestination + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class LabelsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Request used with the ListTlsRoutes method. + # @!attribute [rw] parent + # @return [::String] + # Required. The project and location from which the TlsRoutes should be + # listed, specified in the format `projects/*/locations/*`. + # @!attribute [rw] page_size + # @return [::Integer] + # Maximum number of TlsRoutes to return per call. + # @!attribute [rw] page_token + # @return [::String] + # The value returned by the last `ListTlsRoutesResponse` + # Indicates that this is a continuation of a prior `ListTlsRoutes` call, + # and that the system should return the next page of data. + # @!attribute [rw] return_partial_success + # @return [::Boolean] + # Optional. If true, allow partial responses for multi-regional Aggregated + # List requests. Otherwise if one of the locations is down or unreachable, + # the Aggregated List request will fail. + class ListTlsRoutesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response returned by the ListTlsRoutes method. + # @!attribute [rw] tls_routes + # @return [::Array<::Google::Cloud::NetworkServices::V1::TlsRoute>] + # List of TlsRoute resources. + # @!attribute [rw] next_page_token + # @return [::String] + # If there might be more results than those appearing in this response, then + # `next_page_token` is included. To get the next set of results, call this + # method again using the value of `next_page_token` as `page_token`. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Unreachable resources. Populated when the request opts into + # {::Google::Cloud::NetworkServices::V1::ListTlsRoutesRequest#return_partial_success return_partial_success} + # and reading across collections e.g. when attempting to list all resources + # across all supported locations. + class ListTlsRoutesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request used by the GetTlsRoute method. + # @!attribute [rw] name + # @return [::String] + # Required. A name of the TlsRoute to get. Must be in the format + # `projects/*/locations/*/tlsRoutes/*`. + class GetTlsRouteRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request used by the TlsRoute method. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource of the TlsRoute. Must be in the + # format `projects/*/locations/*`. + # @!attribute [rw] tls_route_id + # @return [::String] + # Required. Short name of the TlsRoute resource to be created. + # @!attribute [rw] tls_route + # @return [::Google::Cloud::NetworkServices::V1::TlsRoute] + # Required. TlsRoute resource to be created. + class CreateTlsRouteRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request used by the UpdateTlsRoute method. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Optional. Field mask is used to specify the fields to be overwritten in the + # TlsRoute resource by the update. + # The fields specified in the update_mask are relative to the resource, not + # the full request. A field will be overwritten if it is in the mask. If the + # user does not provide a mask then all fields will be overwritten. + # @!attribute [rw] tls_route + # @return [::Google::Cloud::NetworkServices::V1::TlsRoute] + # Required. Updated TlsRoute resource. + class UpdateTlsRouteRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request used by the DeleteTlsRoute method. + # @!attribute [rw] name + # @return [::String] + # Required. A name of the TlsRoute to delete. Must be in the format + # `projects/*/locations/*/tlsRoutes/*`. + class DeleteTlsRouteRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/longrunning/operations.rb new file mode 100644 index 000000000000..7a757f512165 --- /dev/null +++ b/owl-bot-staging/google-cloud-network_services-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_services-v1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/protobuf/any.rb new file mode 100644 index 000000000000..58691995f02e --- /dev/null +++ b/owl-bot-staging/google-cloud-network_services-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_services-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..ea59f1f91daf --- /dev/null +++ b/owl-bot-staging/google-cloud-network_services-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_services-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/protobuf/empty.rb new file mode 100644 index 000000000000..83e4481834a6 --- /dev/null +++ b/owl-bot-staging/google-cloud-network_services-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_services-v1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/protobuf/field_mask.rb new file mode 100644 index 000000000000..7f3ffc78601a --- /dev/null +++ b/owl-bot-staging/google-cloud-network_services-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_services-v1/proto_docs/google/protobuf/struct.rb b/owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/protobuf/struct.rb new file mode 100644 index 000000000000..39e1aca868d2 --- /dev/null +++ b/owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/protobuf/struct.rb @@ -0,0 +1,108 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 + # `Struct` represents a structured data value, consisting of fields + # which map to dynamically typed values. In some languages, `Struct` + # might be supported by a native representation. For example, in + # scripting languages like JS a struct is represented as an + # object. The details of that representation are described together + # with the proto support for the language. + # + # The JSON representation for `Struct` is JSON object. + # @!attribute [rw] fields + # @return [::Google::Protobuf::Map{::String => ::Google::Protobuf::Value}] + # Unordered map of dynamically typed values. + class Struct + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::Google::Protobuf::Value] + class FieldsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # `Value` represents a dynamically typed value which can be either + # null, a number, a string, a boolean, a recursive struct value, or a + # list of values. A producer of value is expected to set one of these + # variants. Absence of any variant indicates an error. + # + # The JSON representation for `Value` is JSON value. + # @!attribute [rw] null_value + # @return [::Google::Protobuf::NullValue] + # Represents a null value. + # + # Note: The following fields are mutually exclusive: `null_value`, `number_value`, `string_value`, `bool_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] number_value + # @return [::Float] + # Represents a double value. + # + # Note: The following fields are mutually exclusive: `number_value`, `null_value`, `string_value`, `bool_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] string_value + # @return [::String] + # Represents a string value. + # + # Note: The following fields are mutually exclusive: `string_value`, `null_value`, `number_value`, `bool_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] bool_value + # @return [::Boolean] + # Represents a boolean value. + # + # Note: The following fields are mutually exclusive: `bool_value`, `null_value`, `number_value`, `string_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] struct_value + # @return [::Google::Protobuf::Struct] + # Represents a structured value. + # + # Note: The following fields are mutually exclusive: `struct_value`, `null_value`, `number_value`, `string_value`, `bool_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] list_value + # @return [::Google::Protobuf::ListValue] + # Represents a repeated `Value`. + # + # Note: The following fields are mutually exclusive: `list_value`, `null_value`, `number_value`, `string_value`, `bool_value`, `struct_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class Value + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `ListValue` is a wrapper around a repeated field of values. + # + # The JSON representation for `ListValue` is JSON array. + # @!attribute [rw] values + # @return [::Array<::Google::Protobuf::Value>] + # Repeated field of dynamically typed values. + class ListValue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `NullValue` is a singleton enumeration to represent the null value for the + # `Value` type union. + # + # The JSON representation for `NullValue` is JSON `null`. + module NullValue + # Null value. + NULL_VALUE = 0 + end + end +end diff --git a/owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/protobuf/timestamp.rb new file mode 100644 index 000000000000..74352be9c58c --- /dev/null +++ b/owl-bot-staging/google-cloud-network_services-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_services-v1/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/rpc/status.rb new file mode 100644 index 000000000000..c1a1c07eb2db --- /dev/null +++ b/owl-bot-staging/google-cloud-network_services-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_services-v1/proto_docs/google/type/expr.rb b/owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/type/expr.rb new file mode 100644 index 000000000000..53e7733b6592 --- /dev/null +++ b/owl-bot-staging/google-cloud-network_services-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_services-v1/snippets/Gemfile b/owl-bot-staging/google-cloud-network_services-v1/snippets/Gemfile new file mode 100644 index 000000000000..56b13bcaff4e --- /dev/null +++ b/owl-bot-staging/google-cloud-network_services-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_services-v1", path: "../" +else + gem "google-cloud-network_services-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_services-v1/snippets/dep_service/create_authz_extension.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/create_authz_extension.rb new file mode 100644 index 000000000000..ede6b54e32bd --- /dev/null +++ b/owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/create_authz_extension.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 networkservices_v1_generated_DepService_CreateAuthzExtension_sync] +require "google/cloud/network_services/v1" + +## +# Snippet for the create_authz_extension call in the DepService 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::NetworkServices::V1::DepService::Client#create_authz_extension. +# +def create_authz_extension + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::NetworkServices::V1::DepService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::NetworkServices::V1::CreateAuthzExtensionRequest.new + + # Call the create_authz_extension method. + result = client.create_authz_extension 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 networkservices_v1_generated_DepService_CreateAuthzExtension_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/create_lb_edge_extension.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/create_lb_edge_extension.rb new file mode 100644 index 000000000000..229240201ead --- /dev/null +++ b/owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/create_lb_edge_extension.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 networkservices_v1_generated_DepService_CreateLbEdgeExtension_sync] +require "google/cloud/network_services/v1" + +## +# Snippet for the create_lb_edge_extension call in the DepService 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::NetworkServices::V1::DepService::Client#create_lb_edge_extension. +# +def create_lb_edge_extension + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::NetworkServices::V1::DepService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::NetworkServices::V1::CreateLbEdgeExtensionRequest.new + + # Call the create_lb_edge_extension method. + result = client.create_lb_edge_extension 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 networkservices_v1_generated_DepService_CreateLbEdgeExtension_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/create_lb_route_extension.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/create_lb_route_extension.rb new file mode 100644 index 000000000000..cc8501fb195b --- /dev/null +++ b/owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/create_lb_route_extension.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 networkservices_v1_generated_DepService_CreateLbRouteExtension_sync] +require "google/cloud/network_services/v1" + +## +# Snippet for the create_lb_route_extension call in the DepService 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::NetworkServices::V1::DepService::Client#create_lb_route_extension. +# +def create_lb_route_extension + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::NetworkServices::V1::DepService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::NetworkServices::V1::CreateLbRouteExtensionRequest.new + + # Call the create_lb_route_extension method. + result = client.create_lb_route_extension 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 networkservices_v1_generated_DepService_CreateLbRouteExtension_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/create_lb_traffic_extension.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/create_lb_traffic_extension.rb new file mode 100644 index 000000000000..1f741bbf7229 --- /dev/null +++ b/owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/create_lb_traffic_extension.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 networkservices_v1_generated_DepService_CreateLbTrafficExtension_sync] +require "google/cloud/network_services/v1" + +## +# Snippet for the create_lb_traffic_extension call in the DepService 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::NetworkServices::V1::DepService::Client#create_lb_traffic_extension. +# +def create_lb_traffic_extension + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::NetworkServices::V1::DepService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::NetworkServices::V1::CreateLbTrafficExtensionRequest.new + + # Call the create_lb_traffic_extension method. + result = client.create_lb_traffic_extension 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 networkservices_v1_generated_DepService_CreateLbTrafficExtension_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/delete_authz_extension.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/delete_authz_extension.rb new file mode 100644 index 000000000000..0b1f11e61fd6 --- /dev/null +++ b/owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/delete_authz_extension.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 networkservices_v1_generated_DepService_DeleteAuthzExtension_sync] +require "google/cloud/network_services/v1" + +## +# Snippet for the delete_authz_extension call in the DepService 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::NetworkServices::V1::DepService::Client#delete_authz_extension. +# +def delete_authz_extension + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::NetworkServices::V1::DepService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::NetworkServices::V1::DeleteAuthzExtensionRequest.new + + # Call the delete_authz_extension method. + result = client.delete_authz_extension 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 networkservices_v1_generated_DepService_DeleteAuthzExtension_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/delete_lb_edge_extension.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/delete_lb_edge_extension.rb new file mode 100644 index 000000000000..4a0ad5dac21f --- /dev/null +++ b/owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/delete_lb_edge_extension.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 networkservices_v1_generated_DepService_DeleteLbEdgeExtension_sync] +require "google/cloud/network_services/v1" + +## +# Snippet for the delete_lb_edge_extension call in the DepService 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::NetworkServices::V1::DepService::Client#delete_lb_edge_extension. +# +def delete_lb_edge_extension + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::NetworkServices::V1::DepService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::NetworkServices::V1::DeleteLbEdgeExtensionRequest.new + + # Call the delete_lb_edge_extension method. + result = client.delete_lb_edge_extension 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 networkservices_v1_generated_DepService_DeleteLbEdgeExtension_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/delete_lb_route_extension.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/delete_lb_route_extension.rb new file mode 100644 index 000000000000..95814758b3eb --- /dev/null +++ b/owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/delete_lb_route_extension.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 networkservices_v1_generated_DepService_DeleteLbRouteExtension_sync] +require "google/cloud/network_services/v1" + +## +# Snippet for the delete_lb_route_extension call in the DepService 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::NetworkServices::V1::DepService::Client#delete_lb_route_extension. +# +def delete_lb_route_extension + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::NetworkServices::V1::DepService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::NetworkServices::V1::DeleteLbRouteExtensionRequest.new + + # Call the delete_lb_route_extension method. + result = client.delete_lb_route_extension 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 networkservices_v1_generated_DepService_DeleteLbRouteExtension_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/delete_lb_traffic_extension.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/delete_lb_traffic_extension.rb new file mode 100644 index 000000000000..004d99d73688 --- /dev/null +++ b/owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/delete_lb_traffic_extension.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 networkservices_v1_generated_DepService_DeleteLbTrafficExtension_sync] +require "google/cloud/network_services/v1" + +## +# Snippet for the delete_lb_traffic_extension call in the DepService 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::NetworkServices::V1::DepService::Client#delete_lb_traffic_extension. +# +def delete_lb_traffic_extension + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::NetworkServices::V1::DepService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::NetworkServices::V1::DeleteLbTrafficExtensionRequest.new + + # Call the delete_lb_traffic_extension method. + result = client.delete_lb_traffic_extension 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 networkservices_v1_generated_DepService_DeleteLbTrafficExtension_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/get_authz_extension.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/get_authz_extension.rb new file mode 100644 index 000000000000..d246d79b3311 --- /dev/null +++ b/owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/get_authz_extension.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 networkservices_v1_generated_DepService_GetAuthzExtension_sync] +require "google/cloud/network_services/v1" + +## +# Snippet for the get_authz_extension call in the DepService 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::NetworkServices::V1::DepService::Client#get_authz_extension. +# +def get_authz_extension + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::NetworkServices::V1::DepService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::NetworkServices::V1::GetAuthzExtensionRequest.new + + # Call the get_authz_extension method. + result = client.get_authz_extension request + + # The returned object is of type Google::Cloud::NetworkServices::V1::AuthzExtension. + p result +end +# [END networkservices_v1_generated_DepService_GetAuthzExtension_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/get_lb_edge_extension.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/get_lb_edge_extension.rb new file mode 100644 index 000000000000..60091d45e662 --- /dev/null +++ b/owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/get_lb_edge_extension.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 networkservices_v1_generated_DepService_GetLbEdgeExtension_sync] +require "google/cloud/network_services/v1" + +## +# Snippet for the get_lb_edge_extension call in the DepService 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::NetworkServices::V1::DepService::Client#get_lb_edge_extension. +# +def get_lb_edge_extension + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::NetworkServices::V1::DepService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::NetworkServices::V1::GetLbEdgeExtensionRequest.new + + # Call the get_lb_edge_extension method. + result = client.get_lb_edge_extension request + + # The returned object is of type Google::Cloud::NetworkServices::V1::LbEdgeExtension. + p result +end +# [END networkservices_v1_generated_DepService_GetLbEdgeExtension_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/get_lb_route_extension.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/get_lb_route_extension.rb new file mode 100644 index 000000000000..4fcdfe6bf8eb --- /dev/null +++ b/owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/get_lb_route_extension.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 networkservices_v1_generated_DepService_GetLbRouteExtension_sync] +require "google/cloud/network_services/v1" + +## +# Snippet for the get_lb_route_extension call in the DepService 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::NetworkServices::V1::DepService::Client#get_lb_route_extension. +# +def get_lb_route_extension + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::NetworkServices::V1::DepService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::NetworkServices::V1::GetLbRouteExtensionRequest.new + + # Call the get_lb_route_extension method. + result = client.get_lb_route_extension request + + # The returned object is of type Google::Cloud::NetworkServices::V1::LbRouteExtension. + p result +end +# [END networkservices_v1_generated_DepService_GetLbRouteExtension_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/get_lb_traffic_extension.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/get_lb_traffic_extension.rb new file mode 100644 index 000000000000..063d531f3967 --- /dev/null +++ b/owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/get_lb_traffic_extension.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 networkservices_v1_generated_DepService_GetLbTrafficExtension_sync] +require "google/cloud/network_services/v1" + +## +# Snippet for the get_lb_traffic_extension call in the DepService 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::NetworkServices::V1::DepService::Client#get_lb_traffic_extension. +# +def get_lb_traffic_extension + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::NetworkServices::V1::DepService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::NetworkServices::V1::GetLbTrafficExtensionRequest.new + + # Call the get_lb_traffic_extension method. + result = client.get_lb_traffic_extension request + + # The returned object is of type Google::Cloud::NetworkServices::V1::LbTrafficExtension. + p result +end +# [END networkservices_v1_generated_DepService_GetLbTrafficExtension_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/list_authz_extensions.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/list_authz_extensions.rb new file mode 100644 index 000000000000..31c4082339c5 --- /dev/null +++ b/owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/list_authz_extensions.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 networkservices_v1_generated_DepService_ListAuthzExtensions_sync] +require "google/cloud/network_services/v1" + +## +# Snippet for the list_authz_extensions call in the DepService 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::NetworkServices::V1::DepService::Client#list_authz_extensions. +# +def list_authz_extensions + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::NetworkServices::V1::DepService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::NetworkServices::V1::ListAuthzExtensionsRequest.new + + # Call the list_authz_extensions method. + result = client.list_authz_extensions 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::NetworkServices::V1::AuthzExtension. + p item + end +end +# [END networkservices_v1_generated_DepService_ListAuthzExtensions_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/list_lb_edge_extensions.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/list_lb_edge_extensions.rb new file mode 100644 index 000000000000..c113e6912d17 --- /dev/null +++ b/owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/list_lb_edge_extensions.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 networkservices_v1_generated_DepService_ListLbEdgeExtensions_sync] +require "google/cloud/network_services/v1" + +## +# Snippet for the list_lb_edge_extensions call in the DepService 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::NetworkServices::V1::DepService::Client#list_lb_edge_extensions. +# +def list_lb_edge_extensions + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::NetworkServices::V1::DepService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::NetworkServices::V1::ListLbEdgeExtensionsRequest.new + + # Call the list_lb_edge_extensions method. + result = client.list_lb_edge_extensions 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::NetworkServices::V1::LbEdgeExtension. + p item + end +end +# [END networkservices_v1_generated_DepService_ListLbEdgeExtensions_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/list_lb_route_extensions.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/list_lb_route_extensions.rb new file mode 100644 index 000000000000..4418090222fb --- /dev/null +++ b/owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/list_lb_route_extensions.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 networkservices_v1_generated_DepService_ListLbRouteExtensions_sync] +require "google/cloud/network_services/v1" + +## +# Snippet for the list_lb_route_extensions call in the DepService 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::NetworkServices::V1::DepService::Client#list_lb_route_extensions. +# +def list_lb_route_extensions + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::NetworkServices::V1::DepService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::NetworkServices::V1::ListLbRouteExtensionsRequest.new + + # Call the list_lb_route_extensions method. + result = client.list_lb_route_extensions 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::NetworkServices::V1::LbRouteExtension. + p item + end +end +# [END networkservices_v1_generated_DepService_ListLbRouteExtensions_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/list_lb_traffic_extensions.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/list_lb_traffic_extensions.rb new file mode 100644 index 000000000000..e6c8e91db343 --- /dev/null +++ b/owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/list_lb_traffic_extensions.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 networkservices_v1_generated_DepService_ListLbTrafficExtensions_sync] +require "google/cloud/network_services/v1" + +## +# Snippet for the list_lb_traffic_extensions call in the DepService 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::NetworkServices::V1::DepService::Client#list_lb_traffic_extensions. +# +def list_lb_traffic_extensions + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::NetworkServices::V1::DepService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::NetworkServices::V1::ListLbTrafficExtensionsRequest.new + + # Call the list_lb_traffic_extensions method. + result = client.list_lb_traffic_extensions 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::NetworkServices::V1::LbTrafficExtension. + p item + end +end +# [END networkservices_v1_generated_DepService_ListLbTrafficExtensions_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/update_authz_extension.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/update_authz_extension.rb new file mode 100644 index 000000000000..96bcf84a1a2c --- /dev/null +++ b/owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/update_authz_extension.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 networkservices_v1_generated_DepService_UpdateAuthzExtension_sync] +require "google/cloud/network_services/v1" + +## +# Snippet for the update_authz_extension call in the DepService 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::NetworkServices::V1::DepService::Client#update_authz_extension. +# +def update_authz_extension + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::NetworkServices::V1::DepService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::NetworkServices::V1::UpdateAuthzExtensionRequest.new + + # Call the update_authz_extension method. + result = client.update_authz_extension 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 networkservices_v1_generated_DepService_UpdateAuthzExtension_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/update_lb_edge_extension.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/update_lb_edge_extension.rb new file mode 100644 index 000000000000..878e3dc88238 --- /dev/null +++ b/owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/update_lb_edge_extension.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 networkservices_v1_generated_DepService_UpdateLbEdgeExtension_sync] +require "google/cloud/network_services/v1" + +## +# Snippet for the update_lb_edge_extension call in the DepService 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::NetworkServices::V1::DepService::Client#update_lb_edge_extension. +# +def update_lb_edge_extension + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::NetworkServices::V1::DepService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::NetworkServices::V1::UpdateLbEdgeExtensionRequest.new + + # Call the update_lb_edge_extension method. + result = client.update_lb_edge_extension 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 networkservices_v1_generated_DepService_UpdateLbEdgeExtension_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/update_lb_route_extension.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/update_lb_route_extension.rb new file mode 100644 index 000000000000..66f3e36d1c56 --- /dev/null +++ b/owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/update_lb_route_extension.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 networkservices_v1_generated_DepService_UpdateLbRouteExtension_sync] +require "google/cloud/network_services/v1" + +## +# Snippet for the update_lb_route_extension call in the DepService 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::NetworkServices::V1::DepService::Client#update_lb_route_extension. +# +def update_lb_route_extension + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::NetworkServices::V1::DepService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::NetworkServices::V1::UpdateLbRouteExtensionRequest.new + + # Call the update_lb_route_extension method. + result = client.update_lb_route_extension 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 networkservices_v1_generated_DepService_UpdateLbRouteExtension_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/update_lb_traffic_extension.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/update_lb_traffic_extension.rb new file mode 100644 index 000000000000..dbe882165d0d --- /dev/null +++ b/owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/update_lb_traffic_extension.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 networkservices_v1_generated_DepService_UpdateLbTrafficExtension_sync] +require "google/cloud/network_services/v1" + +## +# Snippet for the update_lb_traffic_extension call in the DepService 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::NetworkServices::V1::DepService::Client#update_lb_traffic_extension. +# +def update_lb_traffic_extension + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::NetworkServices::V1::DepService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::NetworkServices::V1::UpdateLbTrafficExtensionRequest.new + + # Call the update_lb_traffic_extension method. + result = client.update_lb_traffic_extension 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 networkservices_v1_generated_DepService_UpdateLbTrafficExtension_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/create_agent_gateway.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/create_agent_gateway.rb new file mode 100644 index 000000000000..6d32ab0266c6 --- /dev/null +++ b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/create_agent_gateway.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 networkservices_v1_generated_NetworkServices_CreateAgentGateway_sync] +require "google/cloud/network_services/v1" + +## +# Snippet for the create_agent_gateway call in the NetworkServices 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::NetworkServices::V1::NetworkServices::Client#create_agent_gateway. +# +def create_agent_gateway + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::NetworkServices::V1::CreateAgentGatewayRequest.new + + # Call the create_agent_gateway method. + result = client.create_agent_gateway 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 networkservices_v1_generated_NetworkServices_CreateAgentGateway_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/create_endpoint_policy.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/create_endpoint_policy.rb new file mode 100644 index 000000000000..11c7e0b7efa1 --- /dev/null +++ b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/create_endpoint_policy.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 networkservices_v1_generated_NetworkServices_CreateEndpointPolicy_sync] +require "google/cloud/network_services/v1" + +## +# Snippet for the create_endpoint_policy call in the NetworkServices 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::NetworkServices::V1::NetworkServices::Client#create_endpoint_policy. +# +def create_endpoint_policy + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::NetworkServices::V1::CreateEndpointPolicyRequest.new + + # Call the create_endpoint_policy method. + result = client.create_endpoint_policy 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 networkservices_v1_generated_NetworkServices_CreateEndpointPolicy_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/create_gateway.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/create_gateway.rb new file mode 100644 index 000000000000..8a0a08655678 --- /dev/null +++ b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/create_gateway.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 networkservices_v1_generated_NetworkServices_CreateGateway_sync] +require "google/cloud/network_services/v1" + +## +# Snippet for the create_gateway call in the NetworkServices 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::NetworkServices::V1::NetworkServices::Client#create_gateway. +# +def create_gateway + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::NetworkServices::V1::CreateGatewayRequest.new + + # Call the create_gateway method. + result = client.create_gateway 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 networkservices_v1_generated_NetworkServices_CreateGateway_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/create_grpc_route.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/create_grpc_route.rb new file mode 100644 index 000000000000..3146e4ba9b8c --- /dev/null +++ b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/create_grpc_route.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 networkservices_v1_generated_NetworkServices_CreateGrpcRoute_sync] +require "google/cloud/network_services/v1" + +## +# Snippet for the create_grpc_route call in the NetworkServices 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::NetworkServices::V1::NetworkServices::Client#create_grpc_route. +# +def create_grpc_route + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::NetworkServices::V1::CreateGrpcRouteRequest.new + + # Call the create_grpc_route method. + result = client.create_grpc_route 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 networkservices_v1_generated_NetworkServices_CreateGrpcRoute_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/create_http_route.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/create_http_route.rb new file mode 100644 index 000000000000..9fc0c35ff06d --- /dev/null +++ b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/create_http_route.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 networkservices_v1_generated_NetworkServices_CreateHttpRoute_sync] +require "google/cloud/network_services/v1" + +## +# Snippet for the create_http_route call in the NetworkServices 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::NetworkServices::V1::NetworkServices::Client#create_http_route. +# +def create_http_route + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::NetworkServices::V1::CreateHttpRouteRequest.new + + # Call the create_http_route method. + result = client.create_http_route 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 networkservices_v1_generated_NetworkServices_CreateHttpRoute_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/create_mesh.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/create_mesh.rb new file mode 100644 index 000000000000..5bb14f520eee --- /dev/null +++ b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/create_mesh.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 networkservices_v1_generated_NetworkServices_CreateMesh_sync] +require "google/cloud/network_services/v1" + +## +# Snippet for the create_mesh call in the NetworkServices 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::NetworkServices::V1::NetworkServices::Client#create_mesh. +# +def create_mesh + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::NetworkServices::V1::CreateMeshRequest.new + + # Call the create_mesh method. + result = client.create_mesh 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 networkservices_v1_generated_NetworkServices_CreateMesh_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/create_service_binding.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/create_service_binding.rb new file mode 100644 index 000000000000..68b065cc78e0 --- /dev/null +++ b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/create_service_binding.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 networkservices_v1_generated_NetworkServices_CreateServiceBinding_sync] +require "google/cloud/network_services/v1" + +## +# Snippet for the create_service_binding call in the NetworkServices 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::NetworkServices::V1::NetworkServices::Client#create_service_binding. +# +def create_service_binding + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::NetworkServices::V1::CreateServiceBindingRequest.new + + # Call the create_service_binding method. + result = client.create_service_binding 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 networkservices_v1_generated_NetworkServices_CreateServiceBinding_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/create_service_lb_policy.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/create_service_lb_policy.rb new file mode 100644 index 000000000000..4df14c802f11 --- /dev/null +++ b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/create_service_lb_policy.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 networkservices_v1_generated_NetworkServices_CreateServiceLbPolicy_sync] +require "google/cloud/network_services/v1" + +## +# Snippet for the create_service_lb_policy call in the NetworkServices 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::NetworkServices::V1::NetworkServices::Client#create_service_lb_policy. +# +def create_service_lb_policy + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::NetworkServices::V1::CreateServiceLbPolicyRequest.new + + # Call the create_service_lb_policy method. + result = client.create_service_lb_policy 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 networkservices_v1_generated_NetworkServices_CreateServiceLbPolicy_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/create_tcp_route.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/create_tcp_route.rb new file mode 100644 index 000000000000..7713488f79cf --- /dev/null +++ b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/create_tcp_route.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 networkservices_v1_generated_NetworkServices_CreateTcpRoute_sync] +require "google/cloud/network_services/v1" + +## +# Snippet for the create_tcp_route call in the NetworkServices 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::NetworkServices::V1::NetworkServices::Client#create_tcp_route. +# +def create_tcp_route + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::NetworkServices::V1::CreateTcpRouteRequest.new + + # Call the create_tcp_route method. + result = client.create_tcp_route 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 networkservices_v1_generated_NetworkServices_CreateTcpRoute_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/create_tls_route.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/create_tls_route.rb new file mode 100644 index 000000000000..f87a51f8a71f --- /dev/null +++ b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/create_tls_route.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 networkservices_v1_generated_NetworkServices_CreateTlsRoute_sync] +require "google/cloud/network_services/v1" + +## +# Snippet for the create_tls_route call in the NetworkServices 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::NetworkServices::V1::NetworkServices::Client#create_tls_route. +# +def create_tls_route + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::NetworkServices::V1::CreateTlsRouteRequest.new + + # Call the create_tls_route method. + result = client.create_tls_route 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 networkservices_v1_generated_NetworkServices_CreateTlsRoute_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/create_wasm_plugin.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/create_wasm_plugin.rb new file mode 100644 index 000000000000..d7a64706e774 --- /dev/null +++ b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/create_wasm_plugin.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 networkservices_v1_generated_NetworkServices_CreateWasmPlugin_sync] +require "google/cloud/network_services/v1" + +## +# Snippet for the create_wasm_plugin call in the NetworkServices 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::NetworkServices::V1::NetworkServices::Client#create_wasm_plugin. +# +def create_wasm_plugin + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::NetworkServices::V1::CreateWasmPluginRequest.new + + # Call the create_wasm_plugin method. + result = client.create_wasm_plugin 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 networkservices_v1_generated_NetworkServices_CreateWasmPlugin_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/create_wasm_plugin_version.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/create_wasm_plugin_version.rb new file mode 100644 index 000000000000..48f30519111e --- /dev/null +++ b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/create_wasm_plugin_version.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 networkservices_v1_generated_NetworkServices_CreateWasmPluginVersion_sync] +require "google/cloud/network_services/v1" + +## +# Snippet for the create_wasm_plugin_version call in the NetworkServices 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::NetworkServices::V1::NetworkServices::Client#create_wasm_plugin_version. +# +def create_wasm_plugin_version + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::NetworkServices::V1::CreateWasmPluginVersionRequest.new + + # Call the create_wasm_plugin_version method. + result = client.create_wasm_plugin_version 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 networkservices_v1_generated_NetworkServices_CreateWasmPluginVersion_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/delete_agent_gateway.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/delete_agent_gateway.rb new file mode 100644 index 000000000000..e8095b452da0 --- /dev/null +++ b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/delete_agent_gateway.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 networkservices_v1_generated_NetworkServices_DeleteAgentGateway_sync] +require "google/cloud/network_services/v1" + +## +# Snippet for the delete_agent_gateway call in the NetworkServices 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::NetworkServices::V1::NetworkServices::Client#delete_agent_gateway. +# +def delete_agent_gateway + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::NetworkServices::V1::DeleteAgentGatewayRequest.new + + # Call the delete_agent_gateway method. + result = client.delete_agent_gateway 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 networkservices_v1_generated_NetworkServices_DeleteAgentGateway_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/delete_endpoint_policy.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/delete_endpoint_policy.rb new file mode 100644 index 000000000000..da61e98011fe --- /dev/null +++ b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/delete_endpoint_policy.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 networkservices_v1_generated_NetworkServices_DeleteEndpointPolicy_sync] +require "google/cloud/network_services/v1" + +## +# Snippet for the delete_endpoint_policy call in the NetworkServices 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::NetworkServices::V1::NetworkServices::Client#delete_endpoint_policy. +# +def delete_endpoint_policy + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::NetworkServices::V1::DeleteEndpointPolicyRequest.new + + # Call the delete_endpoint_policy method. + result = client.delete_endpoint_policy 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 networkservices_v1_generated_NetworkServices_DeleteEndpointPolicy_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/delete_gateway.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/delete_gateway.rb new file mode 100644 index 000000000000..191cd7e538aa --- /dev/null +++ b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/delete_gateway.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 networkservices_v1_generated_NetworkServices_DeleteGateway_sync] +require "google/cloud/network_services/v1" + +## +# Snippet for the delete_gateway call in the NetworkServices 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::NetworkServices::V1::NetworkServices::Client#delete_gateway. +# +def delete_gateway + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::NetworkServices::V1::DeleteGatewayRequest.new + + # Call the delete_gateway method. + result = client.delete_gateway 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 networkservices_v1_generated_NetworkServices_DeleteGateway_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/delete_grpc_route.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/delete_grpc_route.rb new file mode 100644 index 000000000000..362fca28ee28 --- /dev/null +++ b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/delete_grpc_route.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 networkservices_v1_generated_NetworkServices_DeleteGrpcRoute_sync] +require "google/cloud/network_services/v1" + +## +# Snippet for the delete_grpc_route call in the NetworkServices 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::NetworkServices::V1::NetworkServices::Client#delete_grpc_route. +# +def delete_grpc_route + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::NetworkServices::V1::DeleteGrpcRouteRequest.new + + # Call the delete_grpc_route method. + result = client.delete_grpc_route 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 networkservices_v1_generated_NetworkServices_DeleteGrpcRoute_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/delete_http_route.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/delete_http_route.rb new file mode 100644 index 000000000000..fb9b4d0a4357 --- /dev/null +++ b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/delete_http_route.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 networkservices_v1_generated_NetworkServices_DeleteHttpRoute_sync] +require "google/cloud/network_services/v1" + +## +# Snippet for the delete_http_route call in the NetworkServices 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::NetworkServices::V1::NetworkServices::Client#delete_http_route. +# +def delete_http_route + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::NetworkServices::V1::DeleteHttpRouteRequest.new + + # Call the delete_http_route method. + result = client.delete_http_route 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 networkservices_v1_generated_NetworkServices_DeleteHttpRoute_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/delete_mesh.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/delete_mesh.rb new file mode 100644 index 000000000000..38679aa8ee37 --- /dev/null +++ b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/delete_mesh.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 networkservices_v1_generated_NetworkServices_DeleteMesh_sync] +require "google/cloud/network_services/v1" + +## +# Snippet for the delete_mesh call in the NetworkServices 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::NetworkServices::V1::NetworkServices::Client#delete_mesh. +# +def delete_mesh + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::NetworkServices::V1::DeleteMeshRequest.new + + # Call the delete_mesh method. + result = client.delete_mesh 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 networkservices_v1_generated_NetworkServices_DeleteMesh_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/delete_service_binding.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/delete_service_binding.rb new file mode 100644 index 000000000000..a53e8f9bb080 --- /dev/null +++ b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/delete_service_binding.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 networkservices_v1_generated_NetworkServices_DeleteServiceBinding_sync] +require "google/cloud/network_services/v1" + +## +# Snippet for the delete_service_binding call in the NetworkServices 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::NetworkServices::V1::NetworkServices::Client#delete_service_binding. +# +def delete_service_binding + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::NetworkServices::V1::DeleteServiceBindingRequest.new + + # Call the delete_service_binding method. + result = client.delete_service_binding 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 networkservices_v1_generated_NetworkServices_DeleteServiceBinding_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/delete_service_lb_policy.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/delete_service_lb_policy.rb new file mode 100644 index 000000000000..8d8eba182511 --- /dev/null +++ b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/delete_service_lb_policy.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 networkservices_v1_generated_NetworkServices_DeleteServiceLbPolicy_sync] +require "google/cloud/network_services/v1" + +## +# Snippet for the delete_service_lb_policy call in the NetworkServices 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::NetworkServices::V1::NetworkServices::Client#delete_service_lb_policy. +# +def delete_service_lb_policy + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::NetworkServices::V1::DeleteServiceLbPolicyRequest.new + + # Call the delete_service_lb_policy method. + result = client.delete_service_lb_policy 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 networkservices_v1_generated_NetworkServices_DeleteServiceLbPolicy_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/delete_tcp_route.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/delete_tcp_route.rb new file mode 100644 index 000000000000..23c4fea7bfe0 --- /dev/null +++ b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/delete_tcp_route.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 networkservices_v1_generated_NetworkServices_DeleteTcpRoute_sync] +require "google/cloud/network_services/v1" + +## +# Snippet for the delete_tcp_route call in the NetworkServices 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::NetworkServices::V1::NetworkServices::Client#delete_tcp_route. +# +def delete_tcp_route + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::NetworkServices::V1::DeleteTcpRouteRequest.new + + # Call the delete_tcp_route method. + result = client.delete_tcp_route 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 networkservices_v1_generated_NetworkServices_DeleteTcpRoute_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/delete_tls_route.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/delete_tls_route.rb new file mode 100644 index 000000000000..e000e54ca758 --- /dev/null +++ b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/delete_tls_route.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 networkservices_v1_generated_NetworkServices_DeleteTlsRoute_sync] +require "google/cloud/network_services/v1" + +## +# Snippet for the delete_tls_route call in the NetworkServices 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::NetworkServices::V1::NetworkServices::Client#delete_tls_route. +# +def delete_tls_route + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::NetworkServices::V1::DeleteTlsRouteRequest.new + + # Call the delete_tls_route method. + result = client.delete_tls_route 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 networkservices_v1_generated_NetworkServices_DeleteTlsRoute_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/delete_wasm_plugin.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/delete_wasm_plugin.rb new file mode 100644 index 000000000000..7ff12d0c8530 --- /dev/null +++ b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/delete_wasm_plugin.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 networkservices_v1_generated_NetworkServices_DeleteWasmPlugin_sync] +require "google/cloud/network_services/v1" + +## +# Snippet for the delete_wasm_plugin call in the NetworkServices 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::NetworkServices::V1::NetworkServices::Client#delete_wasm_plugin. +# +def delete_wasm_plugin + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::NetworkServices::V1::DeleteWasmPluginRequest.new + + # Call the delete_wasm_plugin method. + result = client.delete_wasm_plugin 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 networkservices_v1_generated_NetworkServices_DeleteWasmPlugin_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/delete_wasm_plugin_version.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/delete_wasm_plugin_version.rb new file mode 100644 index 000000000000..8663d52decd6 --- /dev/null +++ b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/delete_wasm_plugin_version.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 networkservices_v1_generated_NetworkServices_DeleteWasmPluginVersion_sync] +require "google/cloud/network_services/v1" + +## +# Snippet for the delete_wasm_plugin_version call in the NetworkServices 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::NetworkServices::V1::NetworkServices::Client#delete_wasm_plugin_version. +# +def delete_wasm_plugin_version + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::NetworkServices::V1::DeleteWasmPluginVersionRequest.new + + # Call the delete_wasm_plugin_version method. + result = client.delete_wasm_plugin_version 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 networkservices_v1_generated_NetworkServices_DeleteWasmPluginVersion_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/get_agent_gateway.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/get_agent_gateway.rb new file mode 100644 index 000000000000..2e83b044ffb2 --- /dev/null +++ b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/get_agent_gateway.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 networkservices_v1_generated_NetworkServices_GetAgentGateway_sync] +require "google/cloud/network_services/v1" + +## +# Snippet for the get_agent_gateway call in the NetworkServices 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::NetworkServices::V1::NetworkServices::Client#get_agent_gateway. +# +def get_agent_gateway + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::NetworkServices::V1::GetAgentGatewayRequest.new + + # Call the get_agent_gateway method. + result = client.get_agent_gateway request + + # The returned object is of type Google::Cloud::NetworkServices::V1::AgentGateway. + p result +end +# [END networkservices_v1_generated_NetworkServices_GetAgentGateway_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/get_endpoint_policy.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/get_endpoint_policy.rb new file mode 100644 index 000000000000..7bf7310ba421 --- /dev/null +++ b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/get_endpoint_policy.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 networkservices_v1_generated_NetworkServices_GetEndpointPolicy_sync] +require "google/cloud/network_services/v1" + +## +# Snippet for the get_endpoint_policy call in the NetworkServices 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::NetworkServices::V1::NetworkServices::Client#get_endpoint_policy. +# +def get_endpoint_policy + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::NetworkServices::V1::GetEndpointPolicyRequest.new + + # Call the get_endpoint_policy method. + result = client.get_endpoint_policy request + + # The returned object is of type Google::Cloud::NetworkServices::V1::EndpointPolicy. + p result +end +# [END networkservices_v1_generated_NetworkServices_GetEndpointPolicy_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/get_gateway.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/get_gateway.rb new file mode 100644 index 000000000000..cd9c3803c27a --- /dev/null +++ b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/get_gateway.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 networkservices_v1_generated_NetworkServices_GetGateway_sync] +require "google/cloud/network_services/v1" + +## +# Snippet for the get_gateway call in the NetworkServices 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::NetworkServices::V1::NetworkServices::Client#get_gateway. +# +def get_gateway + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::NetworkServices::V1::GetGatewayRequest.new + + # Call the get_gateway method. + result = client.get_gateway request + + # The returned object is of type Google::Cloud::NetworkServices::V1::Gateway. + p result +end +# [END networkservices_v1_generated_NetworkServices_GetGateway_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/get_gateway_route_view.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/get_gateway_route_view.rb new file mode 100644 index 000000000000..acdfafc06d24 --- /dev/null +++ b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/get_gateway_route_view.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 networkservices_v1_generated_NetworkServices_GetGatewayRouteView_sync] +require "google/cloud/network_services/v1" + +## +# Snippet for the get_gateway_route_view call in the NetworkServices 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::NetworkServices::V1::NetworkServices::Client#get_gateway_route_view. +# +def get_gateway_route_view + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::NetworkServices::V1::GetGatewayRouteViewRequest.new + + # Call the get_gateway_route_view method. + result = client.get_gateway_route_view request + + # The returned object is of type Google::Cloud::NetworkServices::V1::GatewayRouteView. + p result +end +# [END networkservices_v1_generated_NetworkServices_GetGatewayRouteView_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/get_grpc_route.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/get_grpc_route.rb new file mode 100644 index 000000000000..c89829583747 --- /dev/null +++ b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/get_grpc_route.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 networkservices_v1_generated_NetworkServices_GetGrpcRoute_sync] +require "google/cloud/network_services/v1" + +## +# Snippet for the get_grpc_route call in the NetworkServices 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::NetworkServices::V1::NetworkServices::Client#get_grpc_route. +# +def get_grpc_route + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::NetworkServices::V1::GetGrpcRouteRequest.new + + # Call the get_grpc_route method. + result = client.get_grpc_route request + + # The returned object is of type Google::Cloud::NetworkServices::V1::GrpcRoute. + p result +end +# [END networkservices_v1_generated_NetworkServices_GetGrpcRoute_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/get_http_route.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/get_http_route.rb new file mode 100644 index 000000000000..5fae23632eba --- /dev/null +++ b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/get_http_route.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 networkservices_v1_generated_NetworkServices_GetHttpRoute_sync] +require "google/cloud/network_services/v1" + +## +# Snippet for the get_http_route call in the NetworkServices 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::NetworkServices::V1::NetworkServices::Client#get_http_route. +# +def get_http_route + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::NetworkServices::V1::GetHttpRouteRequest.new + + # Call the get_http_route method. + result = client.get_http_route request + + # The returned object is of type Google::Cloud::NetworkServices::V1::HttpRoute. + p result +end +# [END networkservices_v1_generated_NetworkServices_GetHttpRoute_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/get_mesh.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/get_mesh.rb new file mode 100644 index 000000000000..4c03bbdea364 --- /dev/null +++ b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/get_mesh.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 networkservices_v1_generated_NetworkServices_GetMesh_sync] +require "google/cloud/network_services/v1" + +## +# Snippet for the get_mesh call in the NetworkServices 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::NetworkServices::V1::NetworkServices::Client#get_mesh. +# +def get_mesh + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::NetworkServices::V1::GetMeshRequest.new + + # Call the get_mesh method. + result = client.get_mesh request + + # The returned object is of type Google::Cloud::NetworkServices::V1::Mesh. + p result +end +# [END networkservices_v1_generated_NetworkServices_GetMesh_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/get_mesh_route_view.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/get_mesh_route_view.rb new file mode 100644 index 000000000000..94b12e51dd9a --- /dev/null +++ b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/get_mesh_route_view.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 networkservices_v1_generated_NetworkServices_GetMeshRouteView_sync] +require "google/cloud/network_services/v1" + +## +# Snippet for the get_mesh_route_view call in the NetworkServices 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::NetworkServices::V1::NetworkServices::Client#get_mesh_route_view. +# +def get_mesh_route_view + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::NetworkServices::V1::GetMeshRouteViewRequest.new + + # Call the get_mesh_route_view method. + result = client.get_mesh_route_view request + + # The returned object is of type Google::Cloud::NetworkServices::V1::MeshRouteView. + p result +end +# [END networkservices_v1_generated_NetworkServices_GetMeshRouteView_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/get_service_binding.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/get_service_binding.rb new file mode 100644 index 000000000000..c53b311074b6 --- /dev/null +++ b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/get_service_binding.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 networkservices_v1_generated_NetworkServices_GetServiceBinding_sync] +require "google/cloud/network_services/v1" + +## +# Snippet for the get_service_binding call in the NetworkServices 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::NetworkServices::V1::NetworkServices::Client#get_service_binding. +# +def get_service_binding + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::NetworkServices::V1::GetServiceBindingRequest.new + + # Call the get_service_binding method. + result = client.get_service_binding request + + # The returned object is of type Google::Cloud::NetworkServices::V1::ServiceBinding. + p result +end +# [END networkservices_v1_generated_NetworkServices_GetServiceBinding_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/get_service_lb_policy.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/get_service_lb_policy.rb new file mode 100644 index 000000000000..177cbae5a00e --- /dev/null +++ b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/get_service_lb_policy.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 networkservices_v1_generated_NetworkServices_GetServiceLbPolicy_sync] +require "google/cloud/network_services/v1" + +## +# Snippet for the get_service_lb_policy call in the NetworkServices 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::NetworkServices::V1::NetworkServices::Client#get_service_lb_policy. +# +def get_service_lb_policy + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::NetworkServices::V1::GetServiceLbPolicyRequest.new + + # Call the get_service_lb_policy method. + result = client.get_service_lb_policy request + + # The returned object is of type Google::Cloud::NetworkServices::V1::ServiceLbPolicy. + p result +end +# [END networkservices_v1_generated_NetworkServices_GetServiceLbPolicy_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/get_tcp_route.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/get_tcp_route.rb new file mode 100644 index 000000000000..752be5a27b33 --- /dev/null +++ b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/get_tcp_route.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 networkservices_v1_generated_NetworkServices_GetTcpRoute_sync] +require "google/cloud/network_services/v1" + +## +# Snippet for the get_tcp_route call in the NetworkServices 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::NetworkServices::V1::NetworkServices::Client#get_tcp_route. +# +def get_tcp_route + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::NetworkServices::V1::GetTcpRouteRequest.new + + # Call the get_tcp_route method. + result = client.get_tcp_route request + + # The returned object is of type Google::Cloud::NetworkServices::V1::TcpRoute. + p result +end +# [END networkservices_v1_generated_NetworkServices_GetTcpRoute_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/get_tls_route.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/get_tls_route.rb new file mode 100644 index 000000000000..0d58a8669da1 --- /dev/null +++ b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/get_tls_route.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 networkservices_v1_generated_NetworkServices_GetTlsRoute_sync] +require "google/cloud/network_services/v1" + +## +# Snippet for the get_tls_route call in the NetworkServices 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::NetworkServices::V1::NetworkServices::Client#get_tls_route. +# +def get_tls_route + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::NetworkServices::V1::GetTlsRouteRequest.new + + # Call the get_tls_route method. + result = client.get_tls_route request + + # The returned object is of type Google::Cloud::NetworkServices::V1::TlsRoute. + p result +end +# [END networkservices_v1_generated_NetworkServices_GetTlsRoute_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/get_wasm_plugin.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/get_wasm_plugin.rb new file mode 100644 index 000000000000..71e2764be6c7 --- /dev/null +++ b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/get_wasm_plugin.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 networkservices_v1_generated_NetworkServices_GetWasmPlugin_sync] +require "google/cloud/network_services/v1" + +## +# Snippet for the get_wasm_plugin call in the NetworkServices 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::NetworkServices::V1::NetworkServices::Client#get_wasm_plugin. +# +def get_wasm_plugin + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::NetworkServices::V1::GetWasmPluginRequest.new + + # Call the get_wasm_plugin method. + result = client.get_wasm_plugin request + + # The returned object is of type Google::Cloud::NetworkServices::V1::WasmPlugin. + p result +end +# [END networkservices_v1_generated_NetworkServices_GetWasmPlugin_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/get_wasm_plugin_version.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/get_wasm_plugin_version.rb new file mode 100644 index 000000000000..d3b8cbb231dd --- /dev/null +++ b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/get_wasm_plugin_version.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 networkservices_v1_generated_NetworkServices_GetWasmPluginVersion_sync] +require "google/cloud/network_services/v1" + +## +# Snippet for the get_wasm_plugin_version call in the NetworkServices 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::NetworkServices::V1::NetworkServices::Client#get_wasm_plugin_version. +# +def get_wasm_plugin_version + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::NetworkServices::V1::GetWasmPluginVersionRequest.new + + # Call the get_wasm_plugin_version method. + result = client.get_wasm_plugin_version request + + # The returned object is of type Google::Cloud::NetworkServices::V1::WasmPluginVersion. + p result +end +# [END networkservices_v1_generated_NetworkServices_GetWasmPluginVersion_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/list_agent_gateways.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/list_agent_gateways.rb new file mode 100644 index 000000000000..8164e1d1e87e --- /dev/null +++ b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/list_agent_gateways.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 networkservices_v1_generated_NetworkServices_ListAgentGateways_sync] +require "google/cloud/network_services/v1" + +## +# Snippet for the list_agent_gateways call in the NetworkServices 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::NetworkServices::V1::NetworkServices::Client#list_agent_gateways. +# +def list_agent_gateways + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::NetworkServices::V1::ListAgentGatewaysRequest.new + + # Call the list_agent_gateways method. + result = client.list_agent_gateways 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::NetworkServices::V1::AgentGateway. + p item + end +end +# [END networkservices_v1_generated_NetworkServices_ListAgentGateways_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/list_endpoint_policies.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/list_endpoint_policies.rb new file mode 100644 index 000000000000..80f363ddf94e --- /dev/null +++ b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/list_endpoint_policies.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 networkservices_v1_generated_NetworkServices_ListEndpointPolicies_sync] +require "google/cloud/network_services/v1" + +## +# Snippet for the list_endpoint_policies call in the NetworkServices 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::NetworkServices::V1::NetworkServices::Client#list_endpoint_policies. +# +def list_endpoint_policies + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::NetworkServices::V1::ListEndpointPoliciesRequest.new + + # Call the list_endpoint_policies method. + result = client.list_endpoint_policies 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::NetworkServices::V1::EndpointPolicy. + p item + end +end +# [END networkservices_v1_generated_NetworkServices_ListEndpointPolicies_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/list_gateway_route_views.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/list_gateway_route_views.rb new file mode 100644 index 000000000000..bf70b18fd3e1 --- /dev/null +++ b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/list_gateway_route_views.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 networkservices_v1_generated_NetworkServices_ListGatewayRouteViews_sync] +require "google/cloud/network_services/v1" + +## +# Snippet for the list_gateway_route_views call in the NetworkServices 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::NetworkServices::V1::NetworkServices::Client#list_gateway_route_views. +# +def list_gateway_route_views + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::NetworkServices::V1::ListGatewayRouteViewsRequest.new + + # Call the list_gateway_route_views method. + result = client.list_gateway_route_views 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::NetworkServices::V1::GatewayRouteView. + p item + end +end +# [END networkservices_v1_generated_NetworkServices_ListGatewayRouteViews_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/list_gateways.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/list_gateways.rb new file mode 100644 index 000000000000..b76c468e6040 --- /dev/null +++ b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/list_gateways.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 networkservices_v1_generated_NetworkServices_ListGateways_sync] +require "google/cloud/network_services/v1" + +## +# Snippet for the list_gateways call in the NetworkServices 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::NetworkServices::V1::NetworkServices::Client#list_gateways. +# +def list_gateways + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::NetworkServices::V1::ListGatewaysRequest.new + + # Call the list_gateways method. + result = client.list_gateways 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::NetworkServices::V1::Gateway. + p item + end +end +# [END networkservices_v1_generated_NetworkServices_ListGateways_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/list_grpc_routes.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/list_grpc_routes.rb new file mode 100644 index 000000000000..e05e41499496 --- /dev/null +++ b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/list_grpc_routes.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 networkservices_v1_generated_NetworkServices_ListGrpcRoutes_sync] +require "google/cloud/network_services/v1" + +## +# Snippet for the list_grpc_routes call in the NetworkServices 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::NetworkServices::V1::NetworkServices::Client#list_grpc_routes. +# +def list_grpc_routes + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::NetworkServices::V1::ListGrpcRoutesRequest.new + + # Call the list_grpc_routes method. + result = client.list_grpc_routes 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::NetworkServices::V1::GrpcRoute. + p item + end +end +# [END networkservices_v1_generated_NetworkServices_ListGrpcRoutes_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/list_http_routes.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/list_http_routes.rb new file mode 100644 index 000000000000..906f35e99306 --- /dev/null +++ b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/list_http_routes.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 networkservices_v1_generated_NetworkServices_ListHttpRoutes_sync] +require "google/cloud/network_services/v1" + +## +# Snippet for the list_http_routes call in the NetworkServices 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::NetworkServices::V1::NetworkServices::Client#list_http_routes. +# +def list_http_routes + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::NetworkServices::V1::ListHttpRoutesRequest.new + + # Call the list_http_routes method. + result = client.list_http_routes 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::NetworkServices::V1::HttpRoute. + p item + end +end +# [END networkservices_v1_generated_NetworkServices_ListHttpRoutes_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/list_mesh_route_views.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/list_mesh_route_views.rb new file mode 100644 index 000000000000..db2969a594b5 --- /dev/null +++ b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/list_mesh_route_views.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 networkservices_v1_generated_NetworkServices_ListMeshRouteViews_sync] +require "google/cloud/network_services/v1" + +## +# Snippet for the list_mesh_route_views call in the NetworkServices 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::NetworkServices::V1::NetworkServices::Client#list_mesh_route_views. +# +def list_mesh_route_views + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::NetworkServices::V1::ListMeshRouteViewsRequest.new + + # Call the list_mesh_route_views method. + result = client.list_mesh_route_views 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::NetworkServices::V1::MeshRouteView. + p item + end +end +# [END networkservices_v1_generated_NetworkServices_ListMeshRouteViews_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/list_meshes.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/list_meshes.rb new file mode 100644 index 000000000000..9328e9df834b --- /dev/null +++ b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/list_meshes.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 networkservices_v1_generated_NetworkServices_ListMeshes_sync] +require "google/cloud/network_services/v1" + +## +# Snippet for the list_meshes call in the NetworkServices 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::NetworkServices::V1::NetworkServices::Client#list_meshes. +# +def list_meshes + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::NetworkServices::V1::ListMeshesRequest.new + + # Call the list_meshes method. + result = client.list_meshes 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::NetworkServices::V1::Mesh. + p item + end +end +# [END networkservices_v1_generated_NetworkServices_ListMeshes_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/list_service_bindings.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/list_service_bindings.rb new file mode 100644 index 000000000000..be1be326d51a --- /dev/null +++ b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/list_service_bindings.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 networkservices_v1_generated_NetworkServices_ListServiceBindings_sync] +require "google/cloud/network_services/v1" + +## +# Snippet for the list_service_bindings call in the NetworkServices 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::NetworkServices::V1::NetworkServices::Client#list_service_bindings. +# +def list_service_bindings + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::NetworkServices::V1::ListServiceBindingsRequest.new + + # Call the list_service_bindings method. + result = client.list_service_bindings 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::NetworkServices::V1::ServiceBinding. + p item + end +end +# [END networkservices_v1_generated_NetworkServices_ListServiceBindings_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/list_service_lb_policies.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/list_service_lb_policies.rb new file mode 100644 index 000000000000..d964f2a5d0df --- /dev/null +++ b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/list_service_lb_policies.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 networkservices_v1_generated_NetworkServices_ListServiceLbPolicies_sync] +require "google/cloud/network_services/v1" + +## +# Snippet for the list_service_lb_policies call in the NetworkServices 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::NetworkServices::V1::NetworkServices::Client#list_service_lb_policies. +# +def list_service_lb_policies + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::NetworkServices::V1::ListServiceLbPoliciesRequest.new + + # Call the list_service_lb_policies method. + result = client.list_service_lb_policies 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::NetworkServices::V1::ServiceLbPolicy. + p item + end +end +# [END networkservices_v1_generated_NetworkServices_ListServiceLbPolicies_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/list_tcp_routes.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/list_tcp_routes.rb new file mode 100644 index 000000000000..e521f13c50c7 --- /dev/null +++ b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/list_tcp_routes.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 networkservices_v1_generated_NetworkServices_ListTcpRoutes_sync] +require "google/cloud/network_services/v1" + +## +# Snippet for the list_tcp_routes call in the NetworkServices 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::NetworkServices::V1::NetworkServices::Client#list_tcp_routes. +# +def list_tcp_routes + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::NetworkServices::V1::ListTcpRoutesRequest.new + + # Call the list_tcp_routes method. + result = client.list_tcp_routes 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::NetworkServices::V1::TcpRoute. + p item + end +end +# [END networkservices_v1_generated_NetworkServices_ListTcpRoutes_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/list_tls_routes.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/list_tls_routes.rb new file mode 100644 index 000000000000..8ac101b92cba --- /dev/null +++ b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/list_tls_routes.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 networkservices_v1_generated_NetworkServices_ListTlsRoutes_sync] +require "google/cloud/network_services/v1" + +## +# Snippet for the list_tls_routes call in the NetworkServices 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::NetworkServices::V1::NetworkServices::Client#list_tls_routes. +# +def list_tls_routes + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::NetworkServices::V1::ListTlsRoutesRequest.new + + # Call the list_tls_routes method. + result = client.list_tls_routes 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::NetworkServices::V1::TlsRoute. + p item + end +end +# [END networkservices_v1_generated_NetworkServices_ListTlsRoutes_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/list_wasm_plugin_versions.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/list_wasm_plugin_versions.rb new file mode 100644 index 000000000000..10c3321d69b7 --- /dev/null +++ b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/list_wasm_plugin_versions.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 networkservices_v1_generated_NetworkServices_ListWasmPluginVersions_sync] +require "google/cloud/network_services/v1" + +## +# Snippet for the list_wasm_plugin_versions call in the NetworkServices 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::NetworkServices::V1::NetworkServices::Client#list_wasm_plugin_versions. +# +def list_wasm_plugin_versions + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::NetworkServices::V1::ListWasmPluginVersionsRequest.new + + # Call the list_wasm_plugin_versions method. + result = client.list_wasm_plugin_versions 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::NetworkServices::V1::WasmPluginVersion. + p item + end +end +# [END networkservices_v1_generated_NetworkServices_ListWasmPluginVersions_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/list_wasm_plugins.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/list_wasm_plugins.rb new file mode 100644 index 000000000000..4cf013595d0f --- /dev/null +++ b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/list_wasm_plugins.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 networkservices_v1_generated_NetworkServices_ListWasmPlugins_sync] +require "google/cloud/network_services/v1" + +## +# Snippet for the list_wasm_plugins call in the NetworkServices 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::NetworkServices::V1::NetworkServices::Client#list_wasm_plugins. +# +def list_wasm_plugins + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::NetworkServices::V1::ListWasmPluginsRequest.new + + # Call the list_wasm_plugins method. + result = client.list_wasm_plugins 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::NetworkServices::V1::WasmPlugin. + p item + end +end +# [END networkservices_v1_generated_NetworkServices_ListWasmPlugins_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/update_agent_gateway.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/update_agent_gateway.rb new file mode 100644 index 000000000000..df2d8dd08149 --- /dev/null +++ b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/update_agent_gateway.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 networkservices_v1_generated_NetworkServices_UpdateAgentGateway_sync] +require "google/cloud/network_services/v1" + +## +# Snippet for the update_agent_gateway call in the NetworkServices 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::NetworkServices::V1::NetworkServices::Client#update_agent_gateway. +# +def update_agent_gateway + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::NetworkServices::V1::UpdateAgentGatewayRequest.new + + # Call the update_agent_gateway method. + result = client.update_agent_gateway 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 networkservices_v1_generated_NetworkServices_UpdateAgentGateway_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/update_endpoint_policy.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/update_endpoint_policy.rb new file mode 100644 index 000000000000..c636c6774100 --- /dev/null +++ b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/update_endpoint_policy.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 networkservices_v1_generated_NetworkServices_UpdateEndpointPolicy_sync] +require "google/cloud/network_services/v1" + +## +# Snippet for the update_endpoint_policy call in the NetworkServices 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::NetworkServices::V1::NetworkServices::Client#update_endpoint_policy. +# +def update_endpoint_policy + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::NetworkServices::V1::UpdateEndpointPolicyRequest.new + + # Call the update_endpoint_policy method. + result = client.update_endpoint_policy 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 networkservices_v1_generated_NetworkServices_UpdateEndpointPolicy_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/update_gateway.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/update_gateway.rb new file mode 100644 index 000000000000..27ca3e6e8207 --- /dev/null +++ b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/update_gateway.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 networkservices_v1_generated_NetworkServices_UpdateGateway_sync] +require "google/cloud/network_services/v1" + +## +# Snippet for the update_gateway call in the NetworkServices 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::NetworkServices::V1::NetworkServices::Client#update_gateway. +# +def update_gateway + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::NetworkServices::V1::UpdateGatewayRequest.new + + # Call the update_gateway method. + result = client.update_gateway 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 networkservices_v1_generated_NetworkServices_UpdateGateway_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/update_grpc_route.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/update_grpc_route.rb new file mode 100644 index 000000000000..76a9d3fcbd6b --- /dev/null +++ b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/update_grpc_route.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 networkservices_v1_generated_NetworkServices_UpdateGrpcRoute_sync] +require "google/cloud/network_services/v1" + +## +# Snippet for the update_grpc_route call in the NetworkServices 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::NetworkServices::V1::NetworkServices::Client#update_grpc_route. +# +def update_grpc_route + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::NetworkServices::V1::UpdateGrpcRouteRequest.new + + # Call the update_grpc_route method. + result = client.update_grpc_route 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 networkservices_v1_generated_NetworkServices_UpdateGrpcRoute_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/update_http_route.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/update_http_route.rb new file mode 100644 index 000000000000..76ed37a09560 --- /dev/null +++ b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/update_http_route.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 networkservices_v1_generated_NetworkServices_UpdateHttpRoute_sync] +require "google/cloud/network_services/v1" + +## +# Snippet for the update_http_route call in the NetworkServices 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::NetworkServices::V1::NetworkServices::Client#update_http_route. +# +def update_http_route + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::NetworkServices::V1::UpdateHttpRouteRequest.new + + # Call the update_http_route method. + result = client.update_http_route 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 networkservices_v1_generated_NetworkServices_UpdateHttpRoute_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/update_mesh.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/update_mesh.rb new file mode 100644 index 000000000000..0ce24a587521 --- /dev/null +++ b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/update_mesh.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 networkservices_v1_generated_NetworkServices_UpdateMesh_sync] +require "google/cloud/network_services/v1" + +## +# Snippet for the update_mesh call in the NetworkServices 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::NetworkServices::V1::NetworkServices::Client#update_mesh. +# +def update_mesh + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::NetworkServices::V1::UpdateMeshRequest.new + + # Call the update_mesh method. + result = client.update_mesh 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 networkservices_v1_generated_NetworkServices_UpdateMesh_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/update_service_binding.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/update_service_binding.rb new file mode 100644 index 000000000000..c3402c83f387 --- /dev/null +++ b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/update_service_binding.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 networkservices_v1_generated_NetworkServices_UpdateServiceBinding_sync] +require "google/cloud/network_services/v1" + +## +# Snippet for the update_service_binding call in the NetworkServices 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::NetworkServices::V1::NetworkServices::Client#update_service_binding. +# +def update_service_binding + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::NetworkServices::V1::UpdateServiceBindingRequest.new + + # Call the update_service_binding method. + result = client.update_service_binding 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 networkservices_v1_generated_NetworkServices_UpdateServiceBinding_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/update_service_lb_policy.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/update_service_lb_policy.rb new file mode 100644 index 000000000000..e6bb846f0396 --- /dev/null +++ b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/update_service_lb_policy.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 networkservices_v1_generated_NetworkServices_UpdateServiceLbPolicy_sync] +require "google/cloud/network_services/v1" + +## +# Snippet for the update_service_lb_policy call in the NetworkServices 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::NetworkServices::V1::NetworkServices::Client#update_service_lb_policy. +# +def update_service_lb_policy + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::NetworkServices::V1::UpdateServiceLbPolicyRequest.new + + # Call the update_service_lb_policy method. + result = client.update_service_lb_policy 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 networkservices_v1_generated_NetworkServices_UpdateServiceLbPolicy_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/update_tcp_route.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/update_tcp_route.rb new file mode 100644 index 000000000000..318dc7fefbbb --- /dev/null +++ b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/update_tcp_route.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 networkservices_v1_generated_NetworkServices_UpdateTcpRoute_sync] +require "google/cloud/network_services/v1" + +## +# Snippet for the update_tcp_route call in the NetworkServices 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::NetworkServices::V1::NetworkServices::Client#update_tcp_route. +# +def update_tcp_route + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::NetworkServices::V1::UpdateTcpRouteRequest.new + + # Call the update_tcp_route method. + result = client.update_tcp_route 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 networkservices_v1_generated_NetworkServices_UpdateTcpRoute_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/update_tls_route.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/update_tls_route.rb new file mode 100644 index 000000000000..3277355fabb3 --- /dev/null +++ b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/update_tls_route.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 networkservices_v1_generated_NetworkServices_UpdateTlsRoute_sync] +require "google/cloud/network_services/v1" + +## +# Snippet for the update_tls_route call in the NetworkServices 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::NetworkServices::V1::NetworkServices::Client#update_tls_route. +# +def update_tls_route + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::NetworkServices::V1::UpdateTlsRouteRequest.new + + # Call the update_tls_route method. + result = client.update_tls_route 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 networkservices_v1_generated_NetworkServices_UpdateTlsRoute_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/update_wasm_plugin.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/update_wasm_plugin.rb new file mode 100644 index 000000000000..f8f374a19789 --- /dev/null +++ b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/update_wasm_plugin.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 networkservices_v1_generated_NetworkServices_UpdateWasmPlugin_sync] +require "google/cloud/network_services/v1" + +## +# Snippet for the update_wasm_plugin call in the NetworkServices 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::NetworkServices::V1::NetworkServices::Client#update_wasm_plugin. +# +def update_wasm_plugin + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::NetworkServices::V1::UpdateWasmPluginRequest.new + + # Call the update_wasm_plugin method. + result = client.update_wasm_plugin 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 networkservices_v1_generated_NetworkServices_UpdateWasmPlugin_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/snippet_metadata_google.cloud.networkservices.v1.json b/owl-bot-staging/google-cloud-network_services-v1/snippets/snippet_metadata_google.cloud.networkservices.v1.json new file mode 100644 index 000000000000..f6cee93bb4b4 --- /dev/null +++ b/owl-bot-staging/google-cloud-network_services-v1/snippets/snippet_metadata_google.cloud.networkservices.v1.json @@ -0,0 +1,3335 @@ +{ + "client_library": { + "name": "google-cloud-network_services-v1", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.cloud.networkservices.v1", + "version": "v1" + } + ] + }, + "snippets": [ + { + "region_tag": "networkservices_v1_generated_DepService_ListLbTrafficExtensions_sync", + "title": "Snippet for the list_lb_traffic_extensions call in the DepService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::DepService::Client#list_lb_traffic_extensions.", + "file": "dep_service/list_lb_traffic_extensions.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_lb_traffic_extensions", + "full_name": "::Google::Cloud::NetworkServices::V1::DepService::Client#list_lb_traffic_extensions", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::NetworkServices::V1::ListLbTrafficExtensionsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::NetworkServices::V1::ListLbTrafficExtensionsResponse", + "client": { + "short_name": "DepService::Client", + "full_name": "::Google::Cloud::NetworkServices::V1::DepService::Client" + }, + "method": { + "short_name": "ListLbTrafficExtensions", + "full_name": "google.cloud.networkservices.v1.DepService.ListLbTrafficExtensions", + "service": { + "short_name": "DepService", + "full_name": "google.cloud.networkservices.v1.DepService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "networkservices_v1_generated_DepService_GetLbTrafficExtension_sync", + "title": "Snippet for the get_lb_traffic_extension call in the DepService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::DepService::Client#get_lb_traffic_extension.", + "file": "dep_service/get_lb_traffic_extension.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_lb_traffic_extension", + "full_name": "::Google::Cloud::NetworkServices::V1::DepService::Client#get_lb_traffic_extension", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::NetworkServices::V1::GetLbTrafficExtensionRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::NetworkServices::V1::LbTrafficExtension", + "client": { + "short_name": "DepService::Client", + "full_name": "::Google::Cloud::NetworkServices::V1::DepService::Client" + }, + "method": { + "short_name": "GetLbTrafficExtension", + "full_name": "google.cloud.networkservices.v1.DepService.GetLbTrafficExtension", + "service": { + "short_name": "DepService", + "full_name": "google.cloud.networkservices.v1.DepService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "networkservices_v1_generated_DepService_CreateLbTrafficExtension_sync", + "title": "Snippet for the create_lb_traffic_extension call in the DepService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::DepService::Client#create_lb_traffic_extension.", + "file": "dep_service/create_lb_traffic_extension.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_lb_traffic_extension", + "full_name": "::Google::Cloud::NetworkServices::V1::DepService::Client#create_lb_traffic_extension", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::NetworkServices::V1::CreateLbTrafficExtensionRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "DepService::Client", + "full_name": "::Google::Cloud::NetworkServices::V1::DepService::Client" + }, + "method": { + "short_name": "CreateLbTrafficExtension", + "full_name": "google.cloud.networkservices.v1.DepService.CreateLbTrafficExtension", + "service": { + "short_name": "DepService", + "full_name": "google.cloud.networkservices.v1.DepService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "networkservices_v1_generated_DepService_UpdateLbTrafficExtension_sync", + "title": "Snippet for the update_lb_traffic_extension call in the DepService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::DepService::Client#update_lb_traffic_extension.", + "file": "dep_service/update_lb_traffic_extension.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_lb_traffic_extension", + "full_name": "::Google::Cloud::NetworkServices::V1::DepService::Client#update_lb_traffic_extension", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::NetworkServices::V1::UpdateLbTrafficExtensionRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "DepService::Client", + "full_name": "::Google::Cloud::NetworkServices::V1::DepService::Client" + }, + "method": { + "short_name": "UpdateLbTrafficExtension", + "full_name": "google.cloud.networkservices.v1.DepService.UpdateLbTrafficExtension", + "service": { + "short_name": "DepService", + "full_name": "google.cloud.networkservices.v1.DepService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "networkservices_v1_generated_DepService_DeleteLbTrafficExtension_sync", + "title": "Snippet for the delete_lb_traffic_extension call in the DepService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::DepService::Client#delete_lb_traffic_extension.", + "file": "dep_service/delete_lb_traffic_extension.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_lb_traffic_extension", + "full_name": "::Google::Cloud::NetworkServices::V1::DepService::Client#delete_lb_traffic_extension", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::NetworkServices::V1::DeleteLbTrafficExtensionRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "DepService::Client", + "full_name": "::Google::Cloud::NetworkServices::V1::DepService::Client" + }, + "method": { + "short_name": "DeleteLbTrafficExtension", + "full_name": "google.cloud.networkservices.v1.DepService.DeleteLbTrafficExtension", + "service": { + "short_name": "DepService", + "full_name": "google.cloud.networkservices.v1.DepService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "networkservices_v1_generated_DepService_ListLbRouteExtensions_sync", + "title": "Snippet for the list_lb_route_extensions call in the DepService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::DepService::Client#list_lb_route_extensions.", + "file": "dep_service/list_lb_route_extensions.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_lb_route_extensions", + "full_name": "::Google::Cloud::NetworkServices::V1::DepService::Client#list_lb_route_extensions", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::NetworkServices::V1::ListLbRouteExtensionsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::NetworkServices::V1::ListLbRouteExtensionsResponse", + "client": { + "short_name": "DepService::Client", + "full_name": "::Google::Cloud::NetworkServices::V1::DepService::Client" + }, + "method": { + "short_name": "ListLbRouteExtensions", + "full_name": "google.cloud.networkservices.v1.DepService.ListLbRouteExtensions", + "service": { + "short_name": "DepService", + "full_name": "google.cloud.networkservices.v1.DepService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "networkservices_v1_generated_DepService_GetLbRouteExtension_sync", + "title": "Snippet for the get_lb_route_extension call in the DepService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::DepService::Client#get_lb_route_extension.", + "file": "dep_service/get_lb_route_extension.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_lb_route_extension", + "full_name": "::Google::Cloud::NetworkServices::V1::DepService::Client#get_lb_route_extension", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::NetworkServices::V1::GetLbRouteExtensionRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::NetworkServices::V1::LbRouteExtension", + "client": { + "short_name": "DepService::Client", + "full_name": "::Google::Cloud::NetworkServices::V1::DepService::Client" + }, + "method": { + "short_name": "GetLbRouteExtension", + "full_name": "google.cloud.networkservices.v1.DepService.GetLbRouteExtension", + "service": { + "short_name": "DepService", + "full_name": "google.cloud.networkservices.v1.DepService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "networkservices_v1_generated_DepService_CreateLbRouteExtension_sync", + "title": "Snippet for the create_lb_route_extension call in the DepService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::DepService::Client#create_lb_route_extension.", + "file": "dep_service/create_lb_route_extension.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_lb_route_extension", + "full_name": "::Google::Cloud::NetworkServices::V1::DepService::Client#create_lb_route_extension", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::NetworkServices::V1::CreateLbRouteExtensionRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "DepService::Client", + "full_name": "::Google::Cloud::NetworkServices::V1::DepService::Client" + }, + "method": { + "short_name": "CreateLbRouteExtension", + "full_name": "google.cloud.networkservices.v1.DepService.CreateLbRouteExtension", + "service": { + "short_name": "DepService", + "full_name": "google.cloud.networkservices.v1.DepService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "networkservices_v1_generated_DepService_UpdateLbRouteExtension_sync", + "title": "Snippet for the update_lb_route_extension call in the DepService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::DepService::Client#update_lb_route_extension.", + "file": "dep_service/update_lb_route_extension.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_lb_route_extension", + "full_name": "::Google::Cloud::NetworkServices::V1::DepService::Client#update_lb_route_extension", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::NetworkServices::V1::UpdateLbRouteExtensionRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "DepService::Client", + "full_name": "::Google::Cloud::NetworkServices::V1::DepService::Client" + }, + "method": { + "short_name": "UpdateLbRouteExtension", + "full_name": "google.cloud.networkservices.v1.DepService.UpdateLbRouteExtension", + "service": { + "short_name": "DepService", + "full_name": "google.cloud.networkservices.v1.DepService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "networkservices_v1_generated_DepService_DeleteLbRouteExtension_sync", + "title": "Snippet for the delete_lb_route_extension call in the DepService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::DepService::Client#delete_lb_route_extension.", + "file": "dep_service/delete_lb_route_extension.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_lb_route_extension", + "full_name": "::Google::Cloud::NetworkServices::V1::DepService::Client#delete_lb_route_extension", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::NetworkServices::V1::DeleteLbRouteExtensionRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "DepService::Client", + "full_name": "::Google::Cloud::NetworkServices::V1::DepService::Client" + }, + "method": { + "short_name": "DeleteLbRouteExtension", + "full_name": "google.cloud.networkservices.v1.DepService.DeleteLbRouteExtension", + "service": { + "short_name": "DepService", + "full_name": "google.cloud.networkservices.v1.DepService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "networkservices_v1_generated_DepService_ListLbEdgeExtensions_sync", + "title": "Snippet for the list_lb_edge_extensions call in the DepService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::DepService::Client#list_lb_edge_extensions.", + "file": "dep_service/list_lb_edge_extensions.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_lb_edge_extensions", + "full_name": "::Google::Cloud::NetworkServices::V1::DepService::Client#list_lb_edge_extensions", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::NetworkServices::V1::ListLbEdgeExtensionsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::NetworkServices::V1::ListLbEdgeExtensionsResponse", + "client": { + "short_name": "DepService::Client", + "full_name": "::Google::Cloud::NetworkServices::V1::DepService::Client" + }, + "method": { + "short_name": "ListLbEdgeExtensions", + "full_name": "google.cloud.networkservices.v1.DepService.ListLbEdgeExtensions", + "service": { + "short_name": "DepService", + "full_name": "google.cloud.networkservices.v1.DepService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "networkservices_v1_generated_DepService_GetLbEdgeExtension_sync", + "title": "Snippet for the get_lb_edge_extension call in the DepService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::DepService::Client#get_lb_edge_extension.", + "file": "dep_service/get_lb_edge_extension.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_lb_edge_extension", + "full_name": "::Google::Cloud::NetworkServices::V1::DepService::Client#get_lb_edge_extension", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::NetworkServices::V1::GetLbEdgeExtensionRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::NetworkServices::V1::LbEdgeExtension", + "client": { + "short_name": "DepService::Client", + "full_name": "::Google::Cloud::NetworkServices::V1::DepService::Client" + }, + "method": { + "short_name": "GetLbEdgeExtension", + "full_name": "google.cloud.networkservices.v1.DepService.GetLbEdgeExtension", + "service": { + "short_name": "DepService", + "full_name": "google.cloud.networkservices.v1.DepService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "networkservices_v1_generated_DepService_CreateLbEdgeExtension_sync", + "title": "Snippet for the create_lb_edge_extension call in the DepService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::DepService::Client#create_lb_edge_extension.", + "file": "dep_service/create_lb_edge_extension.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_lb_edge_extension", + "full_name": "::Google::Cloud::NetworkServices::V1::DepService::Client#create_lb_edge_extension", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::NetworkServices::V1::CreateLbEdgeExtensionRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "DepService::Client", + "full_name": "::Google::Cloud::NetworkServices::V1::DepService::Client" + }, + "method": { + "short_name": "CreateLbEdgeExtension", + "full_name": "google.cloud.networkservices.v1.DepService.CreateLbEdgeExtension", + "service": { + "short_name": "DepService", + "full_name": "google.cloud.networkservices.v1.DepService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "networkservices_v1_generated_DepService_UpdateLbEdgeExtension_sync", + "title": "Snippet for the update_lb_edge_extension call in the DepService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::DepService::Client#update_lb_edge_extension.", + "file": "dep_service/update_lb_edge_extension.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_lb_edge_extension", + "full_name": "::Google::Cloud::NetworkServices::V1::DepService::Client#update_lb_edge_extension", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::NetworkServices::V1::UpdateLbEdgeExtensionRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "DepService::Client", + "full_name": "::Google::Cloud::NetworkServices::V1::DepService::Client" + }, + "method": { + "short_name": "UpdateLbEdgeExtension", + "full_name": "google.cloud.networkservices.v1.DepService.UpdateLbEdgeExtension", + "service": { + "short_name": "DepService", + "full_name": "google.cloud.networkservices.v1.DepService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "networkservices_v1_generated_DepService_DeleteLbEdgeExtension_sync", + "title": "Snippet for the delete_lb_edge_extension call in the DepService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::DepService::Client#delete_lb_edge_extension.", + "file": "dep_service/delete_lb_edge_extension.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_lb_edge_extension", + "full_name": "::Google::Cloud::NetworkServices::V1::DepService::Client#delete_lb_edge_extension", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::NetworkServices::V1::DeleteLbEdgeExtensionRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "DepService::Client", + "full_name": "::Google::Cloud::NetworkServices::V1::DepService::Client" + }, + "method": { + "short_name": "DeleteLbEdgeExtension", + "full_name": "google.cloud.networkservices.v1.DepService.DeleteLbEdgeExtension", + "service": { + "short_name": "DepService", + "full_name": "google.cloud.networkservices.v1.DepService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "networkservices_v1_generated_DepService_ListAuthzExtensions_sync", + "title": "Snippet for the list_authz_extensions call in the DepService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::DepService::Client#list_authz_extensions.", + "file": "dep_service/list_authz_extensions.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_authz_extensions", + "full_name": "::Google::Cloud::NetworkServices::V1::DepService::Client#list_authz_extensions", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::NetworkServices::V1::ListAuthzExtensionsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::NetworkServices::V1::ListAuthzExtensionsResponse", + "client": { + "short_name": "DepService::Client", + "full_name": "::Google::Cloud::NetworkServices::V1::DepService::Client" + }, + "method": { + "short_name": "ListAuthzExtensions", + "full_name": "google.cloud.networkservices.v1.DepService.ListAuthzExtensions", + "service": { + "short_name": "DepService", + "full_name": "google.cloud.networkservices.v1.DepService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "networkservices_v1_generated_DepService_GetAuthzExtension_sync", + "title": "Snippet for the get_authz_extension call in the DepService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::DepService::Client#get_authz_extension.", + "file": "dep_service/get_authz_extension.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_authz_extension", + "full_name": "::Google::Cloud::NetworkServices::V1::DepService::Client#get_authz_extension", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::NetworkServices::V1::GetAuthzExtensionRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::NetworkServices::V1::AuthzExtension", + "client": { + "short_name": "DepService::Client", + "full_name": "::Google::Cloud::NetworkServices::V1::DepService::Client" + }, + "method": { + "short_name": "GetAuthzExtension", + "full_name": "google.cloud.networkservices.v1.DepService.GetAuthzExtension", + "service": { + "short_name": "DepService", + "full_name": "google.cloud.networkservices.v1.DepService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "networkservices_v1_generated_DepService_CreateAuthzExtension_sync", + "title": "Snippet for the create_authz_extension call in the DepService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::DepService::Client#create_authz_extension.", + "file": "dep_service/create_authz_extension.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_authz_extension", + "full_name": "::Google::Cloud::NetworkServices::V1::DepService::Client#create_authz_extension", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::NetworkServices::V1::CreateAuthzExtensionRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "DepService::Client", + "full_name": "::Google::Cloud::NetworkServices::V1::DepService::Client" + }, + "method": { + "short_name": "CreateAuthzExtension", + "full_name": "google.cloud.networkservices.v1.DepService.CreateAuthzExtension", + "service": { + "short_name": "DepService", + "full_name": "google.cloud.networkservices.v1.DepService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "networkservices_v1_generated_DepService_UpdateAuthzExtension_sync", + "title": "Snippet for the update_authz_extension call in the DepService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::DepService::Client#update_authz_extension.", + "file": "dep_service/update_authz_extension.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_authz_extension", + "full_name": "::Google::Cloud::NetworkServices::V1::DepService::Client#update_authz_extension", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::NetworkServices::V1::UpdateAuthzExtensionRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "DepService::Client", + "full_name": "::Google::Cloud::NetworkServices::V1::DepService::Client" + }, + "method": { + "short_name": "UpdateAuthzExtension", + "full_name": "google.cloud.networkservices.v1.DepService.UpdateAuthzExtension", + "service": { + "short_name": "DepService", + "full_name": "google.cloud.networkservices.v1.DepService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "networkservices_v1_generated_DepService_DeleteAuthzExtension_sync", + "title": "Snippet for the delete_authz_extension call in the DepService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::DepService::Client#delete_authz_extension.", + "file": "dep_service/delete_authz_extension.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_authz_extension", + "full_name": "::Google::Cloud::NetworkServices::V1::DepService::Client#delete_authz_extension", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::NetworkServices::V1::DeleteAuthzExtensionRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "DepService::Client", + "full_name": "::Google::Cloud::NetworkServices::V1::DepService::Client" + }, + "method": { + "short_name": "DeleteAuthzExtension", + "full_name": "google.cloud.networkservices.v1.DepService.DeleteAuthzExtension", + "service": { + "short_name": "DepService", + "full_name": "google.cloud.networkservices.v1.DepService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "networkservices_v1_generated_NetworkServices_ListEndpointPolicies_sync", + "title": "Snippet for the list_endpoint_policies call in the NetworkServices service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#list_endpoint_policies.", + "file": "network_services/list_endpoint_policies.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_endpoint_policies", + "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#list_endpoint_policies", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::NetworkServices::V1::ListEndpointPoliciesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::NetworkServices::V1::ListEndpointPoliciesResponse", + "client": { + "short_name": "NetworkServices::Client", + "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" + }, + "method": { + "short_name": "ListEndpointPolicies", + "full_name": "google.cloud.networkservices.v1.NetworkServices.ListEndpointPolicies", + "service": { + "short_name": "NetworkServices", + "full_name": "google.cloud.networkservices.v1.NetworkServices" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "networkservices_v1_generated_NetworkServices_GetEndpointPolicy_sync", + "title": "Snippet for the get_endpoint_policy call in the NetworkServices service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#get_endpoint_policy.", + "file": "network_services/get_endpoint_policy.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_endpoint_policy", + "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#get_endpoint_policy", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::NetworkServices::V1::GetEndpointPolicyRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::NetworkServices::V1::EndpointPolicy", + "client": { + "short_name": "NetworkServices::Client", + "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" + }, + "method": { + "short_name": "GetEndpointPolicy", + "full_name": "google.cloud.networkservices.v1.NetworkServices.GetEndpointPolicy", + "service": { + "short_name": "NetworkServices", + "full_name": "google.cloud.networkservices.v1.NetworkServices" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "networkservices_v1_generated_NetworkServices_CreateEndpointPolicy_sync", + "title": "Snippet for the create_endpoint_policy call in the NetworkServices service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#create_endpoint_policy.", + "file": "network_services/create_endpoint_policy.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_endpoint_policy", + "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#create_endpoint_policy", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::NetworkServices::V1::CreateEndpointPolicyRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "NetworkServices::Client", + "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" + }, + "method": { + "short_name": "CreateEndpointPolicy", + "full_name": "google.cloud.networkservices.v1.NetworkServices.CreateEndpointPolicy", + "service": { + "short_name": "NetworkServices", + "full_name": "google.cloud.networkservices.v1.NetworkServices" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "networkservices_v1_generated_NetworkServices_UpdateEndpointPolicy_sync", + "title": "Snippet for the update_endpoint_policy call in the NetworkServices service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#update_endpoint_policy.", + "file": "network_services/update_endpoint_policy.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_endpoint_policy", + "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#update_endpoint_policy", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::NetworkServices::V1::UpdateEndpointPolicyRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "NetworkServices::Client", + "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" + }, + "method": { + "short_name": "UpdateEndpointPolicy", + "full_name": "google.cloud.networkservices.v1.NetworkServices.UpdateEndpointPolicy", + "service": { + "short_name": "NetworkServices", + "full_name": "google.cloud.networkservices.v1.NetworkServices" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "networkservices_v1_generated_NetworkServices_DeleteEndpointPolicy_sync", + "title": "Snippet for the delete_endpoint_policy call in the NetworkServices service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#delete_endpoint_policy.", + "file": "network_services/delete_endpoint_policy.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_endpoint_policy", + "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#delete_endpoint_policy", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::NetworkServices::V1::DeleteEndpointPolicyRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "NetworkServices::Client", + "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" + }, + "method": { + "short_name": "DeleteEndpointPolicy", + "full_name": "google.cloud.networkservices.v1.NetworkServices.DeleteEndpointPolicy", + "service": { + "short_name": "NetworkServices", + "full_name": "google.cloud.networkservices.v1.NetworkServices" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "networkservices_v1_generated_NetworkServices_ListWasmPluginVersions_sync", + "title": "Snippet for the list_wasm_plugin_versions call in the NetworkServices service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#list_wasm_plugin_versions.", + "file": "network_services/list_wasm_plugin_versions.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_wasm_plugin_versions", + "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#list_wasm_plugin_versions", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::NetworkServices::V1::ListWasmPluginVersionsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::NetworkServices::V1::ListWasmPluginVersionsResponse", + "client": { + "short_name": "NetworkServices::Client", + "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" + }, + "method": { + "short_name": "ListWasmPluginVersions", + "full_name": "google.cloud.networkservices.v1.NetworkServices.ListWasmPluginVersions", + "service": { + "short_name": "NetworkServices", + "full_name": "google.cloud.networkservices.v1.NetworkServices" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "networkservices_v1_generated_NetworkServices_GetWasmPluginVersion_sync", + "title": "Snippet for the get_wasm_plugin_version call in the NetworkServices service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#get_wasm_plugin_version.", + "file": "network_services/get_wasm_plugin_version.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_wasm_plugin_version", + "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#get_wasm_plugin_version", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::NetworkServices::V1::GetWasmPluginVersionRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::NetworkServices::V1::WasmPluginVersion", + "client": { + "short_name": "NetworkServices::Client", + "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" + }, + "method": { + "short_name": "GetWasmPluginVersion", + "full_name": "google.cloud.networkservices.v1.NetworkServices.GetWasmPluginVersion", + "service": { + "short_name": "NetworkServices", + "full_name": "google.cloud.networkservices.v1.NetworkServices" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "networkservices_v1_generated_NetworkServices_CreateWasmPluginVersion_sync", + "title": "Snippet for the create_wasm_plugin_version call in the NetworkServices service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#create_wasm_plugin_version.", + "file": "network_services/create_wasm_plugin_version.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_wasm_plugin_version", + "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#create_wasm_plugin_version", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::NetworkServices::V1::CreateWasmPluginVersionRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "NetworkServices::Client", + "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" + }, + "method": { + "short_name": "CreateWasmPluginVersion", + "full_name": "google.cloud.networkservices.v1.NetworkServices.CreateWasmPluginVersion", + "service": { + "short_name": "NetworkServices", + "full_name": "google.cloud.networkservices.v1.NetworkServices" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "networkservices_v1_generated_NetworkServices_DeleteWasmPluginVersion_sync", + "title": "Snippet for the delete_wasm_plugin_version call in the NetworkServices service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#delete_wasm_plugin_version.", + "file": "network_services/delete_wasm_plugin_version.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_wasm_plugin_version", + "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#delete_wasm_plugin_version", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::NetworkServices::V1::DeleteWasmPluginVersionRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "NetworkServices::Client", + "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" + }, + "method": { + "short_name": "DeleteWasmPluginVersion", + "full_name": "google.cloud.networkservices.v1.NetworkServices.DeleteWasmPluginVersion", + "service": { + "short_name": "NetworkServices", + "full_name": "google.cloud.networkservices.v1.NetworkServices" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "networkservices_v1_generated_NetworkServices_ListWasmPlugins_sync", + "title": "Snippet for the list_wasm_plugins call in the NetworkServices service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#list_wasm_plugins.", + "file": "network_services/list_wasm_plugins.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_wasm_plugins", + "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#list_wasm_plugins", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::NetworkServices::V1::ListWasmPluginsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::NetworkServices::V1::ListWasmPluginsResponse", + "client": { + "short_name": "NetworkServices::Client", + "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" + }, + "method": { + "short_name": "ListWasmPlugins", + "full_name": "google.cloud.networkservices.v1.NetworkServices.ListWasmPlugins", + "service": { + "short_name": "NetworkServices", + "full_name": "google.cloud.networkservices.v1.NetworkServices" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "networkservices_v1_generated_NetworkServices_GetWasmPlugin_sync", + "title": "Snippet for the get_wasm_plugin call in the NetworkServices service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#get_wasm_plugin.", + "file": "network_services/get_wasm_plugin.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_wasm_plugin", + "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#get_wasm_plugin", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::NetworkServices::V1::GetWasmPluginRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::NetworkServices::V1::WasmPlugin", + "client": { + "short_name": "NetworkServices::Client", + "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" + }, + "method": { + "short_name": "GetWasmPlugin", + "full_name": "google.cloud.networkservices.v1.NetworkServices.GetWasmPlugin", + "service": { + "short_name": "NetworkServices", + "full_name": "google.cloud.networkservices.v1.NetworkServices" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "networkservices_v1_generated_NetworkServices_CreateWasmPlugin_sync", + "title": "Snippet for the create_wasm_plugin call in the NetworkServices service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#create_wasm_plugin.", + "file": "network_services/create_wasm_plugin.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_wasm_plugin", + "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#create_wasm_plugin", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::NetworkServices::V1::CreateWasmPluginRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "NetworkServices::Client", + "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" + }, + "method": { + "short_name": "CreateWasmPlugin", + "full_name": "google.cloud.networkservices.v1.NetworkServices.CreateWasmPlugin", + "service": { + "short_name": "NetworkServices", + "full_name": "google.cloud.networkservices.v1.NetworkServices" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "networkservices_v1_generated_NetworkServices_UpdateWasmPlugin_sync", + "title": "Snippet for the update_wasm_plugin call in the NetworkServices service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#update_wasm_plugin.", + "file": "network_services/update_wasm_plugin.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_wasm_plugin", + "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#update_wasm_plugin", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::NetworkServices::V1::UpdateWasmPluginRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "NetworkServices::Client", + "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" + }, + "method": { + "short_name": "UpdateWasmPlugin", + "full_name": "google.cloud.networkservices.v1.NetworkServices.UpdateWasmPlugin", + "service": { + "short_name": "NetworkServices", + "full_name": "google.cloud.networkservices.v1.NetworkServices" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "networkservices_v1_generated_NetworkServices_DeleteWasmPlugin_sync", + "title": "Snippet for the delete_wasm_plugin call in the NetworkServices service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#delete_wasm_plugin.", + "file": "network_services/delete_wasm_plugin.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_wasm_plugin", + "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#delete_wasm_plugin", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::NetworkServices::V1::DeleteWasmPluginRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "NetworkServices::Client", + "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" + }, + "method": { + "short_name": "DeleteWasmPlugin", + "full_name": "google.cloud.networkservices.v1.NetworkServices.DeleteWasmPlugin", + "service": { + "short_name": "NetworkServices", + "full_name": "google.cloud.networkservices.v1.NetworkServices" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "networkservices_v1_generated_NetworkServices_ListGateways_sync", + "title": "Snippet for the list_gateways call in the NetworkServices service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#list_gateways.", + "file": "network_services/list_gateways.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_gateways", + "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#list_gateways", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::NetworkServices::V1::ListGatewaysRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::NetworkServices::V1::ListGatewaysResponse", + "client": { + "short_name": "NetworkServices::Client", + "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" + }, + "method": { + "short_name": "ListGateways", + "full_name": "google.cloud.networkservices.v1.NetworkServices.ListGateways", + "service": { + "short_name": "NetworkServices", + "full_name": "google.cloud.networkservices.v1.NetworkServices" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "networkservices_v1_generated_NetworkServices_GetGateway_sync", + "title": "Snippet for the get_gateway call in the NetworkServices service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#get_gateway.", + "file": "network_services/get_gateway.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_gateway", + "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#get_gateway", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::NetworkServices::V1::GetGatewayRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::NetworkServices::V1::Gateway", + "client": { + "short_name": "NetworkServices::Client", + "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" + }, + "method": { + "short_name": "GetGateway", + "full_name": "google.cloud.networkservices.v1.NetworkServices.GetGateway", + "service": { + "short_name": "NetworkServices", + "full_name": "google.cloud.networkservices.v1.NetworkServices" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "networkservices_v1_generated_NetworkServices_CreateGateway_sync", + "title": "Snippet for the create_gateway call in the NetworkServices service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#create_gateway.", + "file": "network_services/create_gateway.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_gateway", + "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#create_gateway", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::NetworkServices::V1::CreateGatewayRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "NetworkServices::Client", + "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" + }, + "method": { + "short_name": "CreateGateway", + "full_name": "google.cloud.networkservices.v1.NetworkServices.CreateGateway", + "service": { + "short_name": "NetworkServices", + "full_name": "google.cloud.networkservices.v1.NetworkServices" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "networkservices_v1_generated_NetworkServices_UpdateGateway_sync", + "title": "Snippet for the update_gateway call in the NetworkServices service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#update_gateway.", + "file": "network_services/update_gateway.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_gateway", + "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#update_gateway", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::NetworkServices::V1::UpdateGatewayRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "NetworkServices::Client", + "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" + }, + "method": { + "short_name": "UpdateGateway", + "full_name": "google.cloud.networkservices.v1.NetworkServices.UpdateGateway", + "service": { + "short_name": "NetworkServices", + "full_name": "google.cloud.networkservices.v1.NetworkServices" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "networkservices_v1_generated_NetworkServices_DeleteGateway_sync", + "title": "Snippet for the delete_gateway call in the NetworkServices service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#delete_gateway.", + "file": "network_services/delete_gateway.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_gateway", + "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#delete_gateway", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::NetworkServices::V1::DeleteGatewayRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "NetworkServices::Client", + "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" + }, + "method": { + "short_name": "DeleteGateway", + "full_name": "google.cloud.networkservices.v1.NetworkServices.DeleteGateway", + "service": { + "short_name": "NetworkServices", + "full_name": "google.cloud.networkservices.v1.NetworkServices" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "networkservices_v1_generated_NetworkServices_ListGrpcRoutes_sync", + "title": "Snippet for the list_grpc_routes call in the NetworkServices service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#list_grpc_routes.", + "file": "network_services/list_grpc_routes.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_grpc_routes", + "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#list_grpc_routes", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::NetworkServices::V1::ListGrpcRoutesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::NetworkServices::V1::ListGrpcRoutesResponse", + "client": { + "short_name": "NetworkServices::Client", + "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" + }, + "method": { + "short_name": "ListGrpcRoutes", + "full_name": "google.cloud.networkservices.v1.NetworkServices.ListGrpcRoutes", + "service": { + "short_name": "NetworkServices", + "full_name": "google.cloud.networkservices.v1.NetworkServices" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "networkservices_v1_generated_NetworkServices_GetGrpcRoute_sync", + "title": "Snippet for the get_grpc_route call in the NetworkServices service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#get_grpc_route.", + "file": "network_services/get_grpc_route.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_grpc_route", + "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#get_grpc_route", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::NetworkServices::V1::GetGrpcRouteRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::NetworkServices::V1::GrpcRoute", + "client": { + "short_name": "NetworkServices::Client", + "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" + }, + "method": { + "short_name": "GetGrpcRoute", + "full_name": "google.cloud.networkservices.v1.NetworkServices.GetGrpcRoute", + "service": { + "short_name": "NetworkServices", + "full_name": "google.cloud.networkservices.v1.NetworkServices" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "networkservices_v1_generated_NetworkServices_CreateGrpcRoute_sync", + "title": "Snippet for the create_grpc_route call in the NetworkServices service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#create_grpc_route.", + "file": "network_services/create_grpc_route.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_grpc_route", + "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#create_grpc_route", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::NetworkServices::V1::CreateGrpcRouteRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "NetworkServices::Client", + "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" + }, + "method": { + "short_name": "CreateGrpcRoute", + "full_name": "google.cloud.networkservices.v1.NetworkServices.CreateGrpcRoute", + "service": { + "short_name": "NetworkServices", + "full_name": "google.cloud.networkservices.v1.NetworkServices" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "networkservices_v1_generated_NetworkServices_UpdateGrpcRoute_sync", + "title": "Snippet for the update_grpc_route call in the NetworkServices service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#update_grpc_route.", + "file": "network_services/update_grpc_route.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_grpc_route", + "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#update_grpc_route", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::NetworkServices::V1::UpdateGrpcRouteRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "NetworkServices::Client", + "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" + }, + "method": { + "short_name": "UpdateGrpcRoute", + "full_name": "google.cloud.networkservices.v1.NetworkServices.UpdateGrpcRoute", + "service": { + "short_name": "NetworkServices", + "full_name": "google.cloud.networkservices.v1.NetworkServices" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "networkservices_v1_generated_NetworkServices_DeleteGrpcRoute_sync", + "title": "Snippet for the delete_grpc_route call in the NetworkServices service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#delete_grpc_route.", + "file": "network_services/delete_grpc_route.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_grpc_route", + "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#delete_grpc_route", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::NetworkServices::V1::DeleteGrpcRouteRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "NetworkServices::Client", + "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" + }, + "method": { + "short_name": "DeleteGrpcRoute", + "full_name": "google.cloud.networkservices.v1.NetworkServices.DeleteGrpcRoute", + "service": { + "short_name": "NetworkServices", + "full_name": "google.cloud.networkservices.v1.NetworkServices" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "networkservices_v1_generated_NetworkServices_ListHttpRoutes_sync", + "title": "Snippet for the list_http_routes call in the NetworkServices service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#list_http_routes.", + "file": "network_services/list_http_routes.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_http_routes", + "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#list_http_routes", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::NetworkServices::V1::ListHttpRoutesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::NetworkServices::V1::ListHttpRoutesResponse", + "client": { + "short_name": "NetworkServices::Client", + "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" + }, + "method": { + "short_name": "ListHttpRoutes", + "full_name": "google.cloud.networkservices.v1.NetworkServices.ListHttpRoutes", + "service": { + "short_name": "NetworkServices", + "full_name": "google.cloud.networkservices.v1.NetworkServices" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "networkservices_v1_generated_NetworkServices_GetHttpRoute_sync", + "title": "Snippet for the get_http_route call in the NetworkServices service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#get_http_route.", + "file": "network_services/get_http_route.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_http_route", + "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#get_http_route", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::NetworkServices::V1::GetHttpRouteRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::NetworkServices::V1::HttpRoute", + "client": { + "short_name": "NetworkServices::Client", + "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" + }, + "method": { + "short_name": "GetHttpRoute", + "full_name": "google.cloud.networkservices.v1.NetworkServices.GetHttpRoute", + "service": { + "short_name": "NetworkServices", + "full_name": "google.cloud.networkservices.v1.NetworkServices" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "networkservices_v1_generated_NetworkServices_CreateHttpRoute_sync", + "title": "Snippet for the create_http_route call in the NetworkServices service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#create_http_route.", + "file": "network_services/create_http_route.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_http_route", + "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#create_http_route", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::NetworkServices::V1::CreateHttpRouteRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "NetworkServices::Client", + "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" + }, + "method": { + "short_name": "CreateHttpRoute", + "full_name": "google.cloud.networkservices.v1.NetworkServices.CreateHttpRoute", + "service": { + "short_name": "NetworkServices", + "full_name": "google.cloud.networkservices.v1.NetworkServices" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "networkservices_v1_generated_NetworkServices_UpdateHttpRoute_sync", + "title": "Snippet for the update_http_route call in the NetworkServices service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#update_http_route.", + "file": "network_services/update_http_route.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_http_route", + "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#update_http_route", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::NetworkServices::V1::UpdateHttpRouteRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "NetworkServices::Client", + "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" + }, + "method": { + "short_name": "UpdateHttpRoute", + "full_name": "google.cloud.networkservices.v1.NetworkServices.UpdateHttpRoute", + "service": { + "short_name": "NetworkServices", + "full_name": "google.cloud.networkservices.v1.NetworkServices" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "networkservices_v1_generated_NetworkServices_DeleteHttpRoute_sync", + "title": "Snippet for the delete_http_route call in the NetworkServices service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#delete_http_route.", + "file": "network_services/delete_http_route.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_http_route", + "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#delete_http_route", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::NetworkServices::V1::DeleteHttpRouteRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "NetworkServices::Client", + "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" + }, + "method": { + "short_name": "DeleteHttpRoute", + "full_name": "google.cloud.networkservices.v1.NetworkServices.DeleteHttpRoute", + "service": { + "short_name": "NetworkServices", + "full_name": "google.cloud.networkservices.v1.NetworkServices" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "networkservices_v1_generated_NetworkServices_ListTcpRoutes_sync", + "title": "Snippet for the list_tcp_routes call in the NetworkServices service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#list_tcp_routes.", + "file": "network_services/list_tcp_routes.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_tcp_routes", + "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#list_tcp_routes", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::NetworkServices::V1::ListTcpRoutesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::NetworkServices::V1::ListTcpRoutesResponse", + "client": { + "short_name": "NetworkServices::Client", + "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" + }, + "method": { + "short_name": "ListTcpRoutes", + "full_name": "google.cloud.networkservices.v1.NetworkServices.ListTcpRoutes", + "service": { + "short_name": "NetworkServices", + "full_name": "google.cloud.networkservices.v1.NetworkServices" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "networkservices_v1_generated_NetworkServices_GetTcpRoute_sync", + "title": "Snippet for the get_tcp_route call in the NetworkServices service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#get_tcp_route.", + "file": "network_services/get_tcp_route.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_tcp_route", + "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#get_tcp_route", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::NetworkServices::V1::GetTcpRouteRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::NetworkServices::V1::TcpRoute", + "client": { + "short_name": "NetworkServices::Client", + "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" + }, + "method": { + "short_name": "GetTcpRoute", + "full_name": "google.cloud.networkservices.v1.NetworkServices.GetTcpRoute", + "service": { + "short_name": "NetworkServices", + "full_name": "google.cloud.networkservices.v1.NetworkServices" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "networkservices_v1_generated_NetworkServices_CreateTcpRoute_sync", + "title": "Snippet for the create_tcp_route call in the NetworkServices service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#create_tcp_route.", + "file": "network_services/create_tcp_route.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_tcp_route", + "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#create_tcp_route", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::NetworkServices::V1::CreateTcpRouteRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "NetworkServices::Client", + "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" + }, + "method": { + "short_name": "CreateTcpRoute", + "full_name": "google.cloud.networkservices.v1.NetworkServices.CreateTcpRoute", + "service": { + "short_name": "NetworkServices", + "full_name": "google.cloud.networkservices.v1.NetworkServices" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "networkservices_v1_generated_NetworkServices_UpdateTcpRoute_sync", + "title": "Snippet for the update_tcp_route call in the NetworkServices service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#update_tcp_route.", + "file": "network_services/update_tcp_route.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_tcp_route", + "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#update_tcp_route", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::NetworkServices::V1::UpdateTcpRouteRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "NetworkServices::Client", + "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" + }, + "method": { + "short_name": "UpdateTcpRoute", + "full_name": "google.cloud.networkservices.v1.NetworkServices.UpdateTcpRoute", + "service": { + "short_name": "NetworkServices", + "full_name": "google.cloud.networkservices.v1.NetworkServices" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "networkservices_v1_generated_NetworkServices_DeleteTcpRoute_sync", + "title": "Snippet for the delete_tcp_route call in the NetworkServices service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#delete_tcp_route.", + "file": "network_services/delete_tcp_route.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_tcp_route", + "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#delete_tcp_route", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::NetworkServices::V1::DeleteTcpRouteRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "NetworkServices::Client", + "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" + }, + "method": { + "short_name": "DeleteTcpRoute", + "full_name": "google.cloud.networkservices.v1.NetworkServices.DeleteTcpRoute", + "service": { + "short_name": "NetworkServices", + "full_name": "google.cloud.networkservices.v1.NetworkServices" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "networkservices_v1_generated_NetworkServices_ListTlsRoutes_sync", + "title": "Snippet for the list_tls_routes call in the NetworkServices service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#list_tls_routes.", + "file": "network_services/list_tls_routes.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_tls_routes", + "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#list_tls_routes", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::NetworkServices::V1::ListTlsRoutesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::NetworkServices::V1::ListTlsRoutesResponse", + "client": { + "short_name": "NetworkServices::Client", + "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" + }, + "method": { + "short_name": "ListTlsRoutes", + "full_name": "google.cloud.networkservices.v1.NetworkServices.ListTlsRoutes", + "service": { + "short_name": "NetworkServices", + "full_name": "google.cloud.networkservices.v1.NetworkServices" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "networkservices_v1_generated_NetworkServices_GetTlsRoute_sync", + "title": "Snippet for the get_tls_route call in the NetworkServices service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#get_tls_route.", + "file": "network_services/get_tls_route.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_tls_route", + "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#get_tls_route", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::NetworkServices::V1::GetTlsRouteRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::NetworkServices::V1::TlsRoute", + "client": { + "short_name": "NetworkServices::Client", + "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" + }, + "method": { + "short_name": "GetTlsRoute", + "full_name": "google.cloud.networkservices.v1.NetworkServices.GetTlsRoute", + "service": { + "short_name": "NetworkServices", + "full_name": "google.cloud.networkservices.v1.NetworkServices" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "networkservices_v1_generated_NetworkServices_CreateTlsRoute_sync", + "title": "Snippet for the create_tls_route call in the NetworkServices service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#create_tls_route.", + "file": "network_services/create_tls_route.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_tls_route", + "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#create_tls_route", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::NetworkServices::V1::CreateTlsRouteRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "NetworkServices::Client", + "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" + }, + "method": { + "short_name": "CreateTlsRoute", + "full_name": "google.cloud.networkservices.v1.NetworkServices.CreateTlsRoute", + "service": { + "short_name": "NetworkServices", + "full_name": "google.cloud.networkservices.v1.NetworkServices" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "networkservices_v1_generated_NetworkServices_UpdateTlsRoute_sync", + "title": "Snippet for the update_tls_route call in the NetworkServices service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#update_tls_route.", + "file": "network_services/update_tls_route.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_tls_route", + "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#update_tls_route", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::NetworkServices::V1::UpdateTlsRouteRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "NetworkServices::Client", + "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" + }, + "method": { + "short_name": "UpdateTlsRoute", + "full_name": "google.cloud.networkservices.v1.NetworkServices.UpdateTlsRoute", + "service": { + "short_name": "NetworkServices", + "full_name": "google.cloud.networkservices.v1.NetworkServices" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "networkservices_v1_generated_NetworkServices_DeleteTlsRoute_sync", + "title": "Snippet for the delete_tls_route call in the NetworkServices service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#delete_tls_route.", + "file": "network_services/delete_tls_route.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_tls_route", + "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#delete_tls_route", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::NetworkServices::V1::DeleteTlsRouteRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "NetworkServices::Client", + "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" + }, + "method": { + "short_name": "DeleteTlsRoute", + "full_name": "google.cloud.networkservices.v1.NetworkServices.DeleteTlsRoute", + "service": { + "short_name": "NetworkServices", + "full_name": "google.cloud.networkservices.v1.NetworkServices" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "networkservices_v1_generated_NetworkServices_ListServiceBindings_sync", + "title": "Snippet for the list_service_bindings call in the NetworkServices service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#list_service_bindings.", + "file": "network_services/list_service_bindings.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_service_bindings", + "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#list_service_bindings", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::NetworkServices::V1::ListServiceBindingsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::NetworkServices::V1::ListServiceBindingsResponse", + "client": { + "short_name": "NetworkServices::Client", + "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" + }, + "method": { + "short_name": "ListServiceBindings", + "full_name": "google.cloud.networkservices.v1.NetworkServices.ListServiceBindings", + "service": { + "short_name": "NetworkServices", + "full_name": "google.cloud.networkservices.v1.NetworkServices" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "networkservices_v1_generated_NetworkServices_GetServiceBinding_sync", + "title": "Snippet for the get_service_binding call in the NetworkServices service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#get_service_binding.", + "file": "network_services/get_service_binding.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_service_binding", + "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#get_service_binding", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::NetworkServices::V1::GetServiceBindingRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::NetworkServices::V1::ServiceBinding", + "client": { + "short_name": "NetworkServices::Client", + "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" + }, + "method": { + "short_name": "GetServiceBinding", + "full_name": "google.cloud.networkservices.v1.NetworkServices.GetServiceBinding", + "service": { + "short_name": "NetworkServices", + "full_name": "google.cloud.networkservices.v1.NetworkServices" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "networkservices_v1_generated_NetworkServices_CreateServiceBinding_sync", + "title": "Snippet for the create_service_binding call in the NetworkServices service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#create_service_binding.", + "file": "network_services/create_service_binding.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_service_binding", + "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#create_service_binding", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::NetworkServices::V1::CreateServiceBindingRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "NetworkServices::Client", + "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" + }, + "method": { + "short_name": "CreateServiceBinding", + "full_name": "google.cloud.networkservices.v1.NetworkServices.CreateServiceBinding", + "service": { + "short_name": "NetworkServices", + "full_name": "google.cloud.networkservices.v1.NetworkServices" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "networkservices_v1_generated_NetworkServices_UpdateServiceBinding_sync", + "title": "Snippet for the update_service_binding call in the NetworkServices service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#update_service_binding.", + "file": "network_services/update_service_binding.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_service_binding", + "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#update_service_binding", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::NetworkServices::V1::UpdateServiceBindingRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "NetworkServices::Client", + "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" + }, + "method": { + "short_name": "UpdateServiceBinding", + "full_name": "google.cloud.networkservices.v1.NetworkServices.UpdateServiceBinding", + "service": { + "short_name": "NetworkServices", + "full_name": "google.cloud.networkservices.v1.NetworkServices" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "networkservices_v1_generated_NetworkServices_DeleteServiceBinding_sync", + "title": "Snippet for the delete_service_binding call in the NetworkServices service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#delete_service_binding.", + "file": "network_services/delete_service_binding.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_service_binding", + "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#delete_service_binding", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::NetworkServices::V1::DeleteServiceBindingRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "NetworkServices::Client", + "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" + }, + "method": { + "short_name": "DeleteServiceBinding", + "full_name": "google.cloud.networkservices.v1.NetworkServices.DeleteServiceBinding", + "service": { + "short_name": "NetworkServices", + "full_name": "google.cloud.networkservices.v1.NetworkServices" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "networkservices_v1_generated_NetworkServices_ListMeshes_sync", + "title": "Snippet for the list_meshes call in the NetworkServices service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#list_meshes.", + "file": "network_services/list_meshes.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_meshes", + "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#list_meshes", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::NetworkServices::V1::ListMeshesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::NetworkServices::V1::ListMeshesResponse", + "client": { + "short_name": "NetworkServices::Client", + "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" + }, + "method": { + "short_name": "ListMeshes", + "full_name": "google.cloud.networkservices.v1.NetworkServices.ListMeshes", + "service": { + "short_name": "NetworkServices", + "full_name": "google.cloud.networkservices.v1.NetworkServices" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "networkservices_v1_generated_NetworkServices_GetMesh_sync", + "title": "Snippet for the get_mesh call in the NetworkServices service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#get_mesh.", + "file": "network_services/get_mesh.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_mesh", + "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#get_mesh", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::NetworkServices::V1::GetMeshRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::NetworkServices::V1::Mesh", + "client": { + "short_name": "NetworkServices::Client", + "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" + }, + "method": { + "short_name": "GetMesh", + "full_name": "google.cloud.networkservices.v1.NetworkServices.GetMesh", + "service": { + "short_name": "NetworkServices", + "full_name": "google.cloud.networkservices.v1.NetworkServices" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "networkservices_v1_generated_NetworkServices_CreateMesh_sync", + "title": "Snippet for the create_mesh call in the NetworkServices service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#create_mesh.", + "file": "network_services/create_mesh.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_mesh", + "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#create_mesh", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::NetworkServices::V1::CreateMeshRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "NetworkServices::Client", + "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" + }, + "method": { + "short_name": "CreateMesh", + "full_name": "google.cloud.networkservices.v1.NetworkServices.CreateMesh", + "service": { + "short_name": "NetworkServices", + "full_name": "google.cloud.networkservices.v1.NetworkServices" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "networkservices_v1_generated_NetworkServices_UpdateMesh_sync", + "title": "Snippet for the update_mesh call in the NetworkServices service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#update_mesh.", + "file": "network_services/update_mesh.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_mesh", + "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#update_mesh", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::NetworkServices::V1::UpdateMeshRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "NetworkServices::Client", + "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" + }, + "method": { + "short_name": "UpdateMesh", + "full_name": "google.cloud.networkservices.v1.NetworkServices.UpdateMesh", + "service": { + "short_name": "NetworkServices", + "full_name": "google.cloud.networkservices.v1.NetworkServices" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "networkservices_v1_generated_NetworkServices_DeleteMesh_sync", + "title": "Snippet for the delete_mesh call in the NetworkServices service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#delete_mesh.", + "file": "network_services/delete_mesh.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_mesh", + "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#delete_mesh", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::NetworkServices::V1::DeleteMeshRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "NetworkServices::Client", + "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" + }, + "method": { + "short_name": "DeleteMesh", + "full_name": "google.cloud.networkservices.v1.NetworkServices.DeleteMesh", + "service": { + "short_name": "NetworkServices", + "full_name": "google.cloud.networkservices.v1.NetworkServices" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "networkservices_v1_generated_NetworkServices_ListServiceLbPolicies_sync", + "title": "Snippet for the list_service_lb_policies call in the NetworkServices service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#list_service_lb_policies.", + "file": "network_services/list_service_lb_policies.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_service_lb_policies", + "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#list_service_lb_policies", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::NetworkServices::V1::ListServiceLbPoliciesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::NetworkServices::V1::ListServiceLbPoliciesResponse", + "client": { + "short_name": "NetworkServices::Client", + "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" + }, + "method": { + "short_name": "ListServiceLbPolicies", + "full_name": "google.cloud.networkservices.v1.NetworkServices.ListServiceLbPolicies", + "service": { + "short_name": "NetworkServices", + "full_name": "google.cloud.networkservices.v1.NetworkServices" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "networkservices_v1_generated_NetworkServices_GetServiceLbPolicy_sync", + "title": "Snippet for the get_service_lb_policy call in the NetworkServices service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#get_service_lb_policy.", + "file": "network_services/get_service_lb_policy.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_service_lb_policy", + "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#get_service_lb_policy", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::NetworkServices::V1::GetServiceLbPolicyRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::NetworkServices::V1::ServiceLbPolicy", + "client": { + "short_name": "NetworkServices::Client", + "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" + }, + "method": { + "short_name": "GetServiceLbPolicy", + "full_name": "google.cloud.networkservices.v1.NetworkServices.GetServiceLbPolicy", + "service": { + "short_name": "NetworkServices", + "full_name": "google.cloud.networkservices.v1.NetworkServices" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "networkservices_v1_generated_NetworkServices_CreateServiceLbPolicy_sync", + "title": "Snippet for the create_service_lb_policy call in the NetworkServices service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#create_service_lb_policy.", + "file": "network_services/create_service_lb_policy.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_service_lb_policy", + "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#create_service_lb_policy", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::NetworkServices::V1::CreateServiceLbPolicyRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "NetworkServices::Client", + "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" + }, + "method": { + "short_name": "CreateServiceLbPolicy", + "full_name": "google.cloud.networkservices.v1.NetworkServices.CreateServiceLbPolicy", + "service": { + "short_name": "NetworkServices", + "full_name": "google.cloud.networkservices.v1.NetworkServices" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "networkservices_v1_generated_NetworkServices_UpdateServiceLbPolicy_sync", + "title": "Snippet for the update_service_lb_policy call in the NetworkServices service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#update_service_lb_policy.", + "file": "network_services/update_service_lb_policy.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_service_lb_policy", + "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#update_service_lb_policy", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::NetworkServices::V1::UpdateServiceLbPolicyRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "NetworkServices::Client", + "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" + }, + "method": { + "short_name": "UpdateServiceLbPolicy", + "full_name": "google.cloud.networkservices.v1.NetworkServices.UpdateServiceLbPolicy", + "service": { + "short_name": "NetworkServices", + "full_name": "google.cloud.networkservices.v1.NetworkServices" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "networkservices_v1_generated_NetworkServices_DeleteServiceLbPolicy_sync", + "title": "Snippet for the delete_service_lb_policy call in the NetworkServices service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#delete_service_lb_policy.", + "file": "network_services/delete_service_lb_policy.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_service_lb_policy", + "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#delete_service_lb_policy", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::NetworkServices::V1::DeleteServiceLbPolicyRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "NetworkServices::Client", + "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" + }, + "method": { + "short_name": "DeleteServiceLbPolicy", + "full_name": "google.cloud.networkservices.v1.NetworkServices.DeleteServiceLbPolicy", + "service": { + "short_name": "NetworkServices", + "full_name": "google.cloud.networkservices.v1.NetworkServices" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "networkservices_v1_generated_NetworkServices_GetGatewayRouteView_sync", + "title": "Snippet for the get_gateway_route_view call in the NetworkServices service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#get_gateway_route_view.", + "file": "network_services/get_gateway_route_view.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_gateway_route_view", + "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#get_gateway_route_view", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::NetworkServices::V1::GetGatewayRouteViewRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::NetworkServices::V1::GatewayRouteView", + "client": { + "short_name": "NetworkServices::Client", + "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" + }, + "method": { + "short_name": "GetGatewayRouteView", + "full_name": "google.cloud.networkservices.v1.NetworkServices.GetGatewayRouteView", + "service": { + "short_name": "NetworkServices", + "full_name": "google.cloud.networkservices.v1.NetworkServices" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "networkservices_v1_generated_NetworkServices_GetMeshRouteView_sync", + "title": "Snippet for the get_mesh_route_view call in the NetworkServices service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#get_mesh_route_view.", + "file": "network_services/get_mesh_route_view.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_mesh_route_view", + "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#get_mesh_route_view", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::NetworkServices::V1::GetMeshRouteViewRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::NetworkServices::V1::MeshRouteView", + "client": { + "short_name": "NetworkServices::Client", + "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" + }, + "method": { + "short_name": "GetMeshRouteView", + "full_name": "google.cloud.networkservices.v1.NetworkServices.GetMeshRouteView", + "service": { + "short_name": "NetworkServices", + "full_name": "google.cloud.networkservices.v1.NetworkServices" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "networkservices_v1_generated_NetworkServices_ListGatewayRouteViews_sync", + "title": "Snippet for the list_gateway_route_views call in the NetworkServices service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#list_gateway_route_views.", + "file": "network_services/list_gateway_route_views.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_gateway_route_views", + "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#list_gateway_route_views", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::NetworkServices::V1::ListGatewayRouteViewsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::NetworkServices::V1::ListGatewayRouteViewsResponse", + "client": { + "short_name": "NetworkServices::Client", + "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" + }, + "method": { + "short_name": "ListGatewayRouteViews", + "full_name": "google.cloud.networkservices.v1.NetworkServices.ListGatewayRouteViews", + "service": { + "short_name": "NetworkServices", + "full_name": "google.cloud.networkservices.v1.NetworkServices" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "networkservices_v1_generated_NetworkServices_ListMeshRouteViews_sync", + "title": "Snippet for the list_mesh_route_views call in the NetworkServices service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#list_mesh_route_views.", + "file": "network_services/list_mesh_route_views.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_mesh_route_views", + "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#list_mesh_route_views", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::NetworkServices::V1::ListMeshRouteViewsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::NetworkServices::V1::ListMeshRouteViewsResponse", + "client": { + "short_name": "NetworkServices::Client", + "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" + }, + "method": { + "short_name": "ListMeshRouteViews", + "full_name": "google.cloud.networkservices.v1.NetworkServices.ListMeshRouteViews", + "service": { + "short_name": "NetworkServices", + "full_name": "google.cloud.networkservices.v1.NetworkServices" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "networkservices_v1_generated_NetworkServices_ListAgentGateways_sync", + "title": "Snippet for the list_agent_gateways call in the NetworkServices service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#list_agent_gateways.", + "file": "network_services/list_agent_gateways.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_agent_gateways", + "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#list_agent_gateways", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::NetworkServices::V1::ListAgentGatewaysRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::NetworkServices::V1::ListAgentGatewaysResponse", + "client": { + "short_name": "NetworkServices::Client", + "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" + }, + "method": { + "short_name": "ListAgentGateways", + "full_name": "google.cloud.networkservices.v1.NetworkServices.ListAgentGateways", + "service": { + "short_name": "NetworkServices", + "full_name": "google.cloud.networkservices.v1.NetworkServices" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "networkservices_v1_generated_NetworkServices_GetAgentGateway_sync", + "title": "Snippet for the get_agent_gateway call in the NetworkServices service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#get_agent_gateway.", + "file": "network_services/get_agent_gateway.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_agent_gateway", + "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#get_agent_gateway", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::NetworkServices::V1::GetAgentGatewayRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::NetworkServices::V1::AgentGateway", + "client": { + "short_name": "NetworkServices::Client", + "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" + }, + "method": { + "short_name": "GetAgentGateway", + "full_name": "google.cloud.networkservices.v1.NetworkServices.GetAgentGateway", + "service": { + "short_name": "NetworkServices", + "full_name": "google.cloud.networkservices.v1.NetworkServices" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "networkservices_v1_generated_NetworkServices_CreateAgentGateway_sync", + "title": "Snippet for the create_agent_gateway call in the NetworkServices service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#create_agent_gateway.", + "file": "network_services/create_agent_gateway.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_agent_gateway", + "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#create_agent_gateway", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::NetworkServices::V1::CreateAgentGatewayRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "NetworkServices::Client", + "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" + }, + "method": { + "short_name": "CreateAgentGateway", + "full_name": "google.cloud.networkservices.v1.NetworkServices.CreateAgentGateway", + "service": { + "short_name": "NetworkServices", + "full_name": "google.cloud.networkservices.v1.NetworkServices" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "networkservices_v1_generated_NetworkServices_UpdateAgentGateway_sync", + "title": "Snippet for the update_agent_gateway call in the NetworkServices service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#update_agent_gateway.", + "file": "network_services/update_agent_gateway.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_agent_gateway", + "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#update_agent_gateway", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::NetworkServices::V1::UpdateAgentGatewayRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "NetworkServices::Client", + "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" + }, + "method": { + "short_name": "UpdateAgentGateway", + "full_name": "google.cloud.networkservices.v1.NetworkServices.UpdateAgentGateway", + "service": { + "short_name": "NetworkServices", + "full_name": "google.cloud.networkservices.v1.NetworkServices" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "networkservices_v1_generated_NetworkServices_DeleteAgentGateway_sync", + "title": "Snippet for the delete_agent_gateway call in the NetworkServices service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#delete_agent_gateway.", + "file": "network_services/delete_agent_gateway.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_agent_gateway", + "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#delete_agent_gateway", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::NetworkServices::V1::DeleteAgentGatewayRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "NetworkServices::Client", + "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" + }, + "method": { + "short_name": "DeleteAgentGateway", + "full_name": "google.cloud.networkservices.v1.NetworkServices.DeleteAgentGateway", + "service": { + "short_name": "NetworkServices", + "full_name": "google.cloud.networkservices.v1.NetworkServices" + } + } + }, + "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_services-v1/test/google/cloud/network_services/v1/dep_service_operations_test.rb b/owl-bot-staging/google-cloud-network_services-v1/test/google/cloud/network_services/v1/dep_service_operations_test.rb new file mode 100644 index 000000000000..f1aaa10889bb --- /dev/null +++ b/owl-bot-staging/google-cloud-network_services-v1/test/google/cloud/network_services/v1/dep_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/networkservices/v1/dep_pb" +require "google/cloud/networkservices/v1/dep_services_pb" +require "google/cloud/network_services/v1/dep_service" + +class ::Google::Cloud::NetworkServices::V1::DepService::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 + c = ::Google::Cloud::NetworkServices::V1::DepService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.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 + c.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 + c.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 + c.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 + c.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 + c = ::Google::Cloud::NetworkServices::V1::DepService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.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 + c.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 + c.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 + c.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 + c.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 + c = ::Google::Cloud::NetworkServices::V1::DepService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.delete_operation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.delete_operation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.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 + c.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 + c.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 + c = ::Google::Cloud::NetworkServices::V1::DepService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.cancel_operation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.cancel_operation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.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 + c.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 + c.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 + c = ::Google::Cloud::NetworkServices::V1::DepService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.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 + c.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 + c.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 + c.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 + c.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::NetworkServices::V1::DepService::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::NetworkServices::V1::DepService::Operations::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-network_services-v1/test/google/cloud/network_services/v1/dep_service_paths_test.rb b/owl-bot-staging/google-cloud-network_services-v1/test/google/cloud/network_services/v1/dep_service_paths_test.rb new file mode 100644 index 000000000000..b6507d7a4dde --- /dev/null +++ b/owl-bot-staging/google-cloud-network_services-v1/test/google/cloud/network_services/v1/dep_service_paths_test.rb @@ -0,0 +1,103 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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_services/v1/dep_service" + +class ::Google::Cloud::NetworkServices::V1::DepService::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_authz_extension_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::NetworkServices::V1::DepService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.authz_extension_path project: "value0", location: "value1", authz_extension: "value2" + assert_equal "projects/value0/locations/value1/authzExtensions/value2", path + end + end + + def test_lb_edge_extension_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::NetworkServices::V1::DepService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.lb_edge_extension_path project: "value0", location: "value1", lb_edge_extension: "value2" + assert_equal "projects/value0/locations/value1/lbEdgeExtensions/value2", path + end + end + + def test_lb_route_extension_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::NetworkServices::V1::DepService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.lb_route_extension_path project: "value0", location: "value1", lb_route_extension: "value2" + assert_equal "projects/value0/locations/value1/lbRouteExtensions/value2", path + end + end + + def test_lb_traffic_extension_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::NetworkServices::V1::DepService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.lb_traffic_extension_path project: "value0", location: "value1", lb_traffic_extension: "value2" + assert_equal "projects/value0/locations/value1/lbTrafficExtensions/value2", path + end + end + + def test_location_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::NetworkServices::V1::DepService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.location_path project: "value0", location: "value1" + assert_equal "projects/value0/locations/value1", path + end + end +end diff --git a/owl-bot-staging/google-cloud-network_services-v1/test/google/cloud/network_services/v1/dep_service_rest_test.rb b/owl-bot-staging/google-cloud-network_services-v1/test/google/cloud/network_services/v1/dep_service_rest_test.rb new file mode 100644 index 000000000000..27a8ff9ba8ea --- /dev/null +++ b/owl-bot-staging/google-cloud-network_services-v1/test/google/cloud/network_services/v1/dep_service_rest_test.rb @@ -0,0 +1,1219 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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/networkservices/v1/dep_pb" +require "google/cloud/network_services/v1/dep_service/rest" + + +class ::Google::Cloud::NetworkServices::V1::DepService::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_lb_traffic_extensions + # Create test objects. + client_result = ::Google::Cloud::NetworkServices::V1::ListLbTrafficExtensionsResponse.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_lb_traffic_extensions_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::NetworkServices::V1::DepService::Rest::ServiceStub.stub :transcode_list_lb_traffic_extensions_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_lb_traffic_extensions_client_stub do + # Create client + c = ::Google::Cloud::NetworkServices::V1::DepService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_lb_traffic_extensions({ 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 + c.list_lb_traffic_extensions 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 + c.list_lb_traffic_extensions ::Google::Cloud::NetworkServices::V1::ListLbTrafficExtensionsRequest.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 + c.list_lb_traffic_extensions({ 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 + c.list_lb_traffic_extensions(::Google::Cloud::NetworkServices::V1::ListLbTrafficExtensionsRequest.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_lb_traffic_extensions_client_stub.call_count + end + end + end + + def test_get_lb_traffic_extension + # Create test objects. + client_result = ::Google::Cloud::NetworkServices::V1::LbTrafficExtension.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_lb_traffic_extension_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::NetworkServices::V1::DepService::Rest::ServiceStub.stub :transcode_get_lb_traffic_extension_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_lb_traffic_extension_client_stub do + # Create client + c = ::Google::Cloud::NetworkServices::V1::DepService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_lb_traffic_extension({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_lb_traffic_extension name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_lb_traffic_extension ::Google::Cloud::NetworkServices::V1::GetLbTrafficExtensionRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_lb_traffic_extension({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_lb_traffic_extension(::Google::Cloud::NetworkServices::V1::GetLbTrafficExtensionRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_lb_traffic_extension_client_stub.call_count + end + end + end + + def test_create_lb_traffic_extension + # 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" + lb_traffic_extension_id = "hello world" + lb_traffic_extension = {} + request_id = "hello world" + + create_lb_traffic_extension_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::NetworkServices::V1::DepService::Rest::ServiceStub.stub :transcode_create_lb_traffic_extension_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_lb_traffic_extension_client_stub do + # Create client + c = ::Google::Cloud::NetworkServices::V1::DepService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.create_lb_traffic_extension({ parent: parent, lb_traffic_extension_id: lb_traffic_extension_id, lb_traffic_extension: lb_traffic_extension, request_id: request_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.create_lb_traffic_extension parent: parent, lb_traffic_extension_id: lb_traffic_extension_id, lb_traffic_extension: lb_traffic_extension, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.create_lb_traffic_extension ::Google::Cloud::NetworkServices::V1::CreateLbTrafficExtensionRequest.new(parent: parent, lb_traffic_extension_id: lb_traffic_extension_id, lb_traffic_extension: lb_traffic_extension, request_id: request_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.create_lb_traffic_extension({ parent: parent, lb_traffic_extension_id: lb_traffic_extension_id, lb_traffic_extension: lb_traffic_extension, request_id: request_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.create_lb_traffic_extension(::Google::Cloud::NetworkServices::V1::CreateLbTrafficExtensionRequest.new(parent: parent, lb_traffic_extension_id: lb_traffic_extension_id, lb_traffic_extension: lb_traffic_extension, request_id: request_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_lb_traffic_extension_client_stub.call_count + end + end + end + + def test_update_lb_traffic_extension + # 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 = {} + lb_traffic_extension = {} + request_id = "hello world" + + update_lb_traffic_extension_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::NetworkServices::V1::DepService::Rest::ServiceStub.stub :transcode_update_lb_traffic_extension_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_lb_traffic_extension_client_stub do + # Create client + c = ::Google::Cloud::NetworkServices::V1::DepService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.update_lb_traffic_extension({ update_mask: update_mask, lb_traffic_extension: lb_traffic_extension, request_id: request_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.update_lb_traffic_extension update_mask: update_mask, lb_traffic_extension: lb_traffic_extension, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.update_lb_traffic_extension ::Google::Cloud::NetworkServices::V1::UpdateLbTrafficExtensionRequest.new(update_mask: update_mask, lb_traffic_extension: lb_traffic_extension, request_id: request_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.update_lb_traffic_extension({ update_mask: update_mask, lb_traffic_extension: lb_traffic_extension, request_id: request_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.update_lb_traffic_extension(::Google::Cloud::NetworkServices::V1::UpdateLbTrafficExtensionRequest.new(update_mask: update_mask, lb_traffic_extension: lb_traffic_extension, request_id: request_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_lb_traffic_extension_client_stub.call_count + end + end + end + + def test_delete_lb_traffic_extension + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + request_id = "hello world" + + delete_lb_traffic_extension_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::NetworkServices::V1::DepService::Rest::ServiceStub.stub :transcode_delete_lb_traffic_extension_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_lb_traffic_extension_client_stub do + # Create client + c = ::Google::Cloud::NetworkServices::V1::DepService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.delete_lb_traffic_extension({ name: name, request_id: request_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.delete_lb_traffic_extension name: name, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.delete_lb_traffic_extension ::Google::Cloud::NetworkServices::V1::DeleteLbTrafficExtensionRequest.new(name: name, request_id: request_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.delete_lb_traffic_extension({ name: name, request_id: request_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.delete_lb_traffic_extension(::Google::Cloud::NetworkServices::V1::DeleteLbTrafficExtensionRequest.new(name: name, request_id: request_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_lb_traffic_extension_client_stub.call_count + end + end + end + + def test_list_lb_route_extensions + # Create test objects. + client_result = ::Google::Cloud::NetworkServices::V1::ListLbRouteExtensionsResponse.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_lb_route_extensions_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::NetworkServices::V1::DepService::Rest::ServiceStub.stub :transcode_list_lb_route_extensions_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_lb_route_extensions_client_stub do + # Create client + c = ::Google::Cloud::NetworkServices::V1::DepService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_lb_route_extensions({ 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 + c.list_lb_route_extensions 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 + c.list_lb_route_extensions ::Google::Cloud::NetworkServices::V1::ListLbRouteExtensionsRequest.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 + c.list_lb_route_extensions({ 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 + c.list_lb_route_extensions(::Google::Cloud::NetworkServices::V1::ListLbRouteExtensionsRequest.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_lb_route_extensions_client_stub.call_count + end + end + end + + def test_get_lb_route_extension + # Create test objects. + client_result = ::Google::Cloud::NetworkServices::V1::LbRouteExtension.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_lb_route_extension_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::NetworkServices::V1::DepService::Rest::ServiceStub.stub :transcode_get_lb_route_extension_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_lb_route_extension_client_stub do + # Create client + c = ::Google::Cloud::NetworkServices::V1::DepService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_lb_route_extension({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_lb_route_extension name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_lb_route_extension ::Google::Cloud::NetworkServices::V1::GetLbRouteExtensionRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_lb_route_extension({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_lb_route_extension(::Google::Cloud::NetworkServices::V1::GetLbRouteExtensionRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_lb_route_extension_client_stub.call_count + end + end + end + + def test_create_lb_route_extension + # 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" + lb_route_extension_id = "hello world" + lb_route_extension = {} + request_id = "hello world" + + create_lb_route_extension_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::NetworkServices::V1::DepService::Rest::ServiceStub.stub :transcode_create_lb_route_extension_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_lb_route_extension_client_stub do + # Create client + c = ::Google::Cloud::NetworkServices::V1::DepService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.create_lb_route_extension({ parent: parent, lb_route_extension_id: lb_route_extension_id, lb_route_extension: lb_route_extension, request_id: request_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.create_lb_route_extension parent: parent, lb_route_extension_id: lb_route_extension_id, lb_route_extension: lb_route_extension, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.create_lb_route_extension ::Google::Cloud::NetworkServices::V1::CreateLbRouteExtensionRequest.new(parent: parent, lb_route_extension_id: lb_route_extension_id, lb_route_extension: lb_route_extension, request_id: request_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.create_lb_route_extension({ parent: parent, lb_route_extension_id: lb_route_extension_id, lb_route_extension: lb_route_extension, request_id: request_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.create_lb_route_extension(::Google::Cloud::NetworkServices::V1::CreateLbRouteExtensionRequest.new(parent: parent, lb_route_extension_id: lb_route_extension_id, lb_route_extension: lb_route_extension, request_id: request_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_lb_route_extension_client_stub.call_count + end + end + end + + def test_update_lb_route_extension + # 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 = {} + lb_route_extension = {} + request_id = "hello world" + + update_lb_route_extension_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::NetworkServices::V1::DepService::Rest::ServiceStub.stub :transcode_update_lb_route_extension_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_lb_route_extension_client_stub do + # Create client + c = ::Google::Cloud::NetworkServices::V1::DepService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.update_lb_route_extension({ update_mask: update_mask, lb_route_extension: lb_route_extension, request_id: request_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.update_lb_route_extension update_mask: update_mask, lb_route_extension: lb_route_extension, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.update_lb_route_extension ::Google::Cloud::NetworkServices::V1::UpdateLbRouteExtensionRequest.new(update_mask: update_mask, lb_route_extension: lb_route_extension, request_id: request_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.update_lb_route_extension({ update_mask: update_mask, lb_route_extension: lb_route_extension, request_id: request_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.update_lb_route_extension(::Google::Cloud::NetworkServices::V1::UpdateLbRouteExtensionRequest.new(update_mask: update_mask, lb_route_extension: lb_route_extension, request_id: request_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_lb_route_extension_client_stub.call_count + end + end + end + + def test_delete_lb_route_extension + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + request_id = "hello world" + + delete_lb_route_extension_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::NetworkServices::V1::DepService::Rest::ServiceStub.stub :transcode_delete_lb_route_extension_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_lb_route_extension_client_stub do + # Create client + c = ::Google::Cloud::NetworkServices::V1::DepService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.delete_lb_route_extension({ name: name, request_id: request_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.delete_lb_route_extension name: name, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.delete_lb_route_extension ::Google::Cloud::NetworkServices::V1::DeleteLbRouteExtensionRequest.new(name: name, request_id: request_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.delete_lb_route_extension({ name: name, request_id: request_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.delete_lb_route_extension(::Google::Cloud::NetworkServices::V1::DeleteLbRouteExtensionRequest.new(name: name, request_id: request_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_lb_route_extension_client_stub.call_count + end + end + end + + def test_list_lb_edge_extensions + # Create test objects. + client_result = ::Google::Cloud::NetworkServices::V1::ListLbEdgeExtensionsResponse.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_lb_edge_extensions_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::NetworkServices::V1::DepService::Rest::ServiceStub.stub :transcode_list_lb_edge_extensions_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_lb_edge_extensions_client_stub do + # Create client + c = ::Google::Cloud::NetworkServices::V1::DepService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_lb_edge_extensions({ 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 + c.list_lb_edge_extensions 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 + c.list_lb_edge_extensions ::Google::Cloud::NetworkServices::V1::ListLbEdgeExtensionsRequest.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 + c.list_lb_edge_extensions({ 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 + c.list_lb_edge_extensions(::Google::Cloud::NetworkServices::V1::ListLbEdgeExtensionsRequest.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_lb_edge_extensions_client_stub.call_count + end + end + end + + def test_get_lb_edge_extension + # Create test objects. + client_result = ::Google::Cloud::NetworkServices::V1::LbEdgeExtension.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_lb_edge_extension_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::NetworkServices::V1::DepService::Rest::ServiceStub.stub :transcode_get_lb_edge_extension_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_lb_edge_extension_client_stub do + # Create client + c = ::Google::Cloud::NetworkServices::V1::DepService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_lb_edge_extension({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_lb_edge_extension name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_lb_edge_extension ::Google::Cloud::NetworkServices::V1::GetLbEdgeExtensionRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_lb_edge_extension({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_lb_edge_extension(::Google::Cloud::NetworkServices::V1::GetLbEdgeExtensionRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_lb_edge_extension_client_stub.call_count + end + end + end + + def test_create_lb_edge_extension + # 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" + lb_edge_extension_id = "hello world" + lb_edge_extension = {} + request_id = "hello world" + + create_lb_edge_extension_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::NetworkServices::V1::DepService::Rest::ServiceStub.stub :transcode_create_lb_edge_extension_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_lb_edge_extension_client_stub do + # Create client + c = ::Google::Cloud::NetworkServices::V1::DepService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.create_lb_edge_extension({ parent: parent, lb_edge_extension_id: lb_edge_extension_id, lb_edge_extension: lb_edge_extension, request_id: request_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.create_lb_edge_extension parent: parent, lb_edge_extension_id: lb_edge_extension_id, lb_edge_extension: lb_edge_extension, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.create_lb_edge_extension ::Google::Cloud::NetworkServices::V1::CreateLbEdgeExtensionRequest.new(parent: parent, lb_edge_extension_id: lb_edge_extension_id, lb_edge_extension: lb_edge_extension, request_id: request_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.create_lb_edge_extension({ parent: parent, lb_edge_extension_id: lb_edge_extension_id, lb_edge_extension: lb_edge_extension, request_id: request_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.create_lb_edge_extension(::Google::Cloud::NetworkServices::V1::CreateLbEdgeExtensionRequest.new(parent: parent, lb_edge_extension_id: lb_edge_extension_id, lb_edge_extension: lb_edge_extension, request_id: request_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_lb_edge_extension_client_stub.call_count + end + end + end + + def test_update_lb_edge_extension + # 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 = {} + lb_edge_extension = {} + request_id = "hello world" + + update_lb_edge_extension_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::NetworkServices::V1::DepService::Rest::ServiceStub.stub :transcode_update_lb_edge_extension_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_lb_edge_extension_client_stub do + # Create client + c = ::Google::Cloud::NetworkServices::V1::DepService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.update_lb_edge_extension({ update_mask: update_mask, lb_edge_extension: lb_edge_extension, request_id: request_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.update_lb_edge_extension update_mask: update_mask, lb_edge_extension: lb_edge_extension, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.update_lb_edge_extension ::Google::Cloud::NetworkServices::V1::UpdateLbEdgeExtensionRequest.new(update_mask: update_mask, lb_edge_extension: lb_edge_extension, request_id: request_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.update_lb_edge_extension({ update_mask: update_mask, lb_edge_extension: lb_edge_extension, request_id: request_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.update_lb_edge_extension(::Google::Cloud::NetworkServices::V1::UpdateLbEdgeExtensionRequest.new(update_mask: update_mask, lb_edge_extension: lb_edge_extension, request_id: request_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_lb_edge_extension_client_stub.call_count + end + end + end + + def test_delete_lb_edge_extension + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + request_id = "hello world" + + delete_lb_edge_extension_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::NetworkServices::V1::DepService::Rest::ServiceStub.stub :transcode_delete_lb_edge_extension_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_lb_edge_extension_client_stub do + # Create client + c = ::Google::Cloud::NetworkServices::V1::DepService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.delete_lb_edge_extension({ name: name, request_id: request_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.delete_lb_edge_extension name: name, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.delete_lb_edge_extension ::Google::Cloud::NetworkServices::V1::DeleteLbEdgeExtensionRequest.new(name: name, request_id: request_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.delete_lb_edge_extension({ name: name, request_id: request_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.delete_lb_edge_extension(::Google::Cloud::NetworkServices::V1::DeleteLbEdgeExtensionRequest.new(name: name, request_id: request_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_lb_edge_extension_client_stub.call_count + end + end + end + + def test_list_authz_extensions + # Create test objects. + client_result = ::Google::Cloud::NetworkServices::V1::ListAuthzExtensionsResponse.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_authz_extensions_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::NetworkServices::V1::DepService::Rest::ServiceStub.stub :transcode_list_authz_extensions_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_authz_extensions_client_stub do + # Create client + c = ::Google::Cloud::NetworkServices::V1::DepService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_authz_extensions({ 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 + c.list_authz_extensions 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 + c.list_authz_extensions ::Google::Cloud::NetworkServices::V1::ListAuthzExtensionsRequest.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 + c.list_authz_extensions({ 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 + c.list_authz_extensions(::Google::Cloud::NetworkServices::V1::ListAuthzExtensionsRequest.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_authz_extensions_client_stub.call_count + end + end + end + + def test_get_authz_extension + # Create test objects. + client_result = ::Google::Cloud::NetworkServices::V1::AuthzExtension.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_authz_extension_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::NetworkServices::V1::DepService::Rest::ServiceStub.stub :transcode_get_authz_extension_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_authz_extension_client_stub do + # Create client + c = ::Google::Cloud::NetworkServices::V1::DepService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_authz_extension({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_authz_extension name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_authz_extension ::Google::Cloud::NetworkServices::V1::GetAuthzExtensionRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_authz_extension({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_authz_extension(::Google::Cloud::NetworkServices::V1::GetAuthzExtensionRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_authz_extension_client_stub.call_count + end + end + end + + def test_create_authz_extension + # 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" + authz_extension_id = "hello world" + authz_extension = {} + request_id = "hello world" + + create_authz_extension_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::NetworkServices::V1::DepService::Rest::ServiceStub.stub :transcode_create_authz_extension_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_authz_extension_client_stub do + # Create client + c = ::Google::Cloud::NetworkServices::V1::DepService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.create_authz_extension({ parent: parent, authz_extension_id: authz_extension_id, authz_extension: authz_extension, request_id: request_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.create_authz_extension parent: parent, authz_extension_id: authz_extension_id, authz_extension: authz_extension, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.create_authz_extension ::Google::Cloud::NetworkServices::V1::CreateAuthzExtensionRequest.new(parent: parent, authz_extension_id: authz_extension_id, authz_extension: authz_extension, request_id: request_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.create_authz_extension({ parent: parent, authz_extension_id: authz_extension_id, authz_extension: authz_extension, request_id: request_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.create_authz_extension(::Google::Cloud::NetworkServices::V1::CreateAuthzExtensionRequest.new(parent: parent, authz_extension_id: authz_extension_id, authz_extension: authz_extension, request_id: request_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_authz_extension_client_stub.call_count + end + end + end + + def test_update_authz_extension + # 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 = {} + authz_extension = {} + request_id = "hello world" + + update_authz_extension_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::NetworkServices::V1::DepService::Rest::ServiceStub.stub :transcode_update_authz_extension_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_authz_extension_client_stub do + # Create client + c = ::Google::Cloud::NetworkServices::V1::DepService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.update_authz_extension({ update_mask: update_mask, authz_extension: authz_extension, request_id: request_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.update_authz_extension update_mask: update_mask, authz_extension: authz_extension, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.update_authz_extension ::Google::Cloud::NetworkServices::V1::UpdateAuthzExtensionRequest.new(update_mask: update_mask, authz_extension: authz_extension, request_id: request_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.update_authz_extension({ update_mask: update_mask, authz_extension: authz_extension, request_id: request_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.update_authz_extension(::Google::Cloud::NetworkServices::V1::UpdateAuthzExtensionRequest.new(update_mask: update_mask, authz_extension: authz_extension, request_id: request_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_authz_extension_client_stub.call_count + end + end + end + + def test_delete_authz_extension + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + request_id = "hello world" + + delete_authz_extension_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::NetworkServices::V1::DepService::Rest::ServiceStub.stub :transcode_delete_authz_extension_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_authz_extension_client_stub do + # Create client + c = ::Google::Cloud::NetworkServices::V1::DepService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.delete_authz_extension({ name: name, request_id: request_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.delete_authz_extension name: name, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.delete_authz_extension ::Google::Cloud::NetworkServices::V1::DeleteAuthzExtensionRequest.new(name: name, request_id: request_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.delete_authz_extension({ name: name, request_id: request_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.delete_authz_extension(::Google::Cloud::NetworkServices::V1::DeleteAuthzExtensionRequest.new(name: name, request_id: request_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_authz_extension_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::NetworkServices::V1::DepService::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::NetworkServices::V1::DepService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-network_services-v1/test/google/cloud/network_services/v1/dep_service_test.rb b/owl-bot-staging/google-cloud-network_services-v1/test/google/cloud/network_services/v1/dep_service_test.rb new file mode 100644 index 000000000000..ad6741a96c49 --- /dev/null +++ b/owl-bot-staging/google-cloud-network_services-v1/test/google/cloud/network_services/v1/dep_service_test.rb @@ -0,0 +1,1438 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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/networkservices/v1/dep_pb" +require "google/cloud/network_services/v1/dep_service" + +class ::Google::Cloud::NetworkServices::V1::DepService::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_lb_traffic_extensions + # Create GRPC objects. + grpc_response = ::Google::Cloud::NetworkServices::V1::ListLbTrafficExtensionsResponse.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_lb_traffic_extensions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_lb_traffic_extensions, name + assert_kind_of ::Google::Cloud::NetworkServices::V1::ListLbTrafficExtensionsRequest, 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_lb_traffic_extensions_client_stub do + # Create client + c = ::Google::Cloud::NetworkServices::V1::DepService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_lb_traffic_extensions({ 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 + c.list_lb_traffic_extensions 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 + c.list_lb_traffic_extensions ::Google::Cloud::NetworkServices::V1::ListLbTrafficExtensionsRequest.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 + c.list_lb_traffic_extensions({ 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 + c.list_lb_traffic_extensions(::Google::Cloud::NetworkServices::V1::ListLbTrafficExtensionsRequest.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_lb_traffic_extensions_client_stub.call_rpc_count + end + end + + def test_get_lb_traffic_extension + # Create GRPC objects. + grpc_response = ::Google::Cloud::NetworkServices::V1::LbTrafficExtension.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_lb_traffic_extension_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_lb_traffic_extension, name + assert_kind_of ::Google::Cloud::NetworkServices::V1::GetLbTrafficExtensionRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_lb_traffic_extension_client_stub do + # Create client + c = ::Google::Cloud::NetworkServices::V1::DepService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_lb_traffic_extension({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_lb_traffic_extension name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_lb_traffic_extension ::Google::Cloud::NetworkServices::V1::GetLbTrafficExtensionRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_lb_traffic_extension({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_lb_traffic_extension(::Google::Cloud::NetworkServices::V1::GetLbTrafficExtensionRequest.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_lb_traffic_extension_client_stub.call_rpc_count + end + end + + def test_create_lb_traffic_extension + # 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" + lb_traffic_extension_id = "hello world" + lb_traffic_extension = {} + request_id = "hello world" + + create_lb_traffic_extension_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_lb_traffic_extension, name + assert_kind_of ::Google::Cloud::NetworkServices::V1::CreateLbTrafficExtensionRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["lb_traffic_extension_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::NetworkServices::V1::LbTrafficExtension), request["lb_traffic_extension"] + assert_equal "hello world", request["request_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_lb_traffic_extension_client_stub do + # Create client + c = ::Google::Cloud::NetworkServices::V1::DepService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.create_lb_traffic_extension({ parent: parent, lb_traffic_extension_id: lb_traffic_extension_id, lb_traffic_extension: lb_traffic_extension, request_id: request_id }) 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 + c.create_lb_traffic_extension parent: parent, lb_traffic_extension_id: lb_traffic_extension_id, lb_traffic_extension: lb_traffic_extension, request_id: request_id 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 + c.create_lb_traffic_extension ::Google::Cloud::NetworkServices::V1::CreateLbTrafficExtensionRequest.new(parent: parent, lb_traffic_extension_id: lb_traffic_extension_id, lb_traffic_extension: lb_traffic_extension, request_id: request_id) 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 + c.create_lb_traffic_extension({ parent: parent, lb_traffic_extension_id: lb_traffic_extension_id, lb_traffic_extension: lb_traffic_extension, request_id: request_id }, 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 + c.create_lb_traffic_extension(::Google::Cloud::NetworkServices::V1::CreateLbTrafficExtensionRequest.new(parent: parent, lb_traffic_extension_id: lb_traffic_extension_id, lb_traffic_extension: lb_traffic_extension, request_id: request_id), 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_lb_traffic_extension_client_stub.call_rpc_count + end + end + + def test_update_lb_traffic_extension + # 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 = {} + lb_traffic_extension = {} + request_id = "hello world" + + update_lb_traffic_extension_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_lb_traffic_extension, name + assert_kind_of ::Google::Cloud::NetworkServices::V1::UpdateLbTrafficExtensionRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::NetworkServices::V1::LbTrafficExtension), request["lb_traffic_extension"] + assert_equal "hello world", request["request_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_lb_traffic_extension_client_stub do + # Create client + c = ::Google::Cloud::NetworkServices::V1::DepService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.update_lb_traffic_extension({ update_mask: update_mask, lb_traffic_extension: lb_traffic_extension, request_id: request_id }) 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 + c.update_lb_traffic_extension update_mask: update_mask, lb_traffic_extension: lb_traffic_extension, request_id: request_id 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 + c.update_lb_traffic_extension ::Google::Cloud::NetworkServices::V1::UpdateLbTrafficExtensionRequest.new(update_mask: update_mask, lb_traffic_extension: lb_traffic_extension, request_id: request_id) 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 + c.update_lb_traffic_extension({ update_mask: update_mask, lb_traffic_extension: lb_traffic_extension, request_id: request_id }, 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 + c.update_lb_traffic_extension(::Google::Cloud::NetworkServices::V1::UpdateLbTrafficExtensionRequest.new(update_mask: update_mask, lb_traffic_extension: lb_traffic_extension, request_id: request_id), 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_lb_traffic_extension_client_stub.call_rpc_count + end + end + + def test_delete_lb_traffic_extension + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + request_id = "hello world" + + delete_lb_traffic_extension_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_lb_traffic_extension, name + assert_kind_of ::Google::Cloud::NetworkServices::V1::DeleteLbTrafficExtensionRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["request_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_lb_traffic_extension_client_stub do + # Create client + c = ::Google::Cloud::NetworkServices::V1::DepService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.delete_lb_traffic_extension({ name: name, request_id: request_id }) 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 + c.delete_lb_traffic_extension name: name, request_id: request_id 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 + c.delete_lb_traffic_extension ::Google::Cloud::NetworkServices::V1::DeleteLbTrafficExtensionRequest.new(name: name, request_id: request_id) 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 + c.delete_lb_traffic_extension({ name: name, request_id: request_id }, 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 + c.delete_lb_traffic_extension(::Google::Cloud::NetworkServices::V1::DeleteLbTrafficExtensionRequest.new(name: name, request_id: request_id), 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_lb_traffic_extension_client_stub.call_rpc_count + end + end + + def test_list_lb_route_extensions + # Create GRPC objects. + grpc_response = ::Google::Cloud::NetworkServices::V1::ListLbRouteExtensionsResponse.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_lb_route_extensions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_lb_route_extensions, name + assert_kind_of ::Google::Cloud::NetworkServices::V1::ListLbRouteExtensionsRequest, 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_lb_route_extensions_client_stub do + # Create client + c = ::Google::Cloud::NetworkServices::V1::DepService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_lb_route_extensions({ 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 + c.list_lb_route_extensions 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 + c.list_lb_route_extensions ::Google::Cloud::NetworkServices::V1::ListLbRouteExtensionsRequest.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 + c.list_lb_route_extensions({ 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 + c.list_lb_route_extensions(::Google::Cloud::NetworkServices::V1::ListLbRouteExtensionsRequest.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_lb_route_extensions_client_stub.call_rpc_count + end + end + + def test_get_lb_route_extension + # Create GRPC objects. + grpc_response = ::Google::Cloud::NetworkServices::V1::LbRouteExtension.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_lb_route_extension_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_lb_route_extension, name + assert_kind_of ::Google::Cloud::NetworkServices::V1::GetLbRouteExtensionRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_lb_route_extension_client_stub do + # Create client + c = ::Google::Cloud::NetworkServices::V1::DepService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_lb_route_extension({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_lb_route_extension name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_lb_route_extension ::Google::Cloud::NetworkServices::V1::GetLbRouteExtensionRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_lb_route_extension({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_lb_route_extension(::Google::Cloud::NetworkServices::V1::GetLbRouteExtensionRequest.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_lb_route_extension_client_stub.call_rpc_count + end + end + + def test_create_lb_route_extension + # 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" + lb_route_extension_id = "hello world" + lb_route_extension = {} + request_id = "hello world" + + create_lb_route_extension_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_lb_route_extension, name + assert_kind_of ::Google::Cloud::NetworkServices::V1::CreateLbRouteExtensionRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["lb_route_extension_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::NetworkServices::V1::LbRouteExtension), request["lb_route_extension"] + assert_equal "hello world", request["request_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_lb_route_extension_client_stub do + # Create client + c = ::Google::Cloud::NetworkServices::V1::DepService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.create_lb_route_extension({ parent: parent, lb_route_extension_id: lb_route_extension_id, lb_route_extension: lb_route_extension, request_id: request_id }) 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 + c.create_lb_route_extension parent: parent, lb_route_extension_id: lb_route_extension_id, lb_route_extension: lb_route_extension, request_id: request_id 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 + c.create_lb_route_extension ::Google::Cloud::NetworkServices::V1::CreateLbRouteExtensionRequest.new(parent: parent, lb_route_extension_id: lb_route_extension_id, lb_route_extension: lb_route_extension, request_id: request_id) 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 + c.create_lb_route_extension({ parent: parent, lb_route_extension_id: lb_route_extension_id, lb_route_extension: lb_route_extension, request_id: request_id }, 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 + c.create_lb_route_extension(::Google::Cloud::NetworkServices::V1::CreateLbRouteExtensionRequest.new(parent: parent, lb_route_extension_id: lb_route_extension_id, lb_route_extension: lb_route_extension, request_id: request_id), 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_lb_route_extension_client_stub.call_rpc_count + end + end + + def test_update_lb_route_extension + # 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 = {} + lb_route_extension = {} + request_id = "hello world" + + update_lb_route_extension_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_lb_route_extension, name + assert_kind_of ::Google::Cloud::NetworkServices::V1::UpdateLbRouteExtensionRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::NetworkServices::V1::LbRouteExtension), request["lb_route_extension"] + assert_equal "hello world", request["request_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_lb_route_extension_client_stub do + # Create client + c = ::Google::Cloud::NetworkServices::V1::DepService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.update_lb_route_extension({ update_mask: update_mask, lb_route_extension: lb_route_extension, request_id: request_id }) 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 + c.update_lb_route_extension update_mask: update_mask, lb_route_extension: lb_route_extension, request_id: request_id 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 + c.update_lb_route_extension ::Google::Cloud::NetworkServices::V1::UpdateLbRouteExtensionRequest.new(update_mask: update_mask, lb_route_extension: lb_route_extension, request_id: request_id) 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 + c.update_lb_route_extension({ update_mask: update_mask, lb_route_extension: lb_route_extension, request_id: request_id }, 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 + c.update_lb_route_extension(::Google::Cloud::NetworkServices::V1::UpdateLbRouteExtensionRequest.new(update_mask: update_mask, lb_route_extension: lb_route_extension, request_id: request_id), 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_lb_route_extension_client_stub.call_rpc_count + end + end + + def test_delete_lb_route_extension + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + request_id = "hello world" + + delete_lb_route_extension_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_lb_route_extension, name + assert_kind_of ::Google::Cloud::NetworkServices::V1::DeleteLbRouteExtensionRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["request_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_lb_route_extension_client_stub do + # Create client + c = ::Google::Cloud::NetworkServices::V1::DepService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.delete_lb_route_extension({ name: name, request_id: request_id }) 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 + c.delete_lb_route_extension name: name, request_id: request_id 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 + c.delete_lb_route_extension ::Google::Cloud::NetworkServices::V1::DeleteLbRouteExtensionRequest.new(name: name, request_id: request_id) 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 + c.delete_lb_route_extension({ name: name, request_id: request_id }, 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 + c.delete_lb_route_extension(::Google::Cloud::NetworkServices::V1::DeleteLbRouteExtensionRequest.new(name: name, request_id: request_id), 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_lb_route_extension_client_stub.call_rpc_count + end + end + + def test_list_lb_edge_extensions + # Create GRPC objects. + grpc_response = ::Google::Cloud::NetworkServices::V1::ListLbEdgeExtensionsResponse.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_lb_edge_extensions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_lb_edge_extensions, name + assert_kind_of ::Google::Cloud::NetworkServices::V1::ListLbEdgeExtensionsRequest, 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_lb_edge_extensions_client_stub do + # Create client + c = ::Google::Cloud::NetworkServices::V1::DepService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_lb_edge_extensions({ 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 + c.list_lb_edge_extensions 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 + c.list_lb_edge_extensions ::Google::Cloud::NetworkServices::V1::ListLbEdgeExtensionsRequest.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 + c.list_lb_edge_extensions({ 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 + c.list_lb_edge_extensions(::Google::Cloud::NetworkServices::V1::ListLbEdgeExtensionsRequest.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_lb_edge_extensions_client_stub.call_rpc_count + end + end + + def test_get_lb_edge_extension + # Create GRPC objects. + grpc_response = ::Google::Cloud::NetworkServices::V1::LbEdgeExtension.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_lb_edge_extension_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_lb_edge_extension, name + assert_kind_of ::Google::Cloud::NetworkServices::V1::GetLbEdgeExtensionRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_lb_edge_extension_client_stub do + # Create client + c = ::Google::Cloud::NetworkServices::V1::DepService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_lb_edge_extension({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_lb_edge_extension name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_lb_edge_extension ::Google::Cloud::NetworkServices::V1::GetLbEdgeExtensionRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_lb_edge_extension({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_lb_edge_extension(::Google::Cloud::NetworkServices::V1::GetLbEdgeExtensionRequest.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_lb_edge_extension_client_stub.call_rpc_count + end + end + + def test_create_lb_edge_extension + # 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" + lb_edge_extension_id = "hello world" + lb_edge_extension = {} + request_id = "hello world" + + create_lb_edge_extension_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_lb_edge_extension, name + assert_kind_of ::Google::Cloud::NetworkServices::V1::CreateLbEdgeExtensionRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["lb_edge_extension_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::NetworkServices::V1::LbEdgeExtension), request["lb_edge_extension"] + assert_equal "hello world", request["request_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_lb_edge_extension_client_stub do + # Create client + c = ::Google::Cloud::NetworkServices::V1::DepService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.create_lb_edge_extension({ parent: parent, lb_edge_extension_id: lb_edge_extension_id, lb_edge_extension: lb_edge_extension, request_id: request_id }) 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 + c.create_lb_edge_extension parent: parent, lb_edge_extension_id: lb_edge_extension_id, lb_edge_extension: lb_edge_extension, request_id: request_id 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 + c.create_lb_edge_extension ::Google::Cloud::NetworkServices::V1::CreateLbEdgeExtensionRequest.new(parent: parent, lb_edge_extension_id: lb_edge_extension_id, lb_edge_extension: lb_edge_extension, request_id: request_id) 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 + c.create_lb_edge_extension({ parent: parent, lb_edge_extension_id: lb_edge_extension_id, lb_edge_extension: lb_edge_extension, request_id: request_id }, 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 + c.create_lb_edge_extension(::Google::Cloud::NetworkServices::V1::CreateLbEdgeExtensionRequest.new(parent: parent, lb_edge_extension_id: lb_edge_extension_id, lb_edge_extension: lb_edge_extension, request_id: request_id), 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_lb_edge_extension_client_stub.call_rpc_count + end + end + + def test_update_lb_edge_extension + # 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 = {} + lb_edge_extension = {} + request_id = "hello world" + + update_lb_edge_extension_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_lb_edge_extension, name + assert_kind_of ::Google::Cloud::NetworkServices::V1::UpdateLbEdgeExtensionRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::NetworkServices::V1::LbEdgeExtension), request["lb_edge_extension"] + assert_equal "hello world", request["request_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_lb_edge_extension_client_stub do + # Create client + c = ::Google::Cloud::NetworkServices::V1::DepService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.update_lb_edge_extension({ update_mask: update_mask, lb_edge_extension: lb_edge_extension, request_id: request_id }) 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 + c.update_lb_edge_extension update_mask: update_mask, lb_edge_extension: lb_edge_extension, request_id: request_id 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 + c.update_lb_edge_extension ::Google::Cloud::NetworkServices::V1::UpdateLbEdgeExtensionRequest.new(update_mask: update_mask, lb_edge_extension: lb_edge_extension, request_id: request_id) 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 + c.update_lb_edge_extension({ update_mask: update_mask, lb_edge_extension: lb_edge_extension, request_id: request_id }, 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 + c.update_lb_edge_extension(::Google::Cloud::NetworkServices::V1::UpdateLbEdgeExtensionRequest.new(update_mask: update_mask, lb_edge_extension: lb_edge_extension, request_id: request_id), 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_lb_edge_extension_client_stub.call_rpc_count + end + end + + def test_delete_lb_edge_extension + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + request_id = "hello world" + + delete_lb_edge_extension_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_lb_edge_extension, name + assert_kind_of ::Google::Cloud::NetworkServices::V1::DeleteLbEdgeExtensionRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["request_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_lb_edge_extension_client_stub do + # Create client + c = ::Google::Cloud::NetworkServices::V1::DepService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.delete_lb_edge_extension({ name: name, request_id: request_id }) 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 + c.delete_lb_edge_extension name: name, request_id: request_id 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 + c.delete_lb_edge_extension ::Google::Cloud::NetworkServices::V1::DeleteLbEdgeExtensionRequest.new(name: name, request_id: request_id) 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 + c.delete_lb_edge_extension({ name: name, request_id: request_id }, 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 + c.delete_lb_edge_extension(::Google::Cloud::NetworkServices::V1::DeleteLbEdgeExtensionRequest.new(name: name, request_id: request_id), 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_lb_edge_extension_client_stub.call_rpc_count + end + end + + def test_list_authz_extensions + # Create GRPC objects. + grpc_response = ::Google::Cloud::NetworkServices::V1::ListAuthzExtensionsResponse.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_authz_extensions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_authz_extensions, name + assert_kind_of ::Google::Cloud::NetworkServices::V1::ListAuthzExtensionsRequest, 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_authz_extensions_client_stub do + # Create client + c = ::Google::Cloud::NetworkServices::V1::DepService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_authz_extensions({ 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 + c.list_authz_extensions 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 + c.list_authz_extensions ::Google::Cloud::NetworkServices::V1::ListAuthzExtensionsRequest.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 + c.list_authz_extensions({ 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 + c.list_authz_extensions(::Google::Cloud::NetworkServices::V1::ListAuthzExtensionsRequest.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_authz_extensions_client_stub.call_rpc_count + end + end + + def test_get_authz_extension + # Create GRPC objects. + grpc_response = ::Google::Cloud::NetworkServices::V1::AuthzExtension.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_authz_extension_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_authz_extension, name + assert_kind_of ::Google::Cloud::NetworkServices::V1::GetAuthzExtensionRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_authz_extension_client_stub do + # Create client + c = ::Google::Cloud::NetworkServices::V1::DepService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_authz_extension({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_authz_extension name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_authz_extension ::Google::Cloud::NetworkServices::V1::GetAuthzExtensionRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_authz_extension({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_authz_extension(::Google::Cloud::NetworkServices::V1::GetAuthzExtensionRequest.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_authz_extension_client_stub.call_rpc_count + end + end + + def test_create_authz_extension + # 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" + authz_extension_id = "hello world" + authz_extension = {} + request_id = "hello world" + + create_authz_extension_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_authz_extension, name + assert_kind_of ::Google::Cloud::NetworkServices::V1::CreateAuthzExtensionRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["authz_extension_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::NetworkServices::V1::AuthzExtension), request["authz_extension"] + assert_equal "hello world", request["request_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_authz_extension_client_stub do + # Create client + c = ::Google::Cloud::NetworkServices::V1::DepService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.create_authz_extension({ parent: parent, authz_extension_id: authz_extension_id, authz_extension: authz_extension, request_id: request_id }) 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 + c.create_authz_extension parent: parent, authz_extension_id: authz_extension_id, authz_extension: authz_extension, request_id: request_id 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 + c.create_authz_extension ::Google::Cloud::NetworkServices::V1::CreateAuthzExtensionRequest.new(parent: parent, authz_extension_id: authz_extension_id, authz_extension: authz_extension, request_id: request_id) 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 + c.create_authz_extension({ parent: parent, authz_extension_id: authz_extension_id, authz_extension: authz_extension, request_id: request_id }, 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 + c.create_authz_extension(::Google::Cloud::NetworkServices::V1::CreateAuthzExtensionRequest.new(parent: parent, authz_extension_id: authz_extension_id, authz_extension: authz_extension, request_id: request_id), 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_authz_extension_client_stub.call_rpc_count + end + end + + def test_update_authz_extension + # 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 = {} + authz_extension = {} + request_id = "hello world" + + update_authz_extension_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_authz_extension, name + assert_kind_of ::Google::Cloud::NetworkServices::V1::UpdateAuthzExtensionRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::NetworkServices::V1::AuthzExtension), request["authz_extension"] + assert_equal "hello world", request["request_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_authz_extension_client_stub do + # Create client + c = ::Google::Cloud::NetworkServices::V1::DepService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.update_authz_extension({ update_mask: update_mask, authz_extension: authz_extension, request_id: request_id }) 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 + c.update_authz_extension update_mask: update_mask, authz_extension: authz_extension, request_id: request_id 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 + c.update_authz_extension ::Google::Cloud::NetworkServices::V1::UpdateAuthzExtensionRequest.new(update_mask: update_mask, authz_extension: authz_extension, request_id: request_id) 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 + c.update_authz_extension({ update_mask: update_mask, authz_extension: authz_extension, request_id: request_id }, 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 + c.update_authz_extension(::Google::Cloud::NetworkServices::V1::UpdateAuthzExtensionRequest.new(update_mask: update_mask, authz_extension: authz_extension, request_id: request_id), 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_authz_extension_client_stub.call_rpc_count + end + end + + def test_delete_authz_extension + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + request_id = "hello world" + + delete_authz_extension_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_authz_extension, name + assert_kind_of ::Google::Cloud::NetworkServices::V1::DeleteAuthzExtensionRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["request_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_authz_extension_client_stub do + # Create client + c = ::Google::Cloud::NetworkServices::V1::DepService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.delete_authz_extension({ name: name, request_id: request_id }) 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 + c.delete_authz_extension name: name, request_id: request_id 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 + c.delete_authz_extension ::Google::Cloud::NetworkServices::V1::DeleteAuthzExtensionRequest.new(name: name, request_id: request_id) 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 + c.delete_authz_extension({ name: name, request_id: request_id }, 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 + c.delete_authz_extension(::Google::Cloud::NetworkServices::V1::DeleteAuthzExtensionRequest.new(name: name, request_id: request_id), 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_authz_extension_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::NetworkServices::V1::DepService::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::NetworkServices::V1::DepService::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::NetworkServices::V1::DepService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::NetworkServices::V1::DepService::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::NetworkServices::V1::DepService::Client.new do |config| + config.credentials = grpc_channel + end + end + + assert_kind_of ::Google::Cloud::NetworkServices::V1::DepService::Operations, client.operations_client + end +end diff --git a/owl-bot-staging/google-cloud-network_services-v1/test/google/cloud/network_services/v1/network_services_operations_test.rb b/owl-bot-staging/google-cloud-network_services-v1/test/google/cloud/network_services/v1/network_services_operations_test.rb new file mode 100644 index 000000000000..ae79f6f84a18 --- /dev/null +++ b/owl-bot-staging/google-cloud-network_services-v1/test/google/cloud/network_services/v1/network_services_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/networkservices/v1/network_services_pb" +require "google/cloud/networkservices/v1/network_services_services_pb" +require "google/cloud/network_services/v1/network_services" + +class ::Google::Cloud::NetworkServices::V1::NetworkServices::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 + c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.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 + c.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 + c.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 + c.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 + c.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 + c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.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 + c.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 + c.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 + c.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 + c.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 + c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.delete_operation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.delete_operation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.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 + c.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 + c.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 + c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.cancel_operation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.cancel_operation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.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 + c.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 + c.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 + c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.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 + c.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 + c.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 + c.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 + c.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::NetworkServices::V1::NetworkServices::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::NetworkServices::V1::NetworkServices::Operations::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-network_services-v1/test/google/cloud/network_services/v1/network_services_paths_test.rb b/owl-bot-staging/google-cloud-network_services-v1/test/google/cloud/network_services/v1/network_services_paths_test.rb new file mode 100644 index 000000000000..fa877883b8aa --- /dev/null +++ b/owl-bot-staging/google-cloud-network_services-v1/test/google/cloud/network_services/v1/network_services_paths_test.rb @@ -0,0 +1,355 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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_services/v1/network_services" + +class ::Google::Cloud::NetworkServices::V1::NetworkServices::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_address_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.address_path project: "value0", region: "value1", address: "value2" + assert_equal "projects/value0/regions/value1/addresses/value2", path + end + end + + def test_agent_gateway_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.agent_gateway_path project: "value0", location: "value1", agent_gateway: "value2" + assert_equal "projects/value0/locations/value1/agentGateways/value2", path + end + end + + def test_authorization_policy_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.authorization_policy_path project: "value0", location: "value1", authorization_policy: "value2" + assert_equal "projects/value0/locations/value1/authorizationPolicies/value2", path + end + end + + def test_backend_service_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.backend_service_path project: "value0", location: "value1", backend_service: "value2" + assert_equal "projects/value0/locations/value1/backendServices/value2", path + end + end + + def test_certificate_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.certificate_path project: "value0", location: "value1", certificate: "value2" + assert_equal "projects/value0/locations/value1/certificates/value2", path + end + end + + def test_client_tls_policy_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.client_tls_policy_path project: "value0", location: "value1", client_tls_policy: "value2" + assert_equal "projects/value0/locations/value1/clientTlsPolicies/value2", path + end + end + + def test_endpoint_policy_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.endpoint_policy_path project: "value0", location: "value1", endpoint_policy: "value2" + assert_equal "projects/value0/locations/value1/endpointPolicies/value2", path + end + end + + def test_gateway_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.gateway_path project: "value0", location: "value1", gateway: "value2" + assert_equal "projects/value0/locations/value1/gateways/value2", path + end + end + + def test_gateway_route_view_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.gateway_route_view_path project: "value0", location: "value1", gateway: "value2", route_view: "value3" + assert_equal "projects/value0/locations/value1/gateways/value2/routeViews/value3", path + end + end + + def test_gateway_security_policy_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.gateway_security_policy_path project: "value0", location: "value1", gateway_security_policy: "value2" + assert_equal "projects/value0/locations/value1/gatewaySecurityPolicies/value2", path + end + end + + def test_grpc_route_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.grpc_route_path project: "value0", location: "value1", grpc_route: "value2" + assert_equal "projects/value0/locations/value1/grpcRoutes/value2", path + end + end + + def test_http_route_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.http_route_path project: "value0", location: "value1", http_route: "value2" + assert_equal "projects/value0/locations/value1/httpRoutes/value2", path + end + end + + def test_location_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::NetworkServices::V1::NetworkServices::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_mesh_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.mesh_path project: "value0", location: "value1", mesh: "value2" + assert_equal "projects/value0/locations/value1/meshes/value2", path + end + end + + def test_mesh_route_view_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.mesh_route_view_path project: "value0", location: "value1", mesh: "value2", route_view: "value3" + assert_equal "projects/value0/locations/value1/meshes/value2/routeViews/value3", path + end + end + + def test_network_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.network_path project: "value0", network: "value1" + assert_equal "projects/value0/global/networks/value1", path + end + end + + def test_server_tls_policy_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.server_tls_policy_path project: "value0", location: "value1", server_tls_policy: "value2" + assert_equal "projects/value0/locations/value1/serverTlsPolicies/value2", path + end + end + + def test_service_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.service_path project: "value0", location: "value1", namespace: "value2", service: "value3" + assert_equal "projects/value0/locations/value1/namespaces/value2/services/value3", path + end + end + + def test_service_binding_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.service_binding_path project: "value0", location: "value1", service_binding: "value2" + assert_equal "projects/value0/locations/value1/serviceBindings/value2", path + end + end + + def test_service_lb_policy_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.service_lb_policy_path project: "value0", location: "value1", service_lb_policy: "value2" + assert_equal "projects/value0/locations/value1/serviceLbPolicies/value2", path + end + end + + def test_subnetwork_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.subnetwork_path project: "value0", region: "value1", subnetwork: "value2" + assert_equal "projects/value0/regions/value1/subnetworks/value2", path + end + end + + def test_target_tcp_proxy_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.target_tcp_proxy_path project: "value0", location: "value1", target_tcp_proxy: "value2" + assert_equal "projects/value0/locations/value1/targetTcpProxies/value2", path + end + end + + def test_tcp_route_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.tcp_route_path project: "value0", location: "value1", tcp_route: "value2" + assert_equal "projects/value0/locations/value1/tcpRoutes/value2", path + end + end + + def test_tls_route_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.tls_route_path project: "value0", location: "value1", tls_route: "value2" + assert_equal "projects/value0/locations/value1/tlsRoutes/value2", path + end + end + + def test_wasm_plugin_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.wasm_plugin_path project: "value0", location: "value1", wasm_plugin: "value2" + assert_equal "projects/value0/locations/value1/wasmPlugins/value2", path + end + end + + def test_wasm_plugin_version_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.wasm_plugin_version_path project: "value0", location: "value1", wasm_plugin: "value2", wasm_plugin_version: "value3" + assert_equal "projects/value0/locations/value1/wasmPlugins/value2/versions/value3", path + end + end +end diff --git a/owl-bot-staging/google-cloud-network_services-v1/test/google/cloud/network_services/v1/network_services_rest_test.rb b/owl-bot-staging/google-cloud-network_services-v1/test/google/cloud/network_services/v1/network_services_rest_test.rb new file mode 100644 index 000000000000..d40dfc844722 --- /dev/null +++ b/owl-bot-staging/google-cloud-network_services-v1/test/google/cloud/network_services/v1/network_services_rest_test.rb @@ -0,0 +1,3575 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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/networkservices/v1/network_services_pb" +require "google/cloud/network_services/v1/network_services/rest" + + +class ::Google::Cloud::NetworkServices::V1::NetworkServices::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_endpoint_policies + # Create test objects. + client_result = ::Google::Cloud::NetworkServices::V1::ListEndpointPoliciesResponse.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" + return_partial_success = true + + list_endpoint_policies_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_list_endpoint_policies_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_endpoint_policies_client_stub do + # Create client + c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_endpoint_policies({ parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.list_endpoint_policies parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.list_endpoint_policies ::Google::Cloud::NetworkServices::V1::ListEndpointPoliciesRequest.new(parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.list_endpoint_policies({ parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.list_endpoint_policies(::Google::Cloud::NetworkServices::V1::ListEndpointPoliciesRequest.new(parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_endpoint_policies_client_stub.call_count + end + end + end + + def test_get_endpoint_policy + # Create test objects. + client_result = ::Google::Cloud::NetworkServices::V1::EndpointPolicy.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_endpoint_policy_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_get_endpoint_policy_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_endpoint_policy_client_stub do + # Create client + c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_endpoint_policy({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_endpoint_policy name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_endpoint_policy ::Google::Cloud::NetworkServices::V1::GetEndpointPolicyRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_endpoint_policy({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_endpoint_policy(::Google::Cloud::NetworkServices::V1::GetEndpointPolicyRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_endpoint_policy_client_stub.call_count + end + end + end + + def test_create_endpoint_policy + # 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" + endpoint_policy_id = "hello world" + endpoint_policy = {} + + create_endpoint_policy_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_create_endpoint_policy_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_endpoint_policy_client_stub do + # Create client + c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.create_endpoint_policy({ parent: parent, endpoint_policy_id: endpoint_policy_id, endpoint_policy: endpoint_policy }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.create_endpoint_policy parent: parent, endpoint_policy_id: endpoint_policy_id, endpoint_policy: endpoint_policy do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.create_endpoint_policy ::Google::Cloud::NetworkServices::V1::CreateEndpointPolicyRequest.new(parent: parent, endpoint_policy_id: endpoint_policy_id, endpoint_policy: endpoint_policy) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.create_endpoint_policy({ parent: parent, endpoint_policy_id: endpoint_policy_id, endpoint_policy: endpoint_policy }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.create_endpoint_policy(::Google::Cloud::NetworkServices::V1::CreateEndpointPolicyRequest.new(parent: parent, endpoint_policy_id: endpoint_policy_id, endpoint_policy: endpoint_policy), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_endpoint_policy_client_stub.call_count + end + end + end + + def test_update_endpoint_policy + # 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 = {} + endpoint_policy = {} + + update_endpoint_policy_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_update_endpoint_policy_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_endpoint_policy_client_stub do + # Create client + c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.update_endpoint_policy({ update_mask: update_mask, endpoint_policy: endpoint_policy }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.update_endpoint_policy update_mask: update_mask, endpoint_policy: endpoint_policy do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.update_endpoint_policy ::Google::Cloud::NetworkServices::V1::UpdateEndpointPolicyRequest.new(update_mask: update_mask, endpoint_policy: endpoint_policy) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.update_endpoint_policy({ update_mask: update_mask, endpoint_policy: endpoint_policy }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.update_endpoint_policy(::Google::Cloud::NetworkServices::V1::UpdateEndpointPolicyRequest.new(update_mask: update_mask, endpoint_policy: endpoint_policy), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_endpoint_policy_client_stub.call_count + end + end + end + + def test_delete_endpoint_policy + # 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_endpoint_policy_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_delete_endpoint_policy_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_endpoint_policy_client_stub do + # Create client + c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.delete_endpoint_policy({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.delete_endpoint_policy name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.delete_endpoint_policy ::Google::Cloud::NetworkServices::V1::DeleteEndpointPolicyRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.delete_endpoint_policy({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.delete_endpoint_policy(::Google::Cloud::NetworkServices::V1::DeleteEndpointPolicyRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_endpoint_policy_client_stub.call_count + end + end + end + + def test_list_wasm_plugin_versions + # Create test objects. + client_result = ::Google::Cloud::NetworkServices::V1::ListWasmPluginVersionsResponse.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" + + list_wasm_plugin_versions_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_list_wasm_plugin_versions_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_wasm_plugin_versions_client_stub do + # Create client + c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_wasm_plugin_versions({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.list_wasm_plugin_versions parent: parent, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.list_wasm_plugin_versions ::Google::Cloud::NetworkServices::V1::ListWasmPluginVersionsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.list_wasm_plugin_versions({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.list_wasm_plugin_versions(::Google::Cloud::NetworkServices::V1::ListWasmPluginVersionsRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_wasm_plugin_versions_client_stub.call_count + end + end + end + + def test_get_wasm_plugin_version + # Create test objects. + client_result = ::Google::Cloud::NetworkServices::V1::WasmPluginVersion.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_wasm_plugin_version_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_get_wasm_plugin_version_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_wasm_plugin_version_client_stub do + # Create client + c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_wasm_plugin_version({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_wasm_plugin_version name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_wasm_plugin_version ::Google::Cloud::NetworkServices::V1::GetWasmPluginVersionRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_wasm_plugin_version({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_wasm_plugin_version(::Google::Cloud::NetworkServices::V1::GetWasmPluginVersionRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_wasm_plugin_version_client_stub.call_count + end + end + end + + def test_create_wasm_plugin_version + # 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" + wasm_plugin_version_id = "hello world" + wasm_plugin_version = {} + + create_wasm_plugin_version_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_create_wasm_plugin_version_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_wasm_plugin_version_client_stub do + # Create client + c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.create_wasm_plugin_version({ parent: parent, wasm_plugin_version_id: wasm_plugin_version_id, wasm_plugin_version: wasm_plugin_version }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.create_wasm_plugin_version parent: parent, wasm_plugin_version_id: wasm_plugin_version_id, wasm_plugin_version: wasm_plugin_version do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.create_wasm_plugin_version ::Google::Cloud::NetworkServices::V1::CreateWasmPluginVersionRequest.new(parent: parent, wasm_plugin_version_id: wasm_plugin_version_id, wasm_plugin_version: wasm_plugin_version) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.create_wasm_plugin_version({ parent: parent, wasm_plugin_version_id: wasm_plugin_version_id, wasm_plugin_version: wasm_plugin_version }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.create_wasm_plugin_version(::Google::Cloud::NetworkServices::V1::CreateWasmPluginVersionRequest.new(parent: parent, wasm_plugin_version_id: wasm_plugin_version_id, wasm_plugin_version: wasm_plugin_version), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_wasm_plugin_version_client_stub.call_count + end + end + end + + def test_delete_wasm_plugin_version + # 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_wasm_plugin_version_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_delete_wasm_plugin_version_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_wasm_plugin_version_client_stub do + # Create client + c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.delete_wasm_plugin_version({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.delete_wasm_plugin_version name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.delete_wasm_plugin_version ::Google::Cloud::NetworkServices::V1::DeleteWasmPluginVersionRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.delete_wasm_plugin_version({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.delete_wasm_plugin_version(::Google::Cloud::NetworkServices::V1::DeleteWasmPluginVersionRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_wasm_plugin_version_client_stub.call_count + end + end + end + + def test_list_wasm_plugins + # Create test objects. + client_result = ::Google::Cloud::NetworkServices::V1::ListWasmPluginsResponse.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" + + list_wasm_plugins_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_list_wasm_plugins_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_wasm_plugins_client_stub do + # Create client + c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_wasm_plugins({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.list_wasm_plugins parent: parent, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.list_wasm_plugins ::Google::Cloud::NetworkServices::V1::ListWasmPluginsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.list_wasm_plugins({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.list_wasm_plugins(::Google::Cloud::NetworkServices::V1::ListWasmPluginsRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_wasm_plugins_client_stub.call_count + end + end + end + + def test_get_wasm_plugin + # Create test objects. + client_result = ::Google::Cloud::NetworkServices::V1::WasmPlugin.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + view = :WASM_PLUGIN_VIEW_UNSPECIFIED + + get_wasm_plugin_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_get_wasm_plugin_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_wasm_plugin_client_stub do + # Create client + c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_wasm_plugin({ name: name, view: view }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_wasm_plugin name: name, view: view do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_wasm_plugin ::Google::Cloud::NetworkServices::V1::GetWasmPluginRequest.new(name: name, view: view) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_wasm_plugin({ name: name, view: view }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_wasm_plugin(::Google::Cloud::NetworkServices::V1::GetWasmPluginRequest.new(name: name, view: view), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_wasm_plugin_client_stub.call_count + end + end + end + + def test_create_wasm_plugin + # 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" + wasm_plugin_id = "hello world" + wasm_plugin = {} + + create_wasm_plugin_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_create_wasm_plugin_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_wasm_plugin_client_stub do + # Create client + c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.create_wasm_plugin({ parent: parent, wasm_plugin_id: wasm_plugin_id, wasm_plugin: wasm_plugin }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.create_wasm_plugin parent: parent, wasm_plugin_id: wasm_plugin_id, wasm_plugin: wasm_plugin do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.create_wasm_plugin ::Google::Cloud::NetworkServices::V1::CreateWasmPluginRequest.new(parent: parent, wasm_plugin_id: wasm_plugin_id, wasm_plugin: wasm_plugin) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.create_wasm_plugin({ parent: parent, wasm_plugin_id: wasm_plugin_id, wasm_plugin: wasm_plugin }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.create_wasm_plugin(::Google::Cloud::NetworkServices::V1::CreateWasmPluginRequest.new(parent: parent, wasm_plugin_id: wasm_plugin_id, wasm_plugin: wasm_plugin), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_wasm_plugin_client_stub.call_count + end + end + end + + def test_update_wasm_plugin + # 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 = {} + wasm_plugin = {} + + update_wasm_plugin_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_update_wasm_plugin_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_wasm_plugin_client_stub do + # Create client + c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.update_wasm_plugin({ update_mask: update_mask, wasm_plugin: wasm_plugin }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.update_wasm_plugin update_mask: update_mask, wasm_plugin: wasm_plugin do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.update_wasm_plugin ::Google::Cloud::NetworkServices::V1::UpdateWasmPluginRequest.new(update_mask: update_mask, wasm_plugin: wasm_plugin) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.update_wasm_plugin({ update_mask: update_mask, wasm_plugin: wasm_plugin }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.update_wasm_plugin(::Google::Cloud::NetworkServices::V1::UpdateWasmPluginRequest.new(update_mask: update_mask, wasm_plugin: wasm_plugin), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_wasm_plugin_client_stub.call_count + end + end + end + + def test_delete_wasm_plugin + # 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_wasm_plugin_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_delete_wasm_plugin_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_wasm_plugin_client_stub do + # Create client + c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.delete_wasm_plugin({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.delete_wasm_plugin name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.delete_wasm_plugin ::Google::Cloud::NetworkServices::V1::DeleteWasmPluginRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.delete_wasm_plugin({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.delete_wasm_plugin(::Google::Cloud::NetworkServices::V1::DeleteWasmPluginRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_wasm_plugin_client_stub.call_count + end + end + end + + def test_list_gateways + # Create test objects. + client_result = ::Google::Cloud::NetworkServices::V1::ListGatewaysResponse.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" + + list_gateways_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_list_gateways_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_gateways_client_stub do + # Create client + c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_gateways({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.list_gateways parent: parent, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.list_gateways ::Google::Cloud::NetworkServices::V1::ListGatewaysRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.list_gateways({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.list_gateways(::Google::Cloud::NetworkServices::V1::ListGatewaysRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_gateways_client_stub.call_count + end + end + end + + def test_get_gateway + # Create test objects. + client_result = ::Google::Cloud::NetworkServices::V1::Gateway.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_gateway_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_get_gateway_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_gateway_client_stub do + # Create client + c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_gateway({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_gateway name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_gateway ::Google::Cloud::NetworkServices::V1::GetGatewayRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_gateway({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_gateway(::Google::Cloud::NetworkServices::V1::GetGatewayRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_gateway_client_stub.call_count + end + end + end + + def test_create_gateway + # 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" + gateway_id = "hello world" + gateway = {} + + create_gateway_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_create_gateway_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_gateway_client_stub do + # Create client + c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.create_gateway({ parent: parent, gateway_id: gateway_id, gateway: gateway }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.create_gateway parent: parent, gateway_id: gateway_id, gateway: gateway do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.create_gateway ::Google::Cloud::NetworkServices::V1::CreateGatewayRequest.new(parent: parent, gateway_id: gateway_id, gateway: gateway) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.create_gateway({ parent: parent, gateway_id: gateway_id, gateway: gateway }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.create_gateway(::Google::Cloud::NetworkServices::V1::CreateGatewayRequest.new(parent: parent, gateway_id: gateway_id, gateway: gateway), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_gateway_client_stub.call_count + end + end + end + + def test_update_gateway + # 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 = {} + gateway = {} + + update_gateway_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_update_gateway_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_gateway_client_stub do + # Create client + c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.update_gateway({ update_mask: update_mask, gateway: gateway }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.update_gateway update_mask: update_mask, gateway: gateway do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.update_gateway ::Google::Cloud::NetworkServices::V1::UpdateGatewayRequest.new(update_mask: update_mask, gateway: gateway) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.update_gateway({ update_mask: update_mask, gateway: gateway }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.update_gateway(::Google::Cloud::NetworkServices::V1::UpdateGatewayRequest.new(update_mask: update_mask, gateway: gateway), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_gateway_client_stub.call_count + end + end + end + + def test_delete_gateway + # 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_gateway_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_delete_gateway_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_gateway_client_stub do + # Create client + c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.delete_gateway({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.delete_gateway name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.delete_gateway ::Google::Cloud::NetworkServices::V1::DeleteGatewayRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.delete_gateway({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.delete_gateway(::Google::Cloud::NetworkServices::V1::DeleteGatewayRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_gateway_client_stub.call_count + end + end + end + + def test_list_grpc_routes + # Create test objects. + client_result = ::Google::Cloud::NetworkServices::V1::ListGrpcRoutesResponse.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" + return_partial_success = true + + list_grpc_routes_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_list_grpc_routes_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_grpc_routes_client_stub do + # Create client + c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_grpc_routes({ parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.list_grpc_routes parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.list_grpc_routes ::Google::Cloud::NetworkServices::V1::ListGrpcRoutesRequest.new(parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.list_grpc_routes({ parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.list_grpc_routes(::Google::Cloud::NetworkServices::V1::ListGrpcRoutesRequest.new(parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_grpc_routes_client_stub.call_count + end + end + end + + def test_get_grpc_route + # Create test objects. + client_result = ::Google::Cloud::NetworkServices::V1::GrpcRoute.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_grpc_route_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_get_grpc_route_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_grpc_route_client_stub do + # Create client + c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_grpc_route({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_grpc_route name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_grpc_route ::Google::Cloud::NetworkServices::V1::GetGrpcRouteRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_grpc_route({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_grpc_route(::Google::Cloud::NetworkServices::V1::GetGrpcRouteRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_grpc_route_client_stub.call_count + end + end + end + + def test_create_grpc_route + # 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" + grpc_route_id = "hello world" + grpc_route = {} + + create_grpc_route_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_create_grpc_route_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_grpc_route_client_stub do + # Create client + c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.create_grpc_route({ parent: parent, grpc_route_id: grpc_route_id, grpc_route: grpc_route }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.create_grpc_route parent: parent, grpc_route_id: grpc_route_id, grpc_route: grpc_route do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.create_grpc_route ::Google::Cloud::NetworkServices::V1::CreateGrpcRouteRequest.new(parent: parent, grpc_route_id: grpc_route_id, grpc_route: grpc_route) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.create_grpc_route({ parent: parent, grpc_route_id: grpc_route_id, grpc_route: grpc_route }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.create_grpc_route(::Google::Cloud::NetworkServices::V1::CreateGrpcRouteRequest.new(parent: parent, grpc_route_id: grpc_route_id, grpc_route: grpc_route), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_grpc_route_client_stub.call_count + end + end + end + + def test_update_grpc_route + # 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 = {} + grpc_route = {} + + update_grpc_route_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_update_grpc_route_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_grpc_route_client_stub do + # Create client + c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.update_grpc_route({ update_mask: update_mask, grpc_route: grpc_route }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.update_grpc_route update_mask: update_mask, grpc_route: grpc_route do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.update_grpc_route ::Google::Cloud::NetworkServices::V1::UpdateGrpcRouteRequest.new(update_mask: update_mask, grpc_route: grpc_route) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.update_grpc_route({ update_mask: update_mask, grpc_route: grpc_route }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.update_grpc_route(::Google::Cloud::NetworkServices::V1::UpdateGrpcRouteRequest.new(update_mask: update_mask, grpc_route: grpc_route), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_grpc_route_client_stub.call_count + end + end + end + + def test_delete_grpc_route + # 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_grpc_route_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_delete_grpc_route_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_grpc_route_client_stub do + # Create client + c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.delete_grpc_route({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.delete_grpc_route name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.delete_grpc_route ::Google::Cloud::NetworkServices::V1::DeleteGrpcRouteRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.delete_grpc_route({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.delete_grpc_route(::Google::Cloud::NetworkServices::V1::DeleteGrpcRouteRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_grpc_route_client_stub.call_count + end + end + end + + def test_list_http_routes + # Create test objects. + client_result = ::Google::Cloud::NetworkServices::V1::ListHttpRoutesResponse.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" + return_partial_success = true + filter = "hello world" + + list_http_routes_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_list_http_routes_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_http_routes_client_stub do + # Create client + c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_http_routes({ parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success, filter: filter }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.list_http_routes parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success, filter: filter do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.list_http_routes ::Google::Cloud::NetworkServices::V1::ListHttpRoutesRequest.new(parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success, filter: filter) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.list_http_routes({ parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success, filter: filter }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.list_http_routes(::Google::Cloud::NetworkServices::V1::ListHttpRoutesRequest.new(parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success, filter: filter), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_http_routes_client_stub.call_count + end + end + end + + def test_get_http_route + # Create test objects. + client_result = ::Google::Cloud::NetworkServices::V1::HttpRoute.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_http_route_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_get_http_route_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_http_route_client_stub do + # Create client + c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_http_route({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_http_route name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_http_route ::Google::Cloud::NetworkServices::V1::GetHttpRouteRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_http_route({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_http_route(::Google::Cloud::NetworkServices::V1::GetHttpRouteRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_http_route_client_stub.call_count + end + end + end + + def test_create_http_route + # 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" + http_route_id = "hello world" + http_route = {} + request_id = "hello world" + + create_http_route_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_create_http_route_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_http_route_client_stub do + # Create client + c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.create_http_route({ parent: parent, http_route_id: http_route_id, http_route: http_route, request_id: request_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.create_http_route parent: parent, http_route_id: http_route_id, http_route: http_route, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.create_http_route ::Google::Cloud::NetworkServices::V1::CreateHttpRouteRequest.new(parent: parent, http_route_id: http_route_id, http_route: http_route, request_id: request_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.create_http_route({ parent: parent, http_route_id: http_route_id, http_route: http_route, request_id: request_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.create_http_route(::Google::Cloud::NetworkServices::V1::CreateHttpRouteRequest.new(parent: parent, http_route_id: http_route_id, http_route: http_route, request_id: request_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_http_route_client_stub.call_count + end + end + end + + def test_update_http_route + # 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 = {} + http_route = {} + + update_http_route_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_update_http_route_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_http_route_client_stub do + # Create client + c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.update_http_route({ update_mask: update_mask, http_route: http_route }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.update_http_route update_mask: update_mask, http_route: http_route do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.update_http_route ::Google::Cloud::NetworkServices::V1::UpdateHttpRouteRequest.new(update_mask: update_mask, http_route: http_route) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.update_http_route({ update_mask: update_mask, http_route: http_route }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.update_http_route(::Google::Cloud::NetworkServices::V1::UpdateHttpRouteRequest.new(update_mask: update_mask, http_route: http_route), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_http_route_client_stub.call_count + end + end + end + + def test_delete_http_route + # 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_http_route_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_delete_http_route_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_http_route_client_stub do + # Create client + c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.delete_http_route({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.delete_http_route name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.delete_http_route ::Google::Cloud::NetworkServices::V1::DeleteHttpRouteRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.delete_http_route({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.delete_http_route(::Google::Cloud::NetworkServices::V1::DeleteHttpRouteRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_http_route_client_stub.call_count + end + end + end + + def test_list_tcp_routes + # Create test objects. + client_result = ::Google::Cloud::NetworkServices::V1::ListTcpRoutesResponse.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" + return_partial_success = true + + list_tcp_routes_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_list_tcp_routes_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_tcp_routes_client_stub do + # Create client + c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_tcp_routes({ parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.list_tcp_routes parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.list_tcp_routes ::Google::Cloud::NetworkServices::V1::ListTcpRoutesRequest.new(parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.list_tcp_routes({ parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.list_tcp_routes(::Google::Cloud::NetworkServices::V1::ListTcpRoutesRequest.new(parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_tcp_routes_client_stub.call_count + end + end + end + + def test_get_tcp_route + # Create test objects. + client_result = ::Google::Cloud::NetworkServices::V1::TcpRoute.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_tcp_route_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_get_tcp_route_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_tcp_route_client_stub do + # Create client + c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_tcp_route({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_tcp_route name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_tcp_route ::Google::Cloud::NetworkServices::V1::GetTcpRouteRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_tcp_route({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_tcp_route(::Google::Cloud::NetworkServices::V1::GetTcpRouteRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_tcp_route_client_stub.call_count + end + end + end + + def test_create_tcp_route + # 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" + tcp_route_id = "hello world" + tcp_route = {} + + create_tcp_route_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_create_tcp_route_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_tcp_route_client_stub do + # Create client + c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.create_tcp_route({ parent: parent, tcp_route_id: tcp_route_id, tcp_route: tcp_route }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.create_tcp_route parent: parent, tcp_route_id: tcp_route_id, tcp_route: tcp_route do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.create_tcp_route ::Google::Cloud::NetworkServices::V1::CreateTcpRouteRequest.new(parent: parent, tcp_route_id: tcp_route_id, tcp_route: tcp_route) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.create_tcp_route({ parent: parent, tcp_route_id: tcp_route_id, tcp_route: tcp_route }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.create_tcp_route(::Google::Cloud::NetworkServices::V1::CreateTcpRouteRequest.new(parent: parent, tcp_route_id: tcp_route_id, tcp_route: tcp_route), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_tcp_route_client_stub.call_count + end + end + end + + def test_update_tcp_route + # 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 = {} + tcp_route = {} + + update_tcp_route_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_update_tcp_route_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_tcp_route_client_stub do + # Create client + c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.update_tcp_route({ update_mask: update_mask, tcp_route: tcp_route }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.update_tcp_route update_mask: update_mask, tcp_route: tcp_route do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.update_tcp_route ::Google::Cloud::NetworkServices::V1::UpdateTcpRouteRequest.new(update_mask: update_mask, tcp_route: tcp_route) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.update_tcp_route({ update_mask: update_mask, tcp_route: tcp_route }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.update_tcp_route(::Google::Cloud::NetworkServices::V1::UpdateTcpRouteRequest.new(update_mask: update_mask, tcp_route: tcp_route), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_tcp_route_client_stub.call_count + end + end + end + + def test_delete_tcp_route + # 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_tcp_route_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_delete_tcp_route_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_tcp_route_client_stub do + # Create client + c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.delete_tcp_route({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.delete_tcp_route name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.delete_tcp_route ::Google::Cloud::NetworkServices::V1::DeleteTcpRouteRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.delete_tcp_route({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.delete_tcp_route(::Google::Cloud::NetworkServices::V1::DeleteTcpRouteRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_tcp_route_client_stub.call_count + end + end + end + + def test_list_tls_routes + # Create test objects. + client_result = ::Google::Cloud::NetworkServices::V1::ListTlsRoutesResponse.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" + return_partial_success = true + + list_tls_routes_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_list_tls_routes_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_tls_routes_client_stub do + # Create client + c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_tls_routes({ parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.list_tls_routes parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.list_tls_routes ::Google::Cloud::NetworkServices::V1::ListTlsRoutesRequest.new(parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.list_tls_routes({ parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.list_tls_routes(::Google::Cloud::NetworkServices::V1::ListTlsRoutesRequest.new(parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_tls_routes_client_stub.call_count + end + end + end + + def test_get_tls_route + # Create test objects. + client_result = ::Google::Cloud::NetworkServices::V1::TlsRoute.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_tls_route_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_get_tls_route_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_tls_route_client_stub do + # Create client + c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_tls_route({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_tls_route name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_tls_route ::Google::Cloud::NetworkServices::V1::GetTlsRouteRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_tls_route({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_tls_route(::Google::Cloud::NetworkServices::V1::GetTlsRouteRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_tls_route_client_stub.call_count + end + end + end + + def test_create_tls_route + # 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" + tls_route_id = "hello world" + tls_route = {} + + create_tls_route_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_create_tls_route_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_tls_route_client_stub do + # Create client + c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.create_tls_route({ parent: parent, tls_route_id: tls_route_id, tls_route: tls_route }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.create_tls_route parent: parent, tls_route_id: tls_route_id, tls_route: tls_route do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.create_tls_route ::Google::Cloud::NetworkServices::V1::CreateTlsRouteRequest.new(parent: parent, tls_route_id: tls_route_id, tls_route: tls_route) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.create_tls_route({ parent: parent, tls_route_id: tls_route_id, tls_route: tls_route }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.create_tls_route(::Google::Cloud::NetworkServices::V1::CreateTlsRouteRequest.new(parent: parent, tls_route_id: tls_route_id, tls_route: tls_route), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_tls_route_client_stub.call_count + end + end + end + + def test_update_tls_route + # 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 = {} + tls_route = {} + + update_tls_route_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_update_tls_route_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_tls_route_client_stub do + # Create client + c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.update_tls_route({ update_mask: update_mask, tls_route: tls_route }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.update_tls_route update_mask: update_mask, tls_route: tls_route do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.update_tls_route ::Google::Cloud::NetworkServices::V1::UpdateTlsRouteRequest.new(update_mask: update_mask, tls_route: tls_route) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.update_tls_route({ update_mask: update_mask, tls_route: tls_route }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.update_tls_route(::Google::Cloud::NetworkServices::V1::UpdateTlsRouteRequest.new(update_mask: update_mask, tls_route: tls_route), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_tls_route_client_stub.call_count + end + end + end + + def test_delete_tls_route + # 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_tls_route_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_delete_tls_route_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_tls_route_client_stub do + # Create client + c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.delete_tls_route({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.delete_tls_route name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.delete_tls_route ::Google::Cloud::NetworkServices::V1::DeleteTlsRouteRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.delete_tls_route({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.delete_tls_route(::Google::Cloud::NetworkServices::V1::DeleteTlsRouteRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_tls_route_client_stub.call_count + end + end + end + + def test_list_service_bindings + # Create test objects. + client_result = ::Google::Cloud::NetworkServices::V1::ListServiceBindingsResponse.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" + + list_service_bindings_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_list_service_bindings_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_service_bindings_client_stub do + # Create client + c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_service_bindings({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.list_service_bindings parent: parent, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.list_service_bindings ::Google::Cloud::NetworkServices::V1::ListServiceBindingsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.list_service_bindings({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.list_service_bindings(::Google::Cloud::NetworkServices::V1::ListServiceBindingsRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_service_bindings_client_stub.call_count + end + end + end + + def test_get_service_binding + # Create test objects. + client_result = ::Google::Cloud::NetworkServices::V1::ServiceBinding.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_service_binding_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_get_service_binding_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_service_binding_client_stub do + # Create client + c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_service_binding({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_service_binding name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_service_binding ::Google::Cloud::NetworkServices::V1::GetServiceBindingRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_service_binding({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_service_binding(::Google::Cloud::NetworkServices::V1::GetServiceBindingRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_service_binding_client_stub.call_count + end + end + end + + def test_create_service_binding + # 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" + service_binding_id = "hello world" + service_binding = {} + + create_service_binding_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_create_service_binding_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_service_binding_client_stub do + # Create client + c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.create_service_binding({ parent: parent, service_binding_id: service_binding_id, service_binding: service_binding }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.create_service_binding parent: parent, service_binding_id: service_binding_id, service_binding: service_binding do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.create_service_binding ::Google::Cloud::NetworkServices::V1::CreateServiceBindingRequest.new(parent: parent, service_binding_id: service_binding_id, service_binding: service_binding) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.create_service_binding({ parent: parent, service_binding_id: service_binding_id, service_binding: service_binding }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.create_service_binding(::Google::Cloud::NetworkServices::V1::CreateServiceBindingRequest.new(parent: parent, service_binding_id: service_binding_id, service_binding: service_binding), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_service_binding_client_stub.call_count + end + end + end + + def test_update_service_binding + # 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 = {} + service_binding = {} + + update_service_binding_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_update_service_binding_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_service_binding_client_stub do + # Create client + c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.update_service_binding({ update_mask: update_mask, service_binding: service_binding }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.update_service_binding update_mask: update_mask, service_binding: service_binding do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.update_service_binding ::Google::Cloud::NetworkServices::V1::UpdateServiceBindingRequest.new(update_mask: update_mask, service_binding: service_binding) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.update_service_binding({ update_mask: update_mask, service_binding: service_binding }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.update_service_binding(::Google::Cloud::NetworkServices::V1::UpdateServiceBindingRequest.new(update_mask: update_mask, service_binding: service_binding), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_service_binding_client_stub.call_count + end + end + end + + def test_delete_service_binding + # 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_service_binding_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_delete_service_binding_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_service_binding_client_stub do + # Create client + c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.delete_service_binding({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.delete_service_binding name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.delete_service_binding ::Google::Cloud::NetworkServices::V1::DeleteServiceBindingRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.delete_service_binding({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.delete_service_binding(::Google::Cloud::NetworkServices::V1::DeleteServiceBindingRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_service_binding_client_stub.call_count + end + end + end + + def test_list_meshes + # Create test objects. + client_result = ::Google::Cloud::NetworkServices::V1::ListMeshesResponse.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" + return_partial_success = true + + list_meshes_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_list_meshes_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_meshes_client_stub do + # Create client + c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_meshes({ parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.list_meshes parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.list_meshes ::Google::Cloud::NetworkServices::V1::ListMeshesRequest.new(parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.list_meshes({ parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.list_meshes(::Google::Cloud::NetworkServices::V1::ListMeshesRequest.new(parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_meshes_client_stub.call_count + end + end + end + + def test_get_mesh + # Create test objects. + client_result = ::Google::Cloud::NetworkServices::V1::Mesh.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_mesh_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_get_mesh_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_mesh_client_stub do + # Create client + c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_mesh({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_mesh name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_mesh ::Google::Cloud::NetworkServices::V1::GetMeshRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_mesh({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_mesh(::Google::Cloud::NetworkServices::V1::GetMeshRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_mesh_client_stub.call_count + end + end + end + + def test_create_mesh + # 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" + mesh_id = "hello world" + mesh = {} + + create_mesh_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_create_mesh_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_mesh_client_stub do + # Create client + c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.create_mesh({ parent: parent, mesh_id: mesh_id, mesh: mesh }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.create_mesh parent: parent, mesh_id: mesh_id, mesh: mesh do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.create_mesh ::Google::Cloud::NetworkServices::V1::CreateMeshRequest.new(parent: parent, mesh_id: mesh_id, mesh: mesh) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.create_mesh({ parent: parent, mesh_id: mesh_id, mesh: mesh }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.create_mesh(::Google::Cloud::NetworkServices::V1::CreateMeshRequest.new(parent: parent, mesh_id: mesh_id, mesh: mesh), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_mesh_client_stub.call_count + end + end + end + + def test_update_mesh + # 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 = {} + mesh = {} + + update_mesh_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_update_mesh_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_mesh_client_stub do + # Create client + c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.update_mesh({ update_mask: update_mask, mesh: mesh }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.update_mesh update_mask: update_mask, mesh: mesh do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.update_mesh ::Google::Cloud::NetworkServices::V1::UpdateMeshRequest.new(update_mask: update_mask, mesh: mesh) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.update_mesh({ update_mask: update_mask, mesh: mesh }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.update_mesh(::Google::Cloud::NetworkServices::V1::UpdateMeshRequest.new(update_mask: update_mask, mesh: mesh), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_mesh_client_stub.call_count + end + end + end + + def test_delete_mesh + # 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_mesh_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_delete_mesh_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_mesh_client_stub do + # Create client + c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.delete_mesh({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.delete_mesh name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.delete_mesh ::Google::Cloud::NetworkServices::V1::DeleteMeshRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.delete_mesh({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.delete_mesh(::Google::Cloud::NetworkServices::V1::DeleteMeshRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_mesh_client_stub.call_count + end + end + end + + def test_list_service_lb_policies + # Create test objects. + client_result = ::Google::Cloud::NetworkServices::V1::ListServiceLbPoliciesResponse.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" + + list_service_lb_policies_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_list_service_lb_policies_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_service_lb_policies_client_stub do + # Create client + c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_service_lb_policies({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.list_service_lb_policies parent: parent, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.list_service_lb_policies ::Google::Cloud::NetworkServices::V1::ListServiceLbPoliciesRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.list_service_lb_policies({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.list_service_lb_policies(::Google::Cloud::NetworkServices::V1::ListServiceLbPoliciesRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_service_lb_policies_client_stub.call_count + end + end + end + + def test_get_service_lb_policy + # Create test objects. + client_result = ::Google::Cloud::NetworkServices::V1::ServiceLbPolicy.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_service_lb_policy_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_get_service_lb_policy_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_service_lb_policy_client_stub do + # Create client + c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_service_lb_policy({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_service_lb_policy name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_service_lb_policy ::Google::Cloud::NetworkServices::V1::GetServiceLbPolicyRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_service_lb_policy({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_service_lb_policy(::Google::Cloud::NetworkServices::V1::GetServiceLbPolicyRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_service_lb_policy_client_stub.call_count + end + end + end + + def test_create_service_lb_policy + # 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" + service_lb_policy_id = "hello world" + service_lb_policy = {} + + create_service_lb_policy_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_create_service_lb_policy_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_service_lb_policy_client_stub do + # Create client + c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.create_service_lb_policy({ parent: parent, service_lb_policy_id: service_lb_policy_id, service_lb_policy: service_lb_policy }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.create_service_lb_policy parent: parent, service_lb_policy_id: service_lb_policy_id, service_lb_policy: service_lb_policy do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.create_service_lb_policy ::Google::Cloud::NetworkServices::V1::CreateServiceLbPolicyRequest.new(parent: parent, service_lb_policy_id: service_lb_policy_id, service_lb_policy: service_lb_policy) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.create_service_lb_policy({ parent: parent, service_lb_policy_id: service_lb_policy_id, service_lb_policy: service_lb_policy }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.create_service_lb_policy(::Google::Cloud::NetworkServices::V1::CreateServiceLbPolicyRequest.new(parent: parent, service_lb_policy_id: service_lb_policy_id, service_lb_policy: service_lb_policy), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_service_lb_policy_client_stub.call_count + end + end + end + + def test_update_service_lb_policy + # 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 = {} + service_lb_policy = {} + + update_service_lb_policy_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_update_service_lb_policy_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_service_lb_policy_client_stub do + # Create client + c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.update_service_lb_policy({ update_mask: update_mask, service_lb_policy: service_lb_policy }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.update_service_lb_policy update_mask: update_mask, service_lb_policy: service_lb_policy do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.update_service_lb_policy ::Google::Cloud::NetworkServices::V1::UpdateServiceLbPolicyRequest.new(update_mask: update_mask, service_lb_policy: service_lb_policy) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.update_service_lb_policy({ update_mask: update_mask, service_lb_policy: service_lb_policy }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.update_service_lb_policy(::Google::Cloud::NetworkServices::V1::UpdateServiceLbPolicyRequest.new(update_mask: update_mask, service_lb_policy: service_lb_policy), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_service_lb_policy_client_stub.call_count + end + end + end + + def test_delete_service_lb_policy + # 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_service_lb_policy_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_delete_service_lb_policy_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_service_lb_policy_client_stub do + # Create client + c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.delete_service_lb_policy({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.delete_service_lb_policy name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.delete_service_lb_policy ::Google::Cloud::NetworkServices::V1::DeleteServiceLbPolicyRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.delete_service_lb_policy({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.delete_service_lb_policy(::Google::Cloud::NetworkServices::V1::DeleteServiceLbPolicyRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_service_lb_policy_client_stub.call_count + end + end + end + + def test_get_gateway_route_view + # Create test objects. + client_result = ::Google::Cloud::NetworkServices::V1::GatewayRouteView.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_gateway_route_view_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_get_gateway_route_view_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_gateway_route_view_client_stub do + # Create client + c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_gateway_route_view({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_gateway_route_view name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_gateway_route_view ::Google::Cloud::NetworkServices::V1::GetGatewayRouteViewRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_gateway_route_view({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_gateway_route_view(::Google::Cloud::NetworkServices::V1::GetGatewayRouteViewRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_gateway_route_view_client_stub.call_count + end + end + end + + def test_get_mesh_route_view + # Create test objects. + client_result = ::Google::Cloud::NetworkServices::V1::MeshRouteView.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_mesh_route_view_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_get_mesh_route_view_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_mesh_route_view_client_stub do + # Create client + c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_mesh_route_view({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_mesh_route_view name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_mesh_route_view ::Google::Cloud::NetworkServices::V1::GetMeshRouteViewRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_mesh_route_view({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_mesh_route_view(::Google::Cloud::NetworkServices::V1::GetMeshRouteViewRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_mesh_route_view_client_stub.call_count + end + end + end + + def test_list_gateway_route_views + # Create test objects. + client_result = ::Google::Cloud::NetworkServices::V1::ListGatewayRouteViewsResponse.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" + + list_gateway_route_views_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_list_gateway_route_views_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_gateway_route_views_client_stub do + # Create client + c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_gateway_route_views({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.list_gateway_route_views parent: parent, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.list_gateway_route_views ::Google::Cloud::NetworkServices::V1::ListGatewayRouteViewsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.list_gateway_route_views({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.list_gateway_route_views(::Google::Cloud::NetworkServices::V1::ListGatewayRouteViewsRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_gateway_route_views_client_stub.call_count + end + end + end + + def test_list_mesh_route_views + # Create test objects. + client_result = ::Google::Cloud::NetworkServices::V1::ListMeshRouteViewsResponse.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" + + list_mesh_route_views_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_list_mesh_route_views_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_mesh_route_views_client_stub do + # Create client + c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_mesh_route_views({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.list_mesh_route_views parent: parent, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.list_mesh_route_views ::Google::Cloud::NetworkServices::V1::ListMeshRouteViewsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.list_mesh_route_views({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.list_mesh_route_views(::Google::Cloud::NetworkServices::V1::ListMeshRouteViewsRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_mesh_route_views_client_stub.call_count + end + end + end + + def test_list_agent_gateways + # Create test objects. + client_result = ::Google::Cloud::NetworkServices::V1::ListAgentGatewaysResponse.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" + return_partial_success = true + + list_agent_gateways_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_list_agent_gateways_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_agent_gateways_client_stub do + # Create client + c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_agent_gateways({ parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.list_agent_gateways parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.list_agent_gateways ::Google::Cloud::NetworkServices::V1::ListAgentGatewaysRequest.new(parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.list_agent_gateways({ parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.list_agent_gateways(::Google::Cloud::NetworkServices::V1::ListAgentGatewaysRequest.new(parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_agent_gateways_client_stub.call_count + end + end + end + + def test_get_agent_gateway + # Create test objects. + client_result = ::Google::Cloud::NetworkServices::V1::AgentGateway.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_agent_gateway_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_get_agent_gateway_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_agent_gateway_client_stub do + # Create client + c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_agent_gateway({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_agent_gateway name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_agent_gateway ::Google::Cloud::NetworkServices::V1::GetAgentGatewayRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_agent_gateway({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_agent_gateway(::Google::Cloud::NetworkServices::V1::GetAgentGatewayRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_agent_gateway_client_stub.call_count + end + end + end + + def test_create_agent_gateway + # 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" + agent_gateway_id = "hello world" + agent_gateway = {} + + create_agent_gateway_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_create_agent_gateway_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_agent_gateway_client_stub do + # Create client + c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.create_agent_gateway({ parent: parent, agent_gateway_id: agent_gateway_id, agent_gateway: agent_gateway }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.create_agent_gateway parent: parent, agent_gateway_id: agent_gateway_id, agent_gateway: agent_gateway do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.create_agent_gateway ::Google::Cloud::NetworkServices::V1::CreateAgentGatewayRequest.new(parent: parent, agent_gateway_id: agent_gateway_id, agent_gateway: agent_gateway) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.create_agent_gateway({ parent: parent, agent_gateway_id: agent_gateway_id, agent_gateway: agent_gateway }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.create_agent_gateway(::Google::Cloud::NetworkServices::V1::CreateAgentGatewayRequest.new(parent: parent, agent_gateway_id: agent_gateway_id, agent_gateway: agent_gateway), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_agent_gateway_client_stub.call_count + end + end + end + + def test_update_agent_gateway + # 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 = {} + agent_gateway = {} + + update_agent_gateway_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_update_agent_gateway_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_agent_gateway_client_stub do + # Create client + c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.update_agent_gateway({ update_mask: update_mask, agent_gateway: agent_gateway }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.update_agent_gateway update_mask: update_mask, agent_gateway: agent_gateway do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.update_agent_gateway ::Google::Cloud::NetworkServices::V1::UpdateAgentGatewayRequest.new(update_mask: update_mask, agent_gateway: agent_gateway) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.update_agent_gateway({ update_mask: update_mask, agent_gateway: agent_gateway }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.update_agent_gateway(::Google::Cloud::NetworkServices::V1::UpdateAgentGatewayRequest.new(update_mask: update_mask, agent_gateway: agent_gateway), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_agent_gateway_client_stub.call_count + end + end + end + + def test_delete_agent_gateway + # 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" + etag = "hello world" + + delete_agent_gateway_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_delete_agent_gateway_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_agent_gateway_client_stub do + # Create client + c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.delete_agent_gateway({ name: name, etag: etag }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.delete_agent_gateway name: name, etag: etag do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.delete_agent_gateway ::Google::Cloud::NetworkServices::V1::DeleteAgentGatewayRequest.new(name: name, etag: etag) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.delete_agent_gateway({ name: name, etag: etag }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.delete_agent_gateway(::Google::Cloud::NetworkServices::V1::DeleteAgentGatewayRequest.new(name: name, etag: etag), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_agent_gateway_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::NetworkServices::V1::NetworkServices::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::NetworkServices::V1::NetworkServices::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-network_services-v1/test/google/cloud/network_services/v1/network_services_test.rb b/owl-bot-staging/google-cloud-network_services-v1/test/google/cloud/network_services/v1/network_services_test.rb new file mode 100644 index 000000000000..fdcf703cac35 --- /dev/null +++ b/owl-bot-staging/google-cloud-network_services-v1/test/google/cloud/network_services/v1/network_services_test.rb @@ -0,0 +1,4165 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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/networkservices/v1/network_services_pb" +require "google/cloud/network_services/v1/network_services" + +class ::Google::Cloud::NetworkServices::V1::NetworkServices::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_endpoint_policies + # Create GRPC objects. + grpc_response = ::Google::Cloud::NetworkServices::V1::ListEndpointPoliciesResponse.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" + return_partial_success = true + + list_endpoint_policies_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_endpoint_policies, name + assert_kind_of ::Google::Cloud::NetworkServices::V1::ListEndpointPoliciesRequest, request + assert_equal "hello world", request["parent"] + 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_endpoint_policies_client_stub do + # Create client + c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_endpoint_policies({ parent: parent, 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 + c.list_endpoint_policies parent: parent, 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 + c.list_endpoint_policies ::Google::Cloud::NetworkServices::V1::ListEndpointPoliciesRequest.new(parent: parent, 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 + c.list_endpoint_policies({ parent: parent, 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 + c.list_endpoint_policies(::Google::Cloud::NetworkServices::V1::ListEndpointPoliciesRequest.new(parent: parent, 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_endpoint_policies_client_stub.call_rpc_count + end + end + + def test_get_endpoint_policy + # Create GRPC objects. + grpc_response = ::Google::Cloud::NetworkServices::V1::EndpointPolicy.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_endpoint_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_endpoint_policy, name + assert_kind_of ::Google::Cloud::NetworkServices::V1::GetEndpointPolicyRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_endpoint_policy_client_stub do + # Create client + c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_endpoint_policy({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_endpoint_policy name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_endpoint_policy ::Google::Cloud::NetworkServices::V1::GetEndpointPolicyRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_endpoint_policy({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_endpoint_policy(::Google::Cloud::NetworkServices::V1::GetEndpointPolicyRequest.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_endpoint_policy_client_stub.call_rpc_count + end + end + + def test_create_endpoint_policy + # 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" + endpoint_policy_id = "hello world" + endpoint_policy = {} + + create_endpoint_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_endpoint_policy, name + assert_kind_of ::Google::Cloud::NetworkServices::V1::CreateEndpointPolicyRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["endpoint_policy_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::NetworkServices::V1::EndpointPolicy), request["endpoint_policy"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_endpoint_policy_client_stub do + # Create client + c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.create_endpoint_policy({ parent: parent, endpoint_policy_id: endpoint_policy_id, endpoint_policy: endpoint_policy }) 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 + c.create_endpoint_policy parent: parent, endpoint_policy_id: endpoint_policy_id, endpoint_policy: endpoint_policy 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 + c.create_endpoint_policy ::Google::Cloud::NetworkServices::V1::CreateEndpointPolicyRequest.new(parent: parent, endpoint_policy_id: endpoint_policy_id, endpoint_policy: endpoint_policy) 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 + c.create_endpoint_policy({ parent: parent, endpoint_policy_id: endpoint_policy_id, endpoint_policy: endpoint_policy }, 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 + c.create_endpoint_policy(::Google::Cloud::NetworkServices::V1::CreateEndpointPolicyRequest.new(parent: parent, endpoint_policy_id: endpoint_policy_id, endpoint_policy: endpoint_policy), 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_endpoint_policy_client_stub.call_rpc_count + end + end + + def test_update_endpoint_policy + # 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 = {} + endpoint_policy = {} + + update_endpoint_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_endpoint_policy, name + assert_kind_of ::Google::Cloud::NetworkServices::V1::UpdateEndpointPolicyRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::NetworkServices::V1::EndpointPolicy), request["endpoint_policy"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_endpoint_policy_client_stub do + # Create client + c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.update_endpoint_policy({ update_mask: update_mask, endpoint_policy: endpoint_policy }) 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 + c.update_endpoint_policy update_mask: update_mask, endpoint_policy: endpoint_policy 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 + c.update_endpoint_policy ::Google::Cloud::NetworkServices::V1::UpdateEndpointPolicyRequest.new(update_mask: update_mask, endpoint_policy: endpoint_policy) 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 + c.update_endpoint_policy({ update_mask: update_mask, endpoint_policy: endpoint_policy }, 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 + c.update_endpoint_policy(::Google::Cloud::NetworkServices::V1::UpdateEndpointPolicyRequest.new(update_mask: update_mask, endpoint_policy: endpoint_policy), 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_endpoint_policy_client_stub.call_rpc_count + end + end + + def test_delete_endpoint_policy + # 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_endpoint_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_endpoint_policy, name + assert_kind_of ::Google::Cloud::NetworkServices::V1::DeleteEndpointPolicyRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_endpoint_policy_client_stub do + # Create client + c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.delete_endpoint_policy({ 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 + c.delete_endpoint_policy 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 + c.delete_endpoint_policy ::Google::Cloud::NetworkServices::V1::DeleteEndpointPolicyRequest.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 + c.delete_endpoint_policy({ 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 + c.delete_endpoint_policy(::Google::Cloud::NetworkServices::V1::DeleteEndpointPolicyRequest.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_endpoint_policy_client_stub.call_rpc_count + end + end + + def test_list_wasm_plugin_versions + # Create GRPC objects. + grpc_response = ::Google::Cloud::NetworkServices::V1::ListWasmPluginVersionsResponse.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" + + list_wasm_plugin_versions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_wasm_plugin_versions, name + assert_kind_of ::Google::Cloud::NetworkServices::V1::ListWasmPluginVersionsRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_wasm_plugin_versions_client_stub do + # Create client + c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_wasm_plugin_versions({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_wasm_plugin_versions parent: parent, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.list_wasm_plugin_versions ::Google::Cloud::NetworkServices::V1::ListWasmPluginVersionsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.list_wasm_plugin_versions({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.list_wasm_plugin_versions(::Google::Cloud::NetworkServices::V1::ListWasmPluginVersionsRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_wasm_plugin_versions_client_stub.call_rpc_count + end + end + + def test_get_wasm_plugin_version + # Create GRPC objects. + grpc_response = ::Google::Cloud::NetworkServices::V1::WasmPluginVersion.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_wasm_plugin_version_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_wasm_plugin_version, name + assert_kind_of ::Google::Cloud::NetworkServices::V1::GetWasmPluginVersionRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_wasm_plugin_version_client_stub do + # Create client + c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_wasm_plugin_version({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_wasm_plugin_version name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_wasm_plugin_version ::Google::Cloud::NetworkServices::V1::GetWasmPluginVersionRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_wasm_plugin_version({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_wasm_plugin_version(::Google::Cloud::NetworkServices::V1::GetWasmPluginVersionRequest.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_wasm_plugin_version_client_stub.call_rpc_count + end + end + + def test_create_wasm_plugin_version + # 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" + wasm_plugin_version_id = "hello world" + wasm_plugin_version = {} + + create_wasm_plugin_version_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_wasm_plugin_version, name + assert_kind_of ::Google::Cloud::NetworkServices::V1::CreateWasmPluginVersionRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["wasm_plugin_version_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::NetworkServices::V1::WasmPluginVersion), request["wasm_plugin_version"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_wasm_plugin_version_client_stub do + # Create client + c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.create_wasm_plugin_version({ parent: parent, wasm_plugin_version_id: wasm_plugin_version_id, wasm_plugin_version: wasm_plugin_version }) 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 + c.create_wasm_plugin_version parent: parent, wasm_plugin_version_id: wasm_plugin_version_id, wasm_plugin_version: wasm_plugin_version 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 + c.create_wasm_plugin_version ::Google::Cloud::NetworkServices::V1::CreateWasmPluginVersionRequest.new(parent: parent, wasm_plugin_version_id: wasm_plugin_version_id, wasm_plugin_version: wasm_plugin_version) 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 + c.create_wasm_plugin_version({ parent: parent, wasm_plugin_version_id: wasm_plugin_version_id, wasm_plugin_version: wasm_plugin_version }, 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 + c.create_wasm_plugin_version(::Google::Cloud::NetworkServices::V1::CreateWasmPluginVersionRequest.new(parent: parent, wasm_plugin_version_id: wasm_plugin_version_id, wasm_plugin_version: wasm_plugin_version), 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_wasm_plugin_version_client_stub.call_rpc_count + end + end + + def test_delete_wasm_plugin_version + # 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_wasm_plugin_version_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_wasm_plugin_version, name + assert_kind_of ::Google::Cloud::NetworkServices::V1::DeleteWasmPluginVersionRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_wasm_plugin_version_client_stub do + # Create client + c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.delete_wasm_plugin_version({ 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 + c.delete_wasm_plugin_version 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 + c.delete_wasm_plugin_version ::Google::Cloud::NetworkServices::V1::DeleteWasmPluginVersionRequest.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 + c.delete_wasm_plugin_version({ 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 + c.delete_wasm_plugin_version(::Google::Cloud::NetworkServices::V1::DeleteWasmPluginVersionRequest.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_wasm_plugin_version_client_stub.call_rpc_count + end + end + + def test_list_wasm_plugins + # Create GRPC objects. + grpc_response = ::Google::Cloud::NetworkServices::V1::ListWasmPluginsResponse.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" + + list_wasm_plugins_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_wasm_plugins, name + assert_kind_of ::Google::Cloud::NetworkServices::V1::ListWasmPluginsRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_wasm_plugins_client_stub do + # Create client + c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_wasm_plugins({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_wasm_plugins parent: parent, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.list_wasm_plugins ::Google::Cloud::NetworkServices::V1::ListWasmPluginsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.list_wasm_plugins({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.list_wasm_plugins(::Google::Cloud::NetworkServices::V1::ListWasmPluginsRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_wasm_plugins_client_stub.call_rpc_count + end + end + + def test_get_wasm_plugin + # Create GRPC objects. + grpc_response = ::Google::Cloud::NetworkServices::V1::WasmPlugin.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" + view = :WASM_PLUGIN_VIEW_UNSPECIFIED + + get_wasm_plugin_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_wasm_plugin, name + assert_kind_of ::Google::Cloud::NetworkServices::V1::GetWasmPluginRequest, request + assert_equal "hello world", request["name"] + assert_equal :WASM_PLUGIN_VIEW_UNSPECIFIED, request["view"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_wasm_plugin_client_stub do + # Create client + c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_wasm_plugin({ name: name, view: view }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_wasm_plugin name: name, view: view do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_wasm_plugin ::Google::Cloud::NetworkServices::V1::GetWasmPluginRequest.new(name: name, view: view) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_wasm_plugin({ name: name, view: view }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_wasm_plugin(::Google::Cloud::NetworkServices::V1::GetWasmPluginRequest.new(name: name, view: view), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_wasm_plugin_client_stub.call_rpc_count + end + end + + def test_create_wasm_plugin + # 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" + wasm_plugin_id = "hello world" + wasm_plugin = {} + + create_wasm_plugin_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_wasm_plugin, name + assert_kind_of ::Google::Cloud::NetworkServices::V1::CreateWasmPluginRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["wasm_plugin_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::NetworkServices::V1::WasmPlugin), request["wasm_plugin"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_wasm_plugin_client_stub do + # Create client + c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.create_wasm_plugin({ parent: parent, wasm_plugin_id: wasm_plugin_id, wasm_plugin: wasm_plugin }) 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 + c.create_wasm_plugin parent: parent, wasm_plugin_id: wasm_plugin_id, wasm_plugin: wasm_plugin 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 + c.create_wasm_plugin ::Google::Cloud::NetworkServices::V1::CreateWasmPluginRequest.new(parent: parent, wasm_plugin_id: wasm_plugin_id, wasm_plugin: wasm_plugin) 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 + c.create_wasm_plugin({ parent: parent, wasm_plugin_id: wasm_plugin_id, wasm_plugin: wasm_plugin }, 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 + c.create_wasm_plugin(::Google::Cloud::NetworkServices::V1::CreateWasmPluginRequest.new(parent: parent, wasm_plugin_id: wasm_plugin_id, wasm_plugin: wasm_plugin), 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_wasm_plugin_client_stub.call_rpc_count + end + end + + def test_update_wasm_plugin + # 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 = {} + wasm_plugin = {} + + update_wasm_plugin_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_wasm_plugin, name + assert_kind_of ::Google::Cloud::NetworkServices::V1::UpdateWasmPluginRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::NetworkServices::V1::WasmPlugin), request["wasm_plugin"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_wasm_plugin_client_stub do + # Create client + c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.update_wasm_plugin({ update_mask: update_mask, wasm_plugin: wasm_plugin }) 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 + c.update_wasm_plugin update_mask: update_mask, wasm_plugin: wasm_plugin 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 + c.update_wasm_plugin ::Google::Cloud::NetworkServices::V1::UpdateWasmPluginRequest.new(update_mask: update_mask, wasm_plugin: wasm_plugin) 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 + c.update_wasm_plugin({ update_mask: update_mask, wasm_plugin: wasm_plugin }, 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 + c.update_wasm_plugin(::Google::Cloud::NetworkServices::V1::UpdateWasmPluginRequest.new(update_mask: update_mask, wasm_plugin: wasm_plugin), 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_wasm_plugin_client_stub.call_rpc_count + end + end + + def test_delete_wasm_plugin + # 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_wasm_plugin_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_wasm_plugin, name + assert_kind_of ::Google::Cloud::NetworkServices::V1::DeleteWasmPluginRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_wasm_plugin_client_stub do + # Create client + c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.delete_wasm_plugin({ 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 + c.delete_wasm_plugin 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 + c.delete_wasm_plugin ::Google::Cloud::NetworkServices::V1::DeleteWasmPluginRequest.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 + c.delete_wasm_plugin({ 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 + c.delete_wasm_plugin(::Google::Cloud::NetworkServices::V1::DeleteWasmPluginRequest.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_wasm_plugin_client_stub.call_rpc_count + end + end + + def test_list_gateways + # Create GRPC objects. + grpc_response = ::Google::Cloud::NetworkServices::V1::ListGatewaysResponse.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" + + list_gateways_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_gateways, name + assert_kind_of ::Google::Cloud::NetworkServices::V1::ListGatewaysRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_gateways_client_stub do + # Create client + c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_gateways({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_gateways parent: parent, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.list_gateways ::Google::Cloud::NetworkServices::V1::ListGatewaysRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.list_gateways({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.list_gateways(::Google::Cloud::NetworkServices::V1::ListGatewaysRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_gateways_client_stub.call_rpc_count + end + end + + def test_get_gateway + # Create GRPC objects. + grpc_response = ::Google::Cloud::NetworkServices::V1::Gateway.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_gateway_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_gateway, name + assert_kind_of ::Google::Cloud::NetworkServices::V1::GetGatewayRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_gateway_client_stub do + # Create client + c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_gateway({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_gateway name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_gateway ::Google::Cloud::NetworkServices::V1::GetGatewayRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_gateway({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_gateway(::Google::Cloud::NetworkServices::V1::GetGatewayRequest.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_gateway_client_stub.call_rpc_count + end + end + + def test_create_gateway + # 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" + gateway_id = "hello world" + gateway = {} + + create_gateway_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_gateway, name + assert_kind_of ::Google::Cloud::NetworkServices::V1::CreateGatewayRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["gateway_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::NetworkServices::V1::Gateway), request["gateway"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_gateway_client_stub do + # Create client + c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.create_gateway({ parent: parent, gateway_id: gateway_id, gateway: gateway }) 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 + c.create_gateway parent: parent, gateway_id: gateway_id, gateway: gateway 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 + c.create_gateway ::Google::Cloud::NetworkServices::V1::CreateGatewayRequest.new(parent: parent, gateway_id: gateway_id, gateway: gateway) 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 + c.create_gateway({ parent: parent, gateway_id: gateway_id, gateway: gateway }, 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 + c.create_gateway(::Google::Cloud::NetworkServices::V1::CreateGatewayRequest.new(parent: parent, gateway_id: gateway_id, gateway: gateway), 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_gateway_client_stub.call_rpc_count + end + end + + def test_update_gateway + # 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 = {} + gateway = {} + + update_gateway_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_gateway, name + assert_kind_of ::Google::Cloud::NetworkServices::V1::UpdateGatewayRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::NetworkServices::V1::Gateway), request["gateway"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_gateway_client_stub do + # Create client + c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.update_gateway({ update_mask: update_mask, gateway: gateway }) 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 + c.update_gateway update_mask: update_mask, gateway: gateway 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 + c.update_gateway ::Google::Cloud::NetworkServices::V1::UpdateGatewayRequest.new(update_mask: update_mask, gateway: gateway) 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 + c.update_gateway({ update_mask: update_mask, gateway: gateway }, 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 + c.update_gateway(::Google::Cloud::NetworkServices::V1::UpdateGatewayRequest.new(update_mask: update_mask, gateway: gateway), 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_gateway_client_stub.call_rpc_count + end + end + + def test_delete_gateway + # 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_gateway_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_gateway, name + assert_kind_of ::Google::Cloud::NetworkServices::V1::DeleteGatewayRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_gateway_client_stub do + # Create client + c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.delete_gateway({ 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 + c.delete_gateway 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 + c.delete_gateway ::Google::Cloud::NetworkServices::V1::DeleteGatewayRequest.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 + c.delete_gateway({ 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 + c.delete_gateway(::Google::Cloud::NetworkServices::V1::DeleteGatewayRequest.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_gateway_client_stub.call_rpc_count + end + end + + def test_list_grpc_routes + # Create GRPC objects. + grpc_response = ::Google::Cloud::NetworkServices::V1::ListGrpcRoutesResponse.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" + return_partial_success = true + + list_grpc_routes_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_grpc_routes, name + assert_kind_of ::Google::Cloud::NetworkServices::V1::ListGrpcRoutesRequest, request + assert_equal "hello world", request["parent"] + 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_grpc_routes_client_stub do + # Create client + c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_grpc_routes({ parent: parent, 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 + c.list_grpc_routes parent: parent, 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 + c.list_grpc_routes ::Google::Cloud::NetworkServices::V1::ListGrpcRoutesRequest.new(parent: parent, 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 + c.list_grpc_routes({ parent: parent, 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 + c.list_grpc_routes(::Google::Cloud::NetworkServices::V1::ListGrpcRoutesRequest.new(parent: parent, 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_grpc_routes_client_stub.call_rpc_count + end + end + + def test_get_grpc_route + # Create GRPC objects. + grpc_response = ::Google::Cloud::NetworkServices::V1::GrpcRoute.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_grpc_route_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_grpc_route, name + assert_kind_of ::Google::Cloud::NetworkServices::V1::GetGrpcRouteRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_grpc_route_client_stub do + # Create client + c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_grpc_route({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_grpc_route name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_grpc_route ::Google::Cloud::NetworkServices::V1::GetGrpcRouteRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_grpc_route({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_grpc_route(::Google::Cloud::NetworkServices::V1::GetGrpcRouteRequest.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_grpc_route_client_stub.call_rpc_count + end + end + + def test_create_grpc_route + # 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" + grpc_route_id = "hello world" + grpc_route = {} + + create_grpc_route_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_grpc_route, name + assert_kind_of ::Google::Cloud::NetworkServices::V1::CreateGrpcRouteRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["grpc_route_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::NetworkServices::V1::GrpcRoute), request["grpc_route"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_grpc_route_client_stub do + # Create client + c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.create_grpc_route({ parent: parent, grpc_route_id: grpc_route_id, grpc_route: grpc_route }) 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 + c.create_grpc_route parent: parent, grpc_route_id: grpc_route_id, grpc_route: grpc_route 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 + c.create_grpc_route ::Google::Cloud::NetworkServices::V1::CreateGrpcRouteRequest.new(parent: parent, grpc_route_id: grpc_route_id, grpc_route: grpc_route) 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 + c.create_grpc_route({ parent: parent, grpc_route_id: grpc_route_id, grpc_route: grpc_route }, 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 + c.create_grpc_route(::Google::Cloud::NetworkServices::V1::CreateGrpcRouteRequest.new(parent: parent, grpc_route_id: grpc_route_id, grpc_route: grpc_route), 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_grpc_route_client_stub.call_rpc_count + end + end + + def test_update_grpc_route + # 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 = {} + grpc_route = {} + + update_grpc_route_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_grpc_route, name + assert_kind_of ::Google::Cloud::NetworkServices::V1::UpdateGrpcRouteRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::NetworkServices::V1::GrpcRoute), request["grpc_route"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_grpc_route_client_stub do + # Create client + c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.update_grpc_route({ update_mask: update_mask, grpc_route: grpc_route }) 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 + c.update_grpc_route update_mask: update_mask, grpc_route: grpc_route 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 + c.update_grpc_route ::Google::Cloud::NetworkServices::V1::UpdateGrpcRouteRequest.new(update_mask: update_mask, grpc_route: grpc_route) 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 + c.update_grpc_route({ update_mask: update_mask, grpc_route: grpc_route }, 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 + c.update_grpc_route(::Google::Cloud::NetworkServices::V1::UpdateGrpcRouteRequest.new(update_mask: update_mask, grpc_route: grpc_route), 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_grpc_route_client_stub.call_rpc_count + end + end + + def test_delete_grpc_route + # 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_grpc_route_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_grpc_route, name + assert_kind_of ::Google::Cloud::NetworkServices::V1::DeleteGrpcRouteRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_grpc_route_client_stub do + # Create client + c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.delete_grpc_route({ 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 + c.delete_grpc_route 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 + c.delete_grpc_route ::Google::Cloud::NetworkServices::V1::DeleteGrpcRouteRequest.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 + c.delete_grpc_route({ 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 + c.delete_grpc_route(::Google::Cloud::NetworkServices::V1::DeleteGrpcRouteRequest.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_grpc_route_client_stub.call_rpc_count + end + end + + def test_list_http_routes + # Create GRPC objects. + grpc_response = ::Google::Cloud::NetworkServices::V1::ListHttpRoutesResponse.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" + return_partial_success = true + filter = "hello world" + + list_http_routes_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_http_routes, name + assert_kind_of ::Google::Cloud::NetworkServices::V1::ListHttpRoutesRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal true, request["return_partial_success"] + assert_equal "hello world", request["filter"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_http_routes_client_stub do + # Create client + c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_http_routes({ parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success, 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 + c.list_http_routes parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success, 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 + c.list_http_routes ::Google::Cloud::NetworkServices::V1::ListHttpRoutesRequest.new(parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success, 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 + c.list_http_routes({ parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success, 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 + c.list_http_routes(::Google::Cloud::NetworkServices::V1::ListHttpRoutesRequest.new(parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success, filter: filter), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_http_routes_client_stub.call_rpc_count + end + end + + def test_get_http_route + # Create GRPC objects. + grpc_response = ::Google::Cloud::NetworkServices::V1::HttpRoute.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_http_route_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_http_route, name + assert_kind_of ::Google::Cloud::NetworkServices::V1::GetHttpRouteRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_http_route_client_stub do + # Create client + c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_http_route({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_http_route name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_http_route ::Google::Cloud::NetworkServices::V1::GetHttpRouteRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_http_route({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_http_route(::Google::Cloud::NetworkServices::V1::GetHttpRouteRequest.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_http_route_client_stub.call_rpc_count + end + end + + def test_create_http_route + # 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" + http_route_id = "hello world" + http_route = {} + request_id = "hello world" + + create_http_route_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_http_route, name + assert_kind_of ::Google::Cloud::NetworkServices::V1::CreateHttpRouteRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["http_route_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::NetworkServices::V1::HttpRoute), request["http_route"] + assert_equal "hello world", request["request_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_http_route_client_stub do + # Create client + c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.create_http_route({ parent: parent, http_route_id: http_route_id, http_route: http_route, request_id: request_id }) 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 + c.create_http_route parent: parent, http_route_id: http_route_id, http_route: http_route, request_id: request_id 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 + c.create_http_route ::Google::Cloud::NetworkServices::V1::CreateHttpRouteRequest.new(parent: parent, http_route_id: http_route_id, http_route: http_route, request_id: request_id) 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 + c.create_http_route({ parent: parent, http_route_id: http_route_id, http_route: http_route, request_id: request_id }, 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 + c.create_http_route(::Google::Cloud::NetworkServices::V1::CreateHttpRouteRequest.new(parent: parent, http_route_id: http_route_id, http_route: http_route, request_id: request_id), 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_http_route_client_stub.call_rpc_count + end + end + + def test_update_http_route + # 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 = {} + http_route = {} + + update_http_route_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_http_route, name + assert_kind_of ::Google::Cloud::NetworkServices::V1::UpdateHttpRouteRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::NetworkServices::V1::HttpRoute), request["http_route"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_http_route_client_stub do + # Create client + c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.update_http_route({ update_mask: update_mask, http_route: http_route }) 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 + c.update_http_route update_mask: update_mask, http_route: http_route 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 + c.update_http_route ::Google::Cloud::NetworkServices::V1::UpdateHttpRouteRequest.new(update_mask: update_mask, http_route: http_route) 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 + c.update_http_route({ update_mask: update_mask, http_route: http_route }, 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 + c.update_http_route(::Google::Cloud::NetworkServices::V1::UpdateHttpRouteRequest.new(update_mask: update_mask, http_route: http_route), 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_http_route_client_stub.call_rpc_count + end + end + + def test_delete_http_route + # 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_http_route_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_http_route, name + assert_kind_of ::Google::Cloud::NetworkServices::V1::DeleteHttpRouteRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_http_route_client_stub do + # Create client + c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.delete_http_route({ 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 + c.delete_http_route 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 + c.delete_http_route ::Google::Cloud::NetworkServices::V1::DeleteHttpRouteRequest.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 + c.delete_http_route({ 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 + c.delete_http_route(::Google::Cloud::NetworkServices::V1::DeleteHttpRouteRequest.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_http_route_client_stub.call_rpc_count + end + end + + def test_list_tcp_routes + # Create GRPC objects. + grpc_response = ::Google::Cloud::NetworkServices::V1::ListTcpRoutesResponse.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" + return_partial_success = true + + list_tcp_routes_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_tcp_routes, name + assert_kind_of ::Google::Cloud::NetworkServices::V1::ListTcpRoutesRequest, request + assert_equal "hello world", request["parent"] + 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_tcp_routes_client_stub do + # Create client + c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_tcp_routes({ parent: parent, 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 + c.list_tcp_routes parent: parent, 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 + c.list_tcp_routes ::Google::Cloud::NetworkServices::V1::ListTcpRoutesRequest.new(parent: parent, 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 + c.list_tcp_routes({ parent: parent, 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 + c.list_tcp_routes(::Google::Cloud::NetworkServices::V1::ListTcpRoutesRequest.new(parent: parent, 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_tcp_routes_client_stub.call_rpc_count + end + end + + def test_get_tcp_route + # Create GRPC objects. + grpc_response = ::Google::Cloud::NetworkServices::V1::TcpRoute.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_tcp_route_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_tcp_route, name + assert_kind_of ::Google::Cloud::NetworkServices::V1::GetTcpRouteRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_tcp_route_client_stub do + # Create client + c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_tcp_route({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_tcp_route name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_tcp_route ::Google::Cloud::NetworkServices::V1::GetTcpRouteRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_tcp_route({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_tcp_route(::Google::Cloud::NetworkServices::V1::GetTcpRouteRequest.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_tcp_route_client_stub.call_rpc_count + end + end + + def test_create_tcp_route + # 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" + tcp_route_id = "hello world" + tcp_route = {} + + create_tcp_route_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_tcp_route, name + assert_kind_of ::Google::Cloud::NetworkServices::V1::CreateTcpRouteRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["tcp_route_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::NetworkServices::V1::TcpRoute), request["tcp_route"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_tcp_route_client_stub do + # Create client + c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.create_tcp_route({ parent: parent, tcp_route_id: tcp_route_id, tcp_route: tcp_route }) 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 + c.create_tcp_route parent: parent, tcp_route_id: tcp_route_id, tcp_route: tcp_route 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 + c.create_tcp_route ::Google::Cloud::NetworkServices::V1::CreateTcpRouteRequest.new(parent: parent, tcp_route_id: tcp_route_id, tcp_route: tcp_route) 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 + c.create_tcp_route({ parent: parent, tcp_route_id: tcp_route_id, tcp_route: tcp_route }, 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 + c.create_tcp_route(::Google::Cloud::NetworkServices::V1::CreateTcpRouteRequest.new(parent: parent, tcp_route_id: tcp_route_id, tcp_route: tcp_route), 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_tcp_route_client_stub.call_rpc_count + end + end + + def test_update_tcp_route + # 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 = {} + tcp_route = {} + + update_tcp_route_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_tcp_route, name + assert_kind_of ::Google::Cloud::NetworkServices::V1::UpdateTcpRouteRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::NetworkServices::V1::TcpRoute), request["tcp_route"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_tcp_route_client_stub do + # Create client + c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.update_tcp_route({ update_mask: update_mask, tcp_route: tcp_route }) 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 + c.update_tcp_route update_mask: update_mask, tcp_route: tcp_route 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 + c.update_tcp_route ::Google::Cloud::NetworkServices::V1::UpdateTcpRouteRequest.new(update_mask: update_mask, tcp_route: tcp_route) 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 + c.update_tcp_route({ update_mask: update_mask, tcp_route: tcp_route }, 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 + c.update_tcp_route(::Google::Cloud::NetworkServices::V1::UpdateTcpRouteRequest.new(update_mask: update_mask, tcp_route: tcp_route), 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_tcp_route_client_stub.call_rpc_count + end + end + + def test_delete_tcp_route + # 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_tcp_route_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_tcp_route, name + assert_kind_of ::Google::Cloud::NetworkServices::V1::DeleteTcpRouteRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_tcp_route_client_stub do + # Create client + c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.delete_tcp_route({ 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 + c.delete_tcp_route 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 + c.delete_tcp_route ::Google::Cloud::NetworkServices::V1::DeleteTcpRouteRequest.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 + c.delete_tcp_route({ 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 + c.delete_tcp_route(::Google::Cloud::NetworkServices::V1::DeleteTcpRouteRequest.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_tcp_route_client_stub.call_rpc_count + end + end + + def test_list_tls_routes + # Create GRPC objects. + grpc_response = ::Google::Cloud::NetworkServices::V1::ListTlsRoutesResponse.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" + return_partial_success = true + + list_tls_routes_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_tls_routes, name + assert_kind_of ::Google::Cloud::NetworkServices::V1::ListTlsRoutesRequest, request + assert_equal "hello world", request["parent"] + 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_tls_routes_client_stub do + # Create client + c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_tls_routes({ parent: parent, 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 + c.list_tls_routes parent: parent, 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 + c.list_tls_routes ::Google::Cloud::NetworkServices::V1::ListTlsRoutesRequest.new(parent: parent, 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 + c.list_tls_routes({ parent: parent, 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 + c.list_tls_routes(::Google::Cloud::NetworkServices::V1::ListTlsRoutesRequest.new(parent: parent, 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_tls_routes_client_stub.call_rpc_count + end + end + + def test_get_tls_route + # Create GRPC objects. + grpc_response = ::Google::Cloud::NetworkServices::V1::TlsRoute.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_tls_route_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_tls_route, name + assert_kind_of ::Google::Cloud::NetworkServices::V1::GetTlsRouteRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_tls_route_client_stub do + # Create client + c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_tls_route({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_tls_route name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_tls_route ::Google::Cloud::NetworkServices::V1::GetTlsRouteRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_tls_route({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_tls_route(::Google::Cloud::NetworkServices::V1::GetTlsRouteRequest.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_tls_route_client_stub.call_rpc_count + end + end + + def test_create_tls_route + # 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" + tls_route_id = "hello world" + tls_route = {} + + create_tls_route_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_tls_route, name + assert_kind_of ::Google::Cloud::NetworkServices::V1::CreateTlsRouteRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["tls_route_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::NetworkServices::V1::TlsRoute), request["tls_route"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_tls_route_client_stub do + # Create client + c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.create_tls_route({ parent: parent, tls_route_id: tls_route_id, tls_route: tls_route }) 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 + c.create_tls_route parent: parent, tls_route_id: tls_route_id, tls_route: tls_route 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 + c.create_tls_route ::Google::Cloud::NetworkServices::V1::CreateTlsRouteRequest.new(parent: parent, tls_route_id: tls_route_id, tls_route: tls_route) 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 + c.create_tls_route({ parent: parent, tls_route_id: tls_route_id, tls_route: tls_route }, 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 + c.create_tls_route(::Google::Cloud::NetworkServices::V1::CreateTlsRouteRequest.new(parent: parent, tls_route_id: tls_route_id, tls_route: tls_route), 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_tls_route_client_stub.call_rpc_count + end + end + + def test_update_tls_route + # 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 = {} + tls_route = {} + + update_tls_route_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_tls_route, name + assert_kind_of ::Google::Cloud::NetworkServices::V1::UpdateTlsRouteRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::NetworkServices::V1::TlsRoute), request["tls_route"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_tls_route_client_stub do + # Create client + c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.update_tls_route({ update_mask: update_mask, tls_route: tls_route }) 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 + c.update_tls_route update_mask: update_mask, tls_route: tls_route 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 + c.update_tls_route ::Google::Cloud::NetworkServices::V1::UpdateTlsRouteRequest.new(update_mask: update_mask, tls_route: tls_route) 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 + c.update_tls_route({ update_mask: update_mask, tls_route: tls_route }, 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 + c.update_tls_route(::Google::Cloud::NetworkServices::V1::UpdateTlsRouteRequest.new(update_mask: update_mask, tls_route: tls_route), 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_tls_route_client_stub.call_rpc_count + end + end + + def test_delete_tls_route + # 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_tls_route_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_tls_route, name + assert_kind_of ::Google::Cloud::NetworkServices::V1::DeleteTlsRouteRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_tls_route_client_stub do + # Create client + c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.delete_tls_route({ 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 + c.delete_tls_route 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 + c.delete_tls_route ::Google::Cloud::NetworkServices::V1::DeleteTlsRouteRequest.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 + c.delete_tls_route({ 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 + c.delete_tls_route(::Google::Cloud::NetworkServices::V1::DeleteTlsRouteRequest.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_tls_route_client_stub.call_rpc_count + end + end + + def test_list_service_bindings + # Create GRPC objects. + grpc_response = ::Google::Cloud::NetworkServices::V1::ListServiceBindingsResponse.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" + + list_service_bindings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_service_bindings, name + assert_kind_of ::Google::Cloud::NetworkServices::V1::ListServiceBindingsRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_service_bindings_client_stub do + # Create client + c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_service_bindings({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_service_bindings parent: parent, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.list_service_bindings ::Google::Cloud::NetworkServices::V1::ListServiceBindingsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.list_service_bindings({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.list_service_bindings(::Google::Cloud::NetworkServices::V1::ListServiceBindingsRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_service_bindings_client_stub.call_rpc_count + end + end + + def test_get_service_binding + # Create GRPC objects. + grpc_response = ::Google::Cloud::NetworkServices::V1::ServiceBinding.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_service_binding_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_service_binding, name + assert_kind_of ::Google::Cloud::NetworkServices::V1::GetServiceBindingRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_service_binding_client_stub do + # Create client + c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_service_binding({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_service_binding name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_service_binding ::Google::Cloud::NetworkServices::V1::GetServiceBindingRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_service_binding({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_service_binding(::Google::Cloud::NetworkServices::V1::GetServiceBindingRequest.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_service_binding_client_stub.call_rpc_count + end + end + + def test_create_service_binding + # 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" + service_binding_id = "hello world" + service_binding = {} + + create_service_binding_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_service_binding, name + assert_kind_of ::Google::Cloud::NetworkServices::V1::CreateServiceBindingRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["service_binding_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::NetworkServices::V1::ServiceBinding), request["service_binding"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_service_binding_client_stub do + # Create client + c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.create_service_binding({ parent: parent, service_binding_id: service_binding_id, service_binding: service_binding }) 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 + c.create_service_binding parent: parent, service_binding_id: service_binding_id, service_binding: service_binding 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 + c.create_service_binding ::Google::Cloud::NetworkServices::V1::CreateServiceBindingRequest.new(parent: parent, service_binding_id: service_binding_id, service_binding: service_binding) 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 + c.create_service_binding({ parent: parent, service_binding_id: service_binding_id, service_binding: service_binding }, 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 + c.create_service_binding(::Google::Cloud::NetworkServices::V1::CreateServiceBindingRequest.new(parent: parent, service_binding_id: service_binding_id, service_binding: service_binding), 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_service_binding_client_stub.call_rpc_count + end + end + + def test_update_service_binding + # 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 = {} + service_binding = {} + + update_service_binding_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_service_binding, name + assert_kind_of ::Google::Cloud::NetworkServices::V1::UpdateServiceBindingRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::NetworkServices::V1::ServiceBinding), request["service_binding"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_service_binding_client_stub do + # Create client + c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.update_service_binding({ update_mask: update_mask, service_binding: service_binding }) 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 + c.update_service_binding update_mask: update_mask, service_binding: service_binding 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 + c.update_service_binding ::Google::Cloud::NetworkServices::V1::UpdateServiceBindingRequest.new(update_mask: update_mask, service_binding: service_binding) 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 + c.update_service_binding({ update_mask: update_mask, service_binding: service_binding }, 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 + c.update_service_binding(::Google::Cloud::NetworkServices::V1::UpdateServiceBindingRequest.new(update_mask: update_mask, service_binding: service_binding), 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_service_binding_client_stub.call_rpc_count + end + end + + def test_delete_service_binding + # 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_service_binding_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_service_binding, name + assert_kind_of ::Google::Cloud::NetworkServices::V1::DeleteServiceBindingRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_service_binding_client_stub do + # Create client + c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.delete_service_binding({ 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 + c.delete_service_binding 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 + c.delete_service_binding ::Google::Cloud::NetworkServices::V1::DeleteServiceBindingRequest.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 + c.delete_service_binding({ 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 + c.delete_service_binding(::Google::Cloud::NetworkServices::V1::DeleteServiceBindingRequest.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_service_binding_client_stub.call_rpc_count + end + end + + def test_list_meshes + # Create GRPC objects. + grpc_response = ::Google::Cloud::NetworkServices::V1::ListMeshesResponse.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" + return_partial_success = true + + list_meshes_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_meshes, name + assert_kind_of ::Google::Cloud::NetworkServices::V1::ListMeshesRequest, request + assert_equal "hello world", request["parent"] + 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_meshes_client_stub do + # Create client + c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_meshes({ parent: parent, 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 + c.list_meshes parent: parent, 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 + c.list_meshes ::Google::Cloud::NetworkServices::V1::ListMeshesRequest.new(parent: parent, 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 + c.list_meshes({ parent: parent, 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 + c.list_meshes(::Google::Cloud::NetworkServices::V1::ListMeshesRequest.new(parent: parent, 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_meshes_client_stub.call_rpc_count + end + end + + def test_get_mesh + # Create GRPC objects. + grpc_response = ::Google::Cloud::NetworkServices::V1::Mesh.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_mesh_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_mesh, name + assert_kind_of ::Google::Cloud::NetworkServices::V1::GetMeshRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_mesh_client_stub do + # Create client + c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_mesh({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_mesh name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_mesh ::Google::Cloud::NetworkServices::V1::GetMeshRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_mesh({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_mesh(::Google::Cloud::NetworkServices::V1::GetMeshRequest.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_mesh_client_stub.call_rpc_count + end + end + + def test_create_mesh + # 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" + mesh_id = "hello world" + mesh = {} + + create_mesh_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_mesh, name + assert_kind_of ::Google::Cloud::NetworkServices::V1::CreateMeshRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["mesh_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::NetworkServices::V1::Mesh), request["mesh"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_mesh_client_stub do + # Create client + c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.create_mesh({ parent: parent, mesh_id: mesh_id, mesh: mesh }) 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 + c.create_mesh parent: parent, mesh_id: mesh_id, mesh: mesh 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 + c.create_mesh ::Google::Cloud::NetworkServices::V1::CreateMeshRequest.new(parent: parent, mesh_id: mesh_id, mesh: mesh) 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 + c.create_mesh({ parent: parent, mesh_id: mesh_id, mesh: mesh }, 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 + c.create_mesh(::Google::Cloud::NetworkServices::V1::CreateMeshRequest.new(parent: parent, mesh_id: mesh_id, mesh: mesh), 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_mesh_client_stub.call_rpc_count + end + end + + def test_update_mesh + # 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 = {} + mesh = {} + + update_mesh_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_mesh, name + assert_kind_of ::Google::Cloud::NetworkServices::V1::UpdateMeshRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::NetworkServices::V1::Mesh), request["mesh"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_mesh_client_stub do + # Create client + c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.update_mesh({ update_mask: update_mask, mesh: mesh }) 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 + c.update_mesh update_mask: update_mask, mesh: mesh 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 + c.update_mesh ::Google::Cloud::NetworkServices::V1::UpdateMeshRequest.new(update_mask: update_mask, mesh: mesh) 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 + c.update_mesh({ update_mask: update_mask, mesh: mesh }, 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 + c.update_mesh(::Google::Cloud::NetworkServices::V1::UpdateMeshRequest.new(update_mask: update_mask, mesh: mesh), 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_mesh_client_stub.call_rpc_count + end + end + + def test_delete_mesh + # 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_mesh_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_mesh, name + assert_kind_of ::Google::Cloud::NetworkServices::V1::DeleteMeshRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_mesh_client_stub do + # Create client + c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.delete_mesh({ 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 + c.delete_mesh 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 + c.delete_mesh ::Google::Cloud::NetworkServices::V1::DeleteMeshRequest.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 + c.delete_mesh({ 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 + c.delete_mesh(::Google::Cloud::NetworkServices::V1::DeleteMeshRequest.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_mesh_client_stub.call_rpc_count + end + end + + def test_list_service_lb_policies + # Create GRPC objects. + grpc_response = ::Google::Cloud::NetworkServices::V1::ListServiceLbPoliciesResponse.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" + + list_service_lb_policies_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_service_lb_policies, name + assert_kind_of ::Google::Cloud::NetworkServices::V1::ListServiceLbPoliciesRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_service_lb_policies_client_stub do + # Create client + c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_service_lb_policies({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_service_lb_policies parent: parent, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.list_service_lb_policies ::Google::Cloud::NetworkServices::V1::ListServiceLbPoliciesRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.list_service_lb_policies({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.list_service_lb_policies(::Google::Cloud::NetworkServices::V1::ListServiceLbPoliciesRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_service_lb_policies_client_stub.call_rpc_count + end + end + + def test_get_service_lb_policy + # Create GRPC objects. + grpc_response = ::Google::Cloud::NetworkServices::V1::ServiceLbPolicy.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_service_lb_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_service_lb_policy, name + assert_kind_of ::Google::Cloud::NetworkServices::V1::GetServiceLbPolicyRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_service_lb_policy_client_stub do + # Create client + c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_service_lb_policy({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_service_lb_policy name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_service_lb_policy ::Google::Cloud::NetworkServices::V1::GetServiceLbPolicyRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_service_lb_policy({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_service_lb_policy(::Google::Cloud::NetworkServices::V1::GetServiceLbPolicyRequest.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_service_lb_policy_client_stub.call_rpc_count + end + end + + def test_create_service_lb_policy + # 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" + service_lb_policy_id = "hello world" + service_lb_policy = {} + + create_service_lb_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_service_lb_policy, name + assert_kind_of ::Google::Cloud::NetworkServices::V1::CreateServiceLbPolicyRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["service_lb_policy_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::NetworkServices::V1::ServiceLbPolicy), request["service_lb_policy"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_service_lb_policy_client_stub do + # Create client + c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.create_service_lb_policy({ parent: parent, service_lb_policy_id: service_lb_policy_id, service_lb_policy: service_lb_policy }) 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 + c.create_service_lb_policy parent: parent, service_lb_policy_id: service_lb_policy_id, service_lb_policy: service_lb_policy 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 + c.create_service_lb_policy ::Google::Cloud::NetworkServices::V1::CreateServiceLbPolicyRequest.new(parent: parent, service_lb_policy_id: service_lb_policy_id, service_lb_policy: service_lb_policy) 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 + c.create_service_lb_policy({ parent: parent, service_lb_policy_id: service_lb_policy_id, service_lb_policy: service_lb_policy }, 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 + c.create_service_lb_policy(::Google::Cloud::NetworkServices::V1::CreateServiceLbPolicyRequest.new(parent: parent, service_lb_policy_id: service_lb_policy_id, service_lb_policy: service_lb_policy), 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_service_lb_policy_client_stub.call_rpc_count + end + end + + def test_update_service_lb_policy + # 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 = {} + service_lb_policy = {} + + update_service_lb_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_service_lb_policy, name + assert_kind_of ::Google::Cloud::NetworkServices::V1::UpdateServiceLbPolicyRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::NetworkServices::V1::ServiceLbPolicy), request["service_lb_policy"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_service_lb_policy_client_stub do + # Create client + c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.update_service_lb_policy({ update_mask: update_mask, service_lb_policy: service_lb_policy }) 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 + c.update_service_lb_policy update_mask: update_mask, service_lb_policy: service_lb_policy 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 + c.update_service_lb_policy ::Google::Cloud::NetworkServices::V1::UpdateServiceLbPolicyRequest.new(update_mask: update_mask, service_lb_policy: service_lb_policy) 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 + c.update_service_lb_policy({ update_mask: update_mask, service_lb_policy: service_lb_policy }, 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 + c.update_service_lb_policy(::Google::Cloud::NetworkServices::V1::UpdateServiceLbPolicyRequest.new(update_mask: update_mask, service_lb_policy: service_lb_policy), 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_service_lb_policy_client_stub.call_rpc_count + end + end + + def test_delete_service_lb_policy + # 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_service_lb_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_service_lb_policy, name + assert_kind_of ::Google::Cloud::NetworkServices::V1::DeleteServiceLbPolicyRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_service_lb_policy_client_stub do + # Create client + c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.delete_service_lb_policy({ 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 + c.delete_service_lb_policy 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 + c.delete_service_lb_policy ::Google::Cloud::NetworkServices::V1::DeleteServiceLbPolicyRequest.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 + c.delete_service_lb_policy({ 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 + c.delete_service_lb_policy(::Google::Cloud::NetworkServices::V1::DeleteServiceLbPolicyRequest.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_service_lb_policy_client_stub.call_rpc_count + end + end + + def test_get_gateway_route_view + # Create GRPC objects. + grpc_response = ::Google::Cloud::NetworkServices::V1::GatewayRouteView.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_gateway_route_view_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_gateway_route_view, name + assert_kind_of ::Google::Cloud::NetworkServices::V1::GetGatewayRouteViewRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_gateway_route_view_client_stub do + # Create client + c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_gateway_route_view({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_gateway_route_view name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_gateway_route_view ::Google::Cloud::NetworkServices::V1::GetGatewayRouteViewRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_gateway_route_view({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_gateway_route_view(::Google::Cloud::NetworkServices::V1::GetGatewayRouteViewRequest.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_gateway_route_view_client_stub.call_rpc_count + end + end + + def test_get_mesh_route_view + # Create GRPC objects. + grpc_response = ::Google::Cloud::NetworkServices::V1::MeshRouteView.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_mesh_route_view_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_mesh_route_view, name + assert_kind_of ::Google::Cloud::NetworkServices::V1::GetMeshRouteViewRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_mesh_route_view_client_stub do + # Create client + c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_mesh_route_view({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_mesh_route_view name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_mesh_route_view ::Google::Cloud::NetworkServices::V1::GetMeshRouteViewRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_mesh_route_view({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_mesh_route_view(::Google::Cloud::NetworkServices::V1::GetMeshRouteViewRequest.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_mesh_route_view_client_stub.call_rpc_count + end + end + + def test_list_gateway_route_views + # Create GRPC objects. + grpc_response = ::Google::Cloud::NetworkServices::V1::ListGatewayRouteViewsResponse.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" + + list_gateway_route_views_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_gateway_route_views, name + assert_kind_of ::Google::Cloud::NetworkServices::V1::ListGatewayRouteViewsRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_gateway_route_views_client_stub do + # Create client + c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_gateway_route_views({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_gateway_route_views parent: parent, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.list_gateway_route_views ::Google::Cloud::NetworkServices::V1::ListGatewayRouteViewsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.list_gateway_route_views({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.list_gateway_route_views(::Google::Cloud::NetworkServices::V1::ListGatewayRouteViewsRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_gateway_route_views_client_stub.call_rpc_count + end + end + + def test_list_mesh_route_views + # Create GRPC objects. + grpc_response = ::Google::Cloud::NetworkServices::V1::ListMeshRouteViewsResponse.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" + + list_mesh_route_views_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_mesh_route_views, name + assert_kind_of ::Google::Cloud::NetworkServices::V1::ListMeshRouteViewsRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_mesh_route_views_client_stub do + # Create client + c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_mesh_route_views({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_mesh_route_views parent: parent, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.list_mesh_route_views ::Google::Cloud::NetworkServices::V1::ListMeshRouteViewsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.list_mesh_route_views({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.list_mesh_route_views(::Google::Cloud::NetworkServices::V1::ListMeshRouteViewsRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_mesh_route_views_client_stub.call_rpc_count + end + end + + def test_list_agent_gateways + # Create GRPC objects. + grpc_response = ::Google::Cloud::NetworkServices::V1::ListAgentGatewaysResponse.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" + return_partial_success = true + + list_agent_gateways_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_agent_gateways, name + assert_kind_of ::Google::Cloud::NetworkServices::V1::ListAgentGatewaysRequest, request + assert_equal "hello world", request["parent"] + 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_agent_gateways_client_stub do + # Create client + c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_agent_gateways({ parent: parent, 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 + c.list_agent_gateways parent: parent, 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 + c.list_agent_gateways ::Google::Cloud::NetworkServices::V1::ListAgentGatewaysRequest.new(parent: parent, 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 + c.list_agent_gateways({ parent: parent, 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 + c.list_agent_gateways(::Google::Cloud::NetworkServices::V1::ListAgentGatewaysRequest.new(parent: parent, 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_agent_gateways_client_stub.call_rpc_count + end + end + + def test_get_agent_gateway + # Create GRPC objects. + grpc_response = ::Google::Cloud::NetworkServices::V1::AgentGateway.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_agent_gateway_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_agent_gateway, name + assert_kind_of ::Google::Cloud::NetworkServices::V1::GetAgentGatewayRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_agent_gateway_client_stub do + # Create client + c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_agent_gateway({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_agent_gateway name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_agent_gateway ::Google::Cloud::NetworkServices::V1::GetAgentGatewayRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_agent_gateway({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_agent_gateway(::Google::Cloud::NetworkServices::V1::GetAgentGatewayRequest.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_agent_gateway_client_stub.call_rpc_count + end + end + + def test_create_agent_gateway + # 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" + agent_gateway_id = "hello world" + agent_gateway = {} + + create_agent_gateway_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_agent_gateway, name + assert_kind_of ::Google::Cloud::NetworkServices::V1::CreateAgentGatewayRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["agent_gateway_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::NetworkServices::V1::AgentGateway), request["agent_gateway"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_agent_gateway_client_stub do + # Create client + c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.create_agent_gateway({ parent: parent, agent_gateway_id: agent_gateway_id, agent_gateway: agent_gateway }) 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 + c.create_agent_gateway parent: parent, agent_gateway_id: agent_gateway_id, agent_gateway: agent_gateway 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 + c.create_agent_gateway ::Google::Cloud::NetworkServices::V1::CreateAgentGatewayRequest.new(parent: parent, agent_gateway_id: agent_gateway_id, agent_gateway: agent_gateway) 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 + c.create_agent_gateway({ parent: parent, agent_gateway_id: agent_gateway_id, agent_gateway: agent_gateway }, 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 + c.create_agent_gateway(::Google::Cloud::NetworkServices::V1::CreateAgentGatewayRequest.new(parent: parent, agent_gateway_id: agent_gateway_id, agent_gateway: agent_gateway), 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_agent_gateway_client_stub.call_rpc_count + end + end + + def test_update_agent_gateway + # 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 = {} + agent_gateway = {} + + update_agent_gateway_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_agent_gateway, name + assert_kind_of ::Google::Cloud::NetworkServices::V1::UpdateAgentGatewayRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::NetworkServices::V1::AgentGateway), request["agent_gateway"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_agent_gateway_client_stub do + # Create client + c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.update_agent_gateway({ update_mask: update_mask, agent_gateway: agent_gateway }) 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 + c.update_agent_gateway update_mask: update_mask, agent_gateway: agent_gateway 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 + c.update_agent_gateway ::Google::Cloud::NetworkServices::V1::UpdateAgentGatewayRequest.new(update_mask: update_mask, agent_gateway: agent_gateway) 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 + c.update_agent_gateway({ update_mask: update_mask, agent_gateway: agent_gateway }, 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 + c.update_agent_gateway(::Google::Cloud::NetworkServices::V1::UpdateAgentGatewayRequest.new(update_mask: update_mask, agent_gateway: agent_gateway), 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_agent_gateway_client_stub.call_rpc_count + end + end + + def test_delete_agent_gateway + # 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" + etag = "hello world" + + delete_agent_gateway_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_agent_gateway, name + assert_kind_of ::Google::Cloud::NetworkServices::V1::DeleteAgentGatewayRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["etag"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_agent_gateway_client_stub do + # Create client + c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.delete_agent_gateway({ name: name, etag: etag }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + c.delete_agent_gateway name: name, etag: etag do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.delete_agent_gateway ::Google::Cloud::NetworkServices::V1::DeleteAgentGatewayRequest.new(name: name, etag: etag) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.delete_agent_gateway({ name: name, etag: etag }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.delete_agent_gateway(::Google::Cloud::NetworkServices::V1::DeleteAgentGatewayRequest.new(name: name, etag: etag), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_agent_gateway_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::NetworkServices::V1::NetworkServices::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::NetworkServices::V1::NetworkServices::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::NetworkServices::V1::NetworkServices::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::NetworkServices::V1::NetworkServices::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::NetworkServices::V1::NetworkServices::Client.new do |config| + config.credentials = grpc_channel + end + end + + assert_kind_of ::Google::Cloud::NetworkServices::V1::NetworkServices::Operations, client.operations_client + end +end diff --git a/owl-bot-staging/google-cloud-network_services-v1/test/helper.rb b/owl-bot-staging/google-cloud-network_services-v1/test/helper.rb new file mode 100644 index 000000000000..672b337030e7 --- /dev/null +++ b/owl-bot-staging/google-cloud-network_services-v1/test/helper.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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/mock" +require "minitest/rg" + +require "grpc" + +require "ostruct" From 8a88fc6397c528b9bdc9e94cf482e071cec9c7b1 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Thu, 11 Jun 2026 19:07:41 +0000 Subject: [PATCH 2/3] =?UTF-8?q?=F0=9F=A6=89=20Updates=20from=20OwlBot=20po?= =?UTF-8?q?st-processor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --- .../.owlbot-manifest.json | 7 + .../gapic_metadata.json | 25 + .../v1/network_services/client.rb | 575 +- .../v1/network_services/paths.rb | 38 + .../v1/network_services/rest/client.rb | 540 +- .../v1/network_services/rest/service_stub.rb | 307 + .../networkservices/v1/agent_gateway_pb.rb | 0 .../google/cloud/networkservices/v1/dep_pb.rb | 3 +- .../cloud/networkservices/v1/gateway_pb.rb | 2 +- .../cloud/networkservices/v1/http_route_pb.rb | 3 +- .../cloud/networkservices/v1/mesh_pb.rb | 2 +- .../networkservices/v1/network_services_pb.rb | 3 +- .../v1/network_services_services_pb.rb | 10 + .../networkservices/v1/service_binding_pb.rb | 3 +- .../cloud/networkservices/v1/tls_route_pb.rb | 2 +- .../cloud/networkservices/v1/agent_gateway.rb | 0 .../google/cloud/networkservices/v1/common.rb | 8 +- .../google/cloud/networkservices/v1/dep.rb | 117 +- .../networkservices/v1/endpoint_policy.rb | 10 +- .../cloud/networkservices/v1/extensibility.rb | 123 +- .../cloud/networkservices/v1/gateway.rb | 12 +- .../cloud/networkservices/v1/grpc_route.rb | 14 +- .../cloud/networkservices/v1/http_route.rb | 20 +- .../google/cloud/networkservices/v1/mesh.rb | 10 +- .../cloud/networkservices/v1/tcp_route.rb | 14 +- .../cloud/networkservices/v1/tls_route.rb | 22 +- .../network_services/create_agent_gateway.rb | 0 .../network_services/delete_agent_gateway.rb | 0 .../network_services/get_agent_gateway.rb | 0 .../network_services/list_agent_gateways.rb | 0 .../network_services/update_agent_gateway.rb | 0 ...adata_google.cloud.networkservices.v1.json | 200 + .../v1/network_services_paths_test.rb | 24 + .../v1/network_services_rest_test.rb | 299 +- .../v1/network_services_test.rb | 348 +- .../.gitignore | 22 - .../.repo-metadata.json | 17 - .../.rubocop.yml | 33 - .../google-cloud-network_services-v1/.toys.rb | 28 - .../.yardopts | 12 - .../AUTHENTICATION.md | 122 - .../CHANGELOG.md | 2 - .../google-cloud-network_services-v1/Gemfile | 14 - .../LICENSE.md | 201 - .../README.md | 154 - .../google-cloud-network_services-v1/Rakefile | 169 - .../gapic_metadata.json | 442 -- .../google-cloud-network_services-v1.gemspec | 30 - .../lib/google-cloud-network_services-v1.rb | 21 - .../lib/google/cloud/network_services/v1.rb | 46 - .../network_services/v1/bindings_override.rb | 252 - .../cloud/network_services/v1/dep_service.rb | 56 - .../network_services/v1/dep_service/client.rb | 2670 ------- .../v1/dep_service/credentials.rb | 47 - .../v1/dep_service/operations.rb | 843 -- .../network_services/v1/dep_service/paths.rb | 126 - .../network_services/v1/dep_service/rest.rb | 54 - .../v1/dep_service/rest/client.rb | 2496 ------ .../v1/dep_service/rest/operations.rb | 927 --- .../v1/dep_service/rest/service_stub.rb | 1309 ---- .../network_services/v1/network_services.rb | 56 - .../v1/network_services/client.rb | 6946 ----------------- .../v1/network_services/credentials.rb | 47 - .../v1/network_services/operations.rb | 843 -- .../v1/network_services/paths.rb | 531 -- .../v1/network_services/rest.rb | 54 - .../v1/network_services/rest/client.rb | 6471 --------------- .../v1/network_services/rest/operations.rb | 927 --- .../v1/network_services/rest/service_stub.rb | 3947 ---------- .../google/cloud/network_services/v1/rest.rb | 39 - .../cloud/network_services/v1/version.rb | 28 - .../cloud/networkservices/v1/common_pb.rb | 30 - .../google/cloud/networkservices/v1/dep_pb.rb | 68 - .../networkservices/v1/dep_services_pb.rb | 86 - .../networkservices/v1/endpoint_policy_pb.rb | 34 - .../networkservices/v1/extensibility_pb.rb | 43 - .../cloud/networkservices/v1/gateway_pb.rb | 36 - .../cloud/networkservices/v1/grpc_route_pb.rb | 46 - .../cloud/networkservices/v1/http_route_pb.rb | 53 - .../cloud/networkservices/v1/mesh_pb.rb | 33 - .../networkservices/v1/network_services_pb.rb | 38 - .../v1/network_services_services_pb.rb | 173 - .../cloud/networkservices/v1/route_view_pb.rb | 31 - .../networkservices/v1/service_binding_pb.rb | 33 - .../v1/service_lb_policy_pb.rb | 38 - .../cloud/networkservices/v1/tcp_route_pb.rb | 37 - .../cloud/networkservices/v1/tls_route_pb.rb | 37 - .../proto_docs/README.md | 4 - .../proto_docs/google/api/client.rb | 593 -- .../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 - .../google/cloud/networkservices/v1/common.rb | 164 - .../google/cloud/networkservices/v1/dep.rb | 1209 --- .../networkservices/v1/endpoint_policy.rb | 205 - .../cloud/networkservices/v1/extensibility.rb | 575 -- .../cloud/networkservices/v1/gateway.rb | 285 - .../cloud/networkservices/v1/grpc_route.rb | 474 -- .../cloud/networkservices/v1/http_route.rb | 785 -- .../google/cloud/networkservices/v1/mesh.rb | 170 - .../cloud/networkservices/v1/route_view.rb | 168 - .../networkservices/v1/service_binding.rb | 168 - .../networkservices/v1/service_lb_policy.rb | 258 - .../cloud/networkservices/v1/tcp_route.rb | 263 - .../cloud/networkservices/v1/tls_route.rb | 256 - .../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/struct.rb | 108 - .../proto_docs/google/protobuf/timestamp.rb | 127 - .../proto_docs/google/rpc/status.rb | 48 - .../proto_docs/google/type/expr.rb | 75 - .../snippets/Gemfile | 32 - .../dep_service/create_authz_extension.rb | 54 - .../dep_service/create_lb_edge_extension.rb | 54 - .../dep_service/create_lb_route_extension.rb | 54 - .../create_lb_traffic_extension.rb | 54 - .../dep_service/delete_authz_extension.rb | 54 - .../dep_service/delete_lb_edge_extension.rb | 54 - .../dep_service/delete_lb_route_extension.rb | 54 - .../delete_lb_traffic_extension.rb | 54 - .../dep_service/get_authz_extension.rb | 47 - .../dep_service/get_lb_edge_extension.rb | 47 - .../dep_service/get_lb_route_extension.rb | 47 - .../dep_service/get_lb_traffic_extension.rb | 47 - .../dep_service/list_authz_extensions.rb | 51 - .../dep_service/list_lb_edge_extensions.rb | 51 - .../dep_service/list_lb_route_extensions.rb | 51 - .../dep_service/list_lb_traffic_extensions.rb | 51 - .../dep_service/update_authz_extension.rb | 54 - .../dep_service/update_lb_edge_extension.rb | 54 - .../dep_service/update_lb_route_extension.rb | 54 - .../update_lb_traffic_extension.rb | 54 - .../create_endpoint_policy.rb | 54 - .../network_services/create_gateway.rb | 54 - .../network_services/create_grpc_route.rb | 54 - .../network_services/create_http_route.rb | 54 - .../snippets/network_services/create_mesh.rb | 54 - .../create_service_binding.rb | 54 - .../create_service_lb_policy.rb | 54 - .../network_services/create_tcp_route.rb | 54 - .../network_services/create_tls_route.rb | 54 - .../network_services/create_wasm_plugin.rb | 54 - .../create_wasm_plugin_version.rb | 54 - .../delete_endpoint_policy.rb | 54 - .../network_services/delete_gateway.rb | 54 - .../network_services/delete_grpc_route.rb | 54 - .../network_services/delete_http_route.rb | 54 - .../snippets/network_services/delete_mesh.rb | 54 - .../delete_service_binding.rb | 54 - .../delete_service_lb_policy.rb | 54 - .../network_services/delete_tcp_route.rb | 54 - .../network_services/delete_tls_route.rb | 54 - .../network_services/delete_wasm_plugin.rb | 54 - .../delete_wasm_plugin_version.rb | 54 - .../network_services/get_endpoint_policy.rb | 47 - .../snippets/network_services/get_gateway.rb | 47 - .../get_gateway_route_view.rb | 47 - .../network_services/get_grpc_route.rb | 47 - .../network_services/get_http_route.rb | 47 - .../snippets/network_services/get_mesh.rb | 47 - .../network_services/get_mesh_route_view.rb | 47 - .../network_services/get_service_binding.rb | 47 - .../network_services/get_service_lb_policy.rb | 47 - .../network_services/get_tcp_route.rb | 47 - .../network_services/get_tls_route.rb | 47 - .../network_services/get_wasm_plugin.rb | 47 - .../get_wasm_plugin_version.rb | 47 - .../list_endpoint_policies.rb | 51 - .../list_gateway_route_views.rb | 51 - .../network_services/list_gateways.rb | 51 - .../network_services/list_grpc_routes.rb | 51 - .../network_services/list_http_routes.rb | 51 - .../network_services/list_mesh_route_views.rb | 51 - .../snippets/network_services/list_meshes.rb | 51 - .../network_services/list_service_bindings.rb | 51 - .../list_service_lb_policies.rb | 51 - .../network_services/list_tcp_routes.rb | 51 - .../network_services/list_tls_routes.rb | 51 - .../list_wasm_plugin_versions.rb | 51 - .../network_services/list_wasm_plugins.rb | 51 - .../update_endpoint_policy.rb | 54 - .../network_services/update_gateway.rb | 54 - .../network_services/update_grpc_route.rb | 54 - .../network_services/update_http_route.rb | 54 - .../snippets/network_services/update_mesh.rb | 54 - .../update_service_binding.rb | 54 - .../update_service_lb_policy.rb | 54 - .../network_services/update_tcp_route.rb | 54 - .../network_services/update_tls_route.rb | 54 - .../network_services/update_wasm_plugin.rb | 54 - ...adata_google.cloud.networkservices.v1.json | 3335 -------- .../v1/dep_service_operations_test.rb | 400 - .../v1/dep_service_paths_test.rb | 103 - .../v1/dep_service_rest_test.rb | 1219 --- .../network_services/v1/dep_service_test.rb | 1438 ---- .../v1/network_services_operations_test.rb | 400 - .../v1/network_services_paths_test.rb | 355 - .../v1/network_services_rest_test.rb | 3575 --------- .../v1/network_services_test.rb | 4165 ---------- .../test/helper.rb | 26 - 204 files changed, 2579 insertions(+), 57153 deletions(-) rename {owl-bot-staging/google-cloud-network_services-v1 => google-cloud-network_services-v1}/lib/google/cloud/networkservices/v1/agent_gateway_pb.rb (100%) rename {owl-bot-staging/google-cloud-network_services-v1 => google-cloud-network_services-v1}/proto_docs/google/cloud/networkservices/v1/agent_gateway.rb (100%) rename {owl-bot-staging/google-cloud-network_services-v1 => google-cloud-network_services-v1}/snippets/network_services/create_agent_gateway.rb (100%) rename {owl-bot-staging/google-cloud-network_services-v1 => google-cloud-network_services-v1}/snippets/network_services/delete_agent_gateway.rb (100%) rename {owl-bot-staging/google-cloud-network_services-v1 => google-cloud-network_services-v1}/snippets/network_services/get_agent_gateway.rb (100%) rename {owl-bot-staging/google-cloud-network_services-v1 => google-cloud-network_services-v1}/snippets/network_services/list_agent_gateways.rb (100%) rename {owl-bot-staging/google-cloud-network_services-v1 => google-cloud-network_services-v1}/snippets/network_services/update_agent_gateway.rb (100%) delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/.gitignore delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/.repo-metadata.json delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/.rubocop.yml delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/.toys.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/.yardopts delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/CHANGELOG.md delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/Gemfile delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/LICENSE.md delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/README.md delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/Rakefile delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/gapic_metadata.json delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/google-cloud-network_services-v1.gemspec delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/lib/google-cloud-network_services-v1.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/bindings_override.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/dep_service.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/dep_service/client.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/dep_service/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/dep_service/operations.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/dep_service/paths.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/dep_service/rest.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/dep_service/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/dep_service/rest/operations.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/dep_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/network_services.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/network_services/client.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/network_services/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/network_services/operations.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/network_services/paths.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/network_services/rest.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/network_services/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/network_services/rest/operations.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/network_services/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/rest.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/version.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/common_pb.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/dep_pb.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/dep_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/endpoint_policy_pb.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/extensibility_pb.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/gateway_pb.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/grpc_route_pb.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/http_route_pb.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/mesh_pb.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/network_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/network_services_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/route_view_pb.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/service_binding_pb.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/service_lb_policy_pb.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/tcp_route_pb.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/tls_route_pb.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/proto_docs/README.md delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/api/field_info.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/common.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/dep.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/endpoint_policy.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/extensibility.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/gateway.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/grpc_route.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/http_route.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/mesh.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/route_view.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/service_binding.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/service_lb_policy.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/tcp_route.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/tls_route.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/longrunning/operations.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/protobuf/any.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/protobuf/empty.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/protobuf/field_mask.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/protobuf/struct.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/protobuf/timestamp.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/rpc/status.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/type/expr.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/Gemfile delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/create_authz_extension.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/create_lb_edge_extension.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/create_lb_route_extension.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/create_lb_traffic_extension.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/delete_authz_extension.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/delete_lb_edge_extension.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/delete_lb_route_extension.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/delete_lb_traffic_extension.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/get_authz_extension.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/get_lb_edge_extension.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/get_lb_route_extension.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/get_lb_traffic_extension.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/list_authz_extensions.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/list_lb_edge_extensions.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/list_lb_route_extensions.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/list_lb_traffic_extensions.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/update_authz_extension.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/update_lb_edge_extension.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/update_lb_route_extension.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/update_lb_traffic_extension.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/create_endpoint_policy.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/create_gateway.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/create_grpc_route.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/create_http_route.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/create_mesh.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/create_service_binding.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/create_service_lb_policy.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/create_tcp_route.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/create_tls_route.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/create_wasm_plugin.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/create_wasm_plugin_version.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/delete_endpoint_policy.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/delete_gateway.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/delete_grpc_route.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/delete_http_route.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/delete_mesh.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/delete_service_binding.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/delete_service_lb_policy.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/delete_tcp_route.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/delete_tls_route.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/delete_wasm_plugin.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/delete_wasm_plugin_version.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/get_endpoint_policy.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/get_gateway.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/get_gateway_route_view.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/get_grpc_route.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/get_http_route.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/get_mesh.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/get_mesh_route_view.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/get_service_binding.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/get_service_lb_policy.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/get_tcp_route.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/get_tls_route.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/get_wasm_plugin.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/get_wasm_plugin_version.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/list_endpoint_policies.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/list_gateway_route_views.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/list_gateways.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/list_grpc_routes.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/list_http_routes.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/list_mesh_route_views.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/list_meshes.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/list_service_bindings.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/list_service_lb_policies.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/list_tcp_routes.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/list_tls_routes.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/list_wasm_plugin_versions.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/list_wasm_plugins.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/update_endpoint_policy.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/update_gateway.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/update_grpc_route.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/update_http_route.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/update_mesh.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/update_service_binding.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/update_service_lb_policy.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/update_tcp_route.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/update_tls_route.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/update_wasm_plugin.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/snippet_metadata_google.cloud.networkservices.v1.json delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/test/google/cloud/network_services/v1/dep_service_operations_test.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/test/google/cloud/network_services/v1/dep_service_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/test/google/cloud/network_services/v1/dep_service_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/test/google/cloud/network_services/v1/dep_service_test.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/test/google/cloud/network_services/v1/network_services_operations_test.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/test/google/cloud/network_services/v1/network_services_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/test/google/cloud/network_services/v1/network_services_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/test/google/cloud/network_services/v1/network_services_test.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/test/helper.rb diff --git a/google-cloud-network_services-v1/.owlbot-manifest.json b/google-cloud-network_services-v1/.owlbot-manifest.json index 37ba38c21678..917a37200d38 100644 --- a/google-cloud-network_services-v1/.owlbot-manifest.json +++ b/google-cloud-network_services-v1/.owlbot-manifest.json @@ -36,6 +36,7 @@ "lib/google/cloud/network_services/v1/network_services/rest/service_stub.rb", "lib/google/cloud/network_services/v1/rest.rb", "lib/google/cloud/network_services/v1/version.rb", + "lib/google/cloud/networkservices/v1/agent_gateway_pb.rb", "lib/google/cloud/networkservices/v1/common_pb.rb", "lib/google/cloud/networkservices/v1/dep_pb.rb", "lib/google/cloud/networkservices/v1/dep_services_pb.rb", @@ -58,6 +59,7 @@ "proto_docs/google/api/field_info.rb", "proto_docs/google/api/launch_stage.rb", "proto_docs/google/api/resource.rb", + "proto_docs/google/cloud/networkservices/v1/agent_gateway.rb", "proto_docs/google/cloud/networkservices/v1/common.rb", "proto_docs/google/cloud/networkservices/v1/dep.rb", "proto_docs/google/cloud/networkservices/v1/endpoint_policy.rb", @@ -101,6 +103,7 @@ "snippets/dep_service/update_lb_edge_extension.rb", "snippets/dep_service/update_lb_route_extension.rb", "snippets/dep_service/update_lb_traffic_extension.rb", + "snippets/network_services/create_agent_gateway.rb", "snippets/network_services/create_endpoint_policy.rb", "snippets/network_services/create_gateway.rb", "snippets/network_services/create_grpc_route.rb", @@ -112,6 +115,7 @@ "snippets/network_services/create_tls_route.rb", "snippets/network_services/create_wasm_plugin.rb", "snippets/network_services/create_wasm_plugin_version.rb", + "snippets/network_services/delete_agent_gateway.rb", "snippets/network_services/delete_endpoint_policy.rb", "snippets/network_services/delete_gateway.rb", "snippets/network_services/delete_grpc_route.rb", @@ -123,6 +127,7 @@ "snippets/network_services/delete_tls_route.rb", "snippets/network_services/delete_wasm_plugin.rb", "snippets/network_services/delete_wasm_plugin_version.rb", + "snippets/network_services/get_agent_gateway.rb", "snippets/network_services/get_endpoint_policy.rb", "snippets/network_services/get_gateway.rb", "snippets/network_services/get_gateway_route_view.rb", @@ -136,6 +141,7 @@ "snippets/network_services/get_tls_route.rb", "snippets/network_services/get_wasm_plugin.rb", "snippets/network_services/get_wasm_plugin_version.rb", + "snippets/network_services/list_agent_gateways.rb", "snippets/network_services/list_endpoint_policies.rb", "snippets/network_services/list_gateway_route_views.rb", "snippets/network_services/list_gateways.rb", @@ -149,6 +155,7 @@ "snippets/network_services/list_tls_routes.rb", "snippets/network_services/list_wasm_plugin_versions.rb", "snippets/network_services/list_wasm_plugins.rb", + "snippets/network_services/update_agent_gateway.rb", "snippets/network_services/update_endpoint_policy.rb", "snippets/network_services/update_gateway.rb", "snippets/network_services/update_grpc_route.rb", diff --git a/google-cloud-network_services-v1/gapic_metadata.json b/google-cloud-network_services-v1/gapic_metadata.json index 0f2ae7f1d859..b9bc5946fba2 100644 --- a/google-cloud-network_services-v1/gapic_metadata.json +++ b/google-cloud-network_services-v1/gapic_metadata.json @@ -408,6 +408,31 @@ "methods": [ "list_mesh_route_views" ] + }, + "ListAgentGateways": { + "methods": [ + "list_agent_gateways" + ] + }, + "GetAgentGateway": { + "methods": [ + "get_agent_gateway" + ] + }, + "CreateAgentGateway": { + "methods": [ + "create_agent_gateway" + ] + }, + "UpdateAgentGateway": { + "methods": [ + "update_agent_gateway" + ] + }, + "DeleteAgentGateway": { + "methods": [ + "delete_agent_gateway" + ] } } } diff --git a/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/network_services/client.rb b/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/network_services/client.rb index 1872acd867f6..3f3e7d35e0da 100644 --- a/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/network_services/client.rb +++ b/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/network_services/client.rb @@ -251,7 +251,7 @@ def logger # # @param parent [::String] # Required. The project and location from which the EndpointPolicies should - # be listed, specified in the format `projects/*/locations/global`. + # be listed, specified in the format `projects/*/locations/*`. # @param page_size [::Integer] # Maximum number of EndpointPolicies to return per call. # @param page_token [::String] @@ -354,7 +354,7 @@ def list_endpoint_policies request, options = nil # # @param name [::String] # Required. A name of the EndpointPolicy to get. Must be in the format - # `projects/*/locations/global/endpointPolicies/*`. + # `projects/*/locations/*/endpointPolicies/*`. # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Google::Cloud::NetworkServices::V1::EndpointPolicy] @@ -440,7 +440,7 @@ def get_endpoint_policy request, options = nil # # @param parent [::String] # Required. The parent resource of the EndpointPolicy. Must be in the - # format `projects/*/locations/global`. + # format `projects/*/locations/*`. # @param endpoint_policy_id [::String] # Required. Short name of the EndpointPolicy resource to be created. # E.g. "CustomECS". @@ -640,7 +640,7 @@ def update_endpoint_policy request, options = nil # # @param name [::String] # Required. A name of the EndpointPolicy to delete. Must be in the format - # `projects/*/locations/global/endpointPolicies/*`. + # `projects/*/locations/*/endpointPolicies/*`. # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Gapic::Operation] @@ -2094,7 +2094,7 @@ def delete_gateway request, options = nil # # @param parent [::String] # Required. The project and location from which the GrpcRoutes should be - # listed, specified in the format `projects/*/locations/global`. + # listed, specified in the format `projects/*/locations/*`. # @param page_size [::Integer] # Maximum number of GrpcRoutes to return per call. # @param page_token [::String] @@ -2196,7 +2196,7 @@ def list_grpc_routes request, options = nil # # @param name [::String] # Required. A name of the GrpcRoute to get. Must be in the format - # `projects/*/locations/global/grpcRoutes/*`. + # `projects/*/locations/*/grpcRoutes/*`. # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Google::Cloud::NetworkServices::V1::GrpcRoute] @@ -2282,7 +2282,7 @@ def get_grpc_route request, options = nil # # @param parent [::String] # Required. The parent resource of the GrpcRoute. Must be in the - # format `projects/*/locations/global`. + # format `projects/*/locations/*`. # @param grpc_route_id [::String] # Required. Short name of the GrpcRoute resource to be created. # @param grpc_route [::Google::Cloud::NetworkServices::V1::GrpcRoute, ::Hash] @@ -2481,7 +2481,7 @@ def update_grpc_route request, options = nil # # @param name [::String] # Required. A name of the GrpcRoute to delete. Must be in the format - # `projects/*/locations/global/grpcRoutes/*`. + # `projects/*/locations/*/grpcRoutes/*`. # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Gapic::Operation] @@ -2569,14 +2569,14 @@ def delete_grpc_route request, options = nil # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. # - # @overload list_http_routes(parent: nil, page_size: nil, page_token: nil, return_partial_success: nil) + # @overload list_http_routes(parent: nil, page_size: nil, page_token: nil, return_partial_success: nil, filter: nil) # Pass arguments to `list_http_routes` via keyword arguments. Note that at # least one keyword argument is 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 project and location from which the HttpRoutes should be - # listed, specified in the format `projects/*/locations/global`. + # listed, specified in the format `projects/*/locations/*`. # @param page_size [::Integer] # Maximum number of HttpRoutes to return per call. # @param page_token [::String] @@ -2587,6 +2587,8 @@ def delete_grpc_route request, options = nil # Optional. If true, allow partial responses for multi-regional Aggregated # List requests. Otherwise if one of the locations is down or unreachable, # the Aggregated List request will fail. + # @param filter [::String] + # Optional. Filter expression to restrict the list. # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::NetworkServices::V1::HttpRoute>] @@ -2678,7 +2680,7 @@ def list_http_routes request, options = nil # # @param name [::String] # Required. A name of the HttpRoute to get. Must be in the format - # `projects/*/locations/global/httpRoutes/*`. + # `projects/*/locations/*/httpRoutes/*`. # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Google::Cloud::NetworkServices::V1::HttpRoute] @@ -2757,18 +2759,20 @@ def get_http_route request, options = nil # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. # - # @overload create_http_route(parent: nil, http_route_id: nil, http_route: nil) + # @overload create_http_route(parent: nil, http_route_id: nil, http_route: nil, request_id: nil) # Pass arguments to `create_http_route` via keyword arguments. Note that at # least one keyword argument is 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 HttpRoute. Must be in the - # format `projects/*/locations/global`. + # format `projects/*/locations/*`. # @param http_route_id [::String] # Required. Short name of the HttpRoute resource to be created. # @param http_route [::Google::Cloud::NetworkServices::V1::HttpRoute, ::Hash] # Required. HttpRoute resource to be created. + # @param request_id [::String] + # Optional. Idempotent request UUID. # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Gapic::Operation] @@ -2963,7 +2967,7 @@ def update_http_route request, options = nil # # @param name [::String] # Required. A name of the HttpRoute to delete. Must be in the format - # `projects/*/locations/global/httpRoutes/*`. + # `projects/*/locations/*/httpRoutes/*`. # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Gapic::Operation] @@ -3058,7 +3062,7 @@ def delete_http_route request, options = nil # # @param parent [::String] # Required. The project and location from which the TcpRoutes should be - # listed, specified in the format `projects/*/locations/global`. + # listed, specified in the format `projects/*/locations/*`. # @param page_size [::Integer] # Maximum number of TcpRoutes to return per call. # @param page_token [::String] @@ -3160,7 +3164,7 @@ def list_tcp_routes request, options = nil # # @param name [::String] # Required. A name of the TcpRoute to get. Must be in the format - # `projects/*/locations/global/tcpRoutes/*`. + # `projects/*/locations/*/tcpRoutes/*`. # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Google::Cloud::NetworkServices::V1::TcpRoute] @@ -3246,7 +3250,7 @@ def get_tcp_route request, options = nil # # @param parent [::String] # Required. The parent resource of the TcpRoute. Must be in the - # format `projects/*/locations/global`. + # format `projects/*/locations/*`. # @param tcp_route_id [::String] # Required. Short name of the TcpRoute resource to be created. # @param tcp_route [::Google::Cloud::NetworkServices::V1::TcpRoute, ::Hash] @@ -3445,7 +3449,7 @@ def update_tcp_route request, options = nil # # @param name [::String] # Required. A name of the TcpRoute to delete. Must be in the format - # `projects/*/locations/global/tcpRoutes/*`. + # `projects/*/locations/*/tcpRoutes/*`. # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Gapic::Operation] @@ -3540,7 +3544,7 @@ def delete_tcp_route request, options = nil # # @param parent [::String] # Required. The project and location from which the TlsRoutes should be - # listed, specified in the format `projects/*/locations/global`. + # listed, specified in the format `projects/*/locations/*`. # @param page_size [::Integer] # Maximum number of TlsRoutes to return per call. # @param page_token [::String] @@ -3642,7 +3646,7 @@ def list_tls_routes request, options = nil # # @param name [::String] # Required. A name of the TlsRoute to get. Must be in the format - # `projects/*/locations/global/tlsRoutes/*`. + # `projects/*/locations/*/tlsRoutes/*`. # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Google::Cloud::NetworkServices::V1::TlsRoute] @@ -3728,7 +3732,7 @@ def get_tls_route request, options = nil # # @param parent [::String] # Required. The parent resource of the TlsRoute. Must be in the - # format `projects/*/locations/global`. + # format `projects/*/locations/*`. # @param tls_route_id [::String] # Required. Short name of the TlsRoute resource to be created. # @param tls_route [::Google::Cloud::NetworkServices::V1::TlsRoute, ::Hash] @@ -3927,7 +3931,7 @@ def update_tls_route request, options = nil # # @param name [::String] # Required. A name of the TlsRoute to delete. Must be in the format - # `projects/*/locations/global/tlsRoutes/*`. + # `projects/*/locations/*/tlsRoutes/*`. # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Gapic::Operation] @@ -4500,7 +4504,7 @@ def delete_service_binding request, options = nil # # @param parent [::String] # Required. The project and location from which the Meshes should be - # listed, specified in the format `projects/*/locations/global`. + # listed, specified in the format `projects/*/locations/*`. # @param page_size [::Integer] # Maximum number of Meshes to return per call. # @param page_token [::String] @@ -4602,7 +4606,7 @@ def list_meshes request, options = nil # # @param name [::String] # Required. A name of the Mesh to get. Must be in the format - # `projects/*/locations/global/meshes/*`. + # `projects/*/locations/*/meshes/*`. # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Google::Cloud::NetworkServices::V1::Mesh] @@ -4688,7 +4692,7 @@ def get_mesh request, options = nil # # @param parent [::String] # Required. The parent resource of the Mesh. Must be in the - # format `projects/*/locations/global`. + # format `projects/*/locations/*`. # @param mesh_id [::String] # Required. Short name of the Mesh resource to be created. # @param mesh [::Google::Cloud::NetworkServices::V1::Mesh, ::Hash] @@ -4887,7 +4891,7 @@ def update_mesh request, options = nil # # @param name [::String] # Required. A name of the Mesh to delete. Must be in the format - # `projects/*/locations/global/meshes/*`. + # `projects/*/locations/*/meshes/*`. # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Gapic::Operation] @@ -5816,6 +5820,490 @@ def list_mesh_route_views request, options = nil raise ::Google::Cloud::Error.from_error(e) end + ## + # Lists AgentGateways in a given project and location. + # + # @overload list_agent_gateways(request, options = nil) + # Pass arguments to `list_agent_gateways` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::ListAgentGatewaysRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::ListAgentGatewaysRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_agent_gateways(parent: nil, page_size: nil, page_token: nil, return_partial_success: nil) + # Pass arguments to `list_agent_gateways` via keyword arguments. Note that at + # least one keyword argument is 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 project and location from which the AgentGateways should be + # listed, specified in the format `projects/*/locations/*`. + # @param page_size [::Integer] + # Optional. Maximum number of AgentGateways to return per call. + # @param page_token [::String] + # Optional. The value returned by the last `ListAgentGatewaysResponse` + # Indicates that this is a continuation of a prior `ListAgentGateways` + # call, and that the system should return the next page of data. + # @param return_partial_success [::Boolean] + # Optional. If true, allow partial responses for multi-regional Aggregated + # List requests. Otherwise if one of the locations is down or unreachable, + # the Aggregated List request will fail. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::NetworkServices::V1::AgentGateway>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::NetworkServices::V1::AgentGateway>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/network_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::ListAgentGatewaysRequest.new + # + # # Call the list_agent_gateways method. + # result = client.list_agent_gateways 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::NetworkServices::V1::AgentGateway. + # p item + # end + # + def list_agent_gateways request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::ListAgentGatewaysRequest + + # Converts hash 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_agent_gateways.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::NetworkServices::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_agent_gateways.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_agent_gateways.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @network_services_stub.call_rpc :list_agent_gateways, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @network_services_stub, :list_agent_gateways, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets details of a single AgentGateway. + # + # @overload get_agent_gateway(request, options = nil) + # Pass arguments to `get_agent_gateway` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::GetAgentGatewayRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::GetAgentGatewayRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_agent_gateway(name: nil) + # Pass arguments to `get_agent_gateway` via keyword arguments. Note that at + # least one keyword argument is 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. A name of the AgentGateway to get. Must be in the format + # `projects/*/locations/*/agentGateways/*`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::NetworkServices::V1::AgentGateway] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::NetworkServices::V1::AgentGateway] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/network_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::GetAgentGatewayRequest.new + # + # # Call the get_agent_gateway method. + # result = client.get_agent_gateway request + # + # # The returned object is of type Google::Cloud::NetworkServices::V1::AgentGateway. + # p result + # + def get_agent_gateway request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::GetAgentGatewayRequest + + # Converts hash 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_agent_gateway.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::NetworkServices::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_agent_gateway.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_agent_gateway.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @network_services_stub.call_rpc :get_agent_gateway, 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 AgentGateway in a given project and location. + # + # @overload create_agent_gateway(request, options = nil) + # Pass arguments to `create_agent_gateway` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::CreateAgentGatewayRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::CreateAgentGatewayRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_agent_gateway(parent: nil, agent_gateway_id: nil, agent_gateway: nil) + # Pass arguments to `create_agent_gateway` via keyword arguments. Note that at + # least one keyword argument is 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 AgentGateway. Must be in the + # format `projects/*/locations/*`. + # @param agent_gateway_id [::String] + # Required. Short name of the AgentGateway resource to be created. + # @param agent_gateway [::Google::Cloud::NetworkServices::V1::AgentGateway, ::Hash] + # Required. AgentGateway resource to be created. + # + # @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_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::CreateAgentGatewayRequest.new + # + # # Call the create_agent_gateway method. + # result = client.create_agent_gateway 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_agent_gateway request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::CreateAgentGatewayRequest + + # Converts hash 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_agent_gateway.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::NetworkServices::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_agent_gateway.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_agent_gateway.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @network_services_stub.call_rpc :create_agent_gateway, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates the parameters of a single AgentGateway. + # + # @overload update_agent_gateway(request, options = nil) + # Pass arguments to `update_agent_gateway` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::UpdateAgentGatewayRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::UpdateAgentGatewayRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_agent_gateway(update_mask: nil, agent_gateway: nil) + # Pass arguments to `update_agent_gateway` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. Field mask is used to specify the fields to be overwritten in the + # AgentGateway resource by the update. + # The fields specified in the update_mask are relative to the resource, not + # the full request. A field will be overwritten if it is in the mask. If the + # user does not provide a mask then all fields will be overwritten. + # @param agent_gateway [::Google::Cloud::NetworkServices::V1::AgentGateway, ::Hash] + # Required. Updated AgentGateway 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_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::UpdateAgentGatewayRequest.new + # + # # Call the update_agent_gateway method. + # result = client.update_agent_gateway 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_agent_gateway request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::UpdateAgentGatewayRequest + + # Converts hash 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_agent_gateway.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::NetworkServices::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.agent_gateway&.name + header_params["agent_gateway.name"] = request.agent_gateway.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_agent_gateway.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_agent_gateway.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @network_services_stub.call_rpc :update_agent_gateway, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a single AgentGateway. + # + # @overload delete_agent_gateway(request, options = nil) + # Pass arguments to `delete_agent_gateway` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::DeleteAgentGatewayRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::DeleteAgentGatewayRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_agent_gateway(name: nil, etag: nil) + # Pass arguments to `delete_agent_gateway` via keyword arguments. Note that at + # least one keyword argument is 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. A name of the AgentGateway to delete. Must be in the format + # `projects/*/locations/*/agentGateways/*`. + # @param etag [::String] + # Optional. The etag of the AgentGateway to delete. + # + # @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_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::DeleteAgentGatewayRequest.new + # + # # Call the delete_agent_gateway method. + # result = client.delete_agent_gateway 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_agent_gateway request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::DeleteAgentGatewayRequest + + # Converts hash 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_agent_gateway.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::NetworkServices::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_agent_gateway.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_agent_gateway.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @network_services_stub.call_rpc :delete_agent_gateway, 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 NetworkServices API. # @@ -6291,6 +6779,31 @@ class Rpcs # @return [::Gapic::Config::Method] # attr_reader :list_mesh_route_views + ## + # RPC-specific configuration for `list_agent_gateways` + # @return [::Gapic::Config::Method] + # + attr_reader :list_agent_gateways + ## + # RPC-specific configuration for `get_agent_gateway` + # @return [::Gapic::Config::Method] + # + attr_reader :get_agent_gateway + ## + # RPC-specific configuration for `create_agent_gateway` + # @return [::Gapic::Config::Method] + # + attr_reader :create_agent_gateway + ## + # RPC-specific configuration for `update_agent_gateway` + # @return [::Gapic::Config::Method] + # + attr_reader :update_agent_gateway + ## + # RPC-specific configuration for `delete_agent_gateway` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_agent_gateway # @private def initialize parent_rpcs = nil @@ -6410,6 +6923,16 @@ def initialize parent_rpcs = nil @list_gateway_route_views = ::Gapic::Config::Method.new list_gateway_route_views_config list_mesh_route_views_config = parent_rpcs.list_mesh_route_views if parent_rpcs.respond_to? :list_mesh_route_views @list_mesh_route_views = ::Gapic::Config::Method.new list_mesh_route_views_config + list_agent_gateways_config = parent_rpcs.list_agent_gateways if parent_rpcs.respond_to? :list_agent_gateways + @list_agent_gateways = ::Gapic::Config::Method.new list_agent_gateways_config + get_agent_gateway_config = parent_rpcs.get_agent_gateway if parent_rpcs.respond_to? :get_agent_gateway + @get_agent_gateway = ::Gapic::Config::Method.new get_agent_gateway_config + create_agent_gateway_config = parent_rpcs.create_agent_gateway if parent_rpcs.respond_to? :create_agent_gateway + @create_agent_gateway = ::Gapic::Config::Method.new create_agent_gateway_config + update_agent_gateway_config = parent_rpcs.update_agent_gateway if parent_rpcs.respond_to? :update_agent_gateway + @update_agent_gateway = ::Gapic::Config::Method.new update_agent_gateway_config + delete_agent_gateway_config = parent_rpcs.delete_agent_gateway if parent_rpcs.respond_to? :delete_agent_gateway + @delete_agent_gateway = ::Gapic::Config::Method.new delete_agent_gateway_config yield self if block_given? end diff --git a/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/network_services/paths.rb b/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/network_services/paths.rb index 95061bacebe6..348536ccbc65 100644 --- a/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/network_services/paths.rb +++ b/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/network_services/paths.rb @@ -43,6 +43,25 @@ def address_path project:, region:, address: "projects/#{project}/regions/#{region}/addresses/#{address}" end + ## + # Create a fully-qualified AgentGateway resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/agentGateways/{agent_gateway}` + # + # @param project [String] + # @param location [String] + # @param agent_gateway [String] + # + # @return [::String] + def agent_gateway_path project:, location:, agent_gateway: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/agentGateways/#{agent_gateway}" + end + ## # Create a fully-qualified AuthorizationPolicy resource string. # @@ -406,6 +425,25 @@ def subnetwork_path project:, region:, subnetwork: "projects/#{project}/regions/#{region}/subnetworks/#{subnetwork}" end + ## + # Create a fully-qualified TargetTcpProxy resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/targetTcpProxies/{target_tcp_proxy}` + # + # @param project [String] + # @param location [String] + # @param target_tcp_proxy [String] + # + # @return [::String] + def target_tcp_proxy_path project:, location:, target_tcp_proxy: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/targetTcpProxies/#{target_tcp_proxy}" + end + ## # Create a fully-qualified TcpRoute resource string. # diff --git a/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/network_services/rest/client.rb b/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/network_services/rest/client.rb index 60a44b96a598..88742913d84a 100644 --- a/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/network_services/rest/client.rb +++ b/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/network_services/rest/client.rb @@ -246,7 +246,7 @@ def logger # # @param parent [::String] # Required. The project and location from which the EndpointPolicies should - # be listed, specified in the format `projects/*/locations/global`. + # be listed, specified in the format `projects/*/locations/*`. # @param page_size [::Integer] # Maximum number of EndpointPolicies to return per call. # @param page_token [::String] @@ -342,7 +342,7 @@ def list_endpoint_policies request, options = nil # # @param name [::String] # Required. A name of the EndpointPolicy to get. Must be in the format - # `projects/*/locations/global/endpointPolicies/*`. + # `projects/*/locations/*/endpointPolicies/*`. # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Google::Cloud::NetworkServices::V1::EndpointPolicy] # @yieldparam operation [::Gapic::Rest::TransportOperation] @@ -421,7 +421,7 @@ def get_endpoint_policy request, options = nil # # @param parent [::String] # Required. The parent resource of the EndpointPolicy. Must be in the - # format `projects/*/locations/global`. + # format `projects/*/locations/*`. # @param endpoint_policy_id [::String] # Required. Short name of the EndpointPolicy resource to be created. # E.g. "CustomECS". @@ -607,7 +607,7 @@ def update_endpoint_policy request, options = nil # # @param name [::String] # Required. A name of the EndpointPolicy to delete. Must be in the format - # `projects/*/locations/global/endpointPolicies/*`. + # `projects/*/locations/*/endpointPolicies/*`. # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Gapic::Operation] # @yieldparam operation [::Gapic::Rest::TransportOperation] @@ -1956,7 +1956,7 @@ def delete_gateway request, options = nil # # @param parent [::String] # Required. The project and location from which the GrpcRoutes should be - # listed, specified in the format `projects/*/locations/global`. + # listed, specified in the format `projects/*/locations/*`. # @param page_size [::Integer] # Maximum number of GrpcRoutes to return per call. # @param page_token [::String] @@ -2051,7 +2051,7 @@ def list_grpc_routes request, options = nil # # @param name [::String] # Required. A name of the GrpcRoute to get. Must be in the format - # `projects/*/locations/global/grpcRoutes/*`. + # `projects/*/locations/*/grpcRoutes/*`. # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Google::Cloud::NetworkServices::V1::GrpcRoute] # @yieldparam operation [::Gapic::Rest::TransportOperation] @@ -2130,7 +2130,7 @@ def get_grpc_route request, options = nil # # @param parent [::String] # Required. The parent resource of the GrpcRoute. Must be in the - # format `projects/*/locations/global`. + # format `projects/*/locations/*`. # @param grpc_route_id [::String] # Required. Short name of the GrpcRoute resource to be created. # @param grpc_route [::Google::Cloud::NetworkServices::V1::GrpcRoute, ::Hash] @@ -2315,7 +2315,7 @@ def update_grpc_route request, options = nil # # @param name [::String] # Required. A name of the GrpcRoute to delete. Must be in the format - # `projects/*/locations/global/grpcRoutes/*`. + # `projects/*/locations/*/grpcRoutes/*`. # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Gapic::Operation] # @yieldparam operation [::Gapic::Rest::TransportOperation] @@ -2396,14 +2396,14 @@ def delete_grpc_route request, options = nil # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # - # @overload list_http_routes(parent: nil, page_size: nil, page_token: nil, return_partial_success: nil) + # @overload list_http_routes(parent: nil, page_size: nil, page_token: nil, return_partial_success: nil, filter: nil) # Pass arguments to `list_http_routes` via keyword arguments. Note that at # least one keyword argument is 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 project and location from which the HttpRoutes should be - # listed, specified in the format `projects/*/locations/global`. + # listed, specified in the format `projects/*/locations/*`. # @param page_size [::Integer] # Maximum number of HttpRoutes to return per call. # @param page_token [::String] @@ -2414,6 +2414,8 @@ def delete_grpc_route request, options = nil # Optional. If true, allow partial responses for multi-regional Aggregated # List requests. Otherwise if one of the locations is down or unreachable, # the Aggregated List request will fail. + # @param filter [::String] + # Optional. Filter expression to restrict the list. # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::HttpRoute>] # @yieldparam operation [::Gapic::Rest::TransportOperation] @@ -2498,7 +2500,7 @@ def list_http_routes request, options = nil # # @param name [::String] # Required. A name of the HttpRoute to get. Must be in the format - # `projects/*/locations/global/httpRoutes/*`. + # `projects/*/locations/*/httpRoutes/*`. # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Google::Cloud::NetworkServices::V1::HttpRoute] # @yieldparam operation [::Gapic::Rest::TransportOperation] @@ -2570,18 +2572,20 @@ def get_http_route request, options = nil # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # - # @overload create_http_route(parent: nil, http_route_id: nil, http_route: nil) + # @overload create_http_route(parent: nil, http_route_id: nil, http_route: nil, request_id: nil) # Pass arguments to `create_http_route` via keyword arguments. Note that at # least one keyword argument is 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 HttpRoute. Must be in the - # format `projects/*/locations/global`. + # format `projects/*/locations/*`. # @param http_route_id [::String] # Required. Short name of the HttpRoute resource to be created. # @param http_route [::Google::Cloud::NetworkServices::V1::HttpRoute, ::Hash] # Required. HttpRoute resource to be created. + # @param request_id [::String] + # Optional. Idempotent request UUID. # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Gapic::Operation] # @yieldparam operation [::Gapic::Rest::TransportOperation] @@ -2762,7 +2766,7 @@ def update_http_route request, options = nil # # @param name [::String] # Required. A name of the HttpRoute to delete. Must be in the format - # `projects/*/locations/global/httpRoutes/*`. + # `projects/*/locations/*/httpRoutes/*`. # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Gapic::Operation] # @yieldparam operation [::Gapic::Rest::TransportOperation] @@ -2850,7 +2854,7 @@ def delete_http_route request, options = nil # # @param parent [::String] # Required. The project and location from which the TcpRoutes should be - # listed, specified in the format `projects/*/locations/global`. + # listed, specified in the format `projects/*/locations/*`. # @param page_size [::Integer] # Maximum number of TcpRoutes to return per call. # @param page_token [::String] @@ -2945,7 +2949,7 @@ def list_tcp_routes request, options = nil # # @param name [::String] # Required. A name of the TcpRoute to get. Must be in the format - # `projects/*/locations/global/tcpRoutes/*`. + # `projects/*/locations/*/tcpRoutes/*`. # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Google::Cloud::NetworkServices::V1::TcpRoute] # @yieldparam operation [::Gapic::Rest::TransportOperation] @@ -3024,7 +3028,7 @@ def get_tcp_route request, options = nil # # @param parent [::String] # Required. The parent resource of the TcpRoute. Must be in the - # format `projects/*/locations/global`. + # format `projects/*/locations/*`. # @param tcp_route_id [::String] # Required. Short name of the TcpRoute resource to be created. # @param tcp_route [::Google::Cloud::NetworkServices::V1::TcpRoute, ::Hash] @@ -3209,7 +3213,7 @@ def update_tcp_route request, options = nil # # @param name [::String] # Required. A name of the TcpRoute to delete. Must be in the format - # `projects/*/locations/global/tcpRoutes/*`. + # `projects/*/locations/*/tcpRoutes/*`. # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Gapic::Operation] # @yieldparam operation [::Gapic::Rest::TransportOperation] @@ -3297,7 +3301,7 @@ def delete_tcp_route request, options = nil # # @param parent [::String] # Required. The project and location from which the TlsRoutes should be - # listed, specified in the format `projects/*/locations/global`. + # listed, specified in the format `projects/*/locations/*`. # @param page_size [::Integer] # Maximum number of TlsRoutes to return per call. # @param page_token [::String] @@ -3392,7 +3396,7 @@ def list_tls_routes request, options = nil # # @param name [::String] # Required. A name of the TlsRoute to get. Must be in the format - # `projects/*/locations/global/tlsRoutes/*`. + # `projects/*/locations/*/tlsRoutes/*`. # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Google::Cloud::NetworkServices::V1::TlsRoute] # @yieldparam operation [::Gapic::Rest::TransportOperation] @@ -3471,7 +3475,7 @@ def get_tls_route request, options = nil # # @param parent [::String] # Required. The parent resource of the TlsRoute. Must be in the - # format `projects/*/locations/global`. + # format `projects/*/locations/*`. # @param tls_route_id [::String] # Required. Short name of the TlsRoute resource to be created. # @param tls_route [::Google::Cloud::NetworkServices::V1::TlsRoute, ::Hash] @@ -3656,7 +3660,7 @@ def update_tls_route request, options = nil # # @param name [::String] # Required. A name of the TlsRoute to delete. Must be in the format - # `projects/*/locations/global/tlsRoutes/*`. + # `projects/*/locations/*/tlsRoutes/*`. # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Gapic::Operation] # @yieldparam operation [::Gapic::Rest::TransportOperation] @@ -4187,7 +4191,7 @@ def delete_service_binding request, options = nil # # @param parent [::String] # Required. The project and location from which the Meshes should be - # listed, specified in the format `projects/*/locations/global`. + # listed, specified in the format `projects/*/locations/*`. # @param page_size [::Integer] # Maximum number of Meshes to return per call. # @param page_token [::String] @@ -4282,7 +4286,7 @@ def list_meshes request, options = nil # # @param name [::String] # Required. A name of the Mesh to get. Must be in the format - # `projects/*/locations/global/meshes/*`. + # `projects/*/locations/*/meshes/*`. # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Google::Cloud::NetworkServices::V1::Mesh] # @yieldparam operation [::Gapic::Rest::TransportOperation] @@ -4361,7 +4365,7 @@ def get_mesh request, options = nil # # @param parent [::String] # Required. The parent resource of the Mesh. Must be in the - # format `projects/*/locations/global`. + # format `projects/*/locations/*`. # @param mesh_id [::String] # Required. Short name of the Mesh resource to be created. # @param mesh [::Google::Cloud::NetworkServices::V1::Mesh, ::Hash] @@ -4546,7 +4550,7 @@ def update_mesh request, options = nil # # @param name [::String] # Required. A name of the Mesh to delete. Must be in the format - # `projects/*/locations/global/meshes/*`. + # `projects/*/locations/*/meshes/*`. # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Gapic::Operation] # @yieldparam operation [::Gapic::Rest::TransportOperation] @@ -5405,6 +5409,455 @@ def list_mesh_route_views request, options = nil raise ::Google::Cloud::Error.from_error(e) end + ## + # Lists AgentGateways in a given project and location. + # + # @overload list_agent_gateways(request, options = nil) + # Pass arguments to `list_agent_gateways` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::ListAgentGatewaysRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::ListAgentGatewaysRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_agent_gateways(parent: nil, page_size: nil, page_token: nil, return_partial_success: nil) + # Pass arguments to `list_agent_gateways` via keyword arguments. Note that at + # least one keyword argument is 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 project and location from which the AgentGateways should be + # listed, specified in the format `projects/*/locations/*`. + # @param page_size [::Integer] + # Optional. Maximum number of AgentGateways to return per call. + # @param page_token [::String] + # Optional. The value returned by the last `ListAgentGatewaysResponse` + # Indicates that this is a continuation of a prior `ListAgentGateways` + # call, and that the system should return the next page of data. + # @param return_partial_success [::Boolean] + # Optional. If true, allow partial responses for multi-regional Aggregated + # List requests. Otherwise if one of the locations is down or unreachable, + # the Aggregated List request will fail. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::AgentGateway>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::AgentGateway>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/network_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::ListAgentGatewaysRequest.new + # + # # Call the list_agent_gateways method. + # result = client.list_agent_gateways 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::NetworkServices::V1::AgentGateway. + # p item + # end + # + def list_agent_gateways request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::ListAgentGatewaysRequest + + # Converts hash 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_agent_gateways.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::NetworkServices::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_agent_gateways.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_agent_gateways.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @network_services_stub.list_agent_gateways request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @network_services_stub, :list_agent_gateways, "agent_gateways", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets details of a single AgentGateway. + # + # @overload get_agent_gateway(request, options = nil) + # Pass arguments to `get_agent_gateway` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::GetAgentGatewayRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::GetAgentGatewayRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_agent_gateway(name: nil) + # Pass arguments to `get_agent_gateway` via keyword arguments. Note that at + # least one keyword argument is 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. A name of the AgentGateway to get. Must be in the format + # `projects/*/locations/*/agentGateways/*`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::NetworkServices::V1::AgentGateway] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::NetworkServices::V1::AgentGateway] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/network_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::GetAgentGatewayRequest.new + # + # # Call the get_agent_gateway method. + # result = client.get_agent_gateway request + # + # # The returned object is of type Google::Cloud::NetworkServices::V1::AgentGateway. + # p result + # + def get_agent_gateway request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::GetAgentGatewayRequest + + # Converts hash 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_agent_gateway.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::NetworkServices::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_agent_gateway.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_agent_gateway.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @network_services_stub.get_agent_gateway 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 AgentGateway in a given project and location. + # + # @overload create_agent_gateway(request, options = nil) + # Pass arguments to `create_agent_gateway` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::CreateAgentGatewayRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::CreateAgentGatewayRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_agent_gateway(parent: nil, agent_gateway_id: nil, agent_gateway: nil) + # Pass arguments to `create_agent_gateway` via keyword arguments. Note that at + # least one keyword argument is 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 AgentGateway. Must be in the + # format `projects/*/locations/*`. + # @param agent_gateway_id [::String] + # Required. Short name of the AgentGateway resource to be created. + # @param agent_gateway [::Google::Cloud::NetworkServices::V1::AgentGateway, ::Hash] + # Required. AgentGateway resource to be created. + # @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_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::CreateAgentGatewayRequest.new + # + # # Call the create_agent_gateway method. + # result = client.create_agent_gateway 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_agent_gateway request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::CreateAgentGatewayRequest + + # Converts hash 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_agent_gateway.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::NetworkServices::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_agent_gateway.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_agent_gateway.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @network_services_stub.create_agent_gateway request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates the parameters of a single AgentGateway. + # + # @overload update_agent_gateway(request, options = nil) + # Pass arguments to `update_agent_gateway` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::UpdateAgentGatewayRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::UpdateAgentGatewayRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_agent_gateway(update_mask: nil, agent_gateway: nil) + # Pass arguments to `update_agent_gateway` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. Field mask is used to specify the fields to be overwritten in the + # AgentGateway resource by the update. + # The fields specified in the update_mask are relative to the resource, not + # the full request. A field will be overwritten if it is in the mask. If the + # user does not provide a mask then all fields will be overwritten. + # @param agent_gateway [::Google::Cloud::NetworkServices::V1::AgentGateway, ::Hash] + # Required. Updated AgentGateway 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_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::UpdateAgentGatewayRequest.new + # + # # Call the update_agent_gateway method. + # result = client.update_agent_gateway 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_agent_gateway request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::UpdateAgentGatewayRequest + + # Converts hash 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_agent_gateway.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::NetworkServices::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_agent_gateway.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_agent_gateway.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @network_services_stub.update_agent_gateway request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a single AgentGateway. + # + # @overload delete_agent_gateway(request, options = nil) + # Pass arguments to `delete_agent_gateway` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::DeleteAgentGatewayRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::DeleteAgentGatewayRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_agent_gateway(name: nil, etag: nil) + # Pass arguments to `delete_agent_gateway` via keyword arguments. Note that at + # least one keyword argument is 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. A name of the AgentGateway to delete. Must be in the format + # `projects/*/locations/*/agentGateways/*`. + # @param etag [::String] + # Optional. The etag of the AgentGateway to delete. + # @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_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::DeleteAgentGatewayRequest.new + # + # # Call the delete_agent_gateway method. + # result = client.delete_agent_gateway 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_agent_gateway request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::DeleteAgentGatewayRequest + + # Converts hash 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_agent_gateway.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::NetworkServices::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_agent_gateway.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_agent_gateway.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @network_services_stub.delete_agent_gateway 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 NetworkServices REST API. # @@ -5850,6 +6303,31 @@ class Rpcs # @return [::Gapic::Config::Method] # attr_reader :list_mesh_route_views + ## + # RPC-specific configuration for `list_agent_gateways` + # @return [::Gapic::Config::Method] + # + attr_reader :list_agent_gateways + ## + # RPC-specific configuration for `get_agent_gateway` + # @return [::Gapic::Config::Method] + # + attr_reader :get_agent_gateway + ## + # RPC-specific configuration for `create_agent_gateway` + # @return [::Gapic::Config::Method] + # + attr_reader :create_agent_gateway + ## + # RPC-specific configuration for `update_agent_gateway` + # @return [::Gapic::Config::Method] + # + attr_reader :update_agent_gateway + ## + # RPC-specific configuration for `delete_agent_gateway` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_agent_gateway # @private def initialize parent_rpcs = nil @@ -5969,6 +6447,16 @@ def initialize parent_rpcs = nil @list_gateway_route_views = ::Gapic::Config::Method.new list_gateway_route_views_config list_mesh_route_views_config = parent_rpcs.list_mesh_route_views if parent_rpcs.respond_to? :list_mesh_route_views @list_mesh_route_views = ::Gapic::Config::Method.new list_mesh_route_views_config + list_agent_gateways_config = parent_rpcs.list_agent_gateways if parent_rpcs.respond_to? :list_agent_gateways + @list_agent_gateways = ::Gapic::Config::Method.new list_agent_gateways_config + get_agent_gateway_config = parent_rpcs.get_agent_gateway if parent_rpcs.respond_to? :get_agent_gateway + @get_agent_gateway = ::Gapic::Config::Method.new get_agent_gateway_config + create_agent_gateway_config = parent_rpcs.create_agent_gateway if parent_rpcs.respond_to? :create_agent_gateway + @create_agent_gateway = ::Gapic::Config::Method.new create_agent_gateway_config + update_agent_gateway_config = parent_rpcs.update_agent_gateway if parent_rpcs.respond_to? :update_agent_gateway + @update_agent_gateway = ::Gapic::Config::Method.new update_agent_gateway_config + delete_agent_gateway_config = parent_rpcs.delete_agent_gateway if parent_rpcs.respond_to? :delete_agent_gateway + @delete_agent_gateway = ::Gapic::Config::Method.new delete_agent_gateway_config yield self if block_given? end diff --git a/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/network_services/rest/service_stub.rb b/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/network_services/rest/service_stub.rb index ebeca45c1c1e..f670a228b42b 100644 --- a/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/network_services/rest/service_stub.rb +++ b/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/network_services/rest/service_stub.rb @@ -2393,6 +2393,206 @@ def list_mesh_route_views request_pb, options = nil end end + ## + # Baseline implementation for the list_agent_gateways REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::ListAgentGatewaysRequest] + # 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::NetworkServices::V1::ListAgentGatewaysResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::NetworkServices::V1::ListAgentGatewaysResponse] + # A result object deserialized from the server's reply + def list_agent_gateways request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_agent_gateways_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_agent_gateways", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::NetworkServices::V1::ListAgentGatewaysResponse.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_agent_gateway REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::GetAgentGatewayRequest] + # 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::NetworkServices::V1::AgentGateway] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::NetworkServices::V1::AgentGateway] + # A result object deserialized from the server's reply + def get_agent_gateway request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_agent_gateway_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_agent_gateway", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::NetworkServices::V1::AgentGateway.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_agent_gateway REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::CreateAgentGatewayRequest] + # 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_agent_gateway request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_agent_gateway_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_agent_gateway", + 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_agent_gateway REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::UpdateAgentGatewayRequest] + # 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_agent_gateway request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_agent_gateway_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_agent_gateway", + 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_agent_gateway REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::DeleteAgentGatewayRequest] + # 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_agent_gateway request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_agent_gateway_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_agent_gateway", + 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 # @@ -3631,6 +3831,113 @@ def self.transcode_list_mesh_route_views_request request_pb ) transcoder.transcode request_pb end + + ## + # @private + # + # GRPC transcoding helper method for the list_agent_gateways REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::ListAgentGatewaysRequest] + # 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_agent_gateways_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/agentGateways", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_agent_gateway REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::GetAgentGatewayRequest] + # 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_agent_gateway_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/agentGateways/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_agent_gateway REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::CreateAgentGatewayRequest] + # 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_agent_gateway_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/agentGateways", + body: "agent_gateway", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_agent_gateway REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::UpdateAgentGatewayRequest] + # 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_agent_gateway_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{agent_gateway.name}", + body: "agent_gateway", + matches: [ + ["agent_gateway.name", %r{^projects/[^/]+/locations/[^/]+/agentGateways/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_agent_gateway REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::DeleteAgentGatewayRequest] + # 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_agent_gateway_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/agentGateways/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end end end end diff --git a/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/agent_gateway_pb.rb b/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/agent_gateway_pb.rb similarity index 100% rename from owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/agent_gateway_pb.rb rename to google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/agent_gateway_pb.rb diff --git a/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/dep_pb.rb b/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/dep_pb.rb index cbab496ae8b2..189ed93ceeaf 100644 --- a/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/dep_pb.rb +++ b/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/dep_pb.rb @@ -18,7 +18,7 @@ require 'google/protobuf/timestamp_pb' -descriptor_data = "\n)google/cloud/networkservices/v1/dep.proto\x12\x1fgoogle.cloud.networkservices.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1bgoogle/api/field_info.proto\x1a\x19google/api/resource.proto\x1a,google/cloud/networkservices/v1/common.proto\x1a#google/longrunning/operations.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xb5\x04\n\x0e\x45xtensionChain\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\\\n\x0fmatch_condition\x18\x02 \x01(\x0b\x32>.google.cloud.networkservices.v1.ExtensionChain.MatchConditionB\x03\xe0\x41\x02\x12R\n\nextensions\x18\x03 \x03(\x0b\x32\x39.google.cloud.networkservices.v1.ExtensionChain.ExtensionB\x03\xe0\x41\x02\x1a-\n\x0eMatchCondition\x12\x1b\n\x0e\x63\x65l_expression\x18\x01 \x01(\tB\x03\xe0\x41\x02\x1a\xae\x02\n\tExtension\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x16\n\tauthority\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x14\n\x07service\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12I\n\x10supported_events\x18\x04 \x03(\x0e\x32*.google.cloud.networkservices.v1.EventTypeB\x03\xe0\x41\x01\x12/\n\x07timeout\x18\x05 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x01\x12\x16\n\tfail_open\x18\x06 \x01(\x08\x42\x03\xe0\x41\x01\x12\x1c\n\x0f\x66orward_headers\x18\x07 \x03(\tB\x03\xe0\x41\x01\x12.\n\x08metadata\x18\t \x01(\x0b\x32\x17.google.protobuf.StructB\x03\xe0\x41\x01\"\xe5\x05\n\x12LbTrafficExtension\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x08\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\t \x01(\tB\x03\xe0\x41\x01\x12T\n\x06labels\x18\x04 \x03(\x0b\x32?.google.cloud.networkservices.v1.LbTrafficExtension.LabelsEntryB\x03\xe0\x41\x01\x12\x1d\n\x10\x66orwarding_rules\x18\x05 \x03(\tB\x03\xe0\x41\x01\x12N\n\x10\x65xtension_chains\x18\x07 \x03(\x0b\x32/.google.cloud.networkservices.v1.ExtensionChainB\x03\xe0\x41\x02\x12X\n\x15load_balancing_scheme\x18\x08 \x01(\x0e\x32\x34.google.cloud.networkservices.v1.LoadBalancingSchemeB\x03\xe0\x41\x02\x12.\n\x08metadata\x18\n \x01(\x0b\x32\x17.google.protobuf.StructB\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\xb4\x01\xea\x41\xb0\x01\n1networkservices.googleapis.com/LbTrafficExtension\x12Rprojects/{project}/locations/{location}/lbTrafficExtensions/{lb_traffic_extension}*\x13lbTrafficExtensions2\x12lbTrafficExtension\"\xc8\x01\n\x1eListLbTrafficExtensionsRequest\x12I\n\x06parent\x18\x01 \x01(\tB9\xe0\x41\x02\xfa\x41\x33\x12\x31networkservices.googleapis.com/LbTrafficExtension\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\xa3\x01\n\x1fListLbTrafficExtensionsResponse\x12R\n\x15lb_traffic_extensions\x18\x01 \x03(\x0b\x32\x33.google.cloud.networkservices.v1.LbTrafficExtension\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"g\n\x1cGetLbTrafficExtensionRequest\x12G\n\x04name\x18\x01 \x01(\tB9\xe0\x41\x02\xfa\x41\x33\n1networkservices.googleapis.com/LbTrafficExtension\"\x8b\x02\n\x1f\x43reateLbTrafficExtensionRequest\x12I\n\x06parent\x18\x01 \x01(\tB9\xe0\x41\x02\xfa\x41\x33\x12\x31networkservices.googleapis.com/LbTrafficExtension\x12$\n\x17lb_traffic_extension_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12V\n\x14lb_traffic_extension\x18\x03 \x01(\x0b\x32\x33.google.cloud.networkservices.v1.LbTrafficExtensionB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x04 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\xd0\x01\n\x1fUpdateLbTrafficExtensionRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x12V\n\x14lb_traffic_extension\x18\x02 \x01(\x0b\x32\x33.google.cloud.networkservices.v1.LbTrafficExtensionB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x03 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\x8b\x01\n\x1f\x44\x65leteLbTrafficExtensionRequest\x12G\n\x04name\x18\x01 \x01(\tB9\xe0\x41\x02\xfa\x41\x33\n1networkservices.googleapis.com/LbTrafficExtension\x12\x1f\n\nrequest_id\x18\x02 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\xd7\x05\n\x10LbRouteExtension\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x08\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\t \x01(\tB\x03\xe0\x41\x01\x12R\n\x06labels\x18\x04 \x03(\x0b\x32=.google.cloud.networkservices.v1.LbRouteExtension.LabelsEntryB\x03\xe0\x41\x01\x12\x1d\n\x10\x66orwarding_rules\x18\x05 \x03(\tB\x03\xe0\x41\x02\x12N\n\x10\x65xtension_chains\x18\x07 \x03(\x0b\x32/.google.cloud.networkservices.v1.ExtensionChainB\x03\xe0\x41\x02\x12X\n\x15load_balancing_scheme\x18\x08 \x01(\x0e\x32\x34.google.cloud.networkservices.v1.LoadBalancingSchemeB\x03\xe0\x41\x02\x12.\n\x08metadata\x18\n \x01(\x0b\x32\x17.google.protobuf.StructB\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\xaa\x01\xea\x41\xa6\x01\n/networkservices.googleapis.com/LbRouteExtension\x12Nprojects/{project}/locations/{location}/lbRouteExtensions/{lb_route_extension}*\x11lbRouteExtensions2\x10lbRouteExtension\"\xc4\x01\n\x1cListLbRouteExtensionsRequest\x12G\n\x06parent\x18\x01 \x01(\tB7\xe0\x41\x02\xfa\x41\x31\x12/networkservices.googleapis.com/LbRouteExtension\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x9d\x01\n\x1dListLbRouteExtensionsResponse\x12N\n\x13lb_route_extensions\x18\x01 \x03(\x0b\x32\x31.google.cloud.networkservices.v1.LbRouteExtension\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"c\n\x1aGetLbRouteExtensionRequest\x12\x45\n\x04name\x18\x01 \x01(\tB7\xe0\x41\x02\xfa\x41\x31\n/networkservices.googleapis.com/LbRouteExtension\"\x81\x02\n\x1d\x43reateLbRouteExtensionRequest\x12G\n\x06parent\x18\x01 \x01(\tB7\xe0\x41\x02\xfa\x41\x31\x12/networkservices.googleapis.com/LbRouteExtension\x12\"\n\x15lb_route_extension_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12R\n\x12lb_route_extension\x18\x03 \x01(\x0b\x32\x31.google.cloud.networkservices.v1.LbRouteExtensionB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x04 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\xca\x01\n\x1dUpdateLbRouteExtensionRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x12R\n\x12lb_route_extension\x18\x02 \x01(\x0b\x32\x31.google.cloud.networkservices.v1.LbRouteExtensionB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x03 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\x87\x01\n\x1d\x44\x65leteLbRouteExtensionRequest\x12\x45\n\x04name\x18\x01 \x01(\tB7\xe0\x41\x02\xfa\x41\x31\n/networkservices.googleapis.com/LbRouteExtension\x12\x1f\n\nrequest_id\x18\x02 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\xa0\x05\n\x0fLbEdgeExtension\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x08\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\t \x01(\tB\x03\xe0\x41\x01\x12Q\n\x06labels\x18\x04 \x03(\x0b\x32<.google.cloud.networkservices.v1.LbEdgeExtension.LabelsEntryB\x03\xe0\x41\x01\x12\x1d\n\x10\x66orwarding_rules\x18\x05 \x03(\tB\x03\xe0\x41\x02\x12N\n\x10\x65xtension_chains\x18\x06 \x03(\x0b\x32/.google.cloud.networkservices.v1.ExtensionChainB\x03\xe0\x41\x02\x12X\n\x15load_balancing_scheme\x18\x07 \x01(\x0e\x32\x34.google.cloud.networkservices.v1.LoadBalancingSchemeB\x03\xe0\x41\x02\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\xa5\x01\xea\x41\xa1\x01\n.networkservices.googleapis.com/LbEdgeExtension\x12Lprojects/{project}/locations/{location}/lbEdgeExtensions/{lb_edge_extension}*\x10lbEdgeExtensions2\x0flbEdgeExtension\"\xc2\x01\n\x1bListLbEdgeExtensionsRequest\x12\x46\n\x06parent\x18\x01 \x01(\tB6\xe0\x41\x02\xfa\x41\x30\x12.networkservices.googleapis.com/LbEdgeExtension\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x9a\x01\n\x1cListLbEdgeExtensionsResponse\x12L\n\x12lb_edge_extensions\x18\x01 \x03(\x0b\x32\x30.google.cloud.networkservices.v1.LbEdgeExtension\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"a\n\x19GetLbEdgeExtensionRequest\x12\x44\n\x04name\x18\x01 \x01(\tB6\xe0\x41\x02\xfa\x41\x30\n.networkservices.googleapis.com/LbEdgeExtension\"\xfc\x01\n\x1c\x43reateLbEdgeExtensionRequest\x12\x46\n\x06parent\x18\x01 \x01(\tB6\xe0\x41\x02\xfa\x41\x30\x12.networkservices.googleapis.com/LbEdgeExtension\x12!\n\x14lb_edge_extension_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12P\n\x11lb_edge_extension\x18\x03 \x01(\x0b\x32\x30.google.cloud.networkservices.v1.LbEdgeExtensionB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x04 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\xc7\x01\n\x1cUpdateLbEdgeExtensionRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x12P\n\x11lb_edge_extension\x18\x02 \x01(\x0b\x32\x30.google.cloud.networkservices.v1.LbEdgeExtensionB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x03 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\x85\x01\n\x1c\x44\x65leteLbEdgeExtensionRequest\x12\x44\n\x04name\x18\x01 \x01(\tB6\xe0\x41\x02\xfa\x41\x30\n.networkservices.googleapis.com/LbEdgeExtension\x12\x1f\n\nrequest_id\x18\x02 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\xb5\x06\n\x0e\x41uthzExtension\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x08\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12P\n\x06labels\x18\x05 \x03(\x0b\x32;.google.cloud.networkservices.v1.AuthzExtension.LabelsEntryB\x03\xe0\x41\x01\x12X\n\x15load_balancing_scheme\x18\x06 \x01(\x0e\x32\x34.google.cloud.networkservices.v1.LoadBalancingSchemeB\x03\xe0\x41\x02\x12\x16\n\tauthority\x18\x07 \x01(\tB\x03\xe0\x41\x02\x12\x14\n\x07service\x18\x08 \x01(\tB\x03\xe0\x41\x02\x12/\n\x07timeout\x18\t \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x02\x12\x16\n\tfail_open\x18\n \x01(\x08\x42\x03\xe0\x41\x01\x12.\n\x08metadata\x18\x0b \x01(\x0b\x32\x17.google.protobuf.StructB\x03\xe0\x41\x01\x12\x1c\n\x0f\x66orward_headers\x18\x0c \x03(\tB\x03\xe0\x41\x01\x12\x45\n\x0bwire_format\x18\x0e \x01(\x0e\x32+.google.cloud.networkservices.v1.WireFormatB\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\x9f\x01\xea\x41\x9b\x01\n-networkservices.googleapis.com/AuthzExtension\x12Iprojects/{project}/locations/{location}/authzExtensions/{authz_extension}*\x0f\x61uthzExtensions2\x0e\x61uthzExtension\"\xc0\x01\n\x1aListAuthzExtensionsRequest\x12\x45\n\x06parent\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\x12-networkservices.googleapis.com/AuthzExtension\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x96\x01\n\x1bListAuthzExtensionsResponse\x12I\n\x10\x61uthz_extensions\x18\x01 \x03(\x0b\x32/.google.cloud.networkservices.v1.AuthzExtension\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"_\n\x18GetAuthzExtensionRequest\x12\x43\n\x04name\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-networkservices.googleapis.com/AuthzExtension\"\xf5\x01\n\x1b\x43reateAuthzExtensionRequest\x12\x45\n\x06parent\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\x12-networkservices.googleapis.com/AuthzExtension\x12\x1f\n\x12\x61uthz_extension_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12M\n\x0f\x61uthz_extension\x18\x03 \x01(\x0b\x32/.google.cloud.networkservices.v1.AuthzExtensionB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x04 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\xc3\x01\n\x1bUpdateAuthzExtensionRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12M\n\x0f\x61uthz_extension\x18\x02 \x01(\x0b\x32/.google.cloud.networkservices.v1.AuthzExtensionB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x03 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\x83\x01\n\x1b\x44\x65leteAuthzExtensionRequest\x12\x43\n\x04name\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-networkservices.googleapis.com/AuthzExtension\x12\x1f\n\nrequest_id\x18\x02 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01*\xa4\x01\n\tEventType\x12\x1a\n\x16\x45VENT_TYPE_UNSPECIFIED\x10\x00\x12\x13\n\x0fREQUEST_HEADERS\x10\x01\x12\x10\n\x0cREQUEST_BODY\x10\x02\x12\x14\n\x10RESPONSE_HEADERS\x10\x03\x12\x11\n\rRESPONSE_BODY\x10\x04\x12\x14\n\x10REQUEST_TRAILERS\x10\x05\x12\x15\n\x11RESPONSE_TRAILERS\x10\x06*h\n\x13LoadBalancingScheme\x12%\n!LOAD_BALANCING_SCHEME_UNSPECIFIED\x10\x00\x12\x14\n\x10INTERNAL_MANAGED\x10\x01\x12\x14\n\x10\x45XTERNAL_MANAGED\x10\x02*<\n\nWireFormat\x12\x1b\n\x17WIRE_FORMAT_UNSPECIFIED\x10\x00\x12\x11\n\rEXT_PROC_GRPC\x10\x01\x32\xf9\'\n\nDepService\x12\xe6\x01\n\x17ListLbTrafficExtensions\x12?.google.cloud.networkservices.v1.ListLbTrafficExtensionsRequest\x1a@.google.cloud.networkservices.v1.ListLbTrafficExtensionsResponse\"H\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x39\x12\x37/v1/{parent=projects/*/locations/*}/lbTrafficExtensions\x12\xd3\x01\n\x15GetLbTrafficExtension\x12=.google.cloud.networkservices.v1.GetLbTrafficExtensionRequest\x1a\x33.google.cloud.networkservices.v1.LbTrafficExtension\"F\xda\x41\x04name\x82\xd3\xe4\x93\x02\x39\x12\x37/v1/{name=projects/*/locations/*/lbTrafficExtensions/*}\x12\xb3\x02\n\x18\x43reateLbTrafficExtension\x12@.google.cloud.networkservices.v1.CreateLbTrafficExtensionRequest\x1a\x1d.google.longrunning.Operation\"\xb5\x01\xca\x41\'\n\x12LbTrafficExtension\x12\x11OperationMetadata\xda\x41\x33parent,lb_traffic_extension,lb_traffic_extension_id\x82\xd3\xe4\x93\x02O\"7/v1/{parent=projects/*/locations/*}/lbTrafficExtensions:\x14lb_traffic_extension\x12\xb5\x02\n\x18UpdateLbTrafficExtension\x12@.google.cloud.networkservices.v1.UpdateLbTrafficExtensionRequest\x1a\x1d.google.longrunning.Operation\"\xb7\x01\xca\x41\'\n\x12LbTrafficExtension\x12\x11OperationMetadata\xda\x41 lb_traffic_extension,update_mask\x82\xd3\xe4\x93\x02\x64\x32L/v1/{lb_traffic_extension.name=projects/*/locations/*/lbTrafficExtensions/*}:\x14lb_traffic_extension\x12\xf0\x01\n\x18\x44\x65leteLbTrafficExtension\x12@.google.cloud.networkservices.v1.DeleteLbTrafficExtensionRequest\x1a\x1d.google.longrunning.Operation\"s\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x39*7/v1/{name=projects/*/locations/*/lbTrafficExtensions/*}\x12\xde\x01\n\x15ListLbRouteExtensions\x12=.google.cloud.networkservices.v1.ListLbRouteExtensionsRequest\x1a>.google.cloud.networkservices.v1.ListLbRouteExtensionsResponse\"F\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x37\x12\x35/v1/{parent=projects/*/locations/*}/lbRouteExtensions\x12\xcb\x01\n\x13GetLbRouteExtension\x12;.google.cloud.networkservices.v1.GetLbRouteExtensionRequest\x1a\x31.google.cloud.networkservices.v1.LbRouteExtension\"D\xda\x41\x04name\x82\xd3\xe4\x93\x02\x37\x12\x35/v1/{name=projects/*/locations/*/lbRouteExtensions/*}\x12\xa5\x02\n\x16\x43reateLbRouteExtension\x12>.google.cloud.networkservices.v1.CreateLbRouteExtensionRequest\x1a\x1d.google.longrunning.Operation\"\xab\x01\xca\x41%\n\x10LbRouteExtension\x12\x11OperationMetadata\xda\x41/parent,lb_route_extension,lb_route_extension_id\x82\xd3\xe4\x93\x02K\"5/v1/{parent=projects/*/locations/*}/lbRouteExtensions:\x12lb_route_extension\x12\xa7\x02\n\x16UpdateLbRouteExtension\x12>.google.cloud.networkservices.v1.UpdateLbRouteExtensionRequest\x1a\x1d.google.longrunning.Operation\"\xad\x01\xca\x41%\n\x10LbRouteExtension\x12\x11OperationMetadata\xda\x41\x1elb_route_extension,update_mask\x82\xd3\xe4\x93\x02^2H/v1/{lb_route_extension.name=projects/*/locations/*/lbRouteExtensions/*}:\x12lb_route_extension\x12\xea\x01\n\x16\x44\x65leteLbRouteExtension\x12>.google.cloud.networkservices.v1.DeleteLbRouteExtensionRequest\x1a\x1d.google.longrunning.Operation\"q\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x37*5/v1/{name=projects/*/locations/*/lbRouteExtensions/*}\x12\xda\x01\n\x14ListLbEdgeExtensions\x12<.google.cloud.networkservices.v1.ListLbEdgeExtensionsRequest\x1a=.google.cloud.networkservices.v1.ListLbEdgeExtensionsResponse\"E\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x36\x12\x34/v1/{parent=projects/*/locations/*}/lbEdgeExtensions\x12\xc7\x01\n\x12GetLbEdgeExtension\x12:.google.cloud.networkservices.v1.GetLbEdgeExtensionRequest\x1a\x30.google.cloud.networkservices.v1.LbEdgeExtension\"C\xda\x41\x04name\x82\xd3\xe4\x93\x02\x36\x12\x34/v1/{name=projects/*/locations/*/lbEdgeExtensions/*}\x12\x9e\x02\n\x15\x43reateLbEdgeExtension\x12=.google.cloud.networkservices.v1.CreateLbEdgeExtensionRequest\x1a\x1d.google.longrunning.Operation\"\xa6\x01\xca\x41$\n\x0fLbEdgeExtension\x12\x11OperationMetadata\xda\x41-parent,lb_edge_extension,lb_edge_extension_id\x82\xd3\xe4\x93\x02I\"4/v1/{parent=projects/*/locations/*}/lbEdgeExtensions:\x11lb_edge_extension\x12\xa0\x02\n\x15UpdateLbEdgeExtension\x12=.google.cloud.networkservices.v1.UpdateLbEdgeExtensionRequest\x1a\x1d.google.longrunning.Operation\"\xa8\x01\xca\x41$\n\x0fLbEdgeExtension\x12\x11OperationMetadata\xda\x41\x1dlb_edge_extension,update_mask\x82\xd3\xe4\x93\x02[2F/v1/{lb_edge_extension.name=projects/*/locations/*/lbEdgeExtensions/*}:\x11lb_edge_extension\x12\xe7\x01\n\x15\x44\x65leteLbEdgeExtension\x12=.google.cloud.networkservices.v1.DeleteLbEdgeExtensionRequest\x1a\x1d.google.longrunning.Operation\"p\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x36*4/v1/{name=projects/*/locations/*/lbEdgeExtensions/*}\x12\xd6\x01\n\x13ListAuthzExtensions\x12;.google.cloud.networkservices.v1.ListAuthzExtensionsRequest\x1a<.google.cloud.networkservices.v1.ListAuthzExtensionsResponse\"D\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x35\x12\x33/v1/{parent=projects/*/locations/*}/authzExtensions\x12\xc3\x01\n\x11GetAuthzExtension\x12\x39.google.cloud.networkservices.v1.GetAuthzExtensionRequest\x1a/.google.cloud.networkservices.v1.AuthzExtension\"B\xda\x41\x04name\x82\xd3\xe4\x93\x02\x35\x12\x33/v1/{name=projects/*/locations/*/authzExtensions/*}\x12\x94\x02\n\x14\x43reateAuthzExtension\x12<.google.cloud.networkservices.v1.CreateAuthzExtensionRequest\x1a\x1d.google.longrunning.Operation\"\x9e\x01\xca\x41#\n\x0e\x41uthzExtension\x12\x11OperationMetadata\xda\x41)parent,authz_extension,authz_extension_id\x82\xd3\xe4\x93\x02\x46\"3/v1/{parent=projects/*/locations/*}/authzExtensions:\x0f\x61uthz_extension\x12\x96\x02\n\x14UpdateAuthzExtension\x12<.google.cloud.networkservices.v1.UpdateAuthzExtensionRequest\x1a\x1d.google.longrunning.Operation\"\xa0\x01\xca\x41#\n\x0e\x41uthzExtension\x12\x11OperationMetadata\xda\x41\x1b\x61uthz_extension,update_mask\x82\xd3\xe4\x93\x02V2C/v1/{authz_extension.name=projects/*/locations/*/authzExtensions/*}:\x0f\x61uthz_extension\x12\xe4\x01\n\x14\x44\x65leteAuthzExtension\x12<.google.cloud.networkservices.v1.DeleteAuthzExtensionRequest\x1a\x1d.google.longrunning.Operation\"o\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x35*3/v1/{name=projects/*/locations/*/authzExtensions/*}\x1aR\xca\x41\x1enetworkservices.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xe9\x01\n#com.google.cloud.networkservices.v1B\x08\x44\x65pProtoP\x01ZMcloud.google.com/go/networkservices/apiv1/networkservicespb;networkservicespb\xaa\x02\x1fGoogle.Cloud.NetworkServices.V1\xca\x02\x1fGoogle\\Cloud\\NetworkServices\\V1\xea\x02\"Google::Cloud::NetworkServices::V1b\x06proto3" +descriptor_data = "\n)google/cloud/networkservices/v1/dep.proto\x12\x1fgoogle.cloud.networkservices.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1bgoogle/api/field_info.proto\x1a\x19google/api/resource.proto\x1a,google/cloud/networkservices/v1/common.proto\x1a#google/longrunning/operations.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xa0\x06\n\x0e\x45xtensionChain\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\\\n\x0fmatch_condition\x18\x02 \x01(\x0b\x32>.google.cloud.networkservices.v1.ExtensionChain.MatchConditionB\x03\xe0\x41\x02\x12R\n\nextensions\x18\x03 \x03(\x0b\x32\x39.google.cloud.networkservices.v1.ExtensionChain.ExtensionB\x03\xe0\x41\x02\x1a-\n\x0eMatchCondition\x12\x1b\n\x0e\x63\x65l_expression\x18\x01 \x01(\tB\x03\xe0\x41\x02\x1a\x99\x04\n\tExtension\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tauthority\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x14\n\x07service\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12I\n\x10supported_events\x18\x04 \x03(\x0e\x32*.google.cloud.networkservices.v1.EventTypeB\x03\xe0\x41\x01\x12/\n\x07timeout\x18\x05 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x01\x12\x16\n\tfail_open\x18\x06 \x01(\x08\x42\x03\xe0\x41\x01\x12\x1c\n\x0f\x66orward_headers\x18\x07 \x03(\tB\x03\xe0\x41\x01\x12\x1f\n\x12\x66orward_attributes\x18\x08 \x03(\tB\x03\xe0\x41\x01\x12.\n\x08metadata\x18\t \x01(\x0b\x32\x17.google.protobuf.StructB\x03\xe0\x41\x01\x12R\n\x16request_body_send_mode\x18\x0e \x01(\x0e\x32-.google.cloud.networkservices.v1.BodySendModeB\x03\xe0\x41\x01\x12S\n\x17response_body_send_mode\x18\x0f \x01(\x0e\x32-.google.cloud.networkservices.v1.BodySendModeB\x03\xe0\x41\x01\x12\x1f\n\x12observability_mode\x18\x10 \x01(\x08\x42\x03\xe0\x41\x01\"\xe5\x05\n\x12LbTrafficExtension\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x08\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\t \x01(\tB\x03\xe0\x41\x01\x12T\n\x06labels\x18\x04 \x03(\x0b\x32?.google.cloud.networkservices.v1.LbTrafficExtension.LabelsEntryB\x03\xe0\x41\x01\x12\x1d\n\x10\x66orwarding_rules\x18\x05 \x03(\tB\x03\xe0\x41\x01\x12N\n\x10\x65xtension_chains\x18\x07 \x03(\x0b\x32/.google.cloud.networkservices.v1.ExtensionChainB\x03\xe0\x41\x02\x12X\n\x15load_balancing_scheme\x18\x08 \x01(\x0e\x32\x34.google.cloud.networkservices.v1.LoadBalancingSchemeB\x03\xe0\x41\x02\x12.\n\x08metadata\x18\n \x01(\x0b\x32\x17.google.protobuf.StructB\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\xb4\x01\xea\x41\xb0\x01\n1networkservices.googleapis.com/LbTrafficExtension\x12Rprojects/{project}/locations/{location}/lbTrafficExtensions/{lb_traffic_extension}*\x13lbTrafficExtensions2\x12lbTrafficExtension\"\xc8\x01\n\x1eListLbTrafficExtensionsRequest\x12I\n\x06parent\x18\x01 \x01(\tB9\xe0\x41\x02\xfa\x41\x33\x12\x31networkservices.googleapis.com/LbTrafficExtension\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\xa3\x01\n\x1fListLbTrafficExtensionsResponse\x12R\n\x15lb_traffic_extensions\x18\x01 \x03(\x0b\x32\x33.google.cloud.networkservices.v1.LbTrafficExtension\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"g\n\x1cGetLbTrafficExtensionRequest\x12G\n\x04name\x18\x01 \x01(\tB9\xe0\x41\x02\xfa\x41\x33\n1networkservices.googleapis.com/LbTrafficExtension\"\x8b\x02\n\x1f\x43reateLbTrafficExtensionRequest\x12I\n\x06parent\x18\x01 \x01(\tB9\xe0\x41\x02\xfa\x41\x33\x12\x31networkservices.googleapis.com/LbTrafficExtension\x12$\n\x17lb_traffic_extension_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12V\n\x14lb_traffic_extension\x18\x03 \x01(\x0b\x32\x33.google.cloud.networkservices.v1.LbTrafficExtensionB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x04 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\xd0\x01\n\x1fUpdateLbTrafficExtensionRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x12V\n\x14lb_traffic_extension\x18\x02 \x01(\x0b\x32\x33.google.cloud.networkservices.v1.LbTrafficExtensionB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x03 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\x8b\x01\n\x1f\x44\x65leteLbTrafficExtensionRequest\x12G\n\x04name\x18\x01 \x01(\tB9\xe0\x41\x02\xfa\x41\x33\n1networkservices.googleapis.com/LbTrafficExtension\x12\x1f\n\nrequest_id\x18\x02 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\xd7\x05\n\x10LbRouteExtension\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x08\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\t \x01(\tB\x03\xe0\x41\x01\x12R\n\x06labels\x18\x04 \x03(\x0b\x32=.google.cloud.networkservices.v1.LbRouteExtension.LabelsEntryB\x03\xe0\x41\x01\x12\x1d\n\x10\x66orwarding_rules\x18\x05 \x03(\tB\x03\xe0\x41\x02\x12N\n\x10\x65xtension_chains\x18\x07 \x03(\x0b\x32/.google.cloud.networkservices.v1.ExtensionChainB\x03\xe0\x41\x02\x12X\n\x15load_balancing_scheme\x18\x08 \x01(\x0e\x32\x34.google.cloud.networkservices.v1.LoadBalancingSchemeB\x03\xe0\x41\x02\x12.\n\x08metadata\x18\n \x01(\x0b\x32\x17.google.protobuf.StructB\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\xaa\x01\xea\x41\xa6\x01\n/networkservices.googleapis.com/LbRouteExtension\x12Nprojects/{project}/locations/{location}/lbRouteExtensions/{lb_route_extension}*\x11lbRouteExtensions2\x10lbRouteExtension\"\xc4\x01\n\x1cListLbRouteExtensionsRequest\x12G\n\x06parent\x18\x01 \x01(\tB7\xe0\x41\x02\xfa\x41\x31\x12/networkservices.googleapis.com/LbRouteExtension\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x9d\x01\n\x1dListLbRouteExtensionsResponse\x12N\n\x13lb_route_extensions\x18\x01 \x03(\x0b\x32\x31.google.cloud.networkservices.v1.LbRouteExtension\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"c\n\x1aGetLbRouteExtensionRequest\x12\x45\n\x04name\x18\x01 \x01(\tB7\xe0\x41\x02\xfa\x41\x31\n/networkservices.googleapis.com/LbRouteExtension\"\x81\x02\n\x1d\x43reateLbRouteExtensionRequest\x12G\n\x06parent\x18\x01 \x01(\tB7\xe0\x41\x02\xfa\x41\x31\x12/networkservices.googleapis.com/LbRouteExtension\x12\"\n\x15lb_route_extension_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12R\n\x12lb_route_extension\x18\x03 \x01(\x0b\x32\x31.google.cloud.networkservices.v1.LbRouteExtensionB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x04 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\xca\x01\n\x1dUpdateLbRouteExtensionRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x12R\n\x12lb_route_extension\x18\x02 \x01(\x0b\x32\x31.google.cloud.networkservices.v1.LbRouteExtensionB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x03 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\x87\x01\n\x1d\x44\x65leteLbRouteExtensionRequest\x12\x45\n\x04name\x18\x01 \x01(\tB7\xe0\x41\x02\xfa\x41\x31\n/networkservices.googleapis.com/LbRouteExtension\x12\x1f\n\nrequest_id\x18\x02 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\xa0\x05\n\x0fLbEdgeExtension\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x08\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\t \x01(\tB\x03\xe0\x41\x01\x12Q\n\x06labels\x18\x04 \x03(\x0b\x32<.google.cloud.networkservices.v1.LbEdgeExtension.LabelsEntryB\x03\xe0\x41\x01\x12\x1d\n\x10\x66orwarding_rules\x18\x05 \x03(\tB\x03\xe0\x41\x02\x12N\n\x10\x65xtension_chains\x18\x06 \x03(\x0b\x32/.google.cloud.networkservices.v1.ExtensionChainB\x03\xe0\x41\x02\x12X\n\x15load_balancing_scheme\x18\x07 \x01(\x0e\x32\x34.google.cloud.networkservices.v1.LoadBalancingSchemeB\x03\xe0\x41\x02\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\xa5\x01\xea\x41\xa1\x01\n.networkservices.googleapis.com/LbEdgeExtension\x12Lprojects/{project}/locations/{location}/lbEdgeExtensions/{lb_edge_extension}*\x10lbEdgeExtensions2\x0flbEdgeExtension\"\xc2\x01\n\x1bListLbEdgeExtensionsRequest\x12\x46\n\x06parent\x18\x01 \x01(\tB6\xe0\x41\x02\xfa\x41\x30\x12.networkservices.googleapis.com/LbEdgeExtension\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x9a\x01\n\x1cListLbEdgeExtensionsResponse\x12L\n\x12lb_edge_extensions\x18\x01 \x03(\x0b\x32\x30.google.cloud.networkservices.v1.LbEdgeExtension\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"a\n\x19GetLbEdgeExtensionRequest\x12\x44\n\x04name\x18\x01 \x01(\tB6\xe0\x41\x02\xfa\x41\x30\n.networkservices.googleapis.com/LbEdgeExtension\"\xfc\x01\n\x1c\x43reateLbEdgeExtensionRequest\x12\x46\n\x06parent\x18\x01 \x01(\tB6\xe0\x41\x02\xfa\x41\x30\x12.networkservices.googleapis.com/LbEdgeExtension\x12!\n\x14lb_edge_extension_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12P\n\x11lb_edge_extension\x18\x03 \x01(\x0b\x32\x30.google.cloud.networkservices.v1.LbEdgeExtensionB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x04 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\xc7\x01\n\x1cUpdateLbEdgeExtensionRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x12P\n\x11lb_edge_extension\x18\x02 \x01(\x0b\x32\x30.google.cloud.networkservices.v1.LbEdgeExtensionB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x03 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\x85\x01\n\x1c\x44\x65leteLbEdgeExtensionRequest\x12\x44\n\x04name\x18\x01 \x01(\tB6\xe0\x41\x02\xfa\x41\x30\n.networkservices.googleapis.com/LbEdgeExtension\x12\x1f\n\nrequest_id\x18\x02 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\xd6\x06\n\x0e\x41uthzExtension\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x08\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12P\n\x06labels\x18\x05 \x03(\x0b\x32;.google.cloud.networkservices.v1.AuthzExtension.LabelsEntryB\x03\xe0\x41\x01\x12X\n\x15load_balancing_scheme\x18\x06 \x01(\x0e\x32\x34.google.cloud.networkservices.v1.LoadBalancingSchemeB\x03\xe0\x41\x01\x12\x16\n\tauthority\x18\x07 \x01(\tB\x03\xe0\x41\x01\x12\x14\n\x07service\x18\x08 \x01(\tB\x03\xe0\x41\x02\x12/\n\x07timeout\x18\t \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x02\x12\x16\n\tfail_open\x18\n \x01(\x08\x42\x03\xe0\x41\x01\x12.\n\x08metadata\x18\x0b \x01(\x0b\x32\x17.google.protobuf.StructB\x03\xe0\x41\x01\x12\x1c\n\x0f\x66orward_headers\x18\x0c \x03(\tB\x03\xe0\x41\x01\x12\x1f\n\x12\x66orward_attributes\x18\r \x03(\tB\x03\xe0\x41\x01\x12\x45\n\x0bwire_format\x18\x0e \x01(\x0e\x32+.google.cloud.networkservices.v1.WireFormatB\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\x9f\x01\xea\x41\x9b\x01\n-networkservices.googleapis.com/AuthzExtension\x12Iprojects/{project}/locations/{location}/authzExtensions/{authz_extension}*\x0f\x61uthzExtensions2\x0e\x61uthzExtension\"\xc0\x01\n\x1aListAuthzExtensionsRequest\x12\x45\n\x06parent\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\x12-networkservices.googleapis.com/AuthzExtension\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x96\x01\n\x1bListAuthzExtensionsResponse\x12I\n\x10\x61uthz_extensions\x18\x01 \x03(\x0b\x32/.google.cloud.networkservices.v1.AuthzExtension\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"_\n\x18GetAuthzExtensionRequest\x12\x43\n\x04name\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-networkservices.googleapis.com/AuthzExtension\"\xf5\x01\n\x1b\x43reateAuthzExtensionRequest\x12\x45\n\x06parent\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\x12-networkservices.googleapis.com/AuthzExtension\x12\x1f\n\x12\x61uthz_extension_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12M\n\x0f\x61uthz_extension\x18\x03 \x01(\x0b\x32/.google.cloud.networkservices.v1.AuthzExtensionB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x04 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\xc3\x01\n\x1bUpdateAuthzExtensionRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12M\n\x0f\x61uthz_extension\x18\x02 \x01(\x0b\x32/.google.cloud.networkservices.v1.AuthzExtensionB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x03 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\x83\x01\n\x1b\x44\x65leteAuthzExtensionRequest\x12\x43\n\x04name\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-networkservices.googleapis.com/AuthzExtension\x12\x1f\n\nrequest_id\x18\x02 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01*\xa4\x01\n\tEventType\x12\x1a\n\x16\x45VENT_TYPE_UNSPECIFIED\x10\x00\x12\x13\n\x0fREQUEST_HEADERS\x10\x01\x12\x10\n\x0cREQUEST_BODY\x10\x02\x12\x14\n\x10RESPONSE_HEADERS\x10\x03\x12\x11\n\rRESPONSE_BODY\x10\x04\x12\x14\n\x10REQUEST_TRAILERS\x10\x05\x12\x15\n\x11RESPONSE_TRAILERS\x10\x06*h\n\x13LoadBalancingScheme\x12%\n!LOAD_BALANCING_SCHEME_UNSPECIFIED\x10\x00\x12\x14\n\x10INTERNAL_MANAGED\x10\x01\x12\x14\n\x10\x45XTERNAL_MANAGED\x10\x02*P\n\nWireFormat\x12\x1b\n\x17WIRE_FORMAT_UNSPECIFIED\x10\x00\x12\x11\n\rEXT_PROC_GRPC\x10\x01\x12\x12\n\x0e\x45XT_AUTHZ_GRPC\x10\x03*t\n\x0c\x42odySendMode\x12\x1e\n\x1a\x42ODY_SEND_MODE_UNSPECIFIED\x10\x00\x12\x1b\n\x17\x42ODY_SEND_MODE_STREAMED\x10\x01\x12\'\n#BODY_SEND_MODE_FULL_DUPLEX_STREAMED\x10\x02\x32\xf9\'\n\nDepService\x12\xe6\x01\n\x17ListLbTrafficExtensions\x12?.google.cloud.networkservices.v1.ListLbTrafficExtensionsRequest\x1a@.google.cloud.networkservices.v1.ListLbTrafficExtensionsResponse\"H\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x39\x12\x37/v1/{parent=projects/*/locations/*}/lbTrafficExtensions\x12\xd3\x01\n\x15GetLbTrafficExtension\x12=.google.cloud.networkservices.v1.GetLbTrafficExtensionRequest\x1a\x33.google.cloud.networkservices.v1.LbTrafficExtension\"F\xda\x41\x04name\x82\xd3\xe4\x93\x02\x39\x12\x37/v1/{name=projects/*/locations/*/lbTrafficExtensions/*}\x12\xb3\x02\n\x18\x43reateLbTrafficExtension\x12@.google.cloud.networkservices.v1.CreateLbTrafficExtensionRequest\x1a\x1d.google.longrunning.Operation\"\xb5\x01\xca\x41\'\n\x12LbTrafficExtension\x12\x11OperationMetadata\xda\x41\x33parent,lb_traffic_extension,lb_traffic_extension_id\x82\xd3\xe4\x93\x02O\"7/v1/{parent=projects/*/locations/*}/lbTrafficExtensions:\x14lb_traffic_extension\x12\xb5\x02\n\x18UpdateLbTrafficExtension\x12@.google.cloud.networkservices.v1.UpdateLbTrafficExtensionRequest\x1a\x1d.google.longrunning.Operation\"\xb7\x01\xca\x41\'\n\x12LbTrafficExtension\x12\x11OperationMetadata\xda\x41 lb_traffic_extension,update_mask\x82\xd3\xe4\x93\x02\x64\x32L/v1/{lb_traffic_extension.name=projects/*/locations/*/lbTrafficExtensions/*}:\x14lb_traffic_extension\x12\xf0\x01\n\x18\x44\x65leteLbTrafficExtension\x12@.google.cloud.networkservices.v1.DeleteLbTrafficExtensionRequest\x1a\x1d.google.longrunning.Operation\"s\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x39*7/v1/{name=projects/*/locations/*/lbTrafficExtensions/*}\x12\xde\x01\n\x15ListLbRouteExtensions\x12=.google.cloud.networkservices.v1.ListLbRouteExtensionsRequest\x1a>.google.cloud.networkservices.v1.ListLbRouteExtensionsResponse\"F\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x37\x12\x35/v1/{parent=projects/*/locations/*}/lbRouteExtensions\x12\xcb\x01\n\x13GetLbRouteExtension\x12;.google.cloud.networkservices.v1.GetLbRouteExtensionRequest\x1a\x31.google.cloud.networkservices.v1.LbRouteExtension\"D\xda\x41\x04name\x82\xd3\xe4\x93\x02\x37\x12\x35/v1/{name=projects/*/locations/*/lbRouteExtensions/*}\x12\xa5\x02\n\x16\x43reateLbRouteExtension\x12>.google.cloud.networkservices.v1.CreateLbRouteExtensionRequest\x1a\x1d.google.longrunning.Operation\"\xab\x01\xca\x41%\n\x10LbRouteExtension\x12\x11OperationMetadata\xda\x41/parent,lb_route_extension,lb_route_extension_id\x82\xd3\xe4\x93\x02K\"5/v1/{parent=projects/*/locations/*}/lbRouteExtensions:\x12lb_route_extension\x12\xa7\x02\n\x16UpdateLbRouteExtension\x12>.google.cloud.networkservices.v1.UpdateLbRouteExtensionRequest\x1a\x1d.google.longrunning.Operation\"\xad\x01\xca\x41%\n\x10LbRouteExtension\x12\x11OperationMetadata\xda\x41\x1elb_route_extension,update_mask\x82\xd3\xe4\x93\x02^2H/v1/{lb_route_extension.name=projects/*/locations/*/lbRouteExtensions/*}:\x12lb_route_extension\x12\xea\x01\n\x16\x44\x65leteLbRouteExtension\x12>.google.cloud.networkservices.v1.DeleteLbRouteExtensionRequest\x1a\x1d.google.longrunning.Operation\"q\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x37*5/v1/{name=projects/*/locations/*/lbRouteExtensions/*}\x12\xda\x01\n\x14ListLbEdgeExtensions\x12<.google.cloud.networkservices.v1.ListLbEdgeExtensionsRequest\x1a=.google.cloud.networkservices.v1.ListLbEdgeExtensionsResponse\"E\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x36\x12\x34/v1/{parent=projects/*/locations/*}/lbEdgeExtensions\x12\xc7\x01\n\x12GetLbEdgeExtension\x12:.google.cloud.networkservices.v1.GetLbEdgeExtensionRequest\x1a\x30.google.cloud.networkservices.v1.LbEdgeExtension\"C\xda\x41\x04name\x82\xd3\xe4\x93\x02\x36\x12\x34/v1/{name=projects/*/locations/*/lbEdgeExtensions/*}\x12\x9e\x02\n\x15\x43reateLbEdgeExtension\x12=.google.cloud.networkservices.v1.CreateLbEdgeExtensionRequest\x1a\x1d.google.longrunning.Operation\"\xa6\x01\xca\x41$\n\x0fLbEdgeExtension\x12\x11OperationMetadata\xda\x41-parent,lb_edge_extension,lb_edge_extension_id\x82\xd3\xe4\x93\x02I\"4/v1/{parent=projects/*/locations/*}/lbEdgeExtensions:\x11lb_edge_extension\x12\xa0\x02\n\x15UpdateLbEdgeExtension\x12=.google.cloud.networkservices.v1.UpdateLbEdgeExtensionRequest\x1a\x1d.google.longrunning.Operation\"\xa8\x01\xca\x41$\n\x0fLbEdgeExtension\x12\x11OperationMetadata\xda\x41\x1dlb_edge_extension,update_mask\x82\xd3\xe4\x93\x02[2F/v1/{lb_edge_extension.name=projects/*/locations/*/lbEdgeExtensions/*}:\x11lb_edge_extension\x12\xe7\x01\n\x15\x44\x65leteLbEdgeExtension\x12=.google.cloud.networkservices.v1.DeleteLbEdgeExtensionRequest\x1a\x1d.google.longrunning.Operation\"p\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x36*4/v1/{name=projects/*/locations/*/lbEdgeExtensions/*}\x12\xd6\x01\n\x13ListAuthzExtensions\x12;.google.cloud.networkservices.v1.ListAuthzExtensionsRequest\x1a<.google.cloud.networkservices.v1.ListAuthzExtensionsResponse\"D\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x35\x12\x33/v1/{parent=projects/*/locations/*}/authzExtensions\x12\xc3\x01\n\x11GetAuthzExtension\x12\x39.google.cloud.networkservices.v1.GetAuthzExtensionRequest\x1a/.google.cloud.networkservices.v1.AuthzExtension\"B\xda\x41\x04name\x82\xd3\xe4\x93\x02\x35\x12\x33/v1/{name=projects/*/locations/*/authzExtensions/*}\x12\x94\x02\n\x14\x43reateAuthzExtension\x12<.google.cloud.networkservices.v1.CreateAuthzExtensionRequest\x1a\x1d.google.longrunning.Operation\"\x9e\x01\xca\x41#\n\x0e\x41uthzExtension\x12\x11OperationMetadata\xda\x41)parent,authz_extension,authz_extension_id\x82\xd3\xe4\x93\x02\x46\"3/v1/{parent=projects/*/locations/*}/authzExtensions:\x0f\x61uthz_extension\x12\x96\x02\n\x14UpdateAuthzExtension\x12<.google.cloud.networkservices.v1.UpdateAuthzExtensionRequest\x1a\x1d.google.longrunning.Operation\"\xa0\x01\xca\x41#\n\x0e\x41uthzExtension\x12\x11OperationMetadata\xda\x41\x1b\x61uthz_extension,update_mask\x82\xd3\xe4\x93\x02V2C/v1/{authz_extension.name=projects/*/locations/*/authzExtensions/*}:\x0f\x61uthz_extension\x12\xe4\x01\n\x14\x44\x65leteAuthzExtension\x12<.google.cloud.networkservices.v1.DeleteAuthzExtensionRequest\x1a\x1d.google.longrunning.Operation\"o\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x35*3/v1/{name=projects/*/locations/*/authzExtensions/*}\x1aR\xca\x41\x1enetworkservices.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xe9\x01\n#com.google.cloud.networkservices.v1B\x08\x44\x65pProtoP\x01ZMcloud.google.com/go/networkservices/apiv1/networkservicespb;networkservicespb\xaa\x02\x1fGoogle.Cloud.NetworkServices.V1\xca\x02\x1fGoogle\\Cloud\\NetworkServices\\V1\xea\x02\"Google::Cloud::NetworkServices::V1b\x06proto3" pool = ::Google::Protobuf::DescriptorPool.generated_pool pool.add_serialized_file(descriptor_data) @@ -61,6 +61,7 @@ module V1 EventType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.EventType").enummodule LoadBalancingScheme = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.LoadBalancingScheme").enummodule WireFormat = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.WireFormat").enummodule + BodySendMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.BodySendMode").enummodule end end end diff --git a/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/gateway_pb.rb b/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/gateway_pb.rb index 7bd4644ea8b1..69ea84d4661a 100644 --- a/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/gateway_pb.rb +++ b/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/gateway_pb.rb @@ -11,7 +11,7 @@ require 'google/protobuf/timestamp_pb' -descriptor_data = "\n-google/cloud/networkservices/v1/gateway.proto\x12\x1fgoogle.cloud.networkservices.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a,google/cloud/networkservices/v1/common.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x84\x0b\n\x07Gateway\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x16\n\tself_link\x18\r \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12I\n\x06labels\x18\x04 \x03(\x0b\x32\x34.google.cloud.networkservices.v1.Gateway.LabelsEntryB\x03\xe0\x41\x01\x12\x18\n\x0b\x64\x65scription\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12@\n\x04type\x18\x06 \x01(\x0e\x32-.google.cloud.networkservices.v1.Gateway.TypeB\x03\xe0\x41\x05\x12\x39\n\taddresses\x18\x07 \x03(\tB&\xe0\x41\x01\xfa\x41 \n\x1e\x63ompute.googleapis.com/Address\x12\x12\n\x05ports\x18\x0b \x03(\x05\x42\x03\xe0\x41\x02\x12\x12\n\x05scope\x18\x08 \x01(\tB\x03\xe0\x41\x01\x12Q\n\x11server_tls_policy\x18\t \x01(\tB6\xe0\x41\x01\xfa\x41\x30\n.networksecurity.googleapis.com/ServerTlsPolicy\x12O\n\x10\x63\x65rtificate_urls\x18\x0e \x03(\tB5\xe0\x41\x01\xfa\x41/\n-certificatemanager.googleapis.com/Certificate\x12]\n\x17gateway_security_policy\x18\x12 \x01(\tB<\xe0\x41\x01\xfa\x41\x36\n4networksecurity.googleapis.com/GatewaySecurityPolicy\x12\x37\n\x07network\x18\x10 \x01(\tB&\xe0\x41\x01\xfa\x41 \n\x1e\x63ompute.googleapis.com/Network\x12=\n\nsubnetwork\x18\x11 \x01(\tB)\xe0\x41\x01\xfa\x41#\n!compute.googleapis.com/Subnetwork\x12K\n\nip_version\x18\x15 \x01(\x0e\x32\x32.google.cloud.networkservices.v1.Gateway.IpVersionB\x03\xe0\x41\x01\x12N\n\renvoy_headers\x18\x1c \x01(\x0e\x32-.google.cloud.networkservices.v1.EnvoyHeadersB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12O\n\x0crouting_mode\x18 \x01(\x0e\x32\x34.google.cloud.networkservices.v1.Gateway.RoutingModeB\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"C\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\r\n\tOPEN_MESH\x10\x01\x12\x16\n\x12SECURE_WEB_GATEWAY\x10\x02\";\n\tIpVersion\x12\x1a\n\x16IP_VERSION_UNSPECIFIED\x10\x00\x12\x08\n\x04IPV4\x10\x01\x12\x08\n\x04IPV6\x10\x02\"C\n\x0bRoutingMode\x12\x19\n\x15\x45XPLICIT_ROUTING_MODE\x10\x00\x12\x19\n\x15NEXT_HOP_ROUTING_MODE\x10\x01:g\xea\x41\x64\n&networkservices.googleapis.com/Gateway\x12:projects/{project}/locations/{location}/gateways/{gateway}B\x10\n\x0e_envoy_headers\"|\n\x13ListGatewaysRequest\x12>\n\x06parent\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\x12&networkservices.googleapis.com/Gateway\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"\x80\x01\n\x14ListGatewaysResponse\x12:\n\x08gateways\x18\x01 \x03(\x0b\x32(.google.cloud.networkservices.v1.Gateway\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"Q\n\x11GetGatewayRequest\x12<\n\x04name\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\n&networkservices.googleapis.com/Gateway\"\xaf\x01\n\x14\x43reateGatewayRequest\x12>\n\x06parent\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\x12&networkservices.googleapis.com/Gateway\x12\x17\n\ngateway_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12>\n\x07gateway\x18\x03 \x01(\x0b\x32(.google.cloud.networkservices.v1.GatewayB\x03\xe0\x41\x02\"\x8c\x01\n\x14UpdateGatewayRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x12>\n\x07gateway\x18\x02 \x01(\x0b\x32(.google.cloud.networkservices.v1.GatewayB\x03\xe0\x41\x02\"T\n\x14\x44\x65leteGatewayRequest\x12<\n\x04name\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\n&networkservices.googleapis.com/GatewayB\x89\x06\n#com.google.cloud.networkservices.v1B\x0cGatewayProtoP\x01ZMcloud.google.com/go/networkservices/apiv1/networkservicespb;networkservicespb\xaa\x02\x1fGoogle.Cloud.NetworkServices.V1\xca\x02\x1fGoogle\\Cloud\\NetworkServices\\V1\xea\x02\"Google::Cloud::NetworkServices::V1\xea\x41\x91\x01\n4networksecurity.googleapis.com/GatewaySecurityPolicy\x12Yprojects/{project}/locations/{location}/gatewaySecurityPolicies/{gateway_security_policy}\xea\x41\x61\n!compute.googleapis.com/Subnetwork\x12\n\x06parent\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\x12&networkservices.googleapis.com/Gateway\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"\x80\x01\n\x14ListGatewaysResponse\x12:\n\x08gateways\x18\x01 \x03(\x0b\x32(.google.cloud.networkservices.v1.Gateway\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"Q\n\x11GetGatewayRequest\x12<\n\x04name\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\n&networkservices.googleapis.com/Gateway\"\xaf\x01\n\x14\x43reateGatewayRequest\x12>\n\x06parent\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\x12&networkservices.googleapis.com/Gateway\x12\x17\n\ngateway_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12>\n\x07gateway\x18\x03 \x01(\x0b\x32(.google.cloud.networkservices.v1.GatewayB\x03\xe0\x41\x02\"\x8c\x01\n\x14UpdateGatewayRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x12>\n\x07gateway\x18\x02 \x01(\x0b\x32(.google.cloud.networkservices.v1.GatewayB\x03\xe0\x41\x02\"T\n\x14\x44\x65leteGatewayRequest\x12<\n\x04name\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\n&networkservices.googleapis.com/GatewayB\x89\x06\n#com.google.cloud.networkservices.v1B\x0cGatewayProtoP\x01ZMcloud.google.com/go/networkservices/apiv1/networkservicespb;networkservicespb\xaa\x02\x1fGoogle.Cloud.NetworkServices.V1\xca\x02\x1fGoogle\\Cloud\\NetworkServices\\V1\xea\x02\"Google::Cloud::NetworkServices::V1\xea\x41\x91\x01\n4networksecurity.googleapis.com/GatewaySecurityPolicy\x12Yprojects/{project}/locations/{location}/gatewaySecurityPolicies/{gateway_security_policy}\xea\x41\x61\n!compute.googleapis.com/Subnetwork\x12.google.cloud.networkservices.v1.HttpRoute.QueryParameterMatchB\x0b\n\tPathMatch\x1a\xa2\x02\n\x0b\x44\x65stination\x12@\n\x0cservice_name\x18\x01 \x01(\tB*\xfa\x41\'\n%compute.googleapis.com/BackendService\x12\x0e\n\x06weight\x18\x02 \x01(\x05\x12_\n\x17request_header_modifier\x18\x03 \x01(\x0b\x32\x39.google.cloud.networkservices.v1.HttpRoute.HeaderModifierB\x03\xe0\x41\x01\x12`\n\x18response_header_modifier\x18\x04 \x01(\x0b\x32\x39.google.cloud.networkservices.v1.HttpRoute.HeaderModifierB\x03\xe0\x41\x01\x1a\x86\x03\n\x08Redirect\x12\x15\n\rhost_redirect\x18\x01 \x01(\t\x12\x15\n\rpath_redirect\x18\x02 \x01(\t\x12\x16\n\x0eprefix_rewrite\x18\x03 \x01(\t\x12W\n\rresponse_code\x18\x04 \x01(\x0e\x32@.google.cloud.networkservices.v1.HttpRoute.Redirect.ResponseCode\x12\x16\n\x0ehttps_redirect\x18\x05 \x01(\x08\x12\x13\n\x0bstrip_query\x18\x06 \x01(\x08\x12\x15\n\rport_redirect\x18\x07 \x01(\x05\"\x96\x01\n\x0cResponseCode\x12\x1d\n\x19RESPONSE_CODE_UNSPECIFIED\x10\x00\x12\x1d\n\x19MOVED_PERMANENTLY_DEFAULT\x10\x01\x12\t\n\x05\x46OUND\x10\x02\x12\r\n\tSEE_OTHER\x10\x03\x12\x16\n\x12TEMPORARY_REDIRECT\x10\x04\x12\x16\n\x12PERMANENT_REDIRECT\x10\x05\x1a\xc1\x02\n\x14\x46\x61ultInjectionPolicy\x12T\n\x05\x64\x65lay\x18\x01 \x01(\x0b\x32\x45.google.cloud.networkservices.v1.HttpRoute.FaultInjectionPolicy.Delay\x12T\n\x05\x61\x62ort\x18\x02 \x01(\x0b\x32\x45.google.cloud.networkservices.v1.HttpRoute.FaultInjectionPolicy.Abort\x1aK\n\x05\x44\x65lay\x12.\n\x0b\x66ixed_delay\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x12\n\npercentage\x18\x02 \x01(\x05\x1a\x30\n\x05\x41\x62ort\x12\x13\n\x0bhttp_status\x18\x01 \x01(\x05\x12\x12\n\npercentage\x18\x02 \x01(\x05\x1aS\n\x1dStatefulSessionAffinityPolicy\x12\x32\n\ncookie_ttl\x18\x01 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x02\x1a\x9a\x02\n\x0eHeaderModifier\x12O\n\x03set\x18\x01 \x03(\x0b\x32\x42.google.cloud.networkservices.v1.HttpRoute.HeaderModifier.SetEntry\x12O\n\x03\x61\x64\x64\x18\x02 \x03(\x0b\x32\x42.google.cloud.networkservices.v1.HttpRoute.HeaderModifier.AddEntry\x12\x0e\n\x06remove\x18\x03 \x03(\t\x1a*\n\x08SetEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a*\n\x08\x41\x64\x64\x45ntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a?\n\nURLRewrite\x12\x1b\n\x13path_prefix_rewrite\x18\x01 \x01(\t\x12\x14\n\x0chost_rewrite\x18\x02 \x01(\t\x1ap\n\x0bRetryPolicy\x12\x18\n\x10retry_conditions\x18\x01 \x03(\t\x12\x13\n\x0bnum_retries\x18\x02 \x01(\x05\x12\x32\n\x0fper_try_timeout\x18\x03 \x01(\x0b\x32\x19.google.protobuf.Duration\x1a\x7f\n\x13RequestMirrorPolicy\x12K\n\x0b\x64\x65stination\x18\x01 \x01(\x0b\x32\x36.google.cloud.networkservices.v1.HttpRoute.Destination\x12\x1b\n\x0emirror_percent\x18\x02 \x01(\x02\x42\x03\xe0\x41\x01\x1a\xc5\x01\n\nCorsPolicy\x12\x15\n\rallow_origins\x18\x01 \x03(\t\x12\x1c\n\x14\x61llow_origin_regexes\x18\x02 \x03(\t\x12\x15\n\rallow_methods\x18\x03 \x03(\t\x12\x15\n\rallow_headers\x18\x04 \x03(\t\x12\x16\n\x0e\x65xpose_headers\x18\x05 \x03(\t\x12\x0f\n\x07max_age\x18\x06 \x01(\t\x12\x19\n\x11\x61llow_credentials\x18\x07 \x01(\x08\x12\x10\n\x08\x64isabled\x18\x08 \x01(\x08\x1al\n\x12HttpDirectResponse\x12\x1a\n\x0bstring_body\x18\x02 \x01(\tB\x03\xe0\x41\x01H\x00\x12\x19\n\nbytes_body\x18\x03 \x01(\x0c\x42\x03\xe0\x41\x01H\x00\x12\x13\n\x06status\x18\x01 \x01(\x05\x42\x03\xe0\x41\x02\x42\n\n\x08HttpBody\x1a\xb2\x08\n\x0bRouteAction\x12L\n\x0c\x64\x65stinations\x18\x01 \x03(\x0b\x32\x36.google.cloud.networkservices.v1.HttpRoute.Destination\x12\x45\n\x08redirect\x18\x02 \x01(\x0b\x32\x33.google.cloud.networkservices.v1.HttpRoute.Redirect\x12_\n\x16\x66\x61ult_injection_policy\x18\x04 \x01(\x0b\x32?.google.cloud.networkservices.v1.HttpRoute.FaultInjectionPolicy\x12Z\n\x17request_header_modifier\x18\x05 \x01(\x0b\x32\x39.google.cloud.networkservices.v1.HttpRoute.HeaderModifier\x12[\n\x18response_header_modifier\x18\x06 \x01(\x0b\x32\x39.google.cloud.networkservices.v1.HttpRoute.HeaderModifier\x12J\n\x0burl_rewrite\x18\x07 \x01(\x0b\x32\x35.google.cloud.networkservices.v1.HttpRoute.URLRewrite\x12*\n\x07timeout\x18\x08 \x01(\x0b\x32\x19.google.protobuf.Duration\x12L\n\x0cretry_policy\x18\t \x01(\x0b\x32\x36.google.cloud.networkservices.v1.HttpRoute.RetryPolicy\x12]\n\x15request_mirror_policy\x18\n \x01(\x0b\x32>.google.cloud.networkservices.v1.HttpRoute.RequestMirrorPolicy\x12J\n\x0b\x63ors_policy\x18\x0b \x01(\x0b\x32\x35.google.cloud.networkservices.v1.HttpRoute.CorsPolicy\x12p\n\x19stateful_session_affinity\x18\x0c \x01(\x0b\x32H.google.cloud.networkservices.v1.HttpRoute.StatefulSessionAffinityPolicyB\x03\xe0\x41\x01\x12[\n\x0f\x64irect_response\x18\r \x01(\x0b\x32=.google.cloud.networkservices.v1.HttpRoute.HttpDirectResponseB\x03\xe0\x41\x01\x12\x34\n\x0cidle_timeout\x18\x0e \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x01\x1a\x9b\x01\n\tRouteRule\x12\x46\n\x07matches\x18\x01 \x03(\x0b\x32\x35.google.cloud.networkservices.v1.HttpRoute.RouteMatch\x12\x46\n\x06\x61\x63tion\x18\x02 \x01(\x0b\x32\x36.google.cloud.networkservices.v1.HttpRoute.RouteAction\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:n\xea\x41k\n(networkservices.googleapis.com/HttpRoute\x12?projects/{project}/locations/{location}/httpRoutes/{http_route}\"\xa5\x01\n\x15ListHttpRoutesRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\x12(networkservices.googleapis.com/HttpRoute\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12#\n\x16return_partial_success\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"\x87\x01\n\x16ListHttpRoutesResponse\x12?\n\x0bhttp_routes\x18\x01 \x03(\x0b\x32*.google.cloud.networkservices.v1.HttpRoute\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"U\n\x13GetHttpRouteRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(networkservices.googleapis.com/HttpRoute\"\xbb\x01\n\x16\x43reateHttpRouteRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\x12(networkservices.googleapis.com/HttpRoute\x12\x1a\n\rhttp_route_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x43\n\nhttp_route\x18\x03 \x01(\x0b\x32*.google.cloud.networkservices.v1.HttpRouteB\x03\xe0\x41\x02\"\x93\x01\n\x16UpdateHttpRouteRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x12\x43\n\nhttp_route\x18\x02 \x01(\x0b\x32*.google.cloud.networkservices.v1.HttpRouteB\x03\xe0\x41\x02\"X\n\x16\x44\x65leteHttpRouteRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(networkservices.googleapis.com/HttpRouteB\xef\x01\n#com.google.cloud.networkservices.v1B\x0eHttpRouteProtoP\x01ZMcloud.google.com/go/networkservices/apiv1/networkservicespb;networkservicespb\xaa\x02\x1fGoogle.Cloud.NetworkServices.V1\xca\x02\x1fGoogle\\Cloud\\NetworkServices\\V1\xea\x02\"Google::Cloud::NetworkServices::V1b\x06proto3" +descriptor_data = "\n0google/cloud/networkservices/v1/http_route.proto\x12\x1fgoogle.cloud.networkservices.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1bgoogle/api/field_info.proto\x1a\x19google/api/resource.proto\x1a\x1egoogle/protobuf/duration.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x8f$\n\tHttpRoute\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x16\n\tself_link\x18\x0b \x01(\tB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x34\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x16\n\thostnames\x18\x05 \x03(\tB\x03\xe0\x41\x02\x12;\n\x06meshes\x18\x08 \x03(\tB+\xe0\x41\x01\xfa\x41%\n#networkservices.googleapis.com/Mesh\x12@\n\x08gateways\x18\t \x03(\tB.\xe0\x41\x01\xfa\x41(\n&networkservices.googleapis.com/Gateway\x12K\n\x06labels\x18\n \x03(\x0b\x32\x36.google.cloud.networkservices.v1.HttpRoute.LabelsEntryB\x03\xe0\x41\x01\x12H\n\x05rules\x18\x06 \x03(\x0b\x32\x34.google.cloud.networkservices.v1.HttpRoute.RouteRuleB\x03\xe0\x41\x02\x1a\xbf\x02\n\x0bHeaderMatch\x12\x15\n\x0b\x65xact_match\x18\x02 \x01(\tH\x00\x12\x15\n\x0bregex_match\x18\x03 \x01(\tH\x00\x12\x16\n\x0cprefix_match\x18\x04 \x01(\tH\x00\x12\x17\n\rpresent_match\x18\x05 \x01(\x08H\x00\x12\x16\n\x0csuffix_match\x18\x06 \x01(\tH\x00\x12Z\n\x0brange_match\x18\x07 \x01(\x0b\x32\x43.google.cloud.networkservices.v1.HttpRoute.HeaderMatch.IntegerRangeH\x00\x12\x0e\n\x06header\x18\x01 \x01(\t\x12\x14\n\x0cinvert_match\x18\x08 \x01(\x08\x1a*\n\x0cIntegerRange\x12\r\n\x05start\x18\x01 \x01(\x05\x12\x0b\n\x03\x65nd\x18\x02 \x01(\x05\x42\x0b\n\tMatchType\x1a\x82\x01\n\x13QueryParameterMatch\x12\x15\n\x0b\x65xact_match\x18\x02 \x01(\tH\x00\x12\x15\n\x0bregex_match\x18\x03 \x01(\tH\x00\x12\x17\n\rpresent_match\x18\x04 \x01(\x08H\x00\x12\x17\n\x0fquery_parameter\x18\x01 \x01(\tB\x0b\n\tMatchType\x1a\x9b\x02\n\nRouteMatch\x12\x19\n\x0f\x66ull_path_match\x18\x01 \x01(\tH\x00\x12\x16\n\x0cprefix_match\x18\x02 \x01(\tH\x00\x12\x15\n\x0bregex_match\x18\x03 \x01(\tH\x00\x12\x13\n\x0bignore_case\x18\x04 \x01(\x08\x12G\n\x07headers\x18\x05 \x03(\x0b\x32\x36.google.cloud.networkservices.v1.HttpRoute.HeaderMatch\x12X\n\x10query_parameters\x18\x06 \x03(\x0b\x32>.google.cloud.networkservices.v1.HttpRoute.QueryParameterMatchB\x0b\n\tPathMatch\x1a\xa2\x02\n\x0b\x44\x65stination\x12@\n\x0cservice_name\x18\x01 \x01(\tB*\xfa\x41\'\n%compute.googleapis.com/BackendService\x12\x0e\n\x06weight\x18\x02 \x01(\x05\x12_\n\x17request_header_modifier\x18\x03 \x01(\x0b\x32\x39.google.cloud.networkservices.v1.HttpRoute.HeaderModifierB\x03\xe0\x41\x01\x12`\n\x18response_header_modifier\x18\x04 \x01(\x0b\x32\x39.google.cloud.networkservices.v1.HttpRoute.HeaderModifierB\x03\xe0\x41\x01\x1a\x86\x03\n\x08Redirect\x12\x15\n\rhost_redirect\x18\x01 \x01(\t\x12\x15\n\rpath_redirect\x18\x02 \x01(\t\x12\x16\n\x0eprefix_rewrite\x18\x03 \x01(\t\x12W\n\rresponse_code\x18\x04 \x01(\x0e\x32@.google.cloud.networkservices.v1.HttpRoute.Redirect.ResponseCode\x12\x16\n\x0ehttps_redirect\x18\x05 \x01(\x08\x12\x13\n\x0bstrip_query\x18\x06 \x01(\x08\x12\x15\n\rport_redirect\x18\x07 \x01(\x05\"\x96\x01\n\x0cResponseCode\x12\x1d\n\x19RESPONSE_CODE_UNSPECIFIED\x10\x00\x12\x1d\n\x19MOVED_PERMANENTLY_DEFAULT\x10\x01\x12\t\n\x05\x46OUND\x10\x02\x12\r\n\tSEE_OTHER\x10\x03\x12\x16\n\x12TEMPORARY_REDIRECT\x10\x04\x12\x16\n\x12PERMANENT_REDIRECT\x10\x05\x1a\xc1\x02\n\x14\x46\x61ultInjectionPolicy\x12T\n\x05\x64\x65lay\x18\x01 \x01(\x0b\x32\x45.google.cloud.networkservices.v1.HttpRoute.FaultInjectionPolicy.Delay\x12T\n\x05\x61\x62ort\x18\x02 \x01(\x0b\x32\x45.google.cloud.networkservices.v1.HttpRoute.FaultInjectionPolicy.Abort\x1aK\n\x05\x44\x65lay\x12.\n\x0b\x66ixed_delay\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x12\n\npercentage\x18\x02 \x01(\x05\x1a\x30\n\x05\x41\x62ort\x12\x13\n\x0bhttp_status\x18\x01 \x01(\x05\x12\x12\n\npercentage\x18\x02 \x01(\x05\x1aS\n\x1dStatefulSessionAffinityPolicy\x12\x32\n\ncookie_ttl\x18\x01 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x02\x1a\x9a\x02\n\x0eHeaderModifier\x12O\n\x03set\x18\x01 \x03(\x0b\x32\x42.google.cloud.networkservices.v1.HttpRoute.HeaderModifier.SetEntry\x12O\n\x03\x61\x64\x64\x18\x02 \x03(\x0b\x32\x42.google.cloud.networkservices.v1.HttpRoute.HeaderModifier.AddEntry\x12\x0e\n\x06remove\x18\x03 \x03(\t\x1a*\n\x08SetEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a*\n\x08\x41\x64\x64\x45ntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a?\n\nURLRewrite\x12\x1b\n\x13path_prefix_rewrite\x18\x01 \x01(\t\x12\x14\n\x0chost_rewrite\x18\x02 \x01(\t\x1ap\n\x0bRetryPolicy\x12\x18\n\x10retry_conditions\x18\x01 \x03(\t\x12\x13\n\x0bnum_retries\x18\x02 \x01(\x05\x12\x32\n\x0fper_try_timeout\x18\x03 \x01(\x0b\x32\x19.google.protobuf.Duration\x1a\x7f\n\x13RequestMirrorPolicy\x12K\n\x0b\x64\x65stination\x18\x01 \x01(\x0b\x32\x36.google.cloud.networkservices.v1.HttpRoute.Destination\x12\x1b\n\x0emirror_percent\x18\x02 \x01(\x02\x42\x03\xe0\x41\x01\x1a\xc5\x01\n\nCorsPolicy\x12\x15\n\rallow_origins\x18\x01 \x03(\t\x12\x1c\n\x14\x61llow_origin_regexes\x18\x02 \x03(\t\x12\x15\n\rallow_methods\x18\x03 \x03(\t\x12\x15\n\rallow_headers\x18\x04 \x03(\t\x12\x16\n\x0e\x65xpose_headers\x18\x05 \x03(\t\x12\x0f\n\x07max_age\x18\x06 \x01(\t\x12\x19\n\x11\x61llow_credentials\x18\x07 \x01(\x08\x12\x10\n\x08\x64isabled\x18\x08 \x01(\x08\x1al\n\x12HttpDirectResponse\x12\x1a\n\x0bstring_body\x18\x02 \x01(\tB\x03\xe0\x41\x01H\x00\x12\x19\n\nbytes_body\x18\x03 \x01(\x0c\x42\x03\xe0\x41\x01H\x00\x12\x13\n\x06status\x18\x01 \x01(\x05\x42\x03\xe0\x41\x02\x42\n\n\x08HttpBody\x1a\xb2\x08\n\x0bRouteAction\x12L\n\x0c\x64\x65stinations\x18\x01 \x03(\x0b\x32\x36.google.cloud.networkservices.v1.HttpRoute.Destination\x12\x45\n\x08redirect\x18\x02 \x01(\x0b\x32\x33.google.cloud.networkservices.v1.HttpRoute.Redirect\x12_\n\x16\x66\x61ult_injection_policy\x18\x04 \x01(\x0b\x32?.google.cloud.networkservices.v1.HttpRoute.FaultInjectionPolicy\x12Z\n\x17request_header_modifier\x18\x05 \x01(\x0b\x32\x39.google.cloud.networkservices.v1.HttpRoute.HeaderModifier\x12[\n\x18response_header_modifier\x18\x06 \x01(\x0b\x32\x39.google.cloud.networkservices.v1.HttpRoute.HeaderModifier\x12J\n\x0burl_rewrite\x18\x07 \x01(\x0b\x32\x35.google.cloud.networkservices.v1.HttpRoute.URLRewrite\x12*\n\x07timeout\x18\x08 \x01(\x0b\x32\x19.google.protobuf.Duration\x12L\n\x0cretry_policy\x18\t \x01(\x0b\x32\x36.google.cloud.networkservices.v1.HttpRoute.RetryPolicy\x12]\n\x15request_mirror_policy\x18\n \x01(\x0b\x32>.google.cloud.networkservices.v1.HttpRoute.RequestMirrorPolicy\x12J\n\x0b\x63ors_policy\x18\x0b \x01(\x0b\x32\x35.google.cloud.networkservices.v1.HttpRoute.CorsPolicy\x12p\n\x19stateful_session_affinity\x18\x0c \x01(\x0b\x32H.google.cloud.networkservices.v1.HttpRoute.StatefulSessionAffinityPolicyB\x03\xe0\x41\x01\x12[\n\x0f\x64irect_response\x18\r \x01(\x0b\x32=.google.cloud.networkservices.v1.HttpRoute.HttpDirectResponseB\x03\xe0\x41\x01\x12\x34\n\x0cidle_timeout\x18\x0e \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x01\x1a\x9b\x01\n\tRouteRule\x12\x46\n\x07matches\x18\x01 \x03(\x0b\x32\x35.google.cloud.networkservices.v1.HttpRoute.RouteMatch\x12\x46\n\x06\x61\x63tion\x18\x02 \x01(\x0b\x32\x36.google.cloud.networkservices.v1.HttpRoute.RouteAction\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:n\xea\x41k\n(networkservices.googleapis.com/HttpRoute\x12?projects/{project}/locations/{location}/httpRoutes/{http_route}\"\xba\x01\n\x15ListHttpRoutesRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\x12(networkservices.googleapis.com/HttpRoute\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12#\n\x16return_partial_success\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x87\x01\n\x16ListHttpRoutesResponse\x12?\n\x0bhttp_routes\x18\x01 \x03(\x0b\x32*.google.cloud.networkservices.v1.HttpRoute\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"U\n\x13GetHttpRouteRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(networkservices.googleapis.com/HttpRoute\"\xdc\x01\n\x16\x43reateHttpRouteRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\x12(networkservices.googleapis.com/HttpRoute\x12\x1a\n\rhttp_route_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x43\n\nhttp_route\x18\x03 \x01(\x0b\x32*.google.cloud.networkservices.v1.HttpRouteB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x04 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\x93\x01\n\x16UpdateHttpRouteRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x12\x43\n\nhttp_route\x18\x02 \x01(\x0b\x32*.google.cloud.networkservices.v1.HttpRouteB\x03\xe0\x41\x02\"X\n\x16\x44\x65leteHttpRouteRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(networkservices.googleapis.com/HttpRouteB\xef\x01\n#com.google.cloud.networkservices.v1B\x0eHttpRouteProtoP\x01ZMcloud.google.com/go/networkservices/apiv1/networkservicespb;networkservicespb\xaa\x02\x1fGoogle.Cloud.NetworkServices.V1\xca\x02\x1fGoogle\\Cloud\\NetworkServices\\V1\xea\x02\"Google::Cloud::NetworkServices::V1b\x06proto3" pool = ::Google::Protobuf::DescriptorPool.generated_pool pool.add_serialized_file(descriptor_data) diff --git a/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/mesh_pb.rb b/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/mesh_pb.rb index d1a55ea58336..876e2212ea88 100644 --- a/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/mesh_pb.rb +++ b/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/mesh_pb.rb @@ -11,7 +11,7 @@ require 'google/protobuf/timestamp_pb' -descriptor_data = "\n*google/cloud/networkservices/v1/mesh.proto\x12\x1fgoogle.cloud.networkservices.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a,google/cloud/networkservices/v1/common.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x91\x04\n\x04Mesh\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x16\n\tself_link\x18\t \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x46\n\x06labels\x18\x04 \x03(\x0b\x32\x31.google.cloud.networkservices.v1.Mesh.LabelsEntryB\x03\xe0\x41\x01\x12\x18\n\x0b\x64\x65scription\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x1e\n\x11interception_port\x18\x08 \x01(\x05\x42\x03\xe0\x41\x01\x12N\n\renvoy_headers\x18\x10 \x01(\x0e\x32-.google.cloud.networkservices.v1.EnvoyHeadersB\x03\xe0\x41\x01H\x00\x88\x01\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:_\xea\x41\\\n#networkservices.googleapis.com/Mesh\x12\x35projects/{project}/locations/{location}/meshes/{mesh}B\x10\n\x0e_envoy_headers\"\x9c\x01\n\x11ListMeshesRequest\x12;\n\x06parent\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\x12#networkservices.googleapis.com/Mesh\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12#\n\x16return_partial_success\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"y\n\x12ListMeshesResponse\x12\x35\n\x06meshes\x18\x01 \x03(\x0b\x32%.google.cloud.networkservices.v1.Mesh\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"K\n\x0eGetMeshRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#networkservices.googleapis.com/Mesh\"\xa0\x01\n\x11\x43reateMeshRequest\x12;\n\x06parent\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\x12#networkservices.googleapis.com/Mesh\x12\x14\n\x07mesh_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x38\n\x04mesh\x18\x03 \x01(\x0b\x32%.google.cloud.networkservices.v1.MeshB\x03\xe0\x41\x02\"\x83\x01\n\x11UpdateMeshRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x12\x38\n\x04mesh\x18\x02 \x01(\x0b\x32%.google.cloud.networkservices.v1.MeshB\x03\xe0\x41\x02\"N\n\x11\x44\x65leteMeshRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#networkservices.googleapis.com/MeshB\xe4\x02\n#com.google.cloud.networkservices.v1B\tMeshProtoP\x01ZMcloud.google.com/go/networkservices/apiv1/networkservicespb;networkservicespb\xaa\x02\x1fGoogle.Cloud.NetworkServices.V1\xca\x02\x1fGoogle\\Cloud\\NetworkServices\\V1\xea\x02\"Google::Cloud::NetworkServices::V1\xea\x41w\n(compute.googleapis.com/ServiceAttachment\x12Kprojects/{project}/regions/{region}/serviceAttachments/{service_attachment}b\x06proto3" +descriptor_data = "\n*google/cloud/networkservices/v1/mesh.proto\x12\x1fgoogle.cloud.networkservices.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a,google/cloud/networkservices/v1/common.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x9f\x04\n\x04Mesh\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x16\n\tself_link\x18\t \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x46\n\x06labels\x18\x04 \x03(\x0b\x32\x31.google.cloud.networkservices.v1.Mesh.LabelsEntryB\x03\xe0\x41\x01\x12\x18\n\x0b\x64\x65scription\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x1e\n\x11interception_port\x18\x08 \x01(\x05\x42\x03\xe0\x41\x01\x12N\n\renvoy_headers\x18\x10 \x01(\x0e\x32-.google.cloud.networkservices.v1.EnvoyHeadersB\x03\xe0\x41\x01H\x00\x88\x01\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:m\xea\x41j\n#networkservices.googleapis.com/Mesh\x12\x35projects/{project}/locations/{location}/meshes/{mesh}*\x06meshes2\x04meshB\x10\n\x0e_envoy_headers\"\x9c\x01\n\x11ListMeshesRequest\x12;\n\x06parent\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\x12#networkservices.googleapis.com/Mesh\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12#\n\x16return_partial_success\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"y\n\x12ListMeshesResponse\x12\x35\n\x06meshes\x18\x01 \x03(\x0b\x32%.google.cloud.networkservices.v1.Mesh\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"K\n\x0eGetMeshRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#networkservices.googleapis.com/Mesh\"\xa0\x01\n\x11\x43reateMeshRequest\x12;\n\x06parent\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\x12#networkservices.googleapis.com/Mesh\x12\x14\n\x07mesh_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x38\n\x04mesh\x18\x03 \x01(\x0b\x32%.google.cloud.networkservices.v1.MeshB\x03\xe0\x41\x02\"\x83\x01\n\x11UpdateMeshRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x12\x38\n\x04mesh\x18\x02 \x01(\x0b\x32%.google.cloud.networkservices.v1.MeshB\x03\xe0\x41\x02\"N\n\x11\x44\x65leteMeshRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#networkservices.googleapis.com/MeshB\xe4\x02\n#com.google.cloud.networkservices.v1B\tMeshProtoP\x01ZMcloud.google.com/go/networkservices/apiv1/networkservicespb;networkservicespb\xaa\x02\x1fGoogle.Cloud.NetworkServices.V1\xca\x02\x1fGoogle\\Cloud\\NetworkServices\\V1\xea\x02\"Google::Cloud::NetworkServices::V1\xea\x41w\n(compute.googleapis.com/ServiceAttachment\x12Kprojects/{project}/regions/{region}/serviceAttachments/{service_attachment}b\x06proto3" pool = ::Google::Protobuf::DescriptorPool.generated_pool pool.add_serialized_file(descriptor_data) diff --git a/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/network_services_pb.rb b/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/network_services_pb.rb index ebd630fa0414..83a16384a07d 100644 --- a/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/network_services_pb.rb +++ b/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/network_services_pb.rb @@ -6,6 +6,7 @@ require 'google/api/annotations_pb' require 'google/api/client_pb' +require 'google/cloud/networkservices/v1/agent_gateway_pb' require 'google/cloud/networkservices/v1/common_pb' require 'google/cloud/networkservices/v1/endpoint_policy_pb' require 'google/cloud/networkservices/v1/extensibility_pb' @@ -22,7 +23,7 @@ require 'google/protobuf/empty_pb' -descriptor_data = "\n6google/cloud/networkservices/v1/network_services.proto\x12\x1fgoogle.cloud.networkservices.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a,google/cloud/networkservices/v1/common.proto\x1a\x35google/cloud/networkservices/v1/endpoint_policy.proto\x1a\x33google/cloud/networkservices/v1/extensibility.proto\x1a-google/cloud/networkservices/v1/gateway.proto\x1a\x30google/cloud/networkservices/v1/grpc_route.proto\x1a\x30google/cloud/networkservices/v1/http_route.proto\x1a*google/cloud/networkservices/v1/mesh.proto\x1a\x30google/cloud/networkservices/v1/route_view.proto\x1a\x35google/cloud/networkservices/v1/service_binding.proto\x1a\x37google/cloud/networkservices/v1/service_lb_policy.proto\x1a/google/cloud/networkservices/v1/tcp_route.proto\x1a/google/cloud/networkservices/v1/tls_route.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto2\xc2m\n\x0fNetworkServices\x12\xda\x01\n\x14ListEndpointPolicies\x12<.google.cloud.networkservices.v1.ListEndpointPoliciesRequest\x1a=.google.cloud.networkservices.v1.ListEndpointPoliciesResponse\"E\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x36\x12\x34/v1/{parent=projects/*/locations/*}/endpointPolicies\x12\xc4\x01\n\x11GetEndpointPolicy\x12\x39.google.cloud.networkservices.v1.GetEndpointPolicyRequest\x1a/.google.cloud.networkservices.v1.EndpointPolicy\"C\xda\x41\x04name\x82\xd3\xe4\x93\x02\x36\x12\x34/v1/{name=projects/*/locations/*/endpointPolicies/*}\x12\xb5\x02\n\x14\x43reateEndpointPolicy\x12<.google.cloud.networkservices.v1.CreateEndpointPolicyRequest\x1a\x1d.google.longrunning.Operation\"\xbf\x01\xca\x41\x43\n\x0e\x45ndpointPolicy\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41)parent,endpoint_policy,endpoint_policy_id\x82\xd3\xe4\x93\x02G\"4/v1/{parent=projects/*/locations/*}/endpointPolicies:\x0f\x65ndpoint_policy\x12\xb7\x02\n\x14UpdateEndpointPolicy\x12<.google.cloud.networkservices.v1.UpdateEndpointPolicyRequest\x1a\x1d.google.longrunning.Operation\"\xc1\x01\xca\x41\x43\n\x0e\x45ndpointPolicy\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x1b\x65ndpoint_policy,update_mask\x82\xd3\xe4\x93\x02W2D/v1/{endpoint_policy.name=projects/*/locations/*/endpointPolicies/*}:\x0f\x65ndpoint_policy\x12\x86\x02\n\x14\x44\x65leteEndpointPolicy\x12<.google.cloud.networkservices.v1.DeleteEndpointPolicyRequest\x1a\x1d.google.longrunning.Operation\"\x90\x01\xca\x41J\n\x15google.protobuf.Empty\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x36*4/v1/{name=projects/*/locations/*/endpointPolicies/*}\x12\xe6\x01\n\x16ListWasmPluginVersions\x12>.google.cloud.networkservices.v1.ListWasmPluginVersionsRequest\x1a?.google.cloud.networkservices.v1.ListWasmPluginVersionsResponse\"K\xda\x41\x06parent\x82\xd3\xe4\x93\x02<\x12:/v1/{parent=projects/*/locations/*/wasmPlugins/*}/versions\x12\xd3\x01\n\x14GetWasmPluginVersion\x12<.google.cloud.networkservices.v1.GetWasmPluginVersionRequest\x1a\x32.google.cloud.networkservices.v1.WasmPluginVersion\"I\xda\x41\x04name\x82\xd3\xe4\x93\x02<\x12:/v1/{name=projects/*/locations/*/wasmPlugins/*/versions/*}\x12\xd0\x02\n\x17\x43reateWasmPluginVersion\x12?.google.cloud.networkservices.v1.CreateWasmPluginVersionRequest\x1a\x1d.google.longrunning.Operation\"\xd4\x01\xca\x41\x46\n\x11WasmPluginVersion\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x31parent,wasm_plugin_version,wasm_plugin_version_id\x82\xd3\xe4\x93\x02Q\":/v1/{parent=projects/*/locations/*/wasmPlugins/*}/versions:\x13wasm_plugin_version\x12\x92\x02\n\x17\x44\x65leteWasmPluginVersion\x12?.google.cloud.networkservices.v1.DeleteWasmPluginVersionRequest\x1a\x1d.google.longrunning.Operation\"\x96\x01\xca\x41J\n\x15google.protobuf.Empty\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02<*:/v1/{name=projects/*/locations/*/wasmPlugins/*/versions/*}\x12\xc6\x01\n\x0fListWasmPlugins\x12\x37.google.cloud.networkservices.v1.ListWasmPluginsRequest\x1a\x38.google.cloud.networkservices.v1.ListWasmPluginsResponse\"@\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x31\x12//v1/{parent=projects/*/locations/*}/wasmPlugins\x12\xb3\x01\n\rGetWasmPlugin\x12\x35.google.cloud.networkservices.v1.GetWasmPluginRequest\x1a+.google.cloud.networkservices.v1.WasmPlugin\">\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31\x12//v1/{name=projects/*/locations/*/wasmPlugins/*}\x12\x98\x02\n\x10\x43reateWasmPlugin\x12\x38.google.cloud.networkservices.v1.CreateWasmPluginRequest\x1a\x1d.google.longrunning.Operation\"\xaa\x01\xca\x41?\n\nWasmPlugin\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41!parent,wasm_plugin,wasm_plugin_id\x82\xd3\xe4\x93\x02>\"//v1/{parent=projects/*/locations/*}/wasmPlugins:\x0bwasm_plugin\x12\x9a\x02\n\x10UpdateWasmPlugin\x12\x38.google.cloud.networkservices.v1.UpdateWasmPluginRequest\x1a\x1d.google.longrunning.Operation\"\xac\x01\xca\x41?\n\nWasmPlugin\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x17wasm_plugin,update_mask\x82\xd3\xe4\x93\x02J2;/v1/{wasm_plugin.name=projects/*/locations/*/wasmPlugins/*}:\x0bwasm_plugin\x12\xf9\x01\n\x10\x44\x65leteWasmPlugin\x12\x38.google.cloud.networkservices.v1.DeleteWasmPluginRequest\x1a\x1d.google.longrunning.Operation\"\x8b\x01\xca\x41J\n\x15google.protobuf.Empty\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31*//v1/{name=projects/*/locations/*/wasmPlugins/*}\x12\xba\x01\n\x0cListGateways\x12\x34.google.cloud.networkservices.v1.ListGatewaysRequest\x1a\x35.google.cloud.networkservices.v1.ListGatewaysResponse\"=\xda\x41\x06parent\x82\xd3\xe4\x93\x02.\x12,/v1/{parent=projects/*/locations/*}/gateways\x12\xa7\x01\n\nGetGateway\x12\x32.google.cloud.networkservices.v1.GetGatewayRequest\x1a(.google.cloud.networkservices.v1.Gateway\";\xda\x41\x04name\x82\xd3\xe4\x93\x02.\x12,/v1/{name=projects/*/locations/*/gateways/*}\x12\x80\x02\n\rCreateGateway\x12\x35.google.cloud.networkservices.v1.CreateGatewayRequest\x1a\x1d.google.longrunning.Operation\"\x98\x01\xca\x41<\n\x07Gateway\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x19parent,gateway,gateway_id\x82\xd3\xe4\x93\x02\x37\",/v1/{parent=projects/*/locations/*}/gateways:\x07gateway\x12\x82\x02\n\rUpdateGateway\x12\x35.google.cloud.networkservices.v1.UpdateGatewayRequest\x1a\x1d.google.longrunning.Operation\"\x9a\x01\xca\x41<\n\x07Gateway\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x13gateway,update_mask\x82\xd3\xe4\x93\x02?24/v1/{gateway.name=projects/*/locations/*/gateways/*}:\x07gateway\x12\xf0\x01\n\rDeleteGateway\x12\x35.google.cloud.networkservices.v1.DeleteGatewayRequest\x1a\x1d.google.longrunning.Operation\"\x88\x01\xca\x41J\n\x15google.protobuf.Empty\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02.*,/v1/{name=projects/*/locations/*/gateways/*}\x12\xc2\x01\n\x0eListGrpcRoutes\x12\x36.google.cloud.networkservices.v1.ListGrpcRoutesRequest\x1a\x37.google.cloud.networkservices.v1.ListGrpcRoutesResponse\"?\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x30\x12./v1/{parent=projects/*/locations/*}/grpcRoutes\x12\xaf\x01\n\x0cGetGrpcRoute\x12\x34.google.cloud.networkservices.v1.GetGrpcRouteRequest\x1a*.google.cloud.networkservices.v1.GrpcRoute\"=\xda\x41\x04name\x82\xd3\xe4\x93\x02\x30\x12./v1/{name=projects/*/locations/*/grpcRoutes/*}\x12\x91\x02\n\x0f\x43reateGrpcRoute\x12\x37.google.cloud.networkservices.v1.CreateGrpcRouteRequest\x1a\x1d.google.longrunning.Operation\"\xa5\x01\xca\x41>\n\tGrpcRoute\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x1fparent,grpc_route,grpc_route_id\x82\xd3\xe4\x93\x02<\"./v1/{parent=projects/*/locations/*}/grpcRoutes:\ngrpc_route\x12\x93\x02\n\x0fUpdateGrpcRoute\x12\x37.google.cloud.networkservices.v1.UpdateGrpcRouteRequest\x1a\x1d.google.longrunning.Operation\"\xa7\x01\xca\x41>\n\tGrpcRoute\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x16grpc_route,update_mask\x82\xd3\xe4\x93\x02G29/v1/{grpc_route.name=projects/*/locations/*/grpcRoutes/*}:\ngrpc_route\x12\xf6\x01\n\x0f\x44\x65leteGrpcRoute\x12\x37.google.cloud.networkservices.v1.DeleteGrpcRouteRequest\x1a\x1d.google.longrunning.Operation\"\x8a\x01\xca\x41J\n\x15google.protobuf.Empty\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x30*./v1/{name=projects/*/locations/*/grpcRoutes/*}\x12\xc2\x01\n\x0eListHttpRoutes\x12\x36.google.cloud.networkservices.v1.ListHttpRoutesRequest\x1a\x37.google.cloud.networkservices.v1.ListHttpRoutesResponse\"?\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x30\x12./v1/{parent=projects/*/locations/*}/httpRoutes\x12\xaf\x01\n\x0cGetHttpRoute\x12\x34.google.cloud.networkservices.v1.GetHttpRouteRequest\x1a*.google.cloud.networkservices.v1.HttpRoute\"=\xda\x41\x04name\x82\xd3\xe4\x93\x02\x30\x12./v1/{name=projects/*/locations/*/httpRoutes/*}\x12\x91\x02\n\x0f\x43reateHttpRoute\x12\x37.google.cloud.networkservices.v1.CreateHttpRouteRequest\x1a\x1d.google.longrunning.Operation\"\xa5\x01\xca\x41>\n\tHttpRoute\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x1fparent,http_route,http_route_id\x82\xd3\xe4\x93\x02<\"./v1/{parent=projects/*/locations/*}/httpRoutes:\nhttp_route\x12\x93\x02\n\x0fUpdateHttpRoute\x12\x37.google.cloud.networkservices.v1.UpdateHttpRouteRequest\x1a\x1d.google.longrunning.Operation\"\xa7\x01\xca\x41>\n\tHttpRoute\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x16http_route,update_mask\x82\xd3\xe4\x93\x02G29/v1/{http_route.name=projects/*/locations/*/httpRoutes/*}:\nhttp_route\x12\xf6\x01\n\x0f\x44\x65leteHttpRoute\x12\x37.google.cloud.networkservices.v1.DeleteHttpRouteRequest\x1a\x1d.google.longrunning.Operation\"\x8a\x01\xca\x41J\n\x15google.protobuf.Empty\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x30*./v1/{name=projects/*/locations/*/httpRoutes/*}\x12\xbe\x01\n\rListTcpRoutes\x12\x35.google.cloud.networkservices.v1.ListTcpRoutesRequest\x1a\x36.google.cloud.networkservices.v1.ListTcpRoutesResponse\">\xda\x41\x06parent\x82\xd3\xe4\x93\x02/\x12-/v1/{parent=projects/*/locations/*}/tcpRoutes\x12\xab\x01\n\x0bGetTcpRoute\x12\x33.google.cloud.networkservices.v1.GetTcpRouteRequest\x1a).google.cloud.networkservices.v1.TcpRoute\"<\xda\x41\x04name\x82\xd3\xe4\x93\x02/\x12-/v1/{name=projects/*/locations/*/tcpRoutes/*}\x12\x8a\x02\n\x0e\x43reateTcpRoute\x12\x36.google.cloud.networkservices.v1.CreateTcpRouteRequest\x1a\x1d.google.longrunning.Operation\"\xa0\x01\xca\x41=\n\x08TcpRoute\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x1dparent,tcp_route,tcp_route_id\x82\xd3\xe4\x93\x02:\"-/v1/{parent=projects/*/locations/*}/tcpRoutes:\ttcp_route\x12\x8c\x02\n\x0eUpdateTcpRoute\x12\x36.google.cloud.networkservices.v1.UpdateTcpRouteRequest\x1a\x1d.google.longrunning.Operation\"\xa2\x01\xca\x41=\n\x08TcpRoute\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x15tcp_route,update_mask\x82\xd3\xe4\x93\x02\x44\x32\x37/v1/{tcp_route.name=projects/*/locations/*/tcpRoutes/*}:\ttcp_route\x12\xf3\x01\n\x0e\x44\x65leteTcpRoute\x12\x36.google.cloud.networkservices.v1.DeleteTcpRouteRequest\x1a\x1d.google.longrunning.Operation\"\x89\x01\xca\x41J\n\x15google.protobuf.Empty\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02/*-/v1/{name=projects/*/locations/*/tcpRoutes/*}\x12\xbe\x01\n\rListTlsRoutes\x12\x35.google.cloud.networkservices.v1.ListTlsRoutesRequest\x1a\x36.google.cloud.networkservices.v1.ListTlsRoutesResponse\">\xda\x41\x06parent\x82\xd3\xe4\x93\x02/\x12-/v1/{parent=projects/*/locations/*}/tlsRoutes\x12\xab\x01\n\x0bGetTlsRoute\x12\x33.google.cloud.networkservices.v1.GetTlsRouteRequest\x1a).google.cloud.networkservices.v1.TlsRoute\"<\xda\x41\x04name\x82\xd3\xe4\x93\x02/\x12-/v1/{name=projects/*/locations/*/tlsRoutes/*}\x12\x8a\x02\n\x0e\x43reateTlsRoute\x12\x36.google.cloud.networkservices.v1.CreateTlsRouteRequest\x1a\x1d.google.longrunning.Operation\"\xa0\x01\xca\x41=\n\x08TlsRoute\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x1dparent,tls_route,tls_route_id\x82\xd3\xe4\x93\x02:\"-/v1/{parent=projects/*/locations/*}/tlsRoutes:\ttls_route\x12\x8c\x02\n\x0eUpdateTlsRoute\x12\x36.google.cloud.networkservices.v1.UpdateTlsRouteRequest\x1a\x1d.google.longrunning.Operation\"\xa2\x01\xca\x41=\n\x08TlsRoute\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x15tls_route,update_mask\x82\xd3\xe4\x93\x02\x44\x32\x37/v1/{tls_route.name=projects/*/locations/*/tlsRoutes/*}:\ttls_route\x12\xf3\x01\n\x0e\x44\x65leteTlsRoute\x12\x36.google.cloud.networkservices.v1.DeleteTlsRouteRequest\x1a\x1d.google.longrunning.Operation\"\x89\x01\xca\x41J\n\x15google.protobuf.Empty\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02/*-/v1/{name=projects/*/locations/*/tlsRoutes/*}\x12\xd6\x01\n\x13ListServiceBindings\x12;.google.cloud.networkservices.v1.ListServiceBindingsRequest\x1a<.google.cloud.networkservices.v1.ListServiceBindingsResponse\"D\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x35\x12\x33/v1/{parent=projects/*/locations/*}/serviceBindings\x12\xc3\x01\n\x11GetServiceBinding\x12\x39.google.cloud.networkservices.v1.GetServiceBindingRequest\x1a/.google.cloud.networkservices.v1.ServiceBinding\"B\xda\x41\x04name\x82\xd3\xe4\x93\x02\x35\x12\x33/v1/{name=projects/*/locations/*/serviceBindings/*}\x12\xb4\x02\n\x14\x43reateServiceBinding\x12<.google.cloud.networkservices.v1.CreateServiceBindingRequest\x1a\x1d.google.longrunning.Operation\"\xbe\x01\xca\x41\x43\n\x0eServiceBinding\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41)parent,service_binding,service_binding_id\x82\xd3\xe4\x93\x02\x46\"3/v1/{parent=projects/*/locations/*}/serviceBindings:\x0fservice_binding\x12\xb6\x02\n\x14UpdateServiceBinding\x12<.google.cloud.networkservices.v1.UpdateServiceBindingRequest\x1a\x1d.google.longrunning.Operation\"\xc0\x01\xca\x41\x43\n\x0eServiceBinding\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x1bservice_binding,update_mask\x82\xd3\xe4\x93\x02V2C/v1/{service_binding.name=projects/*/locations/*/serviceBindings/*}:\x0fservice_binding\x12\x85\x02\n\x14\x44\x65leteServiceBinding\x12<.google.cloud.networkservices.v1.DeleteServiceBindingRequest\x1a\x1d.google.longrunning.Operation\"\x8f\x01\xca\x41J\n\x15google.protobuf.Empty\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x35*3/v1/{name=projects/*/locations/*/serviceBindings/*}\x12\xb2\x01\n\nListMeshes\x12\x32.google.cloud.networkservices.v1.ListMeshesRequest\x1a\x33.google.cloud.networkservices.v1.ListMeshesResponse\";\xda\x41\x06parent\x82\xd3\xe4\x93\x02,\x12*/v1/{parent=projects/*/locations/*}/meshes\x12\x9c\x01\n\x07GetMesh\x12/.google.cloud.networkservices.v1.GetMeshRequest\x1a%.google.cloud.networkservices.v1.Mesh\"9\xda\x41\x04name\x82\xd3\xe4\x93\x02,\x12*/v1/{name=projects/*/locations/*/meshes/*}\x12\xec\x01\n\nCreateMesh\x12\x32.google.cloud.networkservices.v1.CreateMeshRequest\x1a\x1d.google.longrunning.Operation\"\x8a\x01\xca\x41\x39\n\x04Mesh\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x13parent,mesh,mesh_id\x82\xd3\xe4\x93\x02\x32\"*/v1/{parent=projects/*/locations/*}/meshes:\x04mesh\x12\xee\x01\n\nUpdateMesh\x12\x32.google.cloud.networkservices.v1.UpdateMeshRequest\x1a\x1d.google.longrunning.Operation\"\x8c\x01\xca\x41\x39\n\x04Mesh\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x10mesh,update_mask\x82\xd3\xe4\x93\x02\x37\x32//v1/{mesh.name=projects/*/locations/*/meshes/*}:\x04mesh\x12\xe8\x01\n\nDeleteMesh\x12\x32.google.cloud.networkservices.v1.DeleteMeshRequest\x1a\x1d.google.longrunning.Operation\"\x86\x01\xca\x41J\n\x15google.protobuf.Empty\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02,**/v1/{name=projects/*/locations/*/meshes/*}\x12\xde\x01\n\x15ListServiceLbPolicies\x12=.google.cloud.networkservices.v1.ListServiceLbPoliciesRequest\x1a>.google.cloud.networkservices.v1.ListServiceLbPoliciesResponse\"F\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x37\x12\x35/v1/{parent=projects/*/locations/*}/serviceLbPolicies\x12\xc8\x01\n\x12GetServiceLbPolicy\x12:.google.cloud.networkservices.v1.GetServiceLbPolicyRequest\x1a\x30.google.cloud.networkservices.v1.ServiceLbPolicy\"D\xda\x41\x04name\x82\xd3\xe4\x93\x02\x37\x12\x35/v1/{name=projects/*/locations/*/serviceLbPolicies/*}\x12\xbf\x02\n\x15\x43reateServiceLbPolicy\x12=.google.cloud.networkservices.v1.CreateServiceLbPolicyRequest\x1a\x1d.google.longrunning.Operation\"\xc7\x01\xca\x41\x44\n\x0fServiceLbPolicy\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41-parent,service_lb_policy,service_lb_policy_id\x82\xd3\xe4\x93\x02J\"5/v1/{parent=projects/*/locations/*}/serviceLbPolicies:\x11service_lb_policy\x12\xc1\x02\n\x15UpdateServiceLbPolicy\x12=.google.cloud.networkservices.v1.UpdateServiceLbPolicyRequest\x1a\x1d.google.longrunning.Operation\"\xc9\x01\xca\x41\x44\n\x0fServiceLbPolicy\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x1dservice_lb_policy,update_mask\x82\xd3\xe4\x93\x02\\2G/v1/{service_lb_policy.name=projects/*/locations/*/serviceLbPolicies/*}:\x11service_lb_policy\x12\x89\x02\n\x15\x44\x65leteServiceLbPolicy\x12=.google.cloud.networkservices.v1.DeleteServiceLbPolicyRequest\x1a\x1d.google.longrunning.Operation\"\x91\x01\xca\x41J\n\x15google.protobuf.Empty\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x37*5/v1/{name=projects/*/locations/*/serviceLbPolicies/*}\x12\xcf\x01\n\x13GetGatewayRouteView\x12;.google.cloud.networkservices.v1.GetGatewayRouteViewRequest\x1a\x31.google.cloud.networkservices.v1.GatewayRouteView\"H\xda\x41\x04name\x82\xd3\xe4\x93\x02;\x12\x39/v1/{name=projects/*/locations/*/gateways/*/routeViews/*}\x12\xc4\x01\n\x10GetMeshRouteView\x12\x38.google.cloud.networkservices.v1.GetMeshRouteViewRequest\x1a..google.cloud.networkservices.v1.MeshRouteView\"F\xda\x41\x04name\x82\xd3\xe4\x93\x02\x39\x12\x37/v1/{name=projects/*/locations/*/meshes/*/routeViews/*}\x12\xe2\x01\n\x15ListGatewayRouteViews\x12=.google.cloud.networkservices.v1.ListGatewayRouteViewsRequest\x1a>.google.cloud.networkservices.v1.ListGatewayRouteViewsResponse\"J\xda\x41\x06parent\x82\xd3\xe4\x93\x02;\x12\x39/v1/{parent=projects/*/locations/*/gateways/*}/routeViews\x12\xd7\x01\n\x12ListMeshRouteViews\x12:.google.cloud.networkservices.v1.ListMeshRouteViewsRequest\x1a;.google.cloud.networkservices.v1.ListMeshRouteViewsResponse\"H\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x39\x12\x37/v1/{parent=projects/*/locations/*/meshes/*}/routeViews\x1aR\xca\x41\x1enetworkservices.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xdf\x01\n#com.google.cloud.networkservices.v1P\x01ZMcloud.google.com/go/networkservices/apiv1/networkservicespb;networkservicespb\xaa\x02\x1fGoogle.Cloud.NetworkServices.V1\xca\x02\x1fGoogle\\Cloud\\NetworkServices\\V1\xea\x02\"Google::Cloud::NetworkServices::V1b\x06proto3" +descriptor_data = "\n6google/cloud/networkservices/v1/network_services.proto\x12\x1fgoogle.cloud.networkservices.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x33google/cloud/networkservices/v1/agent_gateway.proto\x1a,google/cloud/networkservices/v1/common.proto\x1a\x35google/cloud/networkservices/v1/endpoint_policy.proto\x1a\x33google/cloud/networkservices/v1/extensibility.proto\x1a-google/cloud/networkservices/v1/gateway.proto\x1a\x30google/cloud/networkservices/v1/grpc_route.proto\x1a\x30google/cloud/networkservices/v1/http_route.proto\x1a*google/cloud/networkservices/v1/mesh.proto\x1a\x30google/cloud/networkservices/v1/route_view.proto\x1a\x35google/cloud/networkservices/v1/service_binding.proto\x1a\x37google/cloud/networkservices/v1/service_lb_policy.proto\x1a/google/cloud/networkservices/v1/tcp_route.proto\x1a/google/cloud/networkservices/v1/tls_route.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto2\xa7w\n\x0fNetworkServices\x12\xda\x01\n\x14ListEndpointPolicies\x12<.google.cloud.networkservices.v1.ListEndpointPoliciesRequest\x1a=.google.cloud.networkservices.v1.ListEndpointPoliciesResponse\"E\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x36\x12\x34/v1/{parent=projects/*/locations/*}/endpointPolicies\x12\xc4\x01\n\x11GetEndpointPolicy\x12\x39.google.cloud.networkservices.v1.GetEndpointPolicyRequest\x1a/.google.cloud.networkservices.v1.EndpointPolicy\"C\xda\x41\x04name\x82\xd3\xe4\x93\x02\x36\x12\x34/v1/{name=projects/*/locations/*/endpointPolicies/*}\x12\xb5\x02\n\x14\x43reateEndpointPolicy\x12<.google.cloud.networkservices.v1.CreateEndpointPolicyRequest\x1a\x1d.google.longrunning.Operation\"\xbf\x01\xca\x41\x43\n\x0e\x45ndpointPolicy\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41)parent,endpoint_policy,endpoint_policy_id\x82\xd3\xe4\x93\x02G\"4/v1/{parent=projects/*/locations/*}/endpointPolicies:\x0f\x65ndpoint_policy\x12\xb7\x02\n\x14UpdateEndpointPolicy\x12<.google.cloud.networkservices.v1.UpdateEndpointPolicyRequest\x1a\x1d.google.longrunning.Operation\"\xc1\x01\xca\x41\x43\n\x0e\x45ndpointPolicy\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x1b\x65ndpoint_policy,update_mask\x82\xd3\xe4\x93\x02W2D/v1/{endpoint_policy.name=projects/*/locations/*/endpointPolicies/*}:\x0f\x65ndpoint_policy\x12\x86\x02\n\x14\x44\x65leteEndpointPolicy\x12<.google.cloud.networkservices.v1.DeleteEndpointPolicyRequest\x1a\x1d.google.longrunning.Operation\"\x90\x01\xca\x41J\n\x15google.protobuf.Empty\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x36*4/v1/{name=projects/*/locations/*/endpointPolicies/*}\x12\xe6\x01\n\x16ListWasmPluginVersions\x12>.google.cloud.networkservices.v1.ListWasmPluginVersionsRequest\x1a?.google.cloud.networkservices.v1.ListWasmPluginVersionsResponse\"K\xda\x41\x06parent\x82\xd3\xe4\x93\x02<\x12:/v1/{parent=projects/*/locations/*/wasmPlugins/*}/versions\x12\xd3\x01\n\x14GetWasmPluginVersion\x12<.google.cloud.networkservices.v1.GetWasmPluginVersionRequest\x1a\x32.google.cloud.networkservices.v1.WasmPluginVersion\"I\xda\x41\x04name\x82\xd3\xe4\x93\x02<\x12:/v1/{name=projects/*/locations/*/wasmPlugins/*/versions/*}\x12\xd0\x02\n\x17\x43reateWasmPluginVersion\x12?.google.cloud.networkservices.v1.CreateWasmPluginVersionRequest\x1a\x1d.google.longrunning.Operation\"\xd4\x01\xca\x41\x46\n\x11WasmPluginVersion\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x31parent,wasm_plugin_version,wasm_plugin_version_id\x82\xd3\xe4\x93\x02Q\":/v1/{parent=projects/*/locations/*/wasmPlugins/*}/versions:\x13wasm_plugin_version\x12\x92\x02\n\x17\x44\x65leteWasmPluginVersion\x12?.google.cloud.networkservices.v1.DeleteWasmPluginVersionRequest\x1a\x1d.google.longrunning.Operation\"\x96\x01\xca\x41J\n\x15google.protobuf.Empty\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02<*:/v1/{name=projects/*/locations/*/wasmPlugins/*/versions/*}\x12\xc6\x01\n\x0fListWasmPlugins\x12\x37.google.cloud.networkservices.v1.ListWasmPluginsRequest\x1a\x38.google.cloud.networkservices.v1.ListWasmPluginsResponse\"@\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x31\x12//v1/{parent=projects/*/locations/*}/wasmPlugins\x12\xb3\x01\n\rGetWasmPlugin\x12\x35.google.cloud.networkservices.v1.GetWasmPluginRequest\x1a+.google.cloud.networkservices.v1.WasmPlugin\">\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31\x12//v1/{name=projects/*/locations/*/wasmPlugins/*}\x12\x98\x02\n\x10\x43reateWasmPlugin\x12\x38.google.cloud.networkservices.v1.CreateWasmPluginRequest\x1a\x1d.google.longrunning.Operation\"\xaa\x01\xca\x41?\n\nWasmPlugin\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41!parent,wasm_plugin,wasm_plugin_id\x82\xd3\xe4\x93\x02>\"//v1/{parent=projects/*/locations/*}/wasmPlugins:\x0bwasm_plugin\x12\x9a\x02\n\x10UpdateWasmPlugin\x12\x38.google.cloud.networkservices.v1.UpdateWasmPluginRequest\x1a\x1d.google.longrunning.Operation\"\xac\x01\xca\x41?\n\nWasmPlugin\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x17wasm_plugin,update_mask\x82\xd3\xe4\x93\x02J2;/v1/{wasm_plugin.name=projects/*/locations/*/wasmPlugins/*}:\x0bwasm_plugin\x12\xf9\x01\n\x10\x44\x65leteWasmPlugin\x12\x38.google.cloud.networkservices.v1.DeleteWasmPluginRequest\x1a\x1d.google.longrunning.Operation\"\x8b\x01\xca\x41J\n\x15google.protobuf.Empty\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31*//v1/{name=projects/*/locations/*/wasmPlugins/*}\x12\xba\x01\n\x0cListGateways\x12\x34.google.cloud.networkservices.v1.ListGatewaysRequest\x1a\x35.google.cloud.networkservices.v1.ListGatewaysResponse\"=\xda\x41\x06parent\x82\xd3\xe4\x93\x02.\x12,/v1/{parent=projects/*/locations/*}/gateways\x12\xa7\x01\n\nGetGateway\x12\x32.google.cloud.networkservices.v1.GetGatewayRequest\x1a(.google.cloud.networkservices.v1.Gateway\";\xda\x41\x04name\x82\xd3\xe4\x93\x02.\x12,/v1/{name=projects/*/locations/*/gateways/*}\x12\x80\x02\n\rCreateGateway\x12\x35.google.cloud.networkservices.v1.CreateGatewayRequest\x1a\x1d.google.longrunning.Operation\"\x98\x01\xca\x41<\n\x07Gateway\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x19parent,gateway,gateway_id\x82\xd3\xe4\x93\x02\x37\",/v1/{parent=projects/*/locations/*}/gateways:\x07gateway\x12\x82\x02\n\rUpdateGateway\x12\x35.google.cloud.networkservices.v1.UpdateGatewayRequest\x1a\x1d.google.longrunning.Operation\"\x9a\x01\xca\x41<\n\x07Gateway\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x13gateway,update_mask\x82\xd3\xe4\x93\x02?24/v1/{gateway.name=projects/*/locations/*/gateways/*}:\x07gateway\x12\xf0\x01\n\rDeleteGateway\x12\x35.google.cloud.networkservices.v1.DeleteGatewayRequest\x1a\x1d.google.longrunning.Operation\"\x88\x01\xca\x41J\n\x15google.protobuf.Empty\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02.*,/v1/{name=projects/*/locations/*/gateways/*}\x12\xc2\x01\n\x0eListGrpcRoutes\x12\x36.google.cloud.networkservices.v1.ListGrpcRoutesRequest\x1a\x37.google.cloud.networkservices.v1.ListGrpcRoutesResponse\"?\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x30\x12./v1/{parent=projects/*/locations/*}/grpcRoutes\x12\xaf\x01\n\x0cGetGrpcRoute\x12\x34.google.cloud.networkservices.v1.GetGrpcRouteRequest\x1a*.google.cloud.networkservices.v1.GrpcRoute\"=\xda\x41\x04name\x82\xd3\xe4\x93\x02\x30\x12./v1/{name=projects/*/locations/*/grpcRoutes/*}\x12\x91\x02\n\x0f\x43reateGrpcRoute\x12\x37.google.cloud.networkservices.v1.CreateGrpcRouteRequest\x1a\x1d.google.longrunning.Operation\"\xa5\x01\xca\x41>\n\tGrpcRoute\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x1fparent,grpc_route,grpc_route_id\x82\xd3\xe4\x93\x02<\"./v1/{parent=projects/*/locations/*}/grpcRoutes:\ngrpc_route\x12\x93\x02\n\x0fUpdateGrpcRoute\x12\x37.google.cloud.networkservices.v1.UpdateGrpcRouteRequest\x1a\x1d.google.longrunning.Operation\"\xa7\x01\xca\x41>\n\tGrpcRoute\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x16grpc_route,update_mask\x82\xd3\xe4\x93\x02G29/v1/{grpc_route.name=projects/*/locations/*/grpcRoutes/*}:\ngrpc_route\x12\xf6\x01\n\x0f\x44\x65leteGrpcRoute\x12\x37.google.cloud.networkservices.v1.DeleteGrpcRouteRequest\x1a\x1d.google.longrunning.Operation\"\x8a\x01\xca\x41J\n\x15google.protobuf.Empty\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x30*./v1/{name=projects/*/locations/*/grpcRoutes/*}\x12\xc2\x01\n\x0eListHttpRoutes\x12\x36.google.cloud.networkservices.v1.ListHttpRoutesRequest\x1a\x37.google.cloud.networkservices.v1.ListHttpRoutesResponse\"?\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x30\x12./v1/{parent=projects/*/locations/*}/httpRoutes\x12\xaf\x01\n\x0cGetHttpRoute\x12\x34.google.cloud.networkservices.v1.GetHttpRouteRequest\x1a*.google.cloud.networkservices.v1.HttpRoute\"=\xda\x41\x04name\x82\xd3\xe4\x93\x02\x30\x12./v1/{name=projects/*/locations/*/httpRoutes/*}\x12\x91\x02\n\x0f\x43reateHttpRoute\x12\x37.google.cloud.networkservices.v1.CreateHttpRouteRequest\x1a\x1d.google.longrunning.Operation\"\xa5\x01\xca\x41>\n\tHttpRoute\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x1fparent,http_route,http_route_id\x82\xd3\xe4\x93\x02<\"./v1/{parent=projects/*/locations/*}/httpRoutes:\nhttp_route\x12\x93\x02\n\x0fUpdateHttpRoute\x12\x37.google.cloud.networkservices.v1.UpdateHttpRouteRequest\x1a\x1d.google.longrunning.Operation\"\xa7\x01\xca\x41>\n\tHttpRoute\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x16http_route,update_mask\x82\xd3\xe4\x93\x02G29/v1/{http_route.name=projects/*/locations/*/httpRoutes/*}:\nhttp_route\x12\xf6\x01\n\x0f\x44\x65leteHttpRoute\x12\x37.google.cloud.networkservices.v1.DeleteHttpRouteRequest\x1a\x1d.google.longrunning.Operation\"\x8a\x01\xca\x41J\n\x15google.protobuf.Empty\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x30*./v1/{name=projects/*/locations/*/httpRoutes/*}\x12\xbe\x01\n\rListTcpRoutes\x12\x35.google.cloud.networkservices.v1.ListTcpRoutesRequest\x1a\x36.google.cloud.networkservices.v1.ListTcpRoutesResponse\">\xda\x41\x06parent\x82\xd3\xe4\x93\x02/\x12-/v1/{parent=projects/*/locations/*}/tcpRoutes\x12\xab\x01\n\x0bGetTcpRoute\x12\x33.google.cloud.networkservices.v1.GetTcpRouteRequest\x1a).google.cloud.networkservices.v1.TcpRoute\"<\xda\x41\x04name\x82\xd3\xe4\x93\x02/\x12-/v1/{name=projects/*/locations/*/tcpRoutes/*}\x12\x8a\x02\n\x0e\x43reateTcpRoute\x12\x36.google.cloud.networkservices.v1.CreateTcpRouteRequest\x1a\x1d.google.longrunning.Operation\"\xa0\x01\xca\x41=\n\x08TcpRoute\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x1dparent,tcp_route,tcp_route_id\x82\xd3\xe4\x93\x02:\"-/v1/{parent=projects/*/locations/*}/tcpRoutes:\ttcp_route\x12\x8c\x02\n\x0eUpdateTcpRoute\x12\x36.google.cloud.networkservices.v1.UpdateTcpRouteRequest\x1a\x1d.google.longrunning.Operation\"\xa2\x01\xca\x41=\n\x08TcpRoute\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x15tcp_route,update_mask\x82\xd3\xe4\x93\x02\x44\x32\x37/v1/{tcp_route.name=projects/*/locations/*/tcpRoutes/*}:\ttcp_route\x12\xf3\x01\n\x0e\x44\x65leteTcpRoute\x12\x36.google.cloud.networkservices.v1.DeleteTcpRouteRequest\x1a\x1d.google.longrunning.Operation\"\x89\x01\xca\x41J\n\x15google.protobuf.Empty\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02/*-/v1/{name=projects/*/locations/*/tcpRoutes/*}\x12\xbe\x01\n\rListTlsRoutes\x12\x35.google.cloud.networkservices.v1.ListTlsRoutesRequest\x1a\x36.google.cloud.networkservices.v1.ListTlsRoutesResponse\">\xda\x41\x06parent\x82\xd3\xe4\x93\x02/\x12-/v1/{parent=projects/*/locations/*}/tlsRoutes\x12\xab\x01\n\x0bGetTlsRoute\x12\x33.google.cloud.networkservices.v1.GetTlsRouteRequest\x1a).google.cloud.networkservices.v1.TlsRoute\"<\xda\x41\x04name\x82\xd3\xe4\x93\x02/\x12-/v1/{name=projects/*/locations/*/tlsRoutes/*}\x12\x8a\x02\n\x0e\x43reateTlsRoute\x12\x36.google.cloud.networkservices.v1.CreateTlsRouteRequest\x1a\x1d.google.longrunning.Operation\"\xa0\x01\xca\x41=\n\x08TlsRoute\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x1dparent,tls_route,tls_route_id\x82\xd3\xe4\x93\x02:\"-/v1/{parent=projects/*/locations/*}/tlsRoutes:\ttls_route\x12\x8c\x02\n\x0eUpdateTlsRoute\x12\x36.google.cloud.networkservices.v1.UpdateTlsRouteRequest\x1a\x1d.google.longrunning.Operation\"\xa2\x01\xca\x41=\n\x08TlsRoute\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x15tls_route,update_mask\x82\xd3\xe4\x93\x02\x44\x32\x37/v1/{tls_route.name=projects/*/locations/*/tlsRoutes/*}:\ttls_route\x12\xf3\x01\n\x0e\x44\x65leteTlsRoute\x12\x36.google.cloud.networkservices.v1.DeleteTlsRouteRequest\x1a\x1d.google.longrunning.Operation\"\x89\x01\xca\x41J\n\x15google.protobuf.Empty\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02/*-/v1/{name=projects/*/locations/*/tlsRoutes/*}\x12\xd6\x01\n\x13ListServiceBindings\x12;.google.cloud.networkservices.v1.ListServiceBindingsRequest\x1a<.google.cloud.networkservices.v1.ListServiceBindingsResponse\"D\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x35\x12\x33/v1/{parent=projects/*/locations/*}/serviceBindings\x12\xc3\x01\n\x11GetServiceBinding\x12\x39.google.cloud.networkservices.v1.GetServiceBindingRequest\x1a/.google.cloud.networkservices.v1.ServiceBinding\"B\xda\x41\x04name\x82\xd3\xe4\x93\x02\x35\x12\x33/v1/{name=projects/*/locations/*/serviceBindings/*}\x12\xb4\x02\n\x14\x43reateServiceBinding\x12<.google.cloud.networkservices.v1.CreateServiceBindingRequest\x1a\x1d.google.longrunning.Operation\"\xbe\x01\xca\x41\x43\n\x0eServiceBinding\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41)parent,service_binding,service_binding_id\x82\xd3\xe4\x93\x02\x46\"3/v1/{parent=projects/*/locations/*}/serviceBindings:\x0fservice_binding\x12\xb6\x02\n\x14UpdateServiceBinding\x12<.google.cloud.networkservices.v1.UpdateServiceBindingRequest\x1a\x1d.google.longrunning.Operation\"\xc0\x01\xca\x41\x43\n\x0eServiceBinding\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x1bservice_binding,update_mask\x82\xd3\xe4\x93\x02V2C/v1/{service_binding.name=projects/*/locations/*/serviceBindings/*}:\x0fservice_binding\x12\x85\x02\n\x14\x44\x65leteServiceBinding\x12<.google.cloud.networkservices.v1.DeleteServiceBindingRequest\x1a\x1d.google.longrunning.Operation\"\x8f\x01\xca\x41J\n\x15google.protobuf.Empty\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x35*3/v1/{name=projects/*/locations/*/serviceBindings/*}\x12\xb2\x01\n\nListMeshes\x12\x32.google.cloud.networkservices.v1.ListMeshesRequest\x1a\x33.google.cloud.networkservices.v1.ListMeshesResponse\";\xda\x41\x06parent\x82\xd3\xe4\x93\x02,\x12*/v1/{parent=projects/*/locations/*}/meshes\x12\x9c\x01\n\x07GetMesh\x12/.google.cloud.networkservices.v1.GetMeshRequest\x1a%.google.cloud.networkservices.v1.Mesh\"9\xda\x41\x04name\x82\xd3\xe4\x93\x02,\x12*/v1/{name=projects/*/locations/*/meshes/*}\x12\xec\x01\n\nCreateMesh\x12\x32.google.cloud.networkservices.v1.CreateMeshRequest\x1a\x1d.google.longrunning.Operation\"\x8a\x01\xca\x41\x39\n\x04Mesh\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x13parent,mesh,mesh_id\x82\xd3\xe4\x93\x02\x32\"*/v1/{parent=projects/*/locations/*}/meshes:\x04mesh\x12\xee\x01\n\nUpdateMesh\x12\x32.google.cloud.networkservices.v1.UpdateMeshRequest\x1a\x1d.google.longrunning.Operation\"\x8c\x01\xca\x41\x39\n\x04Mesh\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x10mesh,update_mask\x82\xd3\xe4\x93\x02\x37\x32//v1/{mesh.name=projects/*/locations/*/meshes/*}:\x04mesh\x12\xe8\x01\n\nDeleteMesh\x12\x32.google.cloud.networkservices.v1.DeleteMeshRequest\x1a\x1d.google.longrunning.Operation\"\x86\x01\xca\x41J\n\x15google.protobuf.Empty\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02,**/v1/{name=projects/*/locations/*/meshes/*}\x12\xde\x01\n\x15ListServiceLbPolicies\x12=.google.cloud.networkservices.v1.ListServiceLbPoliciesRequest\x1a>.google.cloud.networkservices.v1.ListServiceLbPoliciesResponse\"F\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x37\x12\x35/v1/{parent=projects/*/locations/*}/serviceLbPolicies\x12\xc8\x01\n\x12GetServiceLbPolicy\x12:.google.cloud.networkservices.v1.GetServiceLbPolicyRequest\x1a\x30.google.cloud.networkservices.v1.ServiceLbPolicy\"D\xda\x41\x04name\x82\xd3\xe4\x93\x02\x37\x12\x35/v1/{name=projects/*/locations/*/serviceLbPolicies/*}\x12\xbf\x02\n\x15\x43reateServiceLbPolicy\x12=.google.cloud.networkservices.v1.CreateServiceLbPolicyRequest\x1a\x1d.google.longrunning.Operation\"\xc7\x01\xca\x41\x44\n\x0fServiceLbPolicy\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41-parent,service_lb_policy,service_lb_policy_id\x82\xd3\xe4\x93\x02J\"5/v1/{parent=projects/*/locations/*}/serviceLbPolicies:\x11service_lb_policy\x12\xc1\x02\n\x15UpdateServiceLbPolicy\x12=.google.cloud.networkservices.v1.UpdateServiceLbPolicyRequest\x1a\x1d.google.longrunning.Operation\"\xc9\x01\xca\x41\x44\n\x0fServiceLbPolicy\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x1dservice_lb_policy,update_mask\x82\xd3\xe4\x93\x02\\2G/v1/{service_lb_policy.name=projects/*/locations/*/serviceLbPolicies/*}:\x11service_lb_policy\x12\x89\x02\n\x15\x44\x65leteServiceLbPolicy\x12=.google.cloud.networkservices.v1.DeleteServiceLbPolicyRequest\x1a\x1d.google.longrunning.Operation\"\x91\x01\xca\x41J\n\x15google.protobuf.Empty\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x37*5/v1/{name=projects/*/locations/*/serviceLbPolicies/*}\x12\xcf\x01\n\x13GetGatewayRouteView\x12;.google.cloud.networkservices.v1.GetGatewayRouteViewRequest\x1a\x31.google.cloud.networkservices.v1.GatewayRouteView\"H\xda\x41\x04name\x82\xd3\xe4\x93\x02;\x12\x39/v1/{name=projects/*/locations/*/gateways/*/routeViews/*}\x12\xc4\x01\n\x10GetMeshRouteView\x12\x38.google.cloud.networkservices.v1.GetMeshRouteViewRequest\x1a..google.cloud.networkservices.v1.MeshRouteView\"F\xda\x41\x04name\x82\xd3\xe4\x93\x02\x39\x12\x37/v1/{name=projects/*/locations/*/meshes/*/routeViews/*}\x12\xe2\x01\n\x15ListGatewayRouteViews\x12=.google.cloud.networkservices.v1.ListGatewayRouteViewsRequest\x1a>.google.cloud.networkservices.v1.ListGatewayRouteViewsResponse\"J\xda\x41\x06parent\x82\xd3\xe4\x93\x02;\x12\x39/v1/{parent=projects/*/locations/*/gateways/*}/routeViews\x12\xd7\x01\n\x12ListMeshRouteViews\x12:.google.cloud.networkservices.v1.ListMeshRouteViewsRequest\x1a;.google.cloud.networkservices.v1.ListMeshRouteViewsResponse\"H\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x39\x12\x37/v1/{parent=projects/*/locations/*/meshes/*}/routeViews\x12\xce\x01\n\x11ListAgentGateways\x12\x39.google.cloud.networkservices.v1.ListAgentGatewaysRequest\x1a:.google.cloud.networkservices.v1.ListAgentGatewaysResponse\"B\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x33\x12\x31/v1/{parent=projects/*/locations/*}/agentGateways\x12\xbb\x01\n\x0fGetAgentGateway\x12\x37.google.cloud.networkservices.v1.GetAgentGatewayRequest\x1a-.google.cloud.networkservices.v1.AgentGateway\"@\xda\x41\x04name\x82\xd3\xe4\x93\x02\x33\x12\x31/v1/{name=projects/*/locations/*/agentGateways/*}\x12\xa6\x02\n\x12\x43reateAgentGateway\x12:.google.cloud.networkservices.v1.CreateAgentGatewayRequest\x1a\x1d.google.longrunning.Operation\"\xb4\x01\xca\x41\x41\n\x0c\x41gentGateway\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41%parent,agent_gateway,agent_gateway_id\x82\xd3\xe4\x93\x02\x42\"1/v1/{parent=projects/*/locations/*}/agentGateways:\ragent_gateway\x12\xa8\x02\n\x12UpdateAgentGateway\x12:.google.cloud.networkservices.v1.UpdateAgentGatewayRequest\x1a\x1d.google.longrunning.Operation\"\xb6\x01\xca\x41\x41\n\x0c\x41gentGateway\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x19\x61gent_gateway,update_mask\x82\xd3\xe4\x93\x02P2?/v1/{agent_gateway.name=projects/*/locations/*/agentGateways/*}:\ragent_gateway\x12\xff\x01\n\x12\x44\x65leteAgentGateway\x12:.google.cloud.networkservices.v1.DeleteAgentGatewayRequest\x1a\x1d.google.longrunning.Operation\"\x8d\x01\xca\x41J\n\x15google.protobuf.Empty\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x33*1/v1/{name=projects/*/locations/*/agentGateways/*}\x1aR\xca\x41\x1enetworkservices.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xdf\x01\n#com.google.cloud.networkservices.v1P\x01ZMcloud.google.com/go/networkservices/apiv1/networkservicespb;networkservicespb\xaa\x02\x1fGoogle.Cloud.NetworkServices.V1\xca\x02\x1fGoogle\\Cloud\\NetworkServices\\V1\xea\x02\"Google::Cloud::NetworkServices::V1b\x06proto3" pool = ::Google::Protobuf::DescriptorPool.generated_pool pool.add_serialized_file(descriptor_data) diff --git a/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/network_services_services_pb.rb b/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/network_services_services_pb.rb index 00e52df44ca1..d02f03a0f472 100644 --- a/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/network_services_services_pb.rb +++ b/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/network_services_services_pb.rb @@ -153,6 +153,16 @@ class Service rpc :ListGatewayRouteViews, ::Google::Cloud::NetworkServices::V1::ListGatewayRouteViewsRequest, ::Google::Cloud::NetworkServices::V1::ListGatewayRouteViewsResponse # Lists RouteViews rpc :ListMeshRouteViews, ::Google::Cloud::NetworkServices::V1::ListMeshRouteViewsRequest, ::Google::Cloud::NetworkServices::V1::ListMeshRouteViewsResponse + # Lists AgentGateways in a given project and location. + rpc :ListAgentGateways, ::Google::Cloud::NetworkServices::V1::ListAgentGatewaysRequest, ::Google::Cloud::NetworkServices::V1::ListAgentGatewaysResponse + # Gets details of a single AgentGateway. + rpc :GetAgentGateway, ::Google::Cloud::NetworkServices::V1::GetAgentGatewayRequest, ::Google::Cloud::NetworkServices::V1::AgentGateway + # Creates a new AgentGateway in a given project and location. + rpc :CreateAgentGateway, ::Google::Cloud::NetworkServices::V1::CreateAgentGatewayRequest, ::Google::Longrunning::Operation + # Updates the parameters of a single AgentGateway. + rpc :UpdateAgentGateway, ::Google::Cloud::NetworkServices::V1::UpdateAgentGatewayRequest, ::Google::Longrunning::Operation + # Deletes a single AgentGateway. + rpc :DeleteAgentGateway, ::Google::Cloud::NetworkServices::V1::DeleteAgentGatewayRequest, ::Google::Longrunning::Operation end Stub = Service.rpc_stub_class diff --git a/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/service_binding_pb.rb b/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/service_binding_pb.rb index 0e4e2a1f1310..ee63ef59e8ca 100644 --- a/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/service_binding_pb.rb +++ b/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/service_binding_pb.rb @@ -5,12 +5,13 @@ require 'google/protobuf' require 'google/api/field_behavior_pb' +require 'google/api/field_info_pb' require 'google/api/resource_pb' require 'google/protobuf/field_mask_pb' require 'google/protobuf/timestamp_pb' -descriptor_data = "\n5google/cloud/networkservices/v1/service_binding.proto\x12\x1fgoogle.cloud.networkservices.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x88\x04\n\x0eServiceBinding\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x18\n\x0b\x64\x65scription\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x34\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x42\n\x07service\x18\x05 \x01(\tB1\x18\x01\xe0\x41\x01\xfa\x41)\n\'servicedirectory.googleapis.com/Service\x12\x19\n\nservice_id\x18\x08 \x01(\tB\x05\x18\x01\xe0\x41\x03\x12P\n\x06labels\x18\x07 \x03(\x0b\x32;.google.cloud.networkservices.v1.ServiceBinding.LabelsEntryB\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:}\xea\x41z\n-networkservices.googleapis.com/ServiceBinding\x12Iprojects/{project}/locations/{location}/serviceBindings/{service_binding}\"\x8a\x01\n\x1aListServiceBindingsRequest\x12\x45\n\x06parent\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\x12-networkservices.googleapis.com/ServiceBinding\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"\x96\x01\n\x1bListServiceBindingsResponse\x12I\n\x10service_bindings\x18\x01 \x03(\x0b\x32/.google.cloud.networkservices.v1.ServiceBinding\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"_\n\x18GetServiceBindingRequest\x12\x43\n\x04name\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-networkservices.googleapis.com/ServiceBinding\"\xd4\x01\n\x1b\x43reateServiceBindingRequest\x12\x45\n\x06parent\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\x12-networkservices.googleapis.com/ServiceBinding\x12\x1f\n\x12service_binding_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12M\n\x0fservice_binding\x18\x03 \x01(\x0b\x32/.google.cloud.networkservices.v1.ServiceBindingB\x03\xe0\x41\x02\"\xa2\x01\n\x1bUpdateServiceBindingRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x12M\n\x0fservice_binding\x18\x02 \x01(\x0b\x32/.google.cloud.networkservices.v1.ServiceBindingB\x03\xe0\x41\x02\"b\n\x1b\x44\x65leteServiceBindingRequest\x12\x43\n\x04name\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-networkservices.googleapis.com/ServiceBindingB\xf3\x02\n#com.google.cloud.networkservices.v1B\x13ServiceBindingProtoP\x01ZMcloud.google.com/go/networkservices/apiv1/networkservicespb;networkservicespb\xaa\x02\x1fGoogle.Cloud.NetworkServices.V1\xca\x02\x1fGoogle\\Cloud\\NetworkServices\\V1\xea\x02\"Google::Cloud::NetworkServices::V1\xea\x41|\n\'servicedirectory.googleapis.com/Service\x12Qprojects/{project}/locations/{location}/namespaces/{namespace}/services/{service}b\x06proto3" +descriptor_data = "\n5google/cloud/networkservices/v1/service_binding.proto\x12\x1fgoogle.cloud.networkservices.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1bgoogle/api/field_info.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x88\x04\n\x0eServiceBinding\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x18\n\x0b\x64\x65scription\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x34\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x42\n\x07service\x18\x05 \x01(\tB1\x18\x01\xe0\x41\x01\xfa\x41)\n\'servicedirectory.googleapis.com/Service\x12\x19\n\nservice_id\x18\x08 \x01(\tB\x05\x18\x01\xe0\x41\x03\x12P\n\x06labels\x18\x07 \x03(\x0b\x32;.google.cloud.networkservices.v1.ServiceBinding.LabelsEntryB\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:}\xea\x41z\n-networkservices.googleapis.com/ServiceBinding\x12Iprojects/{project}/locations/{location}/serviceBindings/{service_binding}\"\x8a\x01\n\x1aListServiceBindingsRequest\x12\x45\n\x06parent\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\x12-networkservices.googleapis.com/ServiceBinding\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"\x96\x01\n\x1bListServiceBindingsResponse\x12I\n\x10service_bindings\x18\x01 \x03(\x0b\x32/.google.cloud.networkservices.v1.ServiceBinding\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"_\n\x18GetServiceBindingRequest\x12\x43\n\x04name\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-networkservices.googleapis.com/ServiceBinding\"\xd4\x01\n\x1b\x43reateServiceBindingRequest\x12\x45\n\x06parent\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\x12-networkservices.googleapis.com/ServiceBinding\x12\x1f\n\x12service_binding_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12M\n\x0fservice_binding\x18\x03 \x01(\x0b\x32/.google.cloud.networkservices.v1.ServiceBindingB\x03\xe0\x41\x02\"\xa2\x01\n\x1bUpdateServiceBindingRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x12M\n\x0fservice_binding\x18\x02 \x01(\x0b\x32/.google.cloud.networkservices.v1.ServiceBindingB\x03\xe0\x41\x02\"b\n\x1b\x44\x65leteServiceBindingRequest\x12\x43\n\x04name\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-networkservices.googleapis.com/ServiceBindingB\xf3\x02\n#com.google.cloud.networkservices.v1B\x13ServiceBindingProtoP\x01ZMcloud.google.com/go/networkservices/apiv1/networkservicespb;networkservicespb\xaa\x02\x1fGoogle.Cloud.NetworkServices.V1\xca\x02\x1fGoogle\\Cloud\\NetworkServices\\V1\xea\x02\"Google::Cloud::NetworkServices::V1\xea\x41|\n\'servicedirectory.googleapis.com/Service\x12Qprojects/{project}/locations/{location}/namespaces/{namespace}/services/{service}b\x06proto3" pool = ::Google::Protobuf::DescriptorPool.generated_pool pool.add_serialized_file(descriptor_data) diff --git a/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/tls_route_pb.rb b/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/tls_route_pb.rb index a9e92148d70a..3b1b6565b309 100644 --- a/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/tls_route_pb.rb +++ b/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/tls_route_pb.rb @@ -11,7 +11,7 @@ require 'google/protobuf/timestamp_pb' -descriptor_data = "\n/google/cloud/networkservices/v1/tls_route.proto\x12\x1fgoogle.cloud.networkservices.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1egoogle/protobuf/duration.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xd4\x08\n\x08TlsRoute\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x16\n\tself_link\x18\x08 \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12G\n\x05rules\x18\x05 \x03(\x0b\x32\x33.google.cloud.networkservices.v1.TlsRoute.RouteRuleB\x03\xe0\x41\x02\x12;\n\x06meshes\x18\x06 \x03(\tB+\xe0\x41\x01\xfa\x41%\n#networkservices.googleapis.com/Mesh\x12@\n\x08gateways\x18\x07 \x03(\tB.\xe0\x41\x01\xfa\x41(\n&networkservices.googleapis.com/Gateway\x12J\n\x06labels\x18\x0b \x03(\x0b\x32\x35.google.cloud.networkservices.v1.TlsRoute.LabelsEntryB\x03\xe0\x41\x01\x1a\xa3\x01\n\tRouteRule\x12J\n\x07matches\x18\x01 \x03(\x0b\x32\x34.google.cloud.networkservices.v1.TlsRoute.RouteMatchB\x03\xe0\x41\x02\x12J\n\x06\x61\x63tion\x18\x02 \x01(\x0b\x32\x35.google.cloud.networkservices.v1.TlsRoute.RouteActionB\x03\xe0\x41\x02\x1a\x36\n\nRouteMatch\x12\x15\n\x08sni_host\x18\x01 \x03(\tB\x03\xe0\x41\x01\x12\x11\n\x04\x61lpn\x18\x02 \x03(\tB\x03\xe0\x41\x01\x1a\x9a\x01\n\x0bRouteAction\x12U\n\x0c\x64\x65stinations\x18\x01 \x03(\x0b\x32:.google.cloud.networkservices.v1.TlsRoute.RouteDestinationB\x03\xe0\x41\x02\x12\x34\n\x0cidle_timeout\x18\x04 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x01\x1al\n\x10RouteDestination\x12\x43\n\x0cservice_name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%compute.googleapis.com/BackendService\x12\x13\n\x06weight\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:k\xea\x41h\n\'networkservices.googleapis.com/TlsRoute\x12=projects/{project}/locations/{location}/tlsRoutes/{tls_route}\"\xa3\x01\n\x14ListTlsRoutesRequest\x12?\n\x06parent\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\x12\'networkservices.googleapis.com/TlsRoute\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12#\n\x16return_partial_success\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"\x84\x01\n\x15ListTlsRoutesResponse\x12=\n\ntls_routes\x18\x01 \x03(\x0b\x32).google.cloud.networkservices.v1.TlsRoute\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"S\n\x12GetTlsRouteRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'networkservices.googleapis.com/TlsRoute\"\xb6\x01\n\x15\x43reateTlsRouteRequest\x12?\n\x06parent\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\x12\'networkservices.googleapis.com/TlsRoute\x12\x19\n\x0ctls_route_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x41\n\ttls_route\x18\x03 \x01(\x0b\x32).google.cloud.networkservices.v1.TlsRouteB\x03\xe0\x41\x02\"\x90\x01\n\x15UpdateTlsRouteRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x12\x41\n\ttls_route\x18\x02 \x01(\x0b\x32).google.cloud.networkservices.v1.TlsRouteB\x03\xe0\x41\x02\"V\n\x15\x44\x65leteTlsRouteRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'networkservices.googleapis.com/TlsRouteB\xee\x01\n#com.google.cloud.networkservices.v1B\rTlsRouteProtoP\x01ZMcloud.google.com/go/networkservices/apiv1/networkservicespb;networkservicespb\xaa\x02\x1fGoogle.Cloud.NetworkServices.V1\xca\x02\x1fGoogle\\Cloud\\NetworkServices\\V1\xea\x02\"Google::Cloud::NetworkServices::V1b\x06proto3" +descriptor_data = "\n/google/cloud/networkservices/v1/tls_route.proto\x12\x1fgoogle.cloud.networkservices.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1egoogle/protobuf/duration.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x9b\t\n\x08TlsRoute\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x16\n\tself_link\x18\x08 \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12G\n\x05rules\x18\x05 \x03(\x0b\x32\x33.google.cloud.networkservices.v1.TlsRoute.RouteRuleB\x03\xe0\x41\x02\x12;\n\x06meshes\x18\x06 \x03(\tB+\xe0\x41\x01\xfa\x41%\n#networkservices.googleapis.com/Mesh\x12@\n\x08gateways\x18\x07 \x03(\tB.\xe0\x41\x01\xfa\x41(\n&networkservices.googleapis.com/Gateway\x12\x45\n\x0etarget_proxies\x18\r \x03(\tB-\xe0\x41\x01\xfa\x41\'\n%compute.googleapis.com/TargetTcpProxy\x12J\n\x06labels\x18\x0b \x03(\x0b\x32\x35.google.cloud.networkservices.v1.TlsRoute.LabelsEntryB\x03\xe0\x41\x01\x1a\xa3\x01\n\tRouteRule\x12J\n\x07matches\x18\x01 \x03(\x0b\x32\x34.google.cloud.networkservices.v1.TlsRoute.RouteMatchB\x03\xe0\x41\x02\x12J\n\x06\x61\x63tion\x18\x02 \x01(\x0b\x32\x35.google.cloud.networkservices.v1.TlsRoute.RouteActionB\x03\xe0\x41\x02\x1a\x36\n\nRouteMatch\x12\x15\n\x08sni_host\x18\x01 \x03(\tB\x03\xe0\x41\x01\x12\x11\n\x04\x61lpn\x18\x02 \x03(\tB\x03\xe0\x41\x01\x1a\x9a\x01\n\x0bRouteAction\x12U\n\x0c\x64\x65stinations\x18\x01 \x03(\x0b\x32:.google.cloud.networkservices.v1.TlsRoute.RouteDestinationB\x03\xe0\x41\x02\x12\x34\n\x0cidle_timeout\x18\x04 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x01\x1al\n\x10RouteDestination\x12\x43\n\x0cservice_name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%compute.googleapis.com/BackendService\x12\x13\n\x06weight\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:k\xea\x41h\n\'networkservices.googleapis.com/TlsRoute\x12=projects/{project}/locations/{location}/tlsRoutes/{tls_route}\"\xa3\x01\n\x14ListTlsRoutesRequest\x12?\n\x06parent\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\x12\'networkservices.googleapis.com/TlsRoute\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12#\n\x16return_partial_success\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"\x84\x01\n\x15ListTlsRoutesResponse\x12=\n\ntls_routes\x18\x01 \x03(\x0b\x32).google.cloud.networkservices.v1.TlsRoute\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"S\n\x12GetTlsRouteRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'networkservices.googleapis.com/TlsRoute\"\xb6\x01\n\x15\x43reateTlsRouteRequest\x12?\n\x06parent\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\x12\'networkservices.googleapis.com/TlsRoute\x12\x19\n\x0ctls_route_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x41\n\ttls_route\x18\x03 \x01(\x0b\x32).google.cloud.networkservices.v1.TlsRouteB\x03\xe0\x41\x02\"\x90\x01\n\x15UpdateTlsRouteRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x12\x41\n\ttls_route\x18\x02 \x01(\x0b\x32).google.cloud.networkservices.v1.TlsRouteB\x03\xe0\x41\x02\"V\n\x15\x44\x65leteTlsRouteRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'networkservices.googleapis.com/TlsRouteB\xe5\x02\n#com.google.cloud.networkservices.v1B\rTlsRouteProtoP\x01ZMcloud.google.com/go/networkservices/apiv1/networkservicespb;networkservicespb\xaa\x02\x1fGoogle.Cloud.NetworkServices.V1\xca\x02\x1fGoogle\\Cloud\\NetworkServices\\V1\xea\x02\"Google::Cloud::NetworkServices::V1\xea\x41t\n%compute.googleapis.com/TargetTcpProxy\x12Kprojects/{project}/locations/{location}/targetTcpProxies/{target_tcp_proxy}b\x06proto3" pool = ::Google::Protobuf::DescriptorPool.generated_pool pool.add_serialized_file(descriptor_data) diff --git a/owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/agent_gateway.rb b/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/agent_gateway.rb similarity index 100% rename from owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/agent_gateway.rb rename to google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/agent_gateway.rb diff --git a/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/common.rb b/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/common.rb index 7ba9c40c394c..de9ea008823f 100644 --- a/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/common.rb +++ b/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/common.rb @@ -151,10 +151,10 @@ module EnvoyHeaders NONE = 1 # Envoy will insert default internal debug headers into upstream requests: - # x-envoy-attempt-count - # x-envoy-is-timeout-retry - # x-envoy-expected-rq-timeout-ms - # x-envoy-original-path + # x-envoy-attempt-count, + # x-envoy-is-timeout-retry, + # x-envoy-expected-rq-timeout-ms, + # x-envoy-original-path, # x-envoy-upstream-stream-duration-ms DEBUG_HEADERS = 2 end diff --git a/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/dep.rb b/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/dep.rb index aac96e319d55..2bee31a5cd46 100644 --- a/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/dep.rb +++ b/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/dep.rb @@ -62,12 +62,14 @@ class MatchCondition # A single extension in the chain to execute for the matching request. # @!attribute [rw] name # @return [::String] - # Required. The name for this extension. + # Optional. The name for this extension. # The name is logged as part of the HTTP request logs. # The name must conform with RFC-1034, is restricted to lower-cased # letters, numbers and hyphens, and can have a maximum length of 63 # characters. Additionally, the first character must be a letter and the # last a letter or a number. + # + # This field is required except for AuthzExtension. # @!attribute [rw] authority # @return [::String] # Optional. The `:authority` header in the gRPC request sent from Envoy @@ -112,6 +114,10 @@ class MatchCondition # # For the `LbEdgeExtension` resource, this field is required and must only # contain `REQUEST_HEADERS` event. + # + # For the `AuthzExtension` resource, this field is optional. + # `REQUEST_HEADERS` is the only supported event. If unspecified, + # `REQUEST_HEADERS` event is assumed as supported. # @!attribute [rw] timeout # @return [::Google::Protobuf::Duration] # Optional. Specifies the timeout for each individual message on the @@ -141,13 +147,27 @@ class MatchCondition # Optional. List of the HTTP headers to forward to the extension # (from the client or backend). If omitted, all headers are sent. # Each element is a string indicating the header name. + # @!attribute [rw] forward_attributes + # @return [::Array<::String>] + # Optional. List of the Envoy attributes to forward to the extension + # server. The attributes provided here are included as part of the + # `ProcessingRequest.attributes` field (of type + # `map`), where the keys are the attribute + # names. Refer to the + # [documentation](https://cloud.google.com/service-extensions/docs/cel-matcher-language-reference#attributes) + # for the names of attributes that can be forwarded. If omitted, no + # attributes are sent. Each element is a string indicating the + # attribute name. # @!attribute [rw] metadata # @return [::Google::Protobuf::Struct] # Optional. The metadata provided here is included as part of the # `metadata_context` (of type `google.protobuf.Struct`) in the # `ProcessingRequest` message sent to the extension server. # - # The metadata is available under the namespace + # For `AuthzExtension` resources, the metadata is available under the + # namespace `com.google.authz_extension.`. + # For other types of extensions, the metadata is available under the + # namespace # `com.google....`. # For example: # `com.google.lb_traffic_extension.lbtrafficextension1.chain1.ext1`. @@ -171,6 +191,45 @@ class MatchCondition # * The length of each key must be less than 64 characters. # * The length of each value must be less than 1024 characters. # * All values must be strings. + # @!attribute [rw] request_body_send_mode + # @return [::Google::Cloud::NetworkServices::V1::BodySendMode] + # Optional. Configures the send mode for request body processing. + # + # The field can only be set if `supported_events` includes `REQUEST_BODY`. + # If `supported_events` includes `REQUEST_BODY`, + # but `request_body_send_mode` is unset, the default value `STREAMED` is + # used. + # + # When this field is set to `FULL_DUPLEX_STREAMED`, `supported_events` + # must include both `REQUEST_BODY` and `REQUEST_TRAILERS`. + # + # This field can be set only for `LbTrafficExtension` and + # `LbRouteExtension` resources, and only when the `service` field of the + # extension points to a `BackendService`. Only `FULL_DUPLEX_STREAMED` mode + # is supported for `LbRouteExtension` resources. + # @!attribute [rw] response_body_send_mode + # @return [::Google::Cloud::NetworkServices::V1::BodySendMode] + # Optional. Configures the send mode for response processing. If + # unspecified, the default value `STREAMED` is used. + # + # The field can only be set if `supported_events` includes `RESPONSE_BODY`. + # If `supported_events` includes `RESPONSE_BODY`, but + # `response_body_send_mode` is unset, the default value `STREAMED` is used. + # + # When this field is set to `FULL_DUPLEX_STREAMED`, `supported_events` + # must include both `RESPONSE_BODY` and `RESPONSE_TRAILERS`. + # + # This field can be set only for `LbTrafficExtension` resources, and only + # when the `service` field of the extension points to a `BackendService`. + # @!attribute [rw] observability_mode + # @return [::Boolean] + # Optional. When set to `true`, the calls to the extension backend are + # performed asynchronously, without pausing the processing of the ongoing + # request. In this mode, only `STREAMED` (default) body processing is + # supported. Responses, if any, are ignored. + # + # Supported by regional `LbTrafficExtension` and `LbRouteExtension` + # resources. class Extension include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -831,15 +890,17 @@ class DeleteLbEdgeExtensionRequest # resources. # @!attribute [rw] load_balancing_scheme # @return [::Google::Cloud::NetworkServices::V1::LoadBalancingScheme] - # Required. All backend services and forwarding rules referenced by this + # Optional. All backend services and forwarding rules referenced by this # extension must share the same load balancing scheme. Supported values: - # `INTERNAL_MANAGED`, `EXTERNAL_MANAGED`. For more information, refer to + # `INTERNAL_MANAGED`, `EXTERNAL_MANAGED`. Can be omitted for AuthzExtensions + # that do not reference a backend service. For more information, refer to # [Backend services # overview](https://cloud.google.com/load-balancing/docs/backend-service). # @!attribute [rw] authority # @return [::String] - # Required. The `:authority` header in the gRPC request sent from Envoy - # to the extension service. + # Optional. The `:authority` header in the gRPC request sent from Envoy to + # the extension service. It is required when the `service` field points to a + # backend service or a wasm plugin. # @!attribute [rw] service # @return [::String] # Required. The reference to the service that runs the extension. @@ -888,10 +949,23 @@ class DeleteLbEdgeExtensionRequest # Optional. List of the HTTP headers to forward to the extension # (from the client). If omitted, all headers are sent. # Each element is a string indicating the header name. + # @!attribute [rw] forward_attributes + # @return [::Array<::String>] + # Optional. List of the Envoy attributes to forward to the extension server. + # The attributes provided here are included as part of the + # `ProcessingRequest.attributes` field (of type + # `map`), where the keys are the attribute + # names. Refer to the + # [documentation](https://cloud.google.com/service-extensions/docs/cel-matcher-language-reference#attributes) + # for the names of attributes that can be forwarded. If omitted, no + # attributes are sent. Each element is a string indicating the + # attribute name. # @!attribute [rw] wire_format # @return [::Google::Cloud::NetworkServices::V1::WireFormat] # Optional. The format of communication supported by the callout extension. - # If not specified, the default value `EXT_PROC_GRPC` is used. + # This field is supported only for regional `AuthzExtension` resources. If + # not specified, the default value `EXT_PROC_GRPC` is used. Global + # `AuthzExtension` resources use the `EXT_PROC_GRPC` wire format. class AuthzExtension include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -1099,6 +1173,35 @@ module WireFormat # `supported_events` for a client request are sent as part of the same # gRPC stream. EXT_PROC_GRPC = 1 + + # The extension service uses Envoy's `ext_authz` gRPC API. The backend + # service for the extension must use HTTP2 or H2C as the protocol. + # `EXT_AUTHZ_GRPC` is only supported for regional `AuthzExtension` resources. + EXT_AUTHZ_GRPC = 3 + end + + # The send mode for body processing. + module BodySendMode + # Default value. Do not use. + BODY_SEND_MODE_UNSPECIFIED = 0 + + # Calls to the extension are executed in the streamed mode. Subsequent + # chunks will be sent only after the previous chunks have been processed. + # + # The content of the body chunks is sent one way to the extension. Extension + # may send modified chunks back. + # + # This is the default value if the processing mode is not specified. + BODY_SEND_MODE_STREAMED = 1 + + # Calls are executed in the full duplex mode. Subsequent chunks will be sent + # for processing without waiting for the response for the previous chunk or + # for the response for `REQUEST_HEADERS` event. + # + # Extension can freely modify or chunk the body contents. If the extension + # doesn't send the body contents back, the next extension in the chain or the + # upstream will receive an empty body. + BODY_SEND_MODE_FULL_DUPLEX_STREAMED = 2 end end end diff --git a/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/endpoint_policy.rb b/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/endpoint_policy.rb index b1c4d5222c24..6d0a76def9df 100644 --- a/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/endpoint_policy.rb +++ b/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/endpoint_policy.rb @@ -28,7 +28,7 @@ module V1 # @!attribute [rw] name # @return [::String] # Identifier. Name of the EndpointPolicy resource. It matches pattern - # `projects/{project}/locations/global/endpointPolicies/{endpoint_policy}`. + # `projects/{project}/locations/*/endpointPolicies/{endpoint_policy}`. # @!attribute [r] create_time # @return [::Google::Protobuf::Timestamp] # Output only. The timestamp when the resource was created. @@ -107,7 +107,7 @@ module EndpointPolicyType # @!attribute [rw] parent # @return [::String] # Required. The project and location from which the EndpointPolicies should - # be listed, specified in the format `projects/*/locations/global`. + # be listed, specified in the format `projects/*/locations/*`. # @!attribute [rw] page_size # @return [::Integer] # Maximum number of EndpointPolicies to return per call. @@ -151,7 +151,7 @@ class ListEndpointPoliciesResponse # @!attribute [rw] name # @return [::String] # Required. A name of the EndpointPolicy to get. Must be in the format - # `projects/*/locations/global/endpointPolicies/*`. + # `projects/*/locations/*/endpointPolicies/*`. class GetEndpointPolicyRequest include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -161,7 +161,7 @@ class GetEndpointPolicyRequest # @!attribute [rw] parent # @return [::String] # Required. The parent resource of the EndpointPolicy. Must be in the - # format `projects/*/locations/global`. + # format `projects/*/locations/*`. # @!attribute [rw] endpoint_policy_id # @return [::String] # Required. Short name of the EndpointPolicy resource to be created. @@ -194,7 +194,7 @@ class UpdateEndpointPolicyRequest # @!attribute [rw] name # @return [::String] # Required. A name of the EndpointPolicy to delete. Must be in the format - # `projects/*/locations/global/endpointPolicies/*`. + # `projects/*/locations/*/endpointPolicies/*`. class DeleteEndpointPolicyRequest include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods diff --git a/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/extensibility.rb b/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/extensibility.rb index dcd31f1c461a..f7f43bac6c49 100644 --- a/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/extensibility.rb +++ b/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/extensibility.rb @@ -96,10 +96,23 @@ class WasmPlugin # @return [::String] # URI of the plugin configuration stored in the Artifact Registry. # The configuration is provided to the plugin at runtime through - # the `ON_CONFIGURE` callback. The container image must - # contain only a single file with the name - # `plugin.config`. When a new `WasmPluginVersion` - # resource is created, the digest of the container image is saved in the + # the `ON_CONFIGURE` callback. + # + # The URI can refer to one of the following repository formats: + # + # * Container images: the `plugin_config_uri` must point to a container + # that contains a single file with the name `plugin.config`. + # When a new `WasmPluginVersion` resource is created, the digest of the + # image is saved in the `plugin_config_digest` field. + # When pulling a container image from Artifact Registry, the digest + # value is used instead of an image tag. + # + # * Generic artifacts: the `plugin_config_uri` must be in this format: + # `projects/{project}/locations/{location}/repositories/{repository}/ + # genericArtifacts/\\{package}:\\{version}`. + # The specified package and version must contain a file with the name + # `plugin.config`. When a new `WasmPluginVersion` resource is + # created, the checksum of the contents of the file is saved in the # `plugin_config_digest` field. # # Note: The following fields are mutually exclusive: `plugin_config_uri`, `plugin_config_data`. If a field in that set is populated, all other fields in the set will automatically be cleared. @@ -118,23 +131,38 @@ class WasmPlugin # resource. # @!attribute [rw] image_uri # @return [::String] - # Optional. URI of the container image containing the Wasm module, stored - # in the Artifact Registry. The container image must contain only a single - # file with the name `plugin.wasm`. When a new `WasmPluginVersion` resource - # is created, the URI gets resolved to an image digest and saved in the - # `image_digest` field. + # Optional. URI of the image containing the Wasm module, stored in + # Artifact Registry. + # + # The URI can refer to one of the following repository formats: + # + # * Container images: the `image_uri` must point to a container that + # contains a single file with the name `plugin.wasm`. + # When a new `WasmPluginVersion` resource is created, the digest of the + # image is saved in the `image_digest` field. + # When pulling a container image from Artifact Registry, the digest value + # is used instead of an image tag. + # + # * Generic artifacts: the `image_uri` must be in this format: + # `projects/{project}/locations/{location}/repositories/{repository}/ + # genericArtifacts/\\{package}:\\{version}`. + # The specified package and version must contain a file with the name + # `plugin.wasm`. When a new `WasmPluginVersion` resource is created, the + # checksum of the contents of the file is saved in the `image_digest` + # field. # @!attribute [r] image_digest # @return [::String] - # Output only. The resolved digest for the image specified in `image`. - # The digest is resolved during the creation of a - # `WasmPluginVersion` resource. - # This field holds the digest value regardless of whether a tag or - # digest was originally specified in the `image` field. + # Output only. This field holds the digest (usually checksum) value for the + # plugin image. The value is calculated based on the `image_uri` field. If + # the `image_uri` field refers to a container image, the digest value is + # obtained from the container image. If the `image_uri` field refers to + # a generic artifact, the digest value is calculated based on the + # contents of the file. # @!attribute [r] plugin_config_digest # @return [::String] # Output only. This field holds the digest (usually checksum) value for the # plugin configuration. The value is calculated based on the contents of - # the `plugin_config_data` field or the container image defined by the + # `plugin_config_data` field or the image defined by the # `plugin_config_uri` field. class VersionDetails include ::Google::Protobuf::MessageExts @@ -172,9 +200,9 @@ class LabelsEntry # This field can be specified only if logging is enabled for this plugin. # @!attribute [rw] min_log_level # @return [::Google::Cloud::NetworkServices::V1::WasmPlugin::LogConfig::LogLevel] - # Non-empty default. Specificies the lowest level of the plugin logs that - # are exported to Cloud Logging. This setting relates to the logs generated - # by using logging statements in your Wasm code. + # Non-empty default. Specifies the lowest level of the plugin logs that are + # exported to Cloud Logging. This setting relates to the logs generated by + # using logging statements in your Wasm code. # # This field is can be set only if logging is enabled for the plugin. # @@ -255,10 +283,24 @@ class VersionsEntry # @return [::String] # URI of the plugin configuration stored in the Artifact Registry. # The configuration is provided to the plugin at runtime through - # the `ON_CONFIGURE` callback. The container image must contain - # only a single file with the name `plugin.config`. When a - # new `WasmPluginVersion` resource is created, the digest of the - # container image is saved in the `plugin_config_digest` field. + # the `ON_CONFIGURE` callback. + # + # The URI can refer to one of the following repository formats: + # + # * Container images: the `plugin_config_uri` must point to a container + # that contains a single file with the name `plugin.config`. + # When a new `WasmPluginVersion` resource is created, the digest of the + # image is saved in the `plugin_config_digest` field. + # When pulling a container image from Artifact Registry, the digest + # value is used instead of an image tag. + # + # * Generic artifacts: the `plugin_config_uri` must be in this format: + # `projects/{project}/locations/{location}/repositories/{repository}/ + # genericArtifacts/\\{package}:\\{version}`. + # The specified package and version must contain a file with the name + # `plugin.config`. When a new `WasmPluginVersion` resource is + # created, the checksum of the contents of the file is saved in the + # `plugin_config_digest` field. # # Note: The following fields are mutually exclusive: `plugin_config_uri`, `plugin_config_data`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] name @@ -281,24 +323,39 @@ class VersionsEntry # resource. # @!attribute [rw] image_uri # @return [::String] - # Optional. URI of the container image containing the plugin, stored in the + # Optional. URI of the image containing the Wasm module, stored in # Artifact Registry. - # When a new `WasmPluginVersion` resource is created, the digest - # of the container image is saved in the `image_digest` field. - # When downloading an image, the digest value is used instead of an - # image tag. + # + # The URI can refer to one of the following repository formats: + # + # * Container images: the `image_uri` must point to a container that + # contains a single file with the name `plugin.wasm`. + # When a new `WasmPluginVersion` resource is created, the digest of the + # image is saved in the `image_digest` field. + # When pulling a container image from Artifact Registry, the digest value + # is used instead of an image tag. + # + # * Generic artifacts: the `image_uri` must be in this format: + # `projects/{project}/locations/{location}/repositories/{repository}/ + # genericArtifacts/\\{package}:\\{version}`. + # The specified package and version must contain a file with the name + # `plugin.wasm`. When a new `WasmPluginVersion` resource is created, the + # checksum of the contents of the file is saved in the `image_digest` + # field. # @!attribute [r] image_digest # @return [::String] - # Output only. The resolved digest for the image specified in the `image` - # field. The digest is resolved during the creation of `WasmPluginVersion` - # resource. This field holds the digest value, regardless of whether a tag or - # digest was originally specified in the `image` field. + # Output only. This field holds the digest (usually checksum) value for the + # plugin image. The value is calculated based on the `image_uri` field. If + # the `image_uri` field refers to a container image, the digest value is + # obtained from the container image. If the `image_uri` field refers to + # a generic artifact, the digest value is calculated based on the + # contents of the file. # @!attribute [r] plugin_config_digest # @return [::String] # Output only. This field holds the digest (usually checksum) value for the # plugin configuration. The value is calculated based on the contents of - # `plugin_config_data` or the container image defined by - # the `plugin_config_uri` field. + # `plugin_config_data` field or the image defined by the + # `plugin_config_uri` field. class WasmPluginVersion include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods diff --git a/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/gateway.rb b/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/gateway.rb index 9313bb453909..95f4cea563ee 100644 --- a/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/gateway.rb +++ b/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/gateway.rb @@ -61,9 +61,14 @@ module V1 # @return [::Array<::Integer>] # Required. One or more port numbers (1-65535), on which the Gateway will # receive traffic. The proxy binds to the specified ports. - # Gateways of type 'SECURE_WEB_GATEWAY' are limited to 1 port. + # Gateways of type 'SECURE_WEB_GATEWAY' are limited to 5 ports. # Gateways of type 'OPEN_MESH' listen on 0.0.0.0 for IPv4 and :: for IPv6 and # support multiple ports. + # @!attribute [rw] all_ports + # @return [::Boolean] + # Optional. If true, the Gateway will listen on all ports. This is mutually + # exclusive with the `ports` field. This field only applies to gateways of + # type 'SECURE_WEB_GATEWAY'. # @!attribute [rw] scope # @return [::String] # Optional. Scope determines how configuration across multiple Gateway @@ -121,6 +126,11 @@ module V1 # Optional. The routing mode of the Gateway. # This field is configurable only for gateways of type SECURE_WEB_GATEWAY. # This field is required for gateways of type SECURE_WEB_GATEWAY. + # @!attribute [rw] allow_global_access + # @return [::Boolean] + # Optional. If true, the gateway will allow traffic from clients outside of + # the region where the gateway is located. + # This field is configurable only for gateways of type SECURE_WEB_GATEWAY. class Gateway include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods diff --git a/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/grpc_route.rb b/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/grpc_route.rb index 141b96f6920e..0c659d9b1e02 100644 --- a/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/grpc_route.rb +++ b/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/grpc_route.rb @@ -26,7 +26,7 @@ module V1 # @!attribute [rw] name # @return [::String] # Identifier. Name of the GrpcRoute resource. It matches pattern - # `projects/*/locations/global/grpcRoutes/` + # `projects/*/locations/*/grpcRoutes/` # @!attribute [r] self_link # @return [::String] # Output only. Server-defined URL of this resource @@ -82,7 +82,7 @@ module V1 # one of the routing rules to route the requests served by the mesh. # # Each mesh reference should match the pattern: - # `projects/*/locations/global/meshes/` + # `projects/*/locations/*/meshes/` # @!attribute [rw] gateways # @return [::Array<::String>] # Optional. Gateways defines a list of gateways this GrpcRoute is attached @@ -90,7 +90,7 @@ module V1 # gateway. # # Each gateway reference should match the pattern: - # `projects/*/locations/global/gateways/` + # `projects/*/locations/*/gateways/` # @!attribute [rw] rules # @return [::Array<::Google::Cloud::NetworkServices::V1::GrpcRoute::RouteRule>] # Required. A list of detailed rules defining how to route traffic. @@ -378,7 +378,7 @@ class LabelsEntry # @!attribute [rw] parent # @return [::String] # Required. The project and location from which the GrpcRoutes should be - # listed, specified in the format `projects/*/locations/global`. + # listed, specified in the format `projects/*/locations/*`. # @!attribute [rw] page_size # @return [::Integer] # Maximum number of GrpcRoutes to return per call. @@ -421,7 +421,7 @@ class ListGrpcRoutesResponse # @!attribute [rw] name # @return [::String] # Required. A name of the GrpcRoute to get. Must be in the format - # `projects/*/locations/global/grpcRoutes/*`. + # `projects/*/locations/*/grpcRoutes/*`. class GetGrpcRouteRequest include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -431,7 +431,7 @@ class GetGrpcRouteRequest # @!attribute [rw] parent # @return [::String] # Required. The parent resource of the GrpcRoute. Must be in the - # format `projects/*/locations/global`. + # format `projects/*/locations/*`. # @!attribute [rw] grpc_route_id # @return [::String] # Required. Short name of the GrpcRoute resource to be created. @@ -463,7 +463,7 @@ class UpdateGrpcRouteRequest # @!attribute [rw] name # @return [::String] # Required. A name of the GrpcRoute to delete. Must be in the format - # `projects/*/locations/global/grpcRoutes/*`. + # `projects/*/locations/*/grpcRoutes/*`. class DeleteGrpcRouteRequest include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods diff --git a/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/http_route.rb b/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/http_route.rb index 6993bb98088a..d1b46b9a8ccf 100644 --- a/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/http_route.rb +++ b/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/http_route.rb @@ -26,7 +26,7 @@ module V1 # @!attribute [rw] name # @return [::String] # Identifier. Name of the HttpRoute resource. It matches pattern - # `projects/*/locations/global/httpRoutes/http_route_name>`. + # `projects/*/locations/*/httpRoutes/http_route_name>`. # @!attribute [r] self_link # @return [::String] # Output only. Server-defined URL of this resource @@ -72,7 +72,7 @@ module V1 # one of the routing rules to route the requests served by the mesh. # # Each mesh reference should match the pattern: - # `projects/*/locations/global/meshes/` + # `projects/*/locations/*/meshes/` # # The attached Mesh should be of a type SIDECAR # @!attribute [rw] gateways @@ -82,7 +82,7 @@ module V1 # gateway. # # Each gateway reference should match the pattern: - # `projects/*/locations/global/gateways/` + # `projects/*/locations/*/gateways/` # @!attribute [rw] labels # @return [::Google::Protobuf::Map{::String => ::String}] # Optional. Set of label tags associated with the HttpRoute resource. @@ -683,7 +683,7 @@ class LabelsEntry # @!attribute [rw] parent # @return [::String] # Required. The project and location from which the HttpRoutes should be - # listed, specified in the format `projects/*/locations/global`. + # listed, specified in the format `projects/*/locations/*`. # @!attribute [rw] page_size # @return [::Integer] # Maximum number of HttpRoutes to return per call. @@ -697,6 +697,9 @@ class LabelsEntry # Optional. If true, allow partial responses for multi-regional Aggregated # List requests. Otherwise if one of the locations is down or unreachable, # the Aggregated List request will fail. + # @!attribute [rw] filter + # @return [::String] + # Optional. Filter expression to restrict the list. class ListHttpRoutesRequest include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -726,7 +729,7 @@ class ListHttpRoutesResponse # @!attribute [rw] name # @return [::String] # Required. A name of the HttpRoute to get. Must be in the format - # `projects/*/locations/global/httpRoutes/*`. + # `projects/*/locations/*/httpRoutes/*`. class GetHttpRouteRequest include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -736,13 +739,16 @@ class GetHttpRouteRequest # @!attribute [rw] parent # @return [::String] # Required. The parent resource of the HttpRoute. Must be in the - # format `projects/*/locations/global`. + # format `projects/*/locations/*`. # @!attribute [rw] http_route_id # @return [::String] # Required. Short name of the HttpRoute resource to be created. # @!attribute [rw] http_route # @return [::Google::Cloud::NetworkServices::V1::HttpRoute] # Required. HttpRoute resource to be created. + # @!attribute [rw] request_id + # @return [::String] + # Optional. Idempotent request UUID. class CreateHttpRouteRequest include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -768,7 +774,7 @@ class UpdateHttpRouteRequest # @!attribute [rw] name # @return [::String] # Required. A name of the HttpRoute to delete. Must be in the format - # `projects/*/locations/global/httpRoutes/*`. + # `projects/*/locations/*/httpRoutes/*`. class DeleteHttpRouteRequest include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods diff --git a/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/mesh.rb b/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/mesh.rb index 68dda0e6ad07..e122fa2b2d6c 100644 --- a/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/mesh.rb +++ b/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/mesh.rb @@ -27,7 +27,7 @@ module V1 # @!attribute [rw] name # @return [::String] # Identifier. Name of the Mesh resource. It matches pattern - # `projects/*/locations/global/meshes/`. + # `projects/*/locations/*/meshes/`. # @!attribute [r] self_link # @return [::String] # Output only. Server-defined URL of this resource @@ -75,7 +75,7 @@ class LabelsEntry # @!attribute [rw] parent # @return [::String] # Required. The project and location from which the Meshes should be - # listed, specified in the format `projects/*/locations/global`. + # listed, specified in the format `projects/*/locations/*`. # @!attribute [rw] page_size # @return [::Integer] # Maximum number of Meshes to return per call. @@ -117,7 +117,7 @@ class ListMeshesResponse # @!attribute [rw] name # @return [::String] # Required. A name of the Mesh to get. Must be in the format - # `projects/*/locations/global/meshes/*`. + # `projects/*/locations/*/meshes/*`. class GetMeshRequest include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -127,7 +127,7 @@ class GetMeshRequest # @!attribute [rw] parent # @return [::String] # Required. The parent resource of the Mesh. Must be in the - # format `projects/*/locations/global`. + # format `projects/*/locations/*`. # @!attribute [rw] mesh_id # @return [::String] # Required. Short name of the Mesh resource to be created. @@ -159,7 +159,7 @@ class UpdateMeshRequest # @!attribute [rw] name # @return [::String] # Required. A name of the Mesh to delete. Must be in the format - # `projects/*/locations/global/meshes/*`. + # `projects/*/locations/*/meshes/*`. class DeleteMeshRequest include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods diff --git a/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/tcp_route.rb b/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/tcp_route.rb index 93e7b5209820..2b36aec1d8ab 100644 --- a/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/tcp_route.rb +++ b/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/tcp_route.rb @@ -26,7 +26,7 @@ module V1 # @!attribute [rw] name # @return [::String] # Identifier. Name of the TcpRoute resource. It matches pattern - # `projects/*/locations/global/tcpRoutes/tcp_route_name>`. + # `projects/*/locations/*/tcpRoutes/tcp_route_name>`. # @!attribute [r] self_link # @return [::String] # Output only. Server-defined URL of this resource @@ -51,7 +51,7 @@ module V1 # one of the routing rules to route the requests served by the mesh. # # Each mesh reference should match the pattern: - # `projects/*/locations/global/meshes/` + # `projects/*/locations/*/meshes/` # # The attached Mesh should be of a type SIDECAR # @!attribute [rw] gateways @@ -60,7 +60,7 @@ module V1 # as one of the routing rules to route the requests served by the gateway. # # Each gateway reference should match the pattern: - # `projects/*/locations/global/gateways/` + # `projects/*/locations/*/gateways/` # @!attribute [rw] labels # @return [::Google::Protobuf::Map{::String => ::String}] # Optional. Set of label tags associated with the TcpRoute resource. @@ -167,7 +167,7 @@ class LabelsEntry # @!attribute [rw] parent # @return [::String] # Required. The project and location from which the TcpRoutes should be - # listed, specified in the format `projects/*/locations/global`. + # listed, specified in the format `projects/*/locations/*`. # @!attribute [rw] page_size # @return [::Integer] # Maximum number of TcpRoutes to return per call. @@ -210,7 +210,7 @@ class ListTcpRoutesResponse # @!attribute [rw] name # @return [::String] # Required. A name of the TcpRoute to get. Must be in the format - # `projects/*/locations/global/tcpRoutes/*`. + # `projects/*/locations/*/tcpRoutes/*`. class GetTcpRouteRequest include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -220,7 +220,7 @@ class GetTcpRouteRequest # @!attribute [rw] parent # @return [::String] # Required. The parent resource of the TcpRoute. Must be in the - # format `projects/*/locations/global`. + # format `projects/*/locations/*`. # @!attribute [rw] tcp_route_id # @return [::String] # Required. Short name of the TcpRoute resource to be created. @@ -252,7 +252,7 @@ class UpdateTcpRouteRequest # @!attribute [rw] name # @return [::String] # Required. A name of the TcpRoute to delete. Must be in the format - # `projects/*/locations/global/tcpRoutes/*`. + # `projects/*/locations/*/tcpRoutes/*`. class DeleteTcpRouteRequest include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods diff --git a/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/tls_route.rb b/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/tls_route.rb index 420c2011c430..55d108c98b24 100644 --- a/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/tls_route.rb +++ b/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/tls_route.rb @@ -26,7 +26,7 @@ module V1 # @!attribute [rw] name # @return [::String] # Identifier. Name of the TlsRoute resource. It matches pattern - # `projects/*/locations/global/tlsRoutes/tls_route_name>`. + # `projects/*/locations/*/tlsRoutes/tls_route_name>`. # @!attribute [r] self_link # @return [::String] # Output only. Server-defined URL of this resource @@ -51,7 +51,7 @@ module V1 # one of the routing rules to route the requests served by the mesh. # # Each mesh reference should match the pattern: - # `projects/*/locations/global/meshes/` + # `projects/*/locations/*/meshes/` # # The attached Mesh should be of a type SIDECAR # @!attribute [rw] gateways @@ -60,7 +60,15 @@ module V1 # as one of the routing rules to route the requests served by the gateway. # # Each gateway reference should match the pattern: - # `projects/*/locations/global/gateways/` + # `projects/*/locations/*/gateways/` + # @!attribute [rw] target_proxies + # @return [::Array<::String>] + # Optional. TargetProxies defines a list of TargetTcpProxies this TlsRoute is + # attached to, as one of the routing rules to route the requests served by + # the TargetTcpProxy. + # + # Each TargetTcpProxy reference should match the pattern: + # `projects/*/locations/*/targetTcpProxies/` # @!attribute [rw] labels # @return [::Google::Protobuf::Map{::String => ::String}] # Optional. Set of label tags associated with the TlsRoute resource. @@ -152,7 +160,7 @@ class LabelsEntry # @!attribute [rw] parent # @return [::String] # Required. The project and location from which the TlsRoutes should be - # listed, specified in the format `projects/*/locations/global`. + # listed, specified in the format `projects/*/locations/*`. # @!attribute [rw] page_size # @return [::Integer] # Maximum number of TlsRoutes to return per call. @@ -195,7 +203,7 @@ class ListTlsRoutesResponse # @!attribute [rw] name # @return [::String] # Required. A name of the TlsRoute to get. Must be in the format - # `projects/*/locations/global/tlsRoutes/*`. + # `projects/*/locations/*/tlsRoutes/*`. class GetTlsRouteRequest include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -205,7 +213,7 @@ class GetTlsRouteRequest # @!attribute [rw] parent # @return [::String] # Required. The parent resource of the TlsRoute. Must be in the - # format `projects/*/locations/global`. + # format `projects/*/locations/*`. # @!attribute [rw] tls_route_id # @return [::String] # Required. Short name of the TlsRoute resource to be created. @@ -237,7 +245,7 @@ class UpdateTlsRouteRequest # @!attribute [rw] name # @return [::String] # Required. A name of the TlsRoute to delete. Must be in the format - # `projects/*/locations/global/tlsRoutes/*`. + # `projects/*/locations/*/tlsRoutes/*`. class DeleteTlsRouteRequest include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/create_agent_gateway.rb b/google-cloud-network_services-v1/snippets/network_services/create_agent_gateway.rb similarity index 100% rename from owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/create_agent_gateway.rb rename to google-cloud-network_services-v1/snippets/network_services/create_agent_gateway.rb diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/delete_agent_gateway.rb b/google-cloud-network_services-v1/snippets/network_services/delete_agent_gateway.rb similarity index 100% rename from owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/delete_agent_gateway.rb rename to google-cloud-network_services-v1/snippets/network_services/delete_agent_gateway.rb diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/get_agent_gateway.rb b/google-cloud-network_services-v1/snippets/network_services/get_agent_gateway.rb similarity index 100% rename from owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/get_agent_gateway.rb rename to google-cloud-network_services-v1/snippets/network_services/get_agent_gateway.rb diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/list_agent_gateways.rb b/google-cloud-network_services-v1/snippets/network_services/list_agent_gateways.rb similarity index 100% rename from owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/list_agent_gateways.rb rename to google-cloud-network_services-v1/snippets/network_services/list_agent_gateways.rb diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/update_agent_gateway.rb b/google-cloud-network_services-v1/snippets/network_services/update_agent_gateway.rb similarity index 100% rename from owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/update_agent_gateway.rb rename to google-cloud-network_services-v1/snippets/network_services/update_agent_gateway.rb diff --git a/google-cloud-network_services-v1/snippets/snippet_metadata_google.cloud.networkservices.v1.json b/google-cloud-network_services-v1/snippets/snippet_metadata_google.cloud.networkservices.v1.json index 767394ad683f..c67bac3d9427 100644 --- a/google-cloud-network_services-v1/snippets/snippet_metadata_google.cloud.networkservices.v1.json +++ b/google-cloud-network_services-v1/snippets/snippet_metadata_google.cloud.networkservices.v1.json @@ -3130,6 +3130,206 @@ "type": "FULL" } ] + }, + { + "region_tag": "networkservices_v1_generated_NetworkServices_ListAgentGateways_sync", + "title": "Snippet for the list_agent_gateways call in the NetworkServices service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#list_agent_gateways.", + "file": "network_services/list_agent_gateways.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_agent_gateways", + "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#list_agent_gateways", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::NetworkServices::V1::ListAgentGatewaysRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::NetworkServices::V1::ListAgentGatewaysResponse", + "client": { + "short_name": "NetworkServices::Client", + "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" + }, + "method": { + "short_name": "ListAgentGateways", + "full_name": "google.cloud.networkservices.v1.NetworkServices.ListAgentGateways", + "service": { + "short_name": "NetworkServices", + "full_name": "google.cloud.networkservices.v1.NetworkServices" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "networkservices_v1_generated_NetworkServices_GetAgentGateway_sync", + "title": "Snippet for the get_agent_gateway call in the NetworkServices service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#get_agent_gateway.", + "file": "network_services/get_agent_gateway.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_agent_gateway", + "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#get_agent_gateway", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::NetworkServices::V1::GetAgentGatewayRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::NetworkServices::V1::AgentGateway", + "client": { + "short_name": "NetworkServices::Client", + "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" + }, + "method": { + "short_name": "GetAgentGateway", + "full_name": "google.cloud.networkservices.v1.NetworkServices.GetAgentGateway", + "service": { + "short_name": "NetworkServices", + "full_name": "google.cloud.networkservices.v1.NetworkServices" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "networkservices_v1_generated_NetworkServices_CreateAgentGateway_sync", + "title": "Snippet for the create_agent_gateway call in the NetworkServices service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#create_agent_gateway.", + "file": "network_services/create_agent_gateway.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_agent_gateway", + "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#create_agent_gateway", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::NetworkServices::V1::CreateAgentGatewayRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "NetworkServices::Client", + "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" + }, + "method": { + "short_name": "CreateAgentGateway", + "full_name": "google.cloud.networkservices.v1.NetworkServices.CreateAgentGateway", + "service": { + "short_name": "NetworkServices", + "full_name": "google.cloud.networkservices.v1.NetworkServices" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "networkservices_v1_generated_NetworkServices_UpdateAgentGateway_sync", + "title": "Snippet for the update_agent_gateway call in the NetworkServices service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#update_agent_gateway.", + "file": "network_services/update_agent_gateway.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_agent_gateway", + "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#update_agent_gateway", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::NetworkServices::V1::UpdateAgentGatewayRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "NetworkServices::Client", + "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" + }, + "method": { + "short_name": "UpdateAgentGateway", + "full_name": "google.cloud.networkservices.v1.NetworkServices.UpdateAgentGateway", + "service": { + "short_name": "NetworkServices", + "full_name": "google.cloud.networkservices.v1.NetworkServices" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "networkservices_v1_generated_NetworkServices_DeleteAgentGateway_sync", + "title": "Snippet for the delete_agent_gateway call in the NetworkServices service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#delete_agent_gateway.", + "file": "network_services/delete_agent_gateway.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_agent_gateway", + "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#delete_agent_gateway", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::NetworkServices::V1::DeleteAgentGatewayRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "NetworkServices::Client", + "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" + }, + "method": { + "short_name": "DeleteAgentGateway", + "full_name": "google.cloud.networkservices.v1.NetworkServices.DeleteAgentGateway", + "service": { + "short_name": "NetworkServices", + "full_name": "google.cloud.networkservices.v1.NetworkServices" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] } ] } \ No newline at end of file diff --git a/google-cloud-network_services-v1/test/google/cloud/network_services/v1/network_services_paths_test.rb b/google-cloud-network_services-v1/test/google/cloud/network_services/v1/network_services_paths_test.rb index c0746ffe810e..8a18dd9d209e 100644 --- a/google-cloud-network_services-v1/test/google/cloud/network_services/v1/network_services_paths_test.rb +++ b/google-cloud-network_services-v1/test/google/cloud/network_services/v1/network_services_paths_test.rb @@ -53,6 +53,18 @@ def test_address_path end end + def test_agent_gateway_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.agent_gateway_path project: "value0", location: "value1", agent_gateway: "value2" + assert_equal "projects/value0/locations/value1/agentGateways/value2", path + end + end + def test_authorization_policy_path grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure ::Gapic::ServiceStub.stub :new, DummyStub.new do @@ -281,6 +293,18 @@ def test_subnetwork_path end end + def test_target_tcp_proxy_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.target_tcp_proxy_path project: "value0", location: "value1", target_tcp_proxy: "value2" + assert_equal "projects/value0/locations/value1/targetTcpProxies/value2", path + end + end + def test_tcp_route_path grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure ::Gapic::ServiceStub.stub :new, DummyStub.new do diff --git a/google-cloud-network_services-v1/test/google/cloud/network_services/v1/network_services_rest_test.rb b/google-cloud-network_services-v1/test/google/cloud/network_services/v1/network_services_rest_test.rb index a25f12826070..ed4a930d672c 100644 --- a/google-cloud-network_services-v1/test/google/cloud/network_services/v1/network_services_rest_test.rb +++ b/google-cloud-network_services-v1/test/google/cloud/network_services/v1/network_services_rest_test.rb @@ -1413,6 +1413,7 @@ def test_list_http_routes page_size = 42 page_token = "hello world" return_partial_success = true + filter = "hello world" list_http_routes_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| assert options.metadata.key? :"x-goog-api-client" @@ -1428,27 +1429,27 @@ def test_list_http_routes end # Use hash object - c.list_http_routes({ parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }) do |_result, response| + c.list_http_routes({ parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success, filter: filter }) do |_result, response| assert_equal http_response, response.underlying_op end # Use named arguments - c.list_http_routes parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success do |_result, response| + c.list_http_routes parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success, filter: filter do |_result, response| assert_equal http_response, response.underlying_op end # Use protobuf object - c.list_http_routes ::Google::Cloud::NetworkServices::V1::ListHttpRoutesRequest.new(parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success) do |_result, response| + c.list_http_routes ::Google::Cloud::NetworkServices::V1::ListHttpRoutesRequest.new(parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success, filter: filter) do |_result, response| assert_equal http_response, response.underlying_op end # Use hash object with options - c.list_http_routes({ parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }, call_options) do |_result, response| + c.list_http_routes({ parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success, filter: filter }, call_options) do |_result, response| assert_equal http_response, response.underlying_op end # Use protobuf object with options - c.list_http_routes(::Google::Cloud::NetworkServices::V1::ListHttpRoutesRequest.new(parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success), call_options) do |_result, response| + c.list_http_routes(::Google::Cloud::NetworkServices::V1::ListHttpRoutesRequest.new(parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success, filter: filter), call_options) do |_result, response| assert_equal http_response, response.underlying_op end @@ -1523,6 +1524,7 @@ def test_create_http_route parent = "hello world" http_route_id = "hello world" http_route = {} + request_id = "hello world" create_http_route_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| assert options.metadata.key? :"x-goog-api-client" @@ -1538,27 +1540,27 @@ def test_create_http_route end # Use hash object - c.create_http_route({ parent: parent, http_route_id: http_route_id, http_route: http_route }) do |_result, response| + c.create_http_route({ parent: parent, http_route_id: http_route_id, http_route: http_route, request_id: request_id }) do |_result, response| assert_equal http_response, response.underlying_op end # Use named arguments - c.create_http_route parent: parent, http_route_id: http_route_id, http_route: http_route do |_result, response| + c.create_http_route parent: parent, http_route_id: http_route_id, http_route: http_route, request_id: request_id do |_result, response| assert_equal http_response, response.underlying_op end # Use protobuf object - c.create_http_route ::Google::Cloud::NetworkServices::V1::CreateHttpRouteRequest.new(parent: parent, http_route_id: http_route_id, http_route: http_route) do |_result, response| + c.create_http_route ::Google::Cloud::NetworkServices::V1::CreateHttpRouteRequest.new(parent: parent, http_route_id: http_route_id, http_route: http_route, request_id: request_id) do |_result, response| assert_equal http_response, response.underlying_op end # Use hash object with options - c.create_http_route({ parent: parent, http_route_id: http_route_id, http_route: http_route }, call_options) do |_result, response| + c.create_http_route({ parent: parent, http_route_id: http_route_id, http_route: http_route, request_id: request_id }, call_options) do |_result, response| assert_equal http_response, response.underlying_op end # Use protobuf object with options - c.create_http_route(::Google::Cloud::NetworkServices::V1::CreateHttpRouteRequest.new(parent: parent, http_route_id: http_route_id, http_route: http_route), call_options) do |_result, response| + c.create_http_route(::Google::Cloud::NetworkServices::V1::CreateHttpRouteRequest.new(parent: parent, http_route_id: http_route_id, http_route: http_route, request_id: request_id), call_options) do |_result, response| assert_equal http_response, response.underlying_op end @@ -3275,6 +3277,283 @@ def test_list_mesh_route_views end end + def test_list_agent_gateways + # Create test objects. + client_result = ::Google::Cloud::NetworkServices::V1::ListAgentGatewaysResponse.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" + return_partial_success = true + + list_agent_gateways_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_list_agent_gateways_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_agent_gateways_client_stub do + # Create client + c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_agent_gateways({ parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.list_agent_gateways parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.list_agent_gateways ::Google::Cloud::NetworkServices::V1::ListAgentGatewaysRequest.new(parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.list_agent_gateways({ parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.list_agent_gateways(::Google::Cloud::NetworkServices::V1::ListAgentGatewaysRequest.new(parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_agent_gateways_client_stub.call_count + end + end + end + + def test_get_agent_gateway + # Create test objects. + client_result = ::Google::Cloud::NetworkServices::V1::AgentGateway.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_agent_gateway_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_get_agent_gateway_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_agent_gateway_client_stub do + # Create client + c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_agent_gateway({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_agent_gateway name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_agent_gateway ::Google::Cloud::NetworkServices::V1::GetAgentGatewayRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_agent_gateway({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_agent_gateway(::Google::Cloud::NetworkServices::V1::GetAgentGatewayRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_agent_gateway_client_stub.call_count + end + end + end + + def test_create_agent_gateway + # 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" + agent_gateway_id = "hello world" + agent_gateway = {} + + create_agent_gateway_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_create_agent_gateway_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_agent_gateway_client_stub do + # Create client + c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.create_agent_gateway({ parent: parent, agent_gateway_id: agent_gateway_id, agent_gateway: agent_gateway }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.create_agent_gateway parent: parent, agent_gateway_id: agent_gateway_id, agent_gateway: agent_gateway do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.create_agent_gateway ::Google::Cloud::NetworkServices::V1::CreateAgentGatewayRequest.new(parent: parent, agent_gateway_id: agent_gateway_id, agent_gateway: agent_gateway) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.create_agent_gateway({ parent: parent, agent_gateway_id: agent_gateway_id, agent_gateway: agent_gateway }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.create_agent_gateway(::Google::Cloud::NetworkServices::V1::CreateAgentGatewayRequest.new(parent: parent, agent_gateway_id: agent_gateway_id, agent_gateway: agent_gateway), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_agent_gateway_client_stub.call_count + end + end + end + + def test_update_agent_gateway + # 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 = {} + agent_gateway = {} + + update_agent_gateway_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_update_agent_gateway_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_agent_gateway_client_stub do + # Create client + c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.update_agent_gateway({ update_mask: update_mask, agent_gateway: agent_gateway }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.update_agent_gateway update_mask: update_mask, agent_gateway: agent_gateway do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.update_agent_gateway ::Google::Cloud::NetworkServices::V1::UpdateAgentGatewayRequest.new(update_mask: update_mask, agent_gateway: agent_gateway) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.update_agent_gateway({ update_mask: update_mask, agent_gateway: agent_gateway }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.update_agent_gateway(::Google::Cloud::NetworkServices::V1::UpdateAgentGatewayRequest.new(update_mask: update_mask, agent_gateway: agent_gateway), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_agent_gateway_client_stub.call_count + end + end + end + + def test_delete_agent_gateway + # 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" + etag = "hello world" + + delete_agent_gateway_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_delete_agent_gateway_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_agent_gateway_client_stub do + # Create client + c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.delete_agent_gateway({ name: name, etag: etag }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.delete_agent_gateway name: name, etag: etag do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.delete_agent_gateway ::Google::Cloud::NetworkServices::V1::DeleteAgentGatewayRequest.new(name: name, etag: etag) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.delete_agent_gateway({ name: name, etag: etag }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.delete_agent_gateway(::Google::Cloud::NetworkServices::V1::DeleteAgentGatewayRequest.new(name: name, etag: etag), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_agent_gateway_client_stub.call_count + end + end + end + def test_configure credentials_token = :dummy_value diff --git a/google-cloud-network_services-v1/test/google/cloud/network_services/v1/network_services_test.rb b/google-cloud-network_services-v1/test/google/cloud/network_services/v1/network_services_test.rb index 148fe228280d..003eea3d2989 100644 --- a/google-cloud-network_services-v1/test/google/cloud/network_services/v1/network_services_test.rb +++ b/google-cloud-network_services-v1/test/google/cloud/network_services/v1/network_services_test.rb @@ -1616,6 +1616,7 @@ def test_list_http_routes page_size = 42 page_token = "hello world" return_partial_success = true + filter = "hello world" list_http_routes_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| assert_equal :list_http_routes, name @@ -1624,6 +1625,7 @@ def test_list_http_routes assert_equal 42, request["page_size"] assert_equal "hello world", request["page_token"] assert_equal true, request["return_partial_success"] + assert_equal "hello world", request["filter"] refute_nil options end @@ -1634,35 +1636,35 @@ def test_list_http_routes end # Use hash object - c.list_http_routes({ parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }) do |response, operation| + c.list_http_routes({ parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success, 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 - c.list_http_routes parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success do |response, operation| + c.list_http_routes parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success, 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 - c.list_http_routes ::Google::Cloud::NetworkServices::V1::ListHttpRoutesRequest.new(parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success) do |response, operation| + c.list_http_routes ::Google::Cloud::NetworkServices::V1::ListHttpRoutesRequest.new(parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success, 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 - c.list_http_routes({ parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }, grpc_options) do |response, operation| + c.list_http_routes({ parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success, 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 - c.list_http_routes(::Google::Cloud::NetworkServices::V1::ListHttpRoutesRequest.new(parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success), grpc_options) do |response, operation| + c.list_http_routes(::Google::Cloud::NetworkServices::V1::ListHttpRoutesRequest.new(parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success, filter: filter), grpc_options) do |response, operation| assert_kind_of Gapic::PagedEnumerable, response assert_equal grpc_response, response.response assert_equal grpc_operation, operation @@ -1742,6 +1744,7 @@ def test_create_http_route parent = "hello world" http_route_id = "hello world" http_route = {} + request_id = "hello world" create_http_route_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| assert_equal :create_http_route, name @@ -1749,6 +1752,7 @@ def test_create_http_route assert_equal "hello world", request["parent"] assert_equal "hello world", request["http_route_id"] assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::NetworkServices::V1::HttpRoute), request["http_route"] + assert_equal "hello world", request["request_id"] refute_nil options end @@ -1759,35 +1763,35 @@ def test_create_http_route end # Use hash object - c.create_http_route({ parent: parent, http_route_id: http_route_id, http_route: http_route }) do |response, operation| + c.create_http_route({ parent: parent, http_route_id: http_route_id, http_route: http_route, request_id: request_id }) 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 - c.create_http_route parent: parent, http_route_id: http_route_id, http_route: http_route do |response, operation| + c.create_http_route parent: parent, http_route_id: http_route_id, http_route: http_route, request_id: request_id 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 - c.create_http_route ::Google::Cloud::NetworkServices::V1::CreateHttpRouteRequest.new(parent: parent, http_route_id: http_route_id, http_route: http_route) do |response, operation| + c.create_http_route ::Google::Cloud::NetworkServices::V1::CreateHttpRouteRequest.new(parent: parent, http_route_id: http_route_id, http_route: http_route, request_id: request_id) 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 - c.create_http_route({ parent: parent, http_route_id: http_route_id, http_route: http_route }, grpc_options) do |response, operation| + c.create_http_route({ parent: parent, http_route_id: http_route_id, http_route: http_route, request_id: request_id }, 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 - c.create_http_route(::Google::Cloud::NetworkServices::V1::CreateHttpRouteRequest.new(parent: parent, http_route_id: http_route_id, http_route: http_route), grpc_options) do |response, operation| + c.create_http_route(::Google::Cloud::NetworkServices::V1::CreateHttpRouteRequest.new(parent: parent, http_route_id: http_route_id, http_route: http_route, request_id: request_id), grpc_options) do |response, operation| assert_kind_of Gapic::Operation, response assert_equal grpc_response, response.grpc_op assert_equal grpc_operation, operation @@ -3782,6 +3786,330 @@ def test_list_mesh_route_views end end + def test_list_agent_gateways + # Create GRPC objects. + grpc_response = ::Google::Cloud::NetworkServices::V1::ListAgentGatewaysResponse.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" + return_partial_success = true + + list_agent_gateways_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_agent_gateways, name + assert_kind_of ::Google::Cloud::NetworkServices::V1::ListAgentGatewaysRequest, request + assert_equal "hello world", request["parent"] + 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_agent_gateways_client_stub do + # Create client + c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_agent_gateways({ parent: parent, 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 + c.list_agent_gateways parent: parent, 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 + c.list_agent_gateways ::Google::Cloud::NetworkServices::V1::ListAgentGatewaysRequest.new(parent: parent, 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 + c.list_agent_gateways({ parent: parent, 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 + c.list_agent_gateways(::Google::Cloud::NetworkServices::V1::ListAgentGatewaysRequest.new(parent: parent, 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_agent_gateways_client_stub.call_rpc_count + end + end + + def test_get_agent_gateway + # Create GRPC objects. + grpc_response = ::Google::Cloud::NetworkServices::V1::AgentGateway.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_agent_gateway_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_agent_gateway, name + assert_kind_of ::Google::Cloud::NetworkServices::V1::GetAgentGatewayRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_agent_gateway_client_stub do + # Create client + c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_agent_gateway({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_agent_gateway name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_agent_gateway ::Google::Cloud::NetworkServices::V1::GetAgentGatewayRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_agent_gateway({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_agent_gateway(::Google::Cloud::NetworkServices::V1::GetAgentGatewayRequest.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_agent_gateway_client_stub.call_rpc_count + end + end + + def test_create_agent_gateway + # 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" + agent_gateway_id = "hello world" + agent_gateway = {} + + create_agent_gateway_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_agent_gateway, name + assert_kind_of ::Google::Cloud::NetworkServices::V1::CreateAgentGatewayRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["agent_gateway_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::NetworkServices::V1::AgentGateway), request["agent_gateway"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_agent_gateway_client_stub do + # Create client + c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.create_agent_gateway({ parent: parent, agent_gateway_id: agent_gateway_id, agent_gateway: agent_gateway }) 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 + c.create_agent_gateway parent: parent, agent_gateway_id: agent_gateway_id, agent_gateway: agent_gateway 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 + c.create_agent_gateway ::Google::Cloud::NetworkServices::V1::CreateAgentGatewayRequest.new(parent: parent, agent_gateway_id: agent_gateway_id, agent_gateway: agent_gateway) 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 + c.create_agent_gateway({ parent: parent, agent_gateway_id: agent_gateway_id, agent_gateway: agent_gateway }, 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 + c.create_agent_gateway(::Google::Cloud::NetworkServices::V1::CreateAgentGatewayRequest.new(parent: parent, agent_gateway_id: agent_gateway_id, agent_gateway: agent_gateway), 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_agent_gateway_client_stub.call_rpc_count + end + end + + def test_update_agent_gateway + # 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 = {} + agent_gateway = {} + + update_agent_gateway_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_agent_gateway, name + assert_kind_of ::Google::Cloud::NetworkServices::V1::UpdateAgentGatewayRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::NetworkServices::V1::AgentGateway), request["agent_gateway"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_agent_gateway_client_stub do + # Create client + c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.update_agent_gateway({ update_mask: update_mask, agent_gateway: agent_gateway }) 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 + c.update_agent_gateway update_mask: update_mask, agent_gateway: agent_gateway 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 + c.update_agent_gateway ::Google::Cloud::NetworkServices::V1::UpdateAgentGatewayRequest.new(update_mask: update_mask, agent_gateway: agent_gateway) 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 + c.update_agent_gateway({ update_mask: update_mask, agent_gateway: agent_gateway }, 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 + c.update_agent_gateway(::Google::Cloud::NetworkServices::V1::UpdateAgentGatewayRequest.new(update_mask: update_mask, agent_gateway: agent_gateway), 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_agent_gateway_client_stub.call_rpc_count + end + end + + def test_delete_agent_gateway + # 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" + etag = "hello world" + + delete_agent_gateway_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_agent_gateway, name + assert_kind_of ::Google::Cloud::NetworkServices::V1::DeleteAgentGatewayRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["etag"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_agent_gateway_client_stub do + # Create client + c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.delete_agent_gateway({ name: name, etag: etag }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + c.delete_agent_gateway name: name, etag: etag do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.delete_agent_gateway ::Google::Cloud::NetworkServices::V1::DeleteAgentGatewayRequest.new(name: name, etag: etag) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.delete_agent_gateway({ name: name, etag: etag }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.delete_agent_gateway(::Google::Cloud::NetworkServices::V1::DeleteAgentGatewayRequest.new(name: name, etag: etag), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_agent_gateway_client_stub.call_rpc_count + end + end + def test_configure grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure diff --git a/owl-bot-staging/google-cloud-network_services-v1/.gitignore b/owl-bot-staging/google-cloud-network_services-v1/.gitignore deleted file mode 100644 index 0135b6bc6cfc..000000000000 --- a/owl-bot-staging/google-cloud-network_services-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_services-v1/.repo-metadata.json b/owl-bot-staging/google-cloud-network_services-v1/.repo-metadata.json deleted file mode 100644 index 22508f7ad38b..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/.repo-metadata.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "api_id": "networkservices.googleapis.com", - "api_shortname": "networkservices", - "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-network_services-v1/latest", - "distribution_name": "google-cloud-network_services-v1", - "is_cloud": true, - "language": "ruby", - "name": "networkservices", - "name_pretty": "Network Services V1 API", - "product_documentation": "https://cloud.google.com/products/networking", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "google-cloud-network_services-v1 is the official client library for the Network Services V1 API. Note that google-cloud-network_services-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-network_services instead. See the readme for more details.", - "ruby-cloud-product-url": "https://cloud.google.com/products/networking", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-cloud-network_services-v1/.rubocop.yml b/owl-bot-staging/google-cloud-network_services-v1/.rubocop.yml deleted file mode 100644 index 7cf0c71c9775..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-cloud-network_services-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_services-v1.rb" diff --git a/owl-bot-staging/google-cloud-network_services-v1/.toys.rb b/owl-bot-staging/google-cloud-network_services-v1/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-cloud-network_services-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_services-v1/.yardopts b/owl-bot-staging/google-cloud-network_services-v1/.yardopts deleted file mode 100644 index 386b136a01eb..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/.yardopts +++ /dev/null @@ -1,12 +0,0 @@ ---no-private ---title="Network Services 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_services-v1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-network_services-v1/AUTHENTICATION.md deleted file mode 100644 index 9d309720ea10..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-cloud-network_services-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_services-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_services/v1" - -client = ::Google::Cloud::NetworkServices::V1::DepService::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_services/v1" - -::Google::Cloud::NetworkServices::V1::DepService::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Cloud::NetworkServices::V1::DepService::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_services-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_services/v1" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Cloud::NetworkServices::V1::DepService::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_services-v1/CHANGELOG.md b/owl-bot-staging/google-cloud-network_services-v1/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-cloud-network_services-v1/Gemfile b/owl-bot-staging/google-cloud-network_services-v1/Gemfile deleted file mode 100644 index 1d08558908d8..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/Gemfile +++ /dev/null @@ -1,14 +0,0 @@ -source "https://rubygems.org" - -gemspec - -gem "google-style", "~> 1.32.0" -gem "irb", "~> 1.17" -gem "minitest", "~> 6.0.2" -gem "minitest-focus", "~> 1.4" -gem "minitest-mock", "~> 5.27" -gem "minitest-rg", "~> 5.3" -gem "ostruct", "~> 0.5.5" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-network_services-v1/LICENSE.md b/owl-bot-staging/google-cloud-network_services-v1/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-cloud-network_services-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_services-v1/README.md b/owl-bot-staging/google-cloud-network_services-v1/README.md deleted file mode 100644 index 2c9d05e41146..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/README.md +++ /dev/null @@ -1,154 +0,0 @@ -# Ruby Client for the Network Services V1 API - -API Client library for the Network Services V1 API - -google-cloud-network_services-v1 is the official client library for the Network Services V1 API. - -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 Services V1 API. Most users should consider using -the main client gem, -[google-cloud-network_services](https://rubygems.org/gems/google-cloud-network_services). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-cloud-network_services-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/networkservices.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -## Quick Start - -```ruby -require "google/cloud/network_services/v1" - -client = ::Google::Cloud::NetworkServices::V1::DepService::Client.new -request = ::Google::Cloud::NetworkServices::V1::ListLbTrafficExtensionsRequest.new # (request fields as keyword arguments...) -response = client.list_lb_traffic_extensions request -``` - -View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-network_services-v1/latest) -for class and method documentation. - -See also the [Product Documentation](https://cloud.google.com/products/networking) -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_services/v1" -require "logger" - -client = ::Google::Cloud::NetworkServices::V1::DepService::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.2+. - -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_services`, -and lower-level _versioned_ client libraries with names such as -`google-cloud-network_services-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_services`. -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_services-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_services-v1/Rakefile b/owl-bot-staging/google-cloud-network_services-v1/Rakefile deleted file mode 100644 index 40c3ff775533..000000000000 --- a/owl-bot-staging/google-cloud-network_services-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_services-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_services/v1/dep_service/credentials" - ::Google::Cloud::NetworkServices::V1::DepService::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_services-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_services-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_services-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_services-v1 gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-cloud-network_services-v1" - header "google-cloud-network_services-v1 rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-cloud-network_services-v1 yard", "*" - Rake::Task[:yard].invoke - header "google-cloud-network_services-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_services-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_services-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_services-v1/gapic_metadata.json b/owl-bot-staging/google-cloud-network_services-v1/gapic_metadata.json deleted file mode 100644 index b9bc5946fba2..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/gapic_metadata.json +++ /dev/null @@ -1,442 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "ruby", - "protoPackage": "google.cloud.networkservices.v1", - "libraryPackage": "::Google::Cloud::NetworkServices::V1", - "services": { - "DepService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::NetworkServices::V1::DepService::Client", - "rpcs": { - "ListLbTrafficExtensions": { - "methods": [ - "list_lb_traffic_extensions" - ] - }, - "GetLbTrafficExtension": { - "methods": [ - "get_lb_traffic_extension" - ] - }, - "CreateLbTrafficExtension": { - "methods": [ - "create_lb_traffic_extension" - ] - }, - "UpdateLbTrafficExtension": { - "methods": [ - "update_lb_traffic_extension" - ] - }, - "DeleteLbTrafficExtension": { - "methods": [ - "delete_lb_traffic_extension" - ] - }, - "ListLbRouteExtensions": { - "methods": [ - "list_lb_route_extensions" - ] - }, - "GetLbRouteExtension": { - "methods": [ - "get_lb_route_extension" - ] - }, - "CreateLbRouteExtension": { - "methods": [ - "create_lb_route_extension" - ] - }, - "UpdateLbRouteExtension": { - "methods": [ - "update_lb_route_extension" - ] - }, - "DeleteLbRouteExtension": { - "methods": [ - "delete_lb_route_extension" - ] - }, - "ListLbEdgeExtensions": { - "methods": [ - "list_lb_edge_extensions" - ] - }, - "GetLbEdgeExtension": { - "methods": [ - "get_lb_edge_extension" - ] - }, - "CreateLbEdgeExtension": { - "methods": [ - "create_lb_edge_extension" - ] - }, - "UpdateLbEdgeExtension": { - "methods": [ - "update_lb_edge_extension" - ] - }, - "DeleteLbEdgeExtension": { - "methods": [ - "delete_lb_edge_extension" - ] - }, - "ListAuthzExtensions": { - "methods": [ - "list_authz_extensions" - ] - }, - "GetAuthzExtension": { - "methods": [ - "get_authz_extension" - ] - }, - "CreateAuthzExtension": { - "methods": [ - "create_authz_extension" - ] - }, - "UpdateAuthzExtension": { - "methods": [ - "update_authz_extension" - ] - }, - "DeleteAuthzExtension": { - "methods": [ - "delete_authz_extension" - ] - } - } - } - } - }, - "NetworkServices": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client", - "rpcs": { - "ListEndpointPolicies": { - "methods": [ - "list_endpoint_policies" - ] - }, - "GetEndpointPolicy": { - "methods": [ - "get_endpoint_policy" - ] - }, - "CreateEndpointPolicy": { - "methods": [ - "create_endpoint_policy" - ] - }, - "UpdateEndpointPolicy": { - "methods": [ - "update_endpoint_policy" - ] - }, - "DeleteEndpointPolicy": { - "methods": [ - "delete_endpoint_policy" - ] - }, - "ListWasmPluginVersions": { - "methods": [ - "list_wasm_plugin_versions" - ] - }, - "GetWasmPluginVersion": { - "methods": [ - "get_wasm_plugin_version" - ] - }, - "CreateWasmPluginVersion": { - "methods": [ - "create_wasm_plugin_version" - ] - }, - "DeleteWasmPluginVersion": { - "methods": [ - "delete_wasm_plugin_version" - ] - }, - "ListWasmPlugins": { - "methods": [ - "list_wasm_plugins" - ] - }, - "GetWasmPlugin": { - "methods": [ - "get_wasm_plugin" - ] - }, - "CreateWasmPlugin": { - "methods": [ - "create_wasm_plugin" - ] - }, - "UpdateWasmPlugin": { - "methods": [ - "update_wasm_plugin" - ] - }, - "DeleteWasmPlugin": { - "methods": [ - "delete_wasm_plugin" - ] - }, - "ListGateways": { - "methods": [ - "list_gateways" - ] - }, - "GetGateway": { - "methods": [ - "get_gateway" - ] - }, - "CreateGateway": { - "methods": [ - "create_gateway" - ] - }, - "UpdateGateway": { - "methods": [ - "update_gateway" - ] - }, - "DeleteGateway": { - "methods": [ - "delete_gateway" - ] - }, - "ListGrpcRoutes": { - "methods": [ - "list_grpc_routes" - ] - }, - "GetGrpcRoute": { - "methods": [ - "get_grpc_route" - ] - }, - "CreateGrpcRoute": { - "methods": [ - "create_grpc_route" - ] - }, - "UpdateGrpcRoute": { - "methods": [ - "update_grpc_route" - ] - }, - "DeleteGrpcRoute": { - "methods": [ - "delete_grpc_route" - ] - }, - "ListHttpRoutes": { - "methods": [ - "list_http_routes" - ] - }, - "GetHttpRoute": { - "methods": [ - "get_http_route" - ] - }, - "CreateHttpRoute": { - "methods": [ - "create_http_route" - ] - }, - "UpdateHttpRoute": { - "methods": [ - "update_http_route" - ] - }, - "DeleteHttpRoute": { - "methods": [ - "delete_http_route" - ] - }, - "ListTcpRoutes": { - "methods": [ - "list_tcp_routes" - ] - }, - "GetTcpRoute": { - "methods": [ - "get_tcp_route" - ] - }, - "CreateTcpRoute": { - "methods": [ - "create_tcp_route" - ] - }, - "UpdateTcpRoute": { - "methods": [ - "update_tcp_route" - ] - }, - "DeleteTcpRoute": { - "methods": [ - "delete_tcp_route" - ] - }, - "ListTlsRoutes": { - "methods": [ - "list_tls_routes" - ] - }, - "GetTlsRoute": { - "methods": [ - "get_tls_route" - ] - }, - "CreateTlsRoute": { - "methods": [ - "create_tls_route" - ] - }, - "UpdateTlsRoute": { - "methods": [ - "update_tls_route" - ] - }, - "DeleteTlsRoute": { - "methods": [ - "delete_tls_route" - ] - }, - "ListServiceBindings": { - "methods": [ - "list_service_bindings" - ] - }, - "GetServiceBinding": { - "methods": [ - "get_service_binding" - ] - }, - "CreateServiceBinding": { - "methods": [ - "create_service_binding" - ] - }, - "UpdateServiceBinding": { - "methods": [ - "update_service_binding" - ] - }, - "DeleteServiceBinding": { - "methods": [ - "delete_service_binding" - ] - }, - "ListMeshes": { - "methods": [ - "list_meshes" - ] - }, - "GetMesh": { - "methods": [ - "get_mesh" - ] - }, - "CreateMesh": { - "methods": [ - "create_mesh" - ] - }, - "UpdateMesh": { - "methods": [ - "update_mesh" - ] - }, - "DeleteMesh": { - "methods": [ - "delete_mesh" - ] - }, - "ListServiceLbPolicies": { - "methods": [ - "list_service_lb_policies" - ] - }, - "GetServiceLbPolicy": { - "methods": [ - "get_service_lb_policy" - ] - }, - "CreateServiceLbPolicy": { - "methods": [ - "create_service_lb_policy" - ] - }, - "UpdateServiceLbPolicy": { - "methods": [ - "update_service_lb_policy" - ] - }, - "DeleteServiceLbPolicy": { - "methods": [ - "delete_service_lb_policy" - ] - }, - "GetGatewayRouteView": { - "methods": [ - "get_gateway_route_view" - ] - }, - "GetMeshRouteView": { - "methods": [ - "get_mesh_route_view" - ] - }, - "ListGatewayRouteViews": { - "methods": [ - "list_gateway_route_views" - ] - }, - "ListMeshRouteViews": { - "methods": [ - "list_mesh_route_views" - ] - }, - "ListAgentGateways": { - "methods": [ - "list_agent_gateways" - ] - }, - "GetAgentGateway": { - "methods": [ - "get_agent_gateway" - ] - }, - "CreateAgentGateway": { - "methods": [ - "create_agent_gateway" - ] - }, - "UpdateAgentGateway": { - "methods": [ - "update_agent_gateway" - ] - }, - "DeleteAgentGateway": { - "methods": [ - "delete_agent_gateway" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-network_services-v1/google-cloud-network_services-v1.gemspec b/owl-bot-staging/google-cloud-network_services-v1/google-cloud-network_services-v1.gemspec deleted file mode 100644 index 69e143b54323..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/google-cloud-network_services-v1.gemspec +++ /dev/null @@ -1,30 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/cloud/network_services/v1/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-cloud-network_services-v1" - gem.version = Google::Cloud::NetworkServices::V1::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "google-cloud-network_services-v1 is the official client library for the Network Services V1 API. Note that google-cloud-network_services-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-network_services instead. See the readme for more details." - gem.summary = "API Client library for the Network Services V1 API" - 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.2" - - gem.add_dependency "gapic-common", "~> 1.3" - 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_services-v1/lib/google-cloud-network_services-v1.rb b/owl-bot-staging/google-cloud-network_services-v1/lib/google-cloud-network_services-v1.rb deleted file mode 100644 index 3a282b9851bf..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/lib/google-cloud-network_services-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_services/v1" diff --git a/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1.rb b/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1.rb deleted file mode 100644 index b9f5c2321503..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1.rb +++ /dev/null @@ -1,46 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/network_services/v1/dep_service" -require "google/cloud/network_services/v1/network_services" -require "google/cloud/network_services/v1/version" - -module Google - module Cloud - module NetworkServices - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/cloud/network_services/v1" - # client = ::Google::Cloud::NetworkServices::V1::DepService::Client.new - # - # @example Load this package, including all its services, and instantiate a REST client - # - # require "google/cloud/network_services/v1" - # client = ::Google::Cloud::NetworkServices::V1::DepService::Rest::Client.new - # - module V1 - end - end - end -end - -helper_path = ::File.join __dir__, "v1", "_helpers.rb" -require "google/cloud/network_services/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/bindings_override.rb b/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/bindings_override.rb deleted file mode 100644 index dd83f9cbf7ab..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/bindings_override.rb +++ /dev/null @@ -1,252 +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 NetworkServices - ## - # @example Loading just the REST part of this package, including all its services, and instantiating a REST client - # - # require "google/cloud/network_services/v1/rest" - # client = ::Google::Cloud::NetworkServices::V1::DepService::Rest::Client.new - # - module V1 - ## - # @private - # Initialize the mixin bindings configuration - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "NetworkServices"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - - default_config = ::Gapic::Rest::HttpBindingOverrideConfiguration.new parent_config - default_config.bindings_override["google.cloud.location.Locations.GetLocation"] = [ - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ], - body: nil - ) - ] - default_config.bindings_override["google.cloud.location.Locations.ListLocations"] = [ - - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :get, - uri_template: "/v1/{name}/locations", - matches: [ - ["name", %r{^projects/[^/]+/?$}, false] - ], - body: nil - ) - ] - default_config.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/[^/]+/edgeCacheKeysets/[^/]+/?$}, false] - ], - body: nil - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :get, - uri_template: "/v1/{resource}:getIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/edgeCacheOrigins/[^/]+/?$}, false] - ], - body: nil - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :get, - uri_template: "/v1/{resource}:getIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/edgeCacheServices/[^/]+/?$}, false] - ], - body: nil - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :get, - uri_template: "/v1/{resource}:getIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/endpointPolicies/[^/]+/?$}, false] - ], - body: nil - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :get, - uri_template: "/v1/{resource}:getIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/serviceBindings/[^/]+/?$}, false] - ], - body: nil - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :get, - uri_template: "/v1/{resource}:getIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/meshes/[^/]+/?$}, false] - ], - body: nil - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :get, - uri_template: "/v1/{resource}:getIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/gateways/[^/]+/?$}, 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/[^/]+/edgeCacheKeysets/[^/]+/?$}, false] - ], - body: "*" - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:setIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/edgeCacheOrigins/[^/]+/?$}, false] - ], - body: "*" - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:setIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/edgeCacheServices/[^/]+/?$}, false] - ], - body: "*" - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:setIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/endpointPolicies/[^/]+/?$}, false] - ], - body: "*" - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:setIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/serviceBindings/[^/]+/?$}, false] - ], - body: "*" - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:setIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/meshes/[^/]+/?$}, false] - ], - body: "*" - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:setIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/gateways/[^/]+/?$}, 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/[^/]+/edgeCacheKeysets/[^/]+/?$}, false] - ], - body: "*" - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:testIamPermissions", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/edgeCacheOrigins/[^/]+/?$}, false] - ], - body: "*" - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:testIamPermissions", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/edgeCacheServices/[^/]+/?$}, false] - ], - body: "*" - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:testIamPermissions", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/endpointPolicies/[^/]+/?$}, false] - ], - body: "*" - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:testIamPermissions", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/serviceBindings/[^/]+/?$}, false] - ], - body: "*" - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:testIamPermissions", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/meshes/[^/]+/?$}, false] - ], - body: "*" - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:testIamPermissions", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/gateways/[^/]+/?$}, 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_services-v1/lib/google/cloud/network_services/v1/dep_service.rb b/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/dep_service.rb deleted file mode 100644 index 90828e3419ac..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/dep_service.rb +++ /dev/null @@ -1,56 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/network_services/v1/version" - -require "google/cloud/network_services/v1/dep_service/credentials" -require "google/cloud/network_services/v1/dep_service/paths" -require "google/cloud/network_services/v1/dep_service/operations" -require "google/cloud/network_services/v1/dep_service/client" -require "google/cloud/network_services/v1/dep_service/rest" - -module Google - module Cloud - module NetworkServices - module V1 - ## - # Service describing handlers for resources. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/network_services/v1/dep_service" - # client = ::Google::Cloud::NetworkServices::V1::DepService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/cloud/network_services/v1/dep_service/rest" - # client = ::Google::Cloud::NetworkServices::V1::DepService::Rest::Client.new - # - module DepService - end - end - end - end -end - -helper_path = ::File.join __dir__, "dep_service", "helpers.rb" -require "google/cloud/network_services/v1/dep_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/dep_service/client.rb b/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/dep_service/client.rb deleted file mode 100644 index 554ebe4a2ca0..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/dep_service/client.rb +++ /dev/null @@ -1,2670 +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/networkservices/v1/dep_pb" -require "google/cloud/location" -require "google/iam/v1" - -module Google - module Cloud - module NetworkServices - module V1 - module DepService - ## - # Client for the DepService service. - # - # Service describing handlers for resources. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "networkservices.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :dep_service_stub - - ## - # Configure the DepService Client class. - # - # See {::Google::Cloud::NetworkServices::V1::DepService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all DepService clients - # ::Google::Cloud::NetworkServices::V1::DepService::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", "NetworkServices", "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 DepService 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::NetworkServices::V1::DepService::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 - @dep_service_stub.universe_domain - end - - ## - # Create a new DepService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::NetworkServices::V1::DepService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::NetworkServices::V1::DepService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the DepService 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/networkservices/v1/dep_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 - - @dep_service_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::NetworkServices::V1::DepService::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 - ) - - @dep_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 = @dep_service_stub.endpoint - config.universe_domain = @dep_service_stub.universe_domain - config.logger = @dep_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 = @dep_service_stub.endpoint - config.universe_domain = @dep_service_stub.universe_domain - config.logger = @dep_service_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::NetworkServices::V1::DepService::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 - @dep_service_stub.logger - end - - # Service calls - - ## - # Lists `LbTrafficExtension` resources in a given project and location. - # - # @overload list_lb_traffic_extensions(request, options = nil) - # Pass arguments to `list_lb_traffic_extensions` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::ListLbTrafficExtensionsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::ListLbTrafficExtensionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_lb_traffic_extensions(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_lb_traffic_extensions` via keyword arguments. Note that at - # least one keyword argument is 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 project and location from which the `LbTrafficExtension` - # resources are listed. These values are specified in the following format: - # `projects/{project}/locations/{location}`. - # @param page_size [::Integer] - # Optional. Requested page size. The server might return fewer items than - # requested. If unspecified, the server picks an appropriate default. - # @param page_token [::String] - # Optional. A token identifying a page of results that the server returns. - # @param filter [::String] - # Optional. Filtering results. - # @param order_by [::String] - # Optional. Hint about how to order the results. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::NetworkServices::V1::LbTrafficExtension>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::NetworkServices::V1::LbTrafficExtension>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/network_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::DepService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::ListLbTrafficExtensionsRequest.new - # - # # Call the list_lb_traffic_extensions method. - # result = client.list_lb_traffic_extensions 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::NetworkServices::V1::LbTrafficExtension. - # p item - # end - # - def list_lb_traffic_extensions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::ListLbTrafficExtensionsRequest - - # Converts hash 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_lb_traffic_extensions.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::NetworkServices::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_lb_traffic_extensions.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_lb_traffic_extensions.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dep_service_stub.call_rpc :list_lb_traffic_extensions, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @dep_service_stub, :list_lb_traffic_extensions, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets details of the specified `LbTrafficExtension` resource. - # - # @overload get_lb_traffic_extension(request, options = nil) - # Pass arguments to `get_lb_traffic_extension` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::GetLbTrafficExtensionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::GetLbTrafficExtensionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_lb_traffic_extension(name: nil) - # Pass arguments to `get_lb_traffic_extension` via keyword arguments. Note that at - # least one keyword argument is 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. A name of the `LbTrafficExtension` resource to get. Must be in - # the format - # `projects/{project}/locations/{location}/lbTrafficExtensions/{lb_traffic_extension}`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::NetworkServices::V1::LbTrafficExtension] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::NetworkServices::V1::LbTrafficExtension] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/network_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::DepService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::GetLbTrafficExtensionRequest.new - # - # # Call the get_lb_traffic_extension method. - # result = client.get_lb_traffic_extension request - # - # # The returned object is of type Google::Cloud::NetworkServices::V1::LbTrafficExtension. - # p result - # - def get_lb_traffic_extension request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::GetLbTrafficExtensionRequest - - # Converts hash 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_lb_traffic_extension.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::NetworkServices::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_lb_traffic_extension.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_lb_traffic_extension.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dep_service_stub.call_rpc :get_lb_traffic_extension, 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 `LbTrafficExtension` resource in a given project and - # location. - # - # @overload create_lb_traffic_extension(request, options = nil) - # Pass arguments to `create_lb_traffic_extension` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::CreateLbTrafficExtensionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::CreateLbTrafficExtensionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_lb_traffic_extension(parent: nil, lb_traffic_extension_id: nil, lb_traffic_extension: nil, request_id: nil) - # Pass arguments to `create_lb_traffic_extension` via keyword arguments. Note that at - # least one keyword argument is 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 `LbTrafficExtension` resource. Must be - # in the format `projects/{project}/locations/{location}`. - # @param lb_traffic_extension_id [::String] - # Required. User-provided ID of the `LbTrafficExtension` resource to be - # created. - # @param lb_traffic_extension [::Google::Cloud::NetworkServices::V1::LbTrafficExtension, ::Hash] - # Required. `LbTrafficExtension` resource to be created. - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server can ignore - # the request if it has already been completed. The server guarantees - # that for 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server ignores the second request This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # - # @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_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::DepService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::CreateLbTrafficExtensionRequest.new - # - # # Call the create_lb_traffic_extension method. - # result = client.create_lb_traffic_extension 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_lb_traffic_extension request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::CreateLbTrafficExtensionRequest - - # Converts hash 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_lb_traffic_extension.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::NetworkServices::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_lb_traffic_extension.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_lb_traffic_extension.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dep_service_stub.call_rpc :create_lb_traffic_extension, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the parameters of the specified `LbTrafficExtension` resource. - # - # @overload update_lb_traffic_extension(request, options = nil) - # Pass arguments to `update_lb_traffic_extension` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::UpdateLbTrafficExtensionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::UpdateLbTrafficExtensionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_lb_traffic_extension(update_mask: nil, lb_traffic_extension: nil, request_id: nil) - # Pass arguments to `update_lb_traffic_extension` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. Used to specify the fields to be overwritten in the - # `LbTrafficExtension` resource by the update. - # The fields specified in the `update_mask` are relative to the resource, not - # the full request. A field is overwritten if it is in the mask. If the - # user does not specify a mask, then all fields are overwritten. - # @param lb_traffic_extension [::Google::Cloud::NetworkServices::V1::LbTrafficExtension, ::Hash] - # Required. `LbTrafficExtension` resource being updated. - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server can ignore - # the request if it has already been completed. The server guarantees - # that for 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server ignores the second request This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # - # @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_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::DepService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::UpdateLbTrafficExtensionRequest.new - # - # # Call the update_lb_traffic_extension method. - # result = client.update_lb_traffic_extension 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_lb_traffic_extension request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::UpdateLbTrafficExtensionRequest - - # Converts hash 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_lb_traffic_extension.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::NetworkServices::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.lb_traffic_extension&.name - header_params["lb_traffic_extension.name"] = request.lb_traffic_extension.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_lb_traffic_extension.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_lb_traffic_extension.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dep_service_stub.call_rpc :update_lb_traffic_extension, 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 the specified `LbTrafficExtension` resource. - # - # @overload delete_lb_traffic_extension(request, options = nil) - # Pass arguments to `delete_lb_traffic_extension` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::DeleteLbTrafficExtensionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::DeleteLbTrafficExtensionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_lb_traffic_extension(name: nil, request_id: nil) - # Pass arguments to `delete_lb_traffic_extension` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the `LbTrafficExtension` resource to delete. Must be - # in the format - # `projects/{project}/locations/{location}/lbTrafficExtensions/{lb_traffic_extension}`. - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server can ignore - # the request if it has already been completed. The server guarantees - # that for 60 minutes after the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server ignores the second request This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # - # @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_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::DepService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::DeleteLbTrafficExtensionRequest.new - # - # # Call the delete_lb_traffic_extension method. - # result = client.delete_lb_traffic_extension 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_lb_traffic_extension request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::DeleteLbTrafficExtensionRequest - - # Converts hash 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_lb_traffic_extension.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::NetworkServices::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_lb_traffic_extension.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_lb_traffic_extension.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dep_service_stub.call_rpc :delete_lb_traffic_extension, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists `LbRouteExtension` resources in a given project and location. - # - # @overload list_lb_route_extensions(request, options = nil) - # Pass arguments to `list_lb_route_extensions` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::ListLbRouteExtensionsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::ListLbRouteExtensionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_lb_route_extensions(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_lb_route_extensions` via keyword arguments. Note that at - # least one keyword argument is 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 project and location from which the `LbRouteExtension` - # resources are listed. These values are specified in the following format: - # `projects/{project}/locations/{location}`. - # @param page_size [::Integer] - # Optional. Requested page size. The server might return fewer items than - # requested. If unspecified, the server picks an appropriate default. - # @param page_token [::String] - # Optional. A token identifying a page of results that the server returns. - # @param filter [::String] - # Optional. Filtering results. - # @param order_by [::String] - # Optional. Hint about how to order the results. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::NetworkServices::V1::LbRouteExtension>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::NetworkServices::V1::LbRouteExtension>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/network_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::DepService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::ListLbRouteExtensionsRequest.new - # - # # Call the list_lb_route_extensions method. - # result = client.list_lb_route_extensions 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::NetworkServices::V1::LbRouteExtension. - # p item - # end - # - def list_lb_route_extensions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::ListLbRouteExtensionsRequest - - # Converts hash 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_lb_route_extensions.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::NetworkServices::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_lb_route_extensions.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_lb_route_extensions.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dep_service_stub.call_rpc :list_lb_route_extensions, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @dep_service_stub, :list_lb_route_extensions, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets details of the specified `LbRouteExtension` resource. - # - # @overload get_lb_route_extension(request, options = nil) - # Pass arguments to `get_lb_route_extension` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::GetLbRouteExtensionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::GetLbRouteExtensionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_lb_route_extension(name: nil) - # Pass arguments to `get_lb_route_extension` via keyword arguments. Note that at - # least one keyword argument is 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. A name of the `LbRouteExtension` resource to get. Must be in the - # format - # `projects/{project}/locations/{location}/lbRouteExtensions/{lb_route_extension}`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::NetworkServices::V1::LbRouteExtension] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::NetworkServices::V1::LbRouteExtension] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/network_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::DepService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::GetLbRouteExtensionRequest.new - # - # # Call the get_lb_route_extension method. - # result = client.get_lb_route_extension request - # - # # The returned object is of type Google::Cloud::NetworkServices::V1::LbRouteExtension. - # p result - # - def get_lb_route_extension request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::GetLbRouteExtensionRequest - - # Converts hash 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_lb_route_extension.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::NetworkServices::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_lb_route_extension.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_lb_route_extension.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dep_service_stub.call_rpc :get_lb_route_extension, 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 `LbRouteExtension` resource in a given project and location. - # - # @overload create_lb_route_extension(request, options = nil) - # Pass arguments to `create_lb_route_extension` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::CreateLbRouteExtensionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::CreateLbRouteExtensionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_lb_route_extension(parent: nil, lb_route_extension_id: nil, lb_route_extension: nil, request_id: nil) - # Pass arguments to `create_lb_route_extension` via keyword arguments. Note that at - # least one keyword argument is 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 `LbRouteExtension` resource. Must be - # in the format `projects/{project}/locations/{location}`. - # @param lb_route_extension_id [::String] - # Required. User-provided ID of the `LbRouteExtension` resource to be - # created. - # @param lb_route_extension [::Google::Cloud::NetworkServices::V1::LbRouteExtension, ::Hash] - # Required. `LbRouteExtension` resource to be created. - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server can ignore - # the request if it has already been completed. The server guarantees - # that for 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server ignores the second request This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # - # @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_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::DepService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::CreateLbRouteExtensionRequest.new - # - # # Call the create_lb_route_extension method. - # result = client.create_lb_route_extension 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_lb_route_extension request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::CreateLbRouteExtensionRequest - - # Converts hash 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_lb_route_extension.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::NetworkServices::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_lb_route_extension.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_lb_route_extension.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dep_service_stub.call_rpc :create_lb_route_extension, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the parameters of the specified `LbRouteExtension` resource. - # - # @overload update_lb_route_extension(request, options = nil) - # Pass arguments to `update_lb_route_extension` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::UpdateLbRouteExtensionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::UpdateLbRouteExtensionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_lb_route_extension(update_mask: nil, lb_route_extension: nil, request_id: nil) - # Pass arguments to `update_lb_route_extension` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. Used to specify the fields to be overwritten in the - # `LbRouteExtension` resource by the update. - # The fields specified in the `update_mask` are relative to the resource, not - # the full request. A field is overwritten if it is in the mask. If the - # user does not specify a mask, then all fields are overwritten. - # @param lb_route_extension [::Google::Cloud::NetworkServices::V1::LbRouteExtension, ::Hash] - # Required. `LbRouteExtension` resource being updated. - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server can ignore - # the request if it has already been completed. The server guarantees - # that for 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server ignores the second request This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # - # @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_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::DepService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::UpdateLbRouteExtensionRequest.new - # - # # Call the update_lb_route_extension method. - # result = client.update_lb_route_extension 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_lb_route_extension request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::UpdateLbRouteExtensionRequest - - # Converts hash 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_lb_route_extension.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::NetworkServices::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.lb_route_extension&.name - header_params["lb_route_extension.name"] = request.lb_route_extension.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_lb_route_extension.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_lb_route_extension.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dep_service_stub.call_rpc :update_lb_route_extension, 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 the specified `LbRouteExtension` resource. - # - # @overload delete_lb_route_extension(request, options = nil) - # Pass arguments to `delete_lb_route_extension` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::DeleteLbRouteExtensionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::DeleteLbRouteExtensionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_lb_route_extension(name: nil, request_id: nil) - # Pass arguments to `delete_lb_route_extension` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the `LbRouteExtension` resource to delete. Must be in - # the format - # `projects/{project}/locations/{location}/lbRouteExtensions/{lb_route_extension}`. - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server can ignore - # the request if it has already been completed. The server guarantees - # that for 60 minutes after the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server ignores the second request This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # - # @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_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::DepService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::DeleteLbRouteExtensionRequest.new - # - # # Call the delete_lb_route_extension method. - # result = client.delete_lb_route_extension 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_lb_route_extension request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::DeleteLbRouteExtensionRequest - - # Converts hash 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_lb_route_extension.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::NetworkServices::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_lb_route_extension.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_lb_route_extension.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dep_service_stub.call_rpc :delete_lb_route_extension, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists `LbEdgeExtension` resources in a given project and location. - # - # @overload list_lb_edge_extensions(request, options = nil) - # Pass arguments to `list_lb_edge_extensions` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::ListLbEdgeExtensionsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::ListLbEdgeExtensionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_lb_edge_extensions(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_lb_edge_extensions` via keyword arguments. Note that at - # least one keyword argument is 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 project and location from which the `LbEdgeExtension` - # resources are listed. These values are specified in the following format: - # `projects/{project}/locations/{location}`. - # @param page_size [::Integer] - # Optional. Requested page size. The server might return fewer items than - # requested. If unspecified, the server picks an appropriate default. - # @param page_token [::String] - # Optional. A token identifying a page of results that the server returns. - # @param filter [::String] - # Optional. Filtering results. - # @param order_by [::String] - # Optional. Hint about how to order the results. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::NetworkServices::V1::LbEdgeExtension>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::NetworkServices::V1::LbEdgeExtension>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/network_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::DepService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::ListLbEdgeExtensionsRequest.new - # - # # Call the list_lb_edge_extensions method. - # result = client.list_lb_edge_extensions 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::NetworkServices::V1::LbEdgeExtension. - # p item - # end - # - def list_lb_edge_extensions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::ListLbEdgeExtensionsRequest - - # Converts hash 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_lb_edge_extensions.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::NetworkServices::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_lb_edge_extensions.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_lb_edge_extensions.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dep_service_stub.call_rpc :list_lb_edge_extensions, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @dep_service_stub, :list_lb_edge_extensions, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets details of the specified `LbEdgeExtension` resource. - # - # @overload get_lb_edge_extension(request, options = nil) - # Pass arguments to `get_lb_edge_extension` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::GetLbEdgeExtensionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::GetLbEdgeExtensionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_lb_edge_extension(name: nil) - # Pass arguments to `get_lb_edge_extension` via keyword arguments. Note that at - # least one keyword argument is 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. A name of the `LbEdgeExtension` resource to get. Must be in the - # format - # `projects/{project}/locations/{location}/lbEdgeExtensions/{lb_edge_extension}`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::NetworkServices::V1::LbEdgeExtension] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::NetworkServices::V1::LbEdgeExtension] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/network_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::DepService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::GetLbEdgeExtensionRequest.new - # - # # Call the get_lb_edge_extension method. - # result = client.get_lb_edge_extension request - # - # # The returned object is of type Google::Cloud::NetworkServices::V1::LbEdgeExtension. - # p result - # - def get_lb_edge_extension request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::GetLbEdgeExtensionRequest - - # Converts hash 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_lb_edge_extension.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::NetworkServices::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_lb_edge_extension.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_lb_edge_extension.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dep_service_stub.call_rpc :get_lb_edge_extension, 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 `LbEdgeExtension` resource in a given project and location. - # - # @overload create_lb_edge_extension(request, options = nil) - # Pass arguments to `create_lb_edge_extension` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::CreateLbEdgeExtensionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::CreateLbEdgeExtensionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_lb_edge_extension(parent: nil, lb_edge_extension_id: nil, lb_edge_extension: nil, request_id: nil) - # Pass arguments to `create_lb_edge_extension` via keyword arguments. Note that at - # least one keyword argument is 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 `LbEdgeExtension` resource. Must be in - # the format `projects/{project}/locations/{location}`. - # @param lb_edge_extension_id [::String] - # Required. User-provided ID of the `LbEdgeExtension` resource to be created. - # @param lb_edge_extension [::Google::Cloud::NetworkServices::V1::LbEdgeExtension, ::Hash] - # Required. `LbEdgeExtension` resource to be created. - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server can ignore - # the request if it has already been completed. The server guarantees - # that for 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server ignores the second request This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # - # @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_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::DepService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::CreateLbEdgeExtensionRequest.new - # - # # Call the create_lb_edge_extension method. - # result = client.create_lb_edge_extension 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_lb_edge_extension request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::CreateLbEdgeExtensionRequest - - # Converts hash 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_lb_edge_extension.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::NetworkServices::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_lb_edge_extension.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_lb_edge_extension.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dep_service_stub.call_rpc :create_lb_edge_extension, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the parameters of the specified `LbEdgeExtension` resource. - # - # @overload update_lb_edge_extension(request, options = nil) - # Pass arguments to `update_lb_edge_extension` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::UpdateLbEdgeExtensionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::UpdateLbEdgeExtensionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_lb_edge_extension(update_mask: nil, lb_edge_extension: nil, request_id: nil) - # Pass arguments to `update_lb_edge_extension` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. Used to specify the fields to be overwritten in the - # `LbEdgeExtension` resource by the update. - # The fields specified in the `update_mask` are relative to the resource, not - # the full request. A field is overwritten if it is in the mask. If the - # user does not specify a mask, then all fields are overwritten. - # @param lb_edge_extension [::Google::Cloud::NetworkServices::V1::LbEdgeExtension, ::Hash] - # Required. `LbEdgeExtension` resource being updated. - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server can ignore - # the request if it has already been completed. The server guarantees - # that for 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server ignores the second request This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # - # @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_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::DepService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::UpdateLbEdgeExtensionRequest.new - # - # # Call the update_lb_edge_extension method. - # result = client.update_lb_edge_extension 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_lb_edge_extension request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::UpdateLbEdgeExtensionRequest - - # Converts hash 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_lb_edge_extension.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::NetworkServices::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.lb_edge_extension&.name - header_params["lb_edge_extension.name"] = request.lb_edge_extension.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_lb_edge_extension.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_lb_edge_extension.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dep_service_stub.call_rpc :update_lb_edge_extension, 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 the specified `LbEdgeExtension` resource. - # - # @overload delete_lb_edge_extension(request, options = nil) - # Pass arguments to `delete_lb_edge_extension` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::DeleteLbEdgeExtensionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::DeleteLbEdgeExtensionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_lb_edge_extension(name: nil, request_id: nil) - # Pass arguments to `delete_lb_edge_extension` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the `LbEdgeExtension` resource to delete. Must be in - # the format - # `projects/{project}/locations/{location}/lbEdgeExtensions/{lb_edge_extension}`. - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server can ignore - # the request if it has already been completed. The server guarantees - # that for 60 minutes after the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server ignores the second request This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # - # @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_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::DepService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::DeleteLbEdgeExtensionRequest.new - # - # # Call the delete_lb_edge_extension method. - # result = client.delete_lb_edge_extension 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_lb_edge_extension request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::DeleteLbEdgeExtensionRequest - - # Converts hash 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_lb_edge_extension.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::NetworkServices::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_lb_edge_extension.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_lb_edge_extension.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dep_service_stub.call_rpc :delete_lb_edge_extension, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists `AuthzExtension` resources in a given project and location. - # - # @overload list_authz_extensions(request, options = nil) - # Pass arguments to `list_authz_extensions` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::ListAuthzExtensionsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::ListAuthzExtensionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_authz_extensions(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_authz_extensions` via keyword arguments. Note that at - # least one keyword argument is 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 project and location from which the `AuthzExtension` - # resources are listed. These values are specified in the following format: - # `projects/{project}/locations/{location}`. - # @param page_size [::Integer] - # Optional. Requested page size. The server might return fewer items than - # requested. If unspecified, the server picks an appropriate default. - # @param page_token [::String] - # Optional. A token identifying a page of results that the server returns. - # @param filter [::String] - # Optional. Filtering results. - # @param order_by [::String] - # Optional. Hint about how to order the results. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::NetworkServices::V1::AuthzExtension>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::NetworkServices::V1::AuthzExtension>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/network_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::DepService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::ListAuthzExtensionsRequest.new - # - # # Call the list_authz_extensions method. - # result = client.list_authz_extensions 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::NetworkServices::V1::AuthzExtension. - # p item - # end - # - def list_authz_extensions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::ListAuthzExtensionsRequest - - # Converts hash 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_authz_extensions.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::NetworkServices::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_authz_extensions.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_authz_extensions.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dep_service_stub.call_rpc :list_authz_extensions, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @dep_service_stub, :list_authz_extensions, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets details of the specified `AuthzExtension` resource. - # - # @overload get_authz_extension(request, options = nil) - # Pass arguments to `get_authz_extension` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::GetAuthzExtensionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::GetAuthzExtensionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_authz_extension(name: nil) - # Pass arguments to `get_authz_extension` via keyword arguments. Note that at - # least one keyword argument is 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. A name of the `AuthzExtension` resource to get. Must be in - # the format - # `projects/{project}/locations/{location}/authzExtensions/{authz_extension}`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::NetworkServices::V1::AuthzExtension] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::NetworkServices::V1::AuthzExtension] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/network_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::DepService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::GetAuthzExtensionRequest.new - # - # # Call the get_authz_extension method. - # result = client.get_authz_extension request - # - # # The returned object is of type Google::Cloud::NetworkServices::V1::AuthzExtension. - # p result - # - def get_authz_extension request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::GetAuthzExtensionRequest - - # Converts hash 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_authz_extension.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::NetworkServices::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_authz_extension.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_authz_extension.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dep_service_stub.call_rpc :get_authz_extension, 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 `AuthzExtension` resource in a given project - # and location. - # - # @overload create_authz_extension(request, options = nil) - # Pass arguments to `create_authz_extension` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::CreateAuthzExtensionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::CreateAuthzExtensionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_authz_extension(parent: nil, authz_extension_id: nil, authz_extension: nil, request_id: nil) - # Pass arguments to `create_authz_extension` via keyword arguments. Note that at - # least one keyword argument is 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 `AuthzExtension` resource. Must - # be in the format `projects/{project}/locations/{location}`. - # @param authz_extension_id [::String] - # Required. User-provided ID of the `AuthzExtension` resource to be - # created. - # @param authz_extension [::Google::Cloud::NetworkServices::V1::AuthzExtension, ::Hash] - # Required. `AuthzExtension` resource to be created. - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server can ignore - # the request if it has already been completed. The server guarantees - # that for 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server ignores the second request This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # - # @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_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::DepService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::CreateAuthzExtensionRequest.new - # - # # Call the create_authz_extension method. - # result = client.create_authz_extension 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_authz_extension request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::CreateAuthzExtensionRequest - - # Converts hash 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_authz_extension.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::NetworkServices::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_authz_extension.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_authz_extension.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dep_service_stub.call_rpc :create_authz_extension, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the parameters of the specified `AuthzExtension` - # resource. - # - # @overload update_authz_extension(request, options = nil) - # Pass arguments to `update_authz_extension` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::UpdateAuthzExtensionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::UpdateAuthzExtensionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_authz_extension(update_mask: nil, authz_extension: nil, request_id: nil) - # Pass arguments to `update_authz_extension` via keyword arguments. Note that at - # least one keyword argument is 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. Used to specify the fields to be overwritten in the - # `AuthzExtension` resource by the update. - # The fields specified in the `update_mask` are relative to the resource, not - # the full request. A field is overwritten if it is in the mask. If the - # user does not specify a mask, then all fields are overwritten. - # @param authz_extension [::Google::Cloud::NetworkServices::V1::AuthzExtension, ::Hash] - # Required. `AuthzExtension` resource being updated. - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server can ignore - # the request if it has already been completed. The server guarantees - # that for 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server ignores the second request This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # - # @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_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::DepService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::UpdateAuthzExtensionRequest.new - # - # # Call the update_authz_extension method. - # result = client.update_authz_extension 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_authz_extension request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::UpdateAuthzExtensionRequest - - # Converts hash 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_authz_extension.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::NetworkServices::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.authz_extension&.name - header_params["authz_extension.name"] = request.authz_extension.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_authz_extension.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_authz_extension.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dep_service_stub.call_rpc :update_authz_extension, 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 the specified `AuthzExtension` resource. - # - # @overload delete_authz_extension(request, options = nil) - # Pass arguments to `delete_authz_extension` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::DeleteAuthzExtensionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::DeleteAuthzExtensionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_authz_extension(name: nil, request_id: nil) - # Pass arguments to `delete_authz_extension` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the `AuthzExtension` resource to delete. Must - # be in the format - # `projects/{project}/locations/{location}/authzExtensions/{authz_extension}`. - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server can ignore - # the request if it has already been completed. The server guarantees - # that for 60 minutes after the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server ignores the second request This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # - # @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_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::DepService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::DeleteAuthzExtensionRequest.new - # - # # Call the delete_authz_extension method. - # result = client.delete_authz_extension 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_authz_extension request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::DeleteAuthzExtensionRequest - - # Converts hash 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_authz_extension.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::NetworkServices::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_authz_extension.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_authz_extension.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dep_service_stub.call_rpc :delete_authz_extension, 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 DepService API. - # - # This class represents the configuration for DepService, - # 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::NetworkServices::V1::DepService::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_lb_traffic_extensions to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::NetworkServices::V1::DepService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_lb_traffic_extensions.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::NetworkServices::V1::DepService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_lb_traffic_extensions.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::NetworkServices::V1::DepService::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. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `: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 = "networkservices.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 DepService 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. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_lb_traffic_extensions` - # @return [::Gapic::Config::Method] - # - attr_reader :list_lb_traffic_extensions - ## - # RPC-specific configuration for `get_lb_traffic_extension` - # @return [::Gapic::Config::Method] - # - attr_reader :get_lb_traffic_extension - ## - # RPC-specific configuration for `create_lb_traffic_extension` - # @return [::Gapic::Config::Method] - # - attr_reader :create_lb_traffic_extension - ## - # RPC-specific configuration for `update_lb_traffic_extension` - # @return [::Gapic::Config::Method] - # - attr_reader :update_lb_traffic_extension - ## - # RPC-specific configuration for `delete_lb_traffic_extension` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_lb_traffic_extension - ## - # RPC-specific configuration for `list_lb_route_extensions` - # @return [::Gapic::Config::Method] - # - attr_reader :list_lb_route_extensions - ## - # RPC-specific configuration for `get_lb_route_extension` - # @return [::Gapic::Config::Method] - # - attr_reader :get_lb_route_extension - ## - # RPC-specific configuration for `create_lb_route_extension` - # @return [::Gapic::Config::Method] - # - attr_reader :create_lb_route_extension - ## - # RPC-specific configuration for `update_lb_route_extension` - # @return [::Gapic::Config::Method] - # - attr_reader :update_lb_route_extension - ## - # RPC-specific configuration for `delete_lb_route_extension` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_lb_route_extension - ## - # RPC-specific configuration for `list_lb_edge_extensions` - # @return [::Gapic::Config::Method] - # - attr_reader :list_lb_edge_extensions - ## - # RPC-specific configuration for `get_lb_edge_extension` - # @return [::Gapic::Config::Method] - # - attr_reader :get_lb_edge_extension - ## - # RPC-specific configuration for `create_lb_edge_extension` - # @return [::Gapic::Config::Method] - # - attr_reader :create_lb_edge_extension - ## - # RPC-specific configuration for `update_lb_edge_extension` - # @return [::Gapic::Config::Method] - # - attr_reader :update_lb_edge_extension - ## - # RPC-specific configuration for `delete_lb_edge_extension` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_lb_edge_extension - ## - # RPC-specific configuration for `list_authz_extensions` - # @return [::Gapic::Config::Method] - # - attr_reader :list_authz_extensions - ## - # RPC-specific configuration for `get_authz_extension` - # @return [::Gapic::Config::Method] - # - attr_reader :get_authz_extension - ## - # RPC-specific configuration for `create_authz_extension` - # @return [::Gapic::Config::Method] - # - attr_reader :create_authz_extension - ## - # RPC-specific configuration for `update_authz_extension` - # @return [::Gapic::Config::Method] - # - attr_reader :update_authz_extension - ## - # RPC-specific configuration for `delete_authz_extension` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_authz_extension - - # @private - def initialize parent_rpcs = nil - list_lb_traffic_extensions_config = parent_rpcs.list_lb_traffic_extensions if parent_rpcs.respond_to? :list_lb_traffic_extensions - @list_lb_traffic_extensions = ::Gapic::Config::Method.new list_lb_traffic_extensions_config - get_lb_traffic_extension_config = parent_rpcs.get_lb_traffic_extension if parent_rpcs.respond_to? :get_lb_traffic_extension - @get_lb_traffic_extension = ::Gapic::Config::Method.new get_lb_traffic_extension_config - create_lb_traffic_extension_config = parent_rpcs.create_lb_traffic_extension if parent_rpcs.respond_to? :create_lb_traffic_extension - @create_lb_traffic_extension = ::Gapic::Config::Method.new create_lb_traffic_extension_config - update_lb_traffic_extension_config = parent_rpcs.update_lb_traffic_extension if parent_rpcs.respond_to? :update_lb_traffic_extension - @update_lb_traffic_extension = ::Gapic::Config::Method.new update_lb_traffic_extension_config - delete_lb_traffic_extension_config = parent_rpcs.delete_lb_traffic_extension if parent_rpcs.respond_to? :delete_lb_traffic_extension - @delete_lb_traffic_extension = ::Gapic::Config::Method.new delete_lb_traffic_extension_config - list_lb_route_extensions_config = parent_rpcs.list_lb_route_extensions if parent_rpcs.respond_to? :list_lb_route_extensions - @list_lb_route_extensions = ::Gapic::Config::Method.new list_lb_route_extensions_config - get_lb_route_extension_config = parent_rpcs.get_lb_route_extension if parent_rpcs.respond_to? :get_lb_route_extension - @get_lb_route_extension = ::Gapic::Config::Method.new get_lb_route_extension_config - create_lb_route_extension_config = parent_rpcs.create_lb_route_extension if parent_rpcs.respond_to? :create_lb_route_extension - @create_lb_route_extension = ::Gapic::Config::Method.new create_lb_route_extension_config - update_lb_route_extension_config = parent_rpcs.update_lb_route_extension if parent_rpcs.respond_to? :update_lb_route_extension - @update_lb_route_extension = ::Gapic::Config::Method.new update_lb_route_extension_config - delete_lb_route_extension_config = parent_rpcs.delete_lb_route_extension if parent_rpcs.respond_to? :delete_lb_route_extension - @delete_lb_route_extension = ::Gapic::Config::Method.new delete_lb_route_extension_config - list_lb_edge_extensions_config = parent_rpcs.list_lb_edge_extensions if parent_rpcs.respond_to? :list_lb_edge_extensions - @list_lb_edge_extensions = ::Gapic::Config::Method.new list_lb_edge_extensions_config - get_lb_edge_extension_config = parent_rpcs.get_lb_edge_extension if parent_rpcs.respond_to? :get_lb_edge_extension - @get_lb_edge_extension = ::Gapic::Config::Method.new get_lb_edge_extension_config - create_lb_edge_extension_config = parent_rpcs.create_lb_edge_extension if parent_rpcs.respond_to? :create_lb_edge_extension - @create_lb_edge_extension = ::Gapic::Config::Method.new create_lb_edge_extension_config - update_lb_edge_extension_config = parent_rpcs.update_lb_edge_extension if parent_rpcs.respond_to? :update_lb_edge_extension - @update_lb_edge_extension = ::Gapic::Config::Method.new update_lb_edge_extension_config - delete_lb_edge_extension_config = parent_rpcs.delete_lb_edge_extension if parent_rpcs.respond_to? :delete_lb_edge_extension - @delete_lb_edge_extension = ::Gapic::Config::Method.new delete_lb_edge_extension_config - list_authz_extensions_config = parent_rpcs.list_authz_extensions if parent_rpcs.respond_to? :list_authz_extensions - @list_authz_extensions = ::Gapic::Config::Method.new list_authz_extensions_config - get_authz_extension_config = parent_rpcs.get_authz_extension if parent_rpcs.respond_to? :get_authz_extension - @get_authz_extension = ::Gapic::Config::Method.new get_authz_extension_config - create_authz_extension_config = parent_rpcs.create_authz_extension if parent_rpcs.respond_to? :create_authz_extension - @create_authz_extension = ::Gapic::Config::Method.new create_authz_extension_config - update_authz_extension_config = parent_rpcs.update_authz_extension if parent_rpcs.respond_to? :update_authz_extension - @update_authz_extension = ::Gapic::Config::Method.new update_authz_extension_config - delete_authz_extension_config = parent_rpcs.delete_authz_extension if parent_rpcs.respond_to? :delete_authz_extension - @delete_authz_extension = ::Gapic::Config::Method.new delete_authz_extension_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/dep_service/credentials.rb b/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/dep_service/credentials.rb deleted file mode 100644 index 103a25485138..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/dep_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 NetworkServices - module V1 - module DepService - # Credentials for the DepService 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_services-v1/lib/google/cloud/network_services/v1/dep_service/operations.rb b/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/dep_service/operations.rb deleted file mode 100644 index b4f64b0b9b5f..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/dep_service/operations.rb +++ /dev/null @@ -1,843 +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 NetworkServices - module V1 - module DepService - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "networkservices.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the DepService 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 DepService 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::NetworkServices::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::NetworkServices::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::NetworkServices::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::NetworkServices::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::NetworkServices::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. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `: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 = "networkservices.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. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `: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_services-v1/lib/google/cloud/network_services/v1/dep_service/paths.rb b/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/dep_service/paths.rb deleted file mode 100644 index 72e3552bd4e6..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/dep_service/paths.rb +++ /dev/null @@ -1,126 +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 NetworkServices - module V1 - module DepService - # Path helper methods for the DepService API. - module Paths - ## - # Create a fully-qualified AuthzExtension resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/authzExtensions/{authz_extension}` - # - # @param project [String] - # @param location [String] - # @param authz_extension [String] - # - # @return [::String] - def authz_extension_path project:, location:, authz_extension: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/authzExtensions/#{authz_extension}" - end - - ## - # Create a fully-qualified LbEdgeExtension resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/lbEdgeExtensions/{lb_edge_extension}` - # - # @param project [String] - # @param location [String] - # @param lb_edge_extension [String] - # - # @return [::String] - def lb_edge_extension_path project:, location:, lb_edge_extension: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/lbEdgeExtensions/#{lb_edge_extension}" - end - - ## - # Create a fully-qualified LbRouteExtension resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/lbRouteExtensions/{lb_route_extension}` - # - # @param project [String] - # @param location [String] - # @param lb_route_extension [String] - # - # @return [::String] - def lb_route_extension_path project:, location:, lb_route_extension: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/lbRouteExtensions/#{lb_route_extension}" - end - - ## - # Create a fully-qualified LbTrafficExtension resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/lbTrafficExtensions/{lb_traffic_extension}` - # - # @param project [String] - # @param location [String] - # @param lb_traffic_extension [String] - # - # @return [::String] - def lb_traffic_extension_path project:, location:, lb_traffic_extension: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/lbTrafficExtensions/#{lb_traffic_extension}" - end - - ## - # Create a fully-qualified Location resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}` - # - # @param project [String] - # @param location [String] - # - # @return [::String] - def location_path project:, location: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - - "projects/#{project}/locations/#{location}" - end - - extend self - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/dep_service/rest.rb b/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/dep_service/rest.rb deleted file mode 100644 index 064a2772797b..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/dep_service/rest.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/network_services/v1/version" -require "google/cloud/network_services/v1/bindings_override" - -require "google/cloud/network_services/v1/dep_service/credentials" -require "google/cloud/network_services/v1/dep_service/paths" -require "google/cloud/network_services/v1/dep_service/rest/operations" -require "google/cloud/network_services/v1/dep_service/rest/client" - -module Google - module Cloud - module NetworkServices - module V1 - ## - # Service describing handlers for resources. - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/network_services/v1/dep_service/rest" - # client = ::Google::Cloud::NetworkServices::V1::DepService::Rest::Client.new - # - module DepService - # 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_services/v1/dep_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/dep_service/rest/client.rb b/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/dep_service/rest/client.rb deleted file mode 100644 index ed3ddf2e75ff..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/dep_service/rest/client.rb +++ /dev/null @@ -1,2496 +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/networkservices/v1/dep_pb" -require "google/cloud/network_services/v1/dep_service/rest/service_stub" -require "google/cloud/location/rest" -require "google/iam/v1/rest" - -module Google - module Cloud - module NetworkServices - module V1 - module DepService - module Rest - ## - # REST client for the DepService service. - # - # Service describing handlers for resources. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "networkservices.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :dep_service_stub - - ## - # Configure the DepService Client class. - # - # See {::Google::Cloud::NetworkServices::V1::DepService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all DepService clients - # ::Google::Cloud::NetworkServices::V1::DepService::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", "NetworkServices", "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 DepService 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::NetworkServices::V1::DepService::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 - @dep_service_stub.universe_domain - end - - ## - # Create a new DepService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::NetworkServices::V1::DepService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::NetworkServices::V1::DepService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the DepService 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::NetworkServices::V1::DepService::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 - - @dep_service_stub = ::Google::Cloud::NetworkServices::V1::DepService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @dep_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 = @dep_service_stub.endpoint - config.universe_domain = @dep_service_stub.universe_domain - config.bindings_override = @config.bindings_override - config.logger = @dep_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 = @dep_service_stub.endpoint - config.universe_domain = @dep_service_stub.universe_domain - config.bindings_override = @config.bindings_override - config.logger = @dep_service_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::NetworkServices::V1::DepService::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 - @dep_service_stub.logger - end - - # Service calls - - ## - # Lists `LbTrafficExtension` resources in a given project and location. - # - # @overload list_lb_traffic_extensions(request, options = nil) - # Pass arguments to `list_lb_traffic_extensions` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::ListLbTrafficExtensionsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::ListLbTrafficExtensionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_lb_traffic_extensions(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_lb_traffic_extensions` via keyword arguments. Note that at - # least one keyword argument is 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 project and location from which the `LbTrafficExtension` - # resources are listed. These values are specified in the following format: - # `projects/{project}/locations/{location}`. - # @param page_size [::Integer] - # Optional. Requested page size. The server might return fewer items than - # requested. If unspecified, the server picks an appropriate default. - # @param page_token [::String] - # Optional. A token identifying a page of results that the server returns. - # @param filter [::String] - # Optional. Filtering results. - # @param order_by [::String] - # Optional. Hint about how to order the results. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::LbTrafficExtension>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::LbTrafficExtension>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/network_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::DepService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::ListLbTrafficExtensionsRequest.new - # - # # Call the list_lb_traffic_extensions method. - # result = client.list_lb_traffic_extensions 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::NetworkServices::V1::LbTrafficExtension. - # p item - # end - # - def list_lb_traffic_extensions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::ListLbTrafficExtensionsRequest - - # Converts hash 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_lb_traffic_extensions.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::NetworkServices::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_lb_traffic_extensions.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_lb_traffic_extensions.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dep_service_stub.list_lb_traffic_extensions request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @dep_service_stub, :list_lb_traffic_extensions, "lb_traffic_extensions", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets details of the specified `LbTrafficExtension` resource. - # - # @overload get_lb_traffic_extension(request, options = nil) - # Pass arguments to `get_lb_traffic_extension` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::GetLbTrafficExtensionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::GetLbTrafficExtensionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_lb_traffic_extension(name: nil) - # Pass arguments to `get_lb_traffic_extension` via keyword arguments. Note that at - # least one keyword argument is 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. A name of the `LbTrafficExtension` resource to get. Must be in - # the format - # `projects/{project}/locations/{location}/lbTrafficExtensions/{lb_traffic_extension}`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::NetworkServices::V1::LbTrafficExtension] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::NetworkServices::V1::LbTrafficExtension] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/network_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::DepService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::GetLbTrafficExtensionRequest.new - # - # # Call the get_lb_traffic_extension method. - # result = client.get_lb_traffic_extension request - # - # # The returned object is of type Google::Cloud::NetworkServices::V1::LbTrafficExtension. - # p result - # - def get_lb_traffic_extension request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::GetLbTrafficExtensionRequest - - # Converts hash 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_lb_traffic_extension.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::NetworkServices::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_lb_traffic_extension.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_lb_traffic_extension.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dep_service_stub.get_lb_traffic_extension 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 `LbTrafficExtension` resource in a given project and - # location. - # - # @overload create_lb_traffic_extension(request, options = nil) - # Pass arguments to `create_lb_traffic_extension` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::CreateLbTrafficExtensionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::CreateLbTrafficExtensionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_lb_traffic_extension(parent: nil, lb_traffic_extension_id: nil, lb_traffic_extension: nil, request_id: nil) - # Pass arguments to `create_lb_traffic_extension` via keyword arguments. Note that at - # least one keyword argument is 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 `LbTrafficExtension` resource. Must be - # in the format `projects/{project}/locations/{location}`. - # @param lb_traffic_extension_id [::String] - # Required. User-provided ID of the `LbTrafficExtension` resource to be - # created. - # @param lb_traffic_extension [::Google::Cloud::NetworkServices::V1::LbTrafficExtension, ::Hash] - # Required. `LbTrafficExtension` resource to be created. - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server can ignore - # the request if it has already been completed. The server guarantees - # that for 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server ignores the second request This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @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_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::DepService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::CreateLbTrafficExtensionRequest.new - # - # # Call the create_lb_traffic_extension method. - # result = client.create_lb_traffic_extension 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_lb_traffic_extension request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::CreateLbTrafficExtensionRequest - - # Converts hash 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_lb_traffic_extension.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::NetworkServices::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_lb_traffic_extension.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_lb_traffic_extension.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dep_service_stub.create_lb_traffic_extension request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the parameters of the specified `LbTrafficExtension` resource. - # - # @overload update_lb_traffic_extension(request, options = nil) - # Pass arguments to `update_lb_traffic_extension` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::UpdateLbTrafficExtensionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::UpdateLbTrafficExtensionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_lb_traffic_extension(update_mask: nil, lb_traffic_extension: nil, request_id: nil) - # Pass arguments to `update_lb_traffic_extension` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. Used to specify the fields to be overwritten in the - # `LbTrafficExtension` resource by the update. - # The fields specified in the `update_mask` are relative to the resource, not - # the full request. A field is overwritten if it is in the mask. If the - # user does not specify a mask, then all fields are overwritten. - # @param lb_traffic_extension [::Google::Cloud::NetworkServices::V1::LbTrafficExtension, ::Hash] - # Required. `LbTrafficExtension` resource being updated. - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server can ignore - # the request if it has already been completed. The server guarantees - # that for 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server ignores the second request This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @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_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::DepService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::UpdateLbTrafficExtensionRequest.new - # - # # Call the update_lb_traffic_extension method. - # result = client.update_lb_traffic_extension 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_lb_traffic_extension request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::UpdateLbTrafficExtensionRequest - - # Converts hash 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_lb_traffic_extension.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::NetworkServices::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_lb_traffic_extension.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_lb_traffic_extension.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dep_service_stub.update_lb_traffic_extension 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 the specified `LbTrafficExtension` resource. - # - # @overload delete_lb_traffic_extension(request, options = nil) - # Pass arguments to `delete_lb_traffic_extension` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::DeleteLbTrafficExtensionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::DeleteLbTrafficExtensionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_lb_traffic_extension(name: nil, request_id: nil) - # Pass arguments to `delete_lb_traffic_extension` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the `LbTrafficExtension` resource to delete. Must be - # in the format - # `projects/{project}/locations/{location}/lbTrafficExtensions/{lb_traffic_extension}`. - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server can ignore - # the request if it has already been completed. The server guarantees - # that for 60 minutes after the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server ignores the second request This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @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_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::DepService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::DeleteLbTrafficExtensionRequest.new - # - # # Call the delete_lb_traffic_extension method. - # result = client.delete_lb_traffic_extension 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_lb_traffic_extension request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::DeleteLbTrafficExtensionRequest - - # Converts hash 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_lb_traffic_extension.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::NetworkServices::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_lb_traffic_extension.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_lb_traffic_extension.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dep_service_stub.delete_lb_traffic_extension request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists `LbRouteExtension` resources in a given project and location. - # - # @overload list_lb_route_extensions(request, options = nil) - # Pass arguments to `list_lb_route_extensions` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::ListLbRouteExtensionsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::ListLbRouteExtensionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_lb_route_extensions(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_lb_route_extensions` via keyword arguments. Note that at - # least one keyword argument is 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 project and location from which the `LbRouteExtension` - # resources are listed. These values are specified in the following format: - # `projects/{project}/locations/{location}`. - # @param page_size [::Integer] - # Optional. Requested page size. The server might return fewer items than - # requested. If unspecified, the server picks an appropriate default. - # @param page_token [::String] - # Optional. A token identifying a page of results that the server returns. - # @param filter [::String] - # Optional. Filtering results. - # @param order_by [::String] - # Optional. Hint about how to order the results. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::LbRouteExtension>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::LbRouteExtension>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/network_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::DepService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::ListLbRouteExtensionsRequest.new - # - # # Call the list_lb_route_extensions method. - # result = client.list_lb_route_extensions 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::NetworkServices::V1::LbRouteExtension. - # p item - # end - # - def list_lb_route_extensions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::ListLbRouteExtensionsRequest - - # Converts hash 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_lb_route_extensions.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::NetworkServices::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_lb_route_extensions.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_lb_route_extensions.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dep_service_stub.list_lb_route_extensions request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @dep_service_stub, :list_lb_route_extensions, "lb_route_extensions", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets details of the specified `LbRouteExtension` resource. - # - # @overload get_lb_route_extension(request, options = nil) - # Pass arguments to `get_lb_route_extension` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::GetLbRouteExtensionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::GetLbRouteExtensionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_lb_route_extension(name: nil) - # Pass arguments to `get_lb_route_extension` via keyword arguments. Note that at - # least one keyword argument is 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. A name of the `LbRouteExtension` resource to get. Must be in the - # format - # `projects/{project}/locations/{location}/lbRouteExtensions/{lb_route_extension}`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::NetworkServices::V1::LbRouteExtension] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::NetworkServices::V1::LbRouteExtension] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/network_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::DepService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::GetLbRouteExtensionRequest.new - # - # # Call the get_lb_route_extension method. - # result = client.get_lb_route_extension request - # - # # The returned object is of type Google::Cloud::NetworkServices::V1::LbRouteExtension. - # p result - # - def get_lb_route_extension request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::GetLbRouteExtensionRequest - - # Converts hash 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_lb_route_extension.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::NetworkServices::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_lb_route_extension.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_lb_route_extension.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dep_service_stub.get_lb_route_extension 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 `LbRouteExtension` resource in a given project and location. - # - # @overload create_lb_route_extension(request, options = nil) - # Pass arguments to `create_lb_route_extension` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::CreateLbRouteExtensionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::CreateLbRouteExtensionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_lb_route_extension(parent: nil, lb_route_extension_id: nil, lb_route_extension: nil, request_id: nil) - # Pass arguments to `create_lb_route_extension` via keyword arguments. Note that at - # least one keyword argument is 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 `LbRouteExtension` resource. Must be - # in the format `projects/{project}/locations/{location}`. - # @param lb_route_extension_id [::String] - # Required. User-provided ID of the `LbRouteExtension` resource to be - # created. - # @param lb_route_extension [::Google::Cloud::NetworkServices::V1::LbRouteExtension, ::Hash] - # Required. `LbRouteExtension` resource to be created. - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server can ignore - # the request if it has already been completed. The server guarantees - # that for 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server ignores the second request This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @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_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::DepService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::CreateLbRouteExtensionRequest.new - # - # # Call the create_lb_route_extension method. - # result = client.create_lb_route_extension 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_lb_route_extension request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::CreateLbRouteExtensionRequest - - # Converts hash 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_lb_route_extension.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::NetworkServices::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_lb_route_extension.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_lb_route_extension.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dep_service_stub.create_lb_route_extension request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the parameters of the specified `LbRouteExtension` resource. - # - # @overload update_lb_route_extension(request, options = nil) - # Pass arguments to `update_lb_route_extension` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::UpdateLbRouteExtensionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::UpdateLbRouteExtensionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_lb_route_extension(update_mask: nil, lb_route_extension: nil, request_id: nil) - # Pass arguments to `update_lb_route_extension` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. Used to specify the fields to be overwritten in the - # `LbRouteExtension` resource by the update. - # The fields specified in the `update_mask` are relative to the resource, not - # the full request. A field is overwritten if it is in the mask. If the - # user does not specify a mask, then all fields are overwritten. - # @param lb_route_extension [::Google::Cloud::NetworkServices::V1::LbRouteExtension, ::Hash] - # Required. `LbRouteExtension` resource being updated. - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server can ignore - # the request if it has already been completed. The server guarantees - # that for 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server ignores the second request This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @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_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::DepService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::UpdateLbRouteExtensionRequest.new - # - # # Call the update_lb_route_extension method. - # result = client.update_lb_route_extension 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_lb_route_extension request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::UpdateLbRouteExtensionRequest - - # Converts hash 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_lb_route_extension.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::NetworkServices::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_lb_route_extension.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_lb_route_extension.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dep_service_stub.update_lb_route_extension 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 the specified `LbRouteExtension` resource. - # - # @overload delete_lb_route_extension(request, options = nil) - # Pass arguments to `delete_lb_route_extension` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::DeleteLbRouteExtensionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::DeleteLbRouteExtensionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_lb_route_extension(name: nil, request_id: nil) - # Pass arguments to `delete_lb_route_extension` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the `LbRouteExtension` resource to delete. Must be in - # the format - # `projects/{project}/locations/{location}/lbRouteExtensions/{lb_route_extension}`. - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server can ignore - # the request if it has already been completed. The server guarantees - # that for 60 minutes after the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server ignores the second request This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @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_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::DepService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::DeleteLbRouteExtensionRequest.new - # - # # Call the delete_lb_route_extension method. - # result = client.delete_lb_route_extension 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_lb_route_extension request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::DeleteLbRouteExtensionRequest - - # Converts hash 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_lb_route_extension.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::NetworkServices::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_lb_route_extension.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_lb_route_extension.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dep_service_stub.delete_lb_route_extension request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists `LbEdgeExtension` resources in a given project and location. - # - # @overload list_lb_edge_extensions(request, options = nil) - # Pass arguments to `list_lb_edge_extensions` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::ListLbEdgeExtensionsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::ListLbEdgeExtensionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_lb_edge_extensions(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_lb_edge_extensions` via keyword arguments. Note that at - # least one keyword argument is 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 project and location from which the `LbEdgeExtension` - # resources are listed. These values are specified in the following format: - # `projects/{project}/locations/{location}`. - # @param page_size [::Integer] - # Optional. Requested page size. The server might return fewer items than - # requested. If unspecified, the server picks an appropriate default. - # @param page_token [::String] - # Optional. A token identifying a page of results that the server returns. - # @param filter [::String] - # Optional. Filtering results. - # @param order_by [::String] - # Optional. Hint about how to order the results. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::LbEdgeExtension>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::LbEdgeExtension>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/network_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::DepService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::ListLbEdgeExtensionsRequest.new - # - # # Call the list_lb_edge_extensions method. - # result = client.list_lb_edge_extensions 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::NetworkServices::V1::LbEdgeExtension. - # p item - # end - # - def list_lb_edge_extensions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::ListLbEdgeExtensionsRequest - - # Converts hash 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_lb_edge_extensions.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::NetworkServices::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_lb_edge_extensions.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_lb_edge_extensions.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dep_service_stub.list_lb_edge_extensions request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @dep_service_stub, :list_lb_edge_extensions, "lb_edge_extensions", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets details of the specified `LbEdgeExtension` resource. - # - # @overload get_lb_edge_extension(request, options = nil) - # Pass arguments to `get_lb_edge_extension` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::GetLbEdgeExtensionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::GetLbEdgeExtensionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_lb_edge_extension(name: nil) - # Pass arguments to `get_lb_edge_extension` via keyword arguments. Note that at - # least one keyword argument is 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. A name of the `LbEdgeExtension` resource to get. Must be in the - # format - # `projects/{project}/locations/{location}/lbEdgeExtensions/{lb_edge_extension}`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::NetworkServices::V1::LbEdgeExtension] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::NetworkServices::V1::LbEdgeExtension] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/network_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::DepService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::GetLbEdgeExtensionRequest.new - # - # # Call the get_lb_edge_extension method. - # result = client.get_lb_edge_extension request - # - # # The returned object is of type Google::Cloud::NetworkServices::V1::LbEdgeExtension. - # p result - # - def get_lb_edge_extension request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::GetLbEdgeExtensionRequest - - # Converts hash 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_lb_edge_extension.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::NetworkServices::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_lb_edge_extension.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_lb_edge_extension.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dep_service_stub.get_lb_edge_extension 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 `LbEdgeExtension` resource in a given project and location. - # - # @overload create_lb_edge_extension(request, options = nil) - # Pass arguments to `create_lb_edge_extension` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::CreateLbEdgeExtensionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::CreateLbEdgeExtensionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_lb_edge_extension(parent: nil, lb_edge_extension_id: nil, lb_edge_extension: nil, request_id: nil) - # Pass arguments to `create_lb_edge_extension` via keyword arguments. Note that at - # least one keyword argument is 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 `LbEdgeExtension` resource. Must be in - # the format `projects/{project}/locations/{location}`. - # @param lb_edge_extension_id [::String] - # Required. User-provided ID of the `LbEdgeExtension` resource to be created. - # @param lb_edge_extension [::Google::Cloud::NetworkServices::V1::LbEdgeExtension, ::Hash] - # Required. `LbEdgeExtension` resource to be created. - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server can ignore - # the request if it has already been completed. The server guarantees - # that for 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server ignores the second request This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @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_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::DepService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::CreateLbEdgeExtensionRequest.new - # - # # Call the create_lb_edge_extension method. - # result = client.create_lb_edge_extension 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_lb_edge_extension request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::CreateLbEdgeExtensionRequest - - # Converts hash 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_lb_edge_extension.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::NetworkServices::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_lb_edge_extension.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_lb_edge_extension.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dep_service_stub.create_lb_edge_extension request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the parameters of the specified `LbEdgeExtension` resource. - # - # @overload update_lb_edge_extension(request, options = nil) - # Pass arguments to `update_lb_edge_extension` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::UpdateLbEdgeExtensionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::UpdateLbEdgeExtensionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_lb_edge_extension(update_mask: nil, lb_edge_extension: nil, request_id: nil) - # Pass arguments to `update_lb_edge_extension` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. Used to specify the fields to be overwritten in the - # `LbEdgeExtension` resource by the update. - # The fields specified in the `update_mask` are relative to the resource, not - # the full request. A field is overwritten if it is in the mask. If the - # user does not specify a mask, then all fields are overwritten. - # @param lb_edge_extension [::Google::Cloud::NetworkServices::V1::LbEdgeExtension, ::Hash] - # Required. `LbEdgeExtension` resource being updated. - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server can ignore - # the request if it has already been completed. The server guarantees - # that for 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server ignores the second request This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @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_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::DepService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::UpdateLbEdgeExtensionRequest.new - # - # # Call the update_lb_edge_extension method. - # result = client.update_lb_edge_extension 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_lb_edge_extension request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::UpdateLbEdgeExtensionRequest - - # Converts hash 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_lb_edge_extension.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::NetworkServices::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_lb_edge_extension.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_lb_edge_extension.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dep_service_stub.update_lb_edge_extension 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 the specified `LbEdgeExtension` resource. - # - # @overload delete_lb_edge_extension(request, options = nil) - # Pass arguments to `delete_lb_edge_extension` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::DeleteLbEdgeExtensionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::DeleteLbEdgeExtensionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_lb_edge_extension(name: nil, request_id: nil) - # Pass arguments to `delete_lb_edge_extension` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the `LbEdgeExtension` resource to delete. Must be in - # the format - # `projects/{project}/locations/{location}/lbEdgeExtensions/{lb_edge_extension}`. - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server can ignore - # the request if it has already been completed. The server guarantees - # that for 60 minutes after the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server ignores the second request This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @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_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::DepService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::DeleteLbEdgeExtensionRequest.new - # - # # Call the delete_lb_edge_extension method. - # result = client.delete_lb_edge_extension 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_lb_edge_extension request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::DeleteLbEdgeExtensionRequest - - # Converts hash 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_lb_edge_extension.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::NetworkServices::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_lb_edge_extension.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_lb_edge_extension.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dep_service_stub.delete_lb_edge_extension request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists `AuthzExtension` resources in a given project and location. - # - # @overload list_authz_extensions(request, options = nil) - # Pass arguments to `list_authz_extensions` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::ListAuthzExtensionsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::ListAuthzExtensionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_authz_extensions(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_authz_extensions` via keyword arguments. Note that at - # least one keyword argument is 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 project and location from which the `AuthzExtension` - # resources are listed. These values are specified in the following format: - # `projects/{project}/locations/{location}`. - # @param page_size [::Integer] - # Optional. Requested page size. The server might return fewer items than - # requested. If unspecified, the server picks an appropriate default. - # @param page_token [::String] - # Optional. A token identifying a page of results that the server returns. - # @param filter [::String] - # Optional. Filtering results. - # @param order_by [::String] - # Optional. Hint about how to order the results. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::AuthzExtension>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::AuthzExtension>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/network_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::DepService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::ListAuthzExtensionsRequest.new - # - # # Call the list_authz_extensions method. - # result = client.list_authz_extensions 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::NetworkServices::V1::AuthzExtension. - # p item - # end - # - def list_authz_extensions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::ListAuthzExtensionsRequest - - # Converts hash 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_authz_extensions.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::NetworkServices::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_authz_extensions.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_authz_extensions.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dep_service_stub.list_authz_extensions request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @dep_service_stub, :list_authz_extensions, "authz_extensions", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets details of the specified `AuthzExtension` resource. - # - # @overload get_authz_extension(request, options = nil) - # Pass arguments to `get_authz_extension` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::GetAuthzExtensionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::GetAuthzExtensionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_authz_extension(name: nil) - # Pass arguments to `get_authz_extension` via keyword arguments. Note that at - # least one keyword argument is 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. A name of the `AuthzExtension` resource to get. Must be in - # the format - # `projects/{project}/locations/{location}/authzExtensions/{authz_extension}`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::NetworkServices::V1::AuthzExtension] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::NetworkServices::V1::AuthzExtension] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/network_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::DepService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::GetAuthzExtensionRequest.new - # - # # Call the get_authz_extension method. - # result = client.get_authz_extension request - # - # # The returned object is of type Google::Cloud::NetworkServices::V1::AuthzExtension. - # p result - # - def get_authz_extension request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::GetAuthzExtensionRequest - - # Converts hash 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_authz_extension.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::NetworkServices::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_authz_extension.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_authz_extension.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dep_service_stub.get_authz_extension 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 `AuthzExtension` resource in a given project - # and location. - # - # @overload create_authz_extension(request, options = nil) - # Pass arguments to `create_authz_extension` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::CreateAuthzExtensionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::CreateAuthzExtensionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_authz_extension(parent: nil, authz_extension_id: nil, authz_extension: nil, request_id: nil) - # Pass arguments to `create_authz_extension` via keyword arguments. Note that at - # least one keyword argument is 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 `AuthzExtension` resource. Must - # be in the format `projects/{project}/locations/{location}`. - # @param authz_extension_id [::String] - # Required. User-provided ID of the `AuthzExtension` resource to be - # created. - # @param authz_extension [::Google::Cloud::NetworkServices::V1::AuthzExtension, ::Hash] - # Required. `AuthzExtension` resource to be created. - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server can ignore - # the request if it has already been completed. The server guarantees - # that for 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server ignores the second request This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @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_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::DepService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::CreateAuthzExtensionRequest.new - # - # # Call the create_authz_extension method. - # result = client.create_authz_extension 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_authz_extension request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::CreateAuthzExtensionRequest - - # Converts hash 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_authz_extension.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::NetworkServices::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_authz_extension.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_authz_extension.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dep_service_stub.create_authz_extension request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the parameters of the specified `AuthzExtension` - # resource. - # - # @overload update_authz_extension(request, options = nil) - # Pass arguments to `update_authz_extension` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::UpdateAuthzExtensionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::UpdateAuthzExtensionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_authz_extension(update_mask: nil, authz_extension: nil, request_id: nil) - # Pass arguments to `update_authz_extension` via keyword arguments. Note that at - # least one keyword argument is 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. Used to specify the fields to be overwritten in the - # `AuthzExtension` resource by the update. - # The fields specified in the `update_mask` are relative to the resource, not - # the full request. A field is overwritten if it is in the mask. If the - # user does not specify a mask, then all fields are overwritten. - # @param authz_extension [::Google::Cloud::NetworkServices::V1::AuthzExtension, ::Hash] - # Required. `AuthzExtension` resource being updated. - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server can ignore - # the request if it has already been completed. The server guarantees - # that for 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server ignores the second request This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @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_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::DepService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::UpdateAuthzExtensionRequest.new - # - # # Call the update_authz_extension method. - # result = client.update_authz_extension 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_authz_extension request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::UpdateAuthzExtensionRequest - - # Converts hash 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_authz_extension.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::NetworkServices::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_authz_extension.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_authz_extension.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dep_service_stub.update_authz_extension 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 the specified `AuthzExtension` resource. - # - # @overload delete_authz_extension(request, options = nil) - # Pass arguments to `delete_authz_extension` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::DeleteAuthzExtensionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::DeleteAuthzExtensionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_authz_extension(name: nil, request_id: nil) - # Pass arguments to `delete_authz_extension` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the `AuthzExtension` resource to delete. Must - # be in the format - # `projects/{project}/locations/{location}/authzExtensions/{authz_extension}`. - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server can ignore - # the request if it has already been completed. The server guarantees - # that for 60 minutes after the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server ignores the second request This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @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_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::DepService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::DeleteAuthzExtensionRequest.new - # - # # Call the delete_authz_extension method. - # result = client.delete_authz_extension 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_authz_extension request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::DeleteAuthzExtensionRequest - - # Converts hash 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_authz_extension.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::NetworkServices::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_authz_extension.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_authz_extension.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dep_service_stub.delete_authz_extension 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 DepService REST API. - # - # This class represents the configuration for DepService 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::NetworkServices::V1::DepService::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_lb_traffic_extensions to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::NetworkServices::V1::DepService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_lb_traffic_extensions.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::NetworkServices::V1::DepService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_lb_traffic_extensions.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. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `: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 = "networkservices.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 DepService 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. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_lb_traffic_extensions` - # @return [::Gapic::Config::Method] - # - attr_reader :list_lb_traffic_extensions - ## - # RPC-specific configuration for `get_lb_traffic_extension` - # @return [::Gapic::Config::Method] - # - attr_reader :get_lb_traffic_extension - ## - # RPC-specific configuration for `create_lb_traffic_extension` - # @return [::Gapic::Config::Method] - # - attr_reader :create_lb_traffic_extension - ## - # RPC-specific configuration for `update_lb_traffic_extension` - # @return [::Gapic::Config::Method] - # - attr_reader :update_lb_traffic_extension - ## - # RPC-specific configuration for `delete_lb_traffic_extension` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_lb_traffic_extension - ## - # RPC-specific configuration for `list_lb_route_extensions` - # @return [::Gapic::Config::Method] - # - attr_reader :list_lb_route_extensions - ## - # RPC-specific configuration for `get_lb_route_extension` - # @return [::Gapic::Config::Method] - # - attr_reader :get_lb_route_extension - ## - # RPC-specific configuration for `create_lb_route_extension` - # @return [::Gapic::Config::Method] - # - attr_reader :create_lb_route_extension - ## - # RPC-specific configuration for `update_lb_route_extension` - # @return [::Gapic::Config::Method] - # - attr_reader :update_lb_route_extension - ## - # RPC-specific configuration for `delete_lb_route_extension` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_lb_route_extension - ## - # RPC-specific configuration for `list_lb_edge_extensions` - # @return [::Gapic::Config::Method] - # - attr_reader :list_lb_edge_extensions - ## - # RPC-specific configuration for `get_lb_edge_extension` - # @return [::Gapic::Config::Method] - # - attr_reader :get_lb_edge_extension - ## - # RPC-specific configuration for `create_lb_edge_extension` - # @return [::Gapic::Config::Method] - # - attr_reader :create_lb_edge_extension - ## - # RPC-specific configuration for `update_lb_edge_extension` - # @return [::Gapic::Config::Method] - # - attr_reader :update_lb_edge_extension - ## - # RPC-specific configuration for `delete_lb_edge_extension` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_lb_edge_extension - ## - # RPC-specific configuration for `list_authz_extensions` - # @return [::Gapic::Config::Method] - # - attr_reader :list_authz_extensions - ## - # RPC-specific configuration for `get_authz_extension` - # @return [::Gapic::Config::Method] - # - attr_reader :get_authz_extension - ## - # RPC-specific configuration for `create_authz_extension` - # @return [::Gapic::Config::Method] - # - attr_reader :create_authz_extension - ## - # RPC-specific configuration for `update_authz_extension` - # @return [::Gapic::Config::Method] - # - attr_reader :update_authz_extension - ## - # RPC-specific configuration for `delete_authz_extension` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_authz_extension - - # @private - def initialize parent_rpcs = nil - list_lb_traffic_extensions_config = parent_rpcs.list_lb_traffic_extensions if parent_rpcs.respond_to? :list_lb_traffic_extensions - @list_lb_traffic_extensions = ::Gapic::Config::Method.new list_lb_traffic_extensions_config - get_lb_traffic_extension_config = parent_rpcs.get_lb_traffic_extension if parent_rpcs.respond_to? :get_lb_traffic_extension - @get_lb_traffic_extension = ::Gapic::Config::Method.new get_lb_traffic_extension_config - create_lb_traffic_extension_config = parent_rpcs.create_lb_traffic_extension if parent_rpcs.respond_to? :create_lb_traffic_extension - @create_lb_traffic_extension = ::Gapic::Config::Method.new create_lb_traffic_extension_config - update_lb_traffic_extension_config = parent_rpcs.update_lb_traffic_extension if parent_rpcs.respond_to? :update_lb_traffic_extension - @update_lb_traffic_extension = ::Gapic::Config::Method.new update_lb_traffic_extension_config - delete_lb_traffic_extension_config = parent_rpcs.delete_lb_traffic_extension if parent_rpcs.respond_to? :delete_lb_traffic_extension - @delete_lb_traffic_extension = ::Gapic::Config::Method.new delete_lb_traffic_extension_config - list_lb_route_extensions_config = parent_rpcs.list_lb_route_extensions if parent_rpcs.respond_to? :list_lb_route_extensions - @list_lb_route_extensions = ::Gapic::Config::Method.new list_lb_route_extensions_config - get_lb_route_extension_config = parent_rpcs.get_lb_route_extension if parent_rpcs.respond_to? :get_lb_route_extension - @get_lb_route_extension = ::Gapic::Config::Method.new get_lb_route_extension_config - create_lb_route_extension_config = parent_rpcs.create_lb_route_extension if parent_rpcs.respond_to? :create_lb_route_extension - @create_lb_route_extension = ::Gapic::Config::Method.new create_lb_route_extension_config - update_lb_route_extension_config = parent_rpcs.update_lb_route_extension if parent_rpcs.respond_to? :update_lb_route_extension - @update_lb_route_extension = ::Gapic::Config::Method.new update_lb_route_extension_config - delete_lb_route_extension_config = parent_rpcs.delete_lb_route_extension if parent_rpcs.respond_to? :delete_lb_route_extension - @delete_lb_route_extension = ::Gapic::Config::Method.new delete_lb_route_extension_config - list_lb_edge_extensions_config = parent_rpcs.list_lb_edge_extensions if parent_rpcs.respond_to? :list_lb_edge_extensions - @list_lb_edge_extensions = ::Gapic::Config::Method.new list_lb_edge_extensions_config - get_lb_edge_extension_config = parent_rpcs.get_lb_edge_extension if parent_rpcs.respond_to? :get_lb_edge_extension - @get_lb_edge_extension = ::Gapic::Config::Method.new get_lb_edge_extension_config - create_lb_edge_extension_config = parent_rpcs.create_lb_edge_extension if parent_rpcs.respond_to? :create_lb_edge_extension - @create_lb_edge_extension = ::Gapic::Config::Method.new create_lb_edge_extension_config - update_lb_edge_extension_config = parent_rpcs.update_lb_edge_extension if parent_rpcs.respond_to? :update_lb_edge_extension - @update_lb_edge_extension = ::Gapic::Config::Method.new update_lb_edge_extension_config - delete_lb_edge_extension_config = parent_rpcs.delete_lb_edge_extension if parent_rpcs.respond_to? :delete_lb_edge_extension - @delete_lb_edge_extension = ::Gapic::Config::Method.new delete_lb_edge_extension_config - list_authz_extensions_config = parent_rpcs.list_authz_extensions if parent_rpcs.respond_to? :list_authz_extensions - @list_authz_extensions = ::Gapic::Config::Method.new list_authz_extensions_config - get_authz_extension_config = parent_rpcs.get_authz_extension if parent_rpcs.respond_to? :get_authz_extension - @get_authz_extension = ::Gapic::Config::Method.new get_authz_extension_config - create_authz_extension_config = parent_rpcs.create_authz_extension if parent_rpcs.respond_to? :create_authz_extension - @create_authz_extension = ::Gapic::Config::Method.new create_authz_extension_config - update_authz_extension_config = parent_rpcs.update_authz_extension if parent_rpcs.respond_to? :update_authz_extension - @update_authz_extension = ::Gapic::Config::Method.new update_authz_extension_config - delete_authz_extension_config = parent_rpcs.delete_authz_extension if parent_rpcs.respond_to? :delete_authz_extension - @delete_authz_extension = ::Gapic::Config::Method.new delete_authz_extension_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_services-v1/lib/google/cloud/network_services/v1/dep_service/rest/operations.rb b/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/dep_service/rest/operations.rb deleted file mode 100644 index cfac5b24bc2c..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/dep_service/rest/operations.rb +++ /dev/null @@ -1,927 +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 NetworkServices - module V1 - module DepService - module Rest - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "networkservices.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the DepService 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 DepService 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::NetworkServices::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::NetworkServices::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::NetworkServices::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::NetworkServices::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. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `: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 = "networkservices.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. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_operations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_operations - ## - # RPC-specific configuration for `get_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_operation - ## - # RPC-specific configuration for `delete_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_operation - ## - # RPC-specific configuration for `cancel_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_operation - - # @private - def initialize parent_rpcs = nil - list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations - @list_operations = ::Gapic::Config::Method.new list_operations_config - get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation - @get_operation = ::Gapic::Config::Method.new get_operation_config - delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation - @delete_operation = ::Gapic::Config::Method.new delete_operation_config - cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation - @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config - - yield self if block_given? - end - end - end - end - - ## - # @private - # REST service stub for the Longrunning Operations API. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - class OperationsServiceStub - def initialize endpoint:, endpoint_template:, universe_domain:, credentials: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials - end - - ## - # Baseline implementation for the list_operations REST call - # - # @param request_pb [::Google::Longrunning::ListOperationsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::ListOperationsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::ListOperationsResponse] - # A result object deserialized from the server's reply - def list_operations request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_list_operations_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_operations", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::ListOperationsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_operation REST call - # - # @param request_pb [::Google::Longrunning::GetOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def get_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_get_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_operation REST call - # - # @param request_pb [::Google::Longrunning::DeleteOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def delete_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_delete_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the cancel_operation REST call - # - # @param request_pb [::Google::Longrunning::CancelOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def cancel_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_cancel_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "cancel_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the list_operations REST call - # - # @param request_pb [::Google::Longrunning::ListOperationsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_operations_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}/operations", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_operation REST call - # - # @param request_pb [::Google::Longrunning::GetOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_operation REST call - # - # @param request_pb [::Google::Longrunning::DeleteOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the cancel_operation REST call - # - # @param request_pb [::Google::Longrunning::CancelOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_cancel_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:cancel", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/dep_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/dep_service/rest/service_stub.rb deleted file mode 100644 index 7a87a810b6ef..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/dep_service/rest/service_stub.rb +++ /dev/null @@ -1,1309 +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/networkservices/v1/dep_pb" - -module Google - module Cloud - module NetworkServices - module V1 - module DepService - module Rest - ## - # REST service stub for the DepService 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_lb_traffic_extensions REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::ListLbTrafficExtensionsRequest] - # 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::NetworkServices::V1::ListLbTrafficExtensionsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::NetworkServices::V1::ListLbTrafficExtensionsResponse] - # A result object deserialized from the server's reply - def list_lb_traffic_extensions request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_lb_traffic_extensions_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_lb_traffic_extensions", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::NetworkServices::V1::ListLbTrafficExtensionsResponse.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_lb_traffic_extension REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::GetLbTrafficExtensionRequest] - # 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::NetworkServices::V1::LbTrafficExtension] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::NetworkServices::V1::LbTrafficExtension] - # A result object deserialized from the server's reply - def get_lb_traffic_extension request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_lb_traffic_extension_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_lb_traffic_extension", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::NetworkServices::V1::LbTrafficExtension.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_lb_traffic_extension REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::CreateLbTrafficExtensionRequest] - # 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_lb_traffic_extension request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_lb_traffic_extension_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_lb_traffic_extension", - 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_lb_traffic_extension REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::UpdateLbTrafficExtensionRequest] - # 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_lb_traffic_extension request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_lb_traffic_extension_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_lb_traffic_extension", - 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_lb_traffic_extension REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::DeleteLbTrafficExtensionRequest] - # 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_lb_traffic_extension request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_lb_traffic_extension_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_lb_traffic_extension", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_lb_route_extensions REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::ListLbRouteExtensionsRequest] - # 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::NetworkServices::V1::ListLbRouteExtensionsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::NetworkServices::V1::ListLbRouteExtensionsResponse] - # A result object deserialized from the server's reply - def list_lb_route_extensions request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_lb_route_extensions_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_lb_route_extensions", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::NetworkServices::V1::ListLbRouteExtensionsResponse.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_lb_route_extension REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::GetLbRouteExtensionRequest] - # 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::NetworkServices::V1::LbRouteExtension] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::NetworkServices::V1::LbRouteExtension] - # A result object deserialized from the server's reply - def get_lb_route_extension request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_lb_route_extension_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_lb_route_extension", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::NetworkServices::V1::LbRouteExtension.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_lb_route_extension REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::CreateLbRouteExtensionRequest] - # 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_lb_route_extension request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_lb_route_extension_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_lb_route_extension", - 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_lb_route_extension REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::UpdateLbRouteExtensionRequest] - # 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_lb_route_extension request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_lb_route_extension_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_lb_route_extension", - 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_lb_route_extension REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::DeleteLbRouteExtensionRequest] - # 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_lb_route_extension request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_lb_route_extension_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_lb_route_extension", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_lb_edge_extensions REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::ListLbEdgeExtensionsRequest] - # 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::NetworkServices::V1::ListLbEdgeExtensionsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::NetworkServices::V1::ListLbEdgeExtensionsResponse] - # A result object deserialized from the server's reply - def list_lb_edge_extensions request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_lb_edge_extensions_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_lb_edge_extensions", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::NetworkServices::V1::ListLbEdgeExtensionsResponse.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_lb_edge_extension REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::GetLbEdgeExtensionRequest] - # 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::NetworkServices::V1::LbEdgeExtension] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::NetworkServices::V1::LbEdgeExtension] - # A result object deserialized from the server's reply - def get_lb_edge_extension request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_lb_edge_extension_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_lb_edge_extension", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::NetworkServices::V1::LbEdgeExtension.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_lb_edge_extension REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::CreateLbEdgeExtensionRequest] - # 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_lb_edge_extension request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_lb_edge_extension_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_lb_edge_extension", - 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_lb_edge_extension REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::UpdateLbEdgeExtensionRequest] - # 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_lb_edge_extension request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_lb_edge_extension_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_lb_edge_extension", - 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_lb_edge_extension REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::DeleteLbEdgeExtensionRequest] - # 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_lb_edge_extension request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_lb_edge_extension_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_lb_edge_extension", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_authz_extensions REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::ListAuthzExtensionsRequest] - # 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::NetworkServices::V1::ListAuthzExtensionsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::NetworkServices::V1::ListAuthzExtensionsResponse] - # A result object deserialized from the server's reply - def list_authz_extensions request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_authz_extensions_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_authz_extensions", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::NetworkServices::V1::ListAuthzExtensionsResponse.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_authz_extension REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::GetAuthzExtensionRequest] - # 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::NetworkServices::V1::AuthzExtension] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::NetworkServices::V1::AuthzExtension] - # A result object deserialized from the server's reply - def get_authz_extension request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_authz_extension_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_authz_extension", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::NetworkServices::V1::AuthzExtension.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_authz_extension REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::CreateAuthzExtensionRequest] - # 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_authz_extension request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_authz_extension_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_authz_extension", - 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_authz_extension REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::UpdateAuthzExtensionRequest] - # 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_authz_extension request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_authz_extension_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_authz_extension", - 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_authz_extension REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::DeleteAuthzExtensionRequest] - # 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_authz_extension request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_authz_extension_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_authz_extension", - 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_lb_traffic_extensions REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::ListLbTrafficExtensionsRequest] - # 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_lb_traffic_extensions_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/lbTrafficExtensions", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_lb_traffic_extension REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::GetLbTrafficExtensionRequest] - # 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_lb_traffic_extension_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/lbTrafficExtensions/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_lb_traffic_extension REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::CreateLbTrafficExtensionRequest] - # 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_lb_traffic_extension_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/lbTrafficExtensions", - body: "lb_traffic_extension", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_lb_traffic_extension REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::UpdateLbTrafficExtensionRequest] - # 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_lb_traffic_extension_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{lb_traffic_extension.name}", - body: "lb_traffic_extension", - matches: [ - ["lb_traffic_extension.name", %r{^projects/[^/]+/locations/[^/]+/lbTrafficExtensions/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_lb_traffic_extension REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::DeleteLbTrafficExtensionRequest] - # 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_lb_traffic_extension_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/lbTrafficExtensions/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_lb_route_extensions REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::ListLbRouteExtensionsRequest] - # 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_lb_route_extensions_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/lbRouteExtensions", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_lb_route_extension REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::GetLbRouteExtensionRequest] - # 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_lb_route_extension_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/lbRouteExtensions/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_lb_route_extension REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::CreateLbRouteExtensionRequest] - # 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_lb_route_extension_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/lbRouteExtensions", - body: "lb_route_extension", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_lb_route_extension REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::UpdateLbRouteExtensionRequest] - # 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_lb_route_extension_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{lb_route_extension.name}", - body: "lb_route_extension", - matches: [ - ["lb_route_extension.name", %r{^projects/[^/]+/locations/[^/]+/lbRouteExtensions/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_lb_route_extension REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::DeleteLbRouteExtensionRequest] - # 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_lb_route_extension_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/lbRouteExtensions/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_lb_edge_extensions REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::ListLbEdgeExtensionsRequest] - # 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_lb_edge_extensions_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/lbEdgeExtensions", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_lb_edge_extension REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::GetLbEdgeExtensionRequest] - # 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_lb_edge_extension_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/lbEdgeExtensions/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_lb_edge_extension REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::CreateLbEdgeExtensionRequest] - # 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_lb_edge_extension_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/lbEdgeExtensions", - body: "lb_edge_extension", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_lb_edge_extension REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::UpdateLbEdgeExtensionRequest] - # 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_lb_edge_extension_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{lb_edge_extension.name}", - body: "lb_edge_extension", - matches: [ - ["lb_edge_extension.name", %r{^projects/[^/]+/locations/[^/]+/lbEdgeExtensions/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_lb_edge_extension REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::DeleteLbEdgeExtensionRequest] - # 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_lb_edge_extension_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/lbEdgeExtensions/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_authz_extensions REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::ListAuthzExtensionsRequest] - # 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_authz_extensions_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/authzExtensions", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_authz_extension REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::GetAuthzExtensionRequest] - # 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_authz_extension_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/authzExtensions/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_authz_extension REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::CreateAuthzExtensionRequest] - # 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_authz_extension_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/authzExtensions", - body: "authz_extension", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_authz_extension REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::UpdateAuthzExtensionRequest] - # 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_authz_extension_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{authz_extension.name}", - body: "authz_extension", - matches: [ - ["authz_extension.name", %r{^projects/[^/]+/locations/[^/]+/authzExtensions/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_authz_extension REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::DeleteAuthzExtensionRequest] - # 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_authz_extension_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/authzExtensions/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/network_services.rb b/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/network_services.rb deleted file mode 100644 index 7bb1dcbb0480..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/network_services.rb +++ /dev/null @@ -1,56 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/network_services/v1/version" - -require "google/cloud/network_services/v1/network_services/credentials" -require "google/cloud/network_services/v1/network_services/paths" -require "google/cloud/network_services/v1/network_services/operations" -require "google/cloud/network_services/v1/network_services/client" -require "google/cloud/network_services/v1/network_services/rest" - -module Google - module Cloud - module NetworkServices - module V1 - ## - # Service describing handlers for resources. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/network_services/v1/network_services" - # client = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/cloud/network_services/v1/network_services/rest" - # client = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new - # - module NetworkServices - end - end - end - end -end - -helper_path = ::File.join __dir__, "network_services", "helpers.rb" -require "google/cloud/network_services/v1/network_services/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/network_services/client.rb b/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/network_services/client.rb deleted file mode 100644 index fbe7a359c85d..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/network_services/client.rb +++ /dev/null @@ -1,6946 +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/networkservices/v1/network_services_pb" -require "google/cloud/location" -require "google/iam/v1" - -module Google - module Cloud - module NetworkServices - module V1 - module NetworkServices - ## - # Client for the NetworkServices service. - # - # Service describing handlers for resources. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "networkservices.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :network_services_stub - - ## - # Configure the NetworkServices Client class. - # - # See {::Google::Cloud::NetworkServices::V1::NetworkServices::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all NetworkServices clients - # ::Google::Cloud::NetworkServices::V1::NetworkServices::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", "NetworkServices", "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 NetworkServices 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::NetworkServices::V1::NetworkServices::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 - @network_services_stub.universe_domain - end - - ## - # Create a new NetworkServices client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the NetworkServices 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/networkservices/v1/network_services_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 - - @network_services_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::NetworkServices::V1::NetworkServices::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 - ) - - @network_services_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 = @network_services_stub.endpoint - config.universe_domain = @network_services_stub.universe_domain - config.logger = @network_services_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 = @network_services_stub.endpoint - config.universe_domain = @network_services_stub.universe_domain - config.logger = @network_services_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::NetworkServices::V1::NetworkServices::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 - @network_services_stub.logger - end - - # Service calls - - ## - # Lists EndpointPolicies in a given project and location. - # - # @overload list_endpoint_policies(request, options = nil) - # Pass arguments to `list_endpoint_policies` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::ListEndpointPoliciesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::ListEndpointPoliciesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_endpoint_policies(parent: nil, page_size: nil, page_token: nil, return_partial_success: nil) - # Pass arguments to `list_endpoint_policies` via keyword arguments. Note that at - # least one keyword argument is 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 project and location from which the EndpointPolicies should - # be listed, specified in the format `projects/*/locations/*`. - # @param page_size [::Integer] - # Maximum number of EndpointPolicies to return per call. - # @param page_token [::String] - # The value returned by the last `ListEndpointPoliciesResponse` - # Indicates that this is a continuation of a prior - # `ListEndpointPolicies` call, and that the system should return the - # next page of data. - # @param return_partial_success [::Boolean] - # Optional. If true, allow partial responses for multi-regional Aggregated - # List requests. Otherwise if one of the locations is down or unreachable, - # the Aggregated List request will fail. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::NetworkServices::V1::EndpointPolicy>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::NetworkServices::V1::EndpointPolicy>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/network_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::ListEndpointPoliciesRequest.new - # - # # Call the list_endpoint_policies method. - # result = client.list_endpoint_policies 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::NetworkServices::V1::EndpointPolicy. - # p item - # end - # - def list_endpoint_policies request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::ListEndpointPoliciesRequest - - # Converts hash 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_endpoint_policies.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::NetworkServices::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_endpoint_policies.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_endpoint_policies.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.call_rpc :list_endpoint_policies, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @network_services_stub, :list_endpoint_policies, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets details of a single EndpointPolicy. - # - # @overload get_endpoint_policy(request, options = nil) - # Pass arguments to `get_endpoint_policy` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::GetEndpointPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::GetEndpointPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_endpoint_policy(name: nil) - # Pass arguments to `get_endpoint_policy` via keyword arguments. Note that at - # least one keyword argument is 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. A name of the EndpointPolicy to get. Must be in the format - # `projects/*/locations/*/endpointPolicies/*`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::NetworkServices::V1::EndpointPolicy] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::NetworkServices::V1::EndpointPolicy] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/network_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::GetEndpointPolicyRequest.new - # - # # Call the get_endpoint_policy method. - # result = client.get_endpoint_policy request - # - # # The returned object is of type Google::Cloud::NetworkServices::V1::EndpointPolicy. - # p result - # - def get_endpoint_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::GetEndpointPolicyRequest - - # Converts hash 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_endpoint_policy.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::NetworkServices::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_endpoint_policy.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_endpoint_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.call_rpc :get_endpoint_policy, 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 EndpointPolicy in a given project and location. - # - # @overload create_endpoint_policy(request, options = nil) - # Pass arguments to `create_endpoint_policy` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::CreateEndpointPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::CreateEndpointPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_endpoint_policy(parent: nil, endpoint_policy_id: nil, endpoint_policy: nil) - # Pass arguments to `create_endpoint_policy` via keyword arguments. Note that at - # least one keyword argument is 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 EndpointPolicy. Must be in the - # format `projects/*/locations/*`. - # @param endpoint_policy_id [::String] - # Required. Short name of the EndpointPolicy resource to be created. - # E.g. "CustomECS". - # @param endpoint_policy [::Google::Cloud::NetworkServices::V1::EndpointPolicy, ::Hash] - # Required. EndpointPolicy resource to be created. - # - # @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_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::CreateEndpointPolicyRequest.new - # - # # Call the create_endpoint_policy method. - # result = client.create_endpoint_policy 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_endpoint_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::CreateEndpointPolicyRequest - - # Converts hash 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_endpoint_policy.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::NetworkServices::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_endpoint_policy.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_endpoint_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.call_rpc :create_endpoint_policy, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the parameters of a single EndpointPolicy. - # - # @overload update_endpoint_policy(request, options = nil) - # Pass arguments to `update_endpoint_policy` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::UpdateEndpointPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::UpdateEndpointPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_endpoint_policy(update_mask: nil, endpoint_policy: nil) - # Pass arguments to `update_endpoint_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. Field mask is used to specify the fields to be overwritten in the - # EndpointPolicy resource by the update. - # The fields specified in the update_mask are relative to the resource, not - # the full request. A field will be overwritten if it is in the mask. If the - # user does not provide a mask then all fields will be overwritten. - # @param endpoint_policy [::Google::Cloud::NetworkServices::V1::EndpointPolicy, ::Hash] - # Required. Updated EndpointPolicy 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_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::UpdateEndpointPolicyRequest.new - # - # # Call the update_endpoint_policy method. - # result = client.update_endpoint_policy 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_endpoint_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::UpdateEndpointPolicyRequest - - # Converts hash 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_endpoint_policy.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::NetworkServices::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.endpoint_policy&.name - header_params["endpoint_policy.name"] = request.endpoint_policy.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_endpoint_policy.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_endpoint_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.call_rpc :update_endpoint_policy, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a single EndpointPolicy. - # - # @overload delete_endpoint_policy(request, options = nil) - # Pass arguments to `delete_endpoint_policy` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::DeleteEndpointPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::DeleteEndpointPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_endpoint_policy(name: nil) - # Pass arguments to `delete_endpoint_policy` via keyword arguments. Note that at - # least one keyword argument is 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. A name of the EndpointPolicy to delete. Must be in the format - # `projects/*/locations/*/endpointPolicies/*`. - # - # @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_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::DeleteEndpointPolicyRequest.new - # - # # Call the delete_endpoint_policy method. - # result = client.delete_endpoint_policy 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_endpoint_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::DeleteEndpointPolicyRequest - - # Converts hash 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_endpoint_policy.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::NetworkServices::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_endpoint_policy.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_endpoint_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.call_rpc :delete_endpoint_policy, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists `WasmPluginVersion` resources in a given project and - # location. - # - # @overload list_wasm_plugin_versions(request, options = nil) - # Pass arguments to `list_wasm_plugin_versions` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::ListWasmPluginVersionsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::ListWasmPluginVersionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_wasm_plugin_versions(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_wasm_plugin_versions` via keyword arguments. Note that at - # least one keyword argument is 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 `WasmPlugin` resource whose `WasmPluginVersion`s - # are listed, specified in the following format: - # `projects/{project}/locations/global/wasmPlugins/{wasm_plugin}`. - # @param page_size [::Integer] - # Maximum number of `WasmPluginVersion` resources to return per - # call. If not specified, at most 50 `WasmPluginVersion` resources are - # returned. The maximum value is 1000; values above 1000 are coerced to - # 1000. - # @param page_token [::String] - # The value returned by the last `ListWasmPluginVersionsResponse` call. - # Indicates that this is a continuation of a prior - # `ListWasmPluginVersions` call, and that the - # next page of data is to be returned. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::NetworkServices::V1::WasmPluginVersion>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::NetworkServices::V1::WasmPluginVersion>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/network_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::ListWasmPluginVersionsRequest.new - # - # # Call the list_wasm_plugin_versions method. - # result = client.list_wasm_plugin_versions 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::NetworkServices::V1::WasmPluginVersion. - # p item - # end - # - def list_wasm_plugin_versions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::ListWasmPluginVersionsRequest - - # Converts hash 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_wasm_plugin_versions.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::NetworkServices::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_wasm_plugin_versions.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_wasm_plugin_versions.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.call_rpc :list_wasm_plugin_versions, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @network_services_stub, :list_wasm_plugin_versions, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets details of the specified `WasmPluginVersion` resource. - # - # @overload get_wasm_plugin_version(request, options = nil) - # Pass arguments to `get_wasm_plugin_version` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::GetWasmPluginVersionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::GetWasmPluginVersionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_wasm_plugin_version(name: nil) - # Pass arguments to `get_wasm_plugin_version` via keyword arguments. Note that at - # least one keyword argument is 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. A name of the `WasmPluginVersion` resource to get. Must be in - # the format - # `projects/{project}/locations/global/wasmPlugins/{wasm_plugin}/versions/{wasm_plugin_version}`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::NetworkServices::V1::WasmPluginVersion] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::NetworkServices::V1::WasmPluginVersion] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/network_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::GetWasmPluginVersionRequest.new - # - # # Call the get_wasm_plugin_version method. - # result = client.get_wasm_plugin_version request - # - # # The returned object is of type Google::Cloud::NetworkServices::V1::WasmPluginVersion. - # p result - # - def get_wasm_plugin_version request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::GetWasmPluginVersionRequest - - # Converts hash 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_wasm_plugin_version.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::NetworkServices::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_wasm_plugin_version.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_wasm_plugin_version.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.call_rpc :get_wasm_plugin_version, 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 `WasmPluginVersion` resource in a given project - # and location. - # - # @overload create_wasm_plugin_version(request, options = nil) - # Pass arguments to `create_wasm_plugin_version` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::CreateWasmPluginVersionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::CreateWasmPluginVersionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_wasm_plugin_version(parent: nil, wasm_plugin_version_id: nil, wasm_plugin_version: nil) - # Pass arguments to `create_wasm_plugin_version` via keyword arguments. Note that at - # least one keyword argument is 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 `WasmPluginVersion` resource. Must be - # in the format - # `projects/{project}/locations/global/wasmPlugins/{wasm_plugin}`. - # @param wasm_plugin_version_id [::String] - # Required. User-provided ID of the `WasmPluginVersion` resource to be - # created. - # @param wasm_plugin_version [::Google::Cloud::NetworkServices::V1::WasmPluginVersion, ::Hash] - # Required. `WasmPluginVersion` resource to be created. - # - # @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_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::CreateWasmPluginVersionRequest.new - # - # # Call the create_wasm_plugin_version method. - # result = client.create_wasm_plugin_version 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_wasm_plugin_version request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::CreateWasmPluginVersionRequest - - # Converts hash 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_wasm_plugin_version.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::NetworkServices::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_wasm_plugin_version.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_wasm_plugin_version.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.call_rpc :create_wasm_plugin_version, 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 the specified `WasmPluginVersion` resource. - # - # @overload delete_wasm_plugin_version(request, options = nil) - # Pass arguments to `delete_wasm_plugin_version` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::DeleteWasmPluginVersionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::DeleteWasmPluginVersionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_wasm_plugin_version(name: nil) - # Pass arguments to `delete_wasm_plugin_version` via keyword arguments. Note that at - # least one keyword argument is 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. A name of the `WasmPluginVersion` resource to delete. Must be in - # the format - # `projects/{project}/locations/global/wasmPlugins/{wasm_plugin}/versions/{wasm_plugin_version}`. - # - # @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_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::DeleteWasmPluginVersionRequest.new - # - # # Call the delete_wasm_plugin_version method. - # result = client.delete_wasm_plugin_version 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_wasm_plugin_version request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::DeleteWasmPluginVersionRequest - - # Converts hash 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_wasm_plugin_version.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::NetworkServices::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_wasm_plugin_version.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_wasm_plugin_version.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.call_rpc :delete_wasm_plugin_version, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists `WasmPlugin` resources in a given project and - # location. - # - # @overload list_wasm_plugins(request, options = nil) - # Pass arguments to `list_wasm_plugins` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::ListWasmPluginsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::ListWasmPluginsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_wasm_plugins(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_wasm_plugins` via keyword arguments. Note that at - # least one keyword argument is 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 project and location from which the `WasmPlugin` resources - # are listed, specified in the following format: - # `projects/{project}/locations/global`. - # @param page_size [::Integer] - # Maximum number of `WasmPlugin` resources to return per call. - # If not specified, at most 50 `WasmPlugin` resources are returned. - # The maximum value is 1000; values above 1000 are coerced to 1000. - # @param page_token [::String] - # The value returned by the last `ListWasmPluginsResponse` call. - # Indicates that this is a continuation of a prior - # `ListWasmPlugins` call, and that the - # next page of data is to be returned. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::NetworkServices::V1::WasmPlugin>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::NetworkServices::V1::WasmPlugin>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/network_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::ListWasmPluginsRequest.new - # - # # Call the list_wasm_plugins method. - # result = client.list_wasm_plugins 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::NetworkServices::V1::WasmPlugin. - # p item - # end - # - def list_wasm_plugins request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::ListWasmPluginsRequest - - # Converts hash 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_wasm_plugins.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::NetworkServices::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_wasm_plugins.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_wasm_plugins.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.call_rpc :list_wasm_plugins, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @network_services_stub, :list_wasm_plugins, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets details of the specified `WasmPlugin` resource. - # - # @overload get_wasm_plugin(request, options = nil) - # Pass arguments to `get_wasm_plugin` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::GetWasmPluginRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::GetWasmPluginRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_wasm_plugin(name: nil, view: nil) - # Pass arguments to `get_wasm_plugin` via keyword arguments. Note that at - # least one keyword argument is 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. A name of the `WasmPlugin` resource to get. Must be in the - # format `projects/{project}/locations/global/wasmPlugins/{wasm_plugin}`. - # @param view [::Google::Cloud::NetworkServices::V1::WasmPluginView] - # Determines how much data must be returned in the response. See - # [AIP-157](https://google.aip.dev/157). - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::NetworkServices::V1::WasmPlugin] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::NetworkServices::V1::WasmPlugin] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/network_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::GetWasmPluginRequest.new - # - # # Call the get_wasm_plugin method. - # result = client.get_wasm_plugin request - # - # # The returned object is of type Google::Cloud::NetworkServices::V1::WasmPlugin. - # p result - # - def get_wasm_plugin request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::GetWasmPluginRequest - - # Converts hash 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_wasm_plugin.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::NetworkServices::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_wasm_plugin.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_wasm_plugin.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.call_rpc :get_wasm_plugin, 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 `WasmPlugin` resource in a given project - # and location. - # - # @overload create_wasm_plugin(request, options = nil) - # Pass arguments to `create_wasm_plugin` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::CreateWasmPluginRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::CreateWasmPluginRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_wasm_plugin(parent: nil, wasm_plugin_id: nil, wasm_plugin: nil) - # Pass arguments to `create_wasm_plugin` via keyword arguments. Note that at - # least one keyword argument is 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 `WasmPlugin` resource. Must be in the - # format `projects/{project}/locations/global`. - # @param wasm_plugin_id [::String] - # Required. User-provided ID of the `WasmPlugin` resource to be created. - # @param wasm_plugin [::Google::Cloud::NetworkServices::V1::WasmPlugin, ::Hash] - # Required. `WasmPlugin` resource to be created. - # - # @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_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::CreateWasmPluginRequest.new - # - # # Call the create_wasm_plugin method. - # result = client.create_wasm_plugin 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_wasm_plugin request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::CreateWasmPluginRequest - - # Converts hash 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_wasm_plugin.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::NetworkServices::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_wasm_plugin.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_wasm_plugin.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.call_rpc :create_wasm_plugin, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the parameters of the specified `WasmPlugin` resource. - # - # @overload update_wasm_plugin(request, options = nil) - # Pass arguments to `update_wasm_plugin` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::UpdateWasmPluginRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::UpdateWasmPluginRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_wasm_plugin(update_mask: nil, wasm_plugin: nil) - # Pass arguments to `update_wasm_plugin` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. Used to specify the fields to be overwritten in the - # `WasmPlugin` resource by the update. - # The fields specified in the `update_mask` field are relative to the - # resource, not the full request. - # An omitted `update_mask` field is treated as an implied `update_mask` - # field equivalent to all fields that are populated (that have a non-empty - # value). - # The `update_mask` field supports a special value `*`, which means that - # each field in the given `WasmPlugin` resource (including the empty ones) - # replaces the current value. - # @param wasm_plugin [::Google::Cloud::NetworkServices::V1::WasmPlugin, ::Hash] - # Required. Updated `WasmPlugin` 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_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::UpdateWasmPluginRequest.new - # - # # Call the update_wasm_plugin method. - # result = client.update_wasm_plugin 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_wasm_plugin request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::UpdateWasmPluginRequest - - # Converts hash 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_wasm_plugin.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::NetworkServices::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.wasm_plugin&.name - header_params["wasm_plugin.name"] = request.wasm_plugin.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_wasm_plugin.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_wasm_plugin.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.call_rpc :update_wasm_plugin, 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 the specified `WasmPlugin` resource. - # - # @overload delete_wasm_plugin(request, options = nil) - # Pass arguments to `delete_wasm_plugin` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::DeleteWasmPluginRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::DeleteWasmPluginRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_wasm_plugin(name: nil) - # Pass arguments to `delete_wasm_plugin` via keyword arguments. Note that at - # least one keyword argument is 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. A name of the `WasmPlugin` resource to delete. Must be in the - # format `projects/{project}/locations/global/wasmPlugins/{wasm_plugin}`. - # - # @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_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::DeleteWasmPluginRequest.new - # - # # Call the delete_wasm_plugin method. - # result = client.delete_wasm_plugin 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_wasm_plugin request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::DeleteWasmPluginRequest - - # Converts hash 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_wasm_plugin.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::NetworkServices::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_wasm_plugin.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_wasm_plugin.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.call_rpc :delete_wasm_plugin, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists Gateways in a given project and location. - # - # @overload list_gateways(request, options = nil) - # Pass arguments to `list_gateways` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::ListGatewaysRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::ListGatewaysRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_gateways(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_gateways` via keyword arguments. Note that at - # least one keyword argument is 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 project and location from which the Gateways should be - # listed, specified in the format `projects/*/locations/*`. - # @param page_size [::Integer] - # Maximum number of Gateways to return per call. - # @param page_token [::String] - # The value returned by the last `ListGatewaysResponse` - # Indicates that this is a continuation of a prior `ListGateways` call, - # and that the system should return the next page of data. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::NetworkServices::V1::Gateway>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::NetworkServices::V1::Gateway>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/network_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::ListGatewaysRequest.new - # - # # Call the list_gateways method. - # result = client.list_gateways 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::NetworkServices::V1::Gateway. - # p item - # end - # - def list_gateways request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::ListGatewaysRequest - - # Converts hash 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_gateways.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::NetworkServices::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_gateways.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_gateways.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.call_rpc :list_gateways, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @network_services_stub, :list_gateways, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets details of a single Gateway. - # - # @overload get_gateway(request, options = nil) - # Pass arguments to `get_gateway` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::GetGatewayRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::GetGatewayRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_gateway(name: nil) - # Pass arguments to `get_gateway` via keyword arguments. Note that at - # least one keyword argument is 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. A name of the Gateway to get. Must be in the format - # `projects/*/locations/*/gateways/*`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::NetworkServices::V1::Gateway] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::NetworkServices::V1::Gateway] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/network_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::GetGatewayRequest.new - # - # # Call the get_gateway method. - # result = client.get_gateway request - # - # # The returned object is of type Google::Cloud::NetworkServices::V1::Gateway. - # p result - # - def get_gateway request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::GetGatewayRequest - - # Converts hash 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_gateway.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::NetworkServices::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_gateway.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_gateway.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.call_rpc :get_gateway, 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 Gateway in a given project and location. - # - # @overload create_gateway(request, options = nil) - # Pass arguments to `create_gateway` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::CreateGatewayRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::CreateGatewayRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_gateway(parent: nil, gateway_id: nil, gateway: nil) - # Pass arguments to `create_gateway` via keyword arguments. Note that at - # least one keyword argument is 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 Gateway. Must be in the - # format `projects/*/locations/*`. - # @param gateway_id [::String] - # Required. Short name of the Gateway resource to be created. - # @param gateway [::Google::Cloud::NetworkServices::V1::Gateway, ::Hash] - # Required. Gateway resource to be created. - # - # @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_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::CreateGatewayRequest.new - # - # # Call the create_gateway method. - # result = client.create_gateway 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_gateway request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::CreateGatewayRequest - - # Converts hash 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_gateway.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::NetworkServices::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_gateway.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_gateway.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.call_rpc :create_gateway, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the parameters of a single Gateway. - # - # @overload update_gateway(request, options = nil) - # Pass arguments to `update_gateway` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::UpdateGatewayRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::UpdateGatewayRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_gateway(update_mask: nil, gateway: nil) - # Pass arguments to `update_gateway` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. Field mask is used to specify the fields to be overwritten in the - # Gateway resource by the update. - # The fields specified in the update_mask are relative to the resource, not - # the full request. A field will be overwritten if it is in the mask. If the - # user does not provide a mask then all fields will be overwritten. - # @param gateway [::Google::Cloud::NetworkServices::V1::Gateway, ::Hash] - # Required. Updated Gateway 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_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::UpdateGatewayRequest.new - # - # # Call the update_gateway method. - # result = client.update_gateway 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_gateway request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::UpdateGatewayRequest - - # Converts hash 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_gateway.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::NetworkServices::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.gateway&.name - header_params["gateway.name"] = request.gateway.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_gateway.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_gateway.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.call_rpc :update_gateway, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a single Gateway. - # - # @overload delete_gateway(request, options = nil) - # Pass arguments to `delete_gateway` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::DeleteGatewayRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::DeleteGatewayRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_gateway(name: nil) - # Pass arguments to `delete_gateway` via keyword arguments. Note that at - # least one keyword argument is 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. A name of the Gateway to delete. Must be in the format - # `projects/*/locations/*/gateways/*`. - # - # @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_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::DeleteGatewayRequest.new - # - # # Call the delete_gateway method. - # result = client.delete_gateway 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_gateway request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::DeleteGatewayRequest - - # Converts hash 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_gateway.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::NetworkServices::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_gateway.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_gateway.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.call_rpc :delete_gateway, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists GrpcRoutes in a given project and location. - # - # @overload list_grpc_routes(request, options = nil) - # Pass arguments to `list_grpc_routes` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::ListGrpcRoutesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::ListGrpcRoutesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_grpc_routes(parent: nil, page_size: nil, page_token: nil, return_partial_success: nil) - # Pass arguments to `list_grpc_routes` via keyword arguments. Note that at - # least one keyword argument is 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 project and location from which the GrpcRoutes should be - # listed, specified in the format `projects/*/locations/*`. - # @param page_size [::Integer] - # Maximum number of GrpcRoutes to return per call. - # @param page_token [::String] - # The value returned by the last `ListGrpcRoutesResponse` - # Indicates that this is a continuation of a prior `ListGrpcRoutes` call, - # and that the system should return the next page of data. - # @param return_partial_success [::Boolean] - # Optional. If true, allow partial responses for multi-regional Aggregated - # List requests. Otherwise if one of the locations is down or unreachable, - # the Aggregated List request will fail. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::NetworkServices::V1::GrpcRoute>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::NetworkServices::V1::GrpcRoute>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/network_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::ListGrpcRoutesRequest.new - # - # # Call the list_grpc_routes method. - # result = client.list_grpc_routes 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::NetworkServices::V1::GrpcRoute. - # p item - # end - # - def list_grpc_routes request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::ListGrpcRoutesRequest - - # Converts hash 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_grpc_routes.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::NetworkServices::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_grpc_routes.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_grpc_routes.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.call_rpc :list_grpc_routes, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @network_services_stub, :list_grpc_routes, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets details of a single GrpcRoute. - # - # @overload get_grpc_route(request, options = nil) - # Pass arguments to `get_grpc_route` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::GetGrpcRouteRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::GetGrpcRouteRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_grpc_route(name: nil) - # Pass arguments to `get_grpc_route` via keyword arguments. Note that at - # least one keyword argument is 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. A name of the GrpcRoute to get. Must be in the format - # `projects/*/locations/*/grpcRoutes/*`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::NetworkServices::V1::GrpcRoute] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::NetworkServices::V1::GrpcRoute] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/network_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::GetGrpcRouteRequest.new - # - # # Call the get_grpc_route method. - # result = client.get_grpc_route request - # - # # The returned object is of type Google::Cloud::NetworkServices::V1::GrpcRoute. - # p result - # - def get_grpc_route request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::GetGrpcRouteRequest - - # Converts hash 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_grpc_route.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::NetworkServices::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_grpc_route.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_grpc_route.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.call_rpc :get_grpc_route, 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 GrpcRoute in a given project and location. - # - # @overload create_grpc_route(request, options = nil) - # Pass arguments to `create_grpc_route` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::CreateGrpcRouteRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::CreateGrpcRouteRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_grpc_route(parent: nil, grpc_route_id: nil, grpc_route: nil) - # Pass arguments to `create_grpc_route` via keyword arguments. Note that at - # least one keyword argument is 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 GrpcRoute. Must be in the - # format `projects/*/locations/*`. - # @param grpc_route_id [::String] - # Required. Short name of the GrpcRoute resource to be created. - # @param grpc_route [::Google::Cloud::NetworkServices::V1::GrpcRoute, ::Hash] - # Required. GrpcRoute resource to be created. - # - # @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_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::CreateGrpcRouteRequest.new - # - # # Call the create_grpc_route method. - # result = client.create_grpc_route 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_grpc_route request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::CreateGrpcRouteRequest - - # Converts hash 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_grpc_route.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::NetworkServices::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_grpc_route.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_grpc_route.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.call_rpc :create_grpc_route, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the parameters of a single GrpcRoute. - # - # @overload update_grpc_route(request, options = nil) - # Pass arguments to `update_grpc_route` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::UpdateGrpcRouteRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::UpdateGrpcRouteRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_grpc_route(update_mask: nil, grpc_route: nil) - # Pass arguments to `update_grpc_route` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. Field mask is used to specify the fields to be overwritten in the - # GrpcRoute resource by the update. - # The fields specified in the update_mask are relative to the resource, not - # the full request. A field will be overwritten if it is in the mask. If the - # user does not provide a mask then all fields will be overwritten. - # @param grpc_route [::Google::Cloud::NetworkServices::V1::GrpcRoute, ::Hash] - # Required. Updated GrpcRoute 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_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::UpdateGrpcRouteRequest.new - # - # # Call the update_grpc_route method. - # result = client.update_grpc_route 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_grpc_route request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::UpdateGrpcRouteRequest - - # Converts hash 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_grpc_route.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::NetworkServices::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.grpc_route&.name - header_params["grpc_route.name"] = request.grpc_route.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_grpc_route.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_grpc_route.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.call_rpc :update_grpc_route, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a single GrpcRoute. - # - # @overload delete_grpc_route(request, options = nil) - # Pass arguments to `delete_grpc_route` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::DeleteGrpcRouteRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::DeleteGrpcRouteRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_grpc_route(name: nil) - # Pass arguments to `delete_grpc_route` via keyword arguments. Note that at - # least one keyword argument is 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. A name of the GrpcRoute to delete. Must be in the format - # `projects/*/locations/*/grpcRoutes/*`. - # - # @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_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::DeleteGrpcRouteRequest.new - # - # # Call the delete_grpc_route method. - # result = client.delete_grpc_route 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_grpc_route request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::DeleteGrpcRouteRequest - - # Converts hash 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_grpc_route.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::NetworkServices::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_grpc_route.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_grpc_route.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.call_rpc :delete_grpc_route, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists HttpRoute in a given project and location. - # - # @overload list_http_routes(request, options = nil) - # Pass arguments to `list_http_routes` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::ListHttpRoutesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::ListHttpRoutesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_http_routes(parent: nil, page_size: nil, page_token: nil, return_partial_success: nil, filter: nil) - # Pass arguments to `list_http_routes` via keyword arguments. Note that at - # least one keyword argument is 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 project and location from which the HttpRoutes should be - # listed, specified in the format `projects/*/locations/*`. - # @param page_size [::Integer] - # Maximum number of HttpRoutes to return per call. - # @param page_token [::String] - # The value returned by the last `ListHttpRoutesResponse` - # Indicates that this is a continuation of a prior `ListHttpRoutes` call, - # and that the system should return the next page of data. - # @param return_partial_success [::Boolean] - # Optional. If true, allow partial responses for multi-regional Aggregated - # List requests. Otherwise if one of the locations is down or unreachable, - # the Aggregated List request will fail. - # @param filter [::String] - # Optional. Filter expression to restrict the list. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::NetworkServices::V1::HttpRoute>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::NetworkServices::V1::HttpRoute>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/network_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::ListHttpRoutesRequest.new - # - # # Call the list_http_routes method. - # result = client.list_http_routes 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::NetworkServices::V1::HttpRoute. - # p item - # end - # - def list_http_routes request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::ListHttpRoutesRequest - - # Converts hash 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_http_routes.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::NetworkServices::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_http_routes.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_http_routes.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.call_rpc :list_http_routes, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @network_services_stub, :list_http_routes, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets details of a single HttpRoute. - # - # @overload get_http_route(request, options = nil) - # Pass arguments to `get_http_route` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::GetHttpRouteRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::GetHttpRouteRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_http_route(name: nil) - # Pass arguments to `get_http_route` via keyword arguments. Note that at - # least one keyword argument is 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. A name of the HttpRoute to get. Must be in the format - # `projects/*/locations/*/httpRoutes/*`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::NetworkServices::V1::HttpRoute] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::NetworkServices::V1::HttpRoute] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/network_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::GetHttpRouteRequest.new - # - # # Call the get_http_route method. - # result = client.get_http_route request - # - # # The returned object is of type Google::Cloud::NetworkServices::V1::HttpRoute. - # p result - # - def get_http_route request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::GetHttpRouteRequest - - # Converts hash 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_http_route.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::NetworkServices::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_http_route.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_http_route.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.call_rpc :get_http_route, 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 HttpRoute in a given project and location. - # - # @overload create_http_route(request, options = nil) - # Pass arguments to `create_http_route` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::CreateHttpRouteRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::CreateHttpRouteRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_http_route(parent: nil, http_route_id: nil, http_route: nil, request_id: nil) - # Pass arguments to `create_http_route` via keyword arguments. Note that at - # least one keyword argument is 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 HttpRoute. Must be in the - # format `projects/*/locations/*`. - # @param http_route_id [::String] - # Required. Short name of the HttpRoute resource to be created. - # @param http_route [::Google::Cloud::NetworkServices::V1::HttpRoute, ::Hash] - # Required. HttpRoute resource to be created. - # @param request_id [::String] - # Optional. Idempotent request UUID. - # - # @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_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::CreateHttpRouteRequest.new - # - # # Call the create_http_route method. - # result = client.create_http_route 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_http_route request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::CreateHttpRouteRequest - - # Converts hash 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_http_route.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::NetworkServices::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_http_route.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_http_route.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.call_rpc :create_http_route, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the parameters of a single HttpRoute. - # - # @overload update_http_route(request, options = nil) - # Pass arguments to `update_http_route` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::UpdateHttpRouteRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::UpdateHttpRouteRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_http_route(update_mask: nil, http_route: nil) - # Pass arguments to `update_http_route` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. Field mask is used to specify the fields to be overwritten in the - # HttpRoute resource by the update. - # The fields specified in the update_mask are relative to the resource, not - # the full request. A field will be overwritten if it is in the mask. If the - # user does not provide a mask then all fields will be overwritten. - # @param http_route [::Google::Cloud::NetworkServices::V1::HttpRoute, ::Hash] - # Required. Updated HttpRoute 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_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::UpdateHttpRouteRequest.new - # - # # Call the update_http_route method. - # result = client.update_http_route 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_http_route request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::UpdateHttpRouteRequest - - # Converts hash 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_http_route.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::NetworkServices::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.http_route&.name - header_params["http_route.name"] = request.http_route.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_http_route.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_http_route.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.call_rpc :update_http_route, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a single HttpRoute. - # - # @overload delete_http_route(request, options = nil) - # Pass arguments to `delete_http_route` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::DeleteHttpRouteRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::DeleteHttpRouteRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_http_route(name: nil) - # Pass arguments to `delete_http_route` via keyword arguments. Note that at - # least one keyword argument is 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. A name of the HttpRoute to delete. Must be in the format - # `projects/*/locations/*/httpRoutes/*`. - # - # @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_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::DeleteHttpRouteRequest.new - # - # # Call the delete_http_route method. - # result = client.delete_http_route 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_http_route request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::DeleteHttpRouteRequest - - # Converts hash 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_http_route.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::NetworkServices::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_http_route.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_http_route.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.call_rpc :delete_http_route, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists TcpRoute in a given project and location. - # - # @overload list_tcp_routes(request, options = nil) - # Pass arguments to `list_tcp_routes` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::ListTcpRoutesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::ListTcpRoutesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_tcp_routes(parent: nil, page_size: nil, page_token: nil, return_partial_success: nil) - # Pass arguments to `list_tcp_routes` via keyword arguments. Note that at - # least one keyword argument is 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 project and location from which the TcpRoutes should be - # listed, specified in the format `projects/*/locations/*`. - # @param page_size [::Integer] - # Maximum number of TcpRoutes to return per call. - # @param page_token [::String] - # The value returned by the last `ListTcpRoutesResponse` - # Indicates that this is a continuation of a prior `ListTcpRoutes` call, - # and that the system should return the next page of data. - # @param return_partial_success [::Boolean] - # Optional. If true, allow partial responses for multi-regional Aggregated - # List requests. Otherwise if one of the locations is down or unreachable, - # the Aggregated List request will fail. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::NetworkServices::V1::TcpRoute>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::NetworkServices::V1::TcpRoute>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/network_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::ListTcpRoutesRequest.new - # - # # Call the list_tcp_routes method. - # result = client.list_tcp_routes 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::NetworkServices::V1::TcpRoute. - # p item - # end - # - def list_tcp_routes request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::ListTcpRoutesRequest - - # Converts hash 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_tcp_routes.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::NetworkServices::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_tcp_routes.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_tcp_routes.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.call_rpc :list_tcp_routes, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @network_services_stub, :list_tcp_routes, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets details of a single TcpRoute. - # - # @overload get_tcp_route(request, options = nil) - # Pass arguments to `get_tcp_route` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::GetTcpRouteRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::GetTcpRouteRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_tcp_route(name: nil) - # Pass arguments to `get_tcp_route` via keyword arguments. Note that at - # least one keyword argument is 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. A name of the TcpRoute to get. Must be in the format - # `projects/*/locations/*/tcpRoutes/*`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::NetworkServices::V1::TcpRoute] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::NetworkServices::V1::TcpRoute] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/network_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::GetTcpRouteRequest.new - # - # # Call the get_tcp_route method. - # result = client.get_tcp_route request - # - # # The returned object is of type Google::Cloud::NetworkServices::V1::TcpRoute. - # p result - # - def get_tcp_route request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::GetTcpRouteRequest - - # Converts hash 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_tcp_route.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::NetworkServices::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_tcp_route.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_tcp_route.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.call_rpc :get_tcp_route, 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 TcpRoute in a given project and location. - # - # @overload create_tcp_route(request, options = nil) - # Pass arguments to `create_tcp_route` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::CreateTcpRouteRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::CreateTcpRouteRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_tcp_route(parent: nil, tcp_route_id: nil, tcp_route: nil) - # Pass arguments to `create_tcp_route` via keyword arguments. Note that at - # least one keyword argument is 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 TcpRoute. Must be in the - # format `projects/*/locations/*`. - # @param tcp_route_id [::String] - # Required. Short name of the TcpRoute resource to be created. - # @param tcp_route [::Google::Cloud::NetworkServices::V1::TcpRoute, ::Hash] - # Required. TcpRoute resource to be created. - # - # @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_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::CreateTcpRouteRequest.new - # - # # Call the create_tcp_route method. - # result = client.create_tcp_route 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_tcp_route request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::CreateTcpRouteRequest - - # Converts hash 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_tcp_route.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::NetworkServices::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_tcp_route.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_tcp_route.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.call_rpc :create_tcp_route, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the parameters of a single TcpRoute. - # - # @overload update_tcp_route(request, options = nil) - # Pass arguments to `update_tcp_route` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::UpdateTcpRouteRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::UpdateTcpRouteRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_tcp_route(update_mask: nil, tcp_route: nil) - # Pass arguments to `update_tcp_route` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. Field mask is used to specify the fields to be overwritten in the - # TcpRoute resource by the update. - # The fields specified in the update_mask are relative to the resource, not - # the full request. A field will be overwritten if it is in the mask. If the - # user does not provide a mask then all fields will be overwritten. - # @param tcp_route [::Google::Cloud::NetworkServices::V1::TcpRoute, ::Hash] - # Required. Updated TcpRoute 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_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::UpdateTcpRouteRequest.new - # - # # Call the update_tcp_route method. - # result = client.update_tcp_route 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_tcp_route request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::UpdateTcpRouteRequest - - # Converts hash 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_tcp_route.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::NetworkServices::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.tcp_route&.name - header_params["tcp_route.name"] = request.tcp_route.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_tcp_route.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_tcp_route.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.call_rpc :update_tcp_route, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a single TcpRoute. - # - # @overload delete_tcp_route(request, options = nil) - # Pass arguments to `delete_tcp_route` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::DeleteTcpRouteRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::DeleteTcpRouteRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_tcp_route(name: nil) - # Pass arguments to `delete_tcp_route` via keyword arguments. Note that at - # least one keyword argument is 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. A name of the TcpRoute to delete. Must be in the format - # `projects/*/locations/*/tcpRoutes/*`. - # - # @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_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::DeleteTcpRouteRequest.new - # - # # Call the delete_tcp_route method. - # result = client.delete_tcp_route 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_tcp_route request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::DeleteTcpRouteRequest - - # Converts hash 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_tcp_route.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::NetworkServices::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_tcp_route.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_tcp_route.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.call_rpc :delete_tcp_route, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists TlsRoute in a given project and location. - # - # @overload list_tls_routes(request, options = nil) - # Pass arguments to `list_tls_routes` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::ListTlsRoutesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::ListTlsRoutesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_tls_routes(parent: nil, page_size: nil, page_token: nil, return_partial_success: nil) - # Pass arguments to `list_tls_routes` via keyword arguments. Note that at - # least one keyword argument is 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 project and location from which the TlsRoutes should be - # listed, specified in the format `projects/*/locations/*`. - # @param page_size [::Integer] - # Maximum number of TlsRoutes to return per call. - # @param page_token [::String] - # The value returned by the last `ListTlsRoutesResponse` - # Indicates that this is a continuation of a prior `ListTlsRoutes` call, - # and that the system should return the next page of data. - # @param return_partial_success [::Boolean] - # Optional. If true, allow partial responses for multi-regional Aggregated - # List requests. Otherwise if one of the locations is down or unreachable, - # the Aggregated List request will fail. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::NetworkServices::V1::TlsRoute>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::NetworkServices::V1::TlsRoute>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/network_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::ListTlsRoutesRequest.new - # - # # Call the list_tls_routes method. - # result = client.list_tls_routes 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::NetworkServices::V1::TlsRoute. - # p item - # end - # - def list_tls_routes request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::ListTlsRoutesRequest - - # Converts hash 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_tls_routes.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::NetworkServices::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_tls_routes.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_tls_routes.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.call_rpc :list_tls_routes, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @network_services_stub, :list_tls_routes, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets details of a single TlsRoute. - # - # @overload get_tls_route(request, options = nil) - # Pass arguments to `get_tls_route` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::GetTlsRouteRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::GetTlsRouteRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_tls_route(name: nil) - # Pass arguments to `get_tls_route` via keyword arguments. Note that at - # least one keyword argument is 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. A name of the TlsRoute to get. Must be in the format - # `projects/*/locations/*/tlsRoutes/*`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::NetworkServices::V1::TlsRoute] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::NetworkServices::V1::TlsRoute] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/network_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::GetTlsRouteRequest.new - # - # # Call the get_tls_route method. - # result = client.get_tls_route request - # - # # The returned object is of type Google::Cloud::NetworkServices::V1::TlsRoute. - # p result - # - def get_tls_route request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::GetTlsRouteRequest - - # Converts hash 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_tls_route.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::NetworkServices::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_tls_route.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_tls_route.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.call_rpc :get_tls_route, 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 TlsRoute in a given project and location. - # - # @overload create_tls_route(request, options = nil) - # Pass arguments to `create_tls_route` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::CreateTlsRouteRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::CreateTlsRouteRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_tls_route(parent: nil, tls_route_id: nil, tls_route: nil) - # Pass arguments to `create_tls_route` via keyword arguments. Note that at - # least one keyword argument is 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 TlsRoute. Must be in the - # format `projects/*/locations/*`. - # @param tls_route_id [::String] - # Required. Short name of the TlsRoute resource to be created. - # @param tls_route [::Google::Cloud::NetworkServices::V1::TlsRoute, ::Hash] - # Required. TlsRoute resource to be created. - # - # @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_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::CreateTlsRouteRequest.new - # - # # Call the create_tls_route method. - # result = client.create_tls_route 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_tls_route request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::CreateTlsRouteRequest - - # Converts hash 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_tls_route.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::NetworkServices::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_tls_route.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_tls_route.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.call_rpc :create_tls_route, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the parameters of a single TlsRoute. - # - # @overload update_tls_route(request, options = nil) - # Pass arguments to `update_tls_route` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::UpdateTlsRouteRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::UpdateTlsRouteRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_tls_route(update_mask: nil, tls_route: nil) - # Pass arguments to `update_tls_route` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. Field mask is used to specify the fields to be overwritten in the - # TlsRoute resource by the update. - # The fields specified in the update_mask are relative to the resource, not - # the full request. A field will be overwritten if it is in the mask. If the - # user does not provide a mask then all fields will be overwritten. - # @param tls_route [::Google::Cloud::NetworkServices::V1::TlsRoute, ::Hash] - # Required. Updated TlsRoute 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_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::UpdateTlsRouteRequest.new - # - # # Call the update_tls_route method. - # result = client.update_tls_route 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_tls_route request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::UpdateTlsRouteRequest - - # Converts hash 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_tls_route.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::NetworkServices::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.tls_route&.name - header_params["tls_route.name"] = request.tls_route.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_tls_route.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_tls_route.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.call_rpc :update_tls_route, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a single TlsRoute. - # - # @overload delete_tls_route(request, options = nil) - # Pass arguments to `delete_tls_route` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::DeleteTlsRouteRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::DeleteTlsRouteRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_tls_route(name: nil) - # Pass arguments to `delete_tls_route` via keyword arguments. Note that at - # least one keyword argument is 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. A name of the TlsRoute to delete. Must be in the format - # `projects/*/locations/*/tlsRoutes/*`. - # - # @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_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::DeleteTlsRouteRequest.new - # - # # Call the delete_tls_route method. - # result = client.delete_tls_route 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_tls_route request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::DeleteTlsRouteRequest - - # Converts hash 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_tls_route.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::NetworkServices::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_tls_route.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_tls_route.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.call_rpc :delete_tls_route, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists ServiceBinding in a given project and location. - # - # @overload list_service_bindings(request, options = nil) - # Pass arguments to `list_service_bindings` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::ListServiceBindingsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::ListServiceBindingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_service_bindings(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_service_bindings` via keyword arguments. Note that at - # least one keyword argument is 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 project and location from which the ServiceBindings should be - # listed, specified in the format `projects/*/locations/*`. - # @param page_size [::Integer] - # Maximum number of ServiceBindings to return per call. - # @param page_token [::String] - # The value returned by the last `ListServiceBindingsResponse` - # Indicates that this is a continuation of a prior `ListRouters` call, - # and that the system should return the next page of data. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::NetworkServices::V1::ServiceBinding>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::NetworkServices::V1::ServiceBinding>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/network_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::ListServiceBindingsRequest.new - # - # # Call the list_service_bindings method. - # result = client.list_service_bindings 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::NetworkServices::V1::ServiceBinding. - # p item - # end - # - def list_service_bindings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::ListServiceBindingsRequest - - # Converts hash 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_service_bindings.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::NetworkServices::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_service_bindings.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_service_bindings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.call_rpc :list_service_bindings, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @network_services_stub, :list_service_bindings, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets details of a single ServiceBinding. - # - # @overload get_service_binding(request, options = nil) - # Pass arguments to `get_service_binding` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::GetServiceBindingRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::GetServiceBindingRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_service_binding(name: nil) - # Pass arguments to `get_service_binding` via keyword arguments. Note that at - # least one keyword argument is 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. A name of the ServiceBinding to get. Must be in the format - # `projects/*/locations/*/serviceBindings/*`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::NetworkServices::V1::ServiceBinding] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::NetworkServices::V1::ServiceBinding] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/network_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::GetServiceBindingRequest.new - # - # # Call the get_service_binding method. - # result = client.get_service_binding request - # - # # The returned object is of type Google::Cloud::NetworkServices::V1::ServiceBinding. - # p result - # - def get_service_binding request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::GetServiceBindingRequest - - # Converts hash 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_service_binding.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::NetworkServices::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_service_binding.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_service_binding.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.call_rpc :get_service_binding, 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 ServiceBinding in a given project and location. - # - # @overload create_service_binding(request, options = nil) - # Pass arguments to `create_service_binding` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::CreateServiceBindingRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::CreateServiceBindingRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_service_binding(parent: nil, service_binding_id: nil, service_binding: nil) - # Pass arguments to `create_service_binding` via keyword arguments. Note that at - # least one keyword argument is 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 ServiceBinding. Must be in the - # format `projects/*/locations/*`. - # @param service_binding_id [::String] - # Required. Short name of the ServiceBinding resource to be created. - # @param service_binding [::Google::Cloud::NetworkServices::V1::ServiceBinding, ::Hash] - # Required. ServiceBinding resource to be created. - # - # @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_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::CreateServiceBindingRequest.new - # - # # Call the create_service_binding method. - # result = client.create_service_binding 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_service_binding request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::CreateServiceBindingRequest - - # Converts hash 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_service_binding.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::NetworkServices::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_service_binding.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_service_binding.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.call_rpc :create_service_binding, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the parameters of a single ServiceBinding. - # - # @overload update_service_binding(request, options = nil) - # Pass arguments to `update_service_binding` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::UpdateServiceBindingRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::UpdateServiceBindingRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_service_binding(update_mask: nil, service_binding: nil) - # Pass arguments to `update_service_binding` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. Field mask is used to specify the fields to be overwritten in the - # ServiceBinding resource by the update. - # The fields specified in the update_mask are relative to the resource, not - # the full request. A field will be overwritten if it is in the mask. If the - # user does not provide a mask then all fields will be overwritten. - # @param service_binding [::Google::Cloud::NetworkServices::V1::ServiceBinding, ::Hash] - # Required. Updated ServiceBinding 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_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::UpdateServiceBindingRequest.new - # - # # Call the update_service_binding method. - # result = client.update_service_binding 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_service_binding request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::UpdateServiceBindingRequest - - # Converts hash 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_service_binding.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::NetworkServices::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.service_binding&.name - header_params["service_binding.name"] = request.service_binding.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_service_binding.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_service_binding.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.call_rpc :update_service_binding, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a single ServiceBinding. - # - # @overload delete_service_binding(request, options = nil) - # Pass arguments to `delete_service_binding` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::DeleteServiceBindingRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::DeleteServiceBindingRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_service_binding(name: nil) - # Pass arguments to `delete_service_binding` via keyword arguments. Note that at - # least one keyword argument is 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. A name of the ServiceBinding to delete. Must be in the format - # `projects/*/locations/*/serviceBindings/*`. - # - # @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_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::DeleteServiceBindingRequest.new - # - # # Call the delete_service_binding method. - # result = client.delete_service_binding 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_service_binding request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::DeleteServiceBindingRequest - - # Converts hash 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_service_binding.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::NetworkServices::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_service_binding.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_service_binding.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.call_rpc :delete_service_binding, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists Meshes in a given project and location. - # - # @overload list_meshes(request, options = nil) - # Pass arguments to `list_meshes` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::ListMeshesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::ListMeshesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_meshes(parent: nil, page_size: nil, page_token: nil, return_partial_success: nil) - # Pass arguments to `list_meshes` via keyword arguments. Note that at - # least one keyword argument is 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 project and location from which the Meshes should be - # listed, specified in the format `projects/*/locations/*`. - # @param page_size [::Integer] - # Maximum number of Meshes to return per call. - # @param page_token [::String] - # The value returned by the last `ListMeshesResponse` - # Indicates that this is a continuation of a prior `ListMeshes` call, - # and that the system should return the next page of data. - # @param return_partial_success [::Boolean] - # Optional. If true, allow partial responses for multi-regional Aggregated - # List requests. Otherwise if one of the locations is down or unreachable, - # the Aggregated List request will fail. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::NetworkServices::V1::Mesh>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::NetworkServices::V1::Mesh>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/network_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::ListMeshesRequest.new - # - # # Call the list_meshes method. - # result = client.list_meshes 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::NetworkServices::V1::Mesh. - # p item - # end - # - def list_meshes request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::ListMeshesRequest - - # Converts hash 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_meshes.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::NetworkServices::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_meshes.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_meshes.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.call_rpc :list_meshes, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @network_services_stub, :list_meshes, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets details of a single Mesh. - # - # @overload get_mesh(request, options = nil) - # Pass arguments to `get_mesh` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::GetMeshRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::GetMeshRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_mesh(name: nil) - # Pass arguments to `get_mesh` via keyword arguments. Note that at - # least one keyword argument is 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. A name of the Mesh to get. Must be in the format - # `projects/*/locations/*/meshes/*`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::NetworkServices::V1::Mesh] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::NetworkServices::V1::Mesh] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/network_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::GetMeshRequest.new - # - # # Call the get_mesh method. - # result = client.get_mesh request - # - # # The returned object is of type Google::Cloud::NetworkServices::V1::Mesh. - # p result - # - def get_mesh request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::GetMeshRequest - - # Converts hash 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_mesh.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::NetworkServices::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_mesh.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_mesh.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.call_rpc :get_mesh, 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 Mesh in a given project and location. - # - # @overload create_mesh(request, options = nil) - # Pass arguments to `create_mesh` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::CreateMeshRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::CreateMeshRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_mesh(parent: nil, mesh_id: nil, mesh: nil) - # Pass arguments to `create_mesh` via keyword arguments. Note that at - # least one keyword argument is 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 Mesh. Must be in the - # format `projects/*/locations/*`. - # @param mesh_id [::String] - # Required. Short name of the Mesh resource to be created. - # @param mesh [::Google::Cloud::NetworkServices::V1::Mesh, ::Hash] - # Required. Mesh resource to be created. - # - # @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_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::CreateMeshRequest.new - # - # # Call the create_mesh method. - # result = client.create_mesh 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_mesh request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::CreateMeshRequest - - # Converts hash 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_mesh.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::NetworkServices::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_mesh.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_mesh.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.call_rpc :create_mesh, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the parameters of a single Mesh. - # - # @overload update_mesh(request, options = nil) - # Pass arguments to `update_mesh` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::UpdateMeshRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::UpdateMeshRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_mesh(update_mask: nil, mesh: nil) - # Pass arguments to `update_mesh` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. Field mask is used to specify the fields to be overwritten in the - # Mesh resource by the update. - # The fields specified in the update_mask are relative to the resource, not - # the full request. A field will be overwritten if it is in the mask. If the - # user does not provide a mask then all fields will be overwritten. - # @param mesh [::Google::Cloud::NetworkServices::V1::Mesh, ::Hash] - # Required. Updated Mesh 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_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::UpdateMeshRequest.new - # - # # Call the update_mesh method. - # result = client.update_mesh 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_mesh request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::UpdateMeshRequest - - # Converts hash 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_mesh.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::NetworkServices::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.mesh&.name - header_params["mesh.name"] = request.mesh.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_mesh.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_mesh.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.call_rpc :update_mesh, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a single Mesh. - # - # @overload delete_mesh(request, options = nil) - # Pass arguments to `delete_mesh` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::DeleteMeshRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::DeleteMeshRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_mesh(name: nil) - # Pass arguments to `delete_mesh` via keyword arguments. Note that at - # least one keyword argument is 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. A name of the Mesh to delete. Must be in the format - # `projects/*/locations/*/meshes/*`. - # - # @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_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::DeleteMeshRequest.new - # - # # Call the delete_mesh method. - # result = client.delete_mesh 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_mesh request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::DeleteMeshRequest - - # Converts hash 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_mesh.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::NetworkServices::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_mesh.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_mesh.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.call_rpc :delete_mesh, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists ServiceLbPolicies in a given project and location. - # - # @overload list_service_lb_policies(request, options = nil) - # Pass arguments to `list_service_lb_policies` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::ListServiceLbPoliciesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::ListServiceLbPoliciesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_service_lb_policies(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_service_lb_policies` via keyword arguments. Note that at - # least one keyword argument is 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 project and location from which the ServiceLbPolicies should - # be listed, specified in the format - # `projects/{project}/locations/{location}`. - # @param page_size [::Integer] - # Maximum number of ServiceLbPolicies to return per call. - # @param page_token [::String] - # The value returned by the last `ListServiceLbPoliciesResponse` - # Indicates that this is a continuation of a prior `ListRouters` call, - # and that the system should return the next page of data. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::NetworkServices::V1::ServiceLbPolicy>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::NetworkServices::V1::ServiceLbPolicy>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/network_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::ListServiceLbPoliciesRequest.new - # - # # Call the list_service_lb_policies method. - # result = client.list_service_lb_policies 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::NetworkServices::V1::ServiceLbPolicy. - # p item - # end - # - def list_service_lb_policies request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::ListServiceLbPoliciesRequest - - # Converts hash 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_service_lb_policies.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::NetworkServices::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_service_lb_policies.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_service_lb_policies.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.call_rpc :list_service_lb_policies, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @network_services_stub, :list_service_lb_policies, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets details of a single ServiceLbPolicy. - # - # @overload get_service_lb_policy(request, options = nil) - # Pass arguments to `get_service_lb_policy` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::GetServiceLbPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::GetServiceLbPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_service_lb_policy(name: nil) - # Pass arguments to `get_service_lb_policy` via keyword arguments. Note that at - # least one keyword argument is 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. A name of the ServiceLbPolicy to get. Must be in the format - # `projects/{project}/locations/{location}/serviceLbPolicies/*`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::NetworkServices::V1::ServiceLbPolicy] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::NetworkServices::V1::ServiceLbPolicy] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/network_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::GetServiceLbPolicyRequest.new - # - # # Call the get_service_lb_policy method. - # result = client.get_service_lb_policy request - # - # # The returned object is of type Google::Cloud::NetworkServices::V1::ServiceLbPolicy. - # p result - # - def get_service_lb_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::GetServiceLbPolicyRequest - - # Converts hash 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_service_lb_policy.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::NetworkServices::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_service_lb_policy.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_service_lb_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.call_rpc :get_service_lb_policy, 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 ServiceLbPolicy in a given project and location. - # - # @overload create_service_lb_policy(request, options = nil) - # Pass arguments to `create_service_lb_policy` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::CreateServiceLbPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::CreateServiceLbPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_service_lb_policy(parent: nil, service_lb_policy_id: nil, service_lb_policy: nil) - # Pass arguments to `create_service_lb_policy` via keyword arguments. Note that at - # least one keyword argument is 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 ServiceLbPolicy. Must be in the - # format `projects/{project}/locations/{location}`. - # @param service_lb_policy_id [::String] - # Required. Short name of the ServiceLbPolicy resource to be created. - # E.g. for resource name - # `projects/{project}/locations/{location}/serviceLbPolicies/{service_lb_policy_name}`. - # the id is value of \\{service_lb_policy_name} - # @param service_lb_policy [::Google::Cloud::NetworkServices::V1::ServiceLbPolicy, ::Hash] - # Required. ServiceLbPolicy resource to be created. - # - # @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_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::CreateServiceLbPolicyRequest.new - # - # # Call the create_service_lb_policy method. - # result = client.create_service_lb_policy 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_service_lb_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::CreateServiceLbPolicyRequest - - # Converts hash 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_service_lb_policy.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::NetworkServices::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_service_lb_policy.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_service_lb_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.call_rpc :create_service_lb_policy, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the parameters of a single ServiceLbPolicy. - # - # @overload update_service_lb_policy(request, options = nil) - # Pass arguments to `update_service_lb_policy` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::UpdateServiceLbPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::UpdateServiceLbPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_service_lb_policy(update_mask: nil, service_lb_policy: nil) - # Pass arguments to `update_service_lb_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. Field mask is used to specify the fields to be overwritten in the - # ServiceLbPolicy resource by the update. - # The fields specified in the update_mask are relative to the resource, not - # the full request. A field will be overwritten if it is in the mask. If the - # user does not provide a mask then all fields will be overwritten. - # @param service_lb_policy [::Google::Cloud::NetworkServices::V1::ServiceLbPolicy, ::Hash] - # Required. Updated ServiceLbPolicy 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_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::UpdateServiceLbPolicyRequest.new - # - # # Call the update_service_lb_policy method. - # result = client.update_service_lb_policy 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_service_lb_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::UpdateServiceLbPolicyRequest - - # Converts hash 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_service_lb_policy.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::NetworkServices::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.service_lb_policy&.name - header_params["service_lb_policy.name"] = request.service_lb_policy.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_service_lb_policy.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_service_lb_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.call_rpc :update_service_lb_policy, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a single ServiceLbPolicy. - # - # @overload delete_service_lb_policy(request, options = nil) - # Pass arguments to `delete_service_lb_policy` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::DeleteServiceLbPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::DeleteServiceLbPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_service_lb_policy(name: nil) - # Pass arguments to `delete_service_lb_policy` via keyword arguments. Note that at - # least one keyword argument is 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. A name of the ServiceLbPolicy to delete. Must be in the format - # `projects/{project}/locations/{location}/serviceLbPolicies/*`. - # - # @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_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::DeleteServiceLbPolicyRequest.new - # - # # Call the delete_service_lb_policy method. - # result = client.delete_service_lb_policy 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_service_lb_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::DeleteServiceLbPolicyRequest - - # Converts hash 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_service_lb_policy.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::NetworkServices::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_service_lb_policy.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_service_lb_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.call_rpc :delete_service_lb_policy, 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 - - ## - # Get a single RouteView of a Gateway. - # - # @overload get_gateway_route_view(request, options = nil) - # Pass arguments to `get_gateway_route_view` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::GetGatewayRouteViewRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::GetGatewayRouteViewRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_gateway_route_view(name: nil) - # Pass arguments to `get_gateway_route_view` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the GatewayRouteView resource. - # Formats: - # projects/\\{project}/locations/\\{location}/gateways/\\{gateway}/routeViews/\\{route_view} - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::NetworkServices::V1::GatewayRouteView] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::NetworkServices::V1::GatewayRouteView] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/network_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::GetGatewayRouteViewRequest.new - # - # # Call the get_gateway_route_view method. - # result = client.get_gateway_route_view request - # - # # The returned object is of type Google::Cloud::NetworkServices::V1::GatewayRouteView. - # p result - # - def get_gateway_route_view request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::GetGatewayRouteViewRequest - - # Converts hash 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_gateway_route_view.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::NetworkServices::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_gateway_route_view.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_gateway_route_view.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.call_rpc :get_gateway_route_view, 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 - - ## - # Get a single RouteView of a Mesh. - # - # @overload get_mesh_route_view(request, options = nil) - # Pass arguments to `get_mesh_route_view` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::GetMeshRouteViewRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::GetMeshRouteViewRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_mesh_route_view(name: nil) - # Pass arguments to `get_mesh_route_view` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the MeshRouteView resource. - # Format: - # projects/\\{project}/locations/\\{location}/meshes/\\{mesh}/routeViews/\\{route_view} - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::NetworkServices::V1::MeshRouteView] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::NetworkServices::V1::MeshRouteView] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/network_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::GetMeshRouteViewRequest.new - # - # # Call the get_mesh_route_view method. - # result = client.get_mesh_route_view request - # - # # The returned object is of type Google::Cloud::NetworkServices::V1::MeshRouteView. - # p result - # - def get_mesh_route_view request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::GetMeshRouteViewRequest - - # Converts hash 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_mesh_route_view.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::NetworkServices::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_mesh_route_view.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_mesh_route_view.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.call_rpc :get_mesh_route_view, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists RouteViews - # - # @overload list_gateway_route_views(request, options = nil) - # Pass arguments to `list_gateway_route_views` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::ListGatewayRouteViewsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::ListGatewayRouteViewsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_gateway_route_views(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_gateway_route_views` via keyword arguments. Note that at - # least one keyword argument is 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 Gateway to which a Route is associated. - # Formats: - # projects/\\{project}/locations/\\{location}/gateways/\\{gateway} - # @param page_size [::Integer] - # Maximum number of GatewayRouteViews to return per call. - # @param page_token [::String] - # The value returned by the last `ListGatewayRouteViewsResponse` - # Indicates that this is a continuation of a prior `ListGatewayRouteViews` - # call, and that the system should return the next page of data. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::NetworkServices::V1::GatewayRouteView>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::NetworkServices::V1::GatewayRouteView>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/network_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::ListGatewayRouteViewsRequest.new - # - # # Call the list_gateway_route_views method. - # result = client.list_gateway_route_views 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::NetworkServices::V1::GatewayRouteView. - # p item - # end - # - def list_gateway_route_views request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::ListGatewayRouteViewsRequest - - # Converts hash 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_gateway_route_views.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::NetworkServices::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_gateway_route_views.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_gateway_route_views.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.call_rpc :list_gateway_route_views, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @network_services_stub, :list_gateway_route_views, 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 - - ## - # Lists RouteViews - # - # @overload list_mesh_route_views(request, options = nil) - # Pass arguments to `list_mesh_route_views` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::ListMeshRouteViewsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::ListMeshRouteViewsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_mesh_route_views(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_mesh_route_views` via keyword arguments. Note that at - # least one keyword argument is 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 Mesh to which a Route is associated. - # Format: - # projects/\\{project}/locations/\\{location}/meshes/\\{mesh} - # @param page_size [::Integer] - # Maximum number of MeshRouteViews to return per call. - # @param page_token [::String] - # The value returned by the last `ListMeshRouteViewsResponse` - # Indicates that this is a continuation of a prior `ListMeshRouteViews` call, - # and that the system should return the next page of data. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::NetworkServices::V1::MeshRouteView>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::NetworkServices::V1::MeshRouteView>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/network_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::ListMeshRouteViewsRequest.new - # - # # Call the list_mesh_route_views method. - # result = client.list_mesh_route_views 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::NetworkServices::V1::MeshRouteView. - # p item - # end - # - def list_mesh_route_views request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::ListMeshRouteViewsRequest - - # Converts hash 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_mesh_route_views.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::NetworkServices::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_mesh_route_views.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_mesh_route_views.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.call_rpc :list_mesh_route_views, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @network_services_stub, :list_mesh_route_views, 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 - - ## - # Lists AgentGateways in a given project and location. - # - # @overload list_agent_gateways(request, options = nil) - # Pass arguments to `list_agent_gateways` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::ListAgentGatewaysRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::ListAgentGatewaysRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_agent_gateways(parent: nil, page_size: nil, page_token: nil, return_partial_success: nil) - # Pass arguments to `list_agent_gateways` via keyword arguments. Note that at - # least one keyword argument is 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 project and location from which the AgentGateways should be - # listed, specified in the format `projects/*/locations/*`. - # @param page_size [::Integer] - # Optional. Maximum number of AgentGateways to return per call. - # @param page_token [::String] - # Optional. The value returned by the last `ListAgentGatewaysResponse` - # Indicates that this is a continuation of a prior `ListAgentGateways` - # call, and that the system should return the next page of data. - # @param return_partial_success [::Boolean] - # Optional. If true, allow partial responses for multi-regional Aggregated - # List requests. Otherwise if one of the locations is down or unreachable, - # the Aggregated List request will fail. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::NetworkServices::V1::AgentGateway>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::NetworkServices::V1::AgentGateway>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/network_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::ListAgentGatewaysRequest.new - # - # # Call the list_agent_gateways method. - # result = client.list_agent_gateways 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::NetworkServices::V1::AgentGateway. - # p item - # end - # - def list_agent_gateways request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::ListAgentGatewaysRequest - - # Converts hash 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_agent_gateways.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::NetworkServices::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_agent_gateways.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_agent_gateways.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.call_rpc :list_agent_gateways, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @network_services_stub, :list_agent_gateways, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets details of a single AgentGateway. - # - # @overload get_agent_gateway(request, options = nil) - # Pass arguments to `get_agent_gateway` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::GetAgentGatewayRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::GetAgentGatewayRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_agent_gateway(name: nil) - # Pass arguments to `get_agent_gateway` via keyword arguments. Note that at - # least one keyword argument is 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. A name of the AgentGateway to get. Must be in the format - # `projects/*/locations/*/agentGateways/*`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::NetworkServices::V1::AgentGateway] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::NetworkServices::V1::AgentGateway] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/network_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::GetAgentGatewayRequest.new - # - # # Call the get_agent_gateway method. - # result = client.get_agent_gateway request - # - # # The returned object is of type Google::Cloud::NetworkServices::V1::AgentGateway. - # p result - # - def get_agent_gateway request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::GetAgentGatewayRequest - - # Converts hash 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_agent_gateway.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::NetworkServices::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_agent_gateway.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_agent_gateway.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.call_rpc :get_agent_gateway, 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 AgentGateway in a given project and location. - # - # @overload create_agent_gateway(request, options = nil) - # Pass arguments to `create_agent_gateway` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::CreateAgentGatewayRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::CreateAgentGatewayRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_agent_gateway(parent: nil, agent_gateway_id: nil, agent_gateway: nil) - # Pass arguments to `create_agent_gateway` via keyword arguments. Note that at - # least one keyword argument is 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 AgentGateway. Must be in the - # format `projects/*/locations/*`. - # @param agent_gateway_id [::String] - # Required. Short name of the AgentGateway resource to be created. - # @param agent_gateway [::Google::Cloud::NetworkServices::V1::AgentGateway, ::Hash] - # Required. AgentGateway resource to be created. - # - # @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_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::CreateAgentGatewayRequest.new - # - # # Call the create_agent_gateway method. - # result = client.create_agent_gateway 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_agent_gateway request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::CreateAgentGatewayRequest - - # Converts hash 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_agent_gateway.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::NetworkServices::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_agent_gateway.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_agent_gateway.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.call_rpc :create_agent_gateway, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the parameters of a single AgentGateway. - # - # @overload update_agent_gateway(request, options = nil) - # Pass arguments to `update_agent_gateway` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::UpdateAgentGatewayRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::UpdateAgentGatewayRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_agent_gateway(update_mask: nil, agent_gateway: nil) - # Pass arguments to `update_agent_gateway` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. Field mask is used to specify the fields to be overwritten in the - # AgentGateway resource by the update. - # The fields specified in the update_mask are relative to the resource, not - # the full request. A field will be overwritten if it is in the mask. If the - # user does not provide a mask then all fields will be overwritten. - # @param agent_gateway [::Google::Cloud::NetworkServices::V1::AgentGateway, ::Hash] - # Required. Updated AgentGateway 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_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::UpdateAgentGatewayRequest.new - # - # # Call the update_agent_gateway method. - # result = client.update_agent_gateway 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_agent_gateway request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::UpdateAgentGatewayRequest - - # Converts hash 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_agent_gateway.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::NetworkServices::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.agent_gateway&.name - header_params["agent_gateway.name"] = request.agent_gateway.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_agent_gateway.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_agent_gateway.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.call_rpc :update_agent_gateway, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a single AgentGateway. - # - # @overload delete_agent_gateway(request, options = nil) - # Pass arguments to `delete_agent_gateway` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::DeleteAgentGatewayRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::DeleteAgentGatewayRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_agent_gateway(name: nil, etag: nil) - # Pass arguments to `delete_agent_gateway` via keyword arguments. Note that at - # least one keyword argument is 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. A name of the AgentGateway to delete. Must be in the format - # `projects/*/locations/*/agentGateways/*`. - # @param etag [::String] - # Optional. The etag of the AgentGateway to delete. - # - # @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_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::DeleteAgentGatewayRequest.new - # - # # Call the delete_agent_gateway method. - # result = client.delete_agent_gateway 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_agent_gateway request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::DeleteAgentGatewayRequest - - # Converts hash 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_agent_gateway.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::NetworkServices::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_agent_gateway.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_agent_gateway.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.call_rpc :delete_agent_gateway, 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 NetworkServices API. - # - # This class represents the configuration for NetworkServices, - # 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::NetworkServices::V1::NetworkServices::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_endpoint_policies to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_endpoint_policies.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_endpoint_policies.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::NetworkServices::V1::NetworkServices::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. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `: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 = "networkservices.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 NetworkServices 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. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_endpoint_policies` - # @return [::Gapic::Config::Method] - # - attr_reader :list_endpoint_policies - ## - # RPC-specific configuration for `get_endpoint_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :get_endpoint_policy - ## - # RPC-specific configuration for `create_endpoint_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :create_endpoint_policy - ## - # RPC-specific configuration for `update_endpoint_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :update_endpoint_policy - ## - # RPC-specific configuration for `delete_endpoint_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_endpoint_policy - ## - # RPC-specific configuration for `list_wasm_plugin_versions` - # @return [::Gapic::Config::Method] - # - attr_reader :list_wasm_plugin_versions - ## - # RPC-specific configuration for `get_wasm_plugin_version` - # @return [::Gapic::Config::Method] - # - attr_reader :get_wasm_plugin_version - ## - # RPC-specific configuration for `create_wasm_plugin_version` - # @return [::Gapic::Config::Method] - # - attr_reader :create_wasm_plugin_version - ## - # RPC-specific configuration for `delete_wasm_plugin_version` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_wasm_plugin_version - ## - # RPC-specific configuration for `list_wasm_plugins` - # @return [::Gapic::Config::Method] - # - attr_reader :list_wasm_plugins - ## - # RPC-specific configuration for `get_wasm_plugin` - # @return [::Gapic::Config::Method] - # - attr_reader :get_wasm_plugin - ## - # RPC-specific configuration for `create_wasm_plugin` - # @return [::Gapic::Config::Method] - # - attr_reader :create_wasm_plugin - ## - # RPC-specific configuration for `update_wasm_plugin` - # @return [::Gapic::Config::Method] - # - attr_reader :update_wasm_plugin - ## - # RPC-specific configuration for `delete_wasm_plugin` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_wasm_plugin - ## - # RPC-specific configuration for `list_gateways` - # @return [::Gapic::Config::Method] - # - attr_reader :list_gateways - ## - # RPC-specific configuration for `get_gateway` - # @return [::Gapic::Config::Method] - # - attr_reader :get_gateway - ## - # RPC-specific configuration for `create_gateway` - # @return [::Gapic::Config::Method] - # - attr_reader :create_gateway - ## - # RPC-specific configuration for `update_gateway` - # @return [::Gapic::Config::Method] - # - attr_reader :update_gateway - ## - # RPC-specific configuration for `delete_gateway` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_gateway - ## - # RPC-specific configuration for `list_grpc_routes` - # @return [::Gapic::Config::Method] - # - attr_reader :list_grpc_routes - ## - # RPC-specific configuration for `get_grpc_route` - # @return [::Gapic::Config::Method] - # - attr_reader :get_grpc_route - ## - # RPC-specific configuration for `create_grpc_route` - # @return [::Gapic::Config::Method] - # - attr_reader :create_grpc_route - ## - # RPC-specific configuration for `update_grpc_route` - # @return [::Gapic::Config::Method] - # - attr_reader :update_grpc_route - ## - # RPC-specific configuration for `delete_grpc_route` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_grpc_route - ## - # RPC-specific configuration for `list_http_routes` - # @return [::Gapic::Config::Method] - # - attr_reader :list_http_routes - ## - # RPC-specific configuration for `get_http_route` - # @return [::Gapic::Config::Method] - # - attr_reader :get_http_route - ## - # RPC-specific configuration for `create_http_route` - # @return [::Gapic::Config::Method] - # - attr_reader :create_http_route - ## - # RPC-specific configuration for `update_http_route` - # @return [::Gapic::Config::Method] - # - attr_reader :update_http_route - ## - # RPC-specific configuration for `delete_http_route` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_http_route - ## - # RPC-specific configuration for `list_tcp_routes` - # @return [::Gapic::Config::Method] - # - attr_reader :list_tcp_routes - ## - # RPC-specific configuration for `get_tcp_route` - # @return [::Gapic::Config::Method] - # - attr_reader :get_tcp_route - ## - # RPC-specific configuration for `create_tcp_route` - # @return [::Gapic::Config::Method] - # - attr_reader :create_tcp_route - ## - # RPC-specific configuration for `update_tcp_route` - # @return [::Gapic::Config::Method] - # - attr_reader :update_tcp_route - ## - # RPC-specific configuration for `delete_tcp_route` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_tcp_route - ## - # RPC-specific configuration for `list_tls_routes` - # @return [::Gapic::Config::Method] - # - attr_reader :list_tls_routes - ## - # RPC-specific configuration for `get_tls_route` - # @return [::Gapic::Config::Method] - # - attr_reader :get_tls_route - ## - # RPC-specific configuration for `create_tls_route` - # @return [::Gapic::Config::Method] - # - attr_reader :create_tls_route - ## - # RPC-specific configuration for `update_tls_route` - # @return [::Gapic::Config::Method] - # - attr_reader :update_tls_route - ## - # RPC-specific configuration for `delete_tls_route` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_tls_route - ## - # RPC-specific configuration for `list_service_bindings` - # @return [::Gapic::Config::Method] - # - attr_reader :list_service_bindings - ## - # RPC-specific configuration for `get_service_binding` - # @return [::Gapic::Config::Method] - # - attr_reader :get_service_binding - ## - # RPC-specific configuration for `create_service_binding` - # @return [::Gapic::Config::Method] - # - attr_reader :create_service_binding - ## - # RPC-specific configuration for `update_service_binding` - # @return [::Gapic::Config::Method] - # - attr_reader :update_service_binding - ## - # RPC-specific configuration for `delete_service_binding` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_service_binding - ## - # RPC-specific configuration for `list_meshes` - # @return [::Gapic::Config::Method] - # - attr_reader :list_meshes - ## - # RPC-specific configuration for `get_mesh` - # @return [::Gapic::Config::Method] - # - attr_reader :get_mesh - ## - # RPC-specific configuration for `create_mesh` - # @return [::Gapic::Config::Method] - # - attr_reader :create_mesh - ## - # RPC-specific configuration for `update_mesh` - # @return [::Gapic::Config::Method] - # - attr_reader :update_mesh - ## - # RPC-specific configuration for `delete_mesh` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_mesh - ## - # RPC-specific configuration for `list_service_lb_policies` - # @return [::Gapic::Config::Method] - # - attr_reader :list_service_lb_policies - ## - # RPC-specific configuration for `get_service_lb_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :get_service_lb_policy - ## - # RPC-specific configuration for `create_service_lb_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :create_service_lb_policy - ## - # RPC-specific configuration for `update_service_lb_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :update_service_lb_policy - ## - # RPC-specific configuration for `delete_service_lb_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_service_lb_policy - ## - # RPC-specific configuration for `get_gateway_route_view` - # @return [::Gapic::Config::Method] - # - attr_reader :get_gateway_route_view - ## - # RPC-specific configuration for `get_mesh_route_view` - # @return [::Gapic::Config::Method] - # - attr_reader :get_mesh_route_view - ## - # RPC-specific configuration for `list_gateway_route_views` - # @return [::Gapic::Config::Method] - # - attr_reader :list_gateway_route_views - ## - # RPC-specific configuration for `list_mesh_route_views` - # @return [::Gapic::Config::Method] - # - attr_reader :list_mesh_route_views - ## - # RPC-specific configuration for `list_agent_gateways` - # @return [::Gapic::Config::Method] - # - attr_reader :list_agent_gateways - ## - # RPC-specific configuration for `get_agent_gateway` - # @return [::Gapic::Config::Method] - # - attr_reader :get_agent_gateway - ## - # RPC-specific configuration for `create_agent_gateway` - # @return [::Gapic::Config::Method] - # - attr_reader :create_agent_gateway - ## - # RPC-specific configuration for `update_agent_gateway` - # @return [::Gapic::Config::Method] - # - attr_reader :update_agent_gateway - ## - # RPC-specific configuration for `delete_agent_gateway` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_agent_gateway - - # @private - def initialize parent_rpcs = nil - list_endpoint_policies_config = parent_rpcs.list_endpoint_policies if parent_rpcs.respond_to? :list_endpoint_policies - @list_endpoint_policies = ::Gapic::Config::Method.new list_endpoint_policies_config - get_endpoint_policy_config = parent_rpcs.get_endpoint_policy if parent_rpcs.respond_to? :get_endpoint_policy - @get_endpoint_policy = ::Gapic::Config::Method.new get_endpoint_policy_config - create_endpoint_policy_config = parent_rpcs.create_endpoint_policy if parent_rpcs.respond_to? :create_endpoint_policy - @create_endpoint_policy = ::Gapic::Config::Method.new create_endpoint_policy_config - update_endpoint_policy_config = parent_rpcs.update_endpoint_policy if parent_rpcs.respond_to? :update_endpoint_policy - @update_endpoint_policy = ::Gapic::Config::Method.new update_endpoint_policy_config - delete_endpoint_policy_config = parent_rpcs.delete_endpoint_policy if parent_rpcs.respond_to? :delete_endpoint_policy - @delete_endpoint_policy = ::Gapic::Config::Method.new delete_endpoint_policy_config - list_wasm_plugin_versions_config = parent_rpcs.list_wasm_plugin_versions if parent_rpcs.respond_to? :list_wasm_plugin_versions - @list_wasm_plugin_versions = ::Gapic::Config::Method.new list_wasm_plugin_versions_config - get_wasm_plugin_version_config = parent_rpcs.get_wasm_plugin_version if parent_rpcs.respond_to? :get_wasm_plugin_version - @get_wasm_plugin_version = ::Gapic::Config::Method.new get_wasm_plugin_version_config - create_wasm_plugin_version_config = parent_rpcs.create_wasm_plugin_version if parent_rpcs.respond_to? :create_wasm_plugin_version - @create_wasm_plugin_version = ::Gapic::Config::Method.new create_wasm_plugin_version_config - delete_wasm_plugin_version_config = parent_rpcs.delete_wasm_plugin_version if parent_rpcs.respond_to? :delete_wasm_plugin_version - @delete_wasm_plugin_version = ::Gapic::Config::Method.new delete_wasm_plugin_version_config - list_wasm_plugins_config = parent_rpcs.list_wasm_plugins if parent_rpcs.respond_to? :list_wasm_plugins - @list_wasm_plugins = ::Gapic::Config::Method.new list_wasm_plugins_config - get_wasm_plugin_config = parent_rpcs.get_wasm_plugin if parent_rpcs.respond_to? :get_wasm_plugin - @get_wasm_plugin = ::Gapic::Config::Method.new get_wasm_plugin_config - create_wasm_plugin_config = parent_rpcs.create_wasm_plugin if parent_rpcs.respond_to? :create_wasm_plugin - @create_wasm_plugin = ::Gapic::Config::Method.new create_wasm_plugin_config - update_wasm_plugin_config = parent_rpcs.update_wasm_plugin if parent_rpcs.respond_to? :update_wasm_plugin - @update_wasm_plugin = ::Gapic::Config::Method.new update_wasm_plugin_config - delete_wasm_plugin_config = parent_rpcs.delete_wasm_plugin if parent_rpcs.respond_to? :delete_wasm_plugin - @delete_wasm_plugin = ::Gapic::Config::Method.new delete_wasm_plugin_config - list_gateways_config = parent_rpcs.list_gateways if parent_rpcs.respond_to? :list_gateways - @list_gateways = ::Gapic::Config::Method.new list_gateways_config - get_gateway_config = parent_rpcs.get_gateway if parent_rpcs.respond_to? :get_gateway - @get_gateway = ::Gapic::Config::Method.new get_gateway_config - create_gateway_config = parent_rpcs.create_gateway if parent_rpcs.respond_to? :create_gateway - @create_gateway = ::Gapic::Config::Method.new create_gateway_config - update_gateway_config = parent_rpcs.update_gateway if parent_rpcs.respond_to? :update_gateway - @update_gateway = ::Gapic::Config::Method.new update_gateway_config - delete_gateway_config = parent_rpcs.delete_gateway if parent_rpcs.respond_to? :delete_gateway - @delete_gateway = ::Gapic::Config::Method.new delete_gateway_config - list_grpc_routes_config = parent_rpcs.list_grpc_routes if parent_rpcs.respond_to? :list_grpc_routes - @list_grpc_routes = ::Gapic::Config::Method.new list_grpc_routes_config - get_grpc_route_config = parent_rpcs.get_grpc_route if parent_rpcs.respond_to? :get_grpc_route - @get_grpc_route = ::Gapic::Config::Method.new get_grpc_route_config - create_grpc_route_config = parent_rpcs.create_grpc_route if parent_rpcs.respond_to? :create_grpc_route - @create_grpc_route = ::Gapic::Config::Method.new create_grpc_route_config - update_grpc_route_config = parent_rpcs.update_grpc_route if parent_rpcs.respond_to? :update_grpc_route - @update_grpc_route = ::Gapic::Config::Method.new update_grpc_route_config - delete_grpc_route_config = parent_rpcs.delete_grpc_route if parent_rpcs.respond_to? :delete_grpc_route - @delete_grpc_route = ::Gapic::Config::Method.new delete_grpc_route_config - list_http_routes_config = parent_rpcs.list_http_routes if parent_rpcs.respond_to? :list_http_routes - @list_http_routes = ::Gapic::Config::Method.new list_http_routes_config - get_http_route_config = parent_rpcs.get_http_route if parent_rpcs.respond_to? :get_http_route - @get_http_route = ::Gapic::Config::Method.new get_http_route_config - create_http_route_config = parent_rpcs.create_http_route if parent_rpcs.respond_to? :create_http_route - @create_http_route = ::Gapic::Config::Method.new create_http_route_config - update_http_route_config = parent_rpcs.update_http_route if parent_rpcs.respond_to? :update_http_route - @update_http_route = ::Gapic::Config::Method.new update_http_route_config - delete_http_route_config = parent_rpcs.delete_http_route if parent_rpcs.respond_to? :delete_http_route - @delete_http_route = ::Gapic::Config::Method.new delete_http_route_config - list_tcp_routes_config = parent_rpcs.list_tcp_routes if parent_rpcs.respond_to? :list_tcp_routes - @list_tcp_routes = ::Gapic::Config::Method.new list_tcp_routes_config - get_tcp_route_config = parent_rpcs.get_tcp_route if parent_rpcs.respond_to? :get_tcp_route - @get_tcp_route = ::Gapic::Config::Method.new get_tcp_route_config - create_tcp_route_config = parent_rpcs.create_tcp_route if parent_rpcs.respond_to? :create_tcp_route - @create_tcp_route = ::Gapic::Config::Method.new create_tcp_route_config - update_tcp_route_config = parent_rpcs.update_tcp_route if parent_rpcs.respond_to? :update_tcp_route - @update_tcp_route = ::Gapic::Config::Method.new update_tcp_route_config - delete_tcp_route_config = parent_rpcs.delete_tcp_route if parent_rpcs.respond_to? :delete_tcp_route - @delete_tcp_route = ::Gapic::Config::Method.new delete_tcp_route_config - list_tls_routes_config = parent_rpcs.list_tls_routes if parent_rpcs.respond_to? :list_tls_routes - @list_tls_routes = ::Gapic::Config::Method.new list_tls_routes_config - get_tls_route_config = parent_rpcs.get_tls_route if parent_rpcs.respond_to? :get_tls_route - @get_tls_route = ::Gapic::Config::Method.new get_tls_route_config - create_tls_route_config = parent_rpcs.create_tls_route if parent_rpcs.respond_to? :create_tls_route - @create_tls_route = ::Gapic::Config::Method.new create_tls_route_config - update_tls_route_config = parent_rpcs.update_tls_route if parent_rpcs.respond_to? :update_tls_route - @update_tls_route = ::Gapic::Config::Method.new update_tls_route_config - delete_tls_route_config = parent_rpcs.delete_tls_route if parent_rpcs.respond_to? :delete_tls_route - @delete_tls_route = ::Gapic::Config::Method.new delete_tls_route_config - list_service_bindings_config = parent_rpcs.list_service_bindings if parent_rpcs.respond_to? :list_service_bindings - @list_service_bindings = ::Gapic::Config::Method.new list_service_bindings_config - get_service_binding_config = parent_rpcs.get_service_binding if parent_rpcs.respond_to? :get_service_binding - @get_service_binding = ::Gapic::Config::Method.new get_service_binding_config - create_service_binding_config = parent_rpcs.create_service_binding if parent_rpcs.respond_to? :create_service_binding - @create_service_binding = ::Gapic::Config::Method.new create_service_binding_config - update_service_binding_config = parent_rpcs.update_service_binding if parent_rpcs.respond_to? :update_service_binding - @update_service_binding = ::Gapic::Config::Method.new update_service_binding_config - delete_service_binding_config = parent_rpcs.delete_service_binding if parent_rpcs.respond_to? :delete_service_binding - @delete_service_binding = ::Gapic::Config::Method.new delete_service_binding_config - list_meshes_config = parent_rpcs.list_meshes if parent_rpcs.respond_to? :list_meshes - @list_meshes = ::Gapic::Config::Method.new list_meshes_config - get_mesh_config = parent_rpcs.get_mesh if parent_rpcs.respond_to? :get_mesh - @get_mesh = ::Gapic::Config::Method.new get_mesh_config - create_mesh_config = parent_rpcs.create_mesh if parent_rpcs.respond_to? :create_mesh - @create_mesh = ::Gapic::Config::Method.new create_mesh_config - update_mesh_config = parent_rpcs.update_mesh if parent_rpcs.respond_to? :update_mesh - @update_mesh = ::Gapic::Config::Method.new update_mesh_config - delete_mesh_config = parent_rpcs.delete_mesh if parent_rpcs.respond_to? :delete_mesh - @delete_mesh = ::Gapic::Config::Method.new delete_mesh_config - list_service_lb_policies_config = parent_rpcs.list_service_lb_policies if parent_rpcs.respond_to? :list_service_lb_policies - @list_service_lb_policies = ::Gapic::Config::Method.new list_service_lb_policies_config - get_service_lb_policy_config = parent_rpcs.get_service_lb_policy if parent_rpcs.respond_to? :get_service_lb_policy - @get_service_lb_policy = ::Gapic::Config::Method.new get_service_lb_policy_config - create_service_lb_policy_config = parent_rpcs.create_service_lb_policy if parent_rpcs.respond_to? :create_service_lb_policy - @create_service_lb_policy = ::Gapic::Config::Method.new create_service_lb_policy_config - update_service_lb_policy_config = parent_rpcs.update_service_lb_policy if parent_rpcs.respond_to? :update_service_lb_policy - @update_service_lb_policy = ::Gapic::Config::Method.new update_service_lb_policy_config - delete_service_lb_policy_config = parent_rpcs.delete_service_lb_policy if parent_rpcs.respond_to? :delete_service_lb_policy - @delete_service_lb_policy = ::Gapic::Config::Method.new delete_service_lb_policy_config - get_gateway_route_view_config = parent_rpcs.get_gateway_route_view if parent_rpcs.respond_to? :get_gateway_route_view - @get_gateway_route_view = ::Gapic::Config::Method.new get_gateway_route_view_config - get_mesh_route_view_config = parent_rpcs.get_mesh_route_view if parent_rpcs.respond_to? :get_mesh_route_view - @get_mesh_route_view = ::Gapic::Config::Method.new get_mesh_route_view_config - list_gateway_route_views_config = parent_rpcs.list_gateway_route_views if parent_rpcs.respond_to? :list_gateway_route_views - @list_gateway_route_views = ::Gapic::Config::Method.new list_gateway_route_views_config - list_mesh_route_views_config = parent_rpcs.list_mesh_route_views if parent_rpcs.respond_to? :list_mesh_route_views - @list_mesh_route_views = ::Gapic::Config::Method.new list_mesh_route_views_config - list_agent_gateways_config = parent_rpcs.list_agent_gateways if parent_rpcs.respond_to? :list_agent_gateways - @list_agent_gateways = ::Gapic::Config::Method.new list_agent_gateways_config - get_agent_gateway_config = parent_rpcs.get_agent_gateway if parent_rpcs.respond_to? :get_agent_gateway - @get_agent_gateway = ::Gapic::Config::Method.new get_agent_gateway_config - create_agent_gateway_config = parent_rpcs.create_agent_gateway if parent_rpcs.respond_to? :create_agent_gateway - @create_agent_gateway = ::Gapic::Config::Method.new create_agent_gateway_config - update_agent_gateway_config = parent_rpcs.update_agent_gateway if parent_rpcs.respond_to? :update_agent_gateway - @update_agent_gateway = ::Gapic::Config::Method.new update_agent_gateway_config - delete_agent_gateway_config = parent_rpcs.delete_agent_gateway if parent_rpcs.respond_to? :delete_agent_gateway - @delete_agent_gateway = ::Gapic::Config::Method.new delete_agent_gateway_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/network_services/credentials.rb b/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/network_services/credentials.rb deleted file mode 100644 index 2c356ec37e85..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/network_services/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 NetworkServices - module V1 - module NetworkServices - # Credentials for the NetworkServices 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_services-v1/lib/google/cloud/network_services/v1/network_services/operations.rb b/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/network_services/operations.rb deleted file mode 100644 index 415eb7efdc3e..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/network_services/operations.rb +++ /dev/null @@ -1,843 +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 NetworkServices - module V1 - module NetworkServices - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "networkservices.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the NetworkServices 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 NetworkServices 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::NetworkServices::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::NetworkServices::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::NetworkServices::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::NetworkServices::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::NetworkServices::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. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `: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 = "networkservices.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. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `: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_services-v1/lib/google/cloud/network_services/v1/network_services/paths.rb b/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/network_services/paths.rb deleted file mode 100644 index a3ea409e1195..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/network_services/paths.rb +++ /dev/null @@ -1,531 +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 NetworkServices - module V1 - module NetworkServices - # Path helper methods for the NetworkServices API. - module Paths - ## - # Create a fully-qualified Address resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/regions/{region}/addresses/{address}` - # - # @param project [String] - # @param region [String] - # @param address [String] - # - # @return [::String] - def address_path project:, region:, address: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "region cannot contain /" if region.to_s.include? "/" - - "projects/#{project}/regions/#{region}/addresses/#{address}" - end - - ## - # Create a fully-qualified AgentGateway resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/agentGateways/{agent_gateway}` - # - # @param project [String] - # @param location [String] - # @param agent_gateway [String] - # - # @return [::String] - def agent_gateway_path project:, location:, agent_gateway: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/agentGateways/#{agent_gateway}" - end - - ## - # Create a fully-qualified AuthorizationPolicy resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/authorizationPolicies/{authorization_policy}` - # - # @param project [String] - # @param location [String] - # @param authorization_policy [String] - # - # @return [::String] - def authorization_policy_path project:, location:, authorization_policy: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/authorizationPolicies/#{authorization_policy}" - end - - ## - # Create a fully-qualified BackendService resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/backendServices/{backend_service}` - # - # @param project [String] - # @param location [String] - # @param backend_service [String] - # - # @return [::String] - def backend_service_path project:, location:, backend_service: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/backendServices/#{backend_service}" - end - - ## - # Create a fully-qualified Certificate resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/certificates/{certificate}` - # - # @param project [String] - # @param location [String] - # @param certificate [String] - # - # @return [::String] - def certificate_path project:, location:, certificate: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/certificates/#{certificate}" - end - - ## - # Create a fully-qualified ClientTlsPolicy resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/clientTlsPolicies/{client_tls_policy}` - # - # @param project [String] - # @param location [String] - # @param client_tls_policy [String] - # - # @return [::String] - def client_tls_policy_path project:, location:, client_tls_policy: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/clientTlsPolicies/#{client_tls_policy}" - end - - ## - # Create a fully-qualified EndpointPolicy resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/endpointPolicies/{endpoint_policy}` - # - # @param project [String] - # @param location [String] - # @param endpoint_policy [String] - # - # @return [::String] - def endpoint_policy_path project:, location:, endpoint_policy: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/endpointPolicies/#{endpoint_policy}" - end - - ## - # Create a fully-qualified Gateway resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/gateways/{gateway}` - # - # @param project [String] - # @param location [String] - # @param gateway [String] - # - # @return [::String] - def gateway_path project:, location:, gateway: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/gateways/#{gateway}" - end - - ## - # Create a fully-qualified GatewayRouteView resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/gateways/{gateway}/routeViews/{route_view}` - # - # @param project [String] - # @param location [String] - # @param gateway [String] - # @param route_view [String] - # - # @return [::String] - def gateway_route_view_path project:, location:, gateway:, route_view: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "gateway cannot contain /" if gateway.to_s.include? "/" - - "projects/#{project}/locations/#{location}/gateways/#{gateway}/routeViews/#{route_view}" - end - - ## - # Create a fully-qualified GatewaySecurityPolicy resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/gatewaySecurityPolicies/{gateway_security_policy}` - # - # @param project [String] - # @param location [String] - # @param gateway_security_policy [String] - # - # @return [::String] - def gateway_security_policy_path project:, location:, gateway_security_policy: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/gatewaySecurityPolicies/#{gateway_security_policy}" - end - - ## - # Create a fully-qualified GrpcRoute resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/grpcRoutes/{grpc_route}` - # - # @param project [String] - # @param location [String] - # @param grpc_route [String] - # - # @return [::String] - def grpc_route_path project:, location:, grpc_route: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/grpcRoutes/#{grpc_route}" - end - - ## - # Create a fully-qualified HttpRoute resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/httpRoutes/{http_route}` - # - # @param project [String] - # @param location [String] - # @param http_route [String] - # - # @return [::String] - def http_route_path project:, location:, http_route: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/httpRoutes/#{http_route}" - end - - ## - # Create a fully-qualified Location resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}` - # - # @param project [String] - # @param location [String] - # - # @return [::String] - def location_path project:, location: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - - "projects/#{project}/locations/#{location}" - end - - ## - # Create a fully-qualified Mesh resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/meshes/{mesh}` - # - # @param project [String] - # @param location [String] - # @param mesh [String] - # - # @return [::String] - def mesh_path project:, location:, mesh: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/meshes/#{mesh}" - end - - ## - # Create a fully-qualified MeshRouteView resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/meshes/{mesh}/routeViews/{route_view}` - # - # @param project [String] - # @param location [String] - # @param mesh [String] - # @param route_view [String] - # - # @return [::String] - def mesh_route_view_path project:, location:, mesh:, route_view: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "mesh cannot contain /" if mesh.to_s.include? "/" - - "projects/#{project}/locations/#{location}/meshes/#{mesh}/routeViews/#{route_view}" - end - - ## - # Create a fully-qualified Network resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/global/networks/{network}` - # - # @param project [String] - # @param network [String] - # - # @return [::String] - def network_path project:, network: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - - "projects/#{project}/global/networks/#{network}" - end - - ## - # Create a fully-qualified ServerTlsPolicy resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/serverTlsPolicies/{server_tls_policy}` - # - # @param project [String] - # @param location [String] - # @param server_tls_policy [String] - # - # @return [::String] - def server_tls_policy_path project:, location:, server_tls_policy: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/serverTlsPolicies/#{server_tls_policy}" - end - - ## - # Create a fully-qualified Service resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/namespaces/{namespace}/services/{service}` - # - # @param project [String] - # @param location [String] - # @param namespace [String] - # @param service [String] - # - # @return [::String] - def service_path project:, location:, namespace:, service: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "namespace cannot contain /" if namespace.to_s.include? "/" - - "projects/#{project}/locations/#{location}/namespaces/#{namespace}/services/#{service}" - end - - ## - # Create a fully-qualified ServiceBinding resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/serviceBindings/{service_binding}` - # - # @param project [String] - # @param location [String] - # @param service_binding [String] - # - # @return [::String] - def service_binding_path project:, location:, service_binding: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/serviceBindings/#{service_binding}" - end - - ## - # Create a fully-qualified ServiceLbPolicy resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/serviceLbPolicies/{service_lb_policy}` - # - # @param project [String] - # @param location [String] - # @param service_lb_policy [String] - # - # @return [::String] - def service_lb_policy_path project:, location:, service_lb_policy: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/serviceLbPolicies/#{service_lb_policy}" - end - - ## - # Create a fully-qualified Subnetwork resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/regions/{region}/subnetworks/{subnetwork}` - # - # @param project [String] - # @param region [String] - # @param subnetwork [String] - # - # @return [::String] - def subnetwork_path project:, region:, subnetwork: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "region cannot contain /" if region.to_s.include? "/" - - "projects/#{project}/regions/#{region}/subnetworks/#{subnetwork}" - end - - ## - # Create a fully-qualified TargetTcpProxy resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/targetTcpProxies/{target_tcp_proxy}` - # - # @param project [String] - # @param location [String] - # @param target_tcp_proxy [String] - # - # @return [::String] - def target_tcp_proxy_path project:, location:, target_tcp_proxy: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/targetTcpProxies/#{target_tcp_proxy}" - end - - ## - # Create a fully-qualified TcpRoute resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/tcpRoutes/{tcp_route}` - # - # @param project [String] - # @param location [String] - # @param tcp_route [String] - # - # @return [::String] - def tcp_route_path project:, location:, tcp_route: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/tcpRoutes/#{tcp_route}" - end - - ## - # Create a fully-qualified TlsRoute resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/tlsRoutes/{tls_route}` - # - # @param project [String] - # @param location [String] - # @param tls_route [String] - # - # @return [::String] - def tls_route_path project:, location:, tls_route: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/tlsRoutes/#{tls_route}" - end - - ## - # Create a fully-qualified WasmPlugin resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/wasmPlugins/{wasm_plugin}` - # - # @param project [String] - # @param location [String] - # @param wasm_plugin [String] - # - # @return [::String] - def wasm_plugin_path project:, location:, wasm_plugin: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/wasmPlugins/#{wasm_plugin}" - end - - ## - # Create a fully-qualified WasmPluginVersion resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/wasmPlugins/{wasm_plugin}/versions/{wasm_plugin_version}` - # - # @param project [String] - # @param location [String] - # @param wasm_plugin [String] - # @param wasm_plugin_version [String] - # - # @return [::String] - def wasm_plugin_version_path project:, location:, wasm_plugin:, wasm_plugin_version: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "wasm_plugin cannot contain /" if wasm_plugin.to_s.include? "/" - - "projects/#{project}/locations/#{location}/wasmPlugins/#{wasm_plugin}/versions/#{wasm_plugin_version}" - end - - extend self - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/network_services/rest.rb b/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/network_services/rest.rb deleted file mode 100644 index 0820eaf0d414..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/network_services/rest.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/network_services/v1/version" -require "google/cloud/network_services/v1/bindings_override" - -require "google/cloud/network_services/v1/network_services/credentials" -require "google/cloud/network_services/v1/network_services/paths" -require "google/cloud/network_services/v1/network_services/rest/operations" -require "google/cloud/network_services/v1/network_services/rest/client" - -module Google - module Cloud - module NetworkServices - module V1 - ## - # Service describing handlers for resources. - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/network_services/v1/network_services/rest" - # client = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new - # - module NetworkServices - # 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_services/v1/network_services/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/network_services/rest/client.rb b/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/network_services/rest/client.rb deleted file mode 100644 index 15f371e0f354..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/network_services/rest/client.rb +++ /dev/null @@ -1,6471 +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/networkservices/v1/network_services_pb" -require "google/cloud/network_services/v1/network_services/rest/service_stub" -require "google/cloud/location/rest" -require "google/iam/v1/rest" - -module Google - module Cloud - module NetworkServices - module V1 - module NetworkServices - module Rest - ## - # REST client for the NetworkServices service. - # - # Service describing handlers for resources. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "networkservices.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :network_services_stub - - ## - # Configure the NetworkServices Client class. - # - # See {::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all NetworkServices clients - # ::Google::Cloud::NetworkServices::V1::NetworkServices::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", "NetworkServices", "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 NetworkServices 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::NetworkServices::V1::NetworkServices::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 - @network_services_stub.universe_domain - end - - ## - # Create a new NetworkServices REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the NetworkServices 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::NetworkServices::V1::NetworkServices::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 - - @network_services_stub = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @network_services_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 = @network_services_stub.endpoint - config.universe_domain = @network_services_stub.universe_domain - config.bindings_override = @config.bindings_override - config.logger = @network_services_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 = @network_services_stub.endpoint - config.universe_domain = @network_services_stub.universe_domain - config.bindings_override = @config.bindings_override - config.logger = @network_services_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::NetworkServices::V1::NetworkServices::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 - @network_services_stub.logger - end - - # Service calls - - ## - # Lists EndpointPolicies in a given project and location. - # - # @overload list_endpoint_policies(request, options = nil) - # Pass arguments to `list_endpoint_policies` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::ListEndpointPoliciesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::ListEndpointPoliciesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_endpoint_policies(parent: nil, page_size: nil, page_token: nil, return_partial_success: nil) - # Pass arguments to `list_endpoint_policies` via keyword arguments. Note that at - # least one keyword argument is 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 project and location from which the EndpointPolicies should - # be listed, specified in the format `projects/*/locations/*`. - # @param page_size [::Integer] - # Maximum number of EndpointPolicies to return per call. - # @param page_token [::String] - # The value returned by the last `ListEndpointPoliciesResponse` - # Indicates that this is a continuation of a prior - # `ListEndpointPolicies` call, and that the system should return the - # next page of data. - # @param return_partial_success [::Boolean] - # Optional. If true, allow partial responses for multi-regional Aggregated - # List requests. Otherwise if one of the locations is down or unreachable, - # the Aggregated List request will fail. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::EndpointPolicy>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::EndpointPolicy>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/network_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::ListEndpointPoliciesRequest.new - # - # # Call the list_endpoint_policies method. - # result = client.list_endpoint_policies 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::NetworkServices::V1::EndpointPolicy. - # p item - # end - # - def list_endpoint_policies request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::ListEndpointPoliciesRequest - - # Converts hash 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_endpoint_policies.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::NetworkServices::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_endpoint_policies.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_endpoint_policies.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.list_endpoint_policies request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @network_services_stub, :list_endpoint_policies, "endpoint_policies", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets details of a single EndpointPolicy. - # - # @overload get_endpoint_policy(request, options = nil) - # Pass arguments to `get_endpoint_policy` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::GetEndpointPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::GetEndpointPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_endpoint_policy(name: nil) - # Pass arguments to `get_endpoint_policy` via keyword arguments. Note that at - # least one keyword argument is 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. A name of the EndpointPolicy to get. Must be in the format - # `projects/*/locations/*/endpointPolicies/*`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::NetworkServices::V1::EndpointPolicy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::NetworkServices::V1::EndpointPolicy] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/network_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::GetEndpointPolicyRequest.new - # - # # Call the get_endpoint_policy method. - # result = client.get_endpoint_policy request - # - # # The returned object is of type Google::Cloud::NetworkServices::V1::EndpointPolicy. - # p result - # - def get_endpoint_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::GetEndpointPolicyRequest - - # Converts hash 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_endpoint_policy.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::NetworkServices::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_endpoint_policy.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_endpoint_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.get_endpoint_policy 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 EndpointPolicy in a given project and location. - # - # @overload create_endpoint_policy(request, options = nil) - # Pass arguments to `create_endpoint_policy` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::CreateEndpointPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::CreateEndpointPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_endpoint_policy(parent: nil, endpoint_policy_id: nil, endpoint_policy: nil) - # Pass arguments to `create_endpoint_policy` via keyword arguments. Note that at - # least one keyword argument is 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 EndpointPolicy. Must be in the - # format `projects/*/locations/*`. - # @param endpoint_policy_id [::String] - # Required. Short name of the EndpointPolicy resource to be created. - # E.g. "CustomECS". - # @param endpoint_policy [::Google::Cloud::NetworkServices::V1::EndpointPolicy, ::Hash] - # Required. EndpointPolicy resource to be created. - # @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_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::CreateEndpointPolicyRequest.new - # - # # Call the create_endpoint_policy method. - # result = client.create_endpoint_policy 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_endpoint_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::CreateEndpointPolicyRequest - - # Converts hash 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_endpoint_policy.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::NetworkServices::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_endpoint_policy.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_endpoint_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.create_endpoint_policy request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the parameters of a single EndpointPolicy. - # - # @overload update_endpoint_policy(request, options = nil) - # Pass arguments to `update_endpoint_policy` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::UpdateEndpointPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::UpdateEndpointPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_endpoint_policy(update_mask: nil, endpoint_policy: nil) - # Pass arguments to `update_endpoint_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. Field mask is used to specify the fields to be overwritten in the - # EndpointPolicy resource by the update. - # The fields specified in the update_mask are relative to the resource, not - # the full request. A field will be overwritten if it is in the mask. If the - # user does not provide a mask then all fields will be overwritten. - # @param endpoint_policy [::Google::Cloud::NetworkServices::V1::EndpointPolicy, ::Hash] - # Required. Updated EndpointPolicy 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_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::UpdateEndpointPolicyRequest.new - # - # # Call the update_endpoint_policy method. - # result = client.update_endpoint_policy 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_endpoint_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::UpdateEndpointPolicyRequest - - # Converts hash 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_endpoint_policy.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::NetworkServices::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_endpoint_policy.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_endpoint_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.update_endpoint_policy request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a single EndpointPolicy. - # - # @overload delete_endpoint_policy(request, options = nil) - # Pass arguments to `delete_endpoint_policy` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::DeleteEndpointPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::DeleteEndpointPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_endpoint_policy(name: nil) - # Pass arguments to `delete_endpoint_policy` via keyword arguments. Note that at - # least one keyword argument is 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. A name of the EndpointPolicy to delete. Must be in the format - # `projects/*/locations/*/endpointPolicies/*`. - # @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_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::DeleteEndpointPolicyRequest.new - # - # # Call the delete_endpoint_policy method. - # result = client.delete_endpoint_policy 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_endpoint_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::DeleteEndpointPolicyRequest - - # Converts hash 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_endpoint_policy.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::NetworkServices::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_endpoint_policy.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_endpoint_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.delete_endpoint_policy request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists `WasmPluginVersion` resources in a given project and - # location. - # - # @overload list_wasm_plugin_versions(request, options = nil) - # Pass arguments to `list_wasm_plugin_versions` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::ListWasmPluginVersionsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::ListWasmPluginVersionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_wasm_plugin_versions(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_wasm_plugin_versions` via keyword arguments. Note that at - # least one keyword argument is 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 `WasmPlugin` resource whose `WasmPluginVersion`s - # are listed, specified in the following format: - # `projects/{project}/locations/global/wasmPlugins/{wasm_plugin}`. - # @param page_size [::Integer] - # Maximum number of `WasmPluginVersion` resources to return per - # call. If not specified, at most 50 `WasmPluginVersion` resources are - # returned. The maximum value is 1000; values above 1000 are coerced to - # 1000. - # @param page_token [::String] - # The value returned by the last `ListWasmPluginVersionsResponse` call. - # Indicates that this is a continuation of a prior - # `ListWasmPluginVersions` call, and that the - # next page of data is to be returned. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::WasmPluginVersion>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::WasmPluginVersion>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/network_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::ListWasmPluginVersionsRequest.new - # - # # Call the list_wasm_plugin_versions method. - # result = client.list_wasm_plugin_versions 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::NetworkServices::V1::WasmPluginVersion. - # p item - # end - # - def list_wasm_plugin_versions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::ListWasmPluginVersionsRequest - - # Converts hash 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_wasm_plugin_versions.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::NetworkServices::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_wasm_plugin_versions.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_wasm_plugin_versions.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.list_wasm_plugin_versions request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @network_services_stub, :list_wasm_plugin_versions, "wasm_plugin_versions", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets details of the specified `WasmPluginVersion` resource. - # - # @overload get_wasm_plugin_version(request, options = nil) - # Pass arguments to `get_wasm_plugin_version` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::GetWasmPluginVersionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::GetWasmPluginVersionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_wasm_plugin_version(name: nil) - # Pass arguments to `get_wasm_plugin_version` via keyword arguments. Note that at - # least one keyword argument is 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. A name of the `WasmPluginVersion` resource to get. Must be in - # the format - # `projects/{project}/locations/global/wasmPlugins/{wasm_plugin}/versions/{wasm_plugin_version}`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::NetworkServices::V1::WasmPluginVersion] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::NetworkServices::V1::WasmPluginVersion] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/network_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::GetWasmPluginVersionRequest.new - # - # # Call the get_wasm_plugin_version method. - # result = client.get_wasm_plugin_version request - # - # # The returned object is of type Google::Cloud::NetworkServices::V1::WasmPluginVersion. - # p result - # - def get_wasm_plugin_version request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::GetWasmPluginVersionRequest - - # Converts hash 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_wasm_plugin_version.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::NetworkServices::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_wasm_plugin_version.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_wasm_plugin_version.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.get_wasm_plugin_version 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 `WasmPluginVersion` resource in a given project - # and location. - # - # @overload create_wasm_plugin_version(request, options = nil) - # Pass arguments to `create_wasm_plugin_version` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::CreateWasmPluginVersionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::CreateWasmPluginVersionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_wasm_plugin_version(parent: nil, wasm_plugin_version_id: nil, wasm_plugin_version: nil) - # Pass arguments to `create_wasm_plugin_version` via keyword arguments. Note that at - # least one keyword argument is 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 `WasmPluginVersion` resource. Must be - # in the format - # `projects/{project}/locations/global/wasmPlugins/{wasm_plugin}`. - # @param wasm_plugin_version_id [::String] - # Required. User-provided ID of the `WasmPluginVersion` resource to be - # created. - # @param wasm_plugin_version [::Google::Cloud::NetworkServices::V1::WasmPluginVersion, ::Hash] - # Required. `WasmPluginVersion` resource to be created. - # @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_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::CreateWasmPluginVersionRequest.new - # - # # Call the create_wasm_plugin_version method. - # result = client.create_wasm_plugin_version 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_wasm_plugin_version request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::CreateWasmPluginVersionRequest - - # Converts hash 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_wasm_plugin_version.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::NetworkServices::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_wasm_plugin_version.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_wasm_plugin_version.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.create_wasm_plugin_version 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 the specified `WasmPluginVersion` resource. - # - # @overload delete_wasm_plugin_version(request, options = nil) - # Pass arguments to `delete_wasm_plugin_version` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::DeleteWasmPluginVersionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::DeleteWasmPluginVersionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_wasm_plugin_version(name: nil) - # Pass arguments to `delete_wasm_plugin_version` via keyword arguments. Note that at - # least one keyword argument is 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. A name of the `WasmPluginVersion` resource to delete. Must be in - # the format - # `projects/{project}/locations/global/wasmPlugins/{wasm_plugin}/versions/{wasm_plugin_version}`. - # @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_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::DeleteWasmPluginVersionRequest.new - # - # # Call the delete_wasm_plugin_version method. - # result = client.delete_wasm_plugin_version 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_wasm_plugin_version request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::DeleteWasmPluginVersionRequest - - # Converts hash 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_wasm_plugin_version.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::NetworkServices::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_wasm_plugin_version.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_wasm_plugin_version.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.delete_wasm_plugin_version request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists `WasmPlugin` resources in a given project and - # location. - # - # @overload list_wasm_plugins(request, options = nil) - # Pass arguments to `list_wasm_plugins` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::ListWasmPluginsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::ListWasmPluginsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_wasm_plugins(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_wasm_plugins` via keyword arguments. Note that at - # least one keyword argument is 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 project and location from which the `WasmPlugin` resources - # are listed, specified in the following format: - # `projects/{project}/locations/global`. - # @param page_size [::Integer] - # Maximum number of `WasmPlugin` resources to return per call. - # If not specified, at most 50 `WasmPlugin` resources are returned. - # The maximum value is 1000; values above 1000 are coerced to 1000. - # @param page_token [::String] - # The value returned by the last `ListWasmPluginsResponse` call. - # Indicates that this is a continuation of a prior - # `ListWasmPlugins` call, and that the - # next page of data is to be returned. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::WasmPlugin>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::WasmPlugin>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/network_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::ListWasmPluginsRequest.new - # - # # Call the list_wasm_plugins method. - # result = client.list_wasm_plugins 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::NetworkServices::V1::WasmPlugin. - # p item - # end - # - def list_wasm_plugins request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::ListWasmPluginsRequest - - # Converts hash 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_wasm_plugins.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::NetworkServices::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_wasm_plugins.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_wasm_plugins.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.list_wasm_plugins request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @network_services_stub, :list_wasm_plugins, "wasm_plugins", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets details of the specified `WasmPlugin` resource. - # - # @overload get_wasm_plugin(request, options = nil) - # Pass arguments to `get_wasm_plugin` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::GetWasmPluginRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::GetWasmPluginRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_wasm_plugin(name: nil, view: nil) - # Pass arguments to `get_wasm_plugin` via keyword arguments. Note that at - # least one keyword argument is 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. A name of the `WasmPlugin` resource to get. Must be in the - # format `projects/{project}/locations/global/wasmPlugins/{wasm_plugin}`. - # @param view [::Google::Cloud::NetworkServices::V1::WasmPluginView] - # Determines how much data must be returned in the response. See - # [AIP-157](https://google.aip.dev/157). - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::NetworkServices::V1::WasmPlugin] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::NetworkServices::V1::WasmPlugin] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/network_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::GetWasmPluginRequest.new - # - # # Call the get_wasm_plugin method. - # result = client.get_wasm_plugin request - # - # # The returned object is of type Google::Cloud::NetworkServices::V1::WasmPlugin. - # p result - # - def get_wasm_plugin request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::GetWasmPluginRequest - - # Converts hash 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_wasm_plugin.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::NetworkServices::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_wasm_plugin.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_wasm_plugin.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.get_wasm_plugin 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 `WasmPlugin` resource in a given project - # and location. - # - # @overload create_wasm_plugin(request, options = nil) - # Pass arguments to `create_wasm_plugin` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::CreateWasmPluginRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::CreateWasmPluginRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_wasm_plugin(parent: nil, wasm_plugin_id: nil, wasm_plugin: nil) - # Pass arguments to `create_wasm_plugin` via keyword arguments. Note that at - # least one keyword argument is 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 `WasmPlugin` resource. Must be in the - # format `projects/{project}/locations/global`. - # @param wasm_plugin_id [::String] - # Required. User-provided ID of the `WasmPlugin` resource to be created. - # @param wasm_plugin [::Google::Cloud::NetworkServices::V1::WasmPlugin, ::Hash] - # Required. `WasmPlugin` resource to be created. - # @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_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::CreateWasmPluginRequest.new - # - # # Call the create_wasm_plugin method. - # result = client.create_wasm_plugin 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_wasm_plugin request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::CreateWasmPluginRequest - - # Converts hash 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_wasm_plugin.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::NetworkServices::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_wasm_plugin.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_wasm_plugin.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.create_wasm_plugin request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the parameters of the specified `WasmPlugin` resource. - # - # @overload update_wasm_plugin(request, options = nil) - # Pass arguments to `update_wasm_plugin` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::UpdateWasmPluginRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::UpdateWasmPluginRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_wasm_plugin(update_mask: nil, wasm_plugin: nil) - # Pass arguments to `update_wasm_plugin` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. Used to specify the fields to be overwritten in the - # `WasmPlugin` resource by the update. - # The fields specified in the `update_mask` field are relative to the - # resource, not the full request. - # An omitted `update_mask` field is treated as an implied `update_mask` - # field equivalent to all fields that are populated (that have a non-empty - # value). - # The `update_mask` field supports a special value `*`, which means that - # each field in the given `WasmPlugin` resource (including the empty ones) - # replaces the current value. - # @param wasm_plugin [::Google::Cloud::NetworkServices::V1::WasmPlugin, ::Hash] - # Required. Updated `WasmPlugin` 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_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::UpdateWasmPluginRequest.new - # - # # Call the update_wasm_plugin method. - # result = client.update_wasm_plugin 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_wasm_plugin request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::UpdateWasmPluginRequest - - # Converts hash 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_wasm_plugin.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::NetworkServices::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_wasm_plugin.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_wasm_plugin.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.update_wasm_plugin 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 the specified `WasmPlugin` resource. - # - # @overload delete_wasm_plugin(request, options = nil) - # Pass arguments to `delete_wasm_plugin` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::DeleteWasmPluginRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::DeleteWasmPluginRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_wasm_plugin(name: nil) - # Pass arguments to `delete_wasm_plugin` via keyword arguments. Note that at - # least one keyword argument is 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. A name of the `WasmPlugin` resource to delete. Must be in the - # format `projects/{project}/locations/global/wasmPlugins/{wasm_plugin}`. - # @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_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::DeleteWasmPluginRequest.new - # - # # Call the delete_wasm_plugin method. - # result = client.delete_wasm_plugin 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_wasm_plugin request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::DeleteWasmPluginRequest - - # Converts hash 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_wasm_plugin.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::NetworkServices::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_wasm_plugin.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_wasm_plugin.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.delete_wasm_plugin request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists Gateways in a given project and location. - # - # @overload list_gateways(request, options = nil) - # Pass arguments to `list_gateways` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::ListGatewaysRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::ListGatewaysRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_gateways(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_gateways` via keyword arguments. Note that at - # least one keyword argument is 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 project and location from which the Gateways should be - # listed, specified in the format `projects/*/locations/*`. - # @param page_size [::Integer] - # Maximum number of Gateways to return per call. - # @param page_token [::String] - # The value returned by the last `ListGatewaysResponse` - # Indicates that this is a continuation of a prior `ListGateways` call, - # and that the system should return the next page of data. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::Gateway>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::Gateway>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/network_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::ListGatewaysRequest.new - # - # # Call the list_gateways method. - # result = client.list_gateways 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::NetworkServices::V1::Gateway. - # p item - # end - # - def list_gateways request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::ListGatewaysRequest - - # Converts hash 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_gateways.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::NetworkServices::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_gateways.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_gateways.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.list_gateways request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @network_services_stub, :list_gateways, "gateways", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets details of a single Gateway. - # - # @overload get_gateway(request, options = nil) - # Pass arguments to `get_gateway` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::GetGatewayRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::GetGatewayRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_gateway(name: nil) - # Pass arguments to `get_gateway` via keyword arguments. Note that at - # least one keyword argument is 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. A name of the Gateway to get. Must be in the format - # `projects/*/locations/*/gateways/*`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::NetworkServices::V1::Gateway] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::NetworkServices::V1::Gateway] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/network_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::GetGatewayRequest.new - # - # # Call the get_gateway method. - # result = client.get_gateway request - # - # # The returned object is of type Google::Cloud::NetworkServices::V1::Gateway. - # p result - # - def get_gateway request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::GetGatewayRequest - - # Converts hash 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_gateway.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::NetworkServices::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_gateway.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_gateway.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.get_gateway 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 Gateway in a given project and location. - # - # @overload create_gateway(request, options = nil) - # Pass arguments to `create_gateway` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::CreateGatewayRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::CreateGatewayRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_gateway(parent: nil, gateway_id: nil, gateway: nil) - # Pass arguments to `create_gateway` via keyword arguments. Note that at - # least one keyword argument is 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 Gateway. Must be in the - # format `projects/*/locations/*`. - # @param gateway_id [::String] - # Required. Short name of the Gateway resource to be created. - # @param gateway [::Google::Cloud::NetworkServices::V1::Gateway, ::Hash] - # Required. Gateway resource to be created. - # @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_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::CreateGatewayRequest.new - # - # # Call the create_gateway method. - # result = client.create_gateway 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_gateway request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::CreateGatewayRequest - - # Converts hash 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_gateway.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::NetworkServices::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_gateway.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_gateway.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.create_gateway request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the parameters of a single Gateway. - # - # @overload update_gateway(request, options = nil) - # Pass arguments to `update_gateway` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::UpdateGatewayRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::UpdateGatewayRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_gateway(update_mask: nil, gateway: nil) - # Pass arguments to `update_gateway` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. Field mask is used to specify the fields to be overwritten in the - # Gateway resource by the update. - # The fields specified in the update_mask are relative to the resource, not - # the full request. A field will be overwritten if it is in the mask. If the - # user does not provide a mask then all fields will be overwritten. - # @param gateway [::Google::Cloud::NetworkServices::V1::Gateway, ::Hash] - # Required. Updated Gateway 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_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::UpdateGatewayRequest.new - # - # # Call the update_gateway method. - # result = client.update_gateway 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_gateway request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::UpdateGatewayRequest - - # Converts hash 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_gateway.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::NetworkServices::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_gateway.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_gateway.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.update_gateway request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a single Gateway. - # - # @overload delete_gateway(request, options = nil) - # Pass arguments to `delete_gateway` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::DeleteGatewayRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::DeleteGatewayRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_gateway(name: nil) - # Pass arguments to `delete_gateway` via keyword arguments. Note that at - # least one keyword argument is 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. A name of the Gateway to delete. Must be in the format - # `projects/*/locations/*/gateways/*`. - # @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_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::DeleteGatewayRequest.new - # - # # Call the delete_gateway method. - # result = client.delete_gateway 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_gateway request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::DeleteGatewayRequest - - # Converts hash 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_gateway.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::NetworkServices::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_gateway.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_gateway.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.delete_gateway request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists GrpcRoutes in a given project and location. - # - # @overload list_grpc_routes(request, options = nil) - # Pass arguments to `list_grpc_routes` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::ListGrpcRoutesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::ListGrpcRoutesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_grpc_routes(parent: nil, page_size: nil, page_token: nil, return_partial_success: nil) - # Pass arguments to `list_grpc_routes` via keyword arguments. Note that at - # least one keyword argument is 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 project and location from which the GrpcRoutes should be - # listed, specified in the format `projects/*/locations/*`. - # @param page_size [::Integer] - # Maximum number of GrpcRoutes to return per call. - # @param page_token [::String] - # The value returned by the last `ListGrpcRoutesResponse` - # Indicates that this is a continuation of a prior `ListGrpcRoutes` call, - # and that the system should return the next page of data. - # @param return_partial_success [::Boolean] - # Optional. If true, allow partial responses for multi-regional Aggregated - # List requests. Otherwise if one of the locations is down or unreachable, - # the Aggregated List request will fail. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::GrpcRoute>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::GrpcRoute>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/network_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::ListGrpcRoutesRequest.new - # - # # Call the list_grpc_routes method. - # result = client.list_grpc_routes 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::NetworkServices::V1::GrpcRoute. - # p item - # end - # - def list_grpc_routes request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::ListGrpcRoutesRequest - - # Converts hash 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_grpc_routes.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::NetworkServices::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_grpc_routes.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_grpc_routes.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.list_grpc_routes request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @network_services_stub, :list_grpc_routes, "grpc_routes", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets details of a single GrpcRoute. - # - # @overload get_grpc_route(request, options = nil) - # Pass arguments to `get_grpc_route` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::GetGrpcRouteRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::GetGrpcRouteRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_grpc_route(name: nil) - # Pass arguments to `get_grpc_route` via keyword arguments. Note that at - # least one keyword argument is 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. A name of the GrpcRoute to get. Must be in the format - # `projects/*/locations/*/grpcRoutes/*`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::NetworkServices::V1::GrpcRoute] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::NetworkServices::V1::GrpcRoute] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/network_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::GetGrpcRouteRequest.new - # - # # Call the get_grpc_route method. - # result = client.get_grpc_route request - # - # # The returned object is of type Google::Cloud::NetworkServices::V1::GrpcRoute. - # p result - # - def get_grpc_route request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::GetGrpcRouteRequest - - # Converts hash 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_grpc_route.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::NetworkServices::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_grpc_route.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_grpc_route.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.get_grpc_route 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 GrpcRoute in a given project and location. - # - # @overload create_grpc_route(request, options = nil) - # Pass arguments to `create_grpc_route` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::CreateGrpcRouteRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::CreateGrpcRouteRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_grpc_route(parent: nil, grpc_route_id: nil, grpc_route: nil) - # Pass arguments to `create_grpc_route` via keyword arguments. Note that at - # least one keyword argument is 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 GrpcRoute. Must be in the - # format `projects/*/locations/*`. - # @param grpc_route_id [::String] - # Required. Short name of the GrpcRoute resource to be created. - # @param grpc_route [::Google::Cloud::NetworkServices::V1::GrpcRoute, ::Hash] - # Required. GrpcRoute resource to be created. - # @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_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::CreateGrpcRouteRequest.new - # - # # Call the create_grpc_route method. - # result = client.create_grpc_route 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_grpc_route request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::CreateGrpcRouteRequest - - # Converts hash 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_grpc_route.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::NetworkServices::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_grpc_route.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_grpc_route.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.create_grpc_route request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the parameters of a single GrpcRoute. - # - # @overload update_grpc_route(request, options = nil) - # Pass arguments to `update_grpc_route` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::UpdateGrpcRouteRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::UpdateGrpcRouteRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_grpc_route(update_mask: nil, grpc_route: nil) - # Pass arguments to `update_grpc_route` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. Field mask is used to specify the fields to be overwritten in the - # GrpcRoute resource by the update. - # The fields specified in the update_mask are relative to the resource, not - # the full request. A field will be overwritten if it is in the mask. If the - # user does not provide a mask then all fields will be overwritten. - # @param grpc_route [::Google::Cloud::NetworkServices::V1::GrpcRoute, ::Hash] - # Required. Updated GrpcRoute 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_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::UpdateGrpcRouteRequest.new - # - # # Call the update_grpc_route method. - # result = client.update_grpc_route 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_grpc_route request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::UpdateGrpcRouteRequest - - # Converts hash 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_grpc_route.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::NetworkServices::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_grpc_route.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_grpc_route.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.update_grpc_route request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a single GrpcRoute. - # - # @overload delete_grpc_route(request, options = nil) - # Pass arguments to `delete_grpc_route` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::DeleteGrpcRouteRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::DeleteGrpcRouteRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_grpc_route(name: nil) - # Pass arguments to `delete_grpc_route` via keyword arguments. Note that at - # least one keyword argument is 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. A name of the GrpcRoute to delete. Must be in the format - # `projects/*/locations/*/grpcRoutes/*`. - # @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_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::DeleteGrpcRouteRequest.new - # - # # Call the delete_grpc_route method. - # result = client.delete_grpc_route 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_grpc_route request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::DeleteGrpcRouteRequest - - # Converts hash 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_grpc_route.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::NetworkServices::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_grpc_route.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_grpc_route.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.delete_grpc_route request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists HttpRoute in a given project and location. - # - # @overload list_http_routes(request, options = nil) - # Pass arguments to `list_http_routes` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::ListHttpRoutesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::ListHttpRoutesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_http_routes(parent: nil, page_size: nil, page_token: nil, return_partial_success: nil, filter: nil) - # Pass arguments to `list_http_routes` via keyword arguments. Note that at - # least one keyword argument is 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 project and location from which the HttpRoutes should be - # listed, specified in the format `projects/*/locations/*`. - # @param page_size [::Integer] - # Maximum number of HttpRoutes to return per call. - # @param page_token [::String] - # The value returned by the last `ListHttpRoutesResponse` - # Indicates that this is a continuation of a prior `ListHttpRoutes` call, - # and that the system should return the next page of data. - # @param return_partial_success [::Boolean] - # Optional. If true, allow partial responses for multi-regional Aggregated - # List requests. Otherwise if one of the locations is down or unreachable, - # the Aggregated List request will fail. - # @param filter [::String] - # Optional. Filter expression to restrict the list. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::HttpRoute>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::HttpRoute>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/network_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::ListHttpRoutesRequest.new - # - # # Call the list_http_routes method. - # result = client.list_http_routes 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::NetworkServices::V1::HttpRoute. - # p item - # end - # - def list_http_routes request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::ListHttpRoutesRequest - - # Converts hash 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_http_routes.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::NetworkServices::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_http_routes.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_http_routes.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.list_http_routes request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @network_services_stub, :list_http_routes, "http_routes", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets details of a single HttpRoute. - # - # @overload get_http_route(request, options = nil) - # Pass arguments to `get_http_route` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::GetHttpRouteRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::GetHttpRouteRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_http_route(name: nil) - # Pass arguments to `get_http_route` via keyword arguments. Note that at - # least one keyword argument is 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. A name of the HttpRoute to get. Must be in the format - # `projects/*/locations/*/httpRoutes/*`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::NetworkServices::V1::HttpRoute] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::NetworkServices::V1::HttpRoute] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/network_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::GetHttpRouteRequest.new - # - # # Call the get_http_route method. - # result = client.get_http_route request - # - # # The returned object is of type Google::Cloud::NetworkServices::V1::HttpRoute. - # p result - # - def get_http_route request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::GetHttpRouteRequest - - # Converts hash 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_http_route.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::NetworkServices::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_http_route.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_http_route.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.get_http_route 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 HttpRoute in a given project and location. - # - # @overload create_http_route(request, options = nil) - # Pass arguments to `create_http_route` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::CreateHttpRouteRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::CreateHttpRouteRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_http_route(parent: nil, http_route_id: nil, http_route: nil, request_id: nil) - # Pass arguments to `create_http_route` via keyword arguments. Note that at - # least one keyword argument is 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 HttpRoute. Must be in the - # format `projects/*/locations/*`. - # @param http_route_id [::String] - # Required. Short name of the HttpRoute resource to be created. - # @param http_route [::Google::Cloud::NetworkServices::V1::HttpRoute, ::Hash] - # Required. HttpRoute resource to be created. - # @param request_id [::String] - # Optional. Idempotent request UUID. - # @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_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::CreateHttpRouteRequest.new - # - # # Call the create_http_route method. - # result = client.create_http_route 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_http_route request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::CreateHttpRouteRequest - - # Converts hash 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_http_route.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::NetworkServices::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_http_route.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_http_route.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.create_http_route request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the parameters of a single HttpRoute. - # - # @overload update_http_route(request, options = nil) - # Pass arguments to `update_http_route` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::UpdateHttpRouteRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::UpdateHttpRouteRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_http_route(update_mask: nil, http_route: nil) - # Pass arguments to `update_http_route` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. Field mask is used to specify the fields to be overwritten in the - # HttpRoute resource by the update. - # The fields specified in the update_mask are relative to the resource, not - # the full request. A field will be overwritten if it is in the mask. If the - # user does not provide a mask then all fields will be overwritten. - # @param http_route [::Google::Cloud::NetworkServices::V1::HttpRoute, ::Hash] - # Required. Updated HttpRoute 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_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::UpdateHttpRouteRequest.new - # - # # Call the update_http_route method. - # result = client.update_http_route 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_http_route request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::UpdateHttpRouteRequest - - # Converts hash 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_http_route.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::NetworkServices::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_http_route.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_http_route.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.update_http_route request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a single HttpRoute. - # - # @overload delete_http_route(request, options = nil) - # Pass arguments to `delete_http_route` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::DeleteHttpRouteRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::DeleteHttpRouteRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_http_route(name: nil) - # Pass arguments to `delete_http_route` via keyword arguments. Note that at - # least one keyword argument is 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. A name of the HttpRoute to delete. Must be in the format - # `projects/*/locations/*/httpRoutes/*`. - # @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_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::DeleteHttpRouteRequest.new - # - # # Call the delete_http_route method. - # result = client.delete_http_route 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_http_route request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::DeleteHttpRouteRequest - - # Converts hash 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_http_route.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::NetworkServices::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_http_route.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_http_route.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.delete_http_route request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists TcpRoute in a given project and location. - # - # @overload list_tcp_routes(request, options = nil) - # Pass arguments to `list_tcp_routes` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::ListTcpRoutesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::ListTcpRoutesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_tcp_routes(parent: nil, page_size: nil, page_token: nil, return_partial_success: nil) - # Pass arguments to `list_tcp_routes` via keyword arguments. Note that at - # least one keyword argument is 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 project and location from which the TcpRoutes should be - # listed, specified in the format `projects/*/locations/*`. - # @param page_size [::Integer] - # Maximum number of TcpRoutes to return per call. - # @param page_token [::String] - # The value returned by the last `ListTcpRoutesResponse` - # Indicates that this is a continuation of a prior `ListTcpRoutes` call, - # and that the system should return the next page of data. - # @param return_partial_success [::Boolean] - # Optional. If true, allow partial responses for multi-regional Aggregated - # List requests. Otherwise if one of the locations is down or unreachable, - # the Aggregated List request will fail. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::TcpRoute>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::TcpRoute>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/network_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::ListTcpRoutesRequest.new - # - # # Call the list_tcp_routes method. - # result = client.list_tcp_routes 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::NetworkServices::V1::TcpRoute. - # p item - # end - # - def list_tcp_routes request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::ListTcpRoutesRequest - - # Converts hash 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_tcp_routes.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::NetworkServices::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_tcp_routes.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_tcp_routes.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.list_tcp_routes request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @network_services_stub, :list_tcp_routes, "tcp_routes", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets details of a single TcpRoute. - # - # @overload get_tcp_route(request, options = nil) - # Pass arguments to `get_tcp_route` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::GetTcpRouteRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::GetTcpRouteRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_tcp_route(name: nil) - # Pass arguments to `get_tcp_route` via keyword arguments. Note that at - # least one keyword argument is 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. A name of the TcpRoute to get. Must be in the format - # `projects/*/locations/*/tcpRoutes/*`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::NetworkServices::V1::TcpRoute] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::NetworkServices::V1::TcpRoute] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/network_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::GetTcpRouteRequest.new - # - # # Call the get_tcp_route method. - # result = client.get_tcp_route request - # - # # The returned object is of type Google::Cloud::NetworkServices::V1::TcpRoute. - # p result - # - def get_tcp_route request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::GetTcpRouteRequest - - # Converts hash 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_tcp_route.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::NetworkServices::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_tcp_route.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_tcp_route.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.get_tcp_route 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 TcpRoute in a given project and location. - # - # @overload create_tcp_route(request, options = nil) - # Pass arguments to `create_tcp_route` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::CreateTcpRouteRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::CreateTcpRouteRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_tcp_route(parent: nil, tcp_route_id: nil, tcp_route: nil) - # Pass arguments to `create_tcp_route` via keyword arguments. Note that at - # least one keyword argument is 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 TcpRoute. Must be in the - # format `projects/*/locations/*`. - # @param tcp_route_id [::String] - # Required. Short name of the TcpRoute resource to be created. - # @param tcp_route [::Google::Cloud::NetworkServices::V1::TcpRoute, ::Hash] - # Required. TcpRoute resource to be created. - # @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_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::CreateTcpRouteRequest.new - # - # # Call the create_tcp_route method. - # result = client.create_tcp_route 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_tcp_route request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::CreateTcpRouteRequest - - # Converts hash 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_tcp_route.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::NetworkServices::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_tcp_route.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_tcp_route.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.create_tcp_route request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the parameters of a single TcpRoute. - # - # @overload update_tcp_route(request, options = nil) - # Pass arguments to `update_tcp_route` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::UpdateTcpRouteRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::UpdateTcpRouteRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_tcp_route(update_mask: nil, tcp_route: nil) - # Pass arguments to `update_tcp_route` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. Field mask is used to specify the fields to be overwritten in the - # TcpRoute resource by the update. - # The fields specified in the update_mask are relative to the resource, not - # the full request. A field will be overwritten if it is in the mask. If the - # user does not provide a mask then all fields will be overwritten. - # @param tcp_route [::Google::Cloud::NetworkServices::V1::TcpRoute, ::Hash] - # Required. Updated TcpRoute 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_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::UpdateTcpRouteRequest.new - # - # # Call the update_tcp_route method. - # result = client.update_tcp_route 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_tcp_route request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::UpdateTcpRouteRequest - - # Converts hash 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_tcp_route.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::NetworkServices::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_tcp_route.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_tcp_route.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.update_tcp_route request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a single TcpRoute. - # - # @overload delete_tcp_route(request, options = nil) - # Pass arguments to `delete_tcp_route` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::DeleteTcpRouteRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::DeleteTcpRouteRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_tcp_route(name: nil) - # Pass arguments to `delete_tcp_route` via keyword arguments. Note that at - # least one keyword argument is 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. A name of the TcpRoute to delete. Must be in the format - # `projects/*/locations/*/tcpRoutes/*`. - # @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_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::DeleteTcpRouteRequest.new - # - # # Call the delete_tcp_route method. - # result = client.delete_tcp_route 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_tcp_route request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::DeleteTcpRouteRequest - - # Converts hash 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_tcp_route.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::NetworkServices::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_tcp_route.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_tcp_route.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.delete_tcp_route request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists TlsRoute in a given project and location. - # - # @overload list_tls_routes(request, options = nil) - # Pass arguments to `list_tls_routes` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::ListTlsRoutesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::ListTlsRoutesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_tls_routes(parent: nil, page_size: nil, page_token: nil, return_partial_success: nil) - # Pass arguments to `list_tls_routes` via keyword arguments. Note that at - # least one keyword argument is 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 project and location from which the TlsRoutes should be - # listed, specified in the format `projects/*/locations/*`. - # @param page_size [::Integer] - # Maximum number of TlsRoutes to return per call. - # @param page_token [::String] - # The value returned by the last `ListTlsRoutesResponse` - # Indicates that this is a continuation of a prior `ListTlsRoutes` call, - # and that the system should return the next page of data. - # @param return_partial_success [::Boolean] - # Optional. If true, allow partial responses for multi-regional Aggregated - # List requests. Otherwise if one of the locations is down or unreachable, - # the Aggregated List request will fail. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::TlsRoute>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::TlsRoute>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/network_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::ListTlsRoutesRequest.new - # - # # Call the list_tls_routes method. - # result = client.list_tls_routes 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::NetworkServices::V1::TlsRoute. - # p item - # end - # - def list_tls_routes request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::ListTlsRoutesRequest - - # Converts hash 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_tls_routes.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::NetworkServices::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_tls_routes.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_tls_routes.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.list_tls_routes request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @network_services_stub, :list_tls_routes, "tls_routes", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets details of a single TlsRoute. - # - # @overload get_tls_route(request, options = nil) - # Pass arguments to `get_tls_route` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::GetTlsRouteRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::GetTlsRouteRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_tls_route(name: nil) - # Pass arguments to `get_tls_route` via keyword arguments. Note that at - # least one keyword argument is 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. A name of the TlsRoute to get. Must be in the format - # `projects/*/locations/*/tlsRoutes/*`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::NetworkServices::V1::TlsRoute] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::NetworkServices::V1::TlsRoute] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/network_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::GetTlsRouteRequest.new - # - # # Call the get_tls_route method. - # result = client.get_tls_route request - # - # # The returned object is of type Google::Cloud::NetworkServices::V1::TlsRoute. - # p result - # - def get_tls_route request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::GetTlsRouteRequest - - # Converts hash 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_tls_route.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::NetworkServices::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_tls_route.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_tls_route.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.get_tls_route 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 TlsRoute in a given project and location. - # - # @overload create_tls_route(request, options = nil) - # Pass arguments to `create_tls_route` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::CreateTlsRouteRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::CreateTlsRouteRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_tls_route(parent: nil, tls_route_id: nil, tls_route: nil) - # Pass arguments to `create_tls_route` via keyword arguments. Note that at - # least one keyword argument is 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 TlsRoute. Must be in the - # format `projects/*/locations/*`. - # @param tls_route_id [::String] - # Required. Short name of the TlsRoute resource to be created. - # @param tls_route [::Google::Cloud::NetworkServices::V1::TlsRoute, ::Hash] - # Required. TlsRoute resource to be created. - # @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_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::CreateTlsRouteRequest.new - # - # # Call the create_tls_route method. - # result = client.create_tls_route 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_tls_route request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::CreateTlsRouteRequest - - # Converts hash 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_tls_route.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::NetworkServices::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_tls_route.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_tls_route.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.create_tls_route request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the parameters of a single TlsRoute. - # - # @overload update_tls_route(request, options = nil) - # Pass arguments to `update_tls_route` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::UpdateTlsRouteRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::UpdateTlsRouteRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_tls_route(update_mask: nil, tls_route: nil) - # Pass arguments to `update_tls_route` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. Field mask is used to specify the fields to be overwritten in the - # TlsRoute resource by the update. - # The fields specified in the update_mask are relative to the resource, not - # the full request. A field will be overwritten if it is in the mask. If the - # user does not provide a mask then all fields will be overwritten. - # @param tls_route [::Google::Cloud::NetworkServices::V1::TlsRoute, ::Hash] - # Required. Updated TlsRoute 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_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::UpdateTlsRouteRequest.new - # - # # Call the update_tls_route method. - # result = client.update_tls_route 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_tls_route request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::UpdateTlsRouteRequest - - # Converts hash 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_tls_route.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::NetworkServices::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_tls_route.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_tls_route.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.update_tls_route request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a single TlsRoute. - # - # @overload delete_tls_route(request, options = nil) - # Pass arguments to `delete_tls_route` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::DeleteTlsRouteRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::DeleteTlsRouteRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_tls_route(name: nil) - # Pass arguments to `delete_tls_route` via keyword arguments. Note that at - # least one keyword argument is 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. A name of the TlsRoute to delete. Must be in the format - # `projects/*/locations/*/tlsRoutes/*`. - # @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_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::DeleteTlsRouteRequest.new - # - # # Call the delete_tls_route method. - # result = client.delete_tls_route 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_tls_route request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::DeleteTlsRouteRequest - - # Converts hash 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_tls_route.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::NetworkServices::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_tls_route.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_tls_route.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.delete_tls_route request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists ServiceBinding in a given project and location. - # - # @overload list_service_bindings(request, options = nil) - # Pass arguments to `list_service_bindings` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::ListServiceBindingsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::ListServiceBindingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_service_bindings(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_service_bindings` via keyword arguments. Note that at - # least one keyword argument is 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 project and location from which the ServiceBindings should be - # listed, specified in the format `projects/*/locations/*`. - # @param page_size [::Integer] - # Maximum number of ServiceBindings to return per call. - # @param page_token [::String] - # The value returned by the last `ListServiceBindingsResponse` - # Indicates that this is a continuation of a prior `ListRouters` call, - # and that the system should return the next page of data. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::ServiceBinding>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::ServiceBinding>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/network_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::ListServiceBindingsRequest.new - # - # # Call the list_service_bindings method. - # result = client.list_service_bindings 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::NetworkServices::V1::ServiceBinding. - # p item - # end - # - def list_service_bindings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::ListServiceBindingsRequest - - # Converts hash 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_service_bindings.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::NetworkServices::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_service_bindings.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_service_bindings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.list_service_bindings request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @network_services_stub, :list_service_bindings, "service_bindings", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets details of a single ServiceBinding. - # - # @overload get_service_binding(request, options = nil) - # Pass arguments to `get_service_binding` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::GetServiceBindingRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::GetServiceBindingRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_service_binding(name: nil) - # Pass arguments to `get_service_binding` via keyword arguments. Note that at - # least one keyword argument is 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. A name of the ServiceBinding to get. Must be in the format - # `projects/*/locations/*/serviceBindings/*`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::NetworkServices::V1::ServiceBinding] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::NetworkServices::V1::ServiceBinding] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/network_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::GetServiceBindingRequest.new - # - # # Call the get_service_binding method. - # result = client.get_service_binding request - # - # # The returned object is of type Google::Cloud::NetworkServices::V1::ServiceBinding. - # p result - # - def get_service_binding request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::GetServiceBindingRequest - - # Converts hash 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_service_binding.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::NetworkServices::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_service_binding.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_service_binding.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.get_service_binding 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 ServiceBinding in a given project and location. - # - # @overload create_service_binding(request, options = nil) - # Pass arguments to `create_service_binding` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::CreateServiceBindingRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::CreateServiceBindingRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_service_binding(parent: nil, service_binding_id: nil, service_binding: nil) - # Pass arguments to `create_service_binding` via keyword arguments. Note that at - # least one keyword argument is 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 ServiceBinding. Must be in the - # format `projects/*/locations/*`. - # @param service_binding_id [::String] - # Required. Short name of the ServiceBinding resource to be created. - # @param service_binding [::Google::Cloud::NetworkServices::V1::ServiceBinding, ::Hash] - # Required. ServiceBinding resource to be created. - # @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_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::CreateServiceBindingRequest.new - # - # # Call the create_service_binding method. - # result = client.create_service_binding 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_service_binding request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::CreateServiceBindingRequest - - # Converts hash 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_service_binding.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::NetworkServices::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_service_binding.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_service_binding.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.create_service_binding request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the parameters of a single ServiceBinding. - # - # @overload update_service_binding(request, options = nil) - # Pass arguments to `update_service_binding` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::UpdateServiceBindingRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::UpdateServiceBindingRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_service_binding(update_mask: nil, service_binding: nil) - # Pass arguments to `update_service_binding` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. Field mask is used to specify the fields to be overwritten in the - # ServiceBinding resource by the update. - # The fields specified in the update_mask are relative to the resource, not - # the full request. A field will be overwritten if it is in the mask. If the - # user does not provide a mask then all fields will be overwritten. - # @param service_binding [::Google::Cloud::NetworkServices::V1::ServiceBinding, ::Hash] - # Required. Updated ServiceBinding 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_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::UpdateServiceBindingRequest.new - # - # # Call the update_service_binding method. - # result = client.update_service_binding 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_service_binding request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::UpdateServiceBindingRequest - - # Converts hash 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_service_binding.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::NetworkServices::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_service_binding.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_service_binding.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.update_service_binding request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a single ServiceBinding. - # - # @overload delete_service_binding(request, options = nil) - # Pass arguments to `delete_service_binding` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::DeleteServiceBindingRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::DeleteServiceBindingRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_service_binding(name: nil) - # Pass arguments to `delete_service_binding` via keyword arguments. Note that at - # least one keyword argument is 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. A name of the ServiceBinding to delete. Must be in the format - # `projects/*/locations/*/serviceBindings/*`. - # @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_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::DeleteServiceBindingRequest.new - # - # # Call the delete_service_binding method. - # result = client.delete_service_binding 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_service_binding request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::DeleteServiceBindingRequest - - # Converts hash 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_service_binding.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::NetworkServices::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_service_binding.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_service_binding.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.delete_service_binding request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists Meshes in a given project and location. - # - # @overload list_meshes(request, options = nil) - # Pass arguments to `list_meshes` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::ListMeshesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::ListMeshesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_meshes(parent: nil, page_size: nil, page_token: nil, return_partial_success: nil) - # Pass arguments to `list_meshes` via keyword arguments. Note that at - # least one keyword argument is 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 project and location from which the Meshes should be - # listed, specified in the format `projects/*/locations/*`. - # @param page_size [::Integer] - # Maximum number of Meshes to return per call. - # @param page_token [::String] - # The value returned by the last `ListMeshesResponse` - # Indicates that this is a continuation of a prior `ListMeshes` call, - # and that the system should return the next page of data. - # @param return_partial_success [::Boolean] - # Optional. If true, allow partial responses for multi-regional Aggregated - # List requests. Otherwise if one of the locations is down or unreachable, - # the Aggregated List request will fail. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::Mesh>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::Mesh>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/network_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::ListMeshesRequest.new - # - # # Call the list_meshes method. - # result = client.list_meshes 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::NetworkServices::V1::Mesh. - # p item - # end - # - def list_meshes request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::ListMeshesRequest - - # Converts hash 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_meshes.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::NetworkServices::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_meshes.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_meshes.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.list_meshes request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @network_services_stub, :list_meshes, "meshes", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets details of a single Mesh. - # - # @overload get_mesh(request, options = nil) - # Pass arguments to `get_mesh` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::GetMeshRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::GetMeshRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_mesh(name: nil) - # Pass arguments to `get_mesh` via keyword arguments. Note that at - # least one keyword argument is 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. A name of the Mesh to get. Must be in the format - # `projects/*/locations/*/meshes/*`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::NetworkServices::V1::Mesh] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::NetworkServices::V1::Mesh] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/network_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::GetMeshRequest.new - # - # # Call the get_mesh method. - # result = client.get_mesh request - # - # # The returned object is of type Google::Cloud::NetworkServices::V1::Mesh. - # p result - # - def get_mesh request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::GetMeshRequest - - # Converts hash 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_mesh.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::NetworkServices::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_mesh.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_mesh.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.get_mesh 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 Mesh in a given project and location. - # - # @overload create_mesh(request, options = nil) - # Pass arguments to `create_mesh` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::CreateMeshRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::CreateMeshRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_mesh(parent: nil, mesh_id: nil, mesh: nil) - # Pass arguments to `create_mesh` via keyword arguments. Note that at - # least one keyword argument is 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 Mesh. Must be in the - # format `projects/*/locations/*`. - # @param mesh_id [::String] - # Required. Short name of the Mesh resource to be created. - # @param mesh [::Google::Cloud::NetworkServices::V1::Mesh, ::Hash] - # Required. Mesh resource to be created. - # @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_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::CreateMeshRequest.new - # - # # Call the create_mesh method. - # result = client.create_mesh 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_mesh request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::CreateMeshRequest - - # Converts hash 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_mesh.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::NetworkServices::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_mesh.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_mesh.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.create_mesh request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the parameters of a single Mesh. - # - # @overload update_mesh(request, options = nil) - # Pass arguments to `update_mesh` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::UpdateMeshRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::UpdateMeshRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_mesh(update_mask: nil, mesh: nil) - # Pass arguments to `update_mesh` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. Field mask is used to specify the fields to be overwritten in the - # Mesh resource by the update. - # The fields specified in the update_mask are relative to the resource, not - # the full request. A field will be overwritten if it is in the mask. If the - # user does not provide a mask then all fields will be overwritten. - # @param mesh [::Google::Cloud::NetworkServices::V1::Mesh, ::Hash] - # Required. Updated Mesh 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_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::UpdateMeshRequest.new - # - # # Call the update_mesh method. - # result = client.update_mesh 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_mesh request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::UpdateMeshRequest - - # Converts hash 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_mesh.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::NetworkServices::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_mesh.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_mesh.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.update_mesh request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a single Mesh. - # - # @overload delete_mesh(request, options = nil) - # Pass arguments to `delete_mesh` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::DeleteMeshRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::DeleteMeshRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_mesh(name: nil) - # Pass arguments to `delete_mesh` via keyword arguments. Note that at - # least one keyword argument is 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. A name of the Mesh to delete. Must be in the format - # `projects/*/locations/*/meshes/*`. - # @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_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::DeleteMeshRequest.new - # - # # Call the delete_mesh method. - # result = client.delete_mesh 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_mesh request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::DeleteMeshRequest - - # Converts hash 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_mesh.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::NetworkServices::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_mesh.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_mesh.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.delete_mesh request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists ServiceLbPolicies in a given project and location. - # - # @overload list_service_lb_policies(request, options = nil) - # Pass arguments to `list_service_lb_policies` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::ListServiceLbPoliciesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::ListServiceLbPoliciesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_service_lb_policies(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_service_lb_policies` via keyword arguments. Note that at - # least one keyword argument is 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 project and location from which the ServiceLbPolicies should - # be listed, specified in the format - # `projects/{project}/locations/{location}`. - # @param page_size [::Integer] - # Maximum number of ServiceLbPolicies to return per call. - # @param page_token [::String] - # The value returned by the last `ListServiceLbPoliciesResponse` - # Indicates that this is a continuation of a prior `ListRouters` call, - # and that the system should return the next page of data. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::ServiceLbPolicy>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::ServiceLbPolicy>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/network_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::ListServiceLbPoliciesRequest.new - # - # # Call the list_service_lb_policies method. - # result = client.list_service_lb_policies 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::NetworkServices::V1::ServiceLbPolicy. - # p item - # end - # - def list_service_lb_policies request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::ListServiceLbPoliciesRequest - - # Converts hash 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_service_lb_policies.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::NetworkServices::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_service_lb_policies.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_service_lb_policies.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.list_service_lb_policies request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @network_services_stub, :list_service_lb_policies, "service_lb_policies", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets details of a single ServiceLbPolicy. - # - # @overload get_service_lb_policy(request, options = nil) - # Pass arguments to `get_service_lb_policy` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::GetServiceLbPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::GetServiceLbPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_service_lb_policy(name: nil) - # Pass arguments to `get_service_lb_policy` via keyword arguments. Note that at - # least one keyword argument is 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. A name of the ServiceLbPolicy to get. Must be in the format - # `projects/{project}/locations/{location}/serviceLbPolicies/*`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::NetworkServices::V1::ServiceLbPolicy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::NetworkServices::V1::ServiceLbPolicy] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/network_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::GetServiceLbPolicyRequest.new - # - # # Call the get_service_lb_policy method. - # result = client.get_service_lb_policy request - # - # # The returned object is of type Google::Cloud::NetworkServices::V1::ServiceLbPolicy. - # p result - # - def get_service_lb_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::GetServiceLbPolicyRequest - - # Converts hash 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_service_lb_policy.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::NetworkServices::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_service_lb_policy.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_service_lb_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.get_service_lb_policy 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 ServiceLbPolicy in a given project and location. - # - # @overload create_service_lb_policy(request, options = nil) - # Pass arguments to `create_service_lb_policy` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::CreateServiceLbPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::CreateServiceLbPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_service_lb_policy(parent: nil, service_lb_policy_id: nil, service_lb_policy: nil) - # Pass arguments to `create_service_lb_policy` via keyword arguments. Note that at - # least one keyword argument is 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 ServiceLbPolicy. Must be in the - # format `projects/{project}/locations/{location}`. - # @param service_lb_policy_id [::String] - # Required. Short name of the ServiceLbPolicy resource to be created. - # E.g. for resource name - # `projects/{project}/locations/{location}/serviceLbPolicies/{service_lb_policy_name}`. - # the id is value of \\{service_lb_policy_name} - # @param service_lb_policy [::Google::Cloud::NetworkServices::V1::ServiceLbPolicy, ::Hash] - # Required. ServiceLbPolicy resource to be created. - # @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_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::CreateServiceLbPolicyRequest.new - # - # # Call the create_service_lb_policy method. - # result = client.create_service_lb_policy 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_service_lb_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::CreateServiceLbPolicyRequest - - # Converts hash 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_service_lb_policy.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::NetworkServices::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_service_lb_policy.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_service_lb_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.create_service_lb_policy request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the parameters of a single ServiceLbPolicy. - # - # @overload update_service_lb_policy(request, options = nil) - # Pass arguments to `update_service_lb_policy` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::UpdateServiceLbPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::UpdateServiceLbPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_service_lb_policy(update_mask: nil, service_lb_policy: nil) - # Pass arguments to `update_service_lb_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. Field mask is used to specify the fields to be overwritten in the - # ServiceLbPolicy resource by the update. - # The fields specified in the update_mask are relative to the resource, not - # the full request. A field will be overwritten if it is in the mask. If the - # user does not provide a mask then all fields will be overwritten. - # @param service_lb_policy [::Google::Cloud::NetworkServices::V1::ServiceLbPolicy, ::Hash] - # Required. Updated ServiceLbPolicy 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_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::UpdateServiceLbPolicyRequest.new - # - # # Call the update_service_lb_policy method. - # result = client.update_service_lb_policy 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_service_lb_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::UpdateServiceLbPolicyRequest - - # Converts hash 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_service_lb_policy.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::NetworkServices::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_service_lb_policy.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_service_lb_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.update_service_lb_policy request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a single ServiceLbPolicy. - # - # @overload delete_service_lb_policy(request, options = nil) - # Pass arguments to `delete_service_lb_policy` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::DeleteServiceLbPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::DeleteServiceLbPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_service_lb_policy(name: nil) - # Pass arguments to `delete_service_lb_policy` via keyword arguments. Note that at - # least one keyword argument is 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. A name of the ServiceLbPolicy to delete. Must be in the format - # `projects/{project}/locations/{location}/serviceLbPolicies/*`. - # @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_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::DeleteServiceLbPolicyRequest.new - # - # # Call the delete_service_lb_policy method. - # result = client.delete_service_lb_policy 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_service_lb_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::DeleteServiceLbPolicyRequest - - # Converts hash 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_service_lb_policy.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::NetworkServices::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_service_lb_policy.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_service_lb_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.delete_service_lb_policy 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 - - ## - # Get a single RouteView of a Gateway. - # - # @overload get_gateway_route_view(request, options = nil) - # Pass arguments to `get_gateway_route_view` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::GetGatewayRouteViewRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::GetGatewayRouteViewRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_gateway_route_view(name: nil) - # Pass arguments to `get_gateway_route_view` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the GatewayRouteView resource. - # Formats: - # projects/\\{project}/locations/\\{location}/gateways/\\{gateway}/routeViews/\\{route_view} - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::NetworkServices::V1::GatewayRouteView] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::NetworkServices::V1::GatewayRouteView] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/network_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::GetGatewayRouteViewRequest.new - # - # # Call the get_gateway_route_view method. - # result = client.get_gateway_route_view request - # - # # The returned object is of type Google::Cloud::NetworkServices::V1::GatewayRouteView. - # p result - # - def get_gateway_route_view request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::GetGatewayRouteViewRequest - - # Converts hash 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_gateway_route_view.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::NetworkServices::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_gateway_route_view.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_gateway_route_view.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.get_gateway_route_view 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 - - ## - # Get a single RouteView of a Mesh. - # - # @overload get_mesh_route_view(request, options = nil) - # Pass arguments to `get_mesh_route_view` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::GetMeshRouteViewRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::GetMeshRouteViewRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_mesh_route_view(name: nil) - # Pass arguments to `get_mesh_route_view` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the MeshRouteView resource. - # Format: - # projects/\\{project}/locations/\\{location}/meshes/\\{mesh}/routeViews/\\{route_view} - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::NetworkServices::V1::MeshRouteView] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::NetworkServices::V1::MeshRouteView] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/network_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::GetMeshRouteViewRequest.new - # - # # Call the get_mesh_route_view method. - # result = client.get_mesh_route_view request - # - # # The returned object is of type Google::Cloud::NetworkServices::V1::MeshRouteView. - # p result - # - def get_mesh_route_view request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::GetMeshRouteViewRequest - - # Converts hash 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_mesh_route_view.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::NetworkServices::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_mesh_route_view.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_mesh_route_view.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.get_mesh_route_view request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists RouteViews - # - # @overload list_gateway_route_views(request, options = nil) - # Pass arguments to `list_gateway_route_views` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::ListGatewayRouteViewsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::ListGatewayRouteViewsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_gateway_route_views(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_gateway_route_views` via keyword arguments. Note that at - # least one keyword argument is 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 Gateway to which a Route is associated. - # Formats: - # projects/\\{project}/locations/\\{location}/gateways/\\{gateway} - # @param page_size [::Integer] - # Maximum number of GatewayRouteViews to return per call. - # @param page_token [::String] - # The value returned by the last `ListGatewayRouteViewsResponse` - # Indicates that this is a continuation of a prior `ListGatewayRouteViews` - # call, and that the system should return the next page of data. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::GatewayRouteView>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::GatewayRouteView>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/network_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::ListGatewayRouteViewsRequest.new - # - # # Call the list_gateway_route_views method. - # result = client.list_gateway_route_views 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::NetworkServices::V1::GatewayRouteView. - # p item - # end - # - def list_gateway_route_views request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::ListGatewayRouteViewsRequest - - # Converts hash 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_gateway_route_views.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::NetworkServices::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_gateway_route_views.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_gateway_route_views.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.list_gateway_route_views request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @network_services_stub, :list_gateway_route_views, "gateway_route_views", 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 - - ## - # Lists RouteViews - # - # @overload list_mesh_route_views(request, options = nil) - # Pass arguments to `list_mesh_route_views` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::ListMeshRouteViewsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::ListMeshRouteViewsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_mesh_route_views(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_mesh_route_views` via keyword arguments. Note that at - # least one keyword argument is 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 Mesh to which a Route is associated. - # Format: - # projects/\\{project}/locations/\\{location}/meshes/\\{mesh} - # @param page_size [::Integer] - # Maximum number of MeshRouteViews to return per call. - # @param page_token [::String] - # The value returned by the last `ListMeshRouteViewsResponse` - # Indicates that this is a continuation of a prior `ListMeshRouteViews` call, - # and that the system should return the next page of data. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::MeshRouteView>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::MeshRouteView>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/network_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::ListMeshRouteViewsRequest.new - # - # # Call the list_mesh_route_views method. - # result = client.list_mesh_route_views 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::NetworkServices::V1::MeshRouteView. - # p item - # end - # - def list_mesh_route_views request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::ListMeshRouteViewsRequest - - # Converts hash 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_mesh_route_views.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::NetworkServices::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_mesh_route_views.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_mesh_route_views.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.list_mesh_route_views request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @network_services_stub, :list_mesh_route_views, "mesh_route_views", 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 - - ## - # Lists AgentGateways in a given project and location. - # - # @overload list_agent_gateways(request, options = nil) - # Pass arguments to `list_agent_gateways` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::ListAgentGatewaysRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::ListAgentGatewaysRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_agent_gateways(parent: nil, page_size: nil, page_token: nil, return_partial_success: nil) - # Pass arguments to `list_agent_gateways` via keyword arguments. Note that at - # least one keyword argument is 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 project and location from which the AgentGateways should be - # listed, specified in the format `projects/*/locations/*`. - # @param page_size [::Integer] - # Optional. Maximum number of AgentGateways to return per call. - # @param page_token [::String] - # Optional. The value returned by the last `ListAgentGatewaysResponse` - # Indicates that this is a continuation of a prior `ListAgentGateways` - # call, and that the system should return the next page of data. - # @param return_partial_success [::Boolean] - # Optional. If true, allow partial responses for multi-regional Aggregated - # List requests. Otherwise if one of the locations is down or unreachable, - # the Aggregated List request will fail. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::AgentGateway>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::AgentGateway>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/network_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::ListAgentGatewaysRequest.new - # - # # Call the list_agent_gateways method. - # result = client.list_agent_gateways 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::NetworkServices::V1::AgentGateway. - # p item - # end - # - def list_agent_gateways request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::ListAgentGatewaysRequest - - # Converts hash 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_agent_gateways.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::NetworkServices::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_agent_gateways.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_agent_gateways.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.list_agent_gateways request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @network_services_stub, :list_agent_gateways, "agent_gateways", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets details of a single AgentGateway. - # - # @overload get_agent_gateway(request, options = nil) - # Pass arguments to `get_agent_gateway` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::GetAgentGatewayRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::GetAgentGatewayRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_agent_gateway(name: nil) - # Pass arguments to `get_agent_gateway` via keyword arguments. Note that at - # least one keyword argument is 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. A name of the AgentGateway to get. Must be in the format - # `projects/*/locations/*/agentGateways/*`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::NetworkServices::V1::AgentGateway] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::NetworkServices::V1::AgentGateway] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/network_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::GetAgentGatewayRequest.new - # - # # Call the get_agent_gateway method. - # result = client.get_agent_gateway request - # - # # The returned object is of type Google::Cloud::NetworkServices::V1::AgentGateway. - # p result - # - def get_agent_gateway request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::GetAgentGatewayRequest - - # Converts hash 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_agent_gateway.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::NetworkServices::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_agent_gateway.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_agent_gateway.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.get_agent_gateway 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 AgentGateway in a given project and location. - # - # @overload create_agent_gateway(request, options = nil) - # Pass arguments to `create_agent_gateway` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::CreateAgentGatewayRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::CreateAgentGatewayRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_agent_gateway(parent: nil, agent_gateway_id: nil, agent_gateway: nil) - # Pass arguments to `create_agent_gateway` via keyword arguments. Note that at - # least one keyword argument is 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 AgentGateway. Must be in the - # format `projects/*/locations/*`. - # @param agent_gateway_id [::String] - # Required. Short name of the AgentGateway resource to be created. - # @param agent_gateway [::Google::Cloud::NetworkServices::V1::AgentGateway, ::Hash] - # Required. AgentGateway resource to be created. - # @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_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::CreateAgentGatewayRequest.new - # - # # Call the create_agent_gateway method. - # result = client.create_agent_gateway 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_agent_gateway request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::CreateAgentGatewayRequest - - # Converts hash 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_agent_gateway.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::NetworkServices::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_agent_gateway.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_agent_gateway.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.create_agent_gateway request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the parameters of a single AgentGateway. - # - # @overload update_agent_gateway(request, options = nil) - # Pass arguments to `update_agent_gateway` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::UpdateAgentGatewayRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::UpdateAgentGatewayRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_agent_gateway(update_mask: nil, agent_gateway: nil) - # Pass arguments to `update_agent_gateway` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. Field mask is used to specify the fields to be overwritten in the - # AgentGateway resource by the update. - # The fields specified in the update_mask are relative to the resource, not - # the full request. A field will be overwritten if it is in the mask. If the - # user does not provide a mask then all fields will be overwritten. - # @param agent_gateway [::Google::Cloud::NetworkServices::V1::AgentGateway, ::Hash] - # Required. Updated AgentGateway 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_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::UpdateAgentGatewayRequest.new - # - # # Call the update_agent_gateway method. - # result = client.update_agent_gateway 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_agent_gateway request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::UpdateAgentGatewayRequest - - # Converts hash 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_agent_gateway.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::NetworkServices::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_agent_gateway.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_agent_gateway.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.update_agent_gateway request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a single AgentGateway. - # - # @overload delete_agent_gateway(request, options = nil) - # Pass arguments to `delete_agent_gateway` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::DeleteAgentGatewayRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::DeleteAgentGatewayRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_agent_gateway(name: nil, etag: nil) - # Pass arguments to `delete_agent_gateway` via keyword arguments. Note that at - # least one keyword argument is 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. A name of the AgentGateway to delete. Must be in the format - # `projects/*/locations/*/agentGateways/*`. - # @param etag [::String] - # Optional. The etag of the AgentGateway to delete. - # @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_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::DeleteAgentGatewayRequest.new - # - # # Call the delete_agent_gateway method. - # result = client.delete_agent_gateway 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_agent_gateway request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::DeleteAgentGatewayRequest - - # Converts hash 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_agent_gateway.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::NetworkServices::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_agent_gateway.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_agent_gateway.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.delete_agent_gateway 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 NetworkServices REST API. - # - # This class represents the configuration for NetworkServices 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::NetworkServices::V1::NetworkServices::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_endpoint_policies to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_endpoint_policies.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_endpoint_policies.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. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `: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 = "networkservices.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 NetworkServices 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. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_endpoint_policies` - # @return [::Gapic::Config::Method] - # - attr_reader :list_endpoint_policies - ## - # RPC-specific configuration for `get_endpoint_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :get_endpoint_policy - ## - # RPC-specific configuration for `create_endpoint_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :create_endpoint_policy - ## - # RPC-specific configuration for `update_endpoint_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :update_endpoint_policy - ## - # RPC-specific configuration for `delete_endpoint_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_endpoint_policy - ## - # RPC-specific configuration for `list_wasm_plugin_versions` - # @return [::Gapic::Config::Method] - # - attr_reader :list_wasm_plugin_versions - ## - # RPC-specific configuration for `get_wasm_plugin_version` - # @return [::Gapic::Config::Method] - # - attr_reader :get_wasm_plugin_version - ## - # RPC-specific configuration for `create_wasm_plugin_version` - # @return [::Gapic::Config::Method] - # - attr_reader :create_wasm_plugin_version - ## - # RPC-specific configuration for `delete_wasm_plugin_version` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_wasm_plugin_version - ## - # RPC-specific configuration for `list_wasm_plugins` - # @return [::Gapic::Config::Method] - # - attr_reader :list_wasm_plugins - ## - # RPC-specific configuration for `get_wasm_plugin` - # @return [::Gapic::Config::Method] - # - attr_reader :get_wasm_plugin - ## - # RPC-specific configuration for `create_wasm_plugin` - # @return [::Gapic::Config::Method] - # - attr_reader :create_wasm_plugin - ## - # RPC-specific configuration for `update_wasm_plugin` - # @return [::Gapic::Config::Method] - # - attr_reader :update_wasm_plugin - ## - # RPC-specific configuration for `delete_wasm_plugin` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_wasm_plugin - ## - # RPC-specific configuration for `list_gateways` - # @return [::Gapic::Config::Method] - # - attr_reader :list_gateways - ## - # RPC-specific configuration for `get_gateway` - # @return [::Gapic::Config::Method] - # - attr_reader :get_gateway - ## - # RPC-specific configuration for `create_gateway` - # @return [::Gapic::Config::Method] - # - attr_reader :create_gateway - ## - # RPC-specific configuration for `update_gateway` - # @return [::Gapic::Config::Method] - # - attr_reader :update_gateway - ## - # RPC-specific configuration for `delete_gateway` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_gateway - ## - # RPC-specific configuration for `list_grpc_routes` - # @return [::Gapic::Config::Method] - # - attr_reader :list_grpc_routes - ## - # RPC-specific configuration for `get_grpc_route` - # @return [::Gapic::Config::Method] - # - attr_reader :get_grpc_route - ## - # RPC-specific configuration for `create_grpc_route` - # @return [::Gapic::Config::Method] - # - attr_reader :create_grpc_route - ## - # RPC-specific configuration for `update_grpc_route` - # @return [::Gapic::Config::Method] - # - attr_reader :update_grpc_route - ## - # RPC-specific configuration for `delete_grpc_route` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_grpc_route - ## - # RPC-specific configuration for `list_http_routes` - # @return [::Gapic::Config::Method] - # - attr_reader :list_http_routes - ## - # RPC-specific configuration for `get_http_route` - # @return [::Gapic::Config::Method] - # - attr_reader :get_http_route - ## - # RPC-specific configuration for `create_http_route` - # @return [::Gapic::Config::Method] - # - attr_reader :create_http_route - ## - # RPC-specific configuration for `update_http_route` - # @return [::Gapic::Config::Method] - # - attr_reader :update_http_route - ## - # RPC-specific configuration for `delete_http_route` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_http_route - ## - # RPC-specific configuration for `list_tcp_routes` - # @return [::Gapic::Config::Method] - # - attr_reader :list_tcp_routes - ## - # RPC-specific configuration for `get_tcp_route` - # @return [::Gapic::Config::Method] - # - attr_reader :get_tcp_route - ## - # RPC-specific configuration for `create_tcp_route` - # @return [::Gapic::Config::Method] - # - attr_reader :create_tcp_route - ## - # RPC-specific configuration for `update_tcp_route` - # @return [::Gapic::Config::Method] - # - attr_reader :update_tcp_route - ## - # RPC-specific configuration for `delete_tcp_route` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_tcp_route - ## - # RPC-specific configuration for `list_tls_routes` - # @return [::Gapic::Config::Method] - # - attr_reader :list_tls_routes - ## - # RPC-specific configuration for `get_tls_route` - # @return [::Gapic::Config::Method] - # - attr_reader :get_tls_route - ## - # RPC-specific configuration for `create_tls_route` - # @return [::Gapic::Config::Method] - # - attr_reader :create_tls_route - ## - # RPC-specific configuration for `update_tls_route` - # @return [::Gapic::Config::Method] - # - attr_reader :update_tls_route - ## - # RPC-specific configuration for `delete_tls_route` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_tls_route - ## - # RPC-specific configuration for `list_service_bindings` - # @return [::Gapic::Config::Method] - # - attr_reader :list_service_bindings - ## - # RPC-specific configuration for `get_service_binding` - # @return [::Gapic::Config::Method] - # - attr_reader :get_service_binding - ## - # RPC-specific configuration for `create_service_binding` - # @return [::Gapic::Config::Method] - # - attr_reader :create_service_binding - ## - # RPC-specific configuration for `update_service_binding` - # @return [::Gapic::Config::Method] - # - attr_reader :update_service_binding - ## - # RPC-specific configuration for `delete_service_binding` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_service_binding - ## - # RPC-specific configuration for `list_meshes` - # @return [::Gapic::Config::Method] - # - attr_reader :list_meshes - ## - # RPC-specific configuration for `get_mesh` - # @return [::Gapic::Config::Method] - # - attr_reader :get_mesh - ## - # RPC-specific configuration for `create_mesh` - # @return [::Gapic::Config::Method] - # - attr_reader :create_mesh - ## - # RPC-specific configuration for `update_mesh` - # @return [::Gapic::Config::Method] - # - attr_reader :update_mesh - ## - # RPC-specific configuration for `delete_mesh` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_mesh - ## - # RPC-specific configuration for `list_service_lb_policies` - # @return [::Gapic::Config::Method] - # - attr_reader :list_service_lb_policies - ## - # RPC-specific configuration for `get_service_lb_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :get_service_lb_policy - ## - # RPC-specific configuration for `create_service_lb_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :create_service_lb_policy - ## - # RPC-specific configuration for `update_service_lb_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :update_service_lb_policy - ## - # RPC-specific configuration for `delete_service_lb_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_service_lb_policy - ## - # RPC-specific configuration for `get_gateway_route_view` - # @return [::Gapic::Config::Method] - # - attr_reader :get_gateway_route_view - ## - # RPC-specific configuration for `get_mesh_route_view` - # @return [::Gapic::Config::Method] - # - attr_reader :get_mesh_route_view - ## - # RPC-specific configuration for `list_gateway_route_views` - # @return [::Gapic::Config::Method] - # - attr_reader :list_gateway_route_views - ## - # RPC-specific configuration for `list_mesh_route_views` - # @return [::Gapic::Config::Method] - # - attr_reader :list_mesh_route_views - ## - # RPC-specific configuration for `list_agent_gateways` - # @return [::Gapic::Config::Method] - # - attr_reader :list_agent_gateways - ## - # RPC-specific configuration for `get_agent_gateway` - # @return [::Gapic::Config::Method] - # - attr_reader :get_agent_gateway - ## - # RPC-specific configuration for `create_agent_gateway` - # @return [::Gapic::Config::Method] - # - attr_reader :create_agent_gateway - ## - # RPC-specific configuration for `update_agent_gateway` - # @return [::Gapic::Config::Method] - # - attr_reader :update_agent_gateway - ## - # RPC-specific configuration for `delete_agent_gateway` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_agent_gateway - - # @private - def initialize parent_rpcs = nil - list_endpoint_policies_config = parent_rpcs.list_endpoint_policies if parent_rpcs.respond_to? :list_endpoint_policies - @list_endpoint_policies = ::Gapic::Config::Method.new list_endpoint_policies_config - get_endpoint_policy_config = parent_rpcs.get_endpoint_policy if parent_rpcs.respond_to? :get_endpoint_policy - @get_endpoint_policy = ::Gapic::Config::Method.new get_endpoint_policy_config - create_endpoint_policy_config = parent_rpcs.create_endpoint_policy if parent_rpcs.respond_to? :create_endpoint_policy - @create_endpoint_policy = ::Gapic::Config::Method.new create_endpoint_policy_config - update_endpoint_policy_config = parent_rpcs.update_endpoint_policy if parent_rpcs.respond_to? :update_endpoint_policy - @update_endpoint_policy = ::Gapic::Config::Method.new update_endpoint_policy_config - delete_endpoint_policy_config = parent_rpcs.delete_endpoint_policy if parent_rpcs.respond_to? :delete_endpoint_policy - @delete_endpoint_policy = ::Gapic::Config::Method.new delete_endpoint_policy_config - list_wasm_plugin_versions_config = parent_rpcs.list_wasm_plugin_versions if parent_rpcs.respond_to? :list_wasm_plugin_versions - @list_wasm_plugin_versions = ::Gapic::Config::Method.new list_wasm_plugin_versions_config - get_wasm_plugin_version_config = parent_rpcs.get_wasm_plugin_version if parent_rpcs.respond_to? :get_wasm_plugin_version - @get_wasm_plugin_version = ::Gapic::Config::Method.new get_wasm_plugin_version_config - create_wasm_plugin_version_config = parent_rpcs.create_wasm_plugin_version if parent_rpcs.respond_to? :create_wasm_plugin_version - @create_wasm_plugin_version = ::Gapic::Config::Method.new create_wasm_plugin_version_config - delete_wasm_plugin_version_config = parent_rpcs.delete_wasm_plugin_version if parent_rpcs.respond_to? :delete_wasm_plugin_version - @delete_wasm_plugin_version = ::Gapic::Config::Method.new delete_wasm_plugin_version_config - list_wasm_plugins_config = parent_rpcs.list_wasm_plugins if parent_rpcs.respond_to? :list_wasm_plugins - @list_wasm_plugins = ::Gapic::Config::Method.new list_wasm_plugins_config - get_wasm_plugin_config = parent_rpcs.get_wasm_plugin if parent_rpcs.respond_to? :get_wasm_plugin - @get_wasm_plugin = ::Gapic::Config::Method.new get_wasm_plugin_config - create_wasm_plugin_config = parent_rpcs.create_wasm_plugin if parent_rpcs.respond_to? :create_wasm_plugin - @create_wasm_plugin = ::Gapic::Config::Method.new create_wasm_plugin_config - update_wasm_plugin_config = parent_rpcs.update_wasm_plugin if parent_rpcs.respond_to? :update_wasm_plugin - @update_wasm_plugin = ::Gapic::Config::Method.new update_wasm_plugin_config - delete_wasm_plugin_config = parent_rpcs.delete_wasm_plugin if parent_rpcs.respond_to? :delete_wasm_plugin - @delete_wasm_plugin = ::Gapic::Config::Method.new delete_wasm_plugin_config - list_gateways_config = parent_rpcs.list_gateways if parent_rpcs.respond_to? :list_gateways - @list_gateways = ::Gapic::Config::Method.new list_gateways_config - get_gateway_config = parent_rpcs.get_gateway if parent_rpcs.respond_to? :get_gateway - @get_gateway = ::Gapic::Config::Method.new get_gateway_config - create_gateway_config = parent_rpcs.create_gateway if parent_rpcs.respond_to? :create_gateway - @create_gateway = ::Gapic::Config::Method.new create_gateway_config - update_gateway_config = parent_rpcs.update_gateway if parent_rpcs.respond_to? :update_gateway - @update_gateway = ::Gapic::Config::Method.new update_gateway_config - delete_gateway_config = parent_rpcs.delete_gateway if parent_rpcs.respond_to? :delete_gateway - @delete_gateway = ::Gapic::Config::Method.new delete_gateway_config - list_grpc_routes_config = parent_rpcs.list_grpc_routes if parent_rpcs.respond_to? :list_grpc_routes - @list_grpc_routes = ::Gapic::Config::Method.new list_grpc_routes_config - get_grpc_route_config = parent_rpcs.get_grpc_route if parent_rpcs.respond_to? :get_grpc_route - @get_grpc_route = ::Gapic::Config::Method.new get_grpc_route_config - create_grpc_route_config = parent_rpcs.create_grpc_route if parent_rpcs.respond_to? :create_grpc_route - @create_grpc_route = ::Gapic::Config::Method.new create_grpc_route_config - update_grpc_route_config = parent_rpcs.update_grpc_route if parent_rpcs.respond_to? :update_grpc_route - @update_grpc_route = ::Gapic::Config::Method.new update_grpc_route_config - delete_grpc_route_config = parent_rpcs.delete_grpc_route if parent_rpcs.respond_to? :delete_grpc_route - @delete_grpc_route = ::Gapic::Config::Method.new delete_grpc_route_config - list_http_routes_config = parent_rpcs.list_http_routes if parent_rpcs.respond_to? :list_http_routes - @list_http_routes = ::Gapic::Config::Method.new list_http_routes_config - get_http_route_config = parent_rpcs.get_http_route if parent_rpcs.respond_to? :get_http_route - @get_http_route = ::Gapic::Config::Method.new get_http_route_config - create_http_route_config = parent_rpcs.create_http_route if parent_rpcs.respond_to? :create_http_route - @create_http_route = ::Gapic::Config::Method.new create_http_route_config - update_http_route_config = parent_rpcs.update_http_route if parent_rpcs.respond_to? :update_http_route - @update_http_route = ::Gapic::Config::Method.new update_http_route_config - delete_http_route_config = parent_rpcs.delete_http_route if parent_rpcs.respond_to? :delete_http_route - @delete_http_route = ::Gapic::Config::Method.new delete_http_route_config - list_tcp_routes_config = parent_rpcs.list_tcp_routes if parent_rpcs.respond_to? :list_tcp_routes - @list_tcp_routes = ::Gapic::Config::Method.new list_tcp_routes_config - get_tcp_route_config = parent_rpcs.get_tcp_route if parent_rpcs.respond_to? :get_tcp_route - @get_tcp_route = ::Gapic::Config::Method.new get_tcp_route_config - create_tcp_route_config = parent_rpcs.create_tcp_route if parent_rpcs.respond_to? :create_tcp_route - @create_tcp_route = ::Gapic::Config::Method.new create_tcp_route_config - update_tcp_route_config = parent_rpcs.update_tcp_route if parent_rpcs.respond_to? :update_tcp_route - @update_tcp_route = ::Gapic::Config::Method.new update_tcp_route_config - delete_tcp_route_config = parent_rpcs.delete_tcp_route if parent_rpcs.respond_to? :delete_tcp_route - @delete_tcp_route = ::Gapic::Config::Method.new delete_tcp_route_config - list_tls_routes_config = parent_rpcs.list_tls_routes if parent_rpcs.respond_to? :list_tls_routes - @list_tls_routes = ::Gapic::Config::Method.new list_tls_routes_config - get_tls_route_config = parent_rpcs.get_tls_route if parent_rpcs.respond_to? :get_tls_route - @get_tls_route = ::Gapic::Config::Method.new get_tls_route_config - create_tls_route_config = parent_rpcs.create_tls_route if parent_rpcs.respond_to? :create_tls_route - @create_tls_route = ::Gapic::Config::Method.new create_tls_route_config - update_tls_route_config = parent_rpcs.update_tls_route if parent_rpcs.respond_to? :update_tls_route - @update_tls_route = ::Gapic::Config::Method.new update_tls_route_config - delete_tls_route_config = parent_rpcs.delete_tls_route if parent_rpcs.respond_to? :delete_tls_route - @delete_tls_route = ::Gapic::Config::Method.new delete_tls_route_config - list_service_bindings_config = parent_rpcs.list_service_bindings if parent_rpcs.respond_to? :list_service_bindings - @list_service_bindings = ::Gapic::Config::Method.new list_service_bindings_config - get_service_binding_config = parent_rpcs.get_service_binding if parent_rpcs.respond_to? :get_service_binding - @get_service_binding = ::Gapic::Config::Method.new get_service_binding_config - create_service_binding_config = parent_rpcs.create_service_binding if parent_rpcs.respond_to? :create_service_binding - @create_service_binding = ::Gapic::Config::Method.new create_service_binding_config - update_service_binding_config = parent_rpcs.update_service_binding if parent_rpcs.respond_to? :update_service_binding - @update_service_binding = ::Gapic::Config::Method.new update_service_binding_config - delete_service_binding_config = parent_rpcs.delete_service_binding if parent_rpcs.respond_to? :delete_service_binding - @delete_service_binding = ::Gapic::Config::Method.new delete_service_binding_config - list_meshes_config = parent_rpcs.list_meshes if parent_rpcs.respond_to? :list_meshes - @list_meshes = ::Gapic::Config::Method.new list_meshes_config - get_mesh_config = parent_rpcs.get_mesh if parent_rpcs.respond_to? :get_mesh - @get_mesh = ::Gapic::Config::Method.new get_mesh_config - create_mesh_config = parent_rpcs.create_mesh if parent_rpcs.respond_to? :create_mesh - @create_mesh = ::Gapic::Config::Method.new create_mesh_config - update_mesh_config = parent_rpcs.update_mesh if parent_rpcs.respond_to? :update_mesh - @update_mesh = ::Gapic::Config::Method.new update_mesh_config - delete_mesh_config = parent_rpcs.delete_mesh if parent_rpcs.respond_to? :delete_mesh - @delete_mesh = ::Gapic::Config::Method.new delete_mesh_config - list_service_lb_policies_config = parent_rpcs.list_service_lb_policies if parent_rpcs.respond_to? :list_service_lb_policies - @list_service_lb_policies = ::Gapic::Config::Method.new list_service_lb_policies_config - get_service_lb_policy_config = parent_rpcs.get_service_lb_policy if parent_rpcs.respond_to? :get_service_lb_policy - @get_service_lb_policy = ::Gapic::Config::Method.new get_service_lb_policy_config - create_service_lb_policy_config = parent_rpcs.create_service_lb_policy if parent_rpcs.respond_to? :create_service_lb_policy - @create_service_lb_policy = ::Gapic::Config::Method.new create_service_lb_policy_config - update_service_lb_policy_config = parent_rpcs.update_service_lb_policy if parent_rpcs.respond_to? :update_service_lb_policy - @update_service_lb_policy = ::Gapic::Config::Method.new update_service_lb_policy_config - delete_service_lb_policy_config = parent_rpcs.delete_service_lb_policy if parent_rpcs.respond_to? :delete_service_lb_policy - @delete_service_lb_policy = ::Gapic::Config::Method.new delete_service_lb_policy_config - get_gateway_route_view_config = parent_rpcs.get_gateway_route_view if parent_rpcs.respond_to? :get_gateway_route_view - @get_gateway_route_view = ::Gapic::Config::Method.new get_gateway_route_view_config - get_mesh_route_view_config = parent_rpcs.get_mesh_route_view if parent_rpcs.respond_to? :get_mesh_route_view - @get_mesh_route_view = ::Gapic::Config::Method.new get_mesh_route_view_config - list_gateway_route_views_config = parent_rpcs.list_gateway_route_views if parent_rpcs.respond_to? :list_gateway_route_views - @list_gateway_route_views = ::Gapic::Config::Method.new list_gateway_route_views_config - list_mesh_route_views_config = parent_rpcs.list_mesh_route_views if parent_rpcs.respond_to? :list_mesh_route_views - @list_mesh_route_views = ::Gapic::Config::Method.new list_mesh_route_views_config - list_agent_gateways_config = parent_rpcs.list_agent_gateways if parent_rpcs.respond_to? :list_agent_gateways - @list_agent_gateways = ::Gapic::Config::Method.new list_agent_gateways_config - get_agent_gateway_config = parent_rpcs.get_agent_gateway if parent_rpcs.respond_to? :get_agent_gateway - @get_agent_gateway = ::Gapic::Config::Method.new get_agent_gateway_config - create_agent_gateway_config = parent_rpcs.create_agent_gateway if parent_rpcs.respond_to? :create_agent_gateway - @create_agent_gateway = ::Gapic::Config::Method.new create_agent_gateway_config - update_agent_gateway_config = parent_rpcs.update_agent_gateway if parent_rpcs.respond_to? :update_agent_gateway - @update_agent_gateway = ::Gapic::Config::Method.new update_agent_gateway_config - delete_agent_gateway_config = parent_rpcs.delete_agent_gateway if parent_rpcs.respond_to? :delete_agent_gateway - @delete_agent_gateway = ::Gapic::Config::Method.new delete_agent_gateway_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_services-v1/lib/google/cloud/network_services/v1/network_services/rest/operations.rb b/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/network_services/rest/operations.rb deleted file mode 100644 index d15dfc0a95b5..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/network_services/rest/operations.rb +++ /dev/null @@ -1,927 +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 NetworkServices - module V1 - module NetworkServices - module Rest - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "networkservices.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the NetworkServices 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 NetworkServices 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::NetworkServices::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::NetworkServices::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::NetworkServices::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::NetworkServices::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. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `: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 = "networkservices.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. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_operations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_operations - ## - # RPC-specific configuration for `get_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_operation - ## - # RPC-specific configuration for `delete_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_operation - ## - # RPC-specific configuration for `cancel_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_operation - - # @private - def initialize parent_rpcs = nil - list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations - @list_operations = ::Gapic::Config::Method.new list_operations_config - get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation - @get_operation = ::Gapic::Config::Method.new get_operation_config - delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation - @delete_operation = ::Gapic::Config::Method.new delete_operation_config - cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation - @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config - - yield self if block_given? - end - end - end - end - - ## - # @private - # REST service stub for the Longrunning Operations API. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - class OperationsServiceStub - def initialize endpoint:, endpoint_template:, universe_domain:, credentials: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials - end - - ## - # Baseline implementation for the list_operations REST call - # - # @param request_pb [::Google::Longrunning::ListOperationsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::ListOperationsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::ListOperationsResponse] - # A result object deserialized from the server's reply - def list_operations request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_list_operations_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_operations", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::ListOperationsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_operation REST call - # - # @param request_pb [::Google::Longrunning::GetOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def get_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_get_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_operation REST call - # - # @param request_pb [::Google::Longrunning::DeleteOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def delete_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_delete_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the cancel_operation REST call - # - # @param request_pb [::Google::Longrunning::CancelOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def cancel_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_cancel_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "cancel_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the list_operations REST call - # - # @param request_pb [::Google::Longrunning::ListOperationsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_operations_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}/operations", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_operation REST call - # - # @param request_pb [::Google::Longrunning::GetOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_operation REST call - # - # @param request_pb [::Google::Longrunning::DeleteOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the cancel_operation REST call - # - # @param request_pb [::Google::Longrunning::CancelOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_cancel_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:cancel", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/network_services/rest/service_stub.rb b/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/network_services/rest/service_stub.rb deleted file mode 100644 index 573b572e8d03..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/network_services/rest/service_stub.rb +++ /dev/null @@ -1,3947 +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/networkservices/v1/network_services_pb" - -module Google - module Cloud - module NetworkServices - module V1 - module NetworkServices - module Rest - ## - # REST service stub for the NetworkServices 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_endpoint_policies REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::ListEndpointPoliciesRequest] - # 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::NetworkServices::V1::ListEndpointPoliciesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::NetworkServices::V1::ListEndpointPoliciesResponse] - # A result object deserialized from the server's reply - def list_endpoint_policies request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_endpoint_policies_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_endpoint_policies", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::NetworkServices::V1::ListEndpointPoliciesResponse.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_endpoint_policy REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::GetEndpointPolicyRequest] - # 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::NetworkServices::V1::EndpointPolicy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::NetworkServices::V1::EndpointPolicy] - # A result object deserialized from the server's reply - def get_endpoint_policy request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_endpoint_policy_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_endpoint_policy", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::NetworkServices::V1::EndpointPolicy.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_endpoint_policy REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::CreateEndpointPolicyRequest] - # 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_endpoint_policy request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_endpoint_policy_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_endpoint_policy", - 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_endpoint_policy REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::UpdateEndpointPolicyRequest] - # 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_endpoint_policy request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_endpoint_policy_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_endpoint_policy", - 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_endpoint_policy REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::DeleteEndpointPolicyRequest] - # 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_endpoint_policy request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_endpoint_policy_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_endpoint_policy", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_wasm_plugin_versions REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::ListWasmPluginVersionsRequest] - # 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::NetworkServices::V1::ListWasmPluginVersionsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::NetworkServices::V1::ListWasmPluginVersionsResponse] - # A result object deserialized from the server's reply - def list_wasm_plugin_versions request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_wasm_plugin_versions_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_wasm_plugin_versions", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::NetworkServices::V1::ListWasmPluginVersionsResponse.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_wasm_plugin_version REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::GetWasmPluginVersionRequest] - # 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::NetworkServices::V1::WasmPluginVersion] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::NetworkServices::V1::WasmPluginVersion] - # A result object deserialized from the server's reply - def get_wasm_plugin_version request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_wasm_plugin_version_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_wasm_plugin_version", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::NetworkServices::V1::WasmPluginVersion.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_wasm_plugin_version REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::CreateWasmPluginVersionRequest] - # 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_wasm_plugin_version request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_wasm_plugin_version_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_wasm_plugin_version", - 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_wasm_plugin_version REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::DeleteWasmPluginVersionRequest] - # 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_wasm_plugin_version request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_wasm_plugin_version_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_wasm_plugin_version", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_wasm_plugins REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::ListWasmPluginsRequest] - # 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::NetworkServices::V1::ListWasmPluginsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::NetworkServices::V1::ListWasmPluginsResponse] - # A result object deserialized from the server's reply - def list_wasm_plugins request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_wasm_plugins_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_wasm_plugins", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::NetworkServices::V1::ListWasmPluginsResponse.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_wasm_plugin REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::GetWasmPluginRequest] - # 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::NetworkServices::V1::WasmPlugin] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::NetworkServices::V1::WasmPlugin] - # A result object deserialized from the server's reply - def get_wasm_plugin request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_wasm_plugin_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_wasm_plugin", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::NetworkServices::V1::WasmPlugin.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_wasm_plugin REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::CreateWasmPluginRequest] - # 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_wasm_plugin request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_wasm_plugin_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_wasm_plugin", - 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_wasm_plugin REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::UpdateWasmPluginRequest] - # 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_wasm_plugin request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_wasm_plugin_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_wasm_plugin", - 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_wasm_plugin REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::DeleteWasmPluginRequest] - # 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_wasm_plugin request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_wasm_plugin_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_wasm_plugin", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_gateways REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::ListGatewaysRequest] - # 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::NetworkServices::V1::ListGatewaysResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::NetworkServices::V1::ListGatewaysResponse] - # A result object deserialized from the server's reply - def list_gateways request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_gateways_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_gateways", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::NetworkServices::V1::ListGatewaysResponse.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_gateway REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::GetGatewayRequest] - # 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::NetworkServices::V1::Gateway] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::NetworkServices::V1::Gateway] - # A result object deserialized from the server's reply - def get_gateway request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_gateway_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_gateway", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::NetworkServices::V1::Gateway.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_gateway REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::CreateGatewayRequest] - # 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_gateway request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_gateway_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_gateway", - 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_gateway REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::UpdateGatewayRequest] - # 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_gateway request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_gateway_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_gateway", - 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_gateway REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::DeleteGatewayRequest] - # 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_gateway request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_gateway_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_gateway", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_grpc_routes REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::ListGrpcRoutesRequest] - # 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::NetworkServices::V1::ListGrpcRoutesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::NetworkServices::V1::ListGrpcRoutesResponse] - # A result object deserialized from the server's reply - def list_grpc_routes request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_grpc_routes_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_grpc_routes", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::NetworkServices::V1::ListGrpcRoutesResponse.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_grpc_route REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::GetGrpcRouteRequest] - # 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::NetworkServices::V1::GrpcRoute] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::NetworkServices::V1::GrpcRoute] - # A result object deserialized from the server's reply - def get_grpc_route request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_grpc_route_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_grpc_route", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::NetworkServices::V1::GrpcRoute.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_grpc_route REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::CreateGrpcRouteRequest] - # 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_grpc_route request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_grpc_route_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_grpc_route", - 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_grpc_route REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::UpdateGrpcRouteRequest] - # 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_grpc_route request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_grpc_route_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_grpc_route", - 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_grpc_route REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::DeleteGrpcRouteRequest] - # 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_grpc_route request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_grpc_route_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_grpc_route", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_http_routes REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::ListHttpRoutesRequest] - # 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::NetworkServices::V1::ListHttpRoutesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::NetworkServices::V1::ListHttpRoutesResponse] - # A result object deserialized from the server's reply - def list_http_routes request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_http_routes_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_http_routes", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::NetworkServices::V1::ListHttpRoutesResponse.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_http_route REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::GetHttpRouteRequest] - # 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::NetworkServices::V1::HttpRoute] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::NetworkServices::V1::HttpRoute] - # A result object deserialized from the server's reply - def get_http_route request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_http_route_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_http_route", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::NetworkServices::V1::HttpRoute.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_http_route REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::CreateHttpRouteRequest] - # 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_http_route request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_http_route_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_http_route", - 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_http_route REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::UpdateHttpRouteRequest] - # 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_http_route request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_http_route_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_http_route", - 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_http_route REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::DeleteHttpRouteRequest] - # 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_http_route request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_http_route_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_http_route", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_tcp_routes REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::ListTcpRoutesRequest] - # 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::NetworkServices::V1::ListTcpRoutesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::NetworkServices::V1::ListTcpRoutesResponse] - # A result object deserialized from the server's reply - def list_tcp_routes request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_tcp_routes_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_tcp_routes", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::NetworkServices::V1::ListTcpRoutesResponse.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_tcp_route REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::GetTcpRouteRequest] - # 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::NetworkServices::V1::TcpRoute] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::NetworkServices::V1::TcpRoute] - # A result object deserialized from the server's reply - def get_tcp_route request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_tcp_route_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_tcp_route", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::NetworkServices::V1::TcpRoute.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_tcp_route REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::CreateTcpRouteRequest] - # 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_tcp_route request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_tcp_route_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_tcp_route", - 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_tcp_route REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::UpdateTcpRouteRequest] - # 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_tcp_route request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_tcp_route_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_tcp_route", - 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_tcp_route REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::DeleteTcpRouteRequest] - # 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_tcp_route request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_tcp_route_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_tcp_route", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_tls_routes REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::ListTlsRoutesRequest] - # 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::NetworkServices::V1::ListTlsRoutesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::NetworkServices::V1::ListTlsRoutesResponse] - # A result object deserialized from the server's reply - def list_tls_routes request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_tls_routes_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_tls_routes", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::NetworkServices::V1::ListTlsRoutesResponse.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_tls_route REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::GetTlsRouteRequest] - # 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::NetworkServices::V1::TlsRoute] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::NetworkServices::V1::TlsRoute] - # A result object deserialized from the server's reply - def get_tls_route request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_tls_route_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_tls_route", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::NetworkServices::V1::TlsRoute.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_tls_route REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::CreateTlsRouteRequest] - # 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_tls_route request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_tls_route_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_tls_route", - 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_tls_route REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::UpdateTlsRouteRequest] - # 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_tls_route request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_tls_route_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_tls_route", - 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_tls_route REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::DeleteTlsRouteRequest] - # 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_tls_route request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_tls_route_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_tls_route", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_service_bindings REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::ListServiceBindingsRequest] - # 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::NetworkServices::V1::ListServiceBindingsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::NetworkServices::V1::ListServiceBindingsResponse] - # A result object deserialized from the server's reply - def list_service_bindings request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_service_bindings_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_service_bindings", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::NetworkServices::V1::ListServiceBindingsResponse.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_service_binding REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::GetServiceBindingRequest] - # 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::NetworkServices::V1::ServiceBinding] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::NetworkServices::V1::ServiceBinding] - # A result object deserialized from the server's reply - def get_service_binding request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_service_binding_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_service_binding", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::NetworkServices::V1::ServiceBinding.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_service_binding REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::CreateServiceBindingRequest] - # 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_service_binding request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_service_binding_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_service_binding", - 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_service_binding REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::UpdateServiceBindingRequest] - # 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_service_binding request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_service_binding_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_service_binding", - 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_service_binding REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::DeleteServiceBindingRequest] - # 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_service_binding request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_service_binding_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_service_binding", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_meshes REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::ListMeshesRequest] - # 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::NetworkServices::V1::ListMeshesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::NetworkServices::V1::ListMeshesResponse] - # A result object deserialized from the server's reply - def list_meshes request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_meshes_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_meshes", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::NetworkServices::V1::ListMeshesResponse.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_mesh REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::GetMeshRequest] - # 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::NetworkServices::V1::Mesh] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::NetworkServices::V1::Mesh] - # A result object deserialized from the server's reply - def get_mesh request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_mesh_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_mesh", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::NetworkServices::V1::Mesh.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_mesh REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::CreateMeshRequest] - # 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_mesh request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_mesh_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_mesh", - 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_mesh REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::UpdateMeshRequest] - # 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_mesh request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_mesh_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_mesh", - 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_mesh REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::DeleteMeshRequest] - # 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_mesh request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_mesh_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_mesh", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_service_lb_policies REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::ListServiceLbPoliciesRequest] - # 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::NetworkServices::V1::ListServiceLbPoliciesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::NetworkServices::V1::ListServiceLbPoliciesResponse] - # A result object deserialized from the server's reply - def list_service_lb_policies request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_service_lb_policies_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_service_lb_policies", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::NetworkServices::V1::ListServiceLbPoliciesResponse.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_service_lb_policy REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::GetServiceLbPolicyRequest] - # 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::NetworkServices::V1::ServiceLbPolicy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::NetworkServices::V1::ServiceLbPolicy] - # A result object deserialized from the server's reply - def get_service_lb_policy request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_service_lb_policy_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_service_lb_policy", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::NetworkServices::V1::ServiceLbPolicy.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_service_lb_policy REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::CreateServiceLbPolicyRequest] - # 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_service_lb_policy request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_service_lb_policy_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_service_lb_policy", - 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_service_lb_policy REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::UpdateServiceLbPolicyRequest] - # 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_service_lb_policy request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_service_lb_policy_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_service_lb_policy", - 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_service_lb_policy REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::DeleteServiceLbPolicyRequest] - # 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_service_lb_policy request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_service_lb_policy_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_service_lb_policy", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_gateway_route_view REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::GetGatewayRouteViewRequest] - # 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::NetworkServices::V1::GatewayRouteView] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::NetworkServices::V1::GatewayRouteView] - # A result object deserialized from the server's reply - def get_gateway_route_view request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_gateway_route_view_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_gateway_route_view", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::NetworkServices::V1::GatewayRouteView.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_mesh_route_view REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::GetMeshRouteViewRequest] - # 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::NetworkServices::V1::MeshRouteView] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::NetworkServices::V1::MeshRouteView] - # A result object deserialized from the server's reply - def get_mesh_route_view request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_mesh_route_view_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_mesh_route_view", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::NetworkServices::V1::MeshRouteView.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_gateway_route_views REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::ListGatewayRouteViewsRequest] - # 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::NetworkServices::V1::ListGatewayRouteViewsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::NetworkServices::V1::ListGatewayRouteViewsResponse] - # A result object deserialized from the server's reply - def list_gateway_route_views request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_gateway_route_views_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_gateway_route_views", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::NetworkServices::V1::ListGatewayRouteViewsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_mesh_route_views REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::ListMeshRouteViewsRequest] - # 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::NetworkServices::V1::ListMeshRouteViewsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::NetworkServices::V1::ListMeshRouteViewsResponse] - # A result object deserialized from the server's reply - def list_mesh_route_views request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_mesh_route_views_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_mesh_route_views", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::NetworkServices::V1::ListMeshRouteViewsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_agent_gateways REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::ListAgentGatewaysRequest] - # 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::NetworkServices::V1::ListAgentGatewaysResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::NetworkServices::V1::ListAgentGatewaysResponse] - # A result object deserialized from the server's reply - def list_agent_gateways request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_agent_gateways_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_agent_gateways", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::NetworkServices::V1::ListAgentGatewaysResponse.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_agent_gateway REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::GetAgentGatewayRequest] - # 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::NetworkServices::V1::AgentGateway] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::NetworkServices::V1::AgentGateway] - # A result object deserialized from the server's reply - def get_agent_gateway request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_agent_gateway_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_agent_gateway", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::NetworkServices::V1::AgentGateway.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_agent_gateway REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::CreateAgentGatewayRequest] - # 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_agent_gateway request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_agent_gateway_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_agent_gateway", - 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_agent_gateway REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::UpdateAgentGatewayRequest] - # 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_agent_gateway request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_agent_gateway_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_agent_gateway", - 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_agent_gateway REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::DeleteAgentGatewayRequest] - # 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_agent_gateway request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_agent_gateway_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_agent_gateway", - 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_endpoint_policies REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::ListEndpointPoliciesRequest] - # 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_endpoint_policies_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/endpointPolicies", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_endpoint_policy REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::GetEndpointPolicyRequest] - # 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_endpoint_policy_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/endpointPolicies/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_endpoint_policy REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::CreateEndpointPolicyRequest] - # 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_endpoint_policy_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/endpointPolicies", - body: "endpoint_policy", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_endpoint_policy REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::UpdateEndpointPolicyRequest] - # 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_endpoint_policy_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{endpoint_policy.name}", - body: "endpoint_policy", - matches: [ - ["endpoint_policy.name", %r{^projects/[^/]+/locations/[^/]+/endpointPolicies/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_endpoint_policy REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::DeleteEndpointPolicyRequest] - # 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_endpoint_policy_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/endpointPolicies/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_wasm_plugin_versions REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::ListWasmPluginVersionsRequest] - # 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_wasm_plugin_versions_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/versions", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/wasmPlugins/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_wasm_plugin_version REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::GetWasmPluginVersionRequest] - # 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_wasm_plugin_version_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/wasmPlugins/[^/]+/versions/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_wasm_plugin_version REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::CreateWasmPluginVersionRequest] - # 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_wasm_plugin_version_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/versions", - body: "wasm_plugin_version", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/wasmPlugins/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_wasm_plugin_version REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::DeleteWasmPluginVersionRequest] - # 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_wasm_plugin_version_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/wasmPlugins/[^/]+/versions/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_wasm_plugins REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::ListWasmPluginsRequest] - # 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_wasm_plugins_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/wasmPlugins", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_wasm_plugin REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::GetWasmPluginRequest] - # 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_wasm_plugin_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/wasmPlugins/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_wasm_plugin REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::CreateWasmPluginRequest] - # 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_wasm_plugin_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/wasmPlugins", - body: "wasm_plugin", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_wasm_plugin REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::UpdateWasmPluginRequest] - # 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_wasm_plugin_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{wasm_plugin.name}", - body: "wasm_plugin", - matches: [ - ["wasm_plugin.name", %r{^projects/[^/]+/locations/[^/]+/wasmPlugins/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_wasm_plugin REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::DeleteWasmPluginRequest] - # 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_wasm_plugin_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/wasmPlugins/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_gateways REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::ListGatewaysRequest] - # 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_gateways_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/gateways", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_gateway REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::GetGatewayRequest] - # 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_gateway_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/gateways/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_gateway REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::CreateGatewayRequest] - # 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_gateway_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/gateways", - body: "gateway", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_gateway REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::UpdateGatewayRequest] - # 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_gateway_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{gateway.name}", - body: "gateway", - matches: [ - ["gateway.name", %r{^projects/[^/]+/locations/[^/]+/gateways/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_gateway REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::DeleteGatewayRequest] - # 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_gateway_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/gateways/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_grpc_routes REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::ListGrpcRoutesRequest] - # 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_grpc_routes_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/grpcRoutes", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_grpc_route REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::GetGrpcRouteRequest] - # 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_grpc_route_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/grpcRoutes/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_grpc_route REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::CreateGrpcRouteRequest] - # 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_grpc_route_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/grpcRoutes", - body: "grpc_route", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_grpc_route REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::UpdateGrpcRouteRequest] - # 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_grpc_route_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{grpc_route.name}", - body: "grpc_route", - matches: [ - ["grpc_route.name", %r{^projects/[^/]+/locations/[^/]+/grpcRoutes/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_grpc_route REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::DeleteGrpcRouteRequest] - # 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_grpc_route_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/grpcRoutes/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_http_routes REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::ListHttpRoutesRequest] - # 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_http_routes_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/httpRoutes", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_http_route REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::GetHttpRouteRequest] - # 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_http_route_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/httpRoutes/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_http_route REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::CreateHttpRouteRequest] - # 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_http_route_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/httpRoutes", - body: "http_route", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_http_route REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::UpdateHttpRouteRequest] - # 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_http_route_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{http_route.name}", - body: "http_route", - matches: [ - ["http_route.name", %r{^projects/[^/]+/locations/[^/]+/httpRoutes/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_http_route REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::DeleteHttpRouteRequest] - # 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_http_route_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/httpRoutes/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_tcp_routes REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::ListTcpRoutesRequest] - # 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_tcp_routes_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/tcpRoutes", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_tcp_route REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::GetTcpRouteRequest] - # 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_tcp_route_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/tcpRoutes/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_tcp_route REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::CreateTcpRouteRequest] - # 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_tcp_route_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/tcpRoutes", - body: "tcp_route", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_tcp_route REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::UpdateTcpRouteRequest] - # 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_tcp_route_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{tcp_route.name}", - body: "tcp_route", - matches: [ - ["tcp_route.name", %r{^projects/[^/]+/locations/[^/]+/tcpRoutes/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_tcp_route REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::DeleteTcpRouteRequest] - # 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_tcp_route_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/tcpRoutes/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_tls_routes REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::ListTlsRoutesRequest] - # 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_tls_routes_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/tlsRoutes", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_tls_route REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::GetTlsRouteRequest] - # 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_tls_route_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/tlsRoutes/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_tls_route REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::CreateTlsRouteRequest] - # 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_tls_route_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/tlsRoutes", - body: "tls_route", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_tls_route REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::UpdateTlsRouteRequest] - # 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_tls_route_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{tls_route.name}", - body: "tls_route", - matches: [ - ["tls_route.name", %r{^projects/[^/]+/locations/[^/]+/tlsRoutes/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_tls_route REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::DeleteTlsRouteRequest] - # 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_tls_route_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/tlsRoutes/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_service_bindings REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::ListServiceBindingsRequest] - # 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_service_bindings_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/serviceBindings", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_service_binding REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::GetServiceBindingRequest] - # 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_service_binding_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/serviceBindings/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_service_binding REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::CreateServiceBindingRequest] - # 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_service_binding_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/serviceBindings", - body: "service_binding", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_service_binding REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::UpdateServiceBindingRequest] - # 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_service_binding_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{service_binding.name}", - body: "service_binding", - matches: [ - ["service_binding.name", %r{^projects/[^/]+/locations/[^/]+/serviceBindings/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_service_binding REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::DeleteServiceBindingRequest] - # 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_service_binding_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/serviceBindings/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_meshes REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::ListMeshesRequest] - # 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_meshes_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/meshes", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_mesh REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::GetMeshRequest] - # 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_mesh_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/meshes/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_mesh REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::CreateMeshRequest] - # 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_mesh_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/meshes", - body: "mesh", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_mesh REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::UpdateMeshRequest] - # 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_mesh_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{mesh.name}", - body: "mesh", - matches: [ - ["mesh.name", %r{^projects/[^/]+/locations/[^/]+/meshes/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_mesh REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::DeleteMeshRequest] - # 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_mesh_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/meshes/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_service_lb_policies REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::ListServiceLbPoliciesRequest] - # 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_service_lb_policies_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/serviceLbPolicies", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_service_lb_policy REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::GetServiceLbPolicyRequest] - # 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_service_lb_policy_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/serviceLbPolicies/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_service_lb_policy REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::CreateServiceLbPolicyRequest] - # 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_service_lb_policy_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/serviceLbPolicies", - body: "service_lb_policy", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_service_lb_policy REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::UpdateServiceLbPolicyRequest] - # 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_service_lb_policy_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{service_lb_policy.name}", - body: "service_lb_policy", - matches: [ - ["service_lb_policy.name", %r{^projects/[^/]+/locations/[^/]+/serviceLbPolicies/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_service_lb_policy REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::DeleteServiceLbPolicyRequest] - # 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_service_lb_policy_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/serviceLbPolicies/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_gateway_route_view REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::GetGatewayRouteViewRequest] - # 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_gateway_route_view_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/gateways/[^/]+/routeViews/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_mesh_route_view REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::GetMeshRouteViewRequest] - # 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_mesh_route_view_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/meshes/[^/]+/routeViews/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_gateway_route_views REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::ListGatewayRouteViewsRequest] - # 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_gateway_route_views_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/routeViews", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/gateways/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_mesh_route_views REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::ListMeshRouteViewsRequest] - # 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_mesh_route_views_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/routeViews", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/meshes/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_agent_gateways REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::ListAgentGatewaysRequest] - # 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_agent_gateways_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/agentGateways", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_agent_gateway REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::GetAgentGatewayRequest] - # 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_agent_gateway_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/agentGateways/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_agent_gateway REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::CreateAgentGatewayRequest] - # 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_agent_gateway_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/agentGateways", - body: "agent_gateway", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_agent_gateway REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::UpdateAgentGatewayRequest] - # 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_agent_gateway_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{agent_gateway.name}", - body: "agent_gateway", - matches: [ - ["agent_gateway.name", %r{^projects/[^/]+/locations/[^/]+/agentGateways/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_agent_gateway REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::DeleteAgentGatewayRequest] - # 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_agent_gateway_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/agentGateways/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/rest.rb b/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/rest.rb deleted file mode 100644 index d1fd99053120..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/rest.rb +++ /dev/null @@ -1,39 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/network_services/v1/dep_service/rest" -require "google/cloud/network_services/v1/network_services/rest" -require "google/cloud/network_services/v1/bindings_override" -require "google/cloud/network_services/v1/version" - -module Google - module Cloud - module NetworkServices - ## - # To load just the REST part of this package, including all its services, and instantiate a REST client: - # - # @example - # - # require "google/cloud/network_services/v1/rest" - # client = ::Google::Cloud::NetworkServices::V1::DepService::Rest::Client.new - # - module V1 - end - end - end -end diff --git a/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/version.rb b/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/version.rb deleted file mode 100644 index dc762e5120ec..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/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 NetworkServices - module V1 - VERSION = "0.0.1" - end - end - end -end diff --git a/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/common_pb.rb b/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/common_pb.rb deleted file mode 100644 index 0265ca12a387..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/common_pb.rb +++ /dev/null @@ -1,30 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/networkservices/v1/common.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n,google/cloud/networkservices/v1/common.proto\x12\x1fgoogle.cloud.networkservices.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x80\x02\n\x11OperationMetadata\x12\x34\n\x0b\x63reate_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x31\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x13\n\x06target\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x11\n\x04verb\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\x1b\n\x0estatus_message\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12#\n\x16requested_cancellation\x18\x06 \x01(\x08\x42\x03\xe0\x41\x03\x12\x18\n\x0b\x61pi_version\x18\x07 \x01(\tB\x03\xe0\x41\x03\")\n\x13TrafficPortSelector\x12\x12\n\x05ports\x18\x01 \x03(\tB\x03\xe0\x41\x01\"\xcc\x04\n\x0f\x45ndpointMatcher\x12g\n\x16metadata_label_matcher\x18\x01 \x01(\x0b\x32\x45.google.cloud.networkservices.v1.EndpointMatcher.MetadataLabelMatcherH\x00\x1a\xbf\x03\n\x14MetadataLabelMatcher\x12\x87\x01\n\x1dmetadata_label_match_criteria\x18\x01 \x01(\x0e\x32`.google.cloud.networkservices.v1.EndpointMatcher.MetadataLabelMatcher.MetadataLabelMatchCriteria\x12m\n\x0fmetadata_labels\x18\x02 \x03(\x0b\x32T.google.cloud.networkservices.v1.EndpointMatcher.MetadataLabelMatcher.MetadataLabels\x1a\x43\n\x0eMetadataLabels\x12\x17\n\nlabel_name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0blabel_value\x18\x02 \x01(\tB\x03\xe0\x41\x02\"i\n\x1aMetadataLabelMatchCriteria\x12-\n)METADATA_LABEL_MATCH_CRITERIA_UNSPECIFIED\x10\x00\x12\r\n\tMATCH_ANY\x10\x01\x12\r\n\tMATCH_ALL\x10\x02\x42\x0e\n\x0cmatcher_type*J\n\x0c\x45nvoyHeaders\x12\x1d\n\x19\x45NVOY_HEADERS_UNSPECIFIED\x10\x00\x12\x08\n\x04NONE\x10\x01\x12\x11\n\rDEBUG_HEADERS\x10\x02\x42\xec\x01\n#com.google.cloud.networkservices.v1B\x0b\x43ommonProtoP\x01ZMcloud.google.com/go/networkservices/apiv1/networkservicespb;networkservicespb\xaa\x02\x1fGoogle.Cloud.NetworkServices.V1\xca\x02\x1fGoogle\\Cloud\\NetworkServices\\V1\xea\x02\"Google::Cloud::NetworkServices::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module NetworkServices - module V1 - OperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.OperationMetadata").msgclass - TrafficPortSelector = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.TrafficPortSelector").msgclass - EndpointMatcher = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.EndpointMatcher").msgclass - EndpointMatcher::MetadataLabelMatcher = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.EndpointMatcher.MetadataLabelMatcher").msgclass - EndpointMatcher::MetadataLabelMatcher::MetadataLabels = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.EndpointMatcher.MetadataLabelMatcher.MetadataLabels").msgclass - EndpointMatcher::MetadataLabelMatcher::MetadataLabelMatchCriteria = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.EndpointMatcher.MetadataLabelMatcher.MetadataLabelMatchCriteria").enummodule - EnvoyHeaders = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.EnvoyHeaders").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/dep_pb.rb b/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/dep_pb.rb deleted file mode 100644 index 189ed93ceeaf..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/dep_pb.rb +++ /dev/null @@ -1,68 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/networkservices/v1/dep.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/field_info_pb' -require 'google/api/resource_pb' -require 'google/cloud/networkservices/v1/common_pb' -require 'google/longrunning/operations_pb' -require 'google/protobuf/duration_pb' -require 'google/protobuf/empty_pb' -require 'google/protobuf/field_mask_pb' -require 'google/protobuf/struct_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n)google/cloud/networkservices/v1/dep.proto\x12\x1fgoogle.cloud.networkservices.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1bgoogle/api/field_info.proto\x1a\x19google/api/resource.proto\x1a,google/cloud/networkservices/v1/common.proto\x1a#google/longrunning/operations.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xa0\x06\n\x0e\x45xtensionChain\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\\\n\x0fmatch_condition\x18\x02 \x01(\x0b\x32>.google.cloud.networkservices.v1.ExtensionChain.MatchConditionB\x03\xe0\x41\x02\x12R\n\nextensions\x18\x03 \x03(\x0b\x32\x39.google.cloud.networkservices.v1.ExtensionChain.ExtensionB\x03\xe0\x41\x02\x1a-\n\x0eMatchCondition\x12\x1b\n\x0e\x63\x65l_expression\x18\x01 \x01(\tB\x03\xe0\x41\x02\x1a\x99\x04\n\tExtension\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tauthority\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x14\n\x07service\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12I\n\x10supported_events\x18\x04 \x03(\x0e\x32*.google.cloud.networkservices.v1.EventTypeB\x03\xe0\x41\x01\x12/\n\x07timeout\x18\x05 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x01\x12\x16\n\tfail_open\x18\x06 \x01(\x08\x42\x03\xe0\x41\x01\x12\x1c\n\x0f\x66orward_headers\x18\x07 \x03(\tB\x03\xe0\x41\x01\x12\x1f\n\x12\x66orward_attributes\x18\x08 \x03(\tB\x03\xe0\x41\x01\x12.\n\x08metadata\x18\t \x01(\x0b\x32\x17.google.protobuf.StructB\x03\xe0\x41\x01\x12R\n\x16request_body_send_mode\x18\x0e \x01(\x0e\x32-.google.cloud.networkservices.v1.BodySendModeB\x03\xe0\x41\x01\x12S\n\x17response_body_send_mode\x18\x0f \x01(\x0e\x32-.google.cloud.networkservices.v1.BodySendModeB\x03\xe0\x41\x01\x12\x1f\n\x12observability_mode\x18\x10 \x01(\x08\x42\x03\xe0\x41\x01\"\xe5\x05\n\x12LbTrafficExtension\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x08\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\t \x01(\tB\x03\xe0\x41\x01\x12T\n\x06labels\x18\x04 \x03(\x0b\x32?.google.cloud.networkservices.v1.LbTrafficExtension.LabelsEntryB\x03\xe0\x41\x01\x12\x1d\n\x10\x66orwarding_rules\x18\x05 \x03(\tB\x03\xe0\x41\x01\x12N\n\x10\x65xtension_chains\x18\x07 \x03(\x0b\x32/.google.cloud.networkservices.v1.ExtensionChainB\x03\xe0\x41\x02\x12X\n\x15load_balancing_scheme\x18\x08 \x01(\x0e\x32\x34.google.cloud.networkservices.v1.LoadBalancingSchemeB\x03\xe0\x41\x02\x12.\n\x08metadata\x18\n \x01(\x0b\x32\x17.google.protobuf.StructB\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\xb4\x01\xea\x41\xb0\x01\n1networkservices.googleapis.com/LbTrafficExtension\x12Rprojects/{project}/locations/{location}/lbTrafficExtensions/{lb_traffic_extension}*\x13lbTrafficExtensions2\x12lbTrafficExtension\"\xc8\x01\n\x1eListLbTrafficExtensionsRequest\x12I\n\x06parent\x18\x01 \x01(\tB9\xe0\x41\x02\xfa\x41\x33\x12\x31networkservices.googleapis.com/LbTrafficExtension\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\xa3\x01\n\x1fListLbTrafficExtensionsResponse\x12R\n\x15lb_traffic_extensions\x18\x01 \x03(\x0b\x32\x33.google.cloud.networkservices.v1.LbTrafficExtension\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"g\n\x1cGetLbTrafficExtensionRequest\x12G\n\x04name\x18\x01 \x01(\tB9\xe0\x41\x02\xfa\x41\x33\n1networkservices.googleapis.com/LbTrafficExtension\"\x8b\x02\n\x1f\x43reateLbTrafficExtensionRequest\x12I\n\x06parent\x18\x01 \x01(\tB9\xe0\x41\x02\xfa\x41\x33\x12\x31networkservices.googleapis.com/LbTrafficExtension\x12$\n\x17lb_traffic_extension_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12V\n\x14lb_traffic_extension\x18\x03 \x01(\x0b\x32\x33.google.cloud.networkservices.v1.LbTrafficExtensionB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x04 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\xd0\x01\n\x1fUpdateLbTrafficExtensionRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x12V\n\x14lb_traffic_extension\x18\x02 \x01(\x0b\x32\x33.google.cloud.networkservices.v1.LbTrafficExtensionB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x03 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\x8b\x01\n\x1f\x44\x65leteLbTrafficExtensionRequest\x12G\n\x04name\x18\x01 \x01(\tB9\xe0\x41\x02\xfa\x41\x33\n1networkservices.googleapis.com/LbTrafficExtension\x12\x1f\n\nrequest_id\x18\x02 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\xd7\x05\n\x10LbRouteExtension\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x08\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\t \x01(\tB\x03\xe0\x41\x01\x12R\n\x06labels\x18\x04 \x03(\x0b\x32=.google.cloud.networkservices.v1.LbRouteExtension.LabelsEntryB\x03\xe0\x41\x01\x12\x1d\n\x10\x66orwarding_rules\x18\x05 \x03(\tB\x03\xe0\x41\x02\x12N\n\x10\x65xtension_chains\x18\x07 \x03(\x0b\x32/.google.cloud.networkservices.v1.ExtensionChainB\x03\xe0\x41\x02\x12X\n\x15load_balancing_scheme\x18\x08 \x01(\x0e\x32\x34.google.cloud.networkservices.v1.LoadBalancingSchemeB\x03\xe0\x41\x02\x12.\n\x08metadata\x18\n \x01(\x0b\x32\x17.google.protobuf.StructB\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\xaa\x01\xea\x41\xa6\x01\n/networkservices.googleapis.com/LbRouteExtension\x12Nprojects/{project}/locations/{location}/lbRouteExtensions/{lb_route_extension}*\x11lbRouteExtensions2\x10lbRouteExtension\"\xc4\x01\n\x1cListLbRouteExtensionsRequest\x12G\n\x06parent\x18\x01 \x01(\tB7\xe0\x41\x02\xfa\x41\x31\x12/networkservices.googleapis.com/LbRouteExtension\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x9d\x01\n\x1dListLbRouteExtensionsResponse\x12N\n\x13lb_route_extensions\x18\x01 \x03(\x0b\x32\x31.google.cloud.networkservices.v1.LbRouteExtension\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"c\n\x1aGetLbRouteExtensionRequest\x12\x45\n\x04name\x18\x01 \x01(\tB7\xe0\x41\x02\xfa\x41\x31\n/networkservices.googleapis.com/LbRouteExtension\"\x81\x02\n\x1d\x43reateLbRouteExtensionRequest\x12G\n\x06parent\x18\x01 \x01(\tB7\xe0\x41\x02\xfa\x41\x31\x12/networkservices.googleapis.com/LbRouteExtension\x12\"\n\x15lb_route_extension_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12R\n\x12lb_route_extension\x18\x03 \x01(\x0b\x32\x31.google.cloud.networkservices.v1.LbRouteExtensionB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x04 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\xca\x01\n\x1dUpdateLbRouteExtensionRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x12R\n\x12lb_route_extension\x18\x02 \x01(\x0b\x32\x31.google.cloud.networkservices.v1.LbRouteExtensionB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x03 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\x87\x01\n\x1d\x44\x65leteLbRouteExtensionRequest\x12\x45\n\x04name\x18\x01 \x01(\tB7\xe0\x41\x02\xfa\x41\x31\n/networkservices.googleapis.com/LbRouteExtension\x12\x1f\n\nrequest_id\x18\x02 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\xa0\x05\n\x0fLbEdgeExtension\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x08\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\t \x01(\tB\x03\xe0\x41\x01\x12Q\n\x06labels\x18\x04 \x03(\x0b\x32<.google.cloud.networkservices.v1.LbEdgeExtension.LabelsEntryB\x03\xe0\x41\x01\x12\x1d\n\x10\x66orwarding_rules\x18\x05 \x03(\tB\x03\xe0\x41\x02\x12N\n\x10\x65xtension_chains\x18\x06 \x03(\x0b\x32/.google.cloud.networkservices.v1.ExtensionChainB\x03\xe0\x41\x02\x12X\n\x15load_balancing_scheme\x18\x07 \x01(\x0e\x32\x34.google.cloud.networkservices.v1.LoadBalancingSchemeB\x03\xe0\x41\x02\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\xa5\x01\xea\x41\xa1\x01\n.networkservices.googleapis.com/LbEdgeExtension\x12Lprojects/{project}/locations/{location}/lbEdgeExtensions/{lb_edge_extension}*\x10lbEdgeExtensions2\x0flbEdgeExtension\"\xc2\x01\n\x1bListLbEdgeExtensionsRequest\x12\x46\n\x06parent\x18\x01 \x01(\tB6\xe0\x41\x02\xfa\x41\x30\x12.networkservices.googleapis.com/LbEdgeExtension\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x9a\x01\n\x1cListLbEdgeExtensionsResponse\x12L\n\x12lb_edge_extensions\x18\x01 \x03(\x0b\x32\x30.google.cloud.networkservices.v1.LbEdgeExtension\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"a\n\x19GetLbEdgeExtensionRequest\x12\x44\n\x04name\x18\x01 \x01(\tB6\xe0\x41\x02\xfa\x41\x30\n.networkservices.googleapis.com/LbEdgeExtension\"\xfc\x01\n\x1c\x43reateLbEdgeExtensionRequest\x12\x46\n\x06parent\x18\x01 \x01(\tB6\xe0\x41\x02\xfa\x41\x30\x12.networkservices.googleapis.com/LbEdgeExtension\x12!\n\x14lb_edge_extension_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12P\n\x11lb_edge_extension\x18\x03 \x01(\x0b\x32\x30.google.cloud.networkservices.v1.LbEdgeExtensionB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x04 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\xc7\x01\n\x1cUpdateLbEdgeExtensionRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x12P\n\x11lb_edge_extension\x18\x02 \x01(\x0b\x32\x30.google.cloud.networkservices.v1.LbEdgeExtensionB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x03 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\x85\x01\n\x1c\x44\x65leteLbEdgeExtensionRequest\x12\x44\n\x04name\x18\x01 \x01(\tB6\xe0\x41\x02\xfa\x41\x30\n.networkservices.googleapis.com/LbEdgeExtension\x12\x1f\n\nrequest_id\x18\x02 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\xd6\x06\n\x0e\x41uthzExtension\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x08\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12P\n\x06labels\x18\x05 \x03(\x0b\x32;.google.cloud.networkservices.v1.AuthzExtension.LabelsEntryB\x03\xe0\x41\x01\x12X\n\x15load_balancing_scheme\x18\x06 \x01(\x0e\x32\x34.google.cloud.networkservices.v1.LoadBalancingSchemeB\x03\xe0\x41\x01\x12\x16\n\tauthority\x18\x07 \x01(\tB\x03\xe0\x41\x01\x12\x14\n\x07service\x18\x08 \x01(\tB\x03\xe0\x41\x02\x12/\n\x07timeout\x18\t \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x02\x12\x16\n\tfail_open\x18\n \x01(\x08\x42\x03\xe0\x41\x01\x12.\n\x08metadata\x18\x0b \x01(\x0b\x32\x17.google.protobuf.StructB\x03\xe0\x41\x01\x12\x1c\n\x0f\x66orward_headers\x18\x0c \x03(\tB\x03\xe0\x41\x01\x12\x1f\n\x12\x66orward_attributes\x18\r \x03(\tB\x03\xe0\x41\x01\x12\x45\n\x0bwire_format\x18\x0e \x01(\x0e\x32+.google.cloud.networkservices.v1.WireFormatB\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\x9f\x01\xea\x41\x9b\x01\n-networkservices.googleapis.com/AuthzExtension\x12Iprojects/{project}/locations/{location}/authzExtensions/{authz_extension}*\x0f\x61uthzExtensions2\x0e\x61uthzExtension\"\xc0\x01\n\x1aListAuthzExtensionsRequest\x12\x45\n\x06parent\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\x12-networkservices.googleapis.com/AuthzExtension\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x96\x01\n\x1bListAuthzExtensionsResponse\x12I\n\x10\x61uthz_extensions\x18\x01 \x03(\x0b\x32/.google.cloud.networkservices.v1.AuthzExtension\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"_\n\x18GetAuthzExtensionRequest\x12\x43\n\x04name\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-networkservices.googleapis.com/AuthzExtension\"\xf5\x01\n\x1b\x43reateAuthzExtensionRequest\x12\x45\n\x06parent\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\x12-networkservices.googleapis.com/AuthzExtension\x12\x1f\n\x12\x61uthz_extension_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12M\n\x0f\x61uthz_extension\x18\x03 \x01(\x0b\x32/.google.cloud.networkservices.v1.AuthzExtensionB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x04 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\xc3\x01\n\x1bUpdateAuthzExtensionRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12M\n\x0f\x61uthz_extension\x18\x02 \x01(\x0b\x32/.google.cloud.networkservices.v1.AuthzExtensionB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x03 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\x83\x01\n\x1b\x44\x65leteAuthzExtensionRequest\x12\x43\n\x04name\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-networkservices.googleapis.com/AuthzExtension\x12\x1f\n\nrequest_id\x18\x02 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01*\xa4\x01\n\tEventType\x12\x1a\n\x16\x45VENT_TYPE_UNSPECIFIED\x10\x00\x12\x13\n\x0fREQUEST_HEADERS\x10\x01\x12\x10\n\x0cREQUEST_BODY\x10\x02\x12\x14\n\x10RESPONSE_HEADERS\x10\x03\x12\x11\n\rRESPONSE_BODY\x10\x04\x12\x14\n\x10REQUEST_TRAILERS\x10\x05\x12\x15\n\x11RESPONSE_TRAILERS\x10\x06*h\n\x13LoadBalancingScheme\x12%\n!LOAD_BALANCING_SCHEME_UNSPECIFIED\x10\x00\x12\x14\n\x10INTERNAL_MANAGED\x10\x01\x12\x14\n\x10\x45XTERNAL_MANAGED\x10\x02*P\n\nWireFormat\x12\x1b\n\x17WIRE_FORMAT_UNSPECIFIED\x10\x00\x12\x11\n\rEXT_PROC_GRPC\x10\x01\x12\x12\n\x0e\x45XT_AUTHZ_GRPC\x10\x03*t\n\x0c\x42odySendMode\x12\x1e\n\x1a\x42ODY_SEND_MODE_UNSPECIFIED\x10\x00\x12\x1b\n\x17\x42ODY_SEND_MODE_STREAMED\x10\x01\x12\'\n#BODY_SEND_MODE_FULL_DUPLEX_STREAMED\x10\x02\x32\xf9\'\n\nDepService\x12\xe6\x01\n\x17ListLbTrafficExtensions\x12?.google.cloud.networkservices.v1.ListLbTrafficExtensionsRequest\x1a@.google.cloud.networkservices.v1.ListLbTrafficExtensionsResponse\"H\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x39\x12\x37/v1/{parent=projects/*/locations/*}/lbTrafficExtensions\x12\xd3\x01\n\x15GetLbTrafficExtension\x12=.google.cloud.networkservices.v1.GetLbTrafficExtensionRequest\x1a\x33.google.cloud.networkservices.v1.LbTrafficExtension\"F\xda\x41\x04name\x82\xd3\xe4\x93\x02\x39\x12\x37/v1/{name=projects/*/locations/*/lbTrafficExtensions/*}\x12\xb3\x02\n\x18\x43reateLbTrafficExtension\x12@.google.cloud.networkservices.v1.CreateLbTrafficExtensionRequest\x1a\x1d.google.longrunning.Operation\"\xb5\x01\xca\x41\'\n\x12LbTrafficExtension\x12\x11OperationMetadata\xda\x41\x33parent,lb_traffic_extension,lb_traffic_extension_id\x82\xd3\xe4\x93\x02O\"7/v1/{parent=projects/*/locations/*}/lbTrafficExtensions:\x14lb_traffic_extension\x12\xb5\x02\n\x18UpdateLbTrafficExtension\x12@.google.cloud.networkservices.v1.UpdateLbTrafficExtensionRequest\x1a\x1d.google.longrunning.Operation\"\xb7\x01\xca\x41\'\n\x12LbTrafficExtension\x12\x11OperationMetadata\xda\x41 lb_traffic_extension,update_mask\x82\xd3\xe4\x93\x02\x64\x32L/v1/{lb_traffic_extension.name=projects/*/locations/*/lbTrafficExtensions/*}:\x14lb_traffic_extension\x12\xf0\x01\n\x18\x44\x65leteLbTrafficExtension\x12@.google.cloud.networkservices.v1.DeleteLbTrafficExtensionRequest\x1a\x1d.google.longrunning.Operation\"s\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x39*7/v1/{name=projects/*/locations/*/lbTrafficExtensions/*}\x12\xde\x01\n\x15ListLbRouteExtensions\x12=.google.cloud.networkservices.v1.ListLbRouteExtensionsRequest\x1a>.google.cloud.networkservices.v1.ListLbRouteExtensionsResponse\"F\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x37\x12\x35/v1/{parent=projects/*/locations/*}/lbRouteExtensions\x12\xcb\x01\n\x13GetLbRouteExtension\x12;.google.cloud.networkservices.v1.GetLbRouteExtensionRequest\x1a\x31.google.cloud.networkservices.v1.LbRouteExtension\"D\xda\x41\x04name\x82\xd3\xe4\x93\x02\x37\x12\x35/v1/{name=projects/*/locations/*/lbRouteExtensions/*}\x12\xa5\x02\n\x16\x43reateLbRouteExtension\x12>.google.cloud.networkservices.v1.CreateLbRouteExtensionRequest\x1a\x1d.google.longrunning.Operation\"\xab\x01\xca\x41%\n\x10LbRouteExtension\x12\x11OperationMetadata\xda\x41/parent,lb_route_extension,lb_route_extension_id\x82\xd3\xe4\x93\x02K\"5/v1/{parent=projects/*/locations/*}/lbRouteExtensions:\x12lb_route_extension\x12\xa7\x02\n\x16UpdateLbRouteExtension\x12>.google.cloud.networkservices.v1.UpdateLbRouteExtensionRequest\x1a\x1d.google.longrunning.Operation\"\xad\x01\xca\x41%\n\x10LbRouteExtension\x12\x11OperationMetadata\xda\x41\x1elb_route_extension,update_mask\x82\xd3\xe4\x93\x02^2H/v1/{lb_route_extension.name=projects/*/locations/*/lbRouteExtensions/*}:\x12lb_route_extension\x12\xea\x01\n\x16\x44\x65leteLbRouteExtension\x12>.google.cloud.networkservices.v1.DeleteLbRouteExtensionRequest\x1a\x1d.google.longrunning.Operation\"q\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x37*5/v1/{name=projects/*/locations/*/lbRouteExtensions/*}\x12\xda\x01\n\x14ListLbEdgeExtensions\x12<.google.cloud.networkservices.v1.ListLbEdgeExtensionsRequest\x1a=.google.cloud.networkservices.v1.ListLbEdgeExtensionsResponse\"E\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x36\x12\x34/v1/{parent=projects/*/locations/*}/lbEdgeExtensions\x12\xc7\x01\n\x12GetLbEdgeExtension\x12:.google.cloud.networkservices.v1.GetLbEdgeExtensionRequest\x1a\x30.google.cloud.networkservices.v1.LbEdgeExtension\"C\xda\x41\x04name\x82\xd3\xe4\x93\x02\x36\x12\x34/v1/{name=projects/*/locations/*/lbEdgeExtensions/*}\x12\x9e\x02\n\x15\x43reateLbEdgeExtension\x12=.google.cloud.networkservices.v1.CreateLbEdgeExtensionRequest\x1a\x1d.google.longrunning.Operation\"\xa6\x01\xca\x41$\n\x0fLbEdgeExtension\x12\x11OperationMetadata\xda\x41-parent,lb_edge_extension,lb_edge_extension_id\x82\xd3\xe4\x93\x02I\"4/v1/{parent=projects/*/locations/*}/lbEdgeExtensions:\x11lb_edge_extension\x12\xa0\x02\n\x15UpdateLbEdgeExtension\x12=.google.cloud.networkservices.v1.UpdateLbEdgeExtensionRequest\x1a\x1d.google.longrunning.Operation\"\xa8\x01\xca\x41$\n\x0fLbEdgeExtension\x12\x11OperationMetadata\xda\x41\x1dlb_edge_extension,update_mask\x82\xd3\xe4\x93\x02[2F/v1/{lb_edge_extension.name=projects/*/locations/*/lbEdgeExtensions/*}:\x11lb_edge_extension\x12\xe7\x01\n\x15\x44\x65leteLbEdgeExtension\x12=.google.cloud.networkservices.v1.DeleteLbEdgeExtensionRequest\x1a\x1d.google.longrunning.Operation\"p\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x36*4/v1/{name=projects/*/locations/*/lbEdgeExtensions/*}\x12\xd6\x01\n\x13ListAuthzExtensions\x12;.google.cloud.networkservices.v1.ListAuthzExtensionsRequest\x1a<.google.cloud.networkservices.v1.ListAuthzExtensionsResponse\"D\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x35\x12\x33/v1/{parent=projects/*/locations/*}/authzExtensions\x12\xc3\x01\n\x11GetAuthzExtension\x12\x39.google.cloud.networkservices.v1.GetAuthzExtensionRequest\x1a/.google.cloud.networkservices.v1.AuthzExtension\"B\xda\x41\x04name\x82\xd3\xe4\x93\x02\x35\x12\x33/v1/{name=projects/*/locations/*/authzExtensions/*}\x12\x94\x02\n\x14\x43reateAuthzExtension\x12<.google.cloud.networkservices.v1.CreateAuthzExtensionRequest\x1a\x1d.google.longrunning.Operation\"\x9e\x01\xca\x41#\n\x0e\x41uthzExtension\x12\x11OperationMetadata\xda\x41)parent,authz_extension,authz_extension_id\x82\xd3\xe4\x93\x02\x46\"3/v1/{parent=projects/*/locations/*}/authzExtensions:\x0f\x61uthz_extension\x12\x96\x02\n\x14UpdateAuthzExtension\x12<.google.cloud.networkservices.v1.UpdateAuthzExtensionRequest\x1a\x1d.google.longrunning.Operation\"\xa0\x01\xca\x41#\n\x0e\x41uthzExtension\x12\x11OperationMetadata\xda\x41\x1b\x61uthz_extension,update_mask\x82\xd3\xe4\x93\x02V2C/v1/{authz_extension.name=projects/*/locations/*/authzExtensions/*}:\x0f\x61uthz_extension\x12\xe4\x01\n\x14\x44\x65leteAuthzExtension\x12<.google.cloud.networkservices.v1.DeleteAuthzExtensionRequest\x1a\x1d.google.longrunning.Operation\"o\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x35*3/v1/{name=projects/*/locations/*/authzExtensions/*}\x1aR\xca\x41\x1enetworkservices.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xe9\x01\n#com.google.cloud.networkservices.v1B\x08\x44\x65pProtoP\x01ZMcloud.google.com/go/networkservices/apiv1/networkservicespb;networkservicespb\xaa\x02\x1fGoogle.Cloud.NetworkServices.V1\xca\x02\x1fGoogle\\Cloud\\NetworkServices\\V1\xea\x02\"Google::Cloud::NetworkServices::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module NetworkServices - module V1 - ExtensionChain = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.ExtensionChain").msgclass - ExtensionChain::MatchCondition = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.ExtensionChain.MatchCondition").msgclass - ExtensionChain::Extension = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.ExtensionChain.Extension").msgclass - LbTrafficExtension = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.LbTrafficExtension").msgclass - ListLbTrafficExtensionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.ListLbTrafficExtensionsRequest").msgclass - ListLbTrafficExtensionsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.ListLbTrafficExtensionsResponse").msgclass - GetLbTrafficExtensionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.GetLbTrafficExtensionRequest").msgclass - CreateLbTrafficExtensionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.CreateLbTrafficExtensionRequest").msgclass - UpdateLbTrafficExtensionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.UpdateLbTrafficExtensionRequest").msgclass - DeleteLbTrafficExtensionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.DeleteLbTrafficExtensionRequest").msgclass - LbRouteExtension = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.LbRouteExtension").msgclass - ListLbRouteExtensionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.ListLbRouteExtensionsRequest").msgclass - ListLbRouteExtensionsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.ListLbRouteExtensionsResponse").msgclass - GetLbRouteExtensionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.GetLbRouteExtensionRequest").msgclass - CreateLbRouteExtensionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.CreateLbRouteExtensionRequest").msgclass - UpdateLbRouteExtensionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.UpdateLbRouteExtensionRequest").msgclass - DeleteLbRouteExtensionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.DeleteLbRouteExtensionRequest").msgclass - LbEdgeExtension = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.LbEdgeExtension").msgclass - ListLbEdgeExtensionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.ListLbEdgeExtensionsRequest").msgclass - ListLbEdgeExtensionsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.ListLbEdgeExtensionsResponse").msgclass - GetLbEdgeExtensionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.GetLbEdgeExtensionRequest").msgclass - CreateLbEdgeExtensionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.CreateLbEdgeExtensionRequest").msgclass - UpdateLbEdgeExtensionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.UpdateLbEdgeExtensionRequest").msgclass - DeleteLbEdgeExtensionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.DeleteLbEdgeExtensionRequest").msgclass - AuthzExtension = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.AuthzExtension").msgclass - ListAuthzExtensionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.ListAuthzExtensionsRequest").msgclass - ListAuthzExtensionsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.ListAuthzExtensionsResponse").msgclass - GetAuthzExtensionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.GetAuthzExtensionRequest").msgclass - CreateAuthzExtensionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.CreateAuthzExtensionRequest").msgclass - UpdateAuthzExtensionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.UpdateAuthzExtensionRequest").msgclass - DeleteAuthzExtensionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.DeleteAuthzExtensionRequest").msgclass - EventType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.EventType").enummodule - LoadBalancingScheme = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.LoadBalancingScheme").enummodule - WireFormat = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.WireFormat").enummodule - BodySendMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.BodySendMode").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/dep_services_pb.rb b/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/dep_services_pb.rb deleted file mode 100644 index 2a220e2e005d..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/dep_services_pb.rb +++ /dev/null @@ -1,86 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/cloud/networkservices/v1/dep.proto for package 'Google.Cloud.NetworkServices.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/networkservices/v1/dep_pb' - -module Google - module Cloud - module NetworkServices - module V1 - module DepService - # Service describing handlers for resources. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.cloud.networkservices.v1.DepService' - - # Lists `LbTrafficExtension` resources in a given project and location. - rpc :ListLbTrafficExtensions, ::Google::Cloud::NetworkServices::V1::ListLbTrafficExtensionsRequest, ::Google::Cloud::NetworkServices::V1::ListLbTrafficExtensionsResponse - # Gets details of the specified `LbTrafficExtension` resource. - rpc :GetLbTrafficExtension, ::Google::Cloud::NetworkServices::V1::GetLbTrafficExtensionRequest, ::Google::Cloud::NetworkServices::V1::LbTrafficExtension - # Creates a new `LbTrafficExtension` resource in a given project and - # location. - rpc :CreateLbTrafficExtension, ::Google::Cloud::NetworkServices::V1::CreateLbTrafficExtensionRequest, ::Google::Longrunning::Operation - # Updates the parameters of the specified `LbTrafficExtension` resource. - rpc :UpdateLbTrafficExtension, ::Google::Cloud::NetworkServices::V1::UpdateLbTrafficExtensionRequest, ::Google::Longrunning::Operation - # Deletes the specified `LbTrafficExtension` resource. - rpc :DeleteLbTrafficExtension, ::Google::Cloud::NetworkServices::V1::DeleteLbTrafficExtensionRequest, ::Google::Longrunning::Operation - # Lists `LbRouteExtension` resources in a given project and location. - rpc :ListLbRouteExtensions, ::Google::Cloud::NetworkServices::V1::ListLbRouteExtensionsRequest, ::Google::Cloud::NetworkServices::V1::ListLbRouteExtensionsResponse - # Gets details of the specified `LbRouteExtension` resource. - rpc :GetLbRouteExtension, ::Google::Cloud::NetworkServices::V1::GetLbRouteExtensionRequest, ::Google::Cloud::NetworkServices::V1::LbRouteExtension - # Creates a new `LbRouteExtension` resource in a given project and location. - rpc :CreateLbRouteExtension, ::Google::Cloud::NetworkServices::V1::CreateLbRouteExtensionRequest, ::Google::Longrunning::Operation - # Updates the parameters of the specified `LbRouteExtension` resource. - rpc :UpdateLbRouteExtension, ::Google::Cloud::NetworkServices::V1::UpdateLbRouteExtensionRequest, ::Google::Longrunning::Operation - # Deletes the specified `LbRouteExtension` resource. - rpc :DeleteLbRouteExtension, ::Google::Cloud::NetworkServices::V1::DeleteLbRouteExtensionRequest, ::Google::Longrunning::Operation - # Lists `LbEdgeExtension` resources in a given project and location. - rpc :ListLbEdgeExtensions, ::Google::Cloud::NetworkServices::V1::ListLbEdgeExtensionsRequest, ::Google::Cloud::NetworkServices::V1::ListLbEdgeExtensionsResponse - # Gets details of the specified `LbEdgeExtension` resource. - rpc :GetLbEdgeExtension, ::Google::Cloud::NetworkServices::V1::GetLbEdgeExtensionRequest, ::Google::Cloud::NetworkServices::V1::LbEdgeExtension - # Creates a new `LbEdgeExtension` resource in a given project and location. - rpc :CreateLbEdgeExtension, ::Google::Cloud::NetworkServices::V1::CreateLbEdgeExtensionRequest, ::Google::Longrunning::Operation - # Updates the parameters of the specified `LbEdgeExtension` resource. - rpc :UpdateLbEdgeExtension, ::Google::Cloud::NetworkServices::V1::UpdateLbEdgeExtensionRequest, ::Google::Longrunning::Operation - # Deletes the specified `LbEdgeExtension` resource. - rpc :DeleteLbEdgeExtension, ::Google::Cloud::NetworkServices::V1::DeleteLbEdgeExtensionRequest, ::Google::Longrunning::Operation - # Lists `AuthzExtension` resources in a given project and location. - rpc :ListAuthzExtensions, ::Google::Cloud::NetworkServices::V1::ListAuthzExtensionsRequest, ::Google::Cloud::NetworkServices::V1::ListAuthzExtensionsResponse - # Gets details of the specified `AuthzExtension` resource. - rpc :GetAuthzExtension, ::Google::Cloud::NetworkServices::V1::GetAuthzExtensionRequest, ::Google::Cloud::NetworkServices::V1::AuthzExtension - # Creates a new `AuthzExtension` resource in a given project - # and location. - rpc :CreateAuthzExtension, ::Google::Cloud::NetworkServices::V1::CreateAuthzExtensionRequest, ::Google::Longrunning::Operation - # Updates the parameters of the specified `AuthzExtension` - # resource. - rpc :UpdateAuthzExtension, ::Google::Cloud::NetworkServices::V1::UpdateAuthzExtensionRequest, ::Google::Longrunning::Operation - # Deletes the specified `AuthzExtension` resource. - rpc :DeleteAuthzExtension, ::Google::Cloud::NetworkServices::V1::DeleteAuthzExtensionRequest, ::Google::Longrunning::Operation - end - - Stub = Service.rpc_stub_class - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/endpoint_policy_pb.rb b/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/endpoint_policy_pb.rb deleted file mode 100644 index ce1896ec04f0..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/endpoint_policy_pb.rb +++ /dev/null @@ -1,34 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/networkservices/v1/endpoint_policy.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/cloud/networkservices/v1/common_pb' -require 'google/protobuf/field_mask_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n5google/cloud/networkservices/v1/endpoint_policy.proto\x12\x1fgoogle.cloud.networkservices.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a,google/cloud/networkservices/v1/common.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x8c\x08\n\x0e\x45ndpointPolicy\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12P\n\x06labels\x18\x04 \x03(\x0b\x32;.google.cloud.networkservices.v1.EndpointPolicy.LabelsEntryB\x03\xe0\x41\x01\x12U\n\x04type\x18\x05 \x01(\x0e\x32\x42.google.cloud.networkservices.v1.EndpointPolicy.EndpointPolicyTypeB\x03\xe0\x41\x02\x12X\n\x14\x61uthorization_policy\x18\x07 \x01(\tB:\xe0\x41\x01\xfa\x41\x34\n2networksecurity.googleapis.com/AuthorizationPolicy\x12O\n\x10\x65ndpoint_matcher\x18\t \x01(\x0b\x32\x30.google.cloud.networkservices.v1.EndpointMatcherB\x03\xe0\x41\x02\x12X\n\x15traffic_port_selector\x18\n \x01(\x0b\x32\x34.google.cloud.networkservices.v1.TrafficPortSelectorB\x03\xe0\x41\x01\x12\x18\n\x0b\x64\x65scription\x18\x0b \x01(\tB\x03\xe0\x41\x01\x12Q\n\x11server_tls_policy\x18\x0c \x01(\tB6\xe0\x41\x01\xfa\x41\x30\n.networksecurity.googleapis.com/ServerTlsPolicy\x12Q\n\x11\x63lient_tls_policy\x18\r \x01(\tB6\xe0\x41\x01\xfa\x41\x30\n.networksecurity.googleapis.com/ClientTlsPolicy\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"^\n\x12\x45ndpointPolicyType\x12$\n ENDPOINT_POLICY_TYPE_UNSPECIFIED\x10\x00\x12\x11\n\rSIDECAR_PROXY\x10\x01\x12\x0f\n\x0bGRPC_SERVER\x10\x02:~\xea\x41{\n-networkservices.googleapis.com/EndpointPolicy\x12Jprojects/{project}/locations/{location}/endpointPolicies/{endpoint_policy}\"\xb0\x01\n\x1bListEndpointPoliciesRequest\x12\x45\n\x06parent\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\x12-networkservices.googleapis.com/EndpointPolicy\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12#\n\x16return_partial_success\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"\x98\x01\n\x1cListEndpointPoliciesResponse\x12J\n\x11\x65ndpoint_policies\x18\x01 \x03(\x0b\x32/.google.cloud.networkservices.v1.EndpointPolicy\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"_\n\x18GetEndpointPolicyRequest\x12\x43\n\x04name\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-networkservices.googleapis.com/EndpointPolicy\"\xd4\x01\n\x1b\x43reateEndpointPolicyRequest\x12\x45\n\x06parent\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\x12-networkservices.googleapis.com/EndpointPolicy\x12\x1f\n\x12\x65ndpoint_policy_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12M\n\x0f\x65ndpoint_policy\x18\x03 \x01(\x0b\x32/.google.cloud.networkservices.v1.EndpointPolicyB\x03\xe0\x41\x02\"\xa2\x01\n\x1bUpdateEndpointPolicyRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x12M\n\x0f\x65ndpoint_policy\x18\x02 \x01(\x0b\x32/.google.cloud.networkservices.v1.EndpointPolicyB\x03\xe0\x41\x02\"b\n\x1b\x44\x65leteEndpointPolicyRequest\x12\x43\n\x04name\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-networkservices.googleapis.com/EndpointPolicyB\x86\x05\n#com.google.cloud.networkservices.v1B\x13\x45ndpointPolicyProtoP\x01ZMcloud.google.com/go/networkservices/apiv1/networkservicespb;networkservicespb\xaa\x02\x1fGoogle.Cloud.NetworkServices.V1\xca\x02\x1fGoogle\\Cloud\\NetworkServices\\V1\xea\x02\"Google::Cloud::NetworkServices::V1\xea\x41\x8a\x01\n2networksecurity.googleapis.com/AuthorizationPolicy\x12Tprojects/{project}/locations/{location}/authorizationPolicies/{authorization_policy}\xea\x41\x7f\n.networksecurity.googleapis.com/ServerTlsPolicy\x12Mprojects/{project}/locations/{location}/serverTlsPolicies/{server_tls_policy}\xea\x41\x7f\n.networksecurity.googleapis.com/ClientTlsPolicy\x12Mprojects/{project}/locations/{location}/clientTlsPolicies/{client_tls_policy}b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module NetworkServices - module V1 - EndpointPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.EndpointPolicy").msgclass - EndpointPolicy::EndpointPolicyType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.EndpointPolicy.EndpointPolicyType").enummodule - ListEndpointPoliciesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.ListEndpointPoliciesRequest").msgclass - ListEndpointPoliciesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.ListEndpointPoliciesResponse").msgclass - GetEndpointPolicyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.GetEndpointPolicyRequest").msgclass - CreateEndpointPolicyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.CreateEndpointPolicyRequest").msgclass - UpdateEndpointPolicyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.UpdateEndpointPolicyRequest").msgclass - DeleteEndpointPolicyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.DeleteEndpointPolicyRequest").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/extensibility_pb.rb b/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/extensibility_pb.rb deleted file mode 100644 index 45e4540b73bd..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/extensibility_pb.rb +++ /dev/null @@ -1,43 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/networkservices/v1/extensibility.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/field_mask_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n3google/cloud/networkservices/v1/extensibility.proto\x12\x1fgoogle.cloud.networkservices.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xfa\x0b\n\nWasmPlugin\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12L\n\x06labels\x18\x05 \x03(\x0b\x32\x37.google.cloud.networkservices.v1.WasmPlugin.LabelsEntryB\x03\xe0\x41\x01\x12\x1c\n\x0fmain_version_id\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12N\n\nlog_config\x18\t \x01(\x0b\x32\x35.google.cloud.networkservices.v1.WasmPlugin.LogConfigB\x03\xe0\x41\x01\x12P\n\x08versions\x18\n \x03(\x0b\x32\x39.google.cloud.networkservices.v1.WasmPlugin.VersionsEntryB\x03\xe0\x41\x01\x12H\n\x07used_by\x18\x0b \x03(\x0b\x32\x32.google.cloud.networkservices.v1.WasmPlugin.UsedByB\x03\xe0\x41\x03\x1a\xcb\x03\n\x0eVersionDetails\x12\x1c\n\x12plugin_config_data\x18\t \x01(\x0cH\x00\x12\x1b\n\x11plugin_config_uri\x18\n \x01(\tH\x00\x12\x34\n\x0b\x63reate_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12[\n\x06labels\x18\x04 \x03(\x0b\x32\x46.google.cloud.networkservices.v1.WasmPlugin.VersionDetails.LabelsEntryB\x03\xe0\x41\x01\x12\x16\n\timage_uri\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x19\n\x0cimage_digest\x18\x06 \x01(\tB\x03\xe0\x41\x03\x12!\n\x14plugin_config_digest\x18\x0b \x01(\tB\x03\xe0\x41\x03\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x16\n\x14plugin_config_source\x1a\x80\x02\n\tLogConfig\x12\x13\n\x06\x65nable\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01\x12\x18\n\x0bsample_rate\x18\x02 \x01(\x02\x42\x03\xe0\x41\x07\x12Z\n\rmin_log_level\x18\x03 \x01(\x0e\x32>.google.cloud.networkservices.v1.WasmPlugin.LogConfig.LogLevelB\x03\xe0\x41\x07\"h\n\x08LogLevel\x12\x19\n\x15LOG_LEVEL_UNSPECIFIED\x10\x00\x12\t\n\x05TRACE\x10\x01\x12\t\n\x05\x44\x45\x42UG\x10\x02\x12\x08\n\x04INFO\x10\x03\x12\x08\n\x04WARN\x10\x04\x12\t\n\x05\x45RROR\x10\x05\x12\x0c\n\x08\x43RITICAL\x10\x06\x1a\x1b\n\x06UsedBy\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1ak\n\rVersionsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12I\n\x05value\x18\x02 \x01(\x0b\x32:.google.cloud.networkservices.v1.WasmPlugin.VersionDetails:\x02\x38\x01:q\xea\x41n\n)networkservices.googleapis.com/WasmPlugin\x12\x41projects/{project}/locations/{location}/wasmPlugins/{wasm_plugin}\"\xf4\x04\n\x11WasmPluginVersion\x12\x1c\n\x12plugin_config_data\x18\x0c \x01(\x0cH\x00\x12\x1b\n\x11plugin_config_uri\x18\r \x01(\tH\x00\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x34\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12S\n\x06labels\x18\x06 \x03(\x0b\x32>.google.cloud.networkservices.v1.WasmPluginVersion.LabelsEntryB\x03\xe0\x41\x01\x12\x16\n\timage_uri\x18\x08 \x01(\tB\x03\xe0\x41\x01\x12\x19\n\x0cimage_digest\x18\t \x01(\tB\x03\xe0\x41\x03\x12!\n\x14plugin_config_digest\x18\x0e \x01(\tB\x03\xe0\x41\x03\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\x98\x01\xea\x41\x94\x01\n0networkservices.googleapis.com/WasmPluginVersion\x12`projects/{project}/locations/{location}/wasmPlugins/{wasm_plugin}/versions/{wasm_plugin_version}B\x16\n\x14plugin_config_source\"\x82\x01\n\x16ListWasmPluginsRequest\x12\x41\n\x06parent\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\x12)networkservices.googleapis.com/WasmPlugin\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"\x8a\x01\n\x17ListWasmPluginsResponse\x12\x41\n\x0cwasm_plugins\x18\x01 \x03(\x0b\x32+.google.cloud.networkservices.v1.WasmPlugin\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"\x96\x01\n\x14GetWasmPluginRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)networkservices.googleapis.com/WasmPlugin\x12=\n\x04view\x18\x02 \x01(\x0e\x32/.google.cloud.networkservices.v1.WasmPluginView\"\xc0\x01\n\x17\x43reateWasmPluginRequest\x12\x41\n\x06parent\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\x12)networkservices.googleapis.com/WasmPlugin\x12\x1b\n\x0ewasm_plugin_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x45\n\x0bwasm_plugin\x18\x03 \x01(\x0b\x32+.google.cloud.networkservices.v1.WasmPluginB\x03\xe0\x41\x02\"\x96\x01\n\x17UpdateWasmPluginRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x12\x45\n\x0bwasm_plugin\x18\x02 \x01(\x0b\x32+.google.cloud.networkservices.v1.WasmPluginB\x03\xe0\x41\x02\"Z\n\x17\x44\x65leteWasmPluginRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)networkservices.googleapis.com/WasmPlugin\"\x90\x01\n\x1dListWasmPluginVersionsRequest\x12H\n\x06parent\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\x12\x30networkservices.googleapis.com/WasmPluginVersion\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"\xa0\x01\n\x1eListWasmPluginVersionsResponse\x12P\n\x14wasm_plugin_versions\x18\x01 \x03(\x0b\x32\x32.google.cloud.networkservices.v1.WasmPluginVersion\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"e\n\x1bGetWasmPluginVersionRequest\x12\x46\n\x04name\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\n0networkservices.googleapis.com/WasmPluginVersion\"\xe5\x01\n\x1e\x43reateWasmPluginVersionRequest\x12H\n\x06parent\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\x12\x30networkservices.googleapis.com/WasmPluginVersion\x12#\n\x16wasm_plugin_version_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12T\n\x13wasm_plugin_version\x18\x03 \x01(\x0b\x32\x32.google.cloud.networkservices.v1.WasmPluginVersionB\x03\xe0\x41\x02\"h\n\x1e\x44\x65leteWasmPluginVersionRequest\x12\x46\n\x04name\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\n0networkservices.googleapis.com/WasmPluginVersion*i\n\x0eWasmPluginView\x12 \n\x1cWASM_PLUGIN_VIEW_UNSPECIFIED\x10\x00\x12\x1a\n\x16WASM_PLUGIN_VIEW_BASIC\x10\x01\x12\x19\n\x15WASM_PLUGIN_VIEW_FULL\x10\x02\x42\xf3\x01\n#com.google.cloud.networkservices.v1B\x12\x45xtensibilityProtoP\x01ZMcloud.google.com/go/networkservices/apiv1/networkservicespb;networkservicespb\xaa\x02\x1fGoogle.Cloud.NetworkServices.V1\xca\x02\x1fGoogle\\Cloud\\NetworkServices\\V1\xea\x02\"Google::Cloud::NetworkServices::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module NetworkServices - module V1 - WasmPlugin = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.WasmPlugin").msgclass - WasmPlugin::VersionDetails = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.WasmPlugin.VersionDetails").msgclass - WasmPlugin::LogConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.WasmPlugin.LogConfig").msgclass - WasmPlugin::LogConfig::LogLevel = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.WasmPlugin.LogConfig.LogLevel").enummodule - WasmPlugin::UsedBy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.WasmPlugin.UsedBy").msgclass - WasmPluginVersion = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.WasmPluginVersion").msgclass - ListWasmPluginsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.ListWasmPluginsRequest").msgclass - ListWasmPluginsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.ListWasmPluginsResponse").msgclass - GetWasmPluginRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.GetWasmPluginRequest").msgclass - CreateWasmPluginRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.CreateWasmPluginRequest").msgclass - UpdateWasmPluginRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.UpdateWasmPluginRequest").msgclass - DeleteWasmPluginRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.DeleteWasmPluginRequest").msgclass - ListWasmPluginVersionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.ListWasmPluginVersionsRequest").msgclass - ListWasmPluginVersionsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.ListWasmPluginVersionsResponse").msgclass - GetWasmPluginVersionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.GetWasmPluginVersionRequest").msgclass - CreateWasmPluginVersionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.CreateWasmPluginVersionRequest").msgclass - DeleteWasmPluginVersionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.DeleteWasmPluginVersionRequest").msgclass - WasmPluginView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.WasmPluginView").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/gateway_pb.rb b/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/gateway_pb.rb deleted file mode 100644 index 69ea84d4661a..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/gateway_pb.rb +++ /dev/null @@ -1,36 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/networkservices/v1/gateway.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/cloud/networkservices/v1/common_pb' -require 'google/protobuf/field_mask_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n-google/cloud/networkservices/v1/gateway.proto\x12\x1fgoogle.cloud.networkservices.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a,google/cloud/networkservices/v1/common.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xbe\x0b\n\x07Gateway\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x16\n\tself_link\x18\r \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12I\n\x06labels\x18\x04 \x03(\x0b\x32\x34.google.cloud.networkservices.v1.Gateway.LabelsEntryB\x03\xe0\x41\x01\x12\x18\n\x0b\x64\x65scription\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12@\n\x04type\x18\x06 \x01(\x0e\x32-.google.cloud.networkservices.v1.Gateway.TypeB\x03\xe0\x41\x05\x12\x39\n\taddresses\x18\x07 \x03(\tB&\xe0\x41\x01\xfa\x41 \n\x1e\x63ompute.googleapis.com/Address\x12\x12\n\x05ports\x18\x0b \x03(\x05\x42\x03\xe0\x41\x02\x12\x16\n\tall_ports\x18\" \x01(\x08\x42\x03\xe0\x41\x01\x12\x12\n\x05scope\x18\x08 \x01(\tB\x03\xe0\x41\x01\x12Q\n\x11server_tls_policy\x18\t \x01(\tB6\xe0\x41\x01\xfa\x41\x30\n.networksecurity.googleapis.com/ServerTlsPolicy\x12O\n\x10\x63\x65rtificate_urls\x18\x0e \x03(\tB5\xe0\x41\x01\xfa\x41/\n-certificatemanager.googleapis.com/Certificate\x12]\n\x17gateway_security_policy\x18\x12 \x01(\tB<\xe0\x41\x01\xfa\x41\x36\n4networksecurity.googleapis.com/GatewaySecurityPolicy\x12\x37\n\x07network\x18\x10 \x01(\tB&\xe0\x41\x01\xfa\x41 \n\x1e\x63ompute.googleapis.com/Network\x12=\n\nsubnetwork\x18\x11 \x01(\tB)\xe0\x41\x01\xfa\x41#\n!compute.googleapis.com/Subnetwork\x12K\n\nip_version\x18\x15 \x01(\x0e\x32\x32.google.cloud.networkservices.v1.Gateway.IpVersionB\x03\xe0\x41\x01\x12N\n\renvoy_headers\x18\x1c \x01(\x0e\x32-.google.cloud.networkservices.v1.EnvoyHeadersB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12O\n\x0crouting_mode\x18 \x01(\x0e\x32\x34.google.cloud.networkservices.v1.Gateway.RoutingModeB\x03\xe0\x41\x01\x12 \n\x13\x61llow_global_access\x18! \x01(\x08\x42\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"C\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\r\n\tOPEN_MESH\x10\x01\x12\x16\n\x12SECURE_WEB_GATEWAY\x10\x02\";\n\tIpVersion\x12\x1a\n\x16IP_VERSION_UNSPECIFIED\x10\x00\x12\x08\n\x04IPV4\x10\x01\x12\x08\n\x04IPV6\x10\x02\"C\n\x0bRoutingMode\x12\x19\n\x15\x45XPLICIT_ROUTING_MODE\x10\x00\x12\x19\n\x15NEXT_HOP_ROUTING_MODE\x10\x01:g\xea\x41\x64\n&networkservices.googleapis.com/Gateway\x12:projects/{project}/locations/{location}/gateways/{gateway}B\x10\n\x0e_envoy_headers\"|\n\x13ListGatewaysRequest\x12>\n\x06parent\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\x12&networkservices.googleapis.com/Gateway\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"\x80\x01\n\x14ListGatewaysResponse\x12:\n\x08gateways\x18\x01 \x03(\x0b\x32(.google.cloud.networkservices.v1.Gateway\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"Q\n\x11GetGatewayRequest\x12<\n\x04name\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\n&networkservices.googleapis.com/Gateway\"\xaf\x01\n\x14\x43reateGatewayRequest\x12>\n\x06parent\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\x12&networkservices.googleapis.com/Gateway\x12\x17\n\ngateway_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12>\n\x07gateway\x18\x03 \x01(\x0b\x32(.google.cloud.networkservices.v1.GatewayB\x03\xe0\x41\x02\"\x8c\x01\n\x14UpdateGatewayRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x12>\n\x07gateway\x18\x02 \x01(\x0b\x32(.google.cloud.networkservices.v1.GatewayB\x03\xe0\x41\x02\"T\n\x14\x44\x65leteGatewayRequest\x12<\n\x04name\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\n&networkservices.googleapis.com/GatewayB\x89\x06\n#com.google.cloud.networkservices.v1B\x0cGatewayProtoP\x01ZMcloud.google.com/go/networkservices/apiv1/networkservicespb;networkservicespb\xaa\x02\x1fGoogle.Cloud.NetworkServices.V1\xca\x02\x1fGoogle\\Cloud\\NetworkServices\\V1\xea\x02\"Google::Cloud::NetworkServices::V1\xea\x41\x91\x01\n4networksecurity.googleapis.com/GatewaySecurityPolicy\x12Yprojects/{project}/locations/{location}/gatewaySecurityPolicies/{gateway_security_policy}\xea\x41\x61\n!compute.googleapis.com/Subnetwork\x12\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(networkservices.googleapis.com/GrpcRoute\"\xbb\x01\n\x16\x43reateGrpcRouteRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\x12(networkservices.googleapis.com/GrpcRoute\x12\x1a\n\rgrpc_route_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x43\n\ngrpc_route\x18\x03 \x01(\x0b\x32*.google.cloud.networkservices.v1.GrpcRouteB\x03\xe0\x41\x02\"\x93\x01\n\x16UpdateGrpcRouteRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x12\x43\n\ngrpc_route\x18\x02 \x01(\x0b\x32*.google.cloud.networkservices.v1.GrpcRouteB\x03\xe0\x41\x02\"X\n\x16\x44\x65leteGrpcRouteRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(networkservices.googleapis.com/GrpcRouteB\xe4\x02\n#com.google.cloud.networkservices.v1B\x0eGrpcRouteProtoP\x01ZMcloud.google.com/go/networkservices/apiv1/networkservicespb;networkservicespb\xaa\x02\x1fGoogle.Cloud.NetworkServices.V1\xca\x02\x1fGoogle\\Cloud\\NetworkServices\\V1\xea\x02\"Google::Cloud::NetworkServices::V1\xea\x41r\n%compute.googleapis.com/BackendService\x12Iprojects/{project}/locations/{location}/backendServices/{backend_service}b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module NetworkServices - module V1 - GrpcRoute = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.GrpcRoute").msgclass - GrpcRoute::MethodMatch = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.GrpcRoute.MethodMatch").msgclass - GrpcRoute::MethodMatch::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.GrpcRoute.MethodMatch.Type").enummodule - GrpcRoute::HeaderMatch = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.GrpcRoute.HeaderMatch").msgclass - GrpcRoute::HeaderMatch::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.GrpcRoute.HeaderMatch.Type").enummodule - GrpcRoute::RouteMatch = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.GrpcRoute.RouteMatch").msgclass - GrpcRoute::Destination = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.GrpcRoute.Destination").msgclass - GrpcRoute::FaultInjectionPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.GrpcRoute.FaultInjectionPolicy").msgclass - GrpcRoute::FaultInjectionPolicy::Delay = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.GrpcRoute.FaultInjectionPolicy.Delay").msgclass - GrpcRoute::FaultInjectionPolicy::Abort = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.GrpcRoute.FaultInjectionPolicy.Abort").msgclass - GrpcRoute::StatefulSessionAffinityPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.GrpcRoute.StatefulSessionAffinityPolicy").msgclass - GrpcRoute::RetryPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.GrpcRoute.RetryPolicy").msgclass - GrpcRoute::RouteAction = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.GrpcRoute.RouteAction").msgclass - GrpcRoute::RouteRule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.GrpcRoute.RouteRule").msgclass - ListGrpcRoutesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.ListGrpcRoutesRequest").msgclass - ListGrpcRoutesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.ListGrpcRoutesResponse").msgclass - GetGrpcRouteRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.GetGrpcRouteRequest").msgclass - CreateGrpcRouteRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.CreateGrpcRouteRequest").msgclass - UpdateGrpcRouteRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.UpdateGrpcRouteRequest").msgclass - DeleteGrpcRouteRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.DeleteGrpcRouteRequest").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/http_route_pb.rb b/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/http_route_pb.rb deleted file mode 100644 index 2187729094d4..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/http_route_pb.rb +++ /dev/null @@ -1,53 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/networkservices/v1/http_route.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/field_info_pb' -require 'google/api/resource_pb' -require 'google/protobuf/duration_pb' -require 'google/protobuf/field_mask_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n0google/cloud/networkservices/v1/http_route.proto\x12\x1fgoogle.cloud.networkservices.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1bgoogle/api/field_info.proto\x1a\x19google/api/resource.proto\x1a\x1egoogle/protobuf/duration.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x8f$\n\tHttpRoute\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x16\n\tself_link\x18\x0b \x01(\tB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x34\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x16\n\thostnames\x18\x05 \x03(\tB\x03\xe0\x41\x02\x12;\n\x06meshes\x18\x08 \x03(\tB+\xe0\x41\x01\xfa\x41%\n#networkservices.googleapis.com/Mesh\x12@\n\x08gateways\x18\t \x03(\tB.\xe0\x41\x01\xfa\x41(\n&networkservices.googleapis.com/Gateway\x12K\n\x06labels\x18\n \x03(\x0b\x32\x36.google.cloud.networkservices.v1.HttpRoute.LabelsEntryB\x03\xe0\x41\x01\x12H\n\x05rules\x18\x06 \x03(\x0b\x32\x34.google.cloud.networkservices.v1.HttpRoute.RouteRuleB\x03\xe0\x41\x02\x1a\xbf\x02\n\x0bHeaderMatch\x12\x15\n\x0b\x65xact_match\x18\x02 \x01(\tH\x00\x12\x15\n\x0bregex_match\x18\x03 \x01(\tH\x00\x12\x16\n\x0cprefix_match\x18\x04 \x01(\tH\x00\x12\x17\n\rpresent_match\x18\x05 \x01(\x08H\x00\x12\x16\n\x0csuffix_match\x18\x06 \x01(\tH\x00\x12Z\n\x0brange_match\x18\x07 \x01(\x0b\x32\x43.google.cloud.networkservices.v1.HttpRoute.HeaderMatch.IntegerRangeH\x00\x12\x0e\n\x06header\x18\x01 \x01(\t\x12\x14\n\x0cinvert_match\x18\x08 \x01(\x08\x1a*\n\x0cIntegerRange\x12\r\n\x05start\x18\x01 \x01(\x05\x12\x0b\n\x03\x65nd\x18\x02 \x01(\x05\x42\x0b\n\tMatchType\x1a\x82\x01\n\x13QueryParameterMatch\x12\x15\n\x0b\x65xact_match\x18\x02 \x01(\tH\x00\x12\x15\n\x0bregex_match\x18\x03 \x01(\tH\x00\x12\x17\n\rpresent_match\x18\x04 \x01(\x08H\x00\x12\x17\n\x0fquery_parameter\x18\x01 \x01(\tB\x0b\n\tMatchType\x1a\x9b\x02\n\nRouteMatch\x12\x19\n\x0f\x66ull_path_match\x18\x01 \x01(\tH\x00\x12\x16\n\x0cprefix_match\x18\x02 \x01(\tH\x00\x12\x15\n\x0bregex_match\x18\x03 \x01(\tH\x00\x12\x13\n\x0bignore_case\x18\x04 \x01(\x08\x12G\n\x07headers\x18\x05 \x03(\x0b\x32\x36.google.cloud.networkservices.v1.HttpRoute.HeaderMatch\x12X\n\x10query_parameters\x18\x06 \x03(\x0b\x32>.google.cloud.networkservices.v1.HttpRoute.QueryParameterMatchB\x0b\n\tPathMatch\x1a\xa2\x02\n\x0b\x44\x65stination\x12@\n\x0cservice_name\x18\x01 \x01(\tB*\xfa\x41\'\n%compute.googleapis.com/BackendService\x12\x0e\n\x06weight\x18\x02 \x01(\x05\x12_\n\x17request_header_modifier\x18\x03 \x01(\x0b\x32\x39.google.cloud.networkservices.v1.HttpRoute.HeaderModifierB\x03\xe0\x41\x01\x12`\n\x18response_header_modifier\x18\x04 \x01(\x0b\x32\x39.google.cloud.networkservices.v1.HttpRoute.HeaderModifierB\x03\xe0\x41\x01\x1a\x86\x03\n\x08Redirect\x12\x15\n\rhost_redirect\x18\x01 \x01(\t\x12\x15\n\rpath_redirect\x18\x02 \x01(\t\x12\x16\n\x0eprefix_rewrite\x18\x03 \x01(\t\x12W\n\rresponse_code\x18\x04 \x01(\x0e\x32@.google.cloud.networkservices.v1.HttpRoute.Redirect.ResponseCode\x12\x16\n\x0ehttps_redirect\x18\x05 \x01(\x08\x12\x13\n\x0bstrip_query\x18\x06 \x01(\x08\x12\x15\n\rport_redirect\x18\x07 \x01(\x05\"\x96\x01\n\x0cResponseCode\x12\x1d\n\x19RESPONSE_CODE_UNSPECIFIED\x10\x00\x12\x1d\n\x19MOVED_PERMANENTLY_DEFAULT\x10\x01\x12\t\n\x05\x46OUND\x10\x02\x12\r\n\tSEE_OTHER\x10\x03\x12\x16\n\x12TEMPORARY_REDIRECT\x10\x04\x12\x16\n\x12PERMANENT_REDIRECT\x10\x05\x1a\xc1\x02\n\x14\x46\x61ultInjectionPolicy\x12T\n\x05\x64\x65lay\x18\x01 \x01(\x0b\x32\x45.google.cloud.networkservices.v1.HttpRoute.FaultInjectionPolicy.Delay\x12T\n\x05\x61\x62ort\x18\x02 \x01(\x0b\x32\x45.google.cloud.networkservices.v1.HttpRoute.FaultInjectionPolicy.Abort\x1aK\n\x05\x44\x65lay\x12.\n\x0b\x66ixed_delay\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x12\n\npercentage\x18\x02 \x01(\x05\x1a\x30\n\x05\x41\x62ort\x12\x13\n\x0bhttp_status\x18\x01 \x01(\x05\x12\x12\n\npercentage\x18\x02 \x01(\x05\x1aS\n\x1dStatefulSessionAffinityPolicy\x12\x32\n\ncookie_ttl\x18\x01 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x02\x1a\x9a\x02\n\x0eHeaderModifier\x12O\n\x03set\x18\x01 \x03(\x0b\x32\x42.google.cloud.networkservices.v1.HttpRoute.HeaderModifier.SetEntry\x12O\n\x03\x61\x64\x64\x18\x02 \x03(\x0b\x32\x42.google.cloud.networkservices.v1.HttpRoute.HeaderModifier.AddEntry\x12\x0e\n\x06remove\x18\x03 \x03(\t\x1a*\n\x08SetEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a*\n\x08\x41\x64\x64\x45ntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a?\n\nURLRewrite\x12\x1b\n\x13path_prefix_rewrite\x18\x01 \x01(\t\x12\x14\n\x0chost_rewrite\x18\x02 \x01(\t\x1ap\n\x0bRetryPolicy\x12\x18\n\x10retry_conditions\x18\x01 \x03(\t\x12\x13\n\x0bnum_retries\x18\x02 \x01(\x05\x12\x32\n\x0fper_try_timeout\x18\x03 \x01(\x0b\x32\x19.google.protobuf.Duration\x1a\x7f\n\x13RequestMirrorPolicy\x12K\n\x0b\x64\x65stination\x18\x01 \x01(\x0b\x32\x36.google.cloud.networkservices.v1.HttpRoute.Destination\x12\x1b\n\x0emirror_percent\x18\x02 \x01(\x02\x42\x03\xe0\x41\x01\x1a\xc5\x01\n\nCorsPolicy\x12\x15\n\rallow_origins\x18\x01 \x03(\t\x12\x1c\n\x14\x61llow_origin_regexes\x18\x02 \x03(\t\x12\x15\n\rallow_methods\x18\x03 \x03(\t\x12\x15\n\rallow_headers\x18\x04 \x03(\t\x12\x16\n\x0e\x65xpose_headers\x18\x05 \x03(\t\x12\x0f\n\x07max_age\x18\x06 \x01(\t\x12\x19\n\x11\x61llow_credentials\x18\x07 \x01(\x08\x12\x10\n\x08\x64isabled\x18\x08 \x01(\x08\x1al\n\x12HttpDirectResponse\x12\x1a\n\x0bstring_body\x18\x02 \x01(\tB\x03\xe0\x41\x01H\x00\x12\x19\n\nbytes_body\x18\x03 \x01(\x0c\x42\x03\xe0\x41\x01H\x00\x12\x13\n\x06status\x18\x01 \x01(\x05\x42\x03\xe0\x41\x02\x42\n\n\x08HttpBody\x1a\xb2\x08\n\x0bRouteAction\x12L\n\x0c\x64\x65stinations\x18\x01 \x03(\x0b\x32\x36.google.cloud.networkservices.v1.HttpRoute.Destination\x12\x45\n\x08redirect\x18\x02 \x01(\x0b\x32\x33.google.cloud.networkservices.v1.HttpRoute.Redirect\x12_\n\x16\x66\x61ult_injection_policy\x18\x04 \x01(\x0b\x32?.google.cloud.networkservices.v1.HttpRoute.FaultInjectionPolicy\x12Z\n\x17request_header_modifier\x18\x05 \x01(\x0b\x32\x39.google.cloud.networkservices.v1.HttpRoute.HeaderModifier\x12[\n\x18response_header_modifier\x18\x06 \x01(\x0b\x32\x39.google.cloud.networkservices.v1.HttpRoute.HeaderModifier\x12J\n\x0burl_rewrite\x18\x07 \x01(\x0b\x32\x35.google.cloud.networkservices.v1.HttpRoute.URLRewrite\x12*\n\x07timeout\x18\x08 \x01(\x0b\x32\x19.google.protobuf.Duration\x12L\n\x0cretry_policy\x18\t \x01(\x0b\x32\x36.google.cloud.networkservices.v1.HttpRoute.RetryPolicy\x12]\n\x15request_mirror_policy\x18\n \x01(\x0b\x32>.google.cloud.networkservices.v1.HttpRoute.RequestMirrorPolicy\x12J\n\x0b\x63ors_policy\x18\x0b \x01(\x0b\x32\x35.google.cloud.networkservices.v1.HttpRoute.CorsPolicy\x12p\n\x19stateful_session_affinity\x18\x0c \x01(\x0b\x32H.google.cloud.networkservices.v1.HttpRoute.StatefulSessionAffinityPolicyB\x03\xe0\x41\x01\x12[\n\x0f\x64irect_response\x18\r \x01(\x0b\x32=.google.cloud.networkservices.v1.HttpRoute.HttpDirectResponseB\x03\xe0\x41\x01\x12\x34\n\x0cidle_timeout\x18\x0e \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x01\x1a\x9b\x01\n\tRouteRule\x12\x46\n\x07matches\x18\x01 \x03(\x0b\x32\x35.google.cloud.networkservices.v1.HttpRoute.RouteMatch\x12\x46\n\x06\x61\x63tion\x18\x02 \x01(\x0b\x32\x36.google.cloud.networkservices.v1.HttpRoute.RouteAction\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:n\xea\x41k\n(networkservices.googleapis.com/HttpRoute\x12?projects/{project}/locations/{location}/httpRoutes/{http_route}\"\xba\x01\n\x15ListHttpRoutesRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\x12(networkservices.googleapis.com/HttpRoute\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12#\n\x16return_partial_success\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x87\x01\n\x16ListHttpRoutesResponse\x12?\n\x0bhttp_routes\x18\x01 \x03(\x0b\x32*.google.cloud.networkservices.v1.HttpRoute\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"U\n\x13GetHttpRouteRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(networkservices.googleapis.com/HttpRoute\"\xdc\x01\n\x16\x43reateHttpRouteRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\x12(networkservices.googleapis.com/HttpRoute\x12\x1a\n\rhttp_route_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x43\n\nhttp_route\x18\x03 \x01(\x0b\x32*.google.cloud.networkservices.v1.HttpRouteB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x04 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\x93\x01\n\x16UpdateHttpRouteRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x12\x43\n\nhttp_route\x18\x02 \x01(\x0b\x32*.google.cloud.networkservices.v1.HttpRouteB\x03\xe0\x41\x02\"X\n\x16\x44\x65leteHttpRouteRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(networkservices.googleapis.com/HttpRouteB\xef\x01\n#com.google.cloud.networkservices.v1B\x0eHttpRouteProtoP\x01ZMcloud.google.com/go/networkservices/apiv1/networkservicespb;networkservicespb\xaa\x02\x1fGoogle.Cloud.NetworkServices.V1\xca\x02\x1fGoogle\\Cloud\\NetworkServices\\V1\xea\x02\"Google::Cloud::NetworkServices::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module NetworkServices - module V1 - HttpRoute = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.HttpRoute").msgclass - HttpRoute::HeaderMatch = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.HttpRoute.HeaderMatch").msgclass - HttpRoute::HeaderMatch::IntegerRange = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.HttpRoute.HeaderMatch.IntegerRange").msgclass - HttpRoute::QueryParameterMatch = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.HttpRoute.QueryParameterMatch").msgclass - HttpRoute::RouteMatch = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.HttpRoute.RouteMatch").msgclass - HttpRoute::Destination = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.HttpRoute.Destination").msgclass - HttpRoute::Redirect = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.HttpRoute.Redirect").msgclass - HttpRoute::Redirect::ResponseCode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.HttpRoute.Redirect.ResponseCode").enummodule - HttpRoute::FaultInjectionPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.HttpRoute.FaultInjectionPolicy").msgclass - HttpRoute::FaultInjectionPolicy::Delay = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.HttpRoute.FaultInjectionPolicy.Delay").msgclass - HttpRoute::FaultInjectionPolicy::Abort = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.HttpRoute.FaultInjectionPolicy.Abort").msgclass - HttpRoute::StatefulSessionAffinityPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.HttpRoute.StatefulSessionAffinityPolicy").msgclass - HttpRoute::HeaderModifier = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.HttpRoute.HeaderModifier").msgclass - HttpRoute::URLRewrite = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.HttpRoute.URLRewrite").msgclass - HttpRoute::RetryPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.HttpRoute.RetryPolicy").msgclass - HttpRoute::RequestMirrorPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.HttpRoute.RequestMirrorPolicy").msgclass - HttpRoute::CorsPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.HttpRoute.CorsPolicy").msgclass - HttpRoute::HttpDirectResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.HttpRoute.HttpDirectResponse").msgclass - HttpRoute::RouteAction = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.HttpRoute.RouteAction").msgclass - HttpRoute::RouteRule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.HttpRoute.RouteRule").msgclass - ListHttpRoutesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.ListHttpRoutesRequest").msgclass - ListHttpRoutesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.ListHttpRoutesResponse").msgclass - GetHttpRouteRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.GetHttpRouteRequest").msgclass - CreateHttpRouteRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.CreateHttpRouteRequest").msgclass - UpdateHttpRouteRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.UpdateHttpRouteRequest").msgclass - DeleteHttpRouteRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.DeleteHttpRouteRequest").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/mesh_pb.rb b/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/mesh_pb.rb deleted file mode 100644 index 876e2212ea88..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/mesh_pb.rb +++ /dev/null @@ -1,33 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/networkservices/v1/mesh.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/cloud/networkservices/v1/common_pb' -require 'google/protobuf/field_mask_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n*google/cloud/networkservices/v1/mesh.proto\x12\x1fgoogle.cloud.networkservices.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a,google/cloud/networkservices/v1/common.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x9f\x04\n\x04Mesh\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x16\n\tself_link\x18\t \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x46\n\x06labels\x18\x04 \x03(\x0b\x32\x31.google.cloud.networkservices.v1.Mesh.LabelsEntryB\x03\xe0\x41\x01\x12\x18\n\x0b\x64\x65scription\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x1e\n\x11interception_port\x18\x08 \x01(\x05\x42\x03\xe0\x41\x01\x12N\n\renvoy_headers\x18\x10 \x01(\x0e\x32-.google.cloud.networkservices.v1.EnvoyHeadersB\x03\xe0\x41\x01H\x00\x88\x01\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:m\xea\x41j\n#networkservices.googleapis.com/Mesh\x12\x35projects/{project}/locations/{location}/meshes/{mesh}*\x06meshes2\x04meshB\x10\n\x0e_envoy_headers\"\x9c\x01\n\x11ListMeshesRequest\x12;\n\x06parent\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\x12#networkservices.googleapis.com/Mesh\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12#\n\x16return_partial_success\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"y\n\x12ListMeshesResponse\x12\x35\n\x06meshes\x18\x01 \x03(\x0b\x32%.google.cloud.networkservices.v1.Mesh\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"K\n\x0eGetMeshRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#networkservices.googleapis.com/Mesh\"\xa0\x01\n\x11\x43reateMeshRequest\x12;\n\x06parent\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\x12#networkservices.googleapis.com/Mesh\x12\x14\n\x07mesh_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x38\n\x04mesh\x18\x03 \x01(\x0b\x32%.google.cloud.networkservices.v1.MeshB\x03\xe0\x41\x02\"\x83\x01\n\x11UpdateMeshRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x12\x38\n\x04mesh\x18\x02 \x01(\x0b\x32%.google.cloud.networkservices.v1.MeshB\x03\xe0\x41\x02\"N\n\x11\x44\x65leteMeshRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#networkservices.googleapis.com/MeshB\xe4\x02\n#com.google.cloud.networkservices.v1B\tMeshProtoP\x01ZMcloud.google.com/go/networkservices/apiv1/networkservicespb;networkservicespb\xaa\x02\x1fGoogle.Cloud.NetworkServices.V1\xca\x02\x1fGoogle\\Cloud\\NetworkServices\\V1\xea\x02\"Google::Cloud::NetworkServices::V1\xea\x41w\n(compute.googleapis.com/ServiceAttachment\x12Kprojects/{project}/regions/{region}/serviceAttachments/{service_attachment}b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module NetworkServices - module V1 - Mesh = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.Mesh").msgclass - ListMeshesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.ListMeshesRequest").msgclass - ListMeshesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.ListMeshesResponse").msgclass - GetMeshRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.GetMeshRequest").msgclass - CreateMeshRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.CreateMeshRequest").msgclass - UpdateMeshRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.UpdateMeshRequest").msgclass - DeleteMeshRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.DeleteMeshRequest").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/network_services_pb.rb b/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/network_services_pb.rb deleted file mode 100644 index 83a16384a07d..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/network_services_pb.rb +++ /dev/null @@ -1,38 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/networkservices/v1/network_services.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/cloud/networkservices/v1/agent_gateway_pb' -require 'google/cloud/networkservices/v1/common_pb' -require 'google/cloud/networkservices/v1/endpoint_policy_pb' -require 'google/cloud/networkservices/v1/extensibility_pb' -require 'google/cloud/networkservices/v1/gateway_pb' -require 'google/cloud/networkservices/v1/grpc_route_pb' -require 'google/cloud/networkservices/v1/http_route_pb' -require 'google/cloud/networkservices/v1/mesh_pb' -require 'google/cloud/networkservices/v1/route_view_pb' -require 'google/cloud/networkservices/v1/service_binding_pb' -require 'google/cloud/networkservices/v1/service_lb_policy_pb' -require 'google/cloud/networkservices/v1/tcp_route_pb' -require 'google/cloud/networkservices/v1/tls_route_pb' -require 'google/longrunning/operations_pb' -require 'google/protobuf/empty_pb' - - -descriptor_data = "\n6google/cloud/networkservices/v1/network_services.proto\x12\x1fgoogle.cloud.networkservices.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x33google/cloud/networkservices/v1/agent_gateway.proto\x1a,google/cloud/networkservices/v1/common.proto\x1a\x35google/cloud/networkservices/v1/endpoint_policy.proto\x1a\x33google/cloud/networkservices/v1/extensibility.proto\x1a-google/cloud/networkservices/v1/gateway.proto\x1a\x30google/cloud/networkservices/v1/grpc_route.proto\x1a\x30google/cloud/networkservices/v1/http_route.proto\x1a*google/cloud/networkservices/v1/mesh.proto\x1a\x30google/cloud/networkservices/v1/route_view.proto\x1a\x35google/cloud/networkservices/v1/service_binding.proto\x1a\x37google/cloud/networkservices/v1/service_lb_policy.proto\x1a/google/cloud/networkservices/v1/tcp_route.proto\x1a/google/cloud/networkservices/v1/tls_route.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto2\xa7w\n\x0fNetworkServices\x12\xda\x01\n\x14ListEndpointPolicies\x12<.google.cloud.networkservices.v1.ListEndpointPoliciesRequest\x1a=.google.cloud.networkservices.v1.ListEndpointPoliciesResponse\"E\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x36\x12\x34/v1/{parent=projects/*/locations/*}/endpointPolicies\x12\xc4\x01\n\x11GetEndpointPolicy\x12\x39.google.cloud.networkservices.v1.GetEndpointPolicyRequest\x1a/.google.cloud.networkservices.v1.EndpointPolicy\"C\xda\x41\x04name\x82\xd3\xe4\x93\x02\x36\x12\x34/v1/{name=projects/*/locations/*/endpointPolicies/*}\x12\xb5\x02\n\x14\x43reateEndpointPolicy\x12<.google.cloud.networkservices.v1.CreateEndpointPolicyRequest\x1a\x1d.google.longrunning.Operation\"\xbf\x01\xca\x41\x43\n\x0e\x45ndpointPolicy\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41)parent,endpoint_policy,endpoint_policy_id\x82\xd3\xe4\x93\x02G\"4/v1/{parent=projects/*/locations/*}/endpointPolicies:\x0f\x65ndpoint_policy\x12\xb7\x02\n\x14UpdateEndpointPolicy\x12<.google.cloud.networkservices.v1.UpdateEndpointPolicyRequest\x1a\x1d.google.longrunning.Operation\"\xc1\x01\xca\x41\x43\n\x0e\x45ndpointPolicy\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x1b\x65ndpoint_policy,update_mask\x82\xd3\xe4\x93\x02W2D/v1/{endpoint_policy.name=projects/*/locations/*/endpointPolicies/*}:\x0f\x65ndpoint_policy\x12\x86\x02\n\x14\x44\x65leteEndpointPolicy\x12<.google.cloud.networkservices.v1.DeleteEndpointPolicyRequest\x1a\x1d.google.longrunning.Operation\"\x90\x01\xca\x41J\n\x15google.protobuf.Empty\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x36*4/v1/{name=projects/*/locations/*/endpointPolicies/*}\x12\xe6\x01\n\x16ListWasmPluginVersions\x12>.google.cloud.networkservices.v1.ListWasmPluginVersionsRequest\x1a?.google.cloud.networkservices.v1.ListWasmPluginVersionsResponse\"K\xda\x41\x06parent\x82\xd3\xe4\x93\x02<\x12:/v1/{parent=projects/*/locations/*/wasmPlugins/*}/versions\x12\xd3\x01\n\x14GetWasmPluginVersion\x12<.google.cloud.networkservices.v1.GetWasmPluginVersionRequest\x1a\x32.google.cloud.networkservices.v1.WasmPluginVersion\"I\xda\x41\x04name\x82\xd3\xe4\x93\x02<\x12:/v1/{name=projects/*/locations/*/wasmPlugins/*/versions/*}\x12\xd0\x02\n\x17\x43reateWasmPluginVersion\x12?.google.cloud.networkservices.v1.CreateWasmPluginVersionRequest\x1a\x1d.google.longrunning.Operation\"\xd4\x01\xca\x41\x46\n\x11WasmPluginVersion\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x31parent,wasm_plugin_version,wasm_plugin_version_id\x82\xd3\xe4\x93\x02Q\":/v1/{parent=projects/*/locations/*/wasmPlugins/*}/versions:\x13wasm_plugin_version\x12\x92\x02\n\x17\x44\x65leteWasmPluginVersion\x12?.google.cloud.networkservices.v1.DeleteWasmPluginVersionRequest\x1a\x1d.google.longrunning.Operation\"\x96\x01\xca\x41J\n\x15google.protobuf.Empty\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02<*:/v1/{name=projects/*/locations/*/wasmPlugins/*/versions/*}\x12\xc6\x01\n\x0fListWasmPlugins\x12\x37.google.cloud.networkservices.v1.ListWasmPluginsRequest\x1a\x38.google.cloud.networkservices.v1.ListWasmPluginsResponse\"@\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x31\x12//v1/{parent=projects/*/locations/*}/wasmPlugins\x12\xb3\x01\n\rGetWasmPlugin\x12\x35.google.cloud.networkservices.v1.GetWasmPluginRequest\x1a+.google.cloud.networkservices.v1.WasmPlugin\">\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31\x12//v1/{name=projects/*/locations/*/wasmPlugins/*}\x12\x98\x02\n\x10\x43reateWasmPlugin\x12\x38.google.cloud.networkservices.v1.CreateWasmPluginRequest\x1a\x1d.google.longrunning.Operation\"\xaa\x01\xca\x41?\n\nWasmPlugin\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41!parent,wasm_plugin,wasm_plugin_id\x82\xd3\xe4\x93\x02>\"//v1/{parent=projects/*/locations/*}/wasmPlugins:\x0bwasm_plugin\x12\x9a\x02\n\x10UpdateWasmPlugin\x12\x38.google.cloud.networkservices.v1.UpdateWasmPluginRequest\x1a\x1d.google.longrunning.Operation\"\xac\x01\xca\x41?\n\nWasmPlugin\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x17wasm_plugin,update_mask\x82\xd3\xe4\x93\x02J2;/v1/{wasm_plugin.name=projects/*/locations/*/wasmPlugins/*}:\x0bwasm_plugin\x12\xf9\x01\n\x10\x44\x65leteWasmPlugin\x12\x38.google.cloud.networkservices.v1.DeleteWasmPluginRequest\x1a\x1d.google.longrunning.Operation\"\x8b\x01\xca\x41J\n\x15google.protobuf.Empty\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31*//v1/{name=projects/*/locations/*/wasmPlugins/*}\x12\xba\x01\n\x0cListGateways\x12\x34.google.cloud.networkservices.v1.ListGatewaysRequest\x1a\x35.google.cloud.networkservices.v1.ListGatewaysResponse\"=\xda\x41\x06parent\x82\xd3\xe4\x93\x02.\x12,/v1/{parent=projects/*/locations/*}/gateways\x12\xa7\x01\n\nGetGateway\x12\x32.google.cloud.networkservices.v1.GetGatewayRequest\x1a(.google.cloud.networkservices.v1.Gateway\";\xda\x41\x04name\x82\xd3\xe4\x93\x02.\x12,/v1/{name=projects/*/locations/*/gateways/*}\x12\x80\x02\n\rCreateGateway\x12\x35.google.cloud.networkservices.v1.CreateGatewayRequest\x1a\x1d.google.longrunning.Operation\"\x98\x01\xca\x41<\n\x07Gateway\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x19parent,gateway,gateway_id\x82\xd3\xe4\x93\x02\x37\",/v1/{parent=projects/*/locations/*}/gateways:\x07gateway\x12\x82\x02\n\rUpdateGateway\x12\x35.google.cloud.networkservices.v1.UpdateGatewayRequest\x1a\x1d.google.longrunning.Operation\"\x9a\x01\xca\x41<\n\x07Gateway\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x13gateway,update_mask\x82\xd3\xe4\x93\x02?24/v1/{gateway.name=projects/*/locations/*/gateways/*}:\x07gateway\x12\xf0\x01\n\rDeleteGateway\x12\x35.google.cloud.networkservices.v1.DeleteGatewayRequest\x1a\x1d.google.longrunning.Operation\"\x88\x01\xca\x41J\n\x15google.protobuf.Empty\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02.*,/v1/{name=projects/*/locations/*/gateways/*}\x12\xc2\x01\n\x0eListGrpcRoutes\x12\x36.google.cloud.networkservices.v1.ListGrpcRoutesRequest\x1a\x37.google.cloud.networkservices.v1.ListGrpcRoutesResponse\"?\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x30\x12./v1/{parent=projects/*/locations/*}/grpcRoutes\x12\xaf\x01\n\x0cGetGrpcRoute\x12\x34.google.cloud.networkservices.v1.GetGrpcRouteRequest\x1a*.google.cloud.networkservices.v1.GrpcRoute\"=\xda\x41\x04name\x82\xd3\xe4\x93\x02\x30\x12./v1/{name=projects/*/locations/*/grpcRoutes/*}\x12\x91\x02\n\x0f\x43reateGrpcRoute\x12\x37.google.cloud.networkservices.v1.CreateGrpcRouteRequest\x1a\x1d.google.longrunning.Operation\"\xa5\x01\xca\x41>\n\tGrpcRoute\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x1fparent,grpc_route,grpc_route_id\x82\xd3\xe4\x93\x02<\"./v1/{parent=projects/*/locations/*}/grpcRoutes:\ngrpc_route\x12\x93\x02\n\x0fUpdateGrpcRoute\x12\x37.google.cloud.networkservices.v1.UpdateGrpcRouteRequest\x1a\x1d.google.longrunning.Operation\"\xa7\x01\xca\x41>\n\tGrpcRoute\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x16grpc_route,update_mask\x82\xd3\xe4\x93\x02G29/v1/{grpc_route.name=projects/*/locations/*/grpcRoutes/*}:\ngrpc_route\x12\xf6\x01\n\x0f\x44\x65leteGrpcRoute\x12\x37.google.cloud.networkservices.v1.DeleteGrpcRouteRequest\x1a\x1d.google.longrunning.Operation\"\x8a\x01\xca\x41J\n\x15google.protobuf.Empty\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x30*./v1/{name=projects/*/locations/*/grpcRoutes/*}\x12\xc2\x01\n\x0eListHttpRoutes\x12\x36.google.cloud.networkservices.v1.ListHttpRoutesRequest\x1a\x37.google.cloud.networkservices.v1.ListHttpRoutesResponse\"?\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x30\x12./v1/{parent=projects/*/locations/*}/httpRoutes\x12\xaf\x01\n\x0cGetHttpRoute\x12\x34.google.cloud.networkservices.v1.GetHttpRouteRequest\x1a*.google.cloud.networkservices.v1.HttpRoute\"=\xda\x41\x04name\x82\xd3\xe4\x93\x02\x30\x12./v1/{name=projects/*/locations/*/httpRoutes/*}\x12\x91\x02\n\x0f\x43reateHttpRoute\x12\x37.google.cloud.networkservices.v1.CreateHttpRouteRequest\x1a\x1d.google.longrunning.Operation\"\xa5\x01\xca\x41>\n\tHttpRoute\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x1fparent,http_route,http_route_id\x82\xd3\xe4\x93\x02<\"./v1/{parent=projects/*/locations/*}/httpRoutes:\nhttp_route\x12\x93\x02\n\x0fUpdateHttpRoute\x12\x37.google.cloud.networkservices.v1.UpdateHttpRouteRequest\x1a\x1d.google.longrunning.Operation\"\xa7\x01\xca\x41>\n\tHttpRoute\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x16http_route,update_mask\x82\xd3\xe4\x93\x02G29/v1/{http_route.name=projects/*/locations/*/httpRoutes/*}:\nhttp_route\x12\xf6\x01\n\x0f\x44\x65leteHttpRoute\x12\x37.google.cloud.networkservices.v1.DeleteHttpRouteRequest\x1a\x1d.google.longrunning.Operation\"\x8a\x01\xca\x41J\n\x15google.protobuf.Empty\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x30*./v1/{name=projects/*/locations/*/httpRoutes/*}\x12\xbe\x01\n\rListTcpRoutes\x12\x35.google.cloud.networkservices.v1.ListTcpRoutesRequest\x1a\x36.google.cloud.networkservices.v1.ListTcpRoutesResponse\">\xda\x41\x06parent\x82\xd3\xe4\x93\x02/\x12-/v1/{parent=projects/*/locations/*}/tcpRoutes\x12\xab\x01\n\x0bGetTcpRoute\x12\x33.google.cloud.networkservices.v1.GetTcpRouteRequest\x1a).google.cloud.networkservices.v1.TcpRoute\"<\xda\x41\x04name\x82\xd3\xe4\x93\x02/\x12-/v1/{name=projects/*/locations/*/tcpRoutes/*}\x12\x8a\x02\n\x0e\x43reateTcpRoute\x12\x36.google.cloud.networkservices.v1.CreateTcpRouteRequest\x1a\x1d.google.longrunning.Operation\"\xa0\x01\xca\x41=\n\x08TcpRoute\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x1dparent,tcp_route,tcp_route_id\x82\xd3\xe4\x93\x02:\"-/v1/{parent=projects/*/locations/*}/tcpRoutes:\ttcp_route\x12\x8c\x02\n\x0eUpdateTcpRoute\x12\x36.google.cloud.networkservices.v1.UpdateTcpRouteRequest\x1a\x1d.google.longrunning.Operation\"\xa2\x01\xca\x41=\n\x08TcpRoute\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x15tcp_route,update_mask\x82\xd3\xe4\x93\x02\x44\x32\x37/v1/{tcp_route.name=projects/*/locations/*/tcpRoutes/*}:\ttcp_route\x12\xf3\x01\n\x0e\x44\x65leteTcpRoute\x12\x36.google.cloud.networkservices.v1.DeleteTcpRouteRequest\x1a\x1d.google.longrunning.Operation\"\x89\x01\xca\x41J\n\x15google.protobuf.Empty\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02/*-/v1/{name=projects/*/locations/*/tcpRoutes/*}\x12\xbe\x01\n\rListTlsRoutes\x12\x35.google.cloud.networkservices.v1.ListTlsRoutesRequest\x1a\x36.google.cloud.networkservices.v1.ListTlsRoutesResponse\">\xda\x41\x06parent\x82\xd3\xe4\x93\x02/\x12-/v1/{parent=projects/*/locations/*}/tlsRoutes\x12\xab\x01\n\x0bGetTlsRoute\x12\x33.google.cloud.networkservices.v1.GetTlsRouteRequest\x1a).google.cloud.networkservices.v1.TlsRoute\"<\xda\x41\x04name\x82\xd3\xe4\x93\x02/\x12-/v1/{name=projects/*/locations/*/tlsRoutes/*}\x12\x8a\x02\n\x0e\x43reateTlsRoute\x12\x36.google.cloud.networkservices.v1.CreateTlsRouteRequest\x1a\x1d.google.longrunning.Operation\"\xa0\x01\xca\x41=\n\x08TlsRoute\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x1dparent,tls_route,tls_route_id\x82\xd3\xe4\x93\x02:\"-/v1/{parent=projects/*/locations/*}/tlsRoutes:\ttls_route\x12\x8c\x02\n\x0eUpdateTlsRoute\x12\x36.google.cloud.networkservices.v1.UpdateTlsRouteRequest\x1a\x1d.google.longrunning.Operation\"\xa2\x01\xca\x41=\n\x08TlsRoute\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x15tls_route,update_mask\x82\xd3\xe4\x93\x02\x44\x32\x37/v1/{tls_route.name=projects/*/locations/*/tlsRoutes/*}:\ttls_route\x12\xf3\x01\n\x0e\x44\x65leteTlsRoute\x12\x36.google.cloud.networkservices.v1.DeleteTlsRouteRequest\x1a\x1d.google.longrunning.Operation\"\x89\x01\xca\x41J\n\x15google.protobuf.Empty\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02/*-/v1/{name=projects/*/locations/*/tlsRoutes/*}\x12\xd6\x01\n\x13ListServiceBindings\x12;.google.cloud.networkservices.v1.ListServiceBindingsRequest\x1a<.google.cloud.networkservices.v1.ListServiceBindingsResponse\"D\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x35\x12\x33/v1/{parent=projects/*/locations/*}/serviceBindings\x12\xc3\x01\n\x11GetServiceBinding\x12\x39.google.cloud.networkservices.v1.GetServiceBindingRequest\x1a/.google.cloud.networkservices.v1.ServiceBinding\"B\xda\x41\x04name\x82\xd3\xe4\x93\x02\x35\x12\x33/v1/{name=projects/*/locations/*/serviceBindings/*}\x12\xb4\x02\n\x14\x43reateServiceBinding\x12<.google.cloud.networkservices.v1.CreateServiceBindingRequest\x1a\x1d.google.longrunning.Operation\"\xbe\x01\xca\x41\x43\n\x0eServiceBinding\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41)parent,service_binding,service_binding_id\x82\xd3\xe4\x93\x02\x46\"3/v1/{parent=projects/*/locations/*}/serviceBindings:\x0fservice_binding\x12\xb6\x02\n\x14UpdateServiceBinding\x12<.google.cloud.networkservices.v1.UpdateServiceBindingRequest\x1a\x1d.google.longrunning.Operation\"\xc0\x01\xca\x41\x43\n\x0eServiceBinding\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x1bservice_binding,update_mask\x82\xd3\xe4\x93\x02V2C/v1/{service_binding.name=projects/*/locations/*/serviceBindings/*}:\x0fservice_binding\x12\x85\x02\n\x14\x44\x65leteServiceBinding\x12<.google.cloud.networkservices.v1.DeleteServiceBindingRequest\x1a\x1d.google.longrunning.Operation\"\x8f\x01\xca\x41J\n\x15google.protobuf.Empty\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x35*3/v1/{name=projects/*/locations/*/serviceBindings/*}\x12\xb2\x01\n\nListMeshes\x12\x32.google.cloud.networkservices.v1.ListMeshesRequest\x1a\x33.google.cloud.networkservices.v1.ListMeshesResponse\";\xda\x41\x06parent\x82\xd3\xe4\x93\x02,\x12*/v1/{parent=projects/*/locations/*}/meshes\x12\x9c\x01\n\x07GetMesh\x12/.google.cloud.networkservices.v1.GetMeshRequest\x1a%.google.cloud.networkservices.v1.Mesh\"9\xda\x41\x04name\x82\xd3\xe4\x93\x02,\x12*/v1/{name=projects/*/locations/*/meshes/*}\x12\xec\x01\n\nCreateMesh\x12\x32.google.cloud.networkservices.v1.CreateMeshRequest\x1a\x1d.google.longrunning.Operation\"\x8a\x01\xca\x41\x39\n\x04Mesh\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x13parent,mesh,mesh_id\x82\xd3\xe4\x93\x02\x32\"*/v1/{parent=projects/*/locations/*}/meshes:\x04mesh\x12\xee\x01\n\nUpdateMesh\x12\x32.google.cloud.networkservices.v1.UpdateMeshRequest\x1a\x1d.google.longrunning.Operation\"\x8c\x01\xca\x41\x39\n\x04Mesh\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x10mesh,update_mask\x82\xd3\xe4\x93\x02\x37\x32//v1/{mesh.name=projects/*/locations/*/meshes/*}:\x04mesh\x12\xe8\x01\n\nDeleteMesh\x12\x32.google.cloud.networkservices.v1.DeleteMeshRequest\x1a\x1d.google.longrunning.Operation\"\x86\x01\xca\x41J\n\x15google.protobuf.Empty\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02,**/v1/{name=projects/*/locations/*/meshes/*}\x12\xde\x01\n\x15ListServiceLbPolicies\x12=.google.cloud.networkservices.v1.ListServiceLbPoliciesRequest\x1a>.google.cloud.networkservices.v1.ListServiceLbPoliciesResponse\"F\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x37\x12\x35/v1/{parent=projects/*/locations/*}/serviceLbPolicies\x12\xc8\x01\n\x12GetServiceLbPolicy\x12:.google.cloud.networkservices.v1.GetServiceLbPolicyRequest\x1a\x30.google.cloud.networkservices.v1.ServiceLbPolicy\"D\xda\x41\x04name\x82\xd3\xe4\x93\x02\x37\x12\x35/v1/{name=projects/*/locations/*/serviceLbPolicies/*}\x12\xbf\x02\n\x15\x43reateServiceLbPolicy\x12=.google.cloud.networkservices.v1.CreateServiceLbPolicyRequest\x1a\x1d.google.longrunning.Operation\"\xc7\x01\xca\x41\x44\n\x0fServiceLbPolicy\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41-parent,service_lb_policy,service_lb_policy_id\x82\xd3\xe4\x93\x02J\"5/v1/{parent=projects/*/locations/*}/serviceLbPolicies:\x11service_lb_policy\x12\xc1\x02\n\x15UpdateServiceLbPolicy\x12=.google.cloud.networkservices.v1.UpdateServiceLbPolicyRequest\x1a\x1d.google.longrunning.Operation\"\xc9\x01\xca\x41\x44\n\x0fServiceLbPolicy\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x1dservice_lb_policy,update_mask\x82\xd3\xe4\x93\x02\\2G/v1/{service_lb_policy.name=projects/*/locations/*/serviceLbPolicies/*}:\x11service_lb_policy\x12\x89\x02\n\x15\x44\x65leteServiceLbPolicy\x12=.google.cloud.networkservices.v1.DeleteServiceLbPolicyRequest\x1a\x1d.google.longrunning.Operation\"\x91\x01\xca\x41J\n\x15google.protobuf.Empty\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x37*5/v1/{name=projects/*/locations/*/serviceLbPolicies/*}\x12\xcf\x01\n\x13GetGatewayRouteView\x12;.google.cloud.networkservices.v1.GetGatewayRouteViewRequest\x1a\x31.google.cloud.networkservices.v1.GatewayRouteView\"H\xda\x41\x04name\x82\xd3\xe4\x93\x02;\x12\x39/v1/{name=projects/*/locations/*/gateways/*/routeViews/*}\x12\xc4\x01\n\x10GetMeshRouteView\x12\x38.google.cloud.networkservices.v1.GetMeshRouteViewRequest\x1a..google.cloud.networkservices.v1.MeshRouteView\"F\xda\x41\x04name\x82\xd3\xe4\x93\x02\x39\x12\x37/v1/{name=projects/*/locations/*/meshes/*/routeViews/*}\x12\xe2\x01\n\x15ListGatewayRouteViews\x12=.google.cloud.networkservices.v1.ListGatewayRouteViewsRequest\x1a>.google.cloud.networkservices.v1.ListGatewayRouteViewsResponse\"J\xda\x41\x06parent\x82\xd3\xe4\x93\x02;\x12\x39/v1/{parent=projects/*/locations/*/gateways/*}/routeViews\x12\xd7\x01\n\x12ListMeshRouteViews\x12:.google.cloud.networkservices.v1.ListMeshRouteViewsRequest\x1a;.google.cloud.networkservices.v1.ListMeshRouteViewsResponse\"H\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x39\x12\x37/v1/{parent=projects/*/locations/*/meshes/*}/routeViews\x12\xce\x01\n\x11ListAgentGateways\x12\x39.google.cloud.networkservices.v1.ListAgentGatewaysRequest\x1a:.google.cloud.networkservices.v1.ListAgentGatewaysResponse\"B\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x33\x12\x31/v1/{parent=projects/*/locations/*}/agentGateways\x12\xbb\x01\n\x0fGetAgentGateway\x12\x37.google.cloud.networkservices.v1.GetAgentGatewayRequest\x1a-.google.cloud.networkservices.v1.AgentGateway\"@\xda\x41\x04name\x82\xd3\xe4\x93\x02\x33\x12\x31/v1/{name=projects/*/locations/*/agentGateways/*}\x12\xa6\x02\n\x12\x43reateAgentGateway\x12:.google.cloud.networkservices.v1.CreateAgentGatewayRequest\x1a\x1d.google.longrunning.Operation\"\xb4\x01\xca\x41\x41\n\x0c\x41gentGateway\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41%parent,agent_gateway,agent_gateway_id\x82\xd3\xe4\x93\x02\x42\"1/v1/{parent=projects/*/locations/*}/agentGateways:\ragent_gateway\x12\xa8\x02\n\x12UpdateAgentGateway\x12:.google.cloud.networkservices.v1.UpdateAgentGatewayRequest\x1a\x1d.google.longrunning.Operation\"\xb6\x01\xca\x41\x41\n\x0c\x41gentGateway\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x19\x61gent_gateway,update_mask\x82\xd3\xe4\x93\x02P2?/v1/{agent_gateway.name=projects/*/locations/*/agentGateways/*}:\ragent_gateway\x12\xff\x01\n\x12\x44\x65leteAgentGateway\x12:.google.cloud.networkservices.v1.DeleteAgentGatewayRequest\x1a\x1d.google.longrunning.Operation\"\x8d\x01\xca\x41J\n\x15google.protobuf.Empty\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x33*1/v1/{name=projects/*/locations/*/agentGateways/*}\x1aR\xca\x41\x1enetworkservices.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xdf\x01\n#com.google.cloud.networkservices.v1P\x01ZMcloud.google.com/go/networkservices/apiv1/networkservicespb;networkservicespb\xaa\x02\x1fGoogle.Cloud.NetworkServices.V1\xca\x02\x1fGoogle\\Cloud\\NetworkServices\\V1\xea\x02\"Google::Cloud::NetworkServices::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module NetworkServices - module V1 - end - end - end -end diff --git a/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/network_services_services_pb.rb b/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/network_services_services_pb.rb deleted file mode 100644 index 5b97cc3d7a24..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/network_services_services_pb.rb +++ /dev/null @@ -1,173 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/cloud/networkservices/v1/network_services.proto for package 'Google.Cloud.NetworkServices.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/networkservices/v1/network_services_pb' - -module Google - module Cloud - module NetworkServices - module V1 - module NetworkServices - # Service describing handlers for resources. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.cloud.networkservices.v1.NetworkServices' - - # Lists EndpointPolicies in a given project and location. - rpc :ListEndpointPolicies, ::Google::Cloud::NetworkServices::V1::ListEndpointPoliciesRequest, ::Google::Cloud::NetworkServices::V1::ListEndpointPoliciesResponse - # Gets details of a single EndpointPolicy. - rpc :GetEndpointPolicy, ::Google::Cloud::NetworkServices::V1::GetEndpointPolicyRequest, ::Google::Cloud::NetworkServices::V1::EndpointPolicy - # Creates a new EndpointPolicy in a given project and location. - rpc :CreateEndpointPolicy, ::Google::Cloud::NetworkServices::V1::CreateEndpointPolicyRequest, ::Google::Longrunning::Operation - # Updates the parameters of a single EndpointPolicy. - rpc :UpdateEndpointPolicy, ::Google::Cloud::NetworkServices::V1::UpdateEndpointPolicyRequest, ::Google::Longrunning::Operation - # Deletes a single EndpointPolicy. - rpc :DeleteEndpointPolicy, ::Google::Cloud::NetworkServices::V1::DeleteEndpointPolicyRequest, ::Google::Longrunning::Operation - # Lists `WasmPluginVersion` resources in a given project and - # location. - rpc :ListWasmPluginVersions, ::Google::Cloud::NetworkServices::V1::ListWasmPluginVersionsRequest, ::Google::Cloud::NetworkServices::V1::ListWasmPluginVersionsResponse - # Gets details of the specified `WasmPluginVersion` resource. - rpc :GetWasmPluginVersion, ::Google::Cloud::NetworkServices::V1::GetWasmPluginVersionRequest, ::Google::Cloud::NetworkServices::V1::WasmPluginVersion - # Creates a new `WasmPluginVersion` resource in a given project - # and location. - rpc :CreateWasmPluginVersion, ::Google::Cloud::NetworkServices::V1::CreateWasmPluginVersionRequest, ::Google::Longrunning::Operation - # Deletes the specified `WasmPluginVersion` resource. - rpc :DeleteWasmPluginVersion, ::Google::Cloud::NetworkServices::V1::DeleteWasmPluginVersionRequest, ::Google::Longrunning::Operation - # Lists `WasmPlugin` resources in a given project and - # location. - rpc :ListWasmPlugins, ::Google::Cloud::NetworkServices::V1::ListWasmPluginsRequest, ::Google::Cloud::NetworkServices::V1::ListWasmPluginsResponse - # Gets details of the specified `WasmPlugin` resource. - rpc :GetWasmPlugin, ::Google::Cloud::NetworkServices::V1::GetWasmPluginRequest, ::Google::Cloud::NetworkServices::V1::WasmPlugin - # Creates a new `WasmPlugin` resource in a given project - # and location. - rpc :CreateWasmPlugin, ::Google::Cloud::NetworkServices::V1::CreateWasmPluginRequest, ::Google::Longrunning::Operation - # Updates the parameters of the specified `WasmPlugin` resource. - rpc :UpdateWasmPlugin, ::Google::Cloud::NetworkServices::V1::UpdateWasmPluginRequest, ::Google::Longrunning::Operation - # Deletes the specified `WasmPlugin` resource. - rpc :DeleteWasmPlugin, ::Google::Cloud::NetworkServices::V1::DeleteWasmPluginRequest, ::Google::Longrunning::Operation - # Lists Gateways in a given project and location. - rpc :ListGateways, ::Google::Cloud::NetworkServices::V1::ListGatewaysRequest, ::Google::Cloud::NetworkServices::V1::ListGatewaysResponse - # Gets details of a single Gateway. - rpc :GetGateway, ::Google::Cloud::NetworkServices::V1::GetGatewayRequest, ::Google::Cloud::NetworkServices::V1::Gateway - # Creates a new Gateway in a given project and location. - rpc :CreateGateway, ::Google::Cloud::NetworkServices::V1::CreateGatewayRequest, ::Google::Longrunning::Operation - # Updates the parameters of a single Gateway. - rpc :UpdateGateway, ::Google::Cloud::NetworkServices::V1::UpdateGatewayRequest, ::Google::Longrunning::Operation - # Deletes a single Gateway. - rpc :DeleteGateway, ::Google::Cloud::NetworkServices::V1::DeleteGatewayRequest, ::Google::Longrunning::Operation - # Lists GrpcRoutes in a given project and location. - rpc :ListGrpcRoutes, ::Google::Cloud::NetworkServices::V1::ListGrpcRoutesRequest, ::Google::Cloud::NetworkServices::V1::ListGrpcRoutesResponse - # Gets details of a single GrpcRoute. - rpc :GetGrpcRoute, ::Google::Cloud::NetworkServices::V1::GetGrpcRouteRequest, ::Google::Cloud::NetworkServices::V1::GrpcRoute - # Creates a new GrpcRoute in a given project and location. - rpc :CreateGrpcRoute, ::Google::Cloud::NetworkServices::V1::CreateGrpcRouteRequest, ::Google::Longrunning::Operation - # Updates the parameters of a single GrpcRoute. - rpc :UpdateGrpcRoute, ::Google::Cloud::NetworkServices::V1::UpdateGrpcRouteRequest, ::Google::Longrunning::Operation - # Deletes a single GrpcRoute. - rpc :DeleteGrpcRoute, ::Google::Cloud::NetworkServices::V1::DeleteGrpcRouteRequest, ::Google::Longrunning::Operation - # Lists HttpRoute in a given project and location. - rpc :ListHttpRoutes, ::Google::Cloud::NetworkServices::V1::ListHttpRoutesRequest, ::Google::Cloud::NetworkServices::V1::ListHttpRoutesResponse - # Gets details of a single HttpRoute. - rpc :GetHttpRoute, ::Google::Cloud::NetworkServices::V1::GetHttpRouteRequest, ::Google::Cloud::NetworkServices::V1::HttpRoute - # Creates a new HttpRoute in a given project and location. - rpc :CreateHttpRoute, ::Google::Cloud::NetworkServices::V1::CreateHttpRouteRequest, ::Google::Longrunning::Operation - # Updates the parameters of a single HttpRoute. - rpc :UpdateHttpRoute, ::Google::Cloud::NetworkServices::V1::UpdateHttpRouteRequest, ::Google::Longrunning::Operation - # Deletes a single HttpRoute. - rpc :DeleteHttpRoute, ::Google::Cloud::NetworkServices::V1::DeleteHttpRouteRequest, ::Google::Longrunning::Operation - # Lists TcpRoute in a given project and location. - rpc :ListTcpRoutes, ::Google::Cloud::NetworkServices::V1::ListTcpRoutesRequest, ::Google::Cloud::NetworkServices::V1::ListTcpRoutesResponse - # Gets details of a single TcpRoute. - rpc :GetTcpRoute, ::Google::Cloud::NetworkServices::V1::GetTcpRouteRequest, ::Google::Cloud::NetworkServices::V1::TcpRoute - # Creates a new TcpRoute in a given project and location. - rpc :CreateTcpRoute, ::Google::Cloud::NetworkServices::V1::CreateTcpRouteRequest, ::Google::Longrunning::Operation - # Updates the parameters of a single TcpRoute. - rpc :UpdateTcpRoute, ::Google::Cloud::NetworkServices::V1::UpdateTcpRouteRequest, ::Google::Longrunning::Operation - # Deletes a single TcpRoute. - rpc :DeleteTcpRoute, ::Google::Cloud::NetworkServices::V1::DeleteTcpRouteRequest, ::Google::Longrunning::Operation - # Lists TlsRoute in a given project and location. - rpc :ListTlsRoutes, ::Google::Cloud::NetworkServices::V1::ListTlsRoutesRequest, ::Google::Cloud::NetworkServices::V1::ListTlsRoutesResponse - # Gets details of a single TlsRoute. - rpc :GetTlsRoute, ::Google::Cloud::NetworkServices::V1::GetTlsRouteRequest, ::Google::Cloud::NetworkServices::V1::TlsRoute - # Creates a new TlsRoute in a given project and location. - rpc :CreateTlsRoute, ::Google::Cloud::NetworkServices::V1::CreateTlsRouteRequest, ::Google::Longrunning::Operation - # Updates the parameters of a single TlsRoute. - rpc :UpdateTlsRoute, ::Google::Cloud::NetworkServices::V1::UpdateTlsRouteRequest, ::Google::Longrunning::Operation - # Deletes a single TlsRoute. - rpc :DeleteTlsRoute, ::Google::Cloud::NetworkServices::V1::DeleteTlsRouteRequest, ::Google::Longrunning::Operation - # Lists ServiceBinding in a given project and location. - rpc :ListServiceBindings, ::Google::Cloud::NetworkServices::V1::ListServiceBindingsRequest, ::Google::Cloud::NetworkServices::V1::ListServiceBindingsResponse - # Gets details of a single ServiceBinding. - rpc :GetServiceBinding, ::Google::Cloud::NetworkServices::V1::GetServiceBindingRequest, ::Google::Cloud::NetworkServices::V1::ServiceBinding - # Creates a new ServiceBinding in a given project and location. - rpc :CreateServiceBinding, ::Google::Cloud::NetworkServices::V1::CreateServiceBindingRequest, ::Google::Longrunning::Operation - # Updates the parameters of a single ServiceBinding. - rpc :UpdateServiceBinding, ::Google::Cloud::NetworkServices::V1::UpdateServiceBindingRequest, ::Google::Longrunning::Operation - # Deletes a single ServiceBinding. - rpc :DeleteServiceBinding, ::Google::Cloud::NetworkServices::V1::DeleteServiceBindingRequest, ::Google::Longrunning::Operation - # Lists Meshes in a given project and location. - rpc :ListMeshes, ::Google::Cloud::NetworkServices::V1::ListMeshesRequest, ::Google::Cloud::NetworkServices::V1::ListMeshesResponse - # Gets details of a single Mesh. - rpc :GetMesh, ::Google::Cloud::NetworkServices::V1::GetMeshRequest, ::Google::Cloud::NetworkServices::V1::Mesh - # Creates a new Mesh in a given project and location. - rpc :CreateMesh, ::Google::Cloud::NetworkServices::V1::CreateMeshRequest, ::Google::Longrunning::Operation - # Updates the parameters of a single Mesh. - rpc :UpdateMesh, ::Google::Cloud::NetworkServices::V1::UpdateMeshRequest, ::Google::Longrunning::Operation - # Deletes a single Mesh. - rpc :DeleteMesh, ::Google::Cloud::NetworkServices::V1::DeleteMeshRequest, ::Google::Longrunning::Operation - # Lists ServiceLbPolicies in a given project and location. - rpc :ListServiceLbPolicies, ::Google::Cloud::NetworkServices::V1::ListServiceLbPoliciesRequest, ::Google::Cloud::NetworkServices::V1::ListServiceLbPoliciesResponse - # Gets details of a single ServiceLbPolicy. - rpc :GetServiceLbPolicy, ::Google::Cloud::NetworkServices::V1::GetServiceLbPolicyRequest, ::Google::Cloud::NetworkServices::V1::ServiceLbPolicy - # Creates a new ServiceLbPolicy in a given project and location. - rpc :CreateServiceLbPolicy, ::Google::Cloud::NetworkServices::V1::CreateServiceLbPolicyRequest, ::Google::Longrunning::Operation - # Updates the parameters of a single ServiceLbPolicy. - rpc :UpdateServiceLbPolicy, ::Google::Cloud::NetworkServices::V1::UpdateServiceLbPolicyRequest, ::Google::Longrunning::Operation - # Deletes a single ServiceLbPolicy. - rpc :DeleteServiceLbPolicy, ::Google::Cloud::NetworkServices::V1::DeleteServiceLbPolicyRequest, ::Google::Longrunning::Operation - # Get a single RouteView of a Gateway. - rpc :GetGatewayRouteView, ::Google::Cloud::NetworkServices::V1::GetGatewayRouteViewRequest, ::Google::Cloud::NetworkServices::V1::GatewayRouteView - # Get a single RouteView of a Mesh. - rpc :GetMeshRouteView, ::Google::Cloud::NetworkServices::V1::GetMeshRouteViewRequest, ::Google::Cloud::NetworkServices::V1::MeshRouteView - # Lists RouteViews - rpc :ListGatewayRouteViews, ::Google::Cloud::NetworkServices::V1::ListGatewayRouteViewsRequest, ::Google::Cloud::NetworkServices::V1::ListGatewayRouteViewsResponse - # Lists RouteViews - rpc :ListMeshRouteViews, ::Google::Cloud::NetworkServices::V1::ListMeshRouteViewsRequest, ::Google::Cloud::NetworkServices::V1::ListMeshRouteViewsResponse - # Lists AgentGateways in a given project and location. - rpc :ListAgentGateways, ::Google::Cloud::NetworkServices::V1::ListAgentGatewaysRequest, ::Google::Cloud::NetworkServices::V1::ListAgentGatewaysResponse - # Gets details of a single AgentGateway. - rpc :GetAgentGateway, ::Google::Cloud::NetworkServices::V1::GetAgentGatewayRequest, ::Google::Cloud::NetworkServices::V1::AgentGateway - # Creates a new AgentGateway in a given project and location. - rpc :CreateAgentGateway, ::Google::Cloud::NetworkServices::V1::CreateAgentGatewayRequest, ::Google::Longrunning::Operation - # Updates the parameters of a single AgentGateway. - rpc :UpdateAgentGateway, ::Google::Cloud::NetworkServices::V1::UpdateAgentGatewayRequest, ::Google::Longrunning::Operation - # Deletes a single AgentGateway. - rpc :DeleteAgentGateway, ::Google::Cloud::NetworkServices::V1::DeleteAgentGatewayRequest, ::Google::Longrunning::Operation - end - - Stub = Service.rpc_stub_class - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/route_view_pb.rb b/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/route_view_pb.rb deleted file mode 100644 index 24479529c303..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/route_view_pb.rb +++ /dev/null @@ -1,31 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/networkservices/v1/route_view.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' - - -descriptor_data = "\n0google/cloud/networkservices/v1/route_view.proto\x12\x1fgoogle.cloud.networkservices.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xc9\x02\n\x10GatewayRouteView\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x03\xe0\x41\x08\x12!\n\x14route_project_number\x18\x02 \x01(\x03\x42\x03\xe0\x41\x03\x12\x1b\n\x0eroute_location\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x17\n\nroute_type\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\x15\n\x08route_id\x18\x05 \x01(\tB\x03\xe0\x41\x03:\xae\x01\xea\x41\xaa\x01\n/networkservices.googleapis.com/GatewayRouteView\x12Rprojects/{project}/locations/{location}/gateways/{gateway}/routeViews/{route_view}*\x11gatewayRouteViews2\x10gatewayRouteView\"\xb8\x02\n\rMeshRouteView\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x03\xe0\x41\x08\x12!\n\x14route_project_number\x18\x02 \x01(\x03\x42\x03\xe0\x41\x03\x12\x1b\n\x0eroute_location\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x17\n\nroute_type\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\x15\n\x08route_id\x18\x05 \x01(\tB\x03\xe0\x41\x03:\xa0\x01\xea\x41\x9c\x01\n,networkservices.googleapis.com/MeshRouteView\x12Mprojects/{project}/locations/{location}/meshes/{mesh}/routeViews/{route_view}*\x0emeshRouteViews2\rmeshRouteView\"c\n\x1aGetGatewayRouteViewRequest\x12\x45\n\x04name\x18\x01 \x01(\tB7\xe0\x41\x02\xfa\x41\x31\n/networkservices.googleapis.com/GatewayRouteView\"]\n\x17GetMeshRouteViewRequest\x12\x42\n\x04name\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\n,networkservices.googleapis.com/MeshRouteView\"\x8e\x01\n\x1cListGatewayRouteViewsRequest\x12G\n\x06parent\x18\x01 \x01(\tB7\xe0\x41\x02\xfa\x41\x31\x12/networkservices.googleapis.com/GatewayRouteView\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"\x88\x01\n\x19ListMeshRouteViewsRequest\x12\x44\n\x06parent\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\x12,networkservices.googleapis.com/MeshRouteView\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"\x9d\x01\n\x1dListGatewayRouteViewsResponse\x12N\n\x13gateway_route_views\x18\x01 \x03(\x0b\x32\x31.google.cloud.networkservices.v1.GatewayRouteView\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"\x94\x01\n\x1aListMeshRouteViewsResponse\x12H\n\x10mesh_route_views\x18\x01 \x03(\x0b\x32..google.cloud.networkservices.v1.MeshRouteView\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\tB\xef\x01\n#com.google.cloud.networkservices.v1B\x0eRouteViewProtoP\x01ZMcloud.google.com/go/networkservices/apiv1/networkservicespb;networkservicespb\xaa\x02\x1fGoogle.Cloud.NetworkServices.V1\xca\x02\x1fGoogle\\Cloud\\NetworkServices\\V1\xea\x02\"Google::Cloud::NetworkServices::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module NetworkServices - module V1 - GatewayRouteView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.GatewayRouteView").msgclass - MeshRouteView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.MeshRouteView").msgclass - GetGatewayRouteViewRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.GetGatewayRouteViewRequest").msgclass - GetMeshRouteViewRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.GetMeshRouteViewRequest").msgclass - ListGatewayRouteViewsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.ListGatewayRouteViewsRequest").msgclass - ListMeshRouteViewsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.ListMeshRouteViewsRequest").msgclass - ListGatewayRouteViewsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.ListGatewayRouteViewsResponse").msgclass - ListMeshRouteViewsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.ListMeshRouteViewsResponse").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/service_binding_pb.rb b/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/service_binding_pb.rb deleted file mode 100644 index ee63ef59e8ca..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/service_binding_pb.rb +++ /dev/null @@ -1,33 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/networkservices/v1/service_binding.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/field_info_pb' -require 'google/api/resource_pb' -require 'google/protobuf/field_mask_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n5google/cloud/networkservices/v1/service_binding.proto\x12\x1fgoogle.cloud.networkservices.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1bgoogle/api/field_info.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x88\x04\n\x0eServiceBinding\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x18\n\x0b\x64\x65scription\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x34\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x42\n\x07service\x18\x05 \x01(\tB1\x18\x01\xe0\x41\x01\xfa\x41)\n\'servicedirectory.googleapis.com/Service\x12\x19\n\nservice_id\x18\x08 \x01(\tB\x05\x18\x01\xe0\x41\x03\x12P\n\x06labels\x18\x07 \x03(\x0b\x32;.google.cloud.networkservices.v1.ServiceBinding.LabelsEntryB\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:}\xea\x41z\n-networkservices.googleapis.com/ServiceBinding\x12Iprojects/{project}/locations/{location}/serviceBindings/{service_binding}\"\x8a\x01\n\x1aListServiceBindingsRequest\x12\x45\n\x06parent\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\x12-networkservices.googleapis.com/ServiceBinding\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"\x96\x01\n\x1bListServiceBindingsResponse\x12I\n\x10service_bindings\x18\x01 \x03(\x0b\x32/.google.cloud.networkservices.v1.ServiceBinding\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"_\n\x18GetServiceBindingRequest\x12\x43\n\x04name\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-networkservices.googleapis.com/ServiceBinding\"\xd4\x01\n\x1b\x43reateServiceBindingRequest\x12\x45\n\x06parent\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\x12-networkservices.googleapis.com/ServiceBinding\x12\x1f\n\x12service_binding_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12M\n\x0fservice_binding\x18\x03 \x01(\x0b\x32/.google.cloud.networkservices.v1.ServiceBindingB\x03\xe0\x41\x02\"\xa2\x01\n\x1bUpdateServiceBindingRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x12M\n\x0fservice_binding\x18\x02 \x01(\x0b\x32/.google.cloud.networkservices.v1.ServiceBindingB\x03\xe0\x41\x02\"b\n\x1b\x44\x65leteServiceBindingRequest\x12\x43\n\x04name\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-networkservices.googleapis.com/ServiceBindingB\xf3\x02\n#com.google.cloud.networkservices.v1B\x13ServiceBindingProtoP\x01ZMcloud.google.com/go/networkservices/apiv1/networkservicespb;networkservicespb\xaa\x02\x1fGoogle.Cloud.NetworkServices.V1\xca\x02\x1fGoogle\\Cloud\\NetworkServices\\V1\xea\x02\"Google::Cloud::NetworkServices::V1\xea\x41|\n\'servicedirectory.googleapis.com/Service\x12Qprojects/{project}/locations/{location}/namespaces/{namespace}/services/{service}b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module NetworkServices - module V1 - ServiceBinding = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.ServiceBinding").msgclass - ListServiceBindingsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.ListServiceBindingsRequest").msgclass - ListServiceBindingsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.ListServiceBindingsResponse").msgclass - GetServiceBindingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.GetServiceBindingRequest").msgclass - CreateServiceBindingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.CreateServiceBindingRequest").msgclass - UpdateServiceBindingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.UpdateServiceBindingRequest").msgclass - DeleteServiceBindingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.DeleteServiceBindingRequest").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/service_lb_policy_pb.rb b/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/service_lb_policy_pb.rb deleted file mode 100644 index c49e46670265..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/service_lb_policy_pb.rb +++ /dev/null @@ -1,38 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/networkservices/v1/service_lb_policy.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/field_mask_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n7google/cloud/networkservices/v1/service_lb_policy.proto\x12\x1fgoogle.cloud.networkservices.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xba\x0b\n\x0fServiceLbPolicy\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12Q\n\x06labels\x18\x04 \x03(\x0b\x32<.google.cloud.networkservices.v1.ServiceLbPolicy.LabelsEntryB\x03\xe0\x41\x01\x12\x18\n\x0b\x64\x65scription\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12n\n\x18load_balancing_algorithm\x18\x06 \x01(\x0e\x32G.google.cloud.networkservices.v1.ServiceLbPolicy.LoadBalancingAlgorithmB\x03\xe0\x41\x01\x12\x64\n\x13\x61uto_capacity_drain\x18\x08 \x01(\x0b\x32\x42.google.cloud.networkservices.v1.ServiceLbPolicy.AutoCapacityDrainB\x03\xe0\x41\x01\x12]\n\x0f\x66\x61ilover_config\x18\n \x01(\x0b\x32?.google.cloud.networkservices.v1.ServiceLbPolicy.FailoverConfigB\x03\xe0\x41\x01\x12_\n\x10isolation_config\x18\x0b \x01(\x0b\x32@.google.cloud.networkservices.v1.ServiceLbPolicy.IsolationConfigB\x03\xe0\x41\x01\x1a(\n\x11\x41utoCapacityDrain\x12\x13\n\x06\x65nable\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01\x1a\x38\n\x0e\x46\x61iloverConfig\x12&\n\x19\x66\x61ilover_health_threshold\x18\x01 \x01(\x05\x42\x03\xe0\x41\x01\x1a\xd9\x01\n\x0fIsolationConfig\x12i\n\x15isolation_granularity\x18\x01 \x01(\x0e\x32\x45.google.cloud.networkservices.v1.ServiceLbPolicy.IsolationGranularityB\x03\xe0\x41\x01\x12[\n\x0eisolation_mode\x18\x02 \x01(\x0e\x32>.google.cloud.networkservices.v1.ServiceLbPolicy.IsolationModeB\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x9b\x01\n\x16LoadBalancingAlgorithm\x12(\n$LOAD_BALANCING_ALGORITHM_UNSPECIFIED\x10\x00\x12\x12\n\x0eSPRAY_TO_WORLD\x10\x03\x12\x13\n\x0fSPRAY_TO_REGION\x10\x04\x12\x17\n\x13WATERFALL_BY_REGION\x10\x05\x12\x15\n\x11WATERFALL_BY_ZONE\x10\x06\"I\n\x14IsolationGranularity\x12%\n!ISOLATION_GRANULARITY_UNSPECIFIED\x10\x00\x12\n\n\x06REGION\x10\x01\"H\n\rIsolationMode\x12\x1e\n\x1aISOLATION_MODE_UNSPECIFIED\x10\x00\x12\x0b\n\x07NEAREST\x10\x01\x12\n\n\x06STRICT\x10\x02:\x82\x01\xea\x41\x7f\n.networkservices.googleapis.com/ServiceLbPolicy\x12Mprojects/{project}/locations/{location}/serviceLbPolicies/{service_lb_policy}\"\x8d\x01\n\x1cListServiceLbPoliciesRequest\x12\x46\n\x06parent\x18\x01 \x01(\tB6\xe0\x41\x02\xfa\x41\x30\x12.networkservices.googleapis.com/ServiceLbPolicy\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"\x9c\x01\n\x1dListServiceLbPoliciesResponse\x12M\n\x13service_lb_policies\x18\x01 \x03(\x0b\x32\x30.google.cloud.networkservices.v1.ServiceLbPolicy\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"a\n\x19GetServiceLbPolicyRequest\x12\x44\n\x04name\x18\x01 \x01(\tB6\xe0\x41\x02\xfa\x41\x30\n.networkservices.googleapis.com/ServiceLbPolicy\"\xdb\x01\n\x1c\x43reateServiceLbPolicyRequest\x12\x46\n\x06parent\x18\x01 \x01(\tB6\xe0\x41\x02\xfa\x41\x30\x12.networkservices.googleapis.com/ServiceLbPolicy\x12!\n\x14service_lb_policy_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12P\n\x11service_lb_policy\x18\x03 \x01(\x0b\x32\x30.google.cloud.networkservices.v1.ServiceLbPolicyB\x03\xe0\x41\x02\"\xa6\x01\n\x1cUpdateServiceLbPolicyRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x12P\n\x11service_lb_policy\x18\x02 \x01(\x0b\x32\x30.google.cloud.networkservices.v1.ServiceLbPolicyB\x03\xe0\x41\x02\"d\n\x1c\x44\x65leteServiceLbPolicyRequest\x12\x44\n\x04name\x18\x01 \x01(\tB6\xe0\x41\x02\xfa\x41\x30\n.networkservices.googleapis.com/ServiceLbPolicyB\xf5\x01\n#com.google.cloud.networkservices.v1B\x14ServiceLbPolicyProtoP\x01ZMcloud.google.com/go/networkservices/apiv1/networkservicespb;networkservicespb\xaa\x02\x1fGoogle.Cloud.NetworkServices.V1\xca\x02\x1fGoogle\\Cloud\\NetworkServices\\V1\xea\x02\"Google::Cloud::NetworkServices::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module NetworkServices - module V1 - ServiceLbPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.ServiceLbPolicy").msgclass - ServiceLbPolicy::AutoCapacityDrain = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.ServiceLbPolicy.AutoCapacityDrain").msgclass - ServiceLbPolicy::FailoverConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.ServiceLbPolicy.FailoverConfig").msgclass - ServiceLbPolicy::IsolationConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.ServiceLbPolicy.IsolationConfig").msgclass - ServiceLbPolicy::LoadBalancingAlgorithm = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.ServiceLbPolicy.LoadBalancingAlgorithm").enummodule - ServiceLbPolicy::IsolationGranularity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.ServiceLbPolicy.IsolationGranularity").enummodule - ServiceLbPolicy::IsolationMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.ServiceLbPolicy.IsolationMode").enummodule - ListServiceLbPoliciesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.ListServiceLbPoliciesRequest").msgclass - ListServiceLbPoliciesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.ListServiceLbPoliciesResponse").msgclass - GetServiceLbPolicyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.GetServiceLbPolicyRequest").msgclass - CreateServiceLbPolicyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.CreateServiceLbPolicyRequest").msgclass - UpdateServiceLbPolicyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.UpdateServiceLbPolicyRequest").msgclass - DeleteServiceLbPolicyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.DeleteServiceLbPolicyRequest").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/tcp_route_pb.rb b/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/tcp_route_pb.rb deleted file mode 100644 index 07d47a524db0..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/tcp_route_pb.rb +++ /dev/null @@ -1,37 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/networkservices/v1/tcp_route.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/duration_pb' -require 'google/protobuf/field_mask_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n/google/cloud/networkservices/v1/tcp_route.proto\x12\x1fgoogle.cloud.networkservices.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1egoogle/protobuf/duration.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xf6\x08\n\x08TcpRoute\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x16\n\tself_link\x18\x0b \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12G\n\x05rules\x18\x05 \x03(\x0b\x32\x33.google.cloud.networkservices.v1.TcpRoute.RouteRuleB\x03\xe0\x41\x02\x12;\n\x06meshes\x18\x08 \x03(\tB+\xe0\x41\x01\xfa\x41%\n#networkservices.googleapis.com/Mesh\x12@\n\x08gateways\x18\t \x03(\tB.\xe0\x41\x01\xfa\x41(\n&networkservices.googleapis.com/Gateway\x12J\n\x06labels\x18\n \x03(\x0b\x32\x35.google.cloud.networkservices.v1.TcpRoute.LabelsEntryB\x03\xe0\x41\x01\x1a\xa3\x01\n\tRouteRule\x12J\n\x07matches\x18\x01 \x03(\x0b\x32\x34.google.cloud.networkservices.v1.TcpRoute.RouteMatchB\x03\xe0\x41\x01\x12J\n\x06\x61\x63tion\x18\x02 \x01(\x0b\x32\x35.google.cloud.networkservices.v1.TcpRoute.RouteActionB\x03\xe0\x41\x02\x1a\x35\n\nRouteMatch\x12\x14\n\x07\x61\x64\x64ress\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x11\n\x04port\x18\x02 \x01(\tB\x03\xe0\x41\x02\x1a\xbd\x01\n\x0bRouteAction\x12U\n\x0c\x64\x65stinations\x18\x01 \x03(\x0b\x32:.google.cloud.networkservices.v1.TcpRoute.RouteDestinationB\x03\xe0\x41\x01\x12!\n\x14original_destination\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\x12\x34\n\x0cidle_timeout\x18\x05 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x01\x1al\n\x10RouteDestination\x12\x43\n\x0cservice_name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%compute.googleapis.com/BackendService\x12\x13\n\x06weight\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:k\xea\x41h\n\'networkservices.googleapis.com/TcpRoute\x12=projects/{project}/locations/{location}/tcpRoutes/{tcp_route}\"\xa3\x01\n\x14ListTcpRoutesRequest\x12?\n\x06parent\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\x12\'networkservices.googleapis.com/TcpRoute\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12#\n\x16return_partial_success\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"\x84\x01\n\x15ListTcpRoutesResponse\x12=\n\ntcp_routes\x18\x01 \x03(\x0b\x32).google.cloud.networkservices.v1.TcpRoute\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"S\n\x12GetTcpRouteRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'networkservices.googleapis.com/TcpRoute\"\xb6\x01\n\x15\x43reateTcpRouteRequest\x12?\n\x06parent\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\x12\'networkservices.googleapis.com/TcpRoute\x12\x19\n\x0ctcp_route_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x41\n\ttcp_route\x18\x03 \x01(\x0b\x32).google.cloud.networkservices.v1.TcpRouteB\x03\xe0\x41\x02\"\x90\x01\n\x15UpdateTcpRouteRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x12\x41\n\ttcp_route\x18\x02 \x01(\x0b\x32).google.cloud.networkservices.v1.TcpRouteB\x03\xe0\x41\x02\"V\n\x15\x44\x65leteTcpRouteRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'networkservices.googleapis.com/TcpRouteB\xee\x01\n#com.google.cloud.networkservices.v1B\rTcpRouteProtoP\x01ZMcloud.google.com/go/networkservices/apiv1/networkservicespb;networkservicespb\xaa\x02\x1fGoogle.Cloud.NetworkServices.V1\xca\x02\x1fGoogle\\Cloud\\NetworkServices\\V1\xea\x02\"Google::Cloud::NetworkServices::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module NetworkServices - module V1 - TcpRoute = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.TcpRoute").msgclass - TcpRoute::RouteRule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.TcpRoute.RouteRule").msgclass - TcpRoute::RouteMatch = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.TcpRoute.RouteMatch").msgclass - TcpRoute::RouteAction = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.TcpRoute.RouteAction").msgclass - TcpRoute::RouteDestination = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.TcpRoute.RouteDestination").msgclass - ListTcpRoutesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.ListTcpRoutesRequest").msgclass - ListTcpRoutesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.ListTcpRoutesResponse").msgclass - GetTcpRouteRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.GetTcpRouteRequest").msgclass - CreateTcpRouteRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.CreateTcpRouteRequest").msgclass - UpdateTcpRouteRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.UpdateTcpRouteRequest").msgclass - DeleteTcpRouteRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.DeleteTcpRouteRequest").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/tls_route_pb.rb b/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/tls_route_pb.rb deleted file mode 100644 index 3b1b6565b309..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/tls_route_pb.rb +++ /dev/null @@ -1,37 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/networkservices/v1/tls_route.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/duration_pb' -require 'google/protobuf/field_mask_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n/google/cloud/networkservices/v1/tls_route.proto\x12\x1fgoogle.cloud.networkservices.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1egoogle/protobuf/duration.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x9b\t\n\x08TlsRoute\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x16\n\tself_link\x18\x08 \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12G\n\x05rules\x18\x05 \x03(\x0b\x32\x33.google.cloud.networkservices.v1.TlsRoute.RouteRuleB\x03\xe0\x41\x02\x12;\n\x06meshes\x18\x06 \x03(\tB+\xe0\x41\x01\xfa\x41%\n#networkservices.googleapis.com/Mesh\x12@\n\x08gateways\x18\x07 \x03(\tB.\xe0\x41\x01\xfa\x41(\n&networkservices.googleapis.com/Gateway\x12\x45\n\x0etarget_proxies\x18\r \x03(\tB-\xe0\x41\x01\xfa\x41\'\n%compute.googleapis.com/TargetTcpProxy\x12J\n\x06labels\x18\x0b \x03(\x0b\x32\x35.google.cloud.networkservices.v1.TlsRoute.LabelsEntryB\x03\xe0\x41\x01\x1a\xa3\x01\n\tRouteRule\x12J\n\x07matches\x18\x01 \x03(\x0b\x32\x34.google.cloud.networkservices.v1.TlsRoute.RouteMatchB\x03\xe0\x41\x02\x12J\n\x06\x61\x63tion\x18\x02 \x01(\x0b\x32\x35.google.cloud.networkservices.v1.TlsRoute.RouteActionB\x03\xe0\x41\x02\x1a\x36\n\nRouteMatch\x12\x15\n\x08sni_host\x18\x01 \x03(\tB\x03\xe0\x41\x01\x12\x11\n\x04\x61lpn\x18\x02 \x03(\tB\x03\xe0\x41\x01\x1a\x9a\x01\n\x0bRouteAction\x12U\n\x0c\x64\x65stinations\x18\x01 \x03(\x0b\x32:.google.cloud.networkservices.v1.TlsRoute.RouteDestinationB\x03\xe0\x41\x02\x12\x34\n\x0cidle_timeout\x18\x04 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x01\x1al\n\x10RouteDestination\x12\x43\n\x0cservice_name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%compute.googleapis.com/BackendService\x12\x13\n\x06weight\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:k\xea\x41h\n\'networkservices.googleapis.com/TlsRoute\x12=projects/{project}/locations/{location}/tlsRoutes/{tls_route}\"\xa3\x01\n\x14ListTlsRoutesRequest\x12?\n\x06parent\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\x12\'networkservices.googleapis.com/TlsRoute\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12#\n\x16return_partial_success\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"\x84\x01\n\x15ListTlsRoutesResponse\x12=\n\ntls_routes\x18\x01 \x03(\x0b\x32).google.cloud.networkservices.v1.TlsRoute\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"S\n\x12GetTlsRouteRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'networkservices.googleapis.com/TlsRoute\"\xb6\x01\n\x15\x43reateTlsRouteRequest\x12?\n\x06parent\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\x12\'networkservices.googleapis.com/TlsRoute\x12\x19\n\x0ctls_route_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x41\n\ttls_route\x18\x03 \x01(\x0b\x32).google.cloud.networkservices.v1.TlsRouteB\x03\xe0\x41\x02\"\x90\x01\n\x15UpdateTlsRouteRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x12\x41\n\ttls_route\x18\x02 \x01(\x0b\x32).google.cloud.networkservices.v1.TlsRouteB\x03\xe0\x41\x02\"V\n\x15\x44\x65leteTlsRouteRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'networkservices.googleapis.com/TlsRouteB\xe5\x02\n#com.google.cloud.networkservices.v1B\rTlsRouteProtoP\x01ZMcloud.google.com/go/networkservices/apiv1/networkservicespb;networkservicespb\xaa\x02\x1fGoogle.Cloud.NetworkServices.V1\xca\x02\x1fGoogle\\Cloud\\NetworkServices\\V1\xea\x02\"Google::Cloud::NetworkServices::V1\xea\x41t\n%compute.googleapis.com/TargetTcpProxy\x12Kprojects/{project}/locations/{location}/targetTcpProxies/{target_tcp_proxy}b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module NetworkServices - module V1 - TlsRoute = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.TlsRoute").msgclass - TlsRoute::RouteRule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.TlsRoute.RouteRule").msgclass - TlsRoute::RouteMatch = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.TlsRoute.RouteMatch").msgclass - TlsRoute::RouteAction = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.TlsRoute.RouteAction").msgclass - TlsRoute::RouteDestination = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.TlsRoute.RouteDestination").msgclass - ListTlsRoutesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.ListTlsRoutesRequest").msgclass - ListTlsRoutesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.ListTlsRoutesResponse").msgclass - GetTlsRouteRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.GetTlsRouteRequest").msgclass - CreateTlsRouteRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.CreateTlsRouteRequest").msgclass - UpdateTlsRouteRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.UpdateTlsRouteRequest").msgclass - DeleteTlsRouteRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.DeleteTlsRouteRequest").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-network_services-v1/proto_docs/README.md b/owl-bot-staging/google-cloud-network_services-v1/proto_docs/README.md deleted file mode 100644 index bede8b6f1ebd..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/proto_docs/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# Network Services 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_services-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/api/client.rb deleted file mode 100644 index 3ab0b096d445..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/api/client.rb +++ /dev/null @@ -1,593 +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. - # - # Note: This field should not be used in most cases. - 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: - # library_settings: - # 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. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Php. Clobbers the php_namespace option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.php.package_name" field - # in gapic.yaml. API teams should use the protobuf php_namespace option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # php_settings: - # library_package: Google\Cloud\PubSub\V1 - 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. - # - # Example: - # - # 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 - # @!attribute [rw] batching - # @return [::Google::Api::BatchingConfigProto] - # Batching configuration for an API method in client libraries. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.BatchCreateExample - # batching: - # element_count_threshold: 1000 - # request_byte_threshold: 100000000 - # delay_threshold_millis: 10 - 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. - # - # Note: This feature should not be used in most cases. - # @!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 - - # `BatchingConfigProto` defines the batching configuration for an API method. - # @!attribute [rw] thresholds - # @return [::Google::Api::BatchingSettingsProto] - # The thresholds which trigger a batched request to be sent. - # @!attribute [rw] batch_descriptor - # @return [::Google::Api::BatchingDescriptorProto] - # The request and response fields used in batching. - class BatchingConfigProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingSettingsProto` specifies a set of batching thresholds, each of - # which acts as a trigger to send a batch of messages as a request. At least - # one threshold must be positive nonzero. - # @!attribute [rw] element_count_threshold - # @return [::Integer] - # The number of elements of a field collected into a batch which, if - # exceeded, causes the batch to be sent. - # @!attribute [rw] request_byte_threshold - # @return [::Integer] - # The aggregated size of the batched field which, if exceeded, causes the - # batch to be sent. This size is computed by aggregating the sizes of the - # request field to be batched, not of the entire request message. - # @!attribute [rw] delay_threshold - # @return [::Google::Protobuf::Duration] - # The duration after which a batch should be sent, starting from the addition - # of the first message to that batch. - # @!attribute [rw] element_count_limit - # @return [::Integer] - # The maximum number of elements collected in a batch that could be accepted - # by server. - # @!attribute [rw] request_byte_limit - # @return [::Integer] - # The maximum size of the request that could be accepted by server. - # @!attribute [rw] flow_control_element_limit - # @return [::Integer] - # The maximum number of elements allowed by flow control. - # @!attribute [rw] flow_control_byte_limit - # @return [::Integer] - # The maximum size of data allowed by flow control. - # @!attribute [rw] flow_control_limit_exceeded_behavior - # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] - # The behavior to take when the flow control limit is exceeded. - class BatchingSettingsProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingDescriptorProto` specifies the fields of the request message to be - # used for batching, and, optionally, the fields of the response message to be - # used for demultiplexing. - # @!attribute [rw] batched_field - # @return [::String] - # The repeated field in the request message to be aggregated by batching. - # @!attribute [rw] discriminator_fields - # @return [::Array<::String>] - # A list of the fields in the request message. Two requests will be batched - # together only if the values of every field specified in - # `request_discriminator_fields` is equal between the two requests. - # @!attribute [rw] subresponse_field - # @return [::String] - # Optional. When present, indicates the field in the response message to be - # used to demultiplex the response into multiple response messages, in - # correspondence with the multiple request messages originally batched - # together. - class BatchingDescriptorProto - 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 - - # The behavior to take when the flow control limit is exceeded. - module FlowControlLimitExceededBehaviorProto - # Default behavior, system-defined. - UNSET_BEHAVIOR = 0 - - # Stop operation, raise error. - THROW_EXCEPTION = 1 - - # Pause operation until limit clears. - BLOCK = 2 - - # Continue operation, disregard limit. - IGNORE = 3 - end - end -end diff --git a/owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index 582be187d115..000000000000 --- a/owl-bot-staging/google-cloud-network_services-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_services-v1/proto_docs/google/api/field_info.rb b/owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/api/field_info.rb deleted file mode 100644 index 0f5acf0a5538..000000000000 --- a/owl-bot-staging/google-cloud-network_services-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_services-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 9392a413fb1b..000000000000 --- a/owl-bot-staging/google-cloud-network_services-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_services-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/api/resource.rb deleted file mode 100644 index 25dec4847ac1..000000000000 --- a/owl-bot-staging/google-cloud-network_services-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_services-v1/proto_docs/google/cloud/networkservices/v1/common.rb b/owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/common.rb deleted file mode 100644 index c0a547efdb7c..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/common.rb +++ /dev/null @@ -1,164 +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 NetworkServices - module V1 - # Represents the metadata of the long-running operation. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time the operation was created. - # @!attribute [r] end_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time the operation finished running. - # @!attribute [r] target - # @return [::String] - # Output only. Server-defined resource path for the target of the operation. - # @!attribute [r] verb - # @return [::String] - # Output only. Name of the verb executed by the operation. - # @!attribute [r] status_message - # @return [::String] - # Output only. Human-readable status of the operation, if any. - # @!attribute [r] requested_cancellation - # @return [::Boolean] - # Output only. Identifies whether the user has requested cancellation - # of the operation. Operations that have successfully been cancelled - # have [Operation.error][] value with a - # {::Google::Rpc::Status#code google.rpc.Status.code} of 1, corresponding to - # `Code.CANCELLED`. - # @!attribute [r] api_version - # @return [::String] - # Output only. API version used to start the operation. - class OperationMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Specification of a port-based selector. - # @!attribute [rw] ports - # @return [::Array<::String>] - # Optional. A list of ports. Can be port numbers or port range - # (example, [80-90] specifies all ports from 80 to 90, including - # 80 and 90) or named ports or * to specify all ports. If the - # list is empty, all ports are selected. - class TrafficPortSelector - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A definition of a matcher that selects endpoints to which the policies - # should be applied. - # @!attribute [rw] metadata_label_matcher - # @return [::Google::Cloud::NetworkServices::V1::EndpointMatcher::MetadataLabelMatcher] - # The matcher is based on node metadata presented by xDS clients. - class EndpointMatcher - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The matcher that is based on node metadata presented by xDS clients. - # @!attribute [rw] metadata_label_match_criteria - # @return [::Google::Cloud::NetworkServices::V1::EndpointMatcher::MetadataLabelMatcher::MetadataLabelMatchCriteria] - # Specifies how matching should be done. - # - # Supported values are: - # MATCH_ANY: At least one of the Labels specified in the - # matcher should match the metadata presented by xDS client. - # MATCH_ALL: The metadata presented by the xDS client should - # contain all of the labels specified here. - # - # The selection is determined based on the best match. For - # example, suppose there are three EndpointPolicy - # resources P1, P2 and P3 and if P1 has a the matcher as - # MATCH_ANY , P2 has MATCH_ALL , and P3 has - # MATCH_ALL . - # - # If a client with label connects, the config from P1 - # will be selected. - # - # If a client with label connects, the config from P2 - # will be selected. - # - # If a client with label connects, the config - # from P3 will be selected. - # - # If there is more than one best match, (for example, if a - # config P4 with selector exists and if a client with - # label connects), pick up the one with older creation time. - # @!attribute [rw] metadata_labels - # @return [::Array<::Google::Cloud::NetworkServices::V1::EndpointMatcher::MetadataLabelMatcher::MetadataLabels>] - # The list of label value pairs that must match labels in the - # provided metadata based on filterMatchCriteria This list can - # have at most 64 entries. The list can be empty if the match - # criteria is MATCH_ANY, to specify a wildcard match (i.e this - # matches any client). - class MetadataLabelMatcher - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Defines a name-pair value for a single label. - # @!attribute [rw] label_name - # @return [::String] - # Required. Label name presented as key in xDS Node Metadata. - # @!attribute [rw] label_value - # @return [::String] - # Required. Label value presented as value corresponding to the above - # key, in xDS Node Metadata. - class MetadataLabels - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Possible criteria values that define logic of how matching is made. - module MetadataLabelMatchCriteria - # Default value. Should not be used. - METADATA_LABEL_MATCH_CRITERIA_UNSPECIFIED = 0 - - # At least one of the Labels specified in the matcher should match the - # metadata presented by xDS client. - MATCH_ANY = 1 - - # The metadata presented by the xDS client should contain all of the - # labels specified here. - MATCH_ALL = 2 - end - end - end - - # EnvoyHeader configuration for Mesh and Gateway - module EnvoyHeaders - # Defaults to NONE. - ENVOY_HEADERS_UNSPECIFIED = 0 - - # Suppress envoy debug headers. - NONE = 1 - - # Envoy will insert default internal debug headers into upstream requests: - # x-envoy-attempt-count, - # x-envoy-is-timeout-retry, - # x-envoy-expected-rq-timeout-ms, - # x-envoy-original-path, - # x-envoy-upstream-stream-duration-ms - DEBUG_HEADERS = 2 - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/dep.rb b/owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/dep.rb deleted file mode 100644 index d1cda59da9ce..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/dep.rb +++ /dev/null @@ -1,1209 +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 NetworkServices - module V1 - # A single extension chain wrapper that contains the match conditions and - # extensions to execute. - # @!attribute [rw] name - # @return [::String] - # Required. The name for this extension chain. - # The name is logged as part of the HTTP request logs. - # The name must conform with RFC-1034, is restricted to lower-cased letters, - # numbers and hyphens, and can have a maximum length of 63 characters. - # Additionally, the first character must be a letter and the last a letter or - # a number. - # @!attribute [rw] match_condition - # @return [::Google::Cloud::NetworkServices::V1::ExtensionChain::MatchCondition] - # Required. Conditions under which this chain is invoked for a request. - # @!attribute [rw] extensions - # @return [::Array<::Google::Cloud::NetworkServices::V1::ExtensionChain::Extension>] - # Required. A set of extensions to execute for the matching request. - # At least one extension is required. - # Up to 3 extensions can be defined for each extension chain - # for `LbTrafficExtension` resource. - # `LbRouteExtension` and `LbEdgeExtension` chains are limited to 1 extension - # per extension chain. - class ExtensionChain - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Conditions under which this chain is invoked for a request. - # @!attribute [rw] cel_expression - # @return [::String] - # Required. A Common Expression Language (CEL) expression that is used to - # match requests for which the extension chain is executed. - # - # For more information, see [CEL matcher language - # reference](https://cloud.google.com/service-extensions/docs/cel-matcher-language-reference). - class MatchCondition - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A single extension in the chain to execute for the matching request. - # @!attribute [rw] name - # @return [::String] - # Optional. The name for this extension. - # The name is logged as part of the HTTP request logs. - # The name must conform with RFC-1034, is restricted to lower-cased - # letters, numbers and hyphens, and can have a maximum length of 63 - # characters. Additionally, the first character must be a letter and the - # last a letter or a number. - # - # This field is required except for AuthzExtension. - # @!attribute [rw] authority - # @return [::String] - # Optional. The `:authority` header in the gRPC request sent from Envoy - # to the extension service. - # Required for Callout extensions. - # - # This field is not supported for plugin extensions. Setting it results in - # a validation error. - # @!attribute [rw] service - # @return [::String] - # Required. The reference to the service that runs the extension. - # - # To configure a callout extension, `service` must be a fully-qualified - # reference - # to a [backend - # service](https://cloud.google.com/compute/docs/reference/rest/v1/backendServices) - # in the format: - # `https://www.googleapis.com/compute/v1/projects/{project}/regions/{region}/backendServices/{backendService}` - # or - # `https://www.googleapis.com/compute/v1/projects/{project}/global/backendServices/{backendService}`. - # - # To configure a plugin extension, `service` must be a reference - # to a [`WasmPlugin` - # resource](https://cloud.google.com/service-extensions/docs/reference/rest/v1beta1/projects.locations.wasmPlugins) - # in the format: - # `projects/{project}/locations/{location}/wasmPlugins/{plugin}` - # or - # `//networkservices.googleapis.com/projects/{project}/locations/{location}/wasmPlugins/{wasmPlugin}`. - # - # Plugin extensions are currently supported for the - # `LbTrafficExtension`, the `LbRouteExtension`, and the `LbEdgeExtension` - # resources. - # @!attribute [rw] supported_events - # @return [::Array<::Google::Cloud::NetworkServices::V1::EventType>] - # Optional. A set of events during request or response processing for which - # this extension is called. - # - # For the `LbTrafficExtension` resource, this field is required. - # - # For the `LbRouteExtension` resource, this field is optional. If - # unspecified, `REQUEST_HEADERS` event is assumed as supported. - # - # For the `LbEdgeExtension` resource, this field is required and must only - # contain `REQUEST_HEADERS` event. - # - # For the `AuthzExtension` resource, this field is optional. - # `REQUEST_HEADERS` is the only supported event. If unspecified, - # `REQUEST_HEADERS` event is assumed as supported. - # @!attribute [rw] timeout - # @return [::Google::Protobuf::Duration] - # Optional. Specifies the timeout for each individual message on the - # stream. The timeout must be between `10`-`10000` milliseconds. Required - # for callout extensions. - # - # This field is not supported for plugin extensions. Setting it results in - # a validation error. - # @!attribute [rw] fail_open - # @return [::Boolean] - # Optional. Determines how the proxy behaves if the call to the extension - # fails or times out. - # - # When set to `TRUE`, request or response processing continues without - # error. Any subsequent extensions in the extension chain are also - # executed. When set to `FALSE` or the default setting of `FALSE` is used, - # one of the following happens: - # - # * If response headers have not been delivered to the downstream client, - # a generic 500 error is returned to the client. The error response can be - # tailored by configuring a custom error response in the load balancer. - # - # * If response headers have been delivered, then the HTTP stream to the - # downstream client is reset. - # @!attribute [rw] forward_headers - # @return [::Array<::String>] - # Optional. List of the HTTP headers to forward to the extension - # (from the client or backend). If omitted, all headers are sent. - # Each element is a string indicating the header name. - # @!attribute [rw] forward_attributes - # @return [::Array<::String>] - # Optional. List of the Envoy attributes to forward to the extension - # server. The attributes provided here are included as part of the - # `ProcessingRequest.attributes` field (of type - # `map`), where the keys are the attribute - # names. Refer to the - # [documentation](https://cloud.google.com/service-extensions/docs/cel-matcher-language-reference#attributes) - # for the names of attributes that can be forwarded. If omitted, no - # attributes are sent. Each element is a string indicating the - # attribute name. - # @!attribute [rw] metadata - # @return [::Google::Protobuf::Struct] - # Optional. The metadata provided here is included as part of the - # `metadata_context` (of type `google.protobuf.Struct`) in the - # `ProcessingRequest` message sent to the extension server. - # - # For `AuthzExtension` resources, the metadata is available under the - # namespace `com.google.authz_extension.`. - # For other types of extensions, the metadata is available under the - # namespace - # `com.google....`. - # For example: - # `com.google.lb_traffic_extension.lbtrafficextension1.chain1.ext1`. - # - # The following variables are supported in the metadata: - # - # `{forwarding_rule_id}` - substituted with the forwarding rule's fully - # qualified resource name. - # - # This field must not be set for plugin extensions. Setting it results in - # a validation error. - # - # You can set metadata at either the resource level or the extension level. - # The extension level metadata is recommended because you can pass a - # different set of metadata through each extension to the backend. - # - # This field is subject to following limitations: - # - # * The total size of the metadata must be less than 1KiB. - # * The total number of keys in the metadata must be less than 16. - # * The length of each key must be less than 64 characters. - # * The length of each value must be less than 1024 characters. - # * All values must be strings. - # @!attribute [rw] request_body_send_mode - # @return [::Google::Cloud::NetworkServices::V1::BodySendMode] - # Optional. Configures the send mode for request body processing. - # - # The field can only be set if `supported_events` includes `REQUEST_BODY`. - # If `supported_events` includes `REQUEST_BODY`, - # but `request_body_send_mode` is unset, the default value `STREAMED` is - # used. - # - # When this field is set to `FULL_DUPLEX_STREAMED`, `supported_events` - # must include both `REQUEST_BODY` and `REQUEST_TRAILERS`. - # - # This field can be set only for `LbTrafficExtension` and - # `LbRouteExtension` resources, and only when the `service` field of the - # extension points to a `BackendService`. Only `FULL_DUPLEX_STREAMED` mode - # is supported for `LbRouteExtension` resources. - # @!attribute [rw] response_body_send_mode - # @return [::Google::Cloud::NetworkServices::V1::BodySendMode] - # Optional. Configures the send mode for response processing. If - # unspecified, the default value `STREAMED` is used. - # - # The field can only be set if `supported_events` includes `RESPONSE_BODY`. - # If `supported_events` includes `RESPONSE_BODY`, but - # `response_body_send_mode` is unset, the default value `STREAMED` is used. - # - # When this field is set to `FULL_DUPLEX_STREAMED`, `supported_events` - # must include both `RESPONSE_BODY` and `RESPONSE_TRAILERS`. - # - # This field can be set only for `LbTrafficExtension` resources, and only - # when the `service` field of the extension points to a `BackendService`. - # @!attribute [rw] observability_mode - # @return [::Boolean] - # Optional. When set to `true`, the calls to the extension backend are - # performed asynchronously, without pausing the processing of the ongoing - # request. In this mode, only `STREAMED` (default) body processing is - # supported. Responses, if any, are ignored. - # - # Supported by regional `LbTrafficExtension` and `LbRouteExtension` - # resources. - class Extension - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # `LbTrafficExtension` is a resource that lets the extension service modify the - # headers and payloads of both requests and responses without impacting the - # choice of backend services or any other security policies associated with the - # backend service. - # @!attribute [rw] name - # @return [::String] - # Required. Identifier. Name of the `LbTrafficExtension` resource in the - # following format: - # `projects/{project}/locations/{location}/lbTrafficExtensions/{lb_traffic_extension}`. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The timestamp when the resource was created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The timestamp when the resource was updated. - # @!attribute [rw] description - # @return [::String] - # Optional. A human-readable description of the resource. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. Set of labels associated with the `LbTrafficExtension` resource. - # - # The format must comply with [the requirements for - # labels](https://cloud.google.com/compute/docs/labeling-resources#requirements) - # for Google Cloud resources. - # @!attribute [rw] forwarding_rules - # @return [::Array<::String>] - # Optional. A list of references to the forwarding rules to which this - # service extension is attached. At least one forwarding rule is required. - # Only one `LbTrafficExtension` resource can be associated with a forwarding - # rule. - # @!attribute [rw] extension_chains - # @return [::Array<::Google::Cloud::NetworkServices::V1::ExtensionChain>] - # Required. A set of ordered extension chains that contain the match - # conditions and extensions to execute. Match conditions for each extension - # chain are evaluated in sequence for a given request. The first extension - # chain that has a condition that matches the request is executed. - # Any subsequent extension chains do not execute. - # Limited to 5 extension chains per resource. - # @!attribute [rw] load_balancing_scheme - # @return [::Google::Cloud::NetworkServices::V1::LoadBalancingScheme] - # Required. All backend services and forwarding rules referenced by this - # extension must share the same load balancing scheme. Supported values: - # `INTERNAL_MANAGED` and `EXTERNAL_MANAGED`. For more information, refer to - # [Backend services - # overview](https://cloud.google.com/load-balancing/docs/backend-service). - # @!attribute [rw] metadata - # @return [::Google::Protobuf::Struct] - # Optional. The metadata provided here is included as part of the - # `metadata_context` (of type `google.protobuf.Struct`) in the - # `ProcessingRequest` message sent to the extension server. - # - # The metadata applies to all extensions in all extensions chains in this - # resource. - # - # The metadata is available under the key - # `com.google.lb_traffic_extension.`. - # - # The following variables are supported in the metadata: - # - # `{forwarding_rule_id}` - substituted with the forwarding rule's fully - # qualified resource name. - # - # This field must not be set if at least one of the extension chains - # contains plugin extensions. Setting it results in a validation error. - # - # You can set metadata at either the resource level or the extension level. - # The extension level metadata is recommended because you can pass a - # different set of metadata through each extension to the backend. - class LbTrafficExtension - 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 - - # Message for requesting list of `LbTrafficExtension` resources. - # @!attribute [rw] parent - # @return [::String] - # Required. The project and location from which the `LbTrafficExtension` - # resources are listed. These values are specified in the following format: - # `projects/{project}/locations/{location}`. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. Requested page size. The server might return fewer items than - # requested. If unspecified, the server picks an appropriate default. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A token identifying a page of results that the server returns. - # @!attribute [rw] filter - # @return [::String] - # Optional. Filtering results. - # @!attribute [rw] order_by - # @return [::String] - # Optional. Hint about how to order the results. - class ListLbTrafficExtensionsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for response to listing `LbTrafficExtension` resources. - # @!attribute [rw] lb_traffic_extensions - # @return [::Array<::Google::Cloud::NetworkServices::V1::LbTrafficExtension>] - # The list of `LbTrafficExtension` resources. - # @!attribute [rw] next_page_token - # @return [::String] - # A token identifying a page of results that the server returns. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Locations that could not be reached. - class ListLbTrafficExtensionsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for getting a `LbTrafficExtension` resource. - # @!attribute [rw] name - # @return [::String] - # Required. A name of the `LbTrafficExtension` resource to get. Must be in - # the format - # `projects/{project}/locations/{location}/lbTrafficExtensions/{lb_traffic_extension}`. - class GetLbTrafficExtensionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for creating a `LbTrafficExtension` resource. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent resource of the `LbTrafficExtension` resource. Must be - # in the format `projects/{project}/locations/{location}`. - # @!attribute [rw] lb_traffic_extension_id - # @return [::String] - # Required. User-provided ID of the `LbTrafficExtension` resource to be - # created. - # @!attribute [rw] lb_traffic_extension - # @return [::Google::Cloud::NetworkServices::V1::LbTrafficExtension] - # Required. `LbTrafficExtension` resource to be created. - # @!attribute [rw] request_id - # @return [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server can ignore - # the request if it has already been completed. The server guarantees - # that for 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server ignores the second request This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - class CreateLbTrafficExtensionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for updating a `LbTrafficExtension` resource. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Optional. Used to specify the fields to be overwritten in the - # `LbTrafficExtension` resource by the update. - # The fields specified in the `update_mask` are relative to the resource, not - # the full request. A field is overwritten if it is in the mask. If the - # user does not specify a mask, then all fields are overwritten. - # @!attribute [rw] lb_traffic_extension - # @return [::Google::Cloud::NetworkServices::V1::LbTrafficExtension] - # Required. `LbTrafficExtension` resource being updated. - # @!attribute [rw] request_id - # @return [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server can ignore - # the request if it has already been completed. The server guarantees - # that for 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server ignores the second request This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - class UpdateLbTrafficExtensionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for deleting a `LbTrafficExtension` resource. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the `LbTrafficExtension` resource to delete. Must be - # in the format - # `projects/{project}/locations/{location}/lbTrafficExtensions/{lb_traffic_extension}`. - # @!attribute [rw] request_id - # @return [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server can ignore - # the request if it has already been completed. The server guarantees - # that for 60 minutes after the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server ignores the second request This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - class DeleteLbTrafficExtensionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `LbRouteExtension` is a resource that lets you control where traffic is - # routed to for a given request. - # @!attribute [rw] name - # @return [::String] - # Required. Identifier. Name of the `LbRouteExtension` resource in the - # following format: - # `projects/{project}/locations/{location}/lbRouteExtensions/{lb_route_extension}`. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The timestamp when the resource was created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The timestamp when the resource was updated. - # @!attribute [rw] description - # @return [::String] - # Optional. A human-readable description of the resource. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. Set of labels associated with the `LbRouteExtension` resource. - # - # The format must comply with [the requirements for - # labels](https://cloud.google.com/compute/docs/labeling-resources#requirements) - # for Google Cloud resources. - # @!attribute [rw] forwarding_rules - # @return [::Array<::String>] - # Required. A list of references to the forwarding rules to which this - # service extension is attached. At least one forwarding rule is required. - # Only one `LbRouteExtension` resource can be associated with a forwarding - # rule. - # @!attribute [rw] extension_chains - # @return [::Array<::Google::Cloud::NetworkServices::V1::ExtensionChain>] - # Required. A set of ordered extension chains that contain the match - # conditions and extensions to execute. Match conditions for each extension - # chain are evaluated in sequence for a given request. The first extension - # chain that has a condition that matches the request is executed. - # Any subsequent extension chains do not execute. - # Limited to 5 extension chains per resource. - # @!attribute [rw] load_balancing_scheme - # @return [::Google::Cloud::NetworkServices::V1::LoadBalancingScheme] - # Required. All backend services and forwarding rules referenced by this - # extension must share the same load balancing scheme. Supported values: - # `INTERNAL_MANAGED`, `EXTERNAL_MANAGED`. For more information, refer to - # [Backend services - # overview](https://cloud.google.com/load-balancing/docs/backend-service). - # @!attribute [rw] metadata - # @return [::Google::Protobuf::Struct] - # Optional. The metadata provided here is included as part of the - # `metadata_context` (of type `google.protobuf.Struct`) in the - # `ProcessingRequest` message sent to the extension server. - # - # The metadata applies to all extensions in all extensions chains in this - # resource. - # - # The metadata is available under the key - # `com.google.lb_route_extension.`. - # - # The following variables are supported in the metadata: - # - # `{forwarding_rule_id}` - substituted with the forwarding rule's fully - # qualified resource name. - # - # This field must not be set if at least one of the extension chains - # contains plugin extensions. Setting it results in a validation error. - # - # You can set metadata at either the resource level or the extension level. - # The extension level metadata is recommended because you can pass a - # different set of metadata through each extension to the backend. - class LbRouteExtension - 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 - - # Message for requesting list of `LbRouteExtension` resources. - # @!attribute [rw] parent - # @return [::String] - # Required. The project and location from which the `LbRouteExtension` - # resources are listed. These values are specified in the following format: - # `projects/{project}/locations/{location}`. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. Requested page size. The server might return fewer items than - # requested. If unspecified, the server picks an appropriate default. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A token identifying a page of results that the server returns. - # @!attribute [rw] filter - # @return [::String] - # Optional. Filtering results. - # @!attribute [rw] order_by - # @return [::String] - # Optional. Hint about how to order the results. - class ListLbRouteExtensionsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for response to listing `LbRouteExtension` resources. - # @!attribute [rw] lb_route_extensions - # @return [::Array<::Google::Cloud::NetworkServices::V1::LbRouteExtension>] - # The list of `LbRouteExtension` resources. - # @!attribute [rw] next_page_token - # @return [::String] - # A token identifying a page of results that the server returns. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Locations that could not be reached. - class ListLbRouteExtensionsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for getting a `LbRouteExtension` resource. - # @!attribute [rw] name - # @return [::String] - # Required. A name of the `LbRouteExtension` resource to get. Must be in the - # format - # `projects/{project}/locations/{location}/lbRouteExtensions/{lb_route_extension}`. - class GetLbRouteExtensionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for creating a `LbRouteExtension` resource. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent resource of the `LbRouteExtension` resource. Must be - # in the format `projects/{project}/locations/{location}`. - # @!attribute [rw] lb_route_extension_id - # @return [::String] - # Required. User-provided ID of the `LbRouteExtension` resource to be - # created. - # @!attribute [rw] lb_route_extension - # @return [::Google::Cloud::NetworkServices::V1::LbRouteExtension] - # Required. `LbRouteExtension` resource to be created. - # @!attribute [rw] request_id - # @return [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server can ignore - # the request if it has already been completed. The server guarantees - # that for 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server ignores the second request This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - class CreateLbRouteExtensionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for updating a `LbRouteExtension` resource. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Optional. Used to specify the fields to be overwritten in the - # `LbRouteExtension` resource by the update. - # The fields specified in the `update_mask` are relative to the resource, not - # the full request. A field is overwritten if it is in the mask. If the - # user does not specify a mask, then all fields are overwritten. - # @!attribute [rw] lb_route_extension - # @return [::Google::Cloud::NetworkServices::V1::LbRouteExtension] - # Required. `LbRouteExtension` resource being updated. - # @!attribute [rw] request_id - # @return [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server can ignore - # the request if it has already been completed. The server guarantees - # that for 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server ignores the second request This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - class UpdateLbRouteExtensionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for deleting a `LbRouteExtension` resource. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the `LbRouteExtension` resource to delete. Must be in - # the format - # `projects/{project}/locations/{location}/lbRouteExtensions/{lb_route_extension}`. - # @!attribute [rw] request_id - # @return [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server can ignore - # the request if it has already been completed. The server guarantees - # that for 60 minutes after the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server ignores the second request This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - class DeleteLbRouteExtensionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `LbEdgeExtension` is a resource that lets the extension service influence - # the selection of backend services and Cloud CDN cache keys by modifying - # request headers. - # @!attribute [rw] name - # @return [::String] - # Required. Identifier. Name of the `LbEdgeExtension` resource in the - # following format: - # `projects/{project}/locations/{location}/lbEdgeExtensions/{lb_edge_extension}`. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The timestamp when the resource was created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The timestamp when the resource was updated. - # @!attribute [rw] description - # @return [::String] - # Optional. A human-readable description of the resource. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. Set of labels associated with the `LbEdgeExtension` resource. - # - # The format must comply with [the requirements for - # labels](https://cloud.google.com/compute/docs/labeling-resources#requirements) - # for Google Cloud resources. - # @!attribute [rw] forwarding_rules - # @return [::Array<::String>] - # Required. A list of references to the forwarding rules to which this - # service extension is attached. At least one forwarding rule is required. - # Only one `LbEdgeExtension` resource can be associated with a forwarding - # rule. - # @!attribute [rw] extension_chains - # @return [::Array<::Google::Cloud::NetworkServices::V1::ExtensionChain>] - # Required. A set of ordered extension chains that contain the match - # conditions and extensions to execute. Match conditions for each extension - # chain are evaluated in sequence for a given request. The first extension - # chain that has a condition that matches the request is executed. - # Any subsequent extension chains do not execute. - # Limited to 5 extension chains per resource. - # @!attribute [rw] load_balancing_scheme - # @return [::Google::Cloud::NetworkServices::V1::LoadBalancingScheme] - # Required. All forwarding rules referenced by this extension must - # share the same load balancing scheme. - # Supported values: `EXTERNAL_MANAGED`. - class LbEdgeExtension - 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 - - # Message for requesting list of `LbEdgeExtension` resources. - # @!attribute [rw] parent - # @return [::String] - # Required. The project and location from which the `LbEdgeExtension` - # resources are listed. These values are specified in the following format: - # `projects/{project}/locations/{location}`. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. Requested page size. The server might return fewer items than - # requested. If unspecified, the server picks an appropriate default. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A token identifying a page of results that the server returns. - # @!attribute [rw] filter - # @return [::String] - # Optional. Filtering results. - # @!attribute [rw] order_by - # @return [::String] - # Optional. Hint about how to order the results. - class ListLbEdgeExtensionsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for response to listing `LbEdgeExtension` resources. - # @!attribute [rw] lb_edge_extensions - # @return [::Array<::Google::Cloud::NetworkServices::V1::LbEdgeExtension>] - # The list of `LbEdgeExtension` resources. - # @!attribute [rw] next_page_token - # @return [::String] - # A token identifying a page of results that the server returns. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Locations that could not be reached. - class ListLbEdgeExtensionsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for getting a `LbEdgeExtension` resource. - # @!attribute [rw] name - # @return [::String] - # Required. A name of the `LbEdgeExtension` resource to get. Must be in the - # format - # `projects/{project}/locations/{location}/lbEdgeExtensions/{lb_edge_extension}`. - class GetLbEdgeExtensionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for creating a `LbEdgeExtension` resource. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent resource of the `LbEdgeExtension` resource. Must be in - # the format `projects/{project}/locations/{location}`. - # @!attribute [rw] lb_edge_extension_id - # @return [::String] - # Required. User-provided ID of the `LbEdgeExtension` resource to be created. - # @!attribute [rw] lb_edge_extension - # @return [::Google::Cloud::NetworkServices::V1::LbEdgeExtension] - # Required. `LbEdgeExtension` resource to be created. - # @!attribute [rw] request_id - # @return [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server can ignore - # the request if it has already been completed. The server guarantees - # that for 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server ignores the second request This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - class CreateLbEdgeExtensionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for updating a `LbEdgeExtension` resource. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Optional. Used to specify the fields to be overwritten in the - # `LbEdgeExtension` resource by the update. - # The fields specified in the `update_mask` are relative to the resource, not - # the full request. A field is overwritten if it is in the mask. If the - # user does not specify a mask, then all fields are overwritten. - # @!attribute [rw] lb_edge_extension - # @return [::Google::Cloud::NetworkServices::V1::LbEdgeExtension] - # Required. `LbEdgeExtension` resource being updated. - # @!attribute [rw] request_id - # @return [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server can ignore - # the request if it has already been completed. The server guarantees - # that for 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server ignores the second request This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - class UpdateLbEdgeExtensionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for deleting a `LbEdgeExtension` resource. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the `LbEdgeExtension` resource to delete. Must be in - # the format - # `projects/{project}/locations/{location}/lbEdgeExtensions/{lb_edge_extension}`. - # @!attribute [rw] request_id - # @return [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server can ignore - # the request if it has already been completed. The server guarantees - # that for 60 minutes after the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server ignores the second request This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - class DeleteLbEdgeExtensionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `AuthzExtension` is a resource that allows traffic forwarding - # to a callout backend service to make an authorization decision. - # @!attribute [rw] name - # @return [::String] - # Required. Identifier. Name of the `AuthzExtension` resource in the - # following format: - # `projects/{project}/locations/{location}/authzExtensions/{authz_extension}`. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The timestamp when the resource was created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The timestamp when the resource was updated. - # @!attribute [rw] description - # @return [::String] - # Optional. A human-readable description of the resource. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. Set of labels associated with the `AuthzExtension` - # resource. - # - # The format must comply with [the requirements for - # labels](/compute/docs/labeling-resources#requirements) for Google Cloud - # resources. - # @!attribute [rw] load_balancing_scheme - # @return [::Google::Cloud::NetworkServices::V1::LoadBalancingScheme] - # Optional. All backend services and forwarding rules referenced by this - # extension must share the same load balancing scheme. Supported values: - # `INTERNAL_MANAGED`, `EXTERNAL_MANAGED`. Can be omitted for AuthzExtensions - # that do not reference a backend service. For more information, refer to - # [Backend services - # overview](https://cloud.google.com/load-balancing/docs/backend-service). - # @!attribute [rw] authority - # @return [::String] - # Optional. The `:authority` header in the gRPC request sent from Envoy to - # the extension service. It is required when the `service` field points to a - # backend service or a wasm plugin. - # @!attribute [rw] service - # @return [::String] - # Required. The reference to the service that runs the extension. - # - # To configure a callout extension, `service` must be a fully-qualified - # reference - # to a [backend - # service](https://cloud.google.com/compute/docs/reference/rest/v1/backendServices) - # in the format: - # `https://www.googleapis.com/compute/v1/projects/{project}/regions/{region}/backendServices/{backendService}` - # or - # `https://www.googleapis.com/compute/v1/projects/{project}/global/backendServices/{backendService}`. - # @!attribute [rw] timeout - # @return [::Google::Protobuf::Duration] - # Required. Specifies the timeout for each individual message on the stream. - # The timeout must be between 10-10000 milliseconds. - # @!attribute [rw] fail_open - # @return [::Boolean] - # Optional. Determines how the proxy behaves if the call to the extension - # fails or times out. - # - # When set to `TRUE`, request or response processing continues without - # error. Any subsequent extensions in the extension chain are also - # executed. When set to `FALSE` or the default setting of `FALSE` is used, - # one of the following happens: - # - # * If response headers have not been delivered to the downstream client, - # a generic 500 error is returned to the client. The error response can be - # tailored by configuring a custom error response in the load balancer. - # - # * If response headers have been delivered, then the HTTP stream to the - # downstream client is reset. - # @!attribute [rw] metadata - # @return [::Google::Protobuf::Struct] - # Optional. The metadata provided here is included as part of the - # `metadata_context` (of type `google.protobuf.Struct`) in the - # `ProcessingRequest` message sent to the extension - # server. The metadata is available under the namespace - # `com.google.authz_extension.`. - # The following variables are supported in the metadata Struct: - # - # `{forwarding_rule_id}` - substituted with the forwarding rule's fully - # qualified resource name. - # @!attribute [rw] forward_headers - # @return [::Array<::String>] - # Optional. List of the HTTP headers to forward to the extension - # (from the client). If omitted, all headers are sent. - # Each element is a string indicating the header name. - # @!attribute [rw] forward_attributes - # @return [::Array<::String>] - # Optional. List of the Envoy attributes to forward to the extension server. - # The attributes provided here are included as part of the - # `ProcessingRequest.attributes` field (of type - # `map`), where the keys are the attribute - # names. Refer to the - # [documentation](https://cloud.google.com/service-extensions/docs/cel-matcher-language-reference#attributes) - # for the names of attributes that can be forwarded. If omitted, no - # attributes are sent. Each element is a string indicating the - # attribute name. - # @!attribute [rw] wire_format - # @return [::Google::Cloud::NetworkServices::V1::WireFormat] - # Optional. The format of communication supported by the callout extension. - # This field is supported only for regional `AuthzExtension` resources. If - # not specified, the default value `EXT_PROC_GRPC` is used. Global - # `AuthzExtension` resources use the `EXT_PROC_GRPC` wire format. - class AuthzExtension - 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 - - # Message for requesting list of `AuthzExtension` resources. - # @!attribute [rw] parent - # @return [::String] - # Required. The project and location from which the `AuthzExtension` - # resources are listed. These values are specified in the following format: - # `projects/{project}/locations/{location}`. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. Requested page size. The server might return fewer items than - # requested. If unspecified, the server picks an appropriate default. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A token identifying a page of results that the server returns. - # @!attribute [rw] filter - # @return [::String] - # Optional. Filtering results. - # @!attribute [rw] order_by - # @return [::String] - # Optional. Hint about how to order the results. - class ListAuthzExtensionsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for response to listing `AuthzExtension` resources. - # @!attribute [rw] authz_extensions - # @return [::Array<::Google::Cloud::NetworkServices::V1::AuthzExtension>] - # The list of `AuthzExtension` resources. - # @!attribute [rw] next_page_token - # @return [::String] - # A token identifying a page of results that the server returns. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Locations that could not be reached. - class ListAuthzExtensionsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for getting a `AuthzExtension` resource. - # @!attribute [rw] name - # @return [::String] - # Required. A name of the `AuthzExtension` resource to get. Must be in - # the format - # `projects/{project}/locations/{location}/authzExtensions/{authz_extension}`. - class GetAuthzExtensionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for creating a `AuthzExtension` resource. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent resource of the `AuthzExtension` resource. Must - # be in the format `projects/{project}/locations/{location}`. - # @!attribute [rw] authz_extension_id - # @return [::String] - # Required. User-provided ID of the `AuthzExtension` resource to be - # created. - # @!attribute [rw] authz_extension - # @return [::Google::Cloud::NetworkServices::V1::AuthzExtension] - # Required. `AuthzExtension` resource to be created. - # @!attribute [rw] request_id - # @return [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server can ignore - # the request if it has already been completed. The server guarantees - # that for 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server ignores the second request This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - class CreateAuthzExtensionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for updating a `AuthzExtension` resource. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. Used to specify the fields to be overwritten in the - # `AuthzExtension` resource by the update. - # The fields specified in the `update_mask` are relative to the resource, not - # the full request. A field is overwritten if it is in the mask. If the - # user does not specify a mask, then all fields are overwritten. - # @!attribute [rw] authz_extension - # @return [::Google::Cloud::NetworkServices::V1::AuthzExtension] - # Required. `AuthzExtension` resource being updated. - # @!attribute [rw] request_id - # @return [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server can ignore - # the request if it has already been completed. The server guarantees - # that for 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server ignores the second request This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - class UpdateAuthzExtensionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for deleting a `AuthzExtension` resource. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the `AuthzExtension` resource to delete. Must - # be in the format - # `projects/{project}/locations/{location}/authzExtensions/{authz_extension}`. - # @!attribute [rw] request_id - # @return [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server can ignore - # the request if it has already been completed. The server guarantees - # that for 60 minutes after the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server ignores the second request This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - class DeleteAuthzExtensionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The part of the request or response for which the extension is called. - module EventType - # Unspecified value. Do not use. - EVENT_TYPE_UNSPECIFIED = 0 - - # If included in `supported_events`, - # the extension is called when the HTTP request headers arrive. - REQUEST_HEADERS = 1 - - # If included in `supported_events`, - # the extension is called when the HTTP request body arrives. - REQUEST_BODY = 2 - - # If included in `supported_events`, - # the extension is called when the HTTP response headers arrive. - RESPONSE_HEADERS = 3 - - # If included in `supported_events`, - # the extension is called when the HTTP response body arrives. - RESPONSE_BODY = 4 - - # If included in `supported_events`, - # the extension is called when the HTTP request trailers arrives. - REQUEST_TRAILERS = 5 - - # If included in `supported_events`, - # the extension is called when the HTTP response trailers arrives. - RESPONSE_TRAILERS = 6 - end - - # Load balancing schemes supported by the `LbTrafficExtension`, - # `LbRouteExtension`, and `LbEdgeExtension` resources. - # For more information, refer to [Backend services - # overview](https://cloud.google.com/load-balancing/docs/backend-service). - module LoadBalancingScheme - # Default value. Do not use. - LOAD_BALANCING_SCHEME_UNSPECIFIED = 0 - - # Signifies that this is used for Internal HTTP(S) Load Balancing. - INTERNAL_MANAGED = 1 - - # Signifies that this is used for External Managed HTTP(S) Load - # Balancing. - EXTERNAL_MANAGED = 2 - end - - # The format of communication supported by the extension. - module WireFormat - # Not specified. - WIRE_FORMAT_UNSPECIFIED = 0 - - # The extension service uses ext_proc gRPC API over a gRPC stream. This is - # the default value if the wire format is not specified. The backend service - # for the extension must use HTTP2 or H2C as the protocol. All - # `supported_events` for a client request are sent as part of the same - # gRPC stream. - EXT_PROC_GRPC = 1 - - # The extension service uses Envoy's `ext_authz` gRPC API. The backend - # service for the extension must use HTTP2 or H2C as the protocol. - # `EXT_AUTHZ_GRPC` is only supported for regional `AuthzExtension` resources. - EXT_AUTHZ_GRPC = 3 - end - - # The send mode for body processing. - module BodySendMode - # Default value. Do not use. - BODY_SEND_MODE_UNSPECIFIED = 0 - - # Calls to the extension are executed in the streamed mode. Subsequent - # chunks will be sent only after the previous chunks have been processed. - # - # The content of the body chunks is sent one way to the extension. Extension - # may send modified chunks back. - # - # This is the default value if the processing mode is not specified. - BODY_SEND_MODE_STREAMED = 1 - - # Calls are executed in the full duplex mode. Subsequent chunks will be sent - # for processing without waiting for the response for the previous chunk or - # for the response for `REQUEST_HEADERS` event. - # - # Extension can freely modify or chunk the body contents. If the extension - # doesn't send the body contents back, the next extension in the chain or the - # upstream will receive an empty body. - BODY_SEND_MODE_FULL_DUPLEX_STREAMED = 2 - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/endpoint_policy.rb b/owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/endpoint_policy.rb deleted file mode 100644 index b58fcb2f402a..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/endpoint_policy.rb +++ /dev/null @@ -1,205 +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 NetworkServices - module V1 - # EndpointPolicy is a resource that helps apply desired configuration - # on the endpoints that match specific criteria. - # For example, this resource can be used to apply "authentication config" - # an all endpoints that serve on port 8080. - # @!attribute [rw] name - # @return [::String] - # Identifier. Name of the EndpointPolicy resource. It matches pattern - # `projects/{project}/locations/*/endpointPolicies/{endpoint_policy}`. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The timestamp when the resource was created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The timestamp when the resource was updated. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. Set of label tags associated with the EndpointPolicy resource. - # @!attribute [rw] type - # @return [::Google::Cloud::NetworkServices::V1::EndpointPolicy::EndpointPolicyType] - # Required. The type of endpoint policy. This is primarily used to validate - # the configuration. - # @!attribute [rw] authorization_policy - # @return [::String] - # Optional. This field specifies the URL of AuthorizationPolicy resource that - # applies authorization policies to the inbound traffic at the - # matched endpoints. Refer to Authorization. If this field is not - # specified, authorization is disabled(no authz checks) for this - # endpoint. - # @!attribute [rw] endpoint_matcher - # @return [::Google::Cloud::NetworkServices::V1::EndpointMatcher] - # Required. A matcher that selects endpoints to which the policies should be - # applied. - # @!attribute [rw] traffic_port_selector - # @return [::Google::Cloud::NetworkServices::V1::TrafficPortSelector] - # Optional. Port selector for the (matched) endpoints. If no port selector is - # provided, the matched config is applied to all ports. - # @!attribute [rw] description - # @return [::String] - # Optional. A free-text description of the resource. Max length 1024 - # characters. - # @!attribute [rw] server_tls_policy - # @return [::String] - # Optional. A URL referring to ServerTlsPolicy resource. ServerTlsPolicy is - # used to determine the authentication policy to be applied to terminate the - # inbound traffic at the identified backends. If this field is not set, - # authentication is disabled(open) for this endpoint. - # @!attribute [rw] client_tls_policy - # @return [::String] - # Optional. A URL referring to a ClientTlsPolicy resource. ClientTlsPolicy - # can be set to specify the authentication for traffic from the proxy to the - # actual endpoints. More specifically, it is applied to the outgoing traffic - # from the proxy to the endpoint. This is typically used for sidecar model - # where the proxy identifies itself as endpoint to the control plane, with - # the connection between sidecar and endpoint requiring authentication. If - # this field is not set, authentication is disabled(open). Applicable only - # when EndpointPolicyType is SIDECAR_PROXY. - class EndpointPolicy - 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 - - # The type of endpoint policy. - module EndpointPolicyType - # Default value. Must not be used. - ENDPOINT_POLICY_TYPE_UNSPECIFIED = 0 - - # Represents a proxy deployed as a sidecar. - SIDECAR_PROXY = 1 - - # Represents a proxyless gRPC backend. - GRPC_SERVER = 2 - end - end - - # Request used with the ListEndpointPolicies method. - # @!attribute [rw] parent - # @return [::String] - # Required. The project and location from which the EndpointPolicies should - # be listed, specified in the format `projects/*/locations/*`. - # @!attribute [rw] page_size - # @return [::Integer] - # Maximum number of EndpointPolicies to return per call. - # @!attribute [rw] page_token - # @return [::String] - # The value returned by the last `ListEndpointPoliciesResponse` - # Indicates that this is a continuation of a prior - # `ListEndpointPolicies` call, and that the system should return the - # next page of data. - # @!attribute [rw] return_partial_success - # @return [::Boolean] - # Optional. If true, allow partial responses for multi-regional Aggregated - # List requests. Otherwise if one of the locations is down or unreachable, - # the Aggregated List request will fail. - class ListEndpointPoliciesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response returned by the ListEndpointPolicies method. - # @!attribute [rw] endpoint_policies - # @return [::Array<::Google::Cloud::NetworkServices::V1::EndpointPolicy>] - # List of EndpointPolicy resources. - # @!attribute [rw] next_page_token - # @return [::String] - # If there might be more results than those appearing in this response, then - # `next_page_token` is included. To get the next set of results, call this - # method again using the value of `next_page_token` as `page_token`. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Unreachable resources. Populated when the request opts into - # {::Google::Cloud::NetworkServices::V1::ListEndpointPoliciesRequest#return_partial_success return_partial_success} - # and reading across collections e.g. when - # attempting to list all resources across all supported locations. - class ListEndpointPoliciesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request used with the GetEndpointPolicy method. - # @!attribute [rw] name - # @return [::String] - # Required. A name of the EndpointPolicy to get. Must be in the format - # `projects/*/locations/*/endpointPolicies/*`. - class GetEndpointPolicyRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request used with the CreateEndpointPolicy method. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent resource of the EndpointPolicy. Must be in the - # format `projects/*/locations/*`. - # @!attribute [rw] endpoint_policy_id - # @return [::String] - # Required. Short name of the EndpointPolicy resource to be created. - # E.g. "CustomECS". - # @!attribute [rw] endpoint_policy - # @return [::Google::Cloud::NetworkServices::V1::EndpointPolicy] - # Required. EndpointPolicy resource to be created. - class CreateEndpointPolicyRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request used with the UpdateEndpointPolicy method. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Optional. Field mask is used to specify the fields to be overwritten in the - # EndpointPolicy resource by the update. - # The fields specified in the update_mask are relative to the resource, not - # the full request. A field will be overwritten if it is in the mask. If the - # user does not provide a mask then all fields will be overwritten. - # @!attribute [rw] endpoint_policy - # @return [::Google::Cloud::NetworkServices::V1::EndpointPolicy] - # Required. Updated EndpointPolicy resource. - class UpdateEndpointPolicyRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request used with the DeleteEndpointPolicy method. - # @!attribute [rw] name - # @return [::String] - # Required. A name of the EndpointPolicy to delete. Must be in the format - # `projects/*/locations/*/endpointPolicies/*`. - class DeleteEndpointPolicyRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/extensibility.rb b/owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/extensibility.rb deleted file mode 100644 index 28a43c60a318..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/extensibility.rb +++ /dev/null @@ -1,575 +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 NetworkServices - module V1 - # `WasmPlugin` is a resource representing a service executing - # a customer-provided Wasm module. - # @!attribute [rw] name - # @return [::String] - # Identifier. Name of the `WasmPlugin` resource in the following format: - # `projects/{project}/locations/{location}/wasmPlugins/{wasm_plugin}`. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The timestamp when the resource was created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The timestamp when the resource was updated. - # @!attribute [rw] description - # @return [::String] - # Optional. A human-readable description of the resource. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. Set of labels associated with the `WasmPlugin` resource. - # - # The format must comply with [the following - # requirements](/compute/docs/labeling-resources#requirements). - # @!attribute [rw] main_version_id - # @return [::String] - # Optional. The ID of the `WasmPluginVersion` resource that is the - # currently serving one. The version referred to must be a child of this - # `WasmPlugin` resource. - # @!attribute [rw] log_config - # @return [::Google::Cloud::NetworkServices::V1::WasmPlugin::LogConfig] - # Optional. Specifies the logging options for the activity performed by this - # plugin. If logging is enabled, plugin logs are exported to - # Cloud Logging. - # Note that the settings relate to the logs generated by using - # logging statements in your Wasm code. - # @!attribute [rw] versions - # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::NetworkServices::V1::WasmPlugin::VersionDetails}] - # Optional. All versions of this `WasmPlugin` resource in the key-value - # format. The key is the resource ID, and the value is the `VersionDetails` - # object. - # - # Lets you create or update a `WasmPlugin` resource and its versions in a - # single request. When the `main_version_id` field is not empty, it must - # point to one of the `VersionDetails` objects in the map. - # - # If provided in a `PATCH` request, the new versions replace the - # previous set. Any version omitted from the `versions` field is removed. - # Because the `WasmPluginVersion` resource is immutable, if a - # `WasmPluginVersion` resource with the same name already exists and differs, - # the request fails. - # - # Note: In a `GET` request, this field is populated only if the field - # `GetWasmPluginRequest.view` is set to `WASM_PLUGIN_VIEW_FULL`. - # @!attribute [r] used_by - # @return [::Array<::Google::Cloud::NetworkServices::V1::WasmPlugin::UsedBy>] - # Output only. List of all - # [extensions](https://cloud.google.com/service-extensions/docs/overview) - # that use this `WasmPlugin` resource. - class WasmPlugin - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Details of a `WasmPluginVersion` resource to be inlined in the - # `WasmPlugin` resource. - # @!attribute [rw] plugin_config_data - # @return [::String] - # Configuration for the plugin. - # The configuration is provided to the plugin at runtime through - # the `ON_CONFIGURE` callback. When a new - # `WasmPluginVersion` version is created, the digest of the - # contents is saved in the `plugin_config_digest` field. - # - # Note: The following fields are mutually exclusive: `plugin_config_data`, `plugin_config_uri`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] plugin_config_uri - # @return [::String] - # URI of the plugin configuration stored in the Artifact Registry. - # The configuration is provided to the plugin at runtime through - # the `ON_CONFIGURE` callback. - # - # The URI can refer to one of the following repository formats: - # - # * Container images: the `plugin_config_uri` must point to a container - # that contains a single file with the name `plugin.config`. - # When a new `WasmPluginVersion` resource is created, the digest of the - # image is saved in the `plugin_config_digest` field. - # When pulling a container image from Artifact Registry, the digest - # value is used instead of an image tag. - # - # * Generic artifacts: the `plugin_config_uri` must be in this format: - # `projects/{project}/locations/{location}/repositories/{repository}/ - # genericArtifacts/\\{package}:\\{version}`. - # The specified package and version must contain a file with the name - # `plugin.config`. When a new `WasmPluginVersion` resource is - # created, the checksum of the contents of the file is saved in the - # `plugin_config_digest` field. - # - # Note: The following fields are mutually exclusive: `plugin_config_uri`, `plugin_config_data`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The timestamp when the resource was created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The timestamp when the resource was updated. - # @!attribute [rw] description - # @return [::String] - # Optional. A human-readable description of the resource. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. Set of labels associated with the `WasmPluginVersion` - # resource. - # @!attribute [rw] image_uri - # @return [::String] - # Optional. URI of the image containing the Wasm module, stored in - # Artifact Registry. - # - # The URI can refer to one of the following repository formats: - # - # * Container images: the `image_uri` must point to a container that - # contains a single file with the name `plugin.wasm`. - # When a new `WasmPluginVersion` resource is created, the digest of the - # image is saved in the `image_digest` field. - # When pulling a container image from Artifact Registry, the digest value - # is used instead of an image tag. - # - # * Generic artifacts: the `image_uri` must be in this format: - # `projects/{project}/locations/{location}/repositories/{repository}/ - # genericArtifacts/\\{package}:\\{version}`. - # The specified package and version must contain a file with the name - # `plugin.wasm`. When a new `WasmPluginVersion` resource is created, the - # checksum of the contents of the file is saved in the `image_digest` - # field. - # @!attribute [r] image_digest - # @return [::String] - # Output only. This field holds the digest (usually checksum) value for the - # plugin image. The value is calculated based on the `image_uri` field. If - # the `image_uri` field refers to a container image, the digest value is - # obtained from the container image. If the `image_uri` field refers to - # a generic artifact, the digest value is calculated based on the - # contents of the file. - # @!attribute [r] plugin_config_digest - # @return [::String] - # Output only. This field holds the digest (usually checksum) value for the - # plugin configuration. The value is calculated based on the contents of - # `plugin_config_data` field or the image defined by the - # `plugin_config_uri` field. - class VersionDetails - 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 - - # Specifies the logging options for the activity performed by this - # plugin. If logging is enabled, plugin logs are exported to - # Cloud Logging. - # @!attribute [rw] enable - # @return [::Boolean] - # Optional. Specifies whether to enable logging for activity by this - # plugin. - # - # Defaults to `false`. - # @!attribute [rw] sample_rate - # @return [::Float] - # Non-empty default. Configures the sampling rate of activity logs, where - # `1.0` means all logged activity is reported and `0.0` means no activity - # is reported. A floating point value between `0.0` and `1.0` indicates - # that a percentage of log messages is stored. - # - # The default value when logging is enabled is `1.0`. The value of the - # field must be between `0` and `1` (inclusive). - # - # This field can be specified only if logging is enabled for this plugin. - # @!attribute [rw] min_log_level - # @return [::Google::Cloud::NetworkServices::V1::WasmPlugin::LogConfig::LogLevel] - # Non-empty default. Specifies the lowest level of the plugin logs that are - # exported to Cloud Logging. This setting relates to the logs generated by - # using logging statements in your Wasm code. - # - # This field is can be set only if logging is enabled for the plugin. - # - # If the field is not provided when logging is enabled, it is set to - # `INFO` by default. - class LogConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Possible values to specify the lowest level of logs to be exported to - # Cloud Logging. - module LogLevel - # Unspecified value. Defaults to `LogLevel.INFO`. - LOG_LEVEL_UNSPECIFIED = 0 - - # Report logs with TRACE level and above. - TRACE = 1 - - # Report logs with DEBUG level and above. - DEBUG = 2 - - # Report logs with INFO level and above. - INFO = 3 - - # Report logs with WARN level and above. - WARN = 4 - - # Report logs with ERROR level and above. - ERROR = 5 - - # Report logs with CRITICAL level only. - CRITICAL = 6 - end - end - - # Defines a resource that uses the `WasmPlugin` resource. - # @!attribute [r] name - # @return [::String] - # Output only. Full name of the resource - # https://google.aip.dev/122#full-resource-names, for example - # `//networkservices.googleapis.com/projects/{project}/locations/{location}/lbRouteExtensions/{extension}` - class UsedBy - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class LabelsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::Google::Cloud::NetworkServices::V1::WasmPlugin::VersionDetails] - class VersionsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # A single immutable version of a `WasmPlugin` resource. - # Defines the Wasm module used and optionally its runtime config. - # @!attribute [rw] plugin_config_data - # @return [::String] - # Configuration for the plugin. - # The configuration is provided to the plugin at runtime through - # the `ON_CONFIGURE` callback. When a new - # `WasmPluginVersion` resource is created, the digest of the - # contents is saved in the `plugin_config_digest` field. - # - # Note: The following fields are mutually exclusive: `plugin_config_data`, `plugin_config_uri`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] plugin_config_uri - # @return [::String] - # URI of the plugin configuration stored in the Artifact Registry. - # The configuration is provided to the plugin at runtime through - # the `ON_CONFIGURE` callback. - # - # The URI can refer to one of the following repository formats: - # - # * Container images: the `plugin_config_uri` must point to a container - # that contains a single file with the name `plugin.config`. - # When a new `WasmPluginVersion` resource is created, the digest of the - # image is saved in the `plugin_config_digest` field. - # When pulling a container image from Artifact Registry, the digest - # value is used instead of an image tag. - # - # * Generic artifacts: the `plugin_config_uri` must be in this format: - # `projects/{project}/locations/{location}/repositories/{repository}/ - # genericArtifacts/\\{package}:\\{version}`. - # The specified package and version must contain a file with the name - # `plugin.config`. When a new `WasmPluginVersion` resource is - # created, the checksum of the contents of the file is saved in the - # `plugin_config_digest` field. - # - # Note: The following fields are mutually exclusive: `plugin_config_uri`, `plugin_config_data`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] name - # @return [::String] - # Identifier. Name of the `WasmPluginVersion` resource in the following - # format: `projects/{project}/locations/{location}/wasmPlugins/{wasm_plugin}/ - # versions/\\{wasm_plugin_version}`. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The timestamp when the resource was created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The timestamp when the resource was updated. - # @!attribute [rw] description - # @return [::String] - # Optional. A human-readable description of the resource. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. Set of labels associated with the `WasmPluginVersion` - # resource. - # @!attribute [rw] image_uri - # @return [::String] - # Optional. URI of the image containing the Wasm module, stored in - # Artifact Registry. - # - # The URI can refer to one of the following repository formats: - # - # * Container images: the `image_uri` must point to a container that - # contains a single file with the name `plugin.wasm`. - # When a new `WasmPluginVersion` resource is created, the digest of the - # image is saved in the `image_digest` field. - # When pulling a container image from Artifact Registry, the digest value - # is used instead of an image tag. - # - # * Generic artifacts: the `image_uri` must be in this format: - # `projects/{project}/locations/{location}/repositories/{repository}/ - # genericArtifacts/\\{package}:\\{version}`. - # The specified package and version must contain a file with the name - # `plugin.wasm`. When a new `WasmPluginVersion` resource is created, the - # checksum of the contents of the file is saved in the `image_digest` - # field. - # @!attribute [r] image_digest - # @return [::String] - # Output only. This field holds the digest (usually checksum) value for the - # plugin image. The value is calculated based on the `image_uri` field. If - # the `image_uri` field refers to a container image, the digest value is - # obtained from the container image. If the `image_uri` field refers to - # a generic artifact, the digest value is calculated based on the - # contents of the file. - # @!attribute [r] plugin_config_digest - # @return [::String] - # Output only. This field holds the digest (usually checksum) value for the - # plugin configuration. The value is calculated based on the contents of - # `plugin_config_data` field or the image defined by the - # `plugin_config_uri` field. - class WasmPluginVersion - 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 - - # Request used with the `ListWasmPlugins` method. - # @!attribute [rw] parent - # @return [::String] - # Required. The project and location from which the `WasmPlugin` resources - # are listed, specified in the following format: - # `projects/{project}/locations/global`. - # @!attribute [rw] page_size - # @return [::Integer] - # Maximum number of `WasmPlugin` resources to return per call. - # If not specified, at most 50 `WasmPlugin` resources are returned. - # The maximum value is 1000; values above 1000 are coerced to 1000. - # @!attribute [rw] page_token - # @return [::String] - # The value returned by the last `ListWasmPluginsResponse` call. - # Indicates that this is a continuation of a prior - # `ListWasmPlugins` call, and that the - # next page of data is to be returned. - class ListWasmPluginsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response returned by the `ListWasmPlugins` method. - # @!attribute [rw] wasm_plugins - # @return [::Array<::Google::Cloud::NetworkServices::V1::WasmPlugin>] - # List of `WasmPlugin` resources. - # @!attribute [rw] next_page_token - # @return [::String] - # If there might be more results than those appearing in this response, then - # `next_page_token` is included. To get the next set of results, - # call this method again using the value of `next_page_token` as - # `page_token`. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Unreachable resources. Populated when the request attempts to list all - # resources across all supported locations, while some locations are - # temporarily unavailable. - class ListWasmPluginsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request used by the `GetWasmPlugin` method. - # @!attribute [rw] name - # @return [::String] - # Required. A name of the `WasmPlugin` resource to get. Must be in the - # format `projects/{project}/locations/global/wasmPlugins/{wasm_plugin}`. - # @!attribute [rw] view - # @return [::Google::Cloud::NetworkServices::V1::WasmPluginView] - # Determines how much data must be returned in the response. See - # [AIP-157](https://google.aip.dev/157). - class GetWasmPluginRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request used by the `CreateWasmPlugin` method. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent resource of the `WasmPlugin` resource. Must be in the - # format `projects/{project}/locations/global`. - # @!attribute [rw] wasm_plugin_id - # @return [::String] - # Required. User-provided ID of the `WasmPlugin` resource to be created. - # @!attribute [rw] wasm_plugin - # @return [::Google::Cloud::NetworkServices::V1::WasmPlugin] - # Required. `WasmPlugin` resource to be created. - class CreateWasmPluginRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request used by the `UpdateWasmPlugin` method. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Optional. Used to specify the fields to be overwritten in the - # `WasmPlugin` resource by the update. - # The fields specified in the `update_mask` field are relative to the - # resource, not the full request. - # An omitted `update_mask` field is treated as an implied `update_mask` - # field equivalent to all fields that are populated (that have a non-empty - # value). - # The `update_mask` field supports a special value `*`, which means that - # each field in the given `WasmPlugin` resource (including the empty ones) - # replaces the current value. - # @!attribute [rw] wasm_plugin - # @return [::Google::Cloud::NetworkServices::V1::WasmPlugin] - # Required. Updated `WasmPlugin` resource. - class UpdateWasmPluginRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request used by the `DeleteWasmPlugin` method. - # @!attribute [rw] name - # @return [::String] - # Required. A name of the `WasmPlugin` resource to delete. Must be in the - # format `projects/{project}/locations/global/wasmPlugins/{wasm_plugin}`. - class DeleteWasmPluginRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request used with the `ListWasmPluginVersions` method. - # @!attribute [rw] parent - # @return [::String] - # Required. The `WasmPlugin` resource whose `WasmPluginVersion`s - # are listed, specified in the following format: - # `projects/{project}/locations/global/wasmPlugins/{wasm_plugin}`. - # @!attribute [rw] page_size - # @return [::Integer] - # Maximum number of `WasmPluginVersion` resources to return per - # call. If not specified, at most 50 `WasmPluginVersion` resources are - # returned. The maximum value is 1000; values above 1000 are coerced to - # 1000. - # @!attribute [rw] page_token - # @return [::String] - # The value returned by the last `ListWasmPluginVersionsResponse` call. - # Indicates that this is a continuation of a prior - # `ListWasmPluginVersions` call, and that the - # next page of data is to be returned. - class ListWasmPluginVersionsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response returned by the `ListWasmPluginVersions` method. - # @!attribute [rw] wasm_plugin_versions - # @return [::Array<::Google::Cloud::NetworkServices::V1::WasmPluginVersion>] - # List of `WasmPluginVersion` resources. - # @!attribute [rw] next_page_token - # @return [::String] - # If there might be more results than those appearing in this response, then - # `next_page_token` is included. To get the next set of results, - # call this method again using the value of `next_page_token` as - # `page_token`. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Unreachable resources. Populated when the request attempts to list all - # resources across all supported locations, while some locations are - # temporarily unavailable. - class ListWasmPluginVersionsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request used by the `GetWasmPluginVersion` method. - # @!attribute [rw] name - # @return [::String] - # Required. A name of the `WasmPluginVersion` resource to get. Must be in - # the format - # `projects/{project}/locations/global/wasmPlugins/{wasm_plugin}/versions/{wasm_plugin_version}`. - class GetWasmPluginVersionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request used by the `CreateWasmPluginVersion` method. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent resource of the `WasmPluginVersion` resource. Must be - # in the format - # `projects/{project}/locations/global/wasmPlugins/{wasm_plugin}`. - # @!attribute [rw] wasm_plugin_version_id - # @return [::String] - # Required. User-provided ID of the `WasmPluginVersion` resource to be - # created. - # @!attribute [rw] wasm_plugin_version - # @return [::Google::Cloud::NetworkServices::V1::WasmPluginVersion] - # Required. `WasmPluginVersion` resource to be created. - class CreateWasmPluginVersionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request used by the `DeleteWasmPluginVersion` method. - # @!attribute [rw] name - # @return [::String] - # Required. A name of the `WasmPluginVersion` resource to delete. Must be in - # the format - # `projects/{project}/locations/global/wasmPlugins/{wasm_plugin}/versions/{wasm_plugin_version}`. - class DeleteWasmPluginVersionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Determines the information that should be returned by the server. - module WasmPluginView - # Unspecified value. Do not use. - WASM_PLUGIN_VIEW_UNSPECIFIED = 0 - - # If specified in the `GET` request for a `WasmPlugin` resource, the server's - # response includes just the `WasmPlugin` resource. - WASM_PLUGIN_VIEW_BASIC = 1 - - # If specified in the `GET` request for a `WasmPlugin` resource, the server's - # response includes the `WasmPlugin` resource with all its versions. - WASM_PLUGIN_VIEW_FULL = 2 - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/gateway.rb b/owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/gateway.rb deleted file mode 100644 index 5128a5599c3c..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/gateway.rb +++ /dev/null @@ -1,285 +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 NetworkServices - module V1 - # Gateway represents the configuration for a proxy, typically a load balancer. - # It captures the ip:port over which the services are exposed by the proxy, - # along with any policy configurations. Routes have reference to to Gateways to - # dictate how requests should be routed by this Gateway. - # @!attribute [rw] name - # @return [::String] - # Identifier. Name of the Gateway resource. It matches pattern - # `projects/*/locations/*/gateways/`. - # @!attribute [r] self_link - # @return [::String] - # Output only. Server-defined URL of this resource - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The timestamp when the resource was created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The timestamp when the resource was updated. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. Set of label tags associated with the Gateway resource. - # @!attribute [rw] description - # @return [::String] - # Optional. A free-text description of the resource. Max length 1024 - # characters. - # @!attribute [rw] type - # @return [::Google::Cloud::NetworkServices::V1::Gateway::Type] - # Immutable. The type of the customer managed gateway. - # This field is required. If unspecified, an error is returned. - # @!attribute [rw] addresses - # @return [::Array<::String>] - # Optional. Zero or one IPv4 or IPv6 address on which the Gateway will - # receive the traffic. When no address is provided, an IP from the subnetwork - # is allocated - # - # This field only applies to gateways of type 'SECURE_WEB_GATEWAY'. - # Gateways of type 'OPEN_MESH' listen on 0.0.0.0 for IPv4 and :: for IPv6. - # @!attribute [rw] ports - # @return [::Array<::Integer>] - # Required. One or more port numbers (1-65535), on which the Gateway will - # receive traffic. The proxy binds to the specified ports. - # Gateways of type 'SECURE_WEB_GATEWAY' are limited to 5 ports. - # Gateways of type 'OPEN_MESH' listen on 0.0.0.0 for IPv4 and :: for IPv6 and - # support multiple ports. - # @!attribute [rw] all_ports - # @return [::Boolean] - # Optional. If true, the Gateway will listen on all ports. This is mutually - # exclusive with the `ports` field. This field only applies to gateways of - # type 'SECURE_WEB_GATEWAY'. - # @!attribute [rw] scope - # @return [::String] - # Optional. Scope determines how configuration across multiple Gateway - # instances are merged. The configuration for multiple Gateway instances with - # the same scope will be merged as presented as a single configuration to the - # proxy/load balancer. - # - # Max length 64 characters. - # Scope should start with a letter and can only have letters, numbers, - # hyphens. - # @!attribute [rw] server_tls_policy - # @return [::String] - # Optional. A fully-qualified ServerTLSPolicy URL reference. Specifies how - # TLS traffic is terminated. If empty, TLS termination is disabled. - # @!attribute [rw] certificate_urls - # @return [::Array<::String>] - # Optional. A fully-qualified Certificates URL reference. The proxy presents - # a Certificate (selected based on SNI) when establishing a TLS connection. - # This feature only applies to gateways of type 'SECURE_WEB_GATEWAY'. - # @!attribute [rw] gateway_security_policy - # @return [::String] - # Optional. A fully-qualified GatewaySecurityPolicy URL reference. - # Defines how a server should apply security policy to inbound - # (VM to Proxy) initiated connections. - # - # For example: - # `projects/*/locations/*/gatewaySecurityPolicies/swg-policy`. - # - # This policy is specific to gateways of type 'SECURE_WEB_GATEWAY'. - # @!attribute [rw] network - # @return [::String] - # Optional. The relative resource name identifying the VPC network that is - # using this configuration. For example: - # `projects/*/global/networks/network-1`. - # - # Currently, this field is specific to gateways of type 'SECURE_WEB_GATEWAY'. - # @!attribute [rw] subnetwork - # @return [::String] - # Optional. The relative resource name identifying the subnetwork in which - # this SWG is allocated. For example: - # `projects/*/regions/us-central1/subnetworks/network-1` - # - # Currently, this field is specific to gateways of type 'SECURE_WEB_GATEWAY". - # @!attribute [rw] ip_version - # @return [::Google::Cloud::NetworkServices::V1::Gateway::IpVersion] - # Optional. The IP Version that will be used by this gateway. Valid options - # are IPV4 or IPV6. Default is IPV4. - # @!attribute [rw] envoy_headers - # @return [::Google::Cloud::NetworkServices::V1::EnvoyHeaders] - # Optional. Determines if envoy will insert internal debug headers into - # upstream requests. Other Envoy headers may still be injected. By default, - # envoy will not insert any debug headers. - # @!attribute [rw] routing_mode - # @return [::Google::Cloud::NetworkServices::V1::Gateway::RoutingMode] - # Optional. The routing mode of the Gateway. - # This field is configurable only for gateways of type SECURE_WEB_GATEWAY. - # This field is required for gateways of type SECURE_WEB_GATEWAY. - # @!attribute [rw] allow_global_access - # @return [::Boolean] - # Optional. If true, the gateway will allow traffic from clients outside of - # the region where the gateway is located. - # This field is configurable only for gateways of type SECURE_WEB_GATEWAY. - class Gateway - 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 - - # The type of the customer-managed gateway. - # Possible values are: - # * OPEN_MESH - # * SECURE_WEB_GATEWAY - module Type - # The type of the customer managed gateway is unspecified. - TYPE_UNSPECIFIED = 0 - - # The type of the customer managed gateway is TrafficDirector Open - # Mesh. - OPEN_MESH = 1 - - # The type of the customer managed gateway is SecureWebGateway (SWG). - SECURE_WEB_GATEWAY = 2 - end - - # The types of IP version for the gateway. - # Possible values are: - # * IPV4 - # * IPV6 - module IpVersion - # The type when IP version is not specified. Defaults to IPV4. - IP_VERSION_UNSPECIFIED = 0 - - # The type for IP version 4. - IPV4 = 1 - - # The type for IP version 6. - IPV6 = 2 - end - - # The routing mode of the Gateway, to determine how the Gateway routes - # traffic. Today, this field only applies to Gateways of type - # SECURE_WEB_GATEWAY. Possible values are: - # * EXPLICIT_ROUTING_MODE - # * NEXT_HOP_ROUTING_MODE - module RoutingMode - # The routing mode is explicit; clients are configured to send - # traffic through the gateway. This is the default routing mode. - EXPLICIT_ROUTING_MODE = 0 - - # The routing mode is next-hop. Clients are unaware of the gateway, - # and a route (advanced route or other route type) - # can be configured to direct traffic from client to gateway. - # The gateway then acts as a next-hop to the destination. - NEXT_HOP_ROUTING_MODE = 1 - end - end - - # Request used with the ListGateways method. - # @!attribute [rw] parent - # @return [::String] - # Required. The project and location from which the Gateways should be - # listed, specified in the format `projects/*/locations/*`. - # @!attribute [rw] page_size - # @return [::Integer] - # Maximum number of Gateways to return per call. - # @!attribute [rw] page_token - # @return [::String] - # The value returned by the last `ListGatewaysResponse` - # Indicates that this is a continuation of a prior `ListGateways` call, - # and that the system should return the next page of data. - class ListGatewaysRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response returned by the ListGateways method. - # @!attribute [rw] gateways - # @return [::Array<::Google::Cloud::NetworkServices::V1::Gateway>] - # List of Gateway resources. - # @!attribute [rw] next_page_token - # @return [::String] - # If there might be more results than those appearing in this response, then - # `next_page_token` is included. To get the next set of results, call this - # method again using the value of `next_page_token` as `page_token`. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Locations that could not be reached. - class ListGatewaysResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request used by the GetGateway method. - # @!attribute [rw] name - # @return [::String] - # Required. A name of the Gateway to get. Must be in the format - # `projects/*/locations/*/gateways/*`. - class GetGatewayRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request used by the CreateGateway method. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent resource of the Gateway. Must be in the - # format `projects/*/locations/*`. - # @!attribute [rw] gateway_id - # @return [::String] - # Required. Short name of the Gateway resource to be created. - # @!attribute [rw] gateway - # @return [::Google::Cloud::NetworkServices::V1::Gateway] - # Required. Gateway resource to be created. - class CreateGatewayRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request used by the UpdateGateway method. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Optional. Field mask is used to specify the fields to be overwritten in the - # Gateway resource by the update. - # The fields specified in the update_mask are relative to the resource, not - # the full request. A field will be overwritten if it is in the mask. If the - # user does not provide a mask then all fields will be overwritten. - # @!attribute [rw] gateway - # @return [::Google::Cloud::NetworkServices::V1::Gateway] - # Required. Updated Gateway resource. - class UpdateGatewayRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request used by the DeleteGateway method. - # @!attribute [rw] name - # @return [::String] - # Required. A name of the Gateway to delete. Must be in the format - # `projects/*/locations/*/gateways/*`. - class DeleteGatewayRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/grpc_route.rb b/owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/grpc_route.rb deleted file mode 100644 index a90b494733c7..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/grpc_route.rb +++ /dev/null @@ -1,474 +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 NetworkServices - module V1 - # GrpcRoute is the resource defining how gRPC traffic routed by a Mesh - # or Gateway resource is routed. - # @!attribute [rw] name - # @return [::String] - # Identifier. Name of the GrpcRoute resource. It matches pattern - # `projects/*/locations/*/grpcRoutes/` - # @!attribute [r] self_link - # @return [::String] - # Output only. Server-defined URL of this resource - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The timestamp when the resource was created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The timestamp when the resource was updated. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. Set of label tags associated with the GrpcRoute resource. - # @!attribute [rw] description - # @return [::String] - # Optional. A free-text description of the resource. Max length 1024 - # characters. - # @!attribute [rw] hostnames - # @return [::Array<::String>] - # Required. Service hostnames with an optional port for which this route - # describes traffic. - # - # Format: [:] - # - # Hostname is the fully qualified domain name of a network host. This matches - # the RFC 1123 definition of a hostname with 2 notable exceptions: - # - IPs are not allowed. - # - A hostname may be prefixed with a wildcard label (`*.`). The wildcard - # label must appear by itself as the first label. - # - # Hostname can be "precise" which is a domain name without the terminating - # dot of a network host (e.g. `foo.example.com`) or "wildcard", which is a - # domain name prefixed with a single wildcard label (e.g. `*.example.com`). - # - # Note that as per RFC1035 and RFC1123, a label must consist of lower case - # alphanumeric characters or '-', and must start and end with an alphanumeric - # character. No other punctuation is allowed. - # - # The routes associated with a Mesh or Gateway must have unique hostnames. If - # you attempt to attach multiple routes with conflicting hostnames, the - # configuration will be rejected. - # - # For example, while it is acceptable for routes for the hostnames - # `*.foo.bar.com` and `*.bar.com` to be associated with the same route, it is - # not possible to associate two routes both with `*.bar.com` or both with - # `bar.com`. - # - # If a port is specified, then gRPC clients must use the channel URI with the - # port to match this rule (i.e. "xds:///service:123"), otherwise they must - # supply the URI without a port (i.e. "xds:///service"). - # @!attribute [rw] meshes - # @return [::Array<::String>] - # Optional. Meshes defines a list of meshes this GrpcRoute is attached to, as - # one of the routing rules to route the requests served by the mesh. - # - # Each mesh reference should match the pattern: - # `projects/*/locations/*/meshes/` - # @!attribute [rw] gateways - # @return [::Array<::String>] - # Optional. Gateways defines a list of gateways this GrpcRoute is attached - # to, as one of the routing rules to route the requests served by the - # gateway. - # - # Each gateway reference should match the pattern: - # `projects/*/locations/*/gateways/` - # @!attribute [rw] rules - # @return [::Array<::Google::Cloud::NetworkServices::V1::GrpcRoute::RouteRule>] - # Required. A list of detailed rules defining how to route traffic. - # - # Within a single GrpcRoute, the GrpcRoute.RouteAction associated with the - # first matching GrpcRoute.RouteRule will be executed. At least one rule - # must be supplied. - class GrpcRoute - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Specifies a match against a method. - # @!attribute [rw] type - # @return [::Google::Cloud::NetworkServices::V1::GrpcRoute::MethodMatch::Type] - # Optional. Specifies how to match against the name. If not specified, a - # default value of "EXACT" is used. - # @!attribute [rw] grpc_service - # @return [::String] - # Required. Name of the service to match against. If unspecified, will - # match all services. - # @!attribute [rw] grpc_method - # @return [::String] - # Required. Name of the method to match against. If unspecified, will match - # all methods. - # @!attribute [rw] case_sensitive - # @return [::Boolean] - # Optional. Specifies that matches are case sensitive. The default value - # is true. case_sensitive must not be used with a type of - # REGULAR_EXPRESSION. - class MethodMatch - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The type of the match. - module Type - # Unspecified. - TYPE_UNSPECIFIED = 0 - - # Will only match the exact name provided. - EXACT = 1 - - # Will interpret grpc_method and grpc_service as regexes. RE2 syntax is - # supported. - REGULAR_EXPRESSION = 2 - end - end - - # A match against a collection of headers. - # @!attribute [rw] type - # @return [::Google::Cloud::NetworkServices::V1::GrpcRoute::HeaderMatch::Type] - # Optional. Specifies how to match against the value of the header. If not - # specified, a default value of EXACT is used. - # @!attribute [rw] key - # @return [::String] - # Required. The key of the header. - # @!attribute [rw] value - # @return [::String] - # Required. The value of the header. - class HeaderMatch - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The type of match. - module Type - # Unspecified. - TYPE_UNSPECIFIED = 0 - - # Will only match the exact value provided. - EXACT = 1 - - # Will match paths conforming to the prefix specified by value. RE2 - # syntax is supported. - REGULAR_EXPRESSION = 2 - end - end - - # Criteria for matching traffic. A RouteMatch will be considered to match - # when all supplied fields match. - # @!attribute [rw] method - # @return [::Google::Cloud::NetworkServices::V1::GrpcRoute::MethodMatch] - # Optional. A gRPC method to match against. If this field is empty or - # omitted, will match all methods. - # @!attribute [rw] headers - # @return [::Array<::Google::Cloud::NetworkServices::V1::GrpcRoute::HeaderMatch>] - # Optional. Specifies a collection of headers to match. - class RouteMatch - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The destination to which traffic will be routed. - # @!attribute [rw] service_name - # @return [::String] - # Required. The URL of a destination service to which to route traffic. - # Must refer to either a BackendService or ServiceDirectoryService. - # @!attribute [rw] weight - # @return [::Integer] - # Optional. Specifies the proportion of requests forwarded to the backend - # referenced by the serviceName field. This is computed as: - # - weight/Sum(weights in this destination list). - # For non-zero values, there may be some epsilon from the exact proportion - # defined here depending on the precision an implementation supports. - # - # If only one serviceName is specified and it has a weight greater than 0, - # 100% of the traffic is forwarded to that backend. - # - # If weights are specified for any one service name, they need to be - # specified for all of them. - # - # If weights are unspecified for all services, then, traffic is distributed - # in equal proportions to all of them. - class Destination - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The specification for fault injection introduced into traffic to test the - # resiliency of clients to destination service failure. As part of fault - # injection, when clients send requests to a destination, delays can be - # introduced on a percentage of requests before sending those requests to the - # destination service. Similarly requests from clients can be aborted by for - # a percentage of requests. - # @!attribute [rw] delay - # @return [::Google::Cloud::NetworkServices::V1::GrpcRoute::FaultInjectionPolicy::Delay] - # The specification for injecting delay to client requests. - # @!attribute [rw] abort - # @return [::Google::Cloud::NetworkServices::V1::GrpcRoute::FaultInjectionPolicy::Abort] - # The specification for aborting to client requests. - class FaultInjectionPolicy - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Specification of how client requests are delayed as part of fault - # injection before being sent to a destination. - # @!attribute [rw] fixed_delay - # @return [::Google::Protobuf::Duration] - # Specify a fixed delay before forwarding the request. - # @!attribute [rw] percentage - # @return [::Integer] - # The percentage of traffic on which delay will be injected. - # - # The value must be between [0, 100] - class Delay - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Specification of how client requests are aborted as part of fault - # injection before being sent to a destination. - # @!attribute [rw] http_status - # @return [::Integer] - # The HTTP status code used to abort the request. - # - # The value must be between 200 and 599 inclusive. - # @!attribute [rw] percentage - # @return [::Integer] - # The percentage of traffic which will be aborted. - # - # The value must be between [0, 100] - class Abort - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # The specification for cookie-based stateful session affinity where the - # date plane supplies a “session cookie” with the name "GSSA" which encodes - # a specific destination host and each request containing that cookie will - # be directed to that host as long as the destination host remains up and - # healthy. - # - # The gRPC proxyless mesh library or sidecar proxy will manage the session - # cookie but the client application code is responsible for copying the - # cookie from each RPC in the session to the next. - # @!attribute [rw] cookie_ttl - # @return [::Google::Protobuf::Duration] - # Required. The cookie TTL value for the Set-Cookie header generated by the - # data plane. The lifetime of the cookie may be set to a value from 0 to - # 86400 seconds (24 hours) inclusive. - # - # Set this to 0s to use a session cookie and disable cookie expiration. - class StatefulSessionAffinityPolicy - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The specifications for retries. - # Specifies one or more conditions for which this retry rule applies. Valid - # values are: - # @!attribute [rw] retry_conditions - # @return [::Array<::String>] - # - connect-failure: Router will retry on failures connecting to Backend - # Services, for example due to connection timeouts. - # - refused-stream: Router will retry if the backend service resets the - # stream - # with a REFUSED_STREAM error code. This reset type indicates that it is - # safe to retry. - # - cancelled: Router will retry if the gRPC status code in the response - # header - # is set to cancelled - # - deadline-exceeded: Router will retry if the gRPC status code in the - # response - # header is set to deadline-exceeded - # - resource-exhausted: Router will retry if the gRPC status code in the - # response header is set to resource-exhausted - # - unavailable: Router will retry if the gRPC status code in the response - # header is set to unavailable - # @!attribute [rw] num_retries - # @return [::Integer] - # Specifies the allowed number of retries. This number must be > 0. If not - # specified, default to 1. - class RetryPolicy - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Specifies how to route matched traffic. - # @!attribute [rw] destinations - # @return [::Array<::Google::Cloud::NetworkServices::V1::GrpcRoute::Destination>] - # Optional. The destination services to which traffic should be forwarded. - # If multiple destinations are specified, traffic will be split between - # Backend Service(s) according to the weight field of these destinations. - # @!attribute [rw] fault_injection_policy - # @return [::Google::Cloud::NetworkServices::V1::GrpcRoute::FaultInjectionPolicy] - # Optional. The specification for fault injection introduced into traffic - # to test the resiliency of clients to destination service failure. As part - # of fault injection, when clients send requests to a destination, delays - # can be introduced on a percentage of requests before sending those - # requests to the destination service. Similarly requests from clients can - # be aborted by for a percentage of requests. - # - # timeout and retry_policy will be ignored by clients that are configured - # with a fault_injection_policy - # @!attribute [rw] timeout - # @return [::Google::Protobuf::Duration] - # Optional. Specifies the timeout for selected route. Timeout is computed - # from the time the request has been fully processed (i.e. end of stream) - # up until the response has been completely processed. Timeout includes all - # retries. - # @!attribute [rw] retry_policy - # @return [::Google::Cloud::NetworkServices::V1::GrpcRoute::RetryPolicy] - # Optional. Specifies the retry policy associated with this route. - # @!attribute [rw] stateful_session_affinity - # @return [::Google::Cloud::NetworkServices::V1::GrpcRoute::StatefulSessionAffinityPolicy] - # Optional. Specifies cookie-based stateful session affinity. - # @!attribute [rw] idle_timeout - # @return [::Google::Protobuf::Duration] - # Optional. Specifies the idle timeout for the selected route. The idle - # timeout is defined as the period in which there are no bytes sent or - # received on either the upstream or downstream connection. If not set, the - # default idle timeout is 1 hour. If set to 0s, the timeout will be - # disabled. - class RouteAction - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Describes how to route traffic. - # @!attribute [rw] matches - # @return [::Array<::Google::Cloud::NetworkServices::V1::GrpcRoute::RouteMatch>] - # Optional. Matches define conditions used for matching the rule against - # incoming gRPC requests. Each match is independent, i.e. this rule will be - # matched if ANY one of the matches is satisfied. If no matches field is - # specified, this rule will unconditionally match traffic. - # @!attribute [rw] action - # @return [::Google::Cloud::NetworkServices::V1::GrpcRoute::RouteAction] - # Required. A detailed rule defining how to route traffic. This field is - # required. - class RouteRule - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class LabelsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Request used with the ListGrpcRoutes method. - # @!attribute [rw] parent - # @return [::String] - # Required. The project and location from which the GrpcRoutes should be - # listed, specified in the format `projects/*/locations/*`. - # @!attribute [rw] page_size - # @return [::Integer] - # Maximum number of GrpcRoutes to return per call. - # @!attribute [rw] page_token - # @return [::String] - # The value returned by the last `ListGrpcRoutesResponse` - # Indicates that this is a continuation of a prior `ListGrpcRoutes` call, - # and that the system should return the next page of data. - # @!attribute [rw] return_partial_success - # @return [::Boolean] - # Optional. If true, allow partial responses for multi-regional Aggregated - # List requests. Otherwise if one of the locations is down or unreachable, - # the Aggregated List request will fail. - class ListGrpcRoutesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response returned by the ListGrpcRoutes method. - # @!attribute [rw] grpc_routes - # @return [::Array<::Google::Cloud::NetworkServices::V1::GrpcRoute>] - # List of GrpcRoute resources. - # @!attribute [rw] next_page_token - # @return [::String] - # If there might be more results than those appearing in this response, then - # `next_page_token` is included. To get the next set of results, call this - # method again using the value of `next_page_token` as `page_token`. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Unreachable resources. Populated when the request opts into - # {::Google::Cloud::NetworkServices::V1::ListGrpcRoutesRequest#return_partial_success return_partial_success} - # and reading across collections e.g. when attempting to list all resources - # across all supported locations. - class ListGrpcRoutesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request used by the GetGrpcRoute method. - # @!attribute [rw] name - # @return [::String] - # Required. A name of the GrpcRoute to get. Must be in the format - # `projects/*/locations/*/grpcRoutes/*`. - class GetGrpcRouteRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request used by the CreateGrpcRoute method. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent resource of the GrpcRoute. Must be in the - # format `projects/*/locations/*`. - # @!attribute [rw] grpc_route_id - # @return [::String] - # Required. Short name of the GrpcRoute resource to be created. - # @!attribute [rw] grpc_route - # @return [::Google::Cloud::NetworkServices::V1::GrpcRoute] - # Required. GrpcRoute resource to be created. - class CreateGrpcRouteRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request used by the UpdateGrpcRoute method. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Optional. Field mask is used to specify the fields to be overwritten in the - # GrpcRoute resource by the update. - # The fields specified in the update_mask are relative to the resource, not - # the full request. A field will be overwritten if it is in the mask. If the - # user does not provide a mask then all fields will be overwritten. - # @!attribute [rw] grpc_route - # @return [::Google::Cloud::NetworkServices::V1::GrpcRoute] - # Required. Updated GrpcRoute resource. - class UpdateGrpcRouteRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request used by the DeleteGrpcRoute method. - # @!attribute [rw] name - # @return [::String] - # Required. A name of the GrpcRoute to delete. Must be in the format - # `projects/*/locations/*/grpcRoutes/*`. - class DeleteGrpcRouteRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/http_route.rb b/owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/http_route.rb deleted file mode 100644 index 9edca763e318..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/http_route.rb +++ /dev/null @@ -1,785 +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 NetworkServices - module V1 - # HttpRoute is the resource defining how HTTP traffic should be routed by a - # Mesh or Gateway resource. - # @!attribute [rw] name - # @return [::String] - # Identifier. Name of the HttpRoute resource. It matches pattern - # `projects/*/locations/*/httpRoutes/http_route_name>`. - # @!attribute [r] self_link - # @return [::String] - # Output only. Server-defined URL of this resource - # @!attribute [rw] description - # @return [::String] - # Optional. A free-text description of the resource. Max length 1024 - # characters. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The timestamp when the resource was created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The timestamp when the resource was updated. - # @!attribute [rw] hostnames - # @return [::Array<::String>] - # Required. Hostnames define a set of hosts that should match against the - # HTTP host header to select a HttpRoute to process the request. Hostname is - # the fully qualified domain name of a network host, as defined by RFC 1123 - # with the exception that: - # - IPs are not allowed. - # - A hostname may be prefixed with a wildcard label (`*.`). The wildcard - # label must appear by itself as the first label. - # - # Hostname can be "precise" which is a domain name without the terminating - # dot of a network host (e.g. `foo.example.com`) or "wildcard", which is a - # domain name prefixed with a single wildcard label (e.g. `*.example.com`). - # - # Note that as per RFC1035 and RFC1123, a label must consist of lower case - # alphanumeric characters or '-', and must start and end with an alphanumeric - # character. No other punctuation is allowed. - # - # The routes associated with a Mesh or Gateways must have unique hostnames. - # If you attempt to attach multiple routes with conflicting hostnames, - # the configuration will be rejected. - # - # For example, while it is acceptable for routes for the hostnames - # `*.foo.bar.com` and `*.bar.com` to be associated with the same Mesh (or - # Gateways under the same scope), it is not possible to associate two routes - # both with `*.bar.com` or both with `bar.com`. - # @!attribute [rw] meshes - # @return [::Array<::String>] - # Optional. Meshes defines a list of meshes this HttpRoute is attached to, as - # one of the routing rules to route the requests served by the mesh. - # - # Each mesh reference should match the pattern: - # `projects/*/locations/*/meshes/` - # - # The attached Mesh should be of a type SIDECAR - # @!attribute [rw] gateways - # @return [::Array<::String>] - # Optional. Gateways defines a list of gateways this HttpRoute is attached - # to, as one of the routing rules to route the requests served by the - # gateway. - # - # Each gateway reference should match the pattern: - # `projects/*/locations/*/gateways/` - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. Set of label tags associated with the HttpRoute resource. - # @!attribute [rw] rules - # @return [::Array<::Google::Cloud::NetworkServices::V1::HttpRoute::RouteRule>] - # Required. Rules that define how traffic is routed and handled. - # Rules will be matched sequentially based on the RouteMatch specified for - # the rule. - class HttpRoute - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Specifies how to select a route rule based on HTTP request headers. - # @!attribute [rw] exact_match - # @return [::String] - # The value of the header should match exactly the content of - # exact_match. - # - # Note: The following fields are mutually exclusive: `exact_match`, `regex_match`, `prefix_match`, `present_match`, `suffix_match`, `range_match`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] regex_match - # @return [::String] - # The value of the header must match the regular expression specified in - # regex_match. For regular expression grammar, please see: - # https://github.com/google/re2/wiki/Syntax - # - # Note: The following fields are mutually exclusive: `regex_match`, `exact_match`, `prefix_match`, `present_match`, `suffix_match`, `range_match`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] prefix_match - # @return [::String] - # The value of the header must start with the contents of prefix_match. - # - # Note: The following fields are mutually exclusive: `prefix_match`, `exact_match`, `regex_match`, `present_match`, `suffix_match`, `range_match`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] present_match - # @return [::Boolean] - # A header with header_name must exist. The match takes place whether or - # not the header has a value. - # - # Note: The following fields are mutually exclusive: `present_match`, `exact_match`, `regex_match`, `prefix_match`, `suffix_match`, `range_match`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] suffix_match - # @return [::String] - # The value of the header must end with the contents of suffix_match. - # - # Note: The following fields are mutually exclusive: `suffix_match`, `exact_match`, `regex_match`, `prefix_match`, `present_match`, `range_match`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] range_match - # @return [::Google::Cloud::NetworkServices::V1::HttpRoute::HeaderMatch::IntegerRange] - # If specified, the rule will match if the request header value is within - # the range. - # - # Note: The following fields are mutually exclusive: `range_match`, `exact_match`, `regex_match`, `prefix_match`, `present_match`, `suffix_match`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] header - # @return [::String] - # The name of the HTTP header to match against. - # @!attribute [rw] invert_match - # @return [::Boolean] - # If specified, the match result will be inverted before checking. Default - # value is set to false. - class HeaderMatch - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Represents an integer value range. - # @!attribute [rw] start - # @return [::Integer] - # Start of the range (inclusive) - # @!attribute [rw] end - # @return [::Integer] - # End of the range (exclusive) - class IntegerRange - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Specifications to match a query parameter in the request. - # @!attribute [rw] exact_match - # @return [::String] - # The value of the query parameter must exactly match the contents of - # exact_match. - # - # Only one of exact_match, regex_match, or present_match must be set. - # - # Note: The following fields are mutually exclusive: `exact_match`, `regex_match`, `present_match`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] regex_match - # @return [::String] - # The value of the query parameter must match the regular expression - # specified by regex_match. For regular expression grammar, please see - # https://github.com/google/re2/wiki/Syntax - # - # Only one of exact_match, regex_match, or present_match must be set. - # - # Note: The following fields are mutually exclusive: `regex_match`, `exact_match`, `present_match`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] present_match - # @return [::Boolean] - # Specifies that the QueryParameterMatcher matches if request contains - # query parameter, irrespective of whether the parameter has a value or - # not. - # - # Only one of exact_match, regex_match, or present_match must be set. - # - # Note: The following fields are mutually exclusive: `present_match`, `exact_match`, `regex_match`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] query_parameter - # @return [::String] - # The name of the query parameter to match. - class QueryParameterMatch - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # RouteMatch defines specifications used to match requests. If multiple match - # types are set, this RouteMatch will match if ALL type of matches are - # matched. - # @!attribute [rw] full_path_match - # @return [::String] - # The HTTP request path value should exactly match this value. - # - # Only one of full_path_match, prefix_match, or regex_match should be - # used. - # - # Note: The following fields are mutually exclusive: `full_path_match`, `prefix_match`, `regex_match`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] prefix_match - # @return [::String] - # The HTTP request path value must begin with specified prefix_match. - # prefix_match must begin with a /. - # - # Only one of full_path_match, prefix_match, or regex_match should be - # used. - # - # Note: The following fields are mutually exclusive: `prefix_match`, `full_path_match`, `regex_match`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] regex_match - # @return [::String] - # The HTTP request path value must satisfy the regular expression - # specified by regex_match after removing any query parameters and anchor - # supplied with the original URL. For regular expression grammar, please - # see https://github.com/google/re2/wiki/Syntax - # - # Only one of full_path_match, prefix_match, or regex_match should be - # used. - # - # Note: The following fields are mutually exclusive: `regex_match`, `full_path_match`, `prefix_match`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] ignore_case - # @return [::Boolean] - # Specifies if prefix_match and full_path_match matches are case sensitive. - # The default value is false. - # @!attribute [rw] headers - # @return [::Array<::Google::Cloud::NetworkServices::V1::HttpRoute::HeaderMatch>] - # Specifies a list of HTTP request headers to match against. ALL of the - # supplied headers must be matched. - # @!attribute [rw] query_parameters - # @return [::Array<::Google::Cloud::NetworkServices::V1::HttpRoute::QueryParameterMatch>] - # Specifies a list of query parameters to match against. ALL of the query - # parameters must be matched. - class RouteMatch - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Specifications of a destination to which the request should be routed to. - # @!attribute [rw] service_name - # @return [::String] - # The URL of a BackendService to route traffic to. - # @!attribute [rw] weight - # @return [::Integer] - # Specifies the proportion of requests forwarded to the backend referenced - # by the serviceName field. This is computed as: - # - weight/Sum(weights in this destination list). - # For non-zero values, there may be some epsilon from the exact proportion - # defined here depending on the precision an implementation supports. - # - # If only one serviceName is specified and it has a weight greater than 0, - # 100% of the traffic is forwarded to that backend. - # - # If weights are specified for any one service name, they need to be - # specified for all of them. - # - # If weights are unspecified for all services, then, traffic is distributed - # in equal proportions to all of them. - # @!attribute [rw] request_header_modifier - # @return [::Google::Cloud::NetworkServices::V1::HttpRoute::HeaderModifier] - # Optional. The specification for modifying the headers of a matching - # request prior to delivery of the request to the destination. If - # HeaderModifiers are set on both the Destination and the RouteAction, they - # will be merged. Conflicts between the two will not be resolved on the - # configuration. - # @!attribute [rw] response_header_modifier - # @return [::Google::Cloud::NetworkServices::V1::HttpRoute::HeaderModifier] - # Optional. The specification for modifying the headers of a response prior - # to sending the response back to the client. If HeaderModifiers are set on - # both the Destination and the RouteAction, they will be merged. Conflicts - # between the two will not be resolved on the configuration. - class Destination - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The specification for redirecting traffic. - # @!attribute [rw] host_redirect - # @return [::String] - # The host that will be used in the redirect response instead of the one - # that was supplied in the request. - # @!attribute [rw] path_redirect - # @return [::String] - # The path that will be used in the redirect response instead of the one - # that was supplied in the request. - # path_redirect can not be supplied together with prefix_redirect. Supply - # one alone or neither. If neither is supplied, the path of the original - # request will be used for the redirect. - # @!attribute [rw] prefix_rewrite - # @return [::String] - # Indicates that during redirection, the matched prefix (or path) should be - # swapped with this value. This option allows URLs be dynamically created - # based on the request. - # @!attribute [rw] response_code - # @return [::Google::Cloud::NetworkServices::V1::HttpRoute::Redirect::ResponseCode] - # The HTTP Status code to use for the redirect. - # @!attribute [rw] https_redirect - # @return [::Boolean] - # If set to true, the URL scheme in the redirected request is set to https. - # If set to false, the URL scheme of the redirected request will remain the - # same as that of the request. - # - # The default is set to false. - # @!attribute [rw] strip_query - # @return [::Boolean] - # if set to true, any accompanying query portion of the original URL is - # removed prior to redirecting the request. If set to false, the query - # portion of the original URL is retained. - # - # The default is set to false. - # @!attribute [rw] port_redirect - # @return [::Integer] - # The port that will be used in the redirected request instead of the one - # that was supplied in the request. - class Redirect - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Supported HTTP response code. - module ResponseCode - # Default value - RESPONSE_CODE_UNSPECIFIED = 0 - - # Corresponds to 301. - MOVED_PERMANENTLY_DEFAULT = 1 - - # Corresponds to 302. - FOUND = 2 - - # Corresponds to 303. - SEE_OTHER = 3 - - # Corresponds to 307. In this case, the request method will be retained. - TEMPORARY_REDIRECT = 4 - - # Corresponds to 308. In this case, the request method will be retained. - PERMANENT_REDIRECT = 5 - end - end - - # The specification for fault injection introduced into traffic to test the - # resiliency of clients to destination service failure. As part of fault - # injection, when clients send requests to a destination, delays can be - # introduced by client proxy on a percentage of requests before sending those - # requests to the destination service. Similarly requests can be aborted by - # client proxy for a percentage of requests. - # @!attribute [rw] delay - # @return [::Google::Cloud::NetworkServices::V1::HttpRoute::FaultInjectionPolicy::Delay] - # The specification for injecting delay to client requests. - # @!attribute [rw] abort - # @return [::Google::Cloud::NetworkServices::V1::HttpRoute::FaultInjectionPolicy::Abort] - # The specification for aborting to client requests. - class FaultInjectionPolicy - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Specification of how client requests are delayed as part of fault - # injection before being sent to a destination. - # @!attribute [rw] fixed_delay - # @return [::Google::Protobuf::Duration] - # Specify a fixed delay before forwarding the request. - # @!attribute [rw] percentage - # @return [::Integer] - # The percentage of traffic on which delay will be injected. - # - # The value must be between [0, 100] - class Delay - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Specification of how client requests are aborted as part of fault - # injection before being sent to a destination. - # @!attribute [rw] http_status - # @return [::Integer] - # The HTTP status code used to abort the request. - # - # The value must be between 200 and 599 inclusive. - # @!attribute [rw] percentage - # @return [::Integer] - # The percentage of traffic which will be aborted. - # - # The value must be between [0, 100] - class Abort - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # The specification for cookie-based stateful session affinity where the - # date plane supplies a “session cookie” with the name "GSSA" which encodes - # a specific destination host and each request containing that cookie will - # be directed to that host as long as the destination host remains up and - # healthy. - # - # The gRPC proxyless mesh library or sidecar proxy will manage the session - # cookie but the client application code is responsible for copying the - # cookie from each RPC in the session to the next. - # @!attribute [rw] cookie_ttl - # @return [::Google::Protobuf::Duration] - # Required. The cookie TTL value for the Set-Cookie header generated by - # the data plane. The lifetime of the cookie may be set to a value from 0 - # to 86400 seconds (24 hours) inclusive. - # - # Set this to 0s to use a session cookie and disable cookie expiration. - class StatefulSessionAffinityPolicy - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The specification for modifying HTTP header in HTTP request and HTTP - # response. - # @!attribute [rw] set - # @return [::Google::Protobuf::Map{::String => ::String}] - # Completely overwrite/replace the headers with given map where key is the - # name of the header, value is the value of the header. - # @!attribute [rw] add - # @return [::Google::Protobuf::Map{::String => ::String}] - # Add the headers with given map where key is the name of the header, value - # is the value of the header. - # @!attribute [rw] remove - # @return [::Array<::String>] - # Remove headers (matching by header names) specified in the list. - class HeaderModifier - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class SetEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class AddEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # The specification for modifying the URL of the request, prior to forwarding - # the request to the destination. - # @!attribute [rw] path_prefix_rewrite - # @return [::String] - # Prior to forwarding the request to the selected destination, the matching - # portion of the requests path is replaced by this value. - # @!attribute [rw] host_rewrite - # @return [::String] - # Prior to forwarding the request to the selected destination, the requests - # host header is replaced by this value. - class URLRewrite - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The specifications for retries. - # @!attribute [rw] retry_conditions - # @return [::Array<::String>] - # Specifies one or more conditions when this retry policy applies. Valid - # values are: - # 5xx: Proxy will attempt a retry if the destination service responds - # with any 5xx response code, of if the destination service does not - # respond at all, example: disconnect, reset, read timeout, connection - # failure and refused streams. - # - # gateway-error: Similar to 5xx, but only applies to response codes 502, - # 503, 504. - # - # reset: Proxy will attempt a retry if the destination service does not - # respond at all (disconnect/reset/read timeout) - # - # connect-failure: Proxy will retry on failures connecting to destination - # for example due to connection timeouts. - # - # retriable-4xx: Proxy will retry fro retriable 4xx response codes. - # Currently the only retriable error supported is 409. - # - # refused-stream: Proxy will retry if the destination resets the stream - # with a REFUSED_STREAM error code. This reset type indicates that it - # is safe to retry. - # @!attribute [rw] num_retries - # @return [::Integer] - # Specifies the allowed number of retries. This number must be > 0. If not - # specified, default to 1. - # @!attribute [rw] per_try_timeout - # @return [::Google::Protobuf::Duration] - # Specifies a non-zero timeout per retry attempt. - class RetryPolicy - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Specifies the policy on how requests are shadowed to a separate mirrored - # destination service. The proxy does not wait for responses from the - # shadow service. Prior to sending traffic to the shadow service, the - # host/authority header is suffixed with -shadow. - # Mirroring is currently not supported for Cloud Run destinations. - # @!attribute [rw] destination - # @return [::Google::Cloud::NetworkServices::V1::HttpRoute::Destination] - # The destination the requests will be mirrored to. The weight of the - # destination will be ignored. - # @!attribute [rw] mirror_percent - # @return [::Float] - # Optional. The percentage of requests to get mirrored to the desired - # destination. - class RequestMirrorPolicy - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The Specification for allowing client side cross-origin requests. - # @!attribute [rw] allow_origins - # @return [::Array<::String>] - # Specifies the list of origins that will be allowed to do CORS requests. - # An origin is allowed if it matches either an item in allow_origins or - # an item in allow_origin_regexes. - # @!attribute [rw] allow_origin_regexes - # @return [::Array<::String>] - # Specifies the regular expression patterns that match allowed origins. For - # regular expression grammar, please see - # https://github.com/google/re2/wiki/Syntax. - # @!attribute [rw] allow_methods - # @return [::Array<::String>] - # Specifies the content for Access-Control-Allow-Methods header. - # @!attribute [rw] allow_headers - # @return [::Array<::String>] - # Specifies the content for Access-Control-Allow-Headers header. - # @!attribute [rw] expose_headers - # @return [::Array<::String>] - # Specifies the content for Access-Control-Expose-Headers header. - # @!attribute [rw] max_age - # @return [::String] - # Specifies how long result of a preflight request can be cached in - # seconds. This translates to the Access-Control-Max-Age header. - # @!attribute [rw] allow_credentials - # @return [::Boolean] - # In response to a preflight request, setting this to true indicates that - # the actual request can include user credentials. This translates to the - # Access-Control-Allow-Credentials header. - # - # Default value is false. - # @!attribute [rw] disabled - # @return [::Boolean] - # If true, the CORS policy is disabled. The default value is false, which - # indicates that the CORS policy is in effect. - class CorsPolicy - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Static HTTP response object to be returned. - # @!attribute [rw] string_body - # @return [::String] - # Optional. Response body as a string. Maximum body length is 1024 - # characters. - # - # Note: The following fields are mutually exclusive: `string_body`, `bytes_body`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] bytes_body - # @return [::String] - # Optional. Response body as bytes. Maximum body size is 4096B. - # - # Note: The following fields are mutually exclusive: `bytes_body`, `string_body`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] status - # @return [::Integer] - # Required. Status to return as part of HTTP Response. Must be a positive - # integer. - class HttpDirectResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The specifications for routing traffic and applying associated policies. - # @!attribute [rw] destinations - # @return [::Array<::Google::Cloud::NetworkServices::V1::HttpRoute::Destination>] - # The destination to which traffic should be forwarded. - # @!attribute [rw] redirect - # @return [::Google::Cloud::NetworkServices::V1::HttpRoute::Redirect] - # If set, the request is directed as configured by this field. - # @!attribute [rw] fault_injection_policy - # @return [::Google::Cloud::NetworkServices::V1::HttpRoute::FaultInjectionPolicy] - # The specification for fault injection introduced into traffic to test the - # resiliency of clients to backend service failure. As part of fault - # injection, when clients send requests to a backend service, delays can be - # introduced on a percentage of requests before sending those requests to - # the backend service. Similarly requests from clients can be aborted for a - # percentage of requests. - # - # timeout and retry_policy will be ignored by clients that are configured - # with a fault_injection_policy - # @!attribute [rw] request_header_modifier - # @return [::Google::Cloud::NetworkServices::V1::HttpRoute::HeaderModifier] - # The specification for modifying the headers of a matching request prior - # to delivery of the request to the destination. If HeaderModifiers are set - # on both the Destination and the RouteAction, they will be merged. - # Conflicts between the two will not be resolved on the configuration. - # @!attribute [rw] response_header_modifier - # @return [::Google::Cloud::NetworkServices::V1::HttpRoute::HeaderModifier] - # The specification for modifying the headers of a response prior to - # sending the response back to the client. If HeaderModifiers are set - # on both the Destination and the RouteAction, they will be merged. - # Conflicts between the two will not be resolved on the configuration. - # @!attribute [rw] url_rewrite - # @return [::Google::Cloud::NetworkServices::V1::HttpRoute::URLRewrite] - # The specification for rewrite URL before forwarding requests to the - # destination. - # @!attribute [rw] timeout - # @return [::Google::Protobuf::Duration] - # Specifies the timeout for selected route. Timeout is computed from the - # time the request has been fully processed (i.e. end of stream) up until - # the response has been completely processed. Timeout includes all retries. - # @!attribute [rw] retry_policy - # @return [::Google::Cloud::NetworkServices::V1::HttpRoute::RetryPolicy] - # Specifies the retry policy associated with this route. - # @!attribute [rw] request_mirror_policy - # @return [::Google::Cloud::NetworkServices::V1::HttpRoute::RequestMirrorPolicy] - # Specifies the policy on how requests intended for the routes destination - # are shadowed to a separate mirrored destination. Proxy will not wait for - # the shadow destination to respond before returning the response. Prior to - # sending traffic to the shadow service, the host/authority header is - # suffixed with -shadow. - # @!attribute [rw] cors_policy - # @return [::Google::Cloud::NetworkServices::V1::HttpRoute::CorsPolicy] - # The specification for allowing client side cross-origin requests. - # @!attribute [rw] stateful_session_affinity - # @return [::Google::Cloud::NetworkServices::V1::HttpRoute::StatefulSessionAffinityPolicy] - # Optional. Specifies cookie-based stateful session affinity. - # @!attribute [rw] direct_response - # @return [::Google::Cloud::NetworkServices::V1::HttpRoute::HttpDirectResponse] - # Optional. Static HTTP Response object to be returned regardless of the - # request. - # @!attribute [rw] idle_timeout - # @return [::Google::Protobuf::Duration] - # Optional. Specifies the idle timeout for the selected route. The idle - # timeout is defined as the period in which there are no bytes sent or - # received on either the upstream or downstream connection. If not set, the - # default idle timeout is 1 hour. If set to 0s, the timeout will be - # disabled. - class RouteAction - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Specifies how to match traffic and how to route traffic when traffic is - # matched. - # @!attribute [rw] matches - # @return [::Array<::Google::Cloud::NetworkServices::V1::HttpRoute::RouteMatch>] - # A list of matches define conditions used for matching the rule against - # incoming HTTP requests. Each match is independent, i.e. this rule will be - # matched if ANY one of the matches is satisfied. - # - # If no matches field is specified, this rule will unconditionally match - # traffic. - # - # If a default rule is desired to be configured, add a rule with no matches - # specified to the end of the rules list. - # @!attribute [rw] action - # @return [::Google::Cloud::NetworkServices::V1::HttpRoute::RouteAction] - # The detailed rule defining how to route matched traffic. - class RouteRule - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class LabelsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Request used with the ListHttpRoutes method. - # @!attribute [rw] parent - # @return [::String] - # Required. The project and location from which the HttpRoutes should be - # listed, specified in the format `projects/*/locations/*`. - # @!attribute [rw] page_size - # @return [::Integer] - # Maximum number of HttpRoutes to return per call. - # @!attribute [rw] page_token - # @return [::String] - # The value returned by the last `ListHttpRoutesResponse` - # Indicates that this is a continuation of a prior `ListHttpRoutes` call, - # and that the system should return the next page of data. - # @!attribute [rw] return_partial_success - # @return [::Boolean] - # Optional. If true, allow partial responses for multi-regional Aggregated - # List requests. Otherwise if one of the locations is down or unreachable, - # the Aggregated List request will fail. - # @!attribute [rw] filter - # @return [::String] - # Optional. Filter expression to restrict the list. - class ListHttpRoutesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response returned by the ListHttpRoutes method. - # @!attribute [rw] http_routes - # @return [::Array<::Google::Cloud::NetworkServices::V1::HttpRoute>] - # List of HttpRoute resources. - # @!attribute [rw] next_page_token - # @return [::String] - # If there might be more results than those appearing in this response, then - # `next_page_token` is included. To get the next set of results, call this - # method again using the value of `next_page_token` as `page_token`. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Unreachable resources. Populated when the request opts into - # {::Google::Cloud::NetworkServices::V1::ListHttpRoutesRequest#return_partial_success return_partial_success} - # and reading across collections e.g. when attempting to list all resources - # across all supported locations. - class ListHttpRoutesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request used by the GetHttpRoute method. - # @!attribute [rw] name - # @return [::String] - # Required. A name of the HttpRoute to get. Must be in the format - # `projects/*/locations/*/httpRoutes/*`. - class GetHttpRouteRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request used by the HttpRoute method. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent resource of the HttpRoute. Must be in the - # format `projects/*/locations/*`. - # @!attribute [rw] http_route_id - # @return [::String] - # Required. Short name of the HttpRoute resource to be created. - # @!attribute [rw] http_route - # @return [::Google::Cloud::NetworkServices::V1::HttpRoute] - # Required. HttpRoute resource to be created. - # @!attribute [rw] request_id - # @return [::String] - # Optional. Idempotent request UUID. - class CreateHttpRouteRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request used by the UpdateHttpRoute method. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Optional. Field mask is used to specify the fields to be overwritten in the - # HttpRoute resource by the update. - # The fields specified in the update_mask are relative to the resource, not - # the full request. A field will be overwritten if it is in the mask. If the - # user does not provide a mask then all fields will be overwritten. - # @!attribute [rw] http_route - # @return [::Google::Cloud::NetworkServices::V1::HttpRoute] - # Required. Updated HttpRoute resource. - class UpdateHttpRouteRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request used by the DeleteHttpRoute method. - # @!attribute [rw] name - # @return [::String] - # Required. A name of the HttpRoute to delete. Must be in the format - # `projects/*/locations/*/httpRoutes/*`. - class DeleteHttpRouteRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/mesh.rb b/owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/mesh.rb deleted file mode 100644 index cab0f16c8a99..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/mesh.rb +++ /dev/null @@ -1,170 +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 NetworkServices - module V1 - # Mesh represents a logical configuration grouping for workload to workload - # communication within a service mesh. Routes that point to mesh dictate how - # requests are routed within this logical mesh boundary. - # @!attribute [rw] name - # @return [::String] - # Identifier. Name of the Mesh resource. It matches pattern - # `projects/*/locations/*/meshes/`. - # @!attribute [r] self_link - # @return [::String] - # Output only. Server-defined URL of this resource - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The timestamp when the resource was created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The timestamp when the resource was updated. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. Set of label tags associated with the Mesh resource. - # @!attribute [rw] description - # @return [::String] - # Optional. A free-text description of the resource. Max length 1024 - # characters. - # @!attribute [rw] interception_port - # @return [::Integer] - # Optional. If set to a valid TCP port (1-65535), instructs the SIDECAR proxy - # to listen on the specified port of localhost (127.0.0.1) address. The - # SIDECAR proxy will expect all traffic to be redirected to this port - # regardless of its actual ip:port destination. If unset, a port '15001' is - # used as the interception port. This is applicable only for sidecar proxy - # deployments. - # @!attribute [rw] envoy_headers - # @return [::Google::Cloud::NetworkServices::V1::EnvoyHeaders] - # Optional. Determines if envoy will insert internal debug headers into - # upstream requests. Other Envoy headers may still be injected. By default, - # envoy will not insert any debug headers. - class Mesh - 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 - - # Request used with the ListMeshes method. - # @!attribute [rw] parent - # @return [::String] - # Required. The project and location from which the Meshes should be - # listed, specified in the format `projects/*/locations/*`. - # @!attribute [rw] page_size - # @return [::Integer] - # Maximum number of Meshes to return per call. - # @!attribute [rw] page_token - # @return [::String] - # The value returned by the last `ListMeshesResponse` - # Indicates that this is a continuation of a prior `ListMeshes` call, - # and that the system should return the next page of data. - # @!attribute [rw] return_partial_success - # @return [::Boolean] - # Optional. If true, allow partial responses for multi-regional Aggregated - # List requests. Otherwise if one of the locations is down or unreachable, - # the Aggregated List request will fail. - class ListMeshesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response returned by the ListMeshes method. - # @!attribute [rw] meshes - # @return [::Array<::Google::Cloud::NetworkServices::V1::Mesh>] - # List of Mesh resources. - # @!attribute [rw] next_page_token - # @return [::String] - # If there might be more results than those appearing in this response, then - # `next_page_token` is included. To get the next set of results, call this - # method again using the value of `next_page_token` as `page_token`. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Unreachable resources. Populated when the request opts into - # `return_partial_success` and reading across collections e.g. when - # attempting to list all resources across all supported locations. - class ListMeshesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request used by the GetMesh method. - # @!attribute [rw] name - # @return [::String] - # Required. A name of the Mesh to get. Must be in the format - # `projects/*/locations/*/meshes/*`. - class GetMeshRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request used by the CreateMesh method. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent resource of the Mesh. Must be in the - # format `projects/*/locations/*`. - # @!attribute [rw] mesh_id - # @return [::String] - # Required. Short name of the Mesh resource to be created. - # @!attribute [rw] mesh - # @return [::Google::Cloud::NetworkServices::V1::Mesh] - # Required. Mesh resource to be created. - class CreateMeshRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request used by the UpdateMesh method. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Optional. Field mask is used to specify the fields to be overwritten in the - # Mesh resource by the update. - # The fields specified in the update_mask are relative to the resource, not - # the full request. A field will be overwritten if it is in the mask. If the - # user does not provide a mask then all fields will be overwritten. - # @!attribute [rw] mesh - # @return [::Google::Cloud::NetworkServices::V1::Mesh] - # Required. Updated Mesh resource. - class UpdateMeshRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request used by the DeleteMesh method. - # @!attribute [rw] name - # @return [::String] - # Required. A name of the Mesh to delete. Must be in the format - # `projects/*/locations/*/meshes/*`. - class DeleteMeshRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/route_view.rb b/owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/route_view.rb deleted file mode 100644 index 3d4ace187fbe..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/route_view.rb +++ /dev/null @@ -1,168 +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 NetworkServices - module V1 - # GatewayRouteView defines view-only resource for Routes to a Gateway - # @!attribute [r] name - # @return [::String] - # Output only. Identifier. Full path name of the GatewayRouteView resource. - # Format: - # projects/\\{project_number}/locations/\\{location}/gateways/\\{gateway}/routeViews/\\{route_view} - # @!attribute [r] route_project_number - # @return [::Integer] - # Output only. Project number where the route exists. - # @!attribute [r] route_location - # @return [::String] - # Output only. Location where the route exists. - # @!attribute [r] route_type - # @return [::String] - # Output only. Type of the route: HttpRoute,GrpcRoute,TcpRoute, or TlsRoute - # @!attribute [r] route_id - # @return [::String] - # Output only. The resource id for the route. - class GatewayRouteView - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # MeshRouteView defines view-only resource for Routes to a Mesh - # @!attribute [r] name - # @return [::String] - # Output only. Identifier. Full path name of the MeshRouteView resource. - # Format: - # projects/\\{project}/locations/\\{location}/meshes/\\{mesh}/routeViews/\\{route_view} - # @!attribute [r] route_project_number - # @return [::Integer] - # Output only. Project number where the route exists. - # @!attribute [r] route_location - # @return [::String] - # Output only. Location where the route exists. - # @!attribute [r] route_type - # @return [::String] - # Output only. Type of the route: HttpRoute,GrpcRoute,TcpRoute, or TlsRoute - # @!attribute [r] route_id - # @return [::String] - # Output only. The resource id for the route. - class MeshRouteView - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request used with the GetGatewayRouteView method. - # @!attribute [rw] name - # @return [::String] - # Required. Name of the GatewayRouteView resource. - # Formats: - # projects/\\{project}/locations/\\{location}/gateways/\\{gateway}/routeViews/\\{route_view} - class GetGatewayRouteViewRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request used with the GetMeshRouteView method. - # @!attribute [rw] name - # @return [::String] - # Required. Name of the MeshRouteView resource. - # Format: - # projects/\\{project}/locations/\\{location}/meshes/\\{mesh}/routeViews/\\{route_view} - class GetMeshRouteViewRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request used with the ListGatewayRouteViews method. - # @!attribute [rw] parent - # @return [::String] - # Required. The Gateway to which a Route is associated. - # Formats: - # projects/\\{project}/locations/\\{location}/gateways/\\{gateway} - # @!attribute [rw] page_size - # @return [::Integer] - # Maximum number of GatewayRouteViews to return per call. - # @!attribute [rw] page_token - # @return [::String] - # The value returned by the last `ListGatewayRouteViewsResponse` - # Indicates that this is a continuation of a prior `ListGatewayRouteViews` - # call, and that the system should return the next page of data. - class ListGatewayRouteViewsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request used with the ListMeshRouteViews method. - # @!attribute [rw] parent - # @return [::String] - # Required. The Mesh to which a Route is associated. - # Format: - # projects/\\{project}/locations/\\{location}/meshes/\\{mesh} - # @!attribute [rw] page_size - # @return [::Integer] - # Maximum number of MeshRouteViews to return per call. - # @!attribute [rw] page_token - # @return [::String] - # The value returned by the last `ListMeshRouteViewsResponse` - # Indicates that this is a continuation of a prior `ListMeshRouteViews` call, - # and that the system should return the next page of data. - class ListMeshRouteViewsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response returned by the ListGatewayRouteViews method. - # @!attribute [rw] gateway_route_views - # @return [::Array<::Google::Cloud::NetworkServices::V1::GatewayRouteView>] - # List of GatewayRouteView resources. - # @!attribute [rw] next_page_token - # @return [::String] - # A token, which can be sent as `page_token` to retrieve the next page. - # If this field is omitted, there are no subsequent pages. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Unreachable resources. Populated when the request attempts to list all - # resources across all supported locations, while some locations are - # temporarily unavailable. - class ListGatewayRouteViewsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response returned by the ListMeshRouteViews method. - # @!attribute [rw] mesh_route_views - # @return [::Array<::Google::Cloud::NetworkServices::V1::MeshRouteView>] - # List of MeshRouteView resources. - # @!attribute [rw] next_page_token - # @return [::String] - # A token, which can be sent as `page_token` to retrieve the next page. - # If this field is omitted, there are no subsequent pages. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Unreachable resources. Populated when the request attempts to list all - # resources across all supported locations, while some locations are - # temporarily unavailable. - class ListMeshRouteViewsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/service_binding.rb b/owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/service_binding.rb deleted file mode 100644 index 4ad24c25bac0..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/service_binding.rb +++ /dev/null @@ -1,168 +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 NetworkServices - module V1 - # ServiceBinding can be used to: - # - Bind a Service Directory Service to be used in a BackendService resource. - # This feature will be deprecated soon. - # - Bind a Private Service Connect producer service to be used in consumer - # Cloud Service Mesh or Application Load Balancers. - # - Bind a Cloud Run service to be used in consumer Cloud Service Mesh or - # Application Load Balancers. - # @!attribute [rw] name - # @return [::String] - # Identifier. Name of the ServiceBinding resource. It matches pattern - # `projects/*/locations/*/serviceBindings/`. - # @!attribute [rw] description - # @return [::String] - # Optional. A free-text description of the resource. Max length 1024 - # characters. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The timestamp when the resource was created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The timestamp when the resource was updated. - # @!attribute [rw] service - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::String] - # Optional. The full Service Directory Service name of the format - # `projects/*/locations/*/namespaces/*/services/*`. - # This field is for Service Directory integration which will be deprecated - # soon. - # @!attribute [r] service_id - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::String] - # Output only. The unique identifier of the Service Directory Service against - # which the ServiceBinding resource is validated. This is populated when the - # Service Binding resource is used in another resource (like Backend - # Service). This is of the UUID4 format. This field is for Service Directory - # integration which will be deprecated soon. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. Set of label tags associated with the ServiceBinding resource. - class ServiceBinding - 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 - - # Request used with the ListServiceBindings method. - # @!attribute [rw] parent - # @return [::String] - # Required. The project and location from which the ServiceBindings should be - # listed, specified in the format `projects/*/locations/*`. - # @!attribute [rw] page_size - # @return [::Integer] - # Maximum number of ServiceBindings to return per call. - # @!attribute [rw] page_token - # @return [::String] - # The value returned by the last `ListServiceBindingsResponse` - # Indicates that this is a continuation of a prior `ListRouters` call, - # and that the system should return the next page of data. - class ListServiceBindingsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response returned by the ListServiceBindings method. - # @!attribute [rw] service_bindings - # @return [::Array<::Google::Cloud::NetworkServices::V1::ServiceBinding>] - # List of ServiceBinding resources. - # @!attribute [rw] next_page_token - # @return [::String] - # If there might be more results than those appearing in this response, then - # `next_page_token` is included. To get the next set of results, call this - # method again using the value of `next_page_token` as `page_token`. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Unreachable resources. Populated when the request attempts to list all - # resources across all supported locations, while some locations are - # temporarily unavailable. - class ListServiceBindingsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request used by the GetServiceBinding method. - # @!attribute [rw] name - # @return [::String] - # Required. A name of the ServiceBinding to get. Must be in the format - # `projects/*/locations/*/serviceBindings/*`. - class GetServiceBindingRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request used by the ServiceBinding method. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent resource of the ServiceBinding. Must be in the - # format `projects/*/locations/*`. - # @!attribute [rw] service_binding_id - # @return [::String] - # Required. Short name of the ServiceBinding resource to be created. - # @!attribute [rw] service_binding - # @return [::Google::Cloud::NetworkServices::V1::ServiceBinding] - # Required. ServiceBinding resource to be created. - class CreateServiceBindingRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request used by the UpdateServiceBinding method. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Optional. Field mask is used to specify the fields to be overwritten in the - # ServiceBinding resource by the update. - # The fields specified in the update_mask are relative to the resource, not - # the full request. A field will be overwritten if it is in the mask. If the - # user does not provide a mask then all fields will be overwritten. - # @!attribute [rw] service_binding - # @return [::Google::Cloud::NetworkServices::V1::ServiceBinding] - # Required. Updated ServiceBinding resource. - class UpdateServiceBindingRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request used by the DeleteServiceBinding method. - # @!attribute [rw] name - # @return [::String] - # Required. A name of the ServiceBinding to delete. Must be in the format - # `projects/*/locations/*/serviceBindings/*`. - class DeleteServiceBindingRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/service_lb_policy.rb b/owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/service_lb_policy.rb deleted file mode 100644 index 75a47e365ab3..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/service_lb_policy.rb +++ /dev/null @@ -1,258 +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 NetworkServices - module V1 - # ServiceLbPolicy holds global load balancing and traffic distribution - # configuration that can be applied to a BackendService. - # @!attribute [rw] name - # @return [::String] - # Identifier. Name of the ServiceLbPolicy resource. It matches pattern - # `projects/{project}/locations/{location}/serviceLbPolicies/{service_lb_policy_name}`. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The timestamp when this resource was created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The timestamp when this resource was last updated. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. Set of label tags associated with the ServiceLbPolicy resource. - # @!attribute [rw] description - # @return [::String] - # Optional. A free-text description of the resource. Max length 1024 - # characters. - # @!attribute [rw] load_balancing_algorithm - # @return [::Google::Cloud::NetworkServices::V1::ServiceLbPolicy::LoadBalancingAlgorithm] - # Optional. The type of load balancing algorithm to be used. The default - # behavior is WATERFALL_BY_REGION. - # @!attribute [rw] auto_capacity_drain - # @return [::Google::Cloud::NetworkServices::V1::ServiceLbPolicy::AutoCapacityDrain] - # Optional. Configuration to automatically move traffic away for unhealthy - # IG/NEG for the associated Backend Service. - # @!attribute [rw] failover_config - # @return [::Google::Cloud::NetworkServices::V1::ServiceLbPolicy::FailoverConfig] - # Optional. Configuration related to health based failover. - # @!attribute [rw] isolation_config - # @return [::Google::Cloud::NetworkServices::V1::ServiceLbPolicy::IsolationConfig] - # Optional. Configuration to provide isolation support for the associated - # Backend Service. - class ServiceLbPolicy - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Option to specify if an unhealthy IG/NEG should be considered for global - # load balancing and traffic routing. - # @!attribute [rw] enable - # @return [::Boolean] - # Optional. If set to 'True', an unhealthy IG/NEG will be set as drained. - # - An IG/NEG is considered unhealthy if less than 25% of the - # instances/endpoints in the IG/NEG are healthy. - # - This option will never result in draining more than 50% of the - # configured IGs/NEGs for the Backend Service. - class AutoCapacityDrain - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Option to specify health based failover behavior. - # This is not related to Network load balancer FailoverPolicy. - # @!attribute [rw] failover_health_threshold - # @return [::Integer] - # Optional. The percentage threshold that a load balancer will begin to - # send traffic to failover backends. If the percentage of endpoints in a - # MIG/NEG is smaller than this value, traffic would be sent to failover - # backends if possible. This field should be set to a value between 1 - # and 99. The default value is 50 for Global external HTTP(S) load balancer - # (classic) and Proxyless service mesh, and 70 for others. - class FailoverConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Configuration to provide isolation support for the associated Backend - # Service. - # @!attribute [rw] isolation_granularity - # @return [::Google::Cloud::NetworkServices::V1::ServiceLbPolicy::IsolationGranularity] - # Optional. The isolation granularity of the load balancer. - # @!attribute [rw] isolation_mode - # @return [::Google::Cloud::NetworkServices::V1::ServiceLbPolicy::IsolationMode] - # Optional. The isolation mode of the load balancer. - class IsolationConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class LabelsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The global load balancing algorithm to be used. - module LoadBalancingAlgorithm - # The type of the loadbalancing algorithm is unspecified. - LOAD_BALANCING_ALGORITHM_UNSPECIFIED = 0 - - # Balance traffic across all backends across the world proportionally based - # on capacity. - SPRAY_TO_WORLD = 3 - - # Direct traffic to the nearest region with endpoints and capacity before - # spilling over to other regions and spread the traffic from each client to - # all the MIGs/NEGs in a region. - SPRAY_TO_REGION = 4 - - # Direct traffic to the nearest region with endpoints and capacity before - # spilling over to other regions. All MIGs/NEGs within a region are evenly - # loaded but each client might not spread the traffic to all the MIGs/NEGs - # in the region. - WATERFALL_BY_REGION = 5 - - # Attempt to keep traffic in a single zone closest to the client, before - # spilling over to other zones. - WATERFALL_BY_ZONE = 6 - end - - # The granularity of this isolation restriction. - module IsolationGranularity - # No isolation is configured for the backend service. Traffic can overflow - # based on the load balancing algorithm. - ISOLATION_GRANULARITY_UNSPECIFIED = 0 - - # Traffic for this service will be isolated at the cloud region level. - REGION = 1 - end - - # The mode of this isolation restriction, defining whether clients in a given - # region are allowed to reach out to another region. - module IsolationMode - # No isolation mode is configured for the backend service. - ISOLATION_MODE_UNSPECIFIED = 0 - - # Traffic will be sent to the nearest region. - NEAREST = 1 - - # Traffic will fail if no serving backends are available in the same region - # as the load balancer. - STRICT = 2 - end - end - - # Request used with the ListServiceLbPolicies method. - # @!attribute [rw] parent - # @return [::String] - # Required. The project and location from which the ServiceLbPolicies should - # be listed, specified in the format - # `projects/{project}/locations/{location}`. - # @!attribute [rw] page_size - # @return [::Integer] - # Maximum number of ServiceLbPolicies to return per call. - # @!attribute [rw] page_token - # @return [::String] - # The value returned by the last `ListServiceLbPoliciesResponse` - # Indicates that this is a continuation of a prior `ListRouters` call, - # and that the system should return the next page of data. - class ListServiceLbPoliciesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response returned by the ListServiceLbPolicies method. - # @!attribute [rw] service_lb_policies - # @return [::Array<::Google::Cloud::NetworkServices::V1::ServiceLbPolicy>] - # List of ServiceLbPolicy resources. - # @!attribute [rw] next_page_token - # @return [::String] - # If there might be more results than those appearing in this response, then - # `next_page_token` is included. To get the next set of results, call this - # method again using the value of `next_page_token` as `page_token`. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Unreachable resources. Populated when the request attempts to list all - # resources across all supported locations, while some locations are - # temporarily unavailable. - class ListServiceLbPoliciesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request used by the GetServiceLbPolicy method. - # @!attribute [rw] name - # @return [::String] - # Required. A name of the ServiceLbPolicy to get. Must be in the format - # `projects/{project}/locations/{location}/serviceLbPolicies/*`. - class GetServiceLbPolicyRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request used by the ServiceLbPolicy method. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent resource of the ServiceLbPolicy. Must be in the - # format `projects/{project}/locations/{location}`. - # @!attribute [rw] service_lb_policy_id - # @return [::String] - # Required. Short name of the ServiceLbPolicy resource to be created. - # E.g. for resource name - # `projects/{project}/locations/{location}/serviceLbPolicies/{service_lb_policy_name}`. - # the id is value of \\{service_lb_policy_name} - # @!attribute [rw] service_lb_policy - # @return [::Google::Cloud::NetworkServices::V1::ServiceLbPolicy] - # Required. ServiceLbPolicy resource to be created. - class CreateServiceLbPolicyRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request used by the UpdateServiceLbPolicy method. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Optional. Field mask is used to specify the fields to be overwritten in the - # ServiceLbPolicy resource by the update. - # The fields specified in the update_mask are relative to the resource, not - # the full request. A field will be overwritten if it is in the mask. If the - # user does not provide a mask then all fields will be overwritten. - # @!attribute [rw] service_lb_policy - # @return [::Google::Cloud::NetworkServices::V1::ServiceLbPolicy] - # Required. Updated ServiceLbPolicy resource. - class UpdateServiceLbPolicyRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request used by the DeleteServiceLbPolicy method. - # @!attribute [rw] name - # @return [::String] - # Required. A name of the ServiceLbPolicy to delete. Must be in the format - # `projects/{project}/locations/{location}/serviceLbPolicies/*`. - class DeleteServiceLbPolicyRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/tcp_route.rb b/owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/tcp_route.rb deleted file mode 100644 index 383484643d2d..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/tcp_route.rb +++ /dev/null @@ -1,263 +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 NetworkServices - module V1 - # TcpRoute is the resource defining how TCP traffic should be routed by a - # Mesh/Gateway resource. - # @!attribute [rw] name - # @return [::String] - # Identifier. Name of the TcpRoute resource. It matches pattern - # `projects/*/locations/*/tcpRoutes/tcp_route_name>`. - # @!attribute [r] self_link - # @return [::String] - # Output only. Server-defined URL of this resource - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The timestamp when the resource was created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The timestamp when the resource was updated. - # @!attribute [rw] description - # @return [::String] - # Optional. A free-text description of the resource. Max length 1024 - # characters. - # @!attribute [rw] rules - # @return [::Array<::Google::Cloud::NetworkServices::V1::TcpRoute::RouteRule>] - # Required. Rules that define how traffic is routed and handled. At least one - # RouteRule must be supplied. If there are multiple rules then the action - # taken will be the first rule to match. - # @!attribute [rw] meshes - # @return [::Array<::String>] - # Optional. Meshes defines a list of meshes this TcpRoute is attached to, as - # one of the routing rules to route the requests served by the mesh. - # - # Each mesh reference should match the pattern: - # `projects/*/locations/*/meshes/` - # - # The attached Mesh should be of a type SIDECAR - # @!attribute [rw] gateways - # @return [::Array<::String>] - # Optional. Gateways defines a list of gateways this TcpRoute is attached to, - # as one of the routing rules to route the requests served by the gateway. - # - # Each gateway reference should match the pattern: - # `projects/*/locations/*/gateways/` - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. Set of label tags associated with the TcpRoute resource. - class TcpRoute - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Specifies how to match traffic and how to route traffic when traffic is - # matched. - # @!attribute [rw] matches - # @return [::Array<::Google::Cloud::NetworkServices::V1::TcpRoute::RouteMatch>] - # Optional. RouteMatch defines the predicate used to match requests to a - # given action. Multiple match types are "OR"ed for evaluation. If no - # routeMatch field is specified, this rule will unconditionally match - # traffic. - # @!attribute [rw] action - # @return [::Google::Cloud::NetworkServices::V1::TcpRoute::RouteAction] - # Required. The detailed rule defining how to route matched traffic. - class RouteRule - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # RouteMatch defines the predicate used to match requests to a given action. - # Multiple match types are "OR"ed for evaluation. - # If no routeMatch field is specified, this rule will unconditionally match - # traffic. - # @!attribute [rw] address - # @return [::String] - # Required. Must be specified in the CIDR range format. A CIDR range - # consists of an IP Address and a prefix length to construct the subnet - # mask. By default, the prefix length is 32 (i.e. matches a single IP - # address). Only IPV4 addresses are supported. Examples: "10.0.0.1" - - # matches against this exact IP address. "10.0.0.0/8" - matches against any - # IP address within the 10.0.0.0 subnet and 255.255.255.0 mask. "0.0.0.0/0" - # - matches against any IP address'. - # @!attribute [rw] port - # @return [::String] - # Required. Specifies the destination port to match against. - class RouteMatch - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The specifications for routing traffic and applying associated policies. - # @!attribute [rw] destinations - # @return [::Array<::Google::Cloud::NetworkServices::V1::TcpRoute::RouteDestination>] - # Optional. The destination services to which traffic should be forwarded. - # At least one destination service is required. Only one of route - # destination or original destination can be set. - # @!attribute [rw] original_destination - # @return [::Boolean] - # Optional. If true, Router will use the destination IP and port of the - # original connection as the destination of the request. Default is false. - # Only one of route destinations or original destination can be set. - # @!attribute [rw] idle_timeout - # @return [::Google::Protobuf::Duration] - # Optional. Specifies the idle timeout for the selected route. The idle - # timeout is defined as the period in which there are no bytes sent or - # received on either the upstream or downstream connection. If not set, the - # default idle timeout is 30 seconds. If set to 0s, the timeout will be - # disabled. - class RouteAction - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Describe the destination for traffic to be routed to. - # @!attribute [rw] service_name - # @return [::String] - # Required. The URL of a BackendService to route traffic to. - # @!attribute [rw] weight - # @return [::Integer] - # Optional. Specifies the proportion of requests forwarded to the backend - # referenced by the serviceName field. This is computed as: - # - weight/Sum(weights in this destination list). - # For non-zero values, there may be some epsilon from the exact proportion - # defined here depending on the precision an implementation supports. - # - # If only one serviceName is specified and it has a weight greater than 0, - # 100% of the traffic is forwarded to that backend. - # - # If weights are specified for any one service name, they need to be - # specified for all of them. - # - # If weights are unspecified for all services, then, traffic is distributed - # in equal proportions to all of them. - class RouteDestination - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class LabelsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Request used with the ListTcpRoutes method. - # @!attribute [rw] parent - # @return [::String] - # Required. The project and location from which the TcpRoutes should be - # listed, specified in the format `projects/*/locations/*`. - # @!attribute [rw] page_size - # @return [::Integer] - # Maximum number of TcpRoutes to return per call. - # @!attribute [rw] page_token - # @return [::String] - # The value returned by the last `ListTcpRoutesResponse` - # Indicates that this is a continuation of a prior `ListTcpRoutes` call, - # and that the system should return the next page of data. - # @!attribute [rw] return_partial_success - # @return [::Boolean] - # Optional. If true, allow partial responses for multi-regional Aggregated - # List requests. Otherwise if one of the locations is down or unreachable, - # the Aggregated List request will fail. - class ListTcpRoutesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response returned by the ListTcpRoutes method. - # @!attribute [rw] tcp_routes - # @return [::Array<::Google::Cloud::NetworkServices::V1::TcpRoute>] - # List of TcpRoute resources. - # @!attribute [rw] next_page_token - # @return [::String] - # If there might be more results than those appearing in this response, then - # `next_page_token` is included. To get the next set of results, call this - # method again using the value of `next_page_token` as `page_token`. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Unreachable resources. Populated when the request opts into - # {::Google::Cloud::NetworkServices::V1::ListTcpRoutesRequest#return_partial_success return_partial_success} - # and reading across collections e.g. when attempting to list all resources - # across all supported locations. - class ListTcpRoutesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request used by the GetTcpRoute method. - # @!attribute [rw] name - # @return [::String] - # Required. A name of the TcpRoute to get. Must be in the format - # `projects/*/locations/*/tcpRoutes/*`. - class GetTcpRouteRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request used by the TcpRoute method. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent resource of the TcpRoute. Must be in the - # format `projects/*/locations/*`. - # @!attribute [rw] tcp_route_id - # @return [::String] - # Required. Short name of the TcpRoute resource to be created. - # @!attribute [rw] tcp_route - # @return [::Google::Cloud::NetworkServices::V1::TcpRoute] - # Required. TcpRoute resource to be created. - class CreateTcpRouteRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request used by the UpdateTcpRoute method. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Optional. Field mask is used to specify the fields to be overwritten in the - # TcpRoute resource by the update. - # The fields specified in the update_mask are relative to the resource, not - # the full request. A field will be overwritten if it is in the mask. If the - # user does not provide a mask then all fields will be overwritten. - # @!attribute [rw] tcp_route - # @return [::Google::Cloud::NetworkServices::V1::TcpRoute] - # Required. Updated TcpRoute resource. - class UpdateTcpRouteRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request used by the DeleteTcpRoute method. - # @!attribute [rw] name - # @return [::String] - # Required. A name of the TcpRoute to delete. Must be in the format - # `projects/*/locations/*/tcpRoutes/*`. - class DeleteTcpRouteRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/tls_route.rb b/owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/tls_route.rb deleted file mode 100644 index 9f64e59aba1f..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/tls_route.rb +++ /dev/null @@ -1,256 +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 NetworkServices - module V1 - # TlsRoute defines how traffic should be routed based on SNI and other matching - # L3 attributes. - # @!attribute [rw] name - # @return [::String] - # Identifier. Name of the TlsRoute resource. It matches pattern - # `projects/*/locations/*/tlsRoutes/tls_route_name>`. - # @!attribute [r] self_link - # @return [::String] - # Output only. Server-defined URL of this resource - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The timestamp when the resource was created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The timestamp when the resource was updated. - # @!attribute [rw] description - # @return [::String] - # Optional. A free-text description of the resource. Max length 1024 - # characters. - # @!attribute [rw] rules - # @return [::Array<::Google::Cloud::NetworkServices::V1::TlsRoute::RouteRule>] - # Required. Rules that define how traffic is routed and handled. At least one - # RouteRule must be supplied. If there are multiple rules then the action - # taken will be the first rule to match. - # @!attribute [rw] meshes - # @return [::Array<::String>] - # Optional. Meshes defines a list of meshes this TlsRoute is attached to, as - # one of the routing rules to route the requests served by the mesh. - # - # Each mesh reference should match the pattern: - # `projects/*/locations/*/meshes/` - # - # The attached Mesh should be of a type SIDECAR - # @!attribute [rw] gateways - # @return [::Array<::String>] - # Optional. Gateways defines a list of gateways this TlsRoute is attached to, - # as one of the routing rules to route the requests served by the gateway. - # - # Each gateway reference should match the pattern: - # `projects/*/locations/*/gateways/` - # @!attribute [rw] target_proxies - # @return [::Array<::String>] - # Optional. TargetProxies defines a list of TargetTcpProxies this TlsRoute is - # attached to, as one of the routing rules to route the requests served by - # the TargetTcpProxy. - # - # Each TargetTcpProxy reference should match the pattern: - # `projects/*/locations/*/targetTcpProxies/` - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. Set of label tags associated with the TlsRoute resource. - class TlsRoute - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Specifies how to match traffic and how to route traffic when traffic is - # matched. - # @!attribute [rw] matches - # @return [::Array<::Google::Cloud::NetworkServices::V1::TlsRoute::RouteMatch>] - # Required. RouteMatch defines the predicate used to match requests to a - # given action. Multiple match types are "OR"ed for evaluation. Atleast one - # RouteMatch must be supplied. - # @!attribute [rw] action - # @return [::Google::Cloud::NetworkServices::V1::TlsRoute::RouteAction] - # Required. The detailed rule defining how to route matched traffic. - class RouteRule - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # RouteMatch defines the predicate used to match requests to a given action. - # Multiple match types are "AND"ed for evaluation. - # @!attribute [rw] sni_host - # @return [::Array<::String>] - # Optional. SNI (server name indicator) to match against. - # SNI will be matched against all wildcard domains, i.e. `www.example.com` - # will be first matched against `www.example.com`, then `*.example.com`, - # then `*.com.` - # Partial wildcards are not supported, and values like *w.example.com are - # invalid. - # At least one of sni_host and alpn is required. - # Up to 100 sni hosts across all matches can be set. - # @!attribute [rw] alpn - # @return [::Array<::String>] - # Optional. ALPN (Application-Layer Protocol Negotiation) to match against. - # Examples: "http/1.1", "h2". - # At least one of sni_host and alpn is required. - # Up to 5 alpns across all matches can be set. - class RouteMatch - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The specifications for routing traffic and applying associated policies. - # @!attribute [rw] destinations - # @return [::Array<::Google::Cloud::NetworkServices::V1::TlsRoute::RouteDestination>] - # Required. The destination services to which traffic should be forwarded. - # At least one destination service is required. - # @!attribute [rw] idle_timeout - # @return [::Google::Protobuf::Duration] - # Optional. Specifies the idle timeout for the selected route. The idle - # timeout is defined as the period in which there are no bytes sent or - # received on either the upstream or downstream connection. If not set, the - # default idle timeout is 1 hour. If set to 0s, the timeout will be - # disabled. - class RouteAction - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Describe the destination for traffic to be routed to. - # @!attribute [rw] service_name - # @return [::String] - # Required. The URL of a BackendService to route traffic to. - # @!attribute [rw] weight - # @return [::Integer] - # Optional. Specifies the proportion of requests forwarded to the backend - # referenced by the service_name field. This is computed as: - # - weight/Sum(weights in destinations) - # Weights in all destinations does not need to sum up to 100. - class RouteDestination - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class LabelsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Request used with the ListTlsRoutes method. - # @!attribute [rw] parent - # @return [::String] - # Required. The project and location from which the TlsRoutes should be - # listed, specified in the format `projects/*/locations/*`. - # @!attribute [rw] page_size - # @return [::Integer] - # Maximum number of TlsRoutes to return per call. - # @!attribute [rw] page_token - # @return [::String] - # The value returned by the last `ListTlsRoutesResponse` - # Indicates that this is a continuation of a prior `ListTlsRoutes` call, - # and that the system should return the next page of data. - # @!attribute [rw] return_partial_success - # @return [::Boolean] - # Optional. If true, allow partial responses for multi-regional Aggregated - # List requests. Otherwise if one of the locations is down or unreachable, - # the Aggregated List request will fail. - class ListTlsRoutesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response returned by the ListTlsRoutes method. - # @!attribute [rw] tls_routes - # @return [::Array<::Google::Cloud::NetworkServices::V1::TlsRoute>] - # List of TlsRoute resources. - # @!attribute [rw] next_page_token - # @return [::String] - # If there might be more results than those appearing in this response, then - # `next_page_token` is included. To get the next set of results, call this - # method again using the value of `next_page_token` as `page_token`. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Unreachable resources. Populated when the request opts into - # {::Google::Cloud::NetworkServices::V1::ListTlsRoutesRequest#return_partial_success return_partial_success} - # and reading across collections e.g. when attempting to list all resources - # across all supported locations. - class ListTlsRoutesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request used by the GetTlsRoute method. - # @!attribute [rw] name - # @return [::String] - # Required. A name of the TlsRoute to get. Must be in the format - # `projects/*/locations/*/tlsRoutes/*`. - class GetTlsRouteRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request used by the TlsRoute method. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent resource of the TlsRoute. Must be in the - # format `projects/*/locations/*`. - # @!attribute [rw] tls_route_id - # @return [::String] - # Required. Short name of the TlsRoute resource to be created. - # @!attribute [rw] tls_route - # @return [::Google::Cloud::NetworkServices::V1::TlsRoute] - # Required. TlsRoute resource to be created. - class CreateTlsRouteRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request used by the UpdateTlsRoute method. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Optional. Field mask is used to specify the fields to be overwritten in the - # TlsRoute resource by the update. - # The fields specified in the update_mask are relative to the resource, not - # the full request. A field will be overwritten if it is in the mask. If the - # user does not provide a mask then all fields will be overwritten. - # @!attribute [rw] tls_route - # @return [::Google::Cloud::NetworkServices::V1::TlsRoute] - # Required. Updated TlsRoute resource. - class UpdateTlsRouteRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request used by the DeleteTlsRoute method. - # @!attribute [rw] name - # @return [::String] - # Required. A name of the TlsRoute to delete. Must be in the format - # `projects/*/locations/*/tlsRoutes/*`. - class DeleteTlsRouteRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/longrunning/operations.rb deleted file mode 100644 index 7a757f512165..000000000000 --- a/owl-bot-staging/google-cloud-network_services-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_services-v1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/protobuf/any.rb deleted file mode 100644 index 58691995f02e..000000000000 --- a/owl-bot-staging/google-cloud-network_services-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_services-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index ea59f1f91daf..000000000000 --- a/owl-bot-staging/google-cloud-network_services-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_services-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/protobuf/empty.rb deleted file mode 100644 index 83e4481834a6..000000000000 --- a/owl-bot-staging/google-cloud-network_services-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_services-v1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/protobuf/field_mask.rb deleted file mode 100644 index 7f3ffc78601a..000000000000 --- a/owl-bot-staging/google-cloud-network_services-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_services-v1/proto_docs/google/protobuf/struct.rb b/owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/protobuf/struct.rb deleted file mode 100644 index 39e1aca868d2..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/protobuf/struct.rb +++ /dev/null @@ -1,108 +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 - # `Struct` represents a structured data value, consisting of fields - # which map to dynamically typed values. In some languages, `Struct` - # might be supported by a native representation. For example, in - # scripting languages like JS a struct is represented as an - # object. The details of that representation are described together - # with the proto support for the language. - # - # The JSON representation for `Struct` is JSON object. - # @!attribute [rw] fields - # @return [::Google::Protobuf::Map{::String => ::Google::Protobuf::Value}] - # Unordered map of dynamically typed values. - class Struct - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::Google::Protobuf::Value] - class FieldsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # `Value` represents a dynamically typed value which can be either - # null, a number, a string, a boolean, a recursive struct value, or a - # list of values. A producer of value is expected to set one of these - # variants. Absence of any variant indicates an error. - # - # The JSON representation for `Value` is JSON value. - # @!attribute [rw] null_value - # @return [::Google::Protobuf::NullValue] - # Represents a null value. - # - # Note: The following fields are mutually exclusive: `null_value`, `number_value`, `string_value`, `bool_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] number_value - # @return [::Float] - # Represents a double value. - # - # Note: The following fields are mutually exclusive: `number_value`, `null_value`, `string_value`, `bool_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] string_value - # @return [::String] - # Represents a string value. - # - # Note: The following fields are mutually exclusive: `string_value`, `null_value`, `number_value`, `bool_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] bool_value - # @return [::Boolean] - # Represents a boolean value. - # - # Note: The following fields are mutually exclusive: `bool_value`, `null_value`, `number_value`, `string_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] struct_value - # @return [::Google::Protobuf::Struct] - # Represents a structured value. - # - # Note: The following fields are mutually exclusive: `struct_value`, `null_value`, `number_value`, `string_value`, `bool_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] list_value - # @return [::Google::Protobuf::ListValue] - # Represents a repeated `Value`. - # - # Note: The following fields are mutually exclusive: `list_value`, `null_value`, `number_value`, `string_value`, `bool_value`, `struct_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class Value - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `ListValue` is a wrapper around a repeated field of values. - # - # The JSON representation for `ListValue` is JSON array. - # @!attribute [rw] values - # @return [::Array<::Google::Protobuf::Value>] - # Repeated field of dynamically typed values. - class ListValue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `NullValue` is a singleton enumeration to represent the null value for the - # `Value` type union. - # - # The JSON representation for `NullValue` is JSON `null`. - module NullValue - # Null value. - NULL_VALUE = 0 - end - end -end diff --git a/owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/protobuf/timestamp.rb deleted file mode 100644 index 74352be9c58c..000000000000 --- a/owl-bot-staging/google-cloud-network_services-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_services-v1/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/rpc/status.rb deleted file mode 100644 index c1a1c07eb2db..000000000000 --- a/owl-bot-staging/google-cloud-network_services-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_services-v1/proto_docs/google/type/expr.rb b/owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/type/expr.rb deleted file mode 100644 index 53e7733b6592..000000000000 --- a/owl-bot-staging/google-cloud-network_services-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_services-v1/snippets/Gemfile b/owl-bot-staging/google-cloud-network_services-v1/snippets/Gemfile deleted file mode 100644 index 56b13bcaff4e..000000000000 --- a/owl-bot-staging/google-cloud-network_services-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_services-v1", path: "../" -else - gem "google-cloud-network_services-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_services-v1/snippets/dep_service/create_authz_extension.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/create_authz_extension.rb deleted file mode 100644 index ede6b54e32bd..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/create_authz_extension.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 networkservices_v1_generated_DepService_CreateAuthzExtension_sync] -require "google/cloud/network_services/v1" - -## -# Snippet for the create_authz_extension call in the DepService 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::NetworkServices::V1::DepService::Client#create_authz_extension. -# -def create_authz_extension - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::NetworkServices::V1::DepService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::NetworkServices::V1::CreateAuthzExtensionRequest.new - - # Call the create_authz_extension method. - result = client.create_authz_extension 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 networkservices_v1_generated_DepService_CreateAuthzExtension_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/create_lb_edge_extension.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/create_lb_edge_extension.rb deleted file mode 100644 index 229240201ead..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/create_lb_edge_extension.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 networkservices_v1_generated_DepService_CreateLbEdgeExtension_sync] -require "google/cloud/network_services/v1" - -## -# Snippet for the create_lb_edge_extension call in the DepService 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::NetworkServices::V1::DepService::Client#create_lb_edge_extension. -# -def create_lb_edge_extension - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::NetworkServices::V1::DepService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::NetworkServices::V1::CreateLbEdgeExtensionRequest.new - - # Call the create_lb_edge_extension method. - result = client.create_lb_edge_extension 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 networkservices_v1_generated_DepService_CreateLbEdgeExtension_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/create_lb_route_extension.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/create_lb_route_extension.rb deleted file mode 100644 index cc8501fb195b..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/create_lb_route_extension.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 networkservices_v1_generated_DepService_CreateLbRouteExtension_sync] -require "google/cloud/network_services/v1" - -## -# Snippet for the create_lb_route_extension call in the DepService 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::NetworkServices::V1::DepService::Client#create_lb_route_extension. -# -def create_lb_route_extension - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::NetworkServices::V1::DepService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::NetworkServices::V1::CreateLbRouteExtensionRequest.new - - # Call the create_lb_route_extension method. - result = client.create_lb_route_extension 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 networkservices_v1_generated_DepService_CreateLbRouteExtension_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/create_lb_traffic_extension.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/create_lb_traffic_extension.rb deleted file mode 100644 index 1f741bbf7229..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/create_lb_traffic_extension.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 networkservices_v1_generated_DepService_CreateLbTrafficExtension_sync] -require "google/cloud/network_services/v1" - -## -# Snippet for the create_lb_traffic_extension call in the DepService 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::NetworkServices::V1::DepService::Client#create_lb_traffic_extension. -# -def create_lb_traffic_extension - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::NetworkServices::V1::DepService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::NetworkServices::V1::CreateLbTrafficExtensionRequest.new - - # Call the create_lb_traffic_extension method. - result = client.create_lb_traffic_extension 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 networkservices_v1_generated_DepService_CreateLbTrafficExtension_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/delete_authz_extension.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/delete_authz_extension.rb deleted file mode 100644 index 0b1f11e61fd6..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/delete_authz_extension.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 networkservices_v1_generated_DepService_DeleteAuthzExtension_sync] -require "google/cloud/network_services/v1" - -## -# Snippet for the delete_authz_extension call in the DepService 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::NetworkServices::V1::DepService::Client#delete_authz_extension. -# -def delete_authz_extension - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::NetworkServices::V1::DepService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::NetworkServices::V1::DeleteAuthzExtensionRequest.new - - # Call the delete_authz_extension method. - result = client.delete_authz_extension 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 networkservices_v1_generated_DepService_DeleteAuthzExtension_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/delete_lb_edge_extension.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/delete_lb_edge_extension.rb deleted file mode 100644 index 4a0ad5dac21f..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/delete_lb_edge_extension.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 networkservices_v1_generated_DepService_DeleteLbEdgeExtension_sync] -require "google/cloud/network_services/v1" - -## -# Snippet for the delete_lb_edge_extension call in the DepService 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::NetworkServices::V1::DepService::Client#delete_lb_edge_extension. -# -def delete_lb_edge_extension - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::NetworkServices::V1::DepService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::NetworkServices::V1::DeleteLbEdgeExtensionRequest.new - - # Call the delete_lb_edge_extension method. - result = client.delete_lb_edge_extension 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 networkservices_v1_generated_DepService_DeleteLbEdgeExtension_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/delete_lb_route_extension.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/delete_lb_route_extension.rb deleted file mode 100644 index 95814758b3eb..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/delete_lb_route_extension.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 networkservices_v1_generated_DepService_DeleteLbRouteExtension_sync] -require "google/cloud/network_services/v1" - -## -# Snippet for the delete_lb_route_extension call in the DepService 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::NetworkServices::V1::DepService::Client#delete_lb_route_extension. -# -def delete_lb_route_extension - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::NetworkServices::V1::DepService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::NetworkServices::V1::DeleteLbRouteExtensionRequest.new - - # Call the delete_lb_route_extension method. - result = client.delete_lb_route_extension 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 networkservices_v1_generated_DepService_DeleteLbRouteExtension_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/delete_lb_traffic_extension.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/delete_lb_traffic_extension.rb deleted file mode 100644 index 004d99d73688..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/delete_lb_traffic_extension.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 networkservices_v1_generated_DepService_DeleteLbTrafficExtension_sync] -require "google/cloud/network_services/v1" - -## -# Snippet for the delete_lb_traffic_extension call in the DepService 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::NetworkServices::V1::DepService::Client#delete_lb_traffic_extension. -# -def delete_lb_traffic_extension - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::NetworkServices::V1::DepService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::NetworkServices::V1::DeleteLbTrafficExtensionRequest.new - - # Call the delete_lb_traffic_extension method. - result = client.delete_lb_traffic_extension 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 networkservices_v1_generated_DepService_DeleteLbTrafficExtension_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/get_authz_extension.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/get_authz_extension.rb deleted file mode 100644 index d246d79b3311..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/get_authz_extension.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 networkservices_v1_generated_DepService_GetAuthzExtension_sync] -require "google/cloud/network_services/v1" - -## -# Snippet for the get_authz_extension call in the DepService 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::NetworkServices::V1::DepService::Client#get_authz_extension. -# -def get_authz_extension - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::NetworkServices::V1::DepService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::NetworkServices::V1::GetAuthzExtensionRequest.new - - # Call the get_authz_extension method. - result = client.get_authz_extension request - - # The returned object is of type Google::Cloud::NetworkServices::V1::AuthzExtension. - p result -end -# [END networkservices_v1_generated_DepService_GetAuthzExtension_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/get_lb_edge_extension.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/get_lb_edge_extension.rb deleted file mode 100644 index 60091d45e662..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/get_lb_edge_extension.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 networkservices_v1_generated_DepService_GetLbEdgeExtension_sync] -require "google/cloud/network_services/v1" - -## -# Snippet for the get_lb_edge_extension call in the DepService 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::NetworkServices::V1::DepService::Client#get_lb_edge_extension. -# -def get_lb_edge_extension - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::NetworkServices::V1::DepService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::NetworkServices::V1::GetLbEdgeExtensionRequest.new - - # Call the get_lb_edge_extension method. - result = client.get_lb_edge_extension request - - # The returned object is of type Google::Cloud::NetworkServices::V1::LbEdgeExtension. - p result -end -# [END networkservices_v1_generated_DepService_GetLbEdgeExtension_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/get_lb_route_extension.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/get_lb_route_extension.rb deleted file mode 100644 index 4fcdfe6bf8eb..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/get_lb_route_extension.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 networkservices_v1_generated_DepService_GetLbRouteExtension_sync] -require "google/cloud/network_services/v1" - -## -# Snippet for the get_lb_route_extension call in the DepService 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::NetworkServices::V1::DepService::Client#get_lb_route_extension. -# -def get_lb_route_extension - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::NetworkServices::V1::DepService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::NetworkServices::V1::GetLbRouteExtensionRequest.new - - # Call the get_lb_route_extension method. - result = client.get_lb_route_extension request - - # The returned object is of type Google::Cloud::NetworkServices::V1::LbRouteExtension. - p result -end -# [END networkservices_v1_generated_DepService_GetLbRouteExtension_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/get_lb_traffic_extension.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/get_lb_traffic_extension.rb deleted file mode 100644 index 063d531f3967..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/get_lb_traffic_extension.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 networkservices_v1_generated_DepService_GetLbTrafficExtension_sync] -require "google/cloud/network_services/v1" - -## -# Snippet for the get_lb_traffic_extension call in the DepService 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::NetworkServices::V1::DepService::Client#get_lb_traffic_extension. -# -def get_lb_traffic_extension - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::NetworkServices::V1::DepService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::NetworkServices::V1::GetLbTrafficExtensionRequest.new - - # Call the get_lb_traffic_extension method. - result = client.get_lb_traffic_extension request - - # The returned object is of type Google::Cloud::NetworkServices::V1::LbTrafficExtension. - p result -end -# [END networkservices_v1_generated_DepService_GetLbTrafficExtension_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/list_authz_extensions.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/list_authz_extensions.rb deleted file mode 100644 index 31c4082339c5..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/list_authz_extensions.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 networkservices_v1_generated_DepService_ListAuthzExtensions_sync] -require "google/cloud/network_services/v1" - -## -# Snippet for the list_authz_extensions call in the DepService 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::NetworkServices::V1::DepService::Client#list_authz_extensions. -# -def list_authz_extensions - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::NetworkServices::V1::DepService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::NetworkServices::V1::ListAuthzExtensionsRequest.new - - # Call the list_authz_extensions method. - result = client.list_authz_extensions 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::NetworkServices::V1::AuthzExtension. - p item - end -end -# [END networkservices_v1_generated_DepService_ListAuthzExtensions_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/list_lb_edge_extensions.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/list_lb_edge_extensions.rb deleted file mode 100644 index c113e6912d17..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/list_lb_edge_extensions.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 networkservices_v1_generated_DepService_ListLbEdgeExtensions_sync] -require "google/cloud/network_services/v1" - -## -# Snippet for the list_lb_edge_extensions call in the DepService 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::NetworkServices::V1::DepService::Client#list_lb_edge_extensions. -# -def list_lb_edge_extensions - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::NetworkServices::V1::DepService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::NetworkServices::V1::ListLbEdgeExtensionsRequest.new - - # Call the list_lb_edge_extensions method. - result = client.list_lb_edge_extensions 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::NetworkServices::V1::LbEdgeExtension. - p item - end -end -# [END networkservices_v1_generated_DepService_ListLbEdgeExtensions_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/list_lb_route_extensions.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/list_lb_route_extensions.rb deleted file mode 100644 index 4418090222fb..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/list_lb_route_extensions.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 networkservices_v1_generated_DepService_ListLbRouteExtensions_sync] -require "google/cloud/network_services/v1" - -## -# Snippet for the list_lb_route_extensions call in the DepService 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::NetworkServices::V1::DepService::Client#list_lb_route_extensions. -# -def list_lb_route_extensions - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::NetworkServices::V1::DepService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::NetworkServices::V1::ListLbRouteExtensionsRequest.new - - # Call the list_lb_route_extensions method. - result = client.list_lb_route_extensions 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::NetworkServices::V1::LbRouteExtension. - p item - end -end -# [END networkservices_v1_generated_DepService_ListLbRouteExtensions_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/list_lb_traffic_extensions.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/list_lb_traffic_extensions.rb deleted file mode 100644 index e6c8e91db343..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/list_lb_traffic_extensions.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 networkservices_v1_generated_DepService_ListLbTrafficExtensions_sync] -require "google/cloud/network_services/v1" - -## -# Snippet for the list_lb_traffic_extensions call in the DepService 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::NetworkServices::V1::DepService::Client#list_lb_traffic_extensions. -# -def list_lb_traffic_extensions - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::NetworkServices::V1::DepService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::NetworkServices::V1::ListLbTrafficExtensionsRequest.new - - # Call the list_lb_traffic_extensions method. - result = client.list_lb_traffic_extensions 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::NetworkServices::V1::LbTrafficExtension. - p item - end -end -# [END networkservices_v1_generated_DepService_ListLbTrafficExtensions_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/update_authz_extension.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/update_authz_extension.rb deleted file mode 100644 index 96bcf84a1a2c..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/update_authz_extension.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 networkservices_v1_generated_DepService_UpdateAuthzExtension_sync] -require "google/cloud/network_services/v1" - -## -# Snippet for the update_authz_extension call in the DepService 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::NetworkServices::V1::DepService::Client#update_authz_extension. -# -def update_authz_extension - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::NetworkServices::V1::DepService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::NetworkServices::V1::UpdateAuthzExtensionRequest.new - - # Call the update_authz_extension method. - result = client.update_authz_extension 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 networkservices_v1_generated_DepService_UpdateAuthzExtension_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/update_lb_edge_extension.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/update_lb_edge_extension.rb deleted file mode 100644 index 878e3dc88238..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/update_lb_edge_extension.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 networkservices_v1_generated_DepService_UpdateLbEdgeExtension_sync] -require "google/cloud/network_services/v1" - -## -# Snippet for the update_lb_edge_extension call in the DepService 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::NetworkServices::V1::DepService::Client#update_lb_edge_extension. -# -def update_lb_edge_extension - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::NetworkServices::V1::DepService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::NetworkServices::V1::UpdateLbEdgeExtensionRequest.new - - # Call the update_lb_edge_extension method. - result = client.update_lb_edge_extension 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 networkservices_v1_generated_DepService_UpdateLbEdgeExtension_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/update_lb_route_extension.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/update_lb_route_extension.rb deleted file mode 100644 index 66f3e36d1c56..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/update_lb_route_extension.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 networkservices_v1_generated_DepService_UpdateLbRouteExtension_sync] -require "google/cloud/network_services/v1" - -## -# Snippet for the update_lb_route_extension call in the DepService 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::NetworkServices::V1::DepService::Client#update_lb_route_extension. -# -def update_lb_route_extension - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::NetworkServices::V1::DepService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::NetworkServices::V1::UpdateLbRouteExtensionRequest.new - - # Call the update_lb_route_extension method. - result = client.update_lb_route_extension 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 networkservices_v1_generated_DepService_UpdateLbRouteExtension_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/update_lb_traffic_extension.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/update_lb_traffic_extension.rb deleted file mode 100644 index dbe882165d0d..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/update_lb_traffic_extension.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 networkservices_v1_generated_DepService_UpdateLbTrafficExtension_sync] -require "google/cloud/network_services/v1" - -## -# Snippet for the update_lb_traffic_extension call in the DepService 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::NetworkServices::V1::DepService::Client#update_lb_traffic_extension. -# -def update_lb_traffic_extension - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::NetworkServices::V1::DepService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::NetworkServices::V1::UpdateLbTrafficExtensionRequest.new - - # Call the update_lb_traffic_extension method. - result = client.update_lb_traffic_extension 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 networkservices_v1_generated_DepService_UpdateLbTrafficExtension_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/create_endpoint_policy.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/create_endpoint_policy.rb deleted file mode 100644 index 11c7e0b7efa1..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/create_endpoint_policy.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 networkservices_v1_generated_NetworkServices_CreateEndpointPolicy_sync] -require "google/cloud/network_services/v1" - -## -# Snippet for the create_endpoint_policy call in the NetworkServices 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::NetworkServices::V1::NetworkServices::Client#create_endpoint_policy. -# -def create_endpoint_policy - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::NetworkServices::V1::CreateEndpointPolicyRequest.new - - # Call the create_endpoint_policy method. - result = client.create_endpoint_policy 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 networkservices_v1_generated_NetworkServices_CreateEndpointPolicy_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/create_gateway.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/create_gateway.rb deleted file mode 100644 index 8a0a08655678..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/create_gateway.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 networkservices_v1_generated_NetworkServices_CreateGateway_sync] -require "google/cloud/network_services/v1" - -## -# Snippet for the create_gateway call in the NetworkServices 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::NetworkServices::V1::NetworkServices::Client#create_gateway. -# -def create_gateway - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::NetworkServices::V1::CreateGatewayRequest.new - - # Call the create_gateway method. - result = client.create_gateway 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 networkservices_v1_generated_NetworkServices_CreateGateway_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/create_grpc_route.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/create_grpc_route.rb deleted file mode 100644 index 3146e4ba9b8c..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/create_grpc_route.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 networkservices_v1_generated_NetworkServices_CreateGrpcRoute_sync] -require "google/cloud/network_services/v1" - -## -# Snippet for the create_grpc_route call in the NetworkServices 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::NetworkServices::V1::NetworkServices::Client#create_grpc_route. -# -def create_grpc_route - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::NetworkServices::V1::CreateGrpcRouteRequest.new - - # Call the create_grpc_route method. - result = client.create_grpc_route 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 networkservices_v1_generated_NetworkServices_CreateGrpcRoute_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/create_http_route.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/create_http_route.rb deleted file mode 100644 index 9fc0c35ff06d..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/create_http_route.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 networkservices_v1_generated_NetworkServices_CreateHttpRoute_sync] -require "google/cloud/network_services/v1" - -## -# Snippet for the create_http_route call in the NetworkServices 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::NetworkServices::V1::NetworkServices::Client#create_http_route. -# -def create_http_route - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::NetworkServices::V1::CreateHttpRouteRequest.new - - # Call the create_http_route method. - result = client.create_http_route 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 networkservices_v1_generated_NetworkServices_CreateHttpRoute_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/create_mesh.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/create_mesh.rb deleted file mode 100644 index 5bb14f520eee..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/create_mesh.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 networkservices_v1_generated_NetworkServices_CreateMesh_sync] -require "google/cloud/network_services/v1" - -## -# Snippet for the create_mesh call in the NetworkServices 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::NetworkServices::V1::NetworkServices::Client#create_mesh. -# -def create_mesh - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::NetworkServices::V1::CreateMeshRequest.new - - # Call the create_mesh method. - result = client.create_mesh 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 networkservices_v1_generated_NetworkServices_CreateMesh_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/create_service_binding.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/create_service_binding.rb deleted file mode 100644 index 68b065cc78e0..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/create_service_binding.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 networkservices_v1_generated_NetworkServices_CreateServiceBinding_sync] -require "google/cloud/network_services/v1" - -## -# Snippet for the create_service_binding call in the NetworkServices 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::NetworkServices::V1::NetworkServices::Client#create_service_binding. -# -def create_service_binding - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::NetworkServices::V1::CreateServiceBindingRequest.new - - # Call the create_service_binding method. - result = client.create_service_binding 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 networkservices_v1_generated_NetworkServices_CreateServiceBinding_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/create_service_lb_policy.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/create_service_lb_policy.rb deleted file mode 100644 index 4df14c802f11..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/create_service_lb_policy.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 networkservices_v1_generated_NetworkServices_CreateServiceLbPolicy_sync] -require "google/cloud/network_services/v1" - -## -# Snippet for the create_service_lb_policy call in the NetworkServices 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::NetworkServices::V1::NetworkServices::Client#create_service_lb_policy. -# -def create_service_lb_policy - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::NetworkServices::V1::CreateServiceLbPolicyRequest.new - - # Call the create_service_lb_policy method. - result = client.create_service_lb_policy 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 networkservices_v1_generated_NetworkServices_CreateServiceLbPolicy_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/create_tcp_route.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/create_tcp_route.rb deleted file mode 100644 index 7713488f79cf..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/create_tcp_route.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 networkservices_v1_generated_NetworkServices_CreateTcpRoute_sync] -require "google/cloud/network_services/v1" - -## -# Snippet for the create_tcp_route call in the NetworkServices 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::NetworkServices::V1::NetworkServices::Client#create_tcp_route. -# -def create_tcp_route - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::NetworkServices::V1::CreateTcpRouteRequest.new - - # Call the create_tcp_route method. - result = client.create_tcp_route 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 networkservices_v1_generated_NetworkServices_CreateTcpRoute_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/create_tls_route.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/create_tls_route.rb deleted file mode 100644 index f87a51f8a71f..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/create_tls_route.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 networkservices_v1_generated_NetworkServices_CreateTlsRoute_sync] -require "google/cloud/network_services/v1" - -## -# Snippet for the create_tls_route call in the NetworkServices 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::NetworkServices::V1::NetworkServices::Client#create_tls_route. -# -def create_tls_route - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::NetworkServices::V1::CreateTlsRouteRequest.new - - # Call the create_tls_route method. - result = client.create_tls_route 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 networkservices_v1_generated_NetworkServices_CreateTlsRoute_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/create_wasm_plugin.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/create_wasm_plugin.rb deleted file mode 100644 index d7a64706e774..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/create_wasm_plugin.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 networkservices_v1_generated_NetworkServices_CreateWasmPlugin_sync] -require "google/cloud/network_services/v1" - -## -# Snippet for the create_wasm_plugin call in the NetworkServices 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::NetworkServices::V1::NetworkServices::Client#create_wasm_plugin. -# -def create_wasm_plugin - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::NetworkServices::V1::CreateWasmPluginRequest.new - - # Call the create_wasm_plugin method. - result = client.create_wasm_plugin 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 networkservices_v1_generated_NetworkServices_CreateWasmPlugin_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/create_wasm_plugin_version.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/create_wasm_plugin_version.rb deleted file mode 100644 index 48f30519111e..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/create_wasm_plugin_version.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 networkservices_v1_generated_NetworkServices_CreateWasmPluginVersion_sync] -require "google/cloud/network_services/v1" - -## -# Snippet for the create_wasm_plugin_version call in the NetworkServices 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::NetworkServices::V1::NetworkServices::Client#create_wasm_plugin_version. -# -def create_wasm_plugin_version - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::NetworkServices::V1::CreateWasmPluginVersionRequest.new - - # Call the create_wasm_plugin_version method. - result = client.create_wasm_plugin_version 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 networkservices_v1_generated_NetworkServices_CreateWasmPluginVersion_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/delete_endpoint_policy.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/delete_endpoint_policy.rb deleted file mode 100644 index da61e98011fe..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/delete_endpoint_policy.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 networkservices_v1_generated_NetworkServices_DeleteEndpointPolicy_sync] -require "google/cloud/network_services/v1" - -## -# Snippet for the delete_endpoint_policy call in the NetworkServices 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::NetworkServices::V1::NetworkServices::Client#delete_endpoint_policy. -# -def delete_endpoint_policy - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::NetworkServices::V1::DeleteEndpointPolicyRequest.new - - # Call the delete_endpoint_policy method. - result = client.delete_endpoint_policy 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 networkservices_v1_generated_NetworkServices_DeleteEndpointPolicy_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/delete_gateway.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/delete_gateway.rb deleted file mode 100644 index 191cd7e538aa..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/delete_gateway.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 networkservices_v1_generated_NetworkServices_DeleteGateway_sync] -require "google/cloud/network_services/v1" - -## -# Snippet for the delete_gateway call in the NetworkServices 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::NetworkServices::V1::NetworkServices::Client#delete_gateway. -# -def delete_gateway - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::NetworkServices::V1::DeleteGatewayRequest.new - - # Call the delete_gateway method. - result = client.delete_gateway 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 networkservices_v1_generated_NetworkServices_DeleteGateway_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/delete_grpc_route.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/delete_grpc_route.rb deleted file mode 100644 index 362fca28ee28..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/delete_grpc_route.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 networkservices_v1_generated_NetworkServices_DeleteGrpcRoute_sync] -require "google/cloud/network_services/v1" - -## -# Snippet for the delete_grpc_route call in the NetworkServices 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::NetworkServices::V1::NetworkServices::Client#delete_grpc_route. -# -def delete_grpc_route - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::NetworkServices::V1::DeleteGrpcRouteRequest.new - - # Call the delete_grpc_route method. - result = client.delete_grpc_route 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 networkservices_v1_generated_NetworkServices_DeleteGrpcRoute_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/delete_http_route.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/delete_http_route.rb deleted file mode 100644 index fb9b4d0a4357..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/delete_http_route.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 networkservices_v1_generated_NetworkServices_DeleteHttpRoute_sync] -require "google/cloud/network_services/v1" - -## -# Snippet for the delete_http_route call in the NetworkServices 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::NetworkServices::V1::NetworkServices::Client#delete_http_route. -# -def delete_http_route - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::NetworkServices::V1::DeleteHttpRouteRequest.new - - # Call the delete_http_route method. - result = client.delete_http_route 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 networkservices_v1_generated_NetworkServices_DeleteHttpRoute_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/delete_mesh.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/delete_mesh.rb deleted file mode 100644 index 38679aa8ee37..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/delete_mesh.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 networkservices_v1_generated_NetworkServices_DeleteMesh_sync] -require "google/cloud/network_services/v1" - -## -# Snippet for the delete_mesh call in the NetworkServices 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::NetworkServices::V1::NetworkServices::Client#delete_mesh. -# -def delete_mesh - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::NetworkServices::V1::DeleteMeshRequest.new - - # Call the delete_mesh method. - result = client.delete_mesh 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 networkservices_v1_generated_NetworkServices_DeleteMesh_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/delete_service_binding.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/delete_service_binding.rb deleted file mode 100644 index a53e8f9bb080..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/delete_service_binding.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 networkservices_v1_generated_NetworkServices_DeleteServiceBinding_sync] -require "google/cloud/network_services/v1" - -## -# Snippet for the delete_service_binding call in the NetworkServices 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::NetworkServices::V1::NetworkServices::Client#delete_service_binding. -# -def delete_service_binding - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::NetworkServices::V1::DeleteServiceBindingRequest.new - - # Call the delete_service_binding method. - result = client.delete_service_binding 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 networkservices_v1_generated_NetworkServices_DeleteServiceBinding_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/delete_service_lb_policy.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/delete_service_lb_policy.rb deleted file mode 100644 index 8d8eba182511..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/delete_service_lb_policy.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 networkservices_v1_generated_NetworkServices_DeleteServiceLbPolicy_sync] -require "google/cloud/network_services/v1" - -## -# Snippet for the delete_service_lb_policy call in the NetworkServices 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::NetworkServices::V1::NetworkServices::Client#delete_service_lb_policy. -# -def delete_service_lb_policy - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::NetworkServices::V1::DeleteServiceLbPolicyRequest.new - - # Call the delete_service_lb_policy method. - result = client.delete_service_lb_policy 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 networkservices_v1_generated_NetworkServices_DeleteServiceLbPolicy_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/delete_tcp_route.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/delete_tcp_route.rb deleted file mode 100644 index 23c4fea7bfe0..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/delete_tcp_route.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 networkservices_v1_generated_NetworkServices_DeleteTcpRoute_sync] -require "google/cloud/network_services/v1" - -## -# Snippet for the delete_tcp_route call in the NetworkServices 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::NetworkServices::V1::NetworkServices::Client#delete_tcp_route. -# -def delete_tcp_route - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::NetworkServices::V1::DeleteTcpRouteRequest.new - - # Call the delete_tcp_route method. - result = client.delete_tcp_route 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 networkservices_v1_generated_NetworkServices_DeleteTcpRoute_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/delete_tls_route.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/delete_tls_route.rb deleted file mode 100644 index e000e54ca758..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/delete_tls_route.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 networkservices_v1_generated_NetworkServices_DeleteTlsRoute_sync] -require "google/cloud/network_services/v1" - -## -# Snippet for the delete_tls_route call in the NetworkServices 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::NetworkServices::V1::NetworkServices::Client#delete_tls_route. -# -def delete_tls_route - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::NetworkServices::V1::DeleteTlsRouteRequest.new - - # Call the delete_tls_route method. - result = client.delete_tls_route 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 networkservices_v1_generated_NetworkServices_DeleteTlsRoute_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/delete_wasm_plugin.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/delete_wasm_plugin.rb deleted file mode 100644 index 7ff12d0c8530..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/delete_wasm_plugin.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 networkservices_v1_generated_NetworkServices_DeleteWasmPlugin_sync] -require "google/cloud/network_services/v1" - -## -# Snippet for the delete_wasm_plugin call in the NetworkServices 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::NetworkServices::V1::NetworkServices::Client#delete_wasm_plugin. -# -def delete_wasm_plugin - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::NetworkServices::V1::DeleteWasmPluginRequest.new - - # Call the delete_wasm_plugin method. - result = client.delete_wasm_plugin 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 networkservices_v1_generated_NetworkServices_DeleteWasmPlugin_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/delete_wasm_plugin_version.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/delete_wasm_plugin_version.rb deleted file mode 100644 index 8663d52decd6..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/delete_wasm_plugin_version.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 networkservices_v1_generated_NetworkServices_DeleteWasmPluginVersion_sync] -require "google/cloud/network_services/v1" - -## -# Snippet for the delete_wasm_plugin_version call in the NetworkServices 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::NetworkServices::V1::NetworkServices::Client#delete_wasm_plugin_version. -# -def delete_wasm_plugin_version - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::NetworkServices::V1::DeleteWasmPluginVersionRequest.new - - # Call the delete_wasm_plugin_version method. - result = client.delete_wasm_plugin_version 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 networkservices_v1_generated_NetworkServices_DeleteWasmPluginVersion_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/get_endpoint_policy.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/get_endpoint_policy.rb deleted file mode 100644 index 7bf7310ba421..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/get_endpoint_policy.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 networkservices_v1_generated_NetworkServices_GetEndpointPolicy_sync] -require "google/cloud/network_services/v1" - -## -# Snippet for the get_endpoint_policy call in the NetworkServices 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::NetworkServices::V1::NetworkServices::Client#get_endpoint_policy. -# -def get_endpoint_policy - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::NetworkServices::V1::GetEndpointPolicyRequest.new - - # Call the get_endpoint_policy method. - result = client.get_endpoint_policy request - - # The returned object is of type Google::Cloud::NetworkServices::V1::EndpointPolicy. - p result -end -# [END networkservices_v1_generated_NetworkServices_GetEndpointPolicy_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/get_gateway.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/get_gateway.rb deleted file mode 100644 index cd9c3803c27a..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/get_gateway.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 networkservices_v1_generated_NetworkServices_GetGateway_sync] -require "google/cloud/network_services/v1" - -## -# Snippet for the get_gateway call in the NetworkServices 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::NetworkServices::V1::NetworkServices::Client#get_gateway. -# -def get_gateway - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::NetworkServices::V1::GetGatewayRequest.new - - # Call the get_gateway method. - result = client.get_gateway request - - # The returned object is of type Google::Cloud::NetworkServices::V1::Gateway. - p result -end -# [END networkservices_v1_generated_NetworkServices_GetGateway_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/get_gateway_route_view.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/get_gateway_route_view.rb deleted file mode 100644 index acdfafc06d24..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/get_gateway_route_view.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 networkservices_v1_generated_NetworkServices_GetGatewayRouteView_sync] -require "google/cloud/network_services/v1" - -## -# Snippet for the get_gateway_route_view call in the NetworkServices 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::NetworkServices::V1::NetworkServices::Client#get_gateway_route_view. -# -def get_gateway_route_view - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::NetworkServices::V1::GetGatewayRouteViewRequest.new - - # Call the get_gateway_route_view method. - result = client.get_gateway_route_view request - - # The returned object is of type Google::Cloud::NetworkServices::V1::GatewayRouteView. - p result -end -# [END networkservices_v1_generated_NetworkServices_GetGatewayRouteView_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/get_grpc_route.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/get_grpc_route.rb deleted file mode 100644 index c89829583747..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/get_grpc_route.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 networkservices_v1_generated_NetworkServices_GetGrpcRoute_sync] -require "google/cloud/network_services/v1" - -## -# Snippet for the get_grpc_route call in the NetworkServices 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::NetworkServices::V1::NetworkServices::Client#get_grpc_route. -# -def get_grpc_route - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::NetworkServices::V1::GetGrpcRouteRequest.new - - # Call the get_grpc_route method. - result = client.get_grpc_route request - - # The returned object is of type Google::Cloud::NetworkServices::V1::GrpcRoute. - p result -end -# [END networkservices_v1_generated_NetworkServices_GetGrpcRoute_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/get_http_route.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/get_http_route.rb deleted file mode 100644 index 5fae23632eba..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/get_http_route.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 networkservices_v1_generated_NetworkServices_GetHttpRoute_sync] -require "google/cloud/network_services/v1" - -## -# Snippet for the get_http_route call in the NetworkServices 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::NetworkServices::V1::NetworkServices::Client#get_http_route. -# -def get_http_route - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::NetworkServices::V1::GetHttpRouteRequest.new - - # Call the get_http_route method. - result = client.get_http_route request - - # The returned object is of type Google::Cloud::NetworkServices::V1::HttpRoute. - p result -end -# [END networkservices_v1_generated_NetworkServices_GetHttpRoute_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/get_mesh.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/get_mesh.rb deleted file mode 100644 index 4c03bbdea364..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/get_mesh.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 networkservices_v1_generated_NetworkServices_GetMesh_sync] -require "google/cloud/network_services/v1" - -## -# Snippet for the get_mesh call in the NetworkServices 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::NetworkServices::V1::NetworkServices::Client#get_mesh. -# -def get_mesh - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::NetworkServices::V1::GetMeshRequest.new - - # Call the get_mesh method. - result = client.get_mesh request - - # The returned object is of type Google::Cloud::NetworkServices::V1::Mesh. - p result -end -# [END networkservices_v1_generated_NetworkServices_GetMesh_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/get_mesh_route_view.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/get_mesh_route_view.rb deleted file mode 100644 index 94b12e51dd9a..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/get_mesh_route_view.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 networkservices_v1_generated_NetworkServices_GetMeshRouteView_sync] -require "google/cloud/network_services/v1" - -## -# Snippet for the get_mesh_route_view call in the NetworkServices 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::NetworkServices::V1::NetworkServices::Client#get_mesh_route_view. -# -def get_mesh_route_view - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::NetworkServices::V1::GetMeshRouteViewRequest.new - - # Call the get_mesh_route_view method. - result = client.get_mesh_route_view request - - # The returned object is of type Google::Cloud::NetworkServices::V1::MeshRouteView. - p result -end -# [END networkservices_v1_generated_NetworkServices_GetMeshRouteView_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/get_service_binding.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/get_service_binding.rb deleted file mode 100644 index c53b311074b6..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/get_service_binding.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 networkservices_v1_generated_NetworkServices_GetServiceBinding_sync] -require "google/cloud/network_services/v1" - -## -# Snippet for the get_service_binding call in the NetworkServices 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::NetworkServices::V1::NetworkServices::Client#get_service_binding. -# -def get_service_binding - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::NetworkServices::V1::GetServiceBindingRequest.new - - # Call the get_service_binding method. - result = client.get_service_binding request - - # The returned object is of type Google::Cloud::NetworkServices::V1::ServiceBinding. - p result -end -# [END networkservices_v1_generated_NetworkServices_GetServiceBinding_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/get_service_lb_policy.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/get_service_lb_policy.rb deleted file mode 100644 index 177cbae5a00e..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/get_service_lb_policy.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 networkservices_v1_generated_NetworkServices_GetServiceLbPolicy_sync] -require "google/cloud/network_services/v1" - -## -# Snippet for the get_service_lb_policy call in the NetworkServices 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::NetworkServices::V1::NetworkServices::Client#get_service_lb_policy. -# -def get_service_lb_policy - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::NetworkServices::V1::GetServiceLbPolicyRequest.new - - # Call the get_service_lb_policy method. - result = client.get_service_lb_policy request - - # The returned object is of type Google::Cloud::NetworkServices::V1::ServiceLbPolicy. - p result -end -# [END networkservices_v1_generated_NetworkServices_GetServiceLbPolicy_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/get_tcp_route.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/get_tcp_route.rb deleted file mode 100644 index 752be5a27b33..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/get_tcp_route.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 networkservices_v1_generated_NetworkServices_GetTcpRoute_sync] -require "google/cloud/network_services/v1" - -## -# Snippet for the get_tcp_route call in the NetworkServices 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::NetworkServices::V1::NetworkServices::Client#get_tcp_route. -# -def get_tcp_route - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::NetworkServices::V1::GetTcpRouteRequest.new - - # Call the get_tcp_route method. - result = client.get_tcp_route request - - # The returned object is of type Google::Cloud::NetworkServices::V1::TcpRoute. - p result -end -# [END networkservices_v1_generated_NetworkServices_GetTcpRoute_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/get_tls_route.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/get_tls_route.rb deleted file mode 100644 index 0d58a8669da1..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/get_tls_route.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 networkservices_v1_generated_NetworkServices_GetTlsRoute_sync] -require "google/cloud/network_services/v1" - -## -# Snippet for the get_tls_route call in the NetworkServices 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::NetworkServices::V1::NetworkServices::Client#get_tls_route. -# -def get_tls_route - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::NetworkServices::V1::GetTlsRouteRequest.new - - # Call the get_tls_route method. - result = client.get_tls_route request - - # The returned object is of type Google::Cloud::NetworkServices::V1::TlsRoute. - p result -end -# [END networkservices_v1_generated_NetworkServices_GetTlsRoute_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/get_wasm_plugin.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/get_wasm_plugin.rb deleted file mode 100644 index 71e2764be6c7..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/get_wasm_plugin.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 networkservices_v1_generated_NetworkServices_GetWasmPlugin_sync] -require "google/cloud/network_services/v1" - -## -# Snippet for the get_wasm_plugin call in the NetworkServices 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::NetworkServices::V1::NetworkServices::Client#get_wasm_plugin. -# -def get_wasm_plugin - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::NetworkServices::V1::GetWasmPluginRequest.new - - # Call the get_wasm_plugin method. - result = client.get_wasm_plugin request - - # The returned object is of type Google::Cloud::NetworkServices::V1::WasmPlugin. - p result -end -# [END networkservices_v1_generated_NetworkServices_GetWasmPlugin_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/get_wasm_plugin_version.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/get_wasm_plugin_version.rb deleted file mode 100644 index d3b8cbb231dd..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/get_wasm_plugin_version.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 networkservices_v1_generated_NetworkServices_GetWasmPluginVersion_sync] -require "google/cloud/network_services/v1" - -## -# Snippet for the get_wasm_plugin_version call in the NetworkServices 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::NetworkServices::V1::NetworkServices::Client#get_wasm_plugin_version. -# -def get_wasm_plugin_version - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::NetworkServices::V1::GetWasmPluginVersionRequest.new - - # Call the get_wasm_plugin_version method. - result = client.get_wasm_plugin_version request - - # The returned object is of type Google::Cloud::NetworkServices::V1::WasmPluginVersion. - p result -end -# [END networkservices_v1_generated_NetworkServices_GetWasmPluginVersion_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/list_endpoint_policies.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/list_endpoint_policies.rb deleted file mode 100644 index 80f363ddf94e..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/list_endpoint_policies.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 networkservices_v1_generated_NetworkServices_ListEndpointPolicies_sync] -require "google/cloud/network_services/v1" - -## -# Snippet for the list_endpoint_policies call in the NetworkServices 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::NetworkServices::V1::NetworkServices::Client#list_endpoint_policies. -# -def list_endpoint_policies - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::NetworkServices::V1::ListEndpointPoliciesRequest.new - - # Call the list_endpoint_policies method. - result = client.list_endpoint_policies 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::NetworkServices::V1::EndpointPolicy. - p item - end -end -# [END networkservices_v1_generated_NetworkServices_ListEndpointPolicies_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/list_gateway_route_views.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/list_gateway_route_views.rb deleted file mode 100644 index bf70b18fd3e1..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/list_gateway_route_views.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 networkservices_v1_generated_NetworkServices_ListGatewayRouteViews_sync] -require "google/cloud/network_services/v1" - -## -# Snippet for the list_gateway_route_views call in the NetworkServices 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::NetworkServices::V1::NetworkServices::Client#list_gateway_route_views. -# -def list_gateway_route_views - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::NetworkServices::V1::ListGatewayRouteViewsRequest.new - - # Call the list_gateway_route_views method. - result = client.list_gateway_route_views 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::NetworkServices::V1::GatewayRouteView. - p item - end -end -# [END networkservices_v1_generated_NetworkServices_ListGatewayRouteViews_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/list_gateways.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/list_gateways.rb deleted file mode 100644 index b76c468e6040..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/list_gateways.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 networkservices_v1_generated_NetworkServices_ListGateways_sync] -require "google/cloud/network_services/v1" - -## -# Snippet for the list_gateways call in the NetworkServices 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::NetworkServices::V1::NetworkServices::Client#list_gateways. -# -def list_gateways - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::NetworkServices::V1::ListGatewaysRequest.new - - # Call the list_gateways method. - result = client.list_gateways 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::NetworkServices::V1::Gateway. - p item - end -end -# [END networkservices_v1_generated_NetworkServices_ListGateways_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/list_grpc_routes.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/list_grpc_routes.rb deleted file mode 100644 index e05e41499496..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/list_grpc_routes.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 networkservices_v1_generated_NetworkServices_ListGrpcRoutes_sync] -require "google/cloud/network_services/v1" - -## -# Snippet for the list_grpc_routes call in the NetworkServices 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::NetworkServices::V1::NetworkServices::Client#list_grpc_routes. -# -def list_grpc_routes - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::NetworkServices::V1::ListGrpcRoutesRequest.new - - # Call the list_grpc_routes method. - result = client.list_grpc_routes 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::NetworkServices::V1::GrpcRoute. - p item - end -end -# [END networkservices_v1_generated_NetworkServices_ListGrpcRoutes_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/list_http_routes.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/list_http_routes.rb deleted file mode 100644 index 906f35e99306..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/list_http_routes.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 networkservices_v1_generated_NetworkServices_ListHttpRoutes_sync] -require "google/cloud/network_services/v1" - -## -# Snippet for the list_http_routes call in the NetworkServices 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::NetworkServices::V1::NetworkServices::Client#list_http_routes. -# -def list_http_routes - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::NetworkServices::V1::ListHttpRoutesRequest.new - - # Call the list_http_routes method. - result = client.list_http_routes 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::NetworkServices::V1::HttpRoute. - p item - end -end -# [END networkservices_v1_generated_NetworkServices_ListHttpRoutes_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/list_mesh_route_views.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/list_mesh_route_views.rb deleted file mode 100644 index db2969a594b5..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/list_mesh_route_views.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 networkservices_v1_generated_NetworkServices_ListMeshRouteViews_sync] -require "google/cloud/network_services/v1" - -## -# Snippet for the list_mesh_route_views call in the NetworkServices 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::NetworkServices::V1::NetworkServices::Client#list_mesh_route_views. -# -def list_mesh_route_views - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::NetworkServices::V1::ListMeshRouteViewsRequest.new - - # Call the list_mesh_route_views method. - result = client.list_mesh_route_views 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::NetworkServices::V1::MeshRouteView. - p item - end -end -# [END networkservices_v1_generated_NetworkServices_ListMeshRouteViews_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/list_meshes.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/list_meshes.rb deleted file mode 100644 index 9328e9df834b..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/list_meshes.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 networkservices_v1_generated_NetworkServices_ListMeshes_sync] -require "google/cloud/network_services/v1" - -## -# Snippet for the list_meshes call in the NetworkServices 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::NetworkServices::V1::NetworkServices::Client#list_meshes. -# -def list_meshes - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::NetworkServices::V1::ListMeshesRequest.new - - # Call the list_meshes method. - result = client.list_meshes 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::NetworkServices::V1::Mesh. - p item - end -end -# [END networkservices_v1_generated_NetworkServices_ListMeshes_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/list_service_bindings.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/list_service_bindings.rb deleted file mode 100644 index be1be326d51a..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/list_service_bindings.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 networkservices_v1_generated_NetworkServices_ListServiceBindings_sync] -require "google/cloud/network_services/v1" - -## -# Snippet for the list_service_bindings call in the NetworkServices 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::NetworkServices::V1::NetworkServices::Client#list_service_bindings. -# -def list_service_bindings - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::NetworkServices::V1::ListServiceBindingsRequest.new - - # Call the list_service_bindings method. - result = client.list_service_bindings 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::NetworkServices::V1::ServiceBinding. - p item - end -end -# [END networkservices_v1_generated_NetworkServices_ListServiceBindings_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/list_service_lb_policies.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/list_service_lb_policies.rb deleted file mode 100644 index d964f2a5d0df..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/list_service_lb_policies.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 networkservices_v1_generated_NetworkServices_ListServiceLbPolicies_sync] -require "google/cloud/network_services/v1" - -## -# Snippet for the list_service_lb_policies call in the NetworkServices 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::NetworkServices::V1::NetworkServices::Client#list_service_lb_policies. -# -def list_service_lb_policies - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::NetworkServices::V1::ListServiceLbPoliciesRequest.new - - # Call the list_service_lb_policies method. - result = client.list_service_lb_policies 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::NetworkServices::V1::ServiceLbPolicy. - p item - end -end -# [END networkservices_v1_generated_NetworkServices_ListServiceLbPolicies_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/list_tcp_routes.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/list_tcp_routes.rb deleted file mode 100644 index e521f13c50c7..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/list_tcp_routes.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 networkservices_v1_generated_NetworkServices_ListTcpRoutes_sync] -require "google/cloud/network_services/v1" - -## -# Snippet for the list_tcp_routes call in the NetworkServices 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::NetworkServices::V1::NetworkServices::Client#list_tcp_routes. -# -def list_tcp_routes - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::NetworkServices::V1::ListTcpRoutesRequest.new - - # Call the list_tcp_routes method. - result = client.list_tcp_routes 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::NetworkServices::V1::TcpRoute. - p item - end -end -# [END networkservices_v1_generated_NetworkServices_ListTcpRoutes_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/list_tls_routes.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/list_tls_routes.rb deleted file mode 100644 index 8ac101b92cba..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/list_tls_routes.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 networkservices_v1_generated_NetworkServices_ListTlsRoutes_sync] -require "google/cloud/network_services/v1" - -## -# Snippet for the list_tls_routes call in the NetworkServices 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::NetworkServices::V1::NetworkServices::Client#list_tls_routes. -# -def list_tls_routes - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::NetworkServices::V1::ListTlsRoutesRequest.new - - # Call the list_tls_routes method. - result = client.list_tls_routes 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::NetworkServices::V1::TlsRoute. - p item - end -end -# [END networkservices_v1_generated_NetworkServices_ListTlsRoutes_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/list_wasm_plugin_versions.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/list_wasm_plugin_versions.rb deleted file mode 100644 index 10c3321d69b7..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/list_wasm_plugin_versions.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 networkservices_v1_generated_NetworkServices_ListWasmPluginVersions_sync] -require "google/cloud/network_services/v1" - -## -# Snippet for the list_wasm_plugin_versions call in the NetworkServices 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::NetworkServices::V1::NetworkServices::Client#list_wasm_plugin_versions. -# -def list_wasm_plugin_versions - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::NetworkServices::V1::ListWasmPluginVersionsRequest.new - - # Call the list_wasm_plugin_versions method. - result = client.list_wasm_plugin_versions 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::NetworkServices::V1::WasmPluginVersion. - p item - end -end -# [END networkservices_v1_generated_NetworkServices_ListWasmPluginVersions_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/list_wasm_plugins.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/list_wasm_plugins.rb deleted file mode 100644 index 4cf013595d0f..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/list_wasm_plugins.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 networkservices_v1_generated_NetworkServices_ListWasmPlugins_sync] -require "google/cloud/network_services/v1" - -## -# Snippet for the list_wasm_plugins call in the NetworkServices 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::NetworkServices::V1::NetworkServices::Client#list_wasm_plugins. -# -def list_wasm_plugins - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::NetworkServices::V1::ListWasmPluginsRequest.new - - # Call the list_wasm_plugins method. - result = client.list_wasm_plugins 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::NetworkServices::V1::WasmPlugin. - p item - end -end -# [END networkservices_v1_generated_NetworkServices_ListWasmPlugins_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/update_endpoint_policy.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/update_endpoint_policy.rb deleted file mode 100644 index c636c6774100..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/update_endpoint_policy.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 networkservices_v1_generated_NetworkServices_UpdateEndpointPolicy_sync] -require "google/cloud/network_services/v1" - -## -# Snippet for the update_endpoint_policy call in the NetworkServices 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::NetworkServices::V1::NetworkServices::Client#update_endpoint_policy. -# -def update_endpoint_policy - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::NetworkServices::V1::UpdateEndpointPolicyRequest.new - - # Call the update_endpoint_policy method. - result = client.update_endpoint_policy 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 networkservices_v1_generated_NetworkServices_UpdateEndpointPolicy_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/update_gateway.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/update_gateway.rb deleted file mode 100644 index 27ca3e6e8207..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/update_gateway.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 networkservices_v1_generated_NetworkServices_UpdateGateway_sync] -require "google/cloud/network_services/v1" - -## -# Snippet for the update_gateway call in the NetworkServices 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::NetworkServices::V1::NetworkServices::Client#update_gateway. -# -def update_gateway - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::NetworkServices::V1::UpdateGatewayRequest.new - - # Call the update_gateway method. - result = client.update_gateway 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 networkservices_v1_generated_NetworkServices_UpdateGateway_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/update_grpc_route.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/update_grpc_route.rb deleted file mode 100644 index 76a9d3fcbd6b..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/update_grpc_route.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 networkservices_v1_generated_NetworkServices_UpdateGrpcRoute_sync] -require "google/cloud/network_services/v1" - -## -# Snippet for the update_grpc_route call in the NetworkServices 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::NetworkServices::V1::NetworkServices::Client#update_grpc_route. -# -def update_grpc_route - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::NetworkServices::V1::UpdateGrpcRouteRequest.new - - # Call the update_grpc_route method. - result = client.update_grpc_route 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 networkservices_v1_generated_NetworkServices_UpdateGrpcRoute_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/update_http_route.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/update_http_route.rb deleted file mode 100644 index 76ed37a09560..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/update_http_route.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 networkservices_v1_generated_NetworkServices_UpdateHttpRoute_sync] -require "google/cloud/network_services/v1" - -## -# Snippet for the update_http_route call in the NetworkServices 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::NetworkServices::V1::NetworkServices::Client#update_http_route. -# -def update_http_route - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::NetworkServices::V1::UpdateHttpRouteRequest.new - - # Call the update_http_route method. - result = client.update_http_route 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 networkservices_v1_generated_NetworkServices_UpdateHttpRoute_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/update_mesh.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/update_mesh.rb deleted file mode 100644 index 0ce24a587521..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/update_mesh.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 networkservices_v1_generated_NetworkServices_UpdateMesh_sync] -require "google/cloud/network_services/v1" - -## -# Snippet for the update_mesh call in the NetworkServices 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::NetworkServices::V1::NetworkServices::Client#update_mesh. -# -def update_mesh - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::NetworkServices::V1::UpdateMeshRequest.new - - # Call the update_mesh method. - result = client.update_mesh 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 networkservices_v1_generated_NetworkServices_UpdateMesh_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/update_service_binding.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/update_service_binding.rb deleted file mode 100644 index c3402c83f387..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/update_service_binding.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 networkservices_v1_generated_NetworkServices_UpdateServiceBinding_sync] -require "google/cloud/network_services/v1" - -## -# Snippet for the update_service_binding call in the NetworkServices 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::NetworkServices::V1::NetworkServices::Client#update_service_binding. -# -def update_service_binding - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::NetworkServices::V1::UpdateServiceBindingRequest.new - - # Call the update_service_binding method. - result = client.update_service_binding 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 networkservices_v1_generated_NetworkServices_UpdateServiceBinding_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/update_service_lb_policy.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/update_service_lb_policy.rb deleted file mode 100644 index e6bb846f0396..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/update_service_lb_policy.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 networkservices_v1_generated_NetworkServices_UpdateServiceLbPolicy_sync] -require "google/cloud/network_services/v1" - -## -# Snippet for the update_service_lb_policy call in the NetworkServices 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::NetworkServices::V1::NetworkServices::Client#update_service_lb_policy. -# -def update_service_lb_policy - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::NetworkServices::V1::UpdateServiceLbPolicyRequest.new - - # Call the update_service_lb_policy method. - result = client.update_service_lb_policy 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 networkservices_v1_generated_NetworkServices_UpdateServiceLbPolicy_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/update_tcp_route.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/update_tcp_route.rb deleted file mode 100644 index 318dc7fefbbb..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/update_tcp_route.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 networkservices_v1_generated_NetworkServices_UpdateTcpRoute_sync] -require "google/cloud/network_services/v1" - -## -# Snippet for the update_tcp_route call in the NetworkServices 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::NetworkServices::V1::NetworkServices::Client#update_tcp_route. -# -def update_tcp_route - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::NetworkServices::V1::UpdateTcpRouteRequest.new - - # Call the update_tcp_route method. - result = client.update_tcp_route 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 networkservices_v1_generated_NetworkServices_UpdateTcpRoute_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/update_tls_route.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/update_tls_route.rb deleted file mode 100644 index 3277355fabb3..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/update_tls_route.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 networkservices_v1_generated_NetworkServices_UpdateTlsRoute_sync] -require "google/cloud/network_services/v1" - -## -# Snippet for the update_tls_route call in the NetworkServices 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::NetworkServices::V1::NetworkServices::Client#update_tls_route. -# -def update_tls_route - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::NetworkServices::V1::UpdateTlsRouteRequest.new - - # Call the update_tls_route method. - result = client.update_tls_route 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 networkservices_v1_generated_NetworkServices_UpdateTlsRoute_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/update_wasm_plugin.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/update_wasm_plugin.rb deleted file mode 100644 index f8f374a19789..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/update_wasm_plugin.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 networkservices_v1_generated_NetworkServices_UpdateWasmPlugin_sync] -require "google/cloud/network_services/v1" - -## -# Snippet for the update_wasm_plugin call in the NetworkServices 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::NetworkServices::V1::NetworkServices::Client#update_wasm_plugin. -# -def update_wasm_plugin - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::NetworkServices::V1::UpdateWasmPluginRequest.new - - # Call the update_wasm_plugin method. - result = client.update_wasm_plugin 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 networkservices_v1_generated_NetworkServices_UpdateWasmPlugin_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/snippet_metadata_google.cloud.networkservices.v1.json b/owl-bot-staging/google-cloud-network_services-v1/snippets/snippet_metadata_google.cloud.networkservices.v1.json deleted file mode 100644 index f6cee93bb4b4..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/snippets/snippet_metadata_google.cloud.networkservices.v1.json +++ /dev/null @@ -1,3335 +0,0 @@ -{ - "client_library": { - "name": "google-cloud-network_services-v1", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "google.cloud.networkservices.v1", - "version": "v1" - } - ] - }, - "snippets": [ - { - "region_tag": "networkservices_v1_generated_DepService_ListLbTrafficExtensions_sync", - "title": "Snippet for the list_lb_traffic_extensions call in the DepService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::DepService::Client#list_lb_traffic_extensions.", - "file": "dep_service/list_lb_traffic_extensions.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_lb_traffic_extensions", - "full_name": "::Google::Cloud::NetworkServices::V1::DepService::Client#list_lb_traffic_extensions", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::NetworkServices::V1::ListLbTrafficExtensionsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::NetworkServices::V1::ListLbTrafficExtensionsResponse", - "client": { - "short_name": "DepService::Client", - "full_name": "::Google::Cloud::NetworkServices::V1::DepService::Client" - }, - "method": { - "short_name": "ListLbTrafficExtensions", - "full_name": "google.cloud.networkservices.v1.DepService.ListLbTrafficExtensions", - "service": { - "short_name": "DepService", - "full_name": "google.cloud.networkservices.v1.DepService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "networkservices_v1_generated_DepService_GetLbTrafficExtension_sync", - "title": "Snippet for the get_lb_traffic_extension call in the DepService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::DepService::Client#get_lb_traffic_extension.", - "file": "dep_service/get_lb_traffic_extension.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_lb_traffic_extension", - "full_name": "::Google::Cloud::NetworkServices::V1::DepService::Client#get_lb_traffic_extension", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::NetworkServices::V1::GetLbTrafficExtensionRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::NetworkServices::V1::LbTrafficExtension", - "client": { - "short_name": "DepService::Client", - "full_name": "::Google::Cloud::NetworkServices::V1::DepService::Client" - }, - "method": { - "short_name": "GetLbTrafficExtension", - "full_name": "google.cloud.networkservices.v1.DepService.GetLbTrafficExtension", - "service": { - "short_name": "DepService", - "full_name": "google.cloud.networkservices.v1.DepService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "networkservices_v1_generated_DepService_CreateLbTrafficExtension_sync", - "title": "Snippet for the create_lb_traffic_extension call in the DepService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::DepService::Client#create_lb_traffic_extension.", - "file": "dep_service/create_lb_traffic_extension.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_lb_traffic_extension", - "full_name": "::Google::Cloud::NetworkServices::V1::DepService::Client#create_lb_traffic_extension", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::NetworkServices::V1::CreateLbTrafficExtensionRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "DepService::Client", - "full_name": "::Google::Cloud::NetworkServices::V1::DepService::Client" - }, - "method": { - "short_name": "CreateLbTrafficExtension", - "full_name": "google.cloud.networkservices.v1.DepService.CreateLbTrafficExtension", - "service": { - "short_name": "DepService", - "full_name": "google.cloud.networkservices.v1.DepService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "networkservices_v1_generated_DepService_UpdateLbTrafficExtension_sync", - "title": "Snippet for the update_lb_traffic_extension call in the DepService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::DepService::Client#update_lb_traffic_extension.", - "file": "dep_service/update_lb_traffic_extension.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_lb_traffic_extension", - "full_name": "::Google::Cloud::NetworkServices::V1::DepService::Client#update_lb_traffic_extension", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::NetworkServices::V1::UpdateLbTrafficExtensionRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "DepService::Client", - "full_name": "::Google::Cloud::NetworkServices::V1::DepService::Client" - }, - "method": { - "short_name": "UpdateLbTrafficExtension", - "full_name": "google.cloud.networkservices.v1.DepService.UpdateLbTrafficExtension", - "service": { - "short_name": "DepService", - "full_name": "google.cloud.networkservices.v1.DepService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "networkservices_v1_generated_DepService_DeleteLbTrafficExtension_sync", - "title": "Snippet for the delete_lb_traffic_extension call in the DepService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::DepService::Client#delete_lb_traffic_extension.", - "file": "dep_service/delete_lb_traffic_extension.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_lb_traffic_extension", - "full_name": "::Google::Cloud::NetworkServices::V1::DepService::Client#delete_lb_traffic_extension", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::NetworkServices::V1::DeleteLbTrafficExtensionRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "DepService::Client", - "full_name": "::Google::Cloud::NetworkServices::V1::DepService::Client" - }, - "method": { - "short_name": "DeleteLbTrafficExtension", - "full_name": "google.cloud.networkservices.v1.DepService.DeleteLbTrafficExtension", - "service": { - "short_name": "DepService", - "full_name": "google.cloud.networkservices.v1.DepService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "networkservices_v1_generated_DepService_ListLbRouteExtensions_sync", - "title": "Snippet for the list_lb_route_extensions call in the DepService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::DepService::Client#list_lb_route_extensions.", - "file": "dep_service/list_lb_route_extensions.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_lb_route_extensions", - "full_name": "::Google::Cloud::NetworkServices::V1::DepService::Client#list_lb_route_extensions", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::NetworkServices::V1::ListLbRouteExtensionsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::NetworkServices::V1::ListLbRouteExtensionsResponse", - "client": { - "short_name": "DepService::Client", - "full_name": "::Google::Cloud::NetworkServices::V1::DepService::Client" - }, - "method": { - "short_name": "ListLbRouteExtensions", - "full_name": "google.cloud.networkservices.v1.DepService.ListLbRouteExtensions", - "service": { - "short_name": "DepService", - "full_name": "google.cloud.networkservices.v1.DepService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "networkservices_v1_generated_DepService_GetLbRouteExtension_sync", - "title": "Snippet for the get_lb_route_extension call in the DepService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::DepService::Client#get_lb_route_extension.", - "file": "dep_service/get_lb_route_extension.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_lb_route_extension", - "full_name": "::Google::Cloud::NetworkServices::V1::DepService::Client#get_lb_route_extension", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::NetworkServices::V1::GetLbRouteExtensionRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::NetworkServices::V1::LbRouteExtension", - "client": { - "short_name": "DepService::Client", - "full_name": "::Google::Cloud::NetworkServices::V1::DepService::Client" - }, - "method": { - "short_name": "GetLbRouteExtension", - "full_name": "google.cloud.networkservices.v1.DepService.GetLbRouteExtension", - "service": { - "short_name": "DepService", - "full_name": "google.cloud.networkservices.v1.DepService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "networkservices_v1_generated_DepService_CreateLbRouteExtension_sync", - "title": "Snippet for the create_lb_route_extension call in the DepService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::DepService::Client#create_lb_route_extension.", - "file": "dep_service/create_lb_route_extension.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_lb_route_extension", - "full_name": "::Google::Cloud::NetworkServices::V1::DepService::Client#create_lb_route_extension", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::NetworkServices::V1::CreateLbRouteExtensionRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "DepService::Client", - "full_name": "::Google::Cloud::NetworkServices::V1::DepService::Client" - }, - "method": { - "short_name": "CreateLbRouteExtension", - "full_name": "google.cloud.networkservices.v1.DepService.CreateLbRouteExtension", - "service": { - "short_name": "DepService", - "full_name": "google.cloud.networkservices.v1.DepService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "networkservices_v1_generated_DepService_UpdateLbRouteExtension_sync", - "title": "Snippet for the update_lb_route_extension call in the DepService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::DepService::Client#update_lb_route_extension.", - "file": "dep_service/update_lb_route_extension.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_lb_route_extension", - "full_name": "::Google::Cloud::NetworkServices::V1::DepService::Client#update_lb_route_extension", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::NetworkServices::V1::UpdateLbRouteExtensionRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "DepService::Client", - "full_name": "::Google::Cloud::NetworkServices::V1::DepService::Client" - }, - "method": { - "short_name": "UpdateLbRouteExtension", - "full_name": "google.cloud.networkservices.v1.DepService.UpdateLbRouteExtension", - "service": { - "short_name": "DepService", - "full_name": "google.cloud.networkservices.v1.DepService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "networkservices_v1_generated_DepService_DeleteLbRouteExtension_sync", - "title": "Snippet for the delete_lb_route_extension call in the DepService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::DepService::Client#delete_lb_route_extension.", - "file": "dep_service/delete_lb_route_extension.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_lb_route_extension", - "full_name": "::Google::Cloud::NetworkServices::V1::DepService::Client#delete_lb_route_extension", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::NetworkServices::V1::DeleteLbRouteExtensionRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "DepService::Client", - "full_name": "::Google::Cloud::NetworkServices::V1::DepService::Client" - }, - "method": { - "short_name": "DeleteLbRouteExtension", - "full_name": "google.cloud.networkservices.v1.DepService.DeleteLbRouteExtension", - "service": { - "short_name": "DepService", - "full_name": "google.cloud.networkservices.v1.DepService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "networkservices_v1_generated_DepService_ListLbEdgeExtensions_sync", - "title": "Snippet for the list_lb_edge_extensions call in the DepService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::DepService::Client#list_lb_edge_extensions.", - "file": "dep_service/list_lb_edge_extensions.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_lb_edge_extensions", - "full_name": "::Google::Cloud::NetworkServices::V1::DepService::Client#list_lb_edge_extensions", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::NetworkServices::V1::ListLbEdgeExtensionsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::NetworkServices::V1::ListLbEdgeExtensionsResponse", - "client": { - "short_name": "DepService::Client", - "full_name": "::Google::Cloud::NetworkServices::V1::DepService::Client" - }, - "method": { - "short_name": "ListLbEdgeExtensions", - "full_name": "google.cloud.networkservices.v1.DepService.ListLbEdgeExtensions", - "service": { - "short_name": "DepService", - "full_name": "google.cloud.networkservices.v1.DepService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "networkservices_v1_generated_DepService_GetLbEdgeExtension_sync", - "title": "Snippet for the get_lb_edge_extension call in the DepService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::DepService::Client#get_lb_edge_extension.", - "file": "dep_service/get_lb_edge_extension.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_lb_edge_extension", - "full_name": "::Google::Cloud::NetworkServices::V1::DepService::Client#get_lb_edge_extension", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::NetworkServices::V1::GetLbEdgeExtensionRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::NetworkServices::V1::LbEdgeExtension", - "client": { - "short_name": "DepService::Client", - "full_name": "::Google::Cloud::NetworkServices::V1::DepService::Client" - }, - "method": { - "short_name": "GetLbEdgeExtension", - "full_name": "google.cloud.networkservices.v1.DepService.GetLbEdgeExtension", - "service": { - "short_name": "DepService", - "full_name": "google.cloud.networkservices.v1.DepService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "networkservices_v1_generated_DepService_CreateLbEdgeExtension_sync", - "title": "Snippet for the create_lb_edge_extension call in the DepService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::DepService::Client#create_lb_edge_extension.", - "file": "dep_service/create_lb_edge_extension.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_lb_edge_extension", - "full_name": "::Google::Cloud::NetworkServices::V1::DepService::Client#create_lb_edge_extension", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::NetworkServices::V1::CreateLbEdgeExtensionRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "DepService::Client", - "full_name": "::Google::Cloud::NetworkServices::V1::DepService::Client" - }, - "method": { - "short_name": "CreateLbEdgeExtension", - "full_name": "google.cloud.networkservices.v1.DepService.CreateLbEdgeExtension", - "service": { - "short_name": "DepService", - "full_name": "google.cloud.networkservices.v1.DepService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "networkservices_v1_generated_DepService_UpdateLbEdgeExtension_sync", - "title": "Snippet for the update_lb_edge_extension call in the DepService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::DepService::Client#update_lb_edge_extension.", - "file": "dep_service/update_lb_edge_extension.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_lb_edge_extension", - "full_name": "::Google::Cloud::NetworkServices::V1::DepService::Client#update_lb_edge_extension", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::NetworkServices::V1::UpdateLbEdgeExtensionRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "DepService::Client", - "full_name": "::Google::Cloud::NetworkServices::V1::DepService::Client" - }, - "method": { - "short_name": "UpdateLbEdgeExtension", - "full_name": "google.cloud.networkservices.v1.DepService.UpdateLbEdgeExtension", - "service": { - "short_name": "DepService", - "full_name": "google.cloud.networkservices.v1.DepService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "networkservices_v1_generated_DepService_DeleteLbEdgeExtension_sync", - "title": "Snippet for the delete_lb_edge_extension call in the DepService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::DepService::Client#delete_lb_edge_extension.", - "file": "dep_service/delete_lb_edge_extension.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_lb_edge_extension", - "full_name": "::Google::Cloud::NetworkServices::V1::DepService::Client#delete_lb_edge_extension", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::NetworkServices::V1::DeleteLbEdgeExtensionRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "DepService::Client", - "full_name": "::Google::Cloud::NetworkServices::V1::DepService::Client" - }, - "method": { - "short_name": "DeleteLbEdgeExtension", - "full_name": "google.cloud.networkservices.v1.DepService.DeleteLbEdgeExtension", - "service": { - "short_name": "DepService", - "full_name": "google.cloud.networkservices.v1.DepService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "networkservices_v1_generated_DepService_ListAuthzExtensions_sync", - "title": "Snippet for the list_authz_extensions call in the DepService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::DepService::Client#list_authz_extensions.", - "file": "dep_service/list_authz_extensions.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_authz_extensions", - "full_name": "::Google::Cloud::NetworkServices::V1::DepService::Client#list_authz_extensions", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::NetworkServices::V1::ListAuthzExtensionsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::NetworkServices::V1::ListAuthzExtensionsResponse", - "client": { - "short_name": "DepService::Client", - "full_name": "::Google::Cloud::NetworkServices::V1::DepService::Client" - }, - "method": { - "short_name": "ListAuthzExtensions", - "full_name": "google.cloud.networkservices.v1.DepService.ListAuthzExtensions", - "service": { - "short_name": "DepService", - "full_name": "google.cloud.networkservices.v1.DepService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "networkservices_v1_generated_DepService_GetAuthzExtension_sync", - "title": "Snippet for the get_authz_extension call in the DepService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::DepService::Client#get_authz_extension.", - "file": "dep_service/get_authz_extension.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_authz_extension", - "full_name": "::Google::Cloud::NetworkServices::V1::DepService::Client#get_authz_extension", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::NetworkServices::V1::GetAuthzExtensionRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::NetworkServices::V1::AuthzExtension", - "client": { - "short_name": "DepService::Client", - "full_name": "::Google::Cloud::NetworkServices::V1::DepService::Client" - }, - "method": { - "short_name": "GetAuthzExtension", - "full_name": "google.cloud.networkservices.v1.DepService.GetAuthzExtension", - "service": { - "short_name": "DepService", - "full_name": "google.cloud.networkservices.v1.DepService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "networkservices_v1_generated_DepService_CreateAuthzExtension_sync", - "title": "Snippet for the create_authz_extension call in the DepService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::DepService::Client#create_authz_extension.", - "file": "dep_service/create_authz_extension.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_authz_extension", - "full_name": "::Google::Cloud::NetworkServices::V1::DepService::Client#create_authz_extension", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::NetworkServices::V1::CreateAuthzExtensionRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "DepService::Client", - "full_name": "::Google::Cloud::NetworkServices::V1::DepService::Client" - }, - "method": { - "short_name": "CreateAuthzExtension", - "full_name": "google.cloud.networkservices.v1.DepService.CreateAuthzExtension", - "service": { - "short_name": "DepService", - "full_name": "google.cloud.networkservices.v1.DepService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "networkservices_v1_generated_DepService_UpdateAuthzExtension_sync", - "title": "Snippet for the update_authz_extension call in the DepService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::DepService::Client#update_authz_extension.", - "file": "dep_service/update_authz_extension.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_authz_extension", - "full_name": "::Google::Cloud::NetworkServices::V1::DepService::Client#update_authz_extension", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::NetworkServices::V1::UpdateAuthzExtensionRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "DepService::Client", - "full_name": "::Google::Cloud::NetworkServices::V1::DepService::Client" - }, - "method": { - "short_name": "UpdateAuthzExtension", - "full_name": "google.cloud.networkservices.v1.DepService.UpdateAuthzExtension", - "service": { - "short_name": "DepService", - "full_name": "google.cloud.networkservices.v1.DepService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "networkservices_v1_generated_DepService_DeleteAuthzExtension_sync", - "title": "Snippet for the delete_authz_extension call in the DepService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::DepService::Client#delete_authz_extension.", - "file": "dep_service/delete_authz_extension.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_authz_extension", - "full_name": "::Google::Cloud::NetworkServices::V1::DepService::Client#delete_authz_extension", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::NetworkServices::V1::DeleteAuthzExtensionRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "DepService::Client", - "full_name": "::Google::Cloud::NetworkServices::V1::DepService::Client" - }, - "method": { - "short_name": "DeleteAuthzExtension", - "full_name": "google.cloud.networkservices.v1.DepService.DeleteAuthzExtension", - "service": { - "short_name": "DepService", - "full_name": "google.cloud.networkservices.v1.DepService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "networkservices_v1_generated_NetworkServices_ListEndpointPolicies_sync", - "title": "Snippet for the list_endpoint_policies call in the NetworkServices service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#list_endpoint_policies.", - "file": "network_services/list_endpoint_policies.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_endpoint_policies", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#list_endpoint_policies", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::NetworkServices::V1::ListEndpointPoliciesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::NetworkServices::V1::ListEndpointPoliciesResponse", - "client": { - "short_name": "NetworkServices::Client", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" - }, - "method": { - "short_name": "ListEndpointPolicies", - "full_name": "google.cloud.networkservices.v1.NetworkServices.ListEndpointPolicies", - "service": { - "short_name": "NetworkServices", - "full_name": "google.cloud.networkservices.v1.NetworkServices" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "networkservices_v1_generated_NetworkServices_GetEndpointPolicy_sync", - "title": "Snippet for the get_endpoint_policy call in the NetworkServices service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#get_endpoint_policy.", - "file": "network_services/get_endpoint_policy.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_endpoint_policy", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#get_endpoint_policy", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::NetworkServices::V1::GetEndpointPolicyRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::NetworkServices::V1::EndpointPolicy", - "client": { - "short_name": "NetworkServices::Client", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" - }, - "method": { - "short_name": "GetEndpointPolicy", - "full_name": "google.cloud.networkservices.v1.NetworkServices.GetEndpointPolicy", - "service": { - "short_name": "NetworkServices", - "full_name": "google.cloud.networkservices.v1.NetworkServices" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "networkservices_v1_generated_NetworkServices_CreateEndpointPolicy_sync", - "title": "Snippet for the create_endpoint_policy call in the NetworkServices service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#create_endpoint_policy.", - "file": "network_services/create_endpoint_policy.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_endpoint_policy", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#create_endpoint_policy", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::NetworkServices::V1::CreateEndpointPolicyRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "NetworkServices::Client", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" - }, - "method": { - "short_name": "CreateEndpointPolicy", - "full_name": "google.cloud.networkservices.v1.NetworkServices.CreateEndpointPolicy", - "service": { - "short_name": "NetworkServices", - "full_name": "google.cloud.networkservices.v1.NetworkServices" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "networkservices_v1_generated_NetworkServices_UpdateEndpointPolicy_sync", - "title": "Snippet for the update_endpoint_policy call in the NetworkServices service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#update_endpoint_policy.", - "file": "network_services/update_endpoint_policy.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_endpoint_policy", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#update_endpoint_policy", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::NetworkServices::V1::UpdateEndpointPolicyRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "NetworkServices::Client", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" - }, - "method": { - "short_name": "UpdateEndpointPolicy", - "full_name": "google.cloud.networkservices.v1.NetworkServices.UpdateEndpointPolicy", - "service": { - "short_name": "NetworkServices", - "full_name": "google.cloud.networkservices.v1.NetworkServices" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "networkservices_v1_generated_NetworkServices_DeleteEndpointPolicy_sync", - "title": "Snippet for the delete_endpoint_policy call in the NetworkServices service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#delete_endpoint_policy.", - "file": "network_services/delete_endpoint_policy.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_endpoint_policy", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#delete_endpoint_policy", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::NetworkServices::V1::DeleteEndpointPolicyRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "NetworkServices::Client", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" - }, - "method": { - "short_name": "DeleteEndpointPolicy", - "full_name": "google.cloud.networkservices.v1.NetworkServices.DeleteEndpointPolicy", - "service": { - "short_name": "NetworkServices", - "full_name": "google.cloud.networkservices.v1.NetworkServices" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "networkservices_v1_generated_NetworkServices_ListWasmPluginVersions_sync", - "title": "Snippet for the list_wasm_plugin_versions call in the NetworkServices service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#list_wasm_plugin_versions.", - "file": "network_services/list_wasm_plugin_versions.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_wasm_plugin_versions", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#list_wasm_plugin_versions", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::NetworkServices::V1::ListWasmPluginVersionsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::NetworkServices::V1::ListWasmPluginVersionsResponse", - "client": { - "short_name": "NetworkServices::Client", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" - }, - "method": { - "short_name": "ListWasmPluginVersions", - "full_name": "google.cloud.networkservices.v1.NetworkServices.ListWasmPluginVersions", - "service": { - "short_name": "NetworkServices", - "full_name": "google.cloud.networkservices.v1.NetworkServices" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "networkservices_v1_generated_NetworkServices_GetWasmPluginVersion_sync", - "title": "Snippet for the get_wasm_plugin_version call in the NetworkServices service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#get_wasm_plugin_version.", - "file": "network_services/get_wasm_plugin_version.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_wasm_plugin_version", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#get_wasm_plugin_version", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::NetworkServices::V1::GetWasmPluginVersionRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::NetworkServices::V1::WasmPluginVersion", - "client": { - "short_name": "NetworkServices::Client", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" - }, - "method": { - "short_name": "GetWasmPluginVersion", - "full_name": "google.cloud.networkservices.v1.NetworkServices.GetWasmPluginVersion", - "service": { - "short_name": "NetworkServices", - "full_name": "google.cloud.networkservices.v1.NetworkServices" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "networkservices_v1_generated_NetworkServices_CreateWasmPluginVersion_sync", - "title": "Snippet for the create_wasm_plugin_version call in the NetworkServices service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#create_wasm_plugin_version.", - "file": "network_services/create_wasm_plugin_version.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_wasm_plugin_version", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#create_wasm_plugin_version", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::NetworkServices::V1::CreateWasmPluginVersionRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "NetworkServices::Client", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" - }, - "method": { - "short_name": "CreateWasmPluginVersion", - "full_name": "google.cloud.networkservices.v1.NetworkServices.CreateWasmPluginVersion", - "service": { - "short_name": "NetworkServices", - "full_name": "google.cloud.networkservices.v1.NetworkServices" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "networkservices_v1_generated_NetworkServices_DeleteWasmPluginVersion_sync", - "title": "Snippet for the delete_wasm_plugin_version call in the NetworkServices service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#delete_wasm_plugin_version.", - "file": "network_services/delete_wasm_plugin_version.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_wasm_plugin_version", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#delete_wasm_plugin_version", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::NetworkServices::V1::DeleteWasmPluginVersionRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "NetworkServices::Client", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" - }, - "method": { - "short_name": "DeleteWasmPluginVersion", - "full_name": "google.cloud.networkservices.v1.NetworkServices.DeleteWasmPluginVersion", - "service": { - "short_name": "NetworkServices", - "full_name": "google.cloud.networkservices.v1.NetworkServices" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "networkservices_v1_generated_NetworkServices_ListWasmPlugins_sync", - "title": "Snippet for the list_wasm_plugins call in the NetworkServices service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#list_wasm_plugins.", - "file": "network_services/list_wasm_plugins.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_wasm_plugins", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#list_wasm_plugins", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::NetworkServices::V1::ListWasmPluginsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::NetworkServices::V1::ListWasmPluginsResponse", - "client": { - "short_name": "NetworkServices::Client", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" - }, - "method": { - "short_name": "ListWasmPlugins", - "full_name": "google.cloud.networkservices.v1.NetworkServices.ListWasmPlugins", - "service": { - "short_name": "NetworkServices", - "full_name": "google.cloud.networkservices.v1.NetworkServices" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "networkservices_v1_generated_NetworkServices_GetWasmPlugin_sync", - "title": "Snippet for the get_wasm_plugin call in the NetworkServices service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#get_wasm_plugin.", - "file": "network_services/get_wasm_plugin.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_wasm_plugin", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#get_wasm_plugin", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::NetworkServices::V1::GetWasmPluginRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::NetworkServices::V1::WasmPlugin", - "client": { - "short_name": "NetworkServices::Client", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" - }, - "method": { - "short_name": "GetWasmPlugin", - "full_name": "google.cloud.networkservices.v1.NetworkServices.GetWasmPlugin", - "service": { - "short_name": "NetworkServices", - "full_name": "google.cloud.networkservices.v1.NetworkServices" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "networkservices_v1_generated_NetworkServices_CreateWasmPlugin_sync", - "title": "Snippet for the create_wasm_plugin call in the NetworkServices service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#create_wasm_plugin.", - "file": "network_services/create_wasm_plugin.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_wasm_plugin", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#create_wasm_plugin", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::NetworkServices::V1::CreateWasmPluginRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "NetworkServices::Client", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" - }, - "method": { - "short_name": "CreateWasmPlugin", - "full_name": "google.cloud.networkservices.v1.NetworkServices.CreateWasmPlugin", - "service": { - "short_name": "NetworkServices", - "full_name": "google.cloud.networkservices.v1.NetworkServices" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "networkservices_v1_generated_NetworkServices_UpdateWasmPlugin_sync", - "title": "Snippet for the update_wasm_plugin call in the NetworkServices service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#update_wasm_plugin.", - "file": "network_services/update_wasm_plugin.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_wasm_plugin", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#update_wasm_plugin", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::NetworkServices::V1::UpdateWasmPluginRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "NetworkServices::Client", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" - }, - "method": { - "short_name": "UpdateWasmPlugin", - "full_name": "google.cloud.networkservices.v1.NetworkServices.UpdateWasmPlugin", - "service": { - "short_name": "NetworkServices", - "full_name": "google.cloud.networkservices.v1.NetworkServices" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "networkservices_v1_generated_NetworkServices_DeleteWasmPlugin_sync", - "title": "Snippet for the delete_wasm_plugin call in the NetworkServices service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#delete_wasm_plugin.", - "file": "network_services/delete_wasm_plugin.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_wasm_plugin", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#delete_wasm_plugin", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::NetworkServices::V1::DeleteWasmPluginRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "NetworkServices::Client", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" - }, - "method": { - "short_name": "DeleteWasmPlugin", - "full_name": "google.cloud.networkservices.v1.NetworkServices.DeleteWasmPlugin", - "service": { - "short_name": "NetworkServices", - "full_name": "google.cloud.networkservices.v1.NetworkServices" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "networkservices_v1_generated_NetworkServices_ListGateways_sync", - "title": "Snippet for the list_gateways call in the NetworkServices service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#list_gateways.", - "file": "network_services/list_gateways.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_gateways", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#list_gateways", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::NetworkServices::V1::ListGatewaysRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::NetworkServices::V1::ListGatewaysResponse", - "client": { - "short_name": "NetworkServices::Client", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" - }, - "method": { - "short_name": "ListGateways", - "full_name": "google.cloud.networkservices.v1.NetworkServices.ListGateways", - "service": { - "short_name": "NetworkServices", - "full_name": "google.cloud.networkservices.v1.NetworkServices" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "networkservices_v1_generated_NetworkServices_GetGateway_sync", - "title": "Snippet for the get_gateway call in the NetworkServices service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#get_gateway.", - "file": "network_services/get_gateway.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_gateway", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#get_gateway", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::NetworkServices::V1::GetGatewayRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::NetworkServices::V1::Gateway", - "client": { - "short_name": "NetworkServices::Client", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" - }, - "method": { - "short_name": "GetGateway", - "full_name": "google.cloud.networkservices.v1.NetworkServices.GetGateway", - "service": { - "short_name": "NetworkServices", - "full_name": "google.cloud.networkservices.v1.NetworkServices" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "networkservices_v1_generated_NetworkServices_CreateGateway_sync", - "title": "Snippet for the create_gateway call in the NetworkServices service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#create_gateway.", - "file": "network_services/create_gateway.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_gateway", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#create_gateway", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::NetworkServices::V1::CreateGatewayRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "NetworkServices::Client", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" - }, - "method": { - "short_name": "CreateGateway", - "full_name": "google.cloud.networkservices.v1.NetworkServices.CreateGateway", - "service": { - "short_name": "NetworkServices", - "full_name": "google.cloud.networkservices.v1.NetworkServices" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "networkservices_v1_generated_NetworkServices_UpdateGateway_sync", - "title": "Snippet for the update_gateway call in the NetworkServices service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#update_gateway.", - "file": "network_services/update_gateway.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_gateway", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#update_gateway", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::NetworkServices::V1::UpdateGatewayRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "NetworkServices::Client", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" - }, - "method": { - "short_name": "UpdateGateway", - "full_name": "google.cloud.networkservices.v1.NetworkServices.UpdateGateway", - "service": { - "short_name": "NetworkServices", - "full_name": "google.cloud.networkservices.v1.NetworkServices" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "networkservices_v1_generated_NetworkServices_DeleteGateway_sync", - "title": "Snippet for the delete_gateway call in the NetworkServices service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#delete_gateway.", - "file": "network_services/delete_gateway.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_gateway", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#delete_gateway", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::NetworkServices::V1::DeleteGatewayRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "NetworkServices::Client", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" - }, - "method": { - "short_name": "DeleteGateway", - "full_name": "google.cloud.networkservices.v1.NetworkServices.DeleteGateway", - "service": { - "short_name": "NetworkServices", - "full_name": "google.cloud.networkservices.v1.NetworkServices" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "networkservices_v1_generated_NetworkServices_ListGrpcRoutes_sync", - "title": "Snippet for the list_grpc_routes call in the NetworkServices service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#list_grpc_routes.", - "file": "network_services/list_grpc_routes.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_grpc_routes", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#list_grpc_routes", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::NetworkServices::V1::ListGrpcRoutesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::NetworkServices::V1::ListGrpcRoutesResponse", - "client": { - "short_name": "NetworkServices::Client", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" - }, - "method": { - "short_name": "ListGrpcRoutes", - "full_name": "google.cloud.networkservices.v1.NetworkServices.ListGrpcRoutes", - "service": { - "short_name": "NetworkServices", - "full_name": "google.cloud.networkservices.v1.NetworkServices" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "networkservices_v1_generated_NetworkServices_GetGrpcRoute_sync", - "title": "Snippet for the get_grpc_route call in the NetworkServices service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#get_grpc_route.", - "file": "network_services/get_grpc_route.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_grpc_route", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#get_grpc_route", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::NetworkServices::V1::GetGrpcRouteRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::NetworkServices::V1::GrpcRoute", - "client": { - "short_name": "NetworkServices::Client", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" - }, - "method": { - "short_name": "GetGrpcRoute", - "full_name": "google.cloud.networkservices.v1.NetworkServices.GetGrpcRoute", - "service": { - "short_name": "NetworkServices", - "full_name": "google.cloud.networkservices.v1.NetworkServices" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "networkservices_v1_generated_NetworkServices_CreateGrpcRoute_sync", - "title": "Snippet for the create_grpc_route call in the NetworkServices service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#create_grpc_route.", - "file": "network_services/create_grpc_route.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_grpc_route", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#create_grpc_route", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::NetworkServices::V1::CreateGrpcRouteRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "NetworkServices::Client", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" - }, - "method": { - "short_name": "CreateGrpcRoute", - "full_name": "google.cloud.networkservices.v1.NetworkServices.CreateGrpcRoute", - "service": { - "short_name": "NetworkServices", - "full_name": "google.cloud.networkservices.v1.NetworkServices" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "networkservices_v1_generated_NetworkServices_UpdateGrpcRoute_sync", - "title": "Snippet for the update_grpc_route call in the NetworkServices service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#update_grpc_route.", - "file": "network_services/update_grpc_route.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_grpc_route", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#update_grpc_route", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::NetworkServices::V1::UpdateGrpcRouteRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "NetworkServices::Client", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" - }, - "method": { - "short_name": "UpdateGrpcRoute", - "full_name": "google.cloud.networkservices.v1.NetworkServices.UpdateGrpcRoute", - "service": { - "short_name": "NetworkServices", - "full_name": "google.cloud.networkservices.v1.NetworkServices" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "networkservices_v1_generated_NetworkServices_DeleteGrpcRoute_sync", - "title": "Snippet for the delete_grpc_route call in the NetworkServices service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#delete_grpc_route.", - "file": "network_services/delete_grpc_route.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_grpc_route", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#delete_grpc_route", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::NetworkServices::V1::DeleteGrpcRouteRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "NetworkServices::Client", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" - }, - "method": { - "short_name": "DeleteGrpcRoute", - "full_name": "google.cloud.networkservices.v1.NetworkServices.DeleteGrpcRoute", - "service": { - "short_name": "NetworkServices", - "full_name": "google.cloud.networkservices.v1.NetworkServices" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "networkservices_v1_generated_NetworkServices_ListHttpRoutes_sync", - "title": "Snippet for the list_http_routes call in the NetworkServices service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#list_http_routes.", - "file": "network_services/list_http_routes.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_http_routes", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#list_http_routes", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::NetworkServices::V1::ListHttpRoutesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::NetworkServices::V1::ListHttpRoutesResponse", - "client": { - "short_name": "NetworkServices::Client", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" - }, - "method": { - "short_name": "ListHttpRoutes", - "full_name": "google.cloud.networkservices.v1.NetworkServices.ListHttpRoutes", - "service": { - "short_name": "NetworkServices", - "full_name": "google.cloud.networkservices.v1.NetworkServices" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "networkservices_v1_generated_NetworkServices_GetHttpRoute_sync", - "title": "Snippet for the get_http_route call in the NetworkServices service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#get_http_route.", - "file": "network_services/get_http_route.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_http_route", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#get_http_route", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::NetworkServices::V1::GetHttpRouteRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::NetworkServices::V1::HttpRoute", - "client": { - "short_name": "NetworkServices::Client", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" - }, - "method": { - "short_name": "GetHttpRoute", - "full_name": "google.cloud.networkservices.v1.NetworkServices.GetHttpRoute", - "service": { - "short_name": "NetworkServices", - "full_name": "google.cloud.networkservices.v1.NetworkServices" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "networkservices_v1_generated_NetworkServices_CreateHttpRoute_sync", - "title": "Snippet for the create_http_route call in the NetworkServices service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#create_http_route.", - "file": "network_services/create_http_route.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_http_route", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#create_http_route", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::NetworkServices::V1::CreateHttpRouteRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "NetworkServices::Client", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" - }, - "method": { - "short_name": "CreateHttpRoute", - "full_name": "google.cloud.networkservices.v1.NetworkServices.CreateHttpRoute", - "service": { - "short_name": "NetworkServices", - "full_name": "google.cloud.networkservices.v1.NetworkServices" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "networkservices_v1_generated_NetworkServices_UpdateHttpRoute_sync", - "title": "Snippet for the update_http_route call in the NetworkServices service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#update_http_route.", - "file": "network_services/update_http_route.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_http_route", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#update_http_route", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::NetworkServices::V1::UpdateHttpRouteRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "NetworkServices::Client", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" - }, - "method": { - "short_name": "UpdateHttpRoute", - "full_name": "google.cloud.networkservices.v1.NetworkServices.UpdateHttpRoute", - "service": { - "short_name": "NetworkServices", - "full_name": "google.cloud.networkservices.v1.NetworkServices" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "networkservices_v1_generated_NetworkServices_DeleteHttpRoute_sync", - "title": "Snippet for the delete_http_route call in the NetworkServices service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#delete_http_route.", - "file": "network_services/delete_http_route.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_http_route", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#delete_http_route", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::NetworkServices::V1::DeleteHttpRouteRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "NetworkServices::Client", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" - }, - "method": { - "short_name": "DeleteHttpRoute", - "full_name": "google.cloud.networkservices.v1.NetworkServices.DeleteHttpRoute", - "service": { - "short_name": "NetworkServices", - "full_name": "google.cloud.networkservices.v1.NetworkServices" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "networkservices_v1_generated_NetworkServices_ListTcpRoutes_sync", - "title": "Snippet for the list_tcp_routes call in the NetworkServices service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#list_tcp_routes.", - "file": "network_services/list_tcp_routes.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_tcp_routes", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#list_tcp_routes", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::NetworkServices::V1::ListTcpRoutesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::NetworkServices::V1::ListTcpRoutesResponse", - "client": { - "short_name": "NetworkServices::Client", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" - }, - "method": { - "short_name": "ListTcpRoutes", - "full_name": "google.cloud.networkservices.v1.NetworkServices.ListTcpRoutes", - "service": { - "short_name": "NetworkServices", - "full_name": "google.cloud.networkservices.v1.NetworkServices" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "networkservices_v1_generated_NetworkServices_GetTcpRoute_sync", - "title": "Snippet for the get_tcp_route call in the NetworkServices service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#get_tcp_route.", - "file": "network_services/get_tcp_route.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_tcp_route", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#get_tcp_route", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::NetworkServices::V1::GetTcpRouteRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::NetworkServices::V1::TcpRoute", - "client": { - "short_name": "NetworkServices::Client", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" - }, - "method": { - "short_name": "GetTcpRoute", - "full_name": "google.cloud.networkservices.v1.NetworkServices.GetTcpRoute", - "service": { - "short_name": "NetworkServices", - "full_name": "google.cloud.networkservices.v1.NetworkServices" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "networkservices_v1_generated_NetworkServices_CreateTcpRoute_sync", - "title": "Snippet for the create_tcp_route call in the NetworkServices service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#create_tcp_route.", - "file": "network_services/create_tcp_route.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_tcp_route", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#create_tcp_route", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::NetworkServices::V1::CreateTcpRouteRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "NetworkServices::Client", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" - }, - "method": { - "short_name": "CreateTcpRoute", - "full_name": "google.cloud.networkservices.v1.NetworkServices.CreateTcpRoute", - "service": { - "short_name": "NetworkServices", - "full_name": "google.cloud.networkservices.v1.NetworkServices" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "networkservices_v1_generated_NetworkServices_UpdateTcpRoute_sync", - "title": "Snippet for the update_tcp_route call in the NetworkServices service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#update_tcp_route.", - "file": "network_services/update_tcp_route.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_tcp_route", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#update_tcp_route", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::NetworkServices::V1::UpdateTcpRouteRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "NetworkServices::Client", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" - }, - "method": { - "short_name": "UpdateTcpRoute", - "full_name": "google.cloud.networkservices.v1.NetworkServices.UpdateTcpRoute", - "service": { - "short_name": "NetworkServices", - "full_name": "google.cloud.networkservices.v1.NetworkServices" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "networkservices_v1_generated_NetworkServices_DeleteTcpRoute_sync", - "title": "Snippet for the delete_tcp_route call in the NetworkServices service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#delete_tcp_route.", - "file": "network_services/delete_tcp_route.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_tcp_route", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#delete_tcp_route", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::NetworkServices::V1::DeleteTcpRouteRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "NetworkServices::Client", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" - }, - "method": { - "short_name": "DeleteTcpRoute", - "full_name": "google.cloud.networkservices.v1.NetworkServices.DeleteTcpRoute", - "service": { - "short_name": "NetworkServices", - "full_name": "google.cloud.networkservices.v1.NetworkServices" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "networkservices_v1_generated_NetworkServices_ListTlsRoutes_sync", - "title": "Snippet for the list_tls_routes call in the NetworkServices service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#list_tls_routes.", - "file": "network_services/list_tls_routes.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_tls_routes", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#list_tls_routes", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::NetworkServices::V1::ListTlsRoutesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::NetworkServices::V1::ListTlsRoutesResponse", - "client": { - "short_name": "NetworkServices::Client", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" - }, - "method": { - "short_name": "ListTlsRoutes", - "full_name": "google.cloud.networkservices.v1.NetworkServices.ListTlsRoutes", - "service": { - "short_name": "NetworkServices", - "full_name": "google.cloud.networkservices.v1.NetworkServices" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "networkservices_v1_generated_NetworkServices_GetTlsRoute_sync", - "title": "Snippet for the get_tls_route call in the NetworkServices service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#get_tls_route.", - "file": "network_services/get_tls_route.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_tls_route", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#get_tls_route", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::NetworkServices::V1::GetTlsRouteRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::NetworkServices::V1::TlsRoute", - "client": { - "short_name": "NetworkServices::Client", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" - }, - "method": { - "short_name": "GetTlsRoute", - "full_name": "google.cloud.networkservices.v1.NetworkServices.GetTlsRoute", - "service": { - "short_name": "NetworkServices", - "full_name": "google.cloud.networkservices.v1.NetworkServices" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "networkservices_v1_generated_NetworkServices_CreateTlsRoute_sync", - "title": "Snippet for the create_tls_route call in the NetworkServices service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#create_tls_route.", - "file": "network_services/create_tls_route.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_tls_route", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#create_tls_route", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::NetworkServices::V1::CreateTlsRouteRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "NetworkServices::Client", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" - }, - "method": { - "short_name": "CreateTlsRoute", - "full_name": "google.cloud.networkservices.v1.NetworkServices.CreateTlsRoute", - "service": { - "short_name": "NetworkServices", - "full_name": "google.cloud.networkservices.v1.NetworkServices" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "networkservices_v1_generated_NetworkServices_UpdateTlsRoute_sync", - "title": "Snippet for the update_tls_route call in the NetworkServices service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#update_tls_route.", - "file": "network_services/update_tls_route.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_tls_route", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#update_tls_route", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::NetworkServices::V1::UpdateTlsRouteRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "NetworkServices::Client", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" - }, - "method": { - "short_name": "UpdateTlsRoute", - "full_name": "google.cloud.networkservices.v1.NetworkServices.UpdateTlsRoute", - "service": { - "short_name": "NetworkServices", - "full_name": "google.cloud.networkservices.v1.NetworkServices" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "networkservices_v1_generated_NetworkServices_DeleteTlsRoute_sync", - "title": "Snippet for the delete_tls_route call in the NetworkServices service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#delete_tls_route.", - "file": "network_services/delete_tls_route.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_tls_route", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#delete_tls_route", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::NetworkServices::V1::DeleteTlsRouteRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "NetworkServices::Client", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" - }, - "method": { - "short_name": "DeleteTlsRoute", - "full_name": "google.cloud.networkservices.v1.NetworkServices.DeleteTlsRoute", - "service": { - "short_name": "NetworkServices", - "full_name": "google.cloud.networkservices.v1.NetworkServices" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "networkservices_v1_generated_NetworkServices_ListServiceBindings_sync", - "title": "Snippet for the list_service_bindings call in the NetworkServices service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#list_service_bindings.", - "file": "network_services/list_service_bindings.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_service_bindings", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#list_service_bindings", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::NetworkServices::V1::ListServiceBindingsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::NetworkServices::V1::ListServiceBindingsResponse", - "client": { - "short_name": "NetworkServices::Client", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" - }, - "method": { - "short_name": "ListServiceBindings", - "full_name": "google.cloud.networkservices.v1.NetworkServices.ListServiceBindings", - "service": { - "short_name": "NetworkServices", - "full_name": "google.cloud.networkservices.v1.NetworkServices" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "networkservices_v1_generated_NetworkServices_GetServiceBinding_sync", - "title": "Snippet for the get_service_binding call in the NetworkServices service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#get_service_binding.", - "file": "network_services/get_service_binding.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_service_binding", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#get_service_binding", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::NetworkServices::V1::GetServiceBindingRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::NetworkServices::V1::ServiceBinding", - "client": { - "short_name": "NetworkServices::Client", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" - }, - "method": { - "short_name": "GetServiceBinding", - "full_name": "google.cloud.networkservices.v1.NetworkServices.GetServiceBinding", - "service": { - "short_name": "NetworkServices", - "full_name": "google.cloud.networkservices.v1.NetworkServices" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "networkservices_v1_generated_NetworkServices_CreateServiceBinding_sync", - "title": "Snippet for the create_service_binding call in the NetworkServices service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#create_service_binding.", - "file": "network_services/create_service_binding.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_service_binding", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#create_service_binding", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::NetworkServices::V1::CreateServiceBindingRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "NetworkServices::Client", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" - }, - "method": { - "short_name": "CreateServiceBinding", - "full_name": "google.cloud.networkservices.v1.NetworkServices.CreateServiceBinding", - "service": { - "short_name": "NetworkServices", - "full_name": "google.cloud.networkservices.v1.NetworkServices" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "networkservices_v1_generated_NetworkServices_UpdateServiceBinding_sync", - "title": "Snippet for the update_service_binding call in the NetworkServices service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#update_service_binding.", - "file": "network_services/update_service_binding.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_service_binding", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#update_service_binding", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::NetworkServices::V1::UpdateServiceBindingRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "NetworkServices::Client", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" - }, - "method": { - "short_name": "UpdateServiceBinding", - "full_name": "google.cloud.networkservices.v1.NetworkServices.UpdateServiceBinding", - "service": { - "short_name": "NetworkServices", - "full_name": "google.cloud.networkservices.v1.NetworkServices" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "networkservices_v1_generated_NetworkServices_DeleteServiceBinding_sync", - "title": "Snippet for the delete_service_binding call in the NetworkServices service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#delete_service_binding.", - "file": "network_services/delete_service_binding.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_service_binding", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#delete_service_binding", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::NetworkServices::V1::DeleteServiceBindingRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "NetworkServices::Client", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" - }, - "method": { - "short_name": "DeleteServiceBinding", - "full_name": "google.cloud.networkservices.v1.NetworkServices.DeleteServiceBinding", - "service": { - "short_name": "NetworkServices", - "full_name": "google.cloud.networkservices.v1.NetworkServices" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "networkservices_v1_generated_NetworkServices_ListMeshes_sync", - "title": "Snippet for the list_meshes call in the NetworkServices service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#list_meshes.", - "file": "network_services/list_meshes.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_meshes", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#list_meshes", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::NetworkServices::V1::ListMeshesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::NetworkServices::V1::ListMeshesResponse", - "client": { - "short_name": "NetworkServices::Client", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" - }, - "method": { - "short_name": "ListMeshes", - "full_name": "google.cloud.networkservices.v1.NetworkServices.ListMeshes", - "service": { - "short_name": "NetworkServices", - "full_name": "google.cloud.networkservices.v1.NetworkServices" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "networkservices_v1_generated_NetworkServices_GetMesh_sync", - "title": "Snippet for the get_mesh call in the NetworkServices service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#get_mesh.", - "file": "network_services/get_mesh.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_mesh", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#get_mesh", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::NetworkServices::V1::GetMeshRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::NetworkServices::V1::Mesh", - "client": { - "short_name": "NetworkServices::Client", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" - }, - "method": { - "short_name": "GetMesh", - "full_name": "google.cloud.networkservices.v1.NetworkServices.GetMesh", - "service": { - "short_name": "NetworkServices", - "full_name": "google.cloud.networkservices.v1.NetworkServices" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "networkservices_v1_generated_NetworkServices_CreateMesh_sync", - "title": "Snippet for the create_mesh call in the NetworkServices service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#create_mesh.", - "file": "network_services/create_mesh.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_mesh", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#create_mesh", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::NetworkServices::V1::CreateMeshRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "NetworkServices::Client", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" - }, - "method": { - "short_name": "CreateMesh", - "full_name": "google.cloud.networkservices.v1.NetworkServices.CreateMesh", - "service": { - "short_name": "NetworkServices", - "full_name": "google.cloud.networkservices.v1.NetworkServices" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "networkservices_v1_generated_NetworkServices_UpdateMesh_sync", - "title": "Snippet for the update_mesh call in the NetworkServices service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#update_mesh.", - "file": "network_services/update_mesh.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_mesh", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#update_mesh", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::NetworkServices::V1::UpdateMeshRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "NetworkServices::Client", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" - }, - "method": { - "short_name": "UpdateMesh", - "full_name": "google.cloud.networkservices.v1.NetworkServices.UpdateMesh", - "service": { - "short_name": "NetworkServices", - "full_name": "google.cloud.networkservices.v1.NetworkServices" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "networkservices_v1_generated_NetworkServices_DeleteMesh_sync", - "title": "Snippet for the delete_mesh call in the NetworkServices service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#delete_mesh.", - "file": "network_services/delete_mesh.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_mesh", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#delete_mesh", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::NetworkServices::V1::DeleteMeshRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "NetworkServices::Client", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" - }, - "method": { - "short_name": "DeleteMesh", - "full_name": "google.cloud.networkservices.v1.NetworkServices.DeleteMesh", - "service": { - "short_name": "NetworkServices", - "full_name": "google.cloud.networkservices.v1.NetworkServices" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "networkservices_v1_generated_NetworkServices_ListServiceLbPolicies_sync", - "title": "Snippet for the list_service_lb_policies call in the NetworkServices service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#list_service_lb_policies.", - "file": "network_services/list_service_lb_policies.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_service_lb_policies", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#list_service_lb_policies", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::NetworkServices::V1::ListServiceLbPoliciesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::NetworkServices::V1::ListServiceLbPoliciesResponse", - "client": { - "short_name": "NetworkServices::Client", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" - }, - "method": { - "short_name": "ListServiceLbPolicies", - "full_name": "google.cloud.networkservices.v1.NetworkServices.ListServiceLbPolicies", - "service": { - "short_name": "NetworkServices", - "full_name": "google.cloud.networkservices.v1.NetworkServices" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "networkservices_v1_generated_NetworkServices_GetServiceLbPolicy_sync", - "title": "Snippet for the get_service_lb_policy call in the NetworkServices service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#get_service_lb_policy.", - "file": "network_services/get_service_lb_policy.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_service_lb_policy", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#get_service_lb_policy", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::NetworkServices::V1::GetServiceLbPolicyRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::NetworkServices::V1::ServiceLbPolicy", - "client": { - "short_name": "NetworkServices::Client", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" - }, - "method": { - "short_name": "GetServiceLbPolicy", - "full_name": "google.cloud.networkservices.v1.NetworkServices.GetServiceLbPolicy", - "service": { - "short_name": "NetworkServices", - "full_name": "google.cloud.networkservices.v1.NetworkServices" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "networkservices_v1_generated_NetworkServices_CreateServiceLbPolicy_sync", - "title": "Snippet for the create_service_lb_policy call in the NetworkServices service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#create_service_lb_policy.", - "file": "network_services/create_service_lb_policy.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_service_lb_policy", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#create_service_lb_policy", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::NetworkServices::V1::CreateServiceLbPolicyRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "NetworkServices::Client", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" - }, - "method": { - "short_name": "CreateServiceLbPolicy", - "full_name": "google.cloud.networkservices.v1.NetworkServices.CreateServiceLbPolicy", - "service": { - "short_name": "NetworkServices", - "full_name": "google.cloud.networkservices.v1.NetworkServices" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "networkservices_v1_generated_NetworkServices_UpdateServiceLbPolicy_sync", - "title": "Snippet for the update_service_lb_policy call in the NetworkServices service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#update_service_lb_policy.", - "file": "network_services/update_service_lb_policy.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_service_lb_policy", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#update_service_lb_policy", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::NetworkServices::V1::UpdateServiceLbPolicyRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "NetworkServices::Client", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" - }, - "method": { - "short_name": "UpdateServiceLbPolicy", - "full_name": "google.cloud.networkservices.v1.NetworkServices.UpdateServiceLbPolicy", - "service": { - "short_name": "NetworkServices", - "full_name": "google.cloud.networkservices.v1.NetworkServices" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "networkservices_v1_generated_NetworkServices_DeleteServiceLbPolicy_sync", - "title": "Snippet for the delete_service_lb_policy call in the NetworkServices service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#delete_service_lb_policy.", - "file": "network_services/delete_service_lb_policy.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_service_lb_policy", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#delete_service_lb_policy", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::NetworkServices::V1::DeleteServiceLbPolicyRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "NetworkServices::Client", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" - }, - "method": { - "short_name": "DeleteServiceLbPolicy", - "full_name": "google.cloud.networkservices.v1.NetworkServices.DeleteServiceLbPolicy", - "service": { - "short_name": "NetworkServices", - "full_name": "google.cloud.networkservices.v1.NetworkServices" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "networkservices_v1_generated_NetworkServices_GetGatewayRouteView_sync", - "title": "Snippet for the get_gateway_route_view call in the NetworkServices service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#get_gateway_route_view.", - "file": "network_services/get_gateway_route_view.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_gateway_route_view", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#get_gateway_route_view", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::NetworkServices::V1::GetGatewayRouteViewRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::NetworkServices::V1::GatewayRouteView", - "client": { - "short_name": "NetworkServices::Client", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" - }, - "method": { - "short_name": "GetGatewayRouteView", - "full_name": "google.cloud.networkservices.v1.NetworkServices.GetGatewayRouteView", - "service": { - "short_name": "NetworkServices", - "full_name": "google.cloud.networkservices.v1.NetworkServices" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "networkservices_v1_generated_NetworkServices_GetMeshRouteView_sync", - "title": "Snippet for the get_mesh_route_view call in the NetworkServices service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#get_mesh_route_view.", - "file": "network_services/get_mesh_route_view.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_mesh_route_view", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#get_mesh_route_view", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::NetworkServices::V1::GetMeshRouteViewRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::NetworkServices::V1::MeshRouteView", - "client": { - "short_name": "NetworkServices::Client", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" - }, - "method": { - "short_name": "GetMeshRouteView", - "full_name": "google.cloud.networkservices.v1.NetworkServices.GetMeshRouteView", - "service": { - "short_name": "NetworkServices", - "full_name": "google.cloud.networkservices.v1.NetworkServices" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "networkservices_v1_generated_NetworkServices_ListGatewayRouteViews_sync", - "title": "Snippet for the list_gateway_route_views call in the NetworkServices service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#list_gateway_route_views.", - "file": "network_services/list_gateway_route_views.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_gateway_route_views", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#list_gateway_route_views", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::NetworkServices::V1::ListGatewayRouteViewsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::NetworkServices::V1::ListGatewayRouteViewsResponse", - "client": { - "short_name": "NetworkServices::Client", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" - }, - "method": { - "short_name": "ListGatewayRouteViews", - "full_name": "google.cloud.networkservices.v1.NetworkServices.ListGatewayRouteViews", - "service": { - "short_name": "NetworkServices", - "full_name": "google.cloud.networkservices.v1.NetworkServices" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "networkservices_v1_generated_NetworkServices_ListMeshRouteViews_sync", - "title": "Snippet for the list_mesh_route_views call in the NetworkServices service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#list_mesh_route_views.", - "file": "network_services/list_mesh_route_views.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_mesh_route_views", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#list_mesh_route_views", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::NetworkServices::V1::ListMeshRouteViewsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::NetworkServices::V1::ListMeshRouteViewsResponse", - "client": { - "short_name": "NetworkServices::Client", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" - }, - "method": { - "short_name": "ListMeshRouteViews", - "full_name": "google.cloud.networkservices.v1.NetworkServices.ListMeshRouteViews", - "service": { - "short_name": "NetworkServices", - "full_name": "google.cloud.networkservices.v1.NetworkServices" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "networkservices_v1_generated_NetworkServices_ListAgentGateways_sync", - "title": "Snippet for the list_agent_gateways call in the NetworkServices service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#list_agent_gateways.", - "file": "network_services/list_agent_gateways.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_agent_gateways", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#list_agent_gateways", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::NetworkServices::V1::ListAgentGatewaysRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::NetworkServices::V1::ListAgentGatewaysResponse", - "client": { - "short_name": "NetworkServices::Client", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" - }, - "method": { - "short_name": "ListAgentGateways", - "full_name": "google.cloud.networkservices.v1.NetworkServices.ListAgentGateways", - "service": { - "short_name": "NetworkServices", - "full_name": "google.cloud.networkservices.v1.NetworkServices" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "networkservices_v1_generated_NetworkServices_GetAgentGateway_sync", - "title": "Snippet for the get_agent_gateway call in the NetworkServices service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#get_agent_gateway.", - "file": "network_services/get_agent_gateway.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_agent_gateway", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#get_agent_gateway", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::NetworkServices::V1::GetAgentGatewayRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::NetworkServices::V1::AgentGateway", - "client": { - "short_name": "NetworkServices::Client", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" - }, - "method": { - "short_name": "GetAgentGateway", - "full_name": "google.cloud.networkservices.v1.NetworkServices.GetAgentGateway", - "service": { - "short_name": "NetworkServices", - "full_name": "google.cloud.networkservices.v1.NetworkServices" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "networkservices_v1_generated_NetworkServices_CreateAgentGateway_sync", - "title": "Snippet for the create_agent_gateway call in the NetworkServices service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#create_agent_gateway.", - "file": "network_services/create_agent_gateway.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_agent_gateway", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#create_agent_gateway", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::NetworkServices::V1::CreateAgentGatewayRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "NetworkServices::Client", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" - }, - "method": { - "short_name": "CreateAgentGateway", - "full_name": "google.cloud.networkservices.v1.NetworkServices.CreateAgentGateway", - "service": { - "short_name": "NetworkServices", - "full_name": "google.cloud.networkservices.v1.NetworkServices" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "networkservices_v1_generated_NetworkServices_UpdateAgentGateway_sync", - "title": "Snippet for the update_agent_gateway call in the NetworkServices service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#update_agent_gateway.", - "file": "network_services/update_agent_gateway.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_agent_gateway", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#update_agent_gateway", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::NetworkServices::V1::UpdateAgentGatewayRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "NetworkServices::Client", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" - }, - "method": { - "short_name": "UpdateAgentGateway", - "full_name": "google.cloud.networkservices.v1.NetworkServices.UpdateAgentGateway", - "service": { - "short_name": "NetworkServices", - "full_name": "google.cloud.networkservices.v1.NetworkServices" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "networkservices_v1_generated_NetworkServices_DeleteAgentGateway_sync", - "title": "Snippet for the delete_agent_gateway call in the NetworkServices service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#delete_agent_gateway.", - "file": "network_services/delete_agent_gateway.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_agent_gateway", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#delete_agent_gateway", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::NetworkServices::V1::DeleteAgentGatewayRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "NetworkServices::Client", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" - }, - "method": { - "short_name": "DeleteAgentGateway", - "full_name": "google.cloud.networkservices.v1.NetworkServices.DeleteAgentGateway", - "service": { - "short_name": "NetworkServices", - "full_name": "google.cloud.networkservices.v1.NetworkServices" - } - } - }, - "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_services-v1/test/google/cloud/network_services/v1/dep_service_operations_test.rb b/owl-bot-staging/google-cloud-network_services-v1/test/google/cloud/network_services/v1/dep_service_operations_test.rb deleted file mode 100644 index f1aaa10889bb..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/test/google/cloud/network_services/v1/dep_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/networkservices/v1/dep_pb" -require "google/cloud/networkservices/v1/dep_services_pb" -require "google/cloud/network_services/v1/dep_service" - -class ::Google::Cloud::NetworkServices::V1::DepService::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 - c = ::Google::Cloud::NetworkServices::V1::DepService::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.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 - c.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 - c.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 - c.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 - c.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 - c = ::Google::Cloud::NetworkServices::V1::DepService::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.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 - c.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 - c.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 - c.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 - c.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 - c = ::Google::Cloud::NetworkServices::V1::DepService::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_operation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.delete_operation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.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 - c.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 - c.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 - c = ::Google::Cloud::NetworkServices::V1::DepService::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.cancel_operation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.cancel_operation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.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 - c.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 - c.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 - c = ::Google::Cloud::NetworkServices::V1::DepService::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.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 - c.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 - c.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 - c.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 - c.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::NetworkServices::V1::DepService::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::NetworkServices::V1::DepService::Operations::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-network_services-v1/test/google/cloud/network_services/v1/dep_service_paths_test.rb b/owl-bot-staging/google-cloud-network_services-v1/test/google/cloud/network_services/v1/dep_service_paths_test.rb deleted file mode 100644 index b6507d7a4dde..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/test/google/cloud/network_services/v1/dep_service_paths_test.rb +++ /dev/null @@ -1,103 +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_services/v1/dep_service" - -class ::Google::Cloud::NetworkServices::V1::DepService::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_authz_extension_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::NetworkServices::V1::DepService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.authz_extension_path project: "value0", location: "value1", authz_extension: "value2" - assert_equal "projects/value0/locations/value1/authzExtensions/value2", path - end - end - - def test_lb_edge_extension_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::NetworkServices::V1::DepService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.lb_edge_extension_path project: "value0", location: "value1", lb_edge_extension: "value2" - assert_equal "projects/value0/locations/value1/lbEdgeExtensions/value2", path - end - end - - def test_lb_route_extension_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::NetworkServices::V1::DepService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.lb_route_extension_path project: "value0", location: "value1", lb_route_extension: "value2" - assert_equal "projects/value0/locations/value1/lbRouteExtensions/value2", path - end - end - - def test_lb_traffic_extension_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::NetworkServices::V1::DepService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.lb_traffic_extension_path project: "value0", location: "value1", lb_traffic_extension: "value2" - assert_equal "projects/value0/locations/value1/lbTrafficExtensions/value2", path - end - end - - def test_location_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::NetworkServices::V1::DepService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.location_path project: "value0", location: "value1" - assert_equal "projects/value0/locations/value1", path - end - end -end diff --git a/owl-bot-staging/google-cloud-network_services-v1/test/google/cloud/network_services/v1/dep_service_rest_test.rb b/owl-bot-staging/google-cloud-network_services-v1/test/google/cloud/network_services/v1/dep_service_rest_test.rb deleted file mode 100644 index 27a8ff9ba8ea..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/test/google/cloud/network_services/v1/dep_service_rest_test.rb +++ /dev/null @@ -1,1219 +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/networkservices/v1/dep_pb" -require "google/cloud/network_services/v1/dep_service/rest" - - -class ::Google::Cloud::NetworkServices::V1::DepService::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_lb_traffic_extensions - # Create test objects. - client_result = ::Google::Cloud::NetworkServices::V1::ListLbTrafficExtensionsResponse.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_lb_traffic_extensions_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::NetworkServices::V1::DepService::Rest::ServiceStub.stub :transcode_list_lb_traffic_extensions_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_lb_traffic_extensions_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::DepService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_lb_traffic_extensions({ 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 - c.list_lb_traffic_extensions 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 - c.list_lb_traffic_extensions ::Google::Cloud::NetworkServices::V1::ListLbTrafficExtensionsRequest.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 - c.list_lb_traffic_extensions({ 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 - c.list_lb_traffic_extensions(::Google::Cloud::NetworkServices::V1::ListLbTrafficExtensionsRequest.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_lb_traffic_extensions_client_stub.call_count - end - end - end - - def test_get_lb_traffic_extension - # Create test objects. - client_result = ::Google::Cloud::NetworkServices::V1::LbTrafficExtension.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_lb_traffic_extension_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::NetworkServices::V1::DepService::Rest::ServiceStub.stub :transcode_get_lb_traffic_extension_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_lb_traffic_extension_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::DepService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_lb_traffic_extension({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_lb_traffic_extension name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_lb_traffic_extension ::Google::Cloud::NetworkServices::V1::GetLbTrafficExtensionRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_lb_traffic_extension({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_lb_traffic_extension(::Google::Cloud::NetworkServices::V1::GetLbTrafficExtensionRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_lb_traffic_extension_client_stub.call_count - end - end - end - - def test_create_lb_traffic_extension - # 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" - lb_traffic_extension_id = "hello world" - lb_traffic_extension = {} - request_id = "hello world" - - create_lb_traffic_extension_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::NetworkServices::V1::DepService::Rest::ServiceStub.stub :transcode_create_lb_traffic_extension_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_lb_traffic_extension_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::DepService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.create_lb_traffic_extension({ parent: parent, lb_traffic_extension_id: lb_traffic_extension_id, lb_traffic_extension: lb_traffic_extension, request_id: request_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.create_lb_traffic_extension parent: parent, lb_traffic_extension_id: lb_traffic_extension_id, lb_traffic_extension: lb_traffic_extension, request_id: request_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.create_lb_traffic_extension ::Google::Cloud::NetworkServices::V1::CreateLbTrafficExtensionRequest.new(parent: parent, lb_traffic_extension_id: lb_traffic_extension_id, lb_traffic_extension: lb_traffic_extension, request_id: request_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.create_lb_traffic_extension({ parent: parent, lb_traffic_extension_id: lb_traffic_extension_id, lb_traffic_extension: lb_traffic_extension, request_id: request_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.create_lb_traffic_extension(::Google::Cloud::NetworkServices::V1::CreateLbTrafficExtensionRequest.new(parent: parent, lb_traffic_extension_id: lb_traffic_extension_id, lb_traffic_extension: lb_traffic_extension, request_id: request_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_lb_traffic_extension_client_stub.call_count - end - end - end - - def test_update_lb_traffic_extension - # 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 = {} - lb_traffic_extension = {} - request_id = "hello world" - - update_lb_traffic_extension_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::NetworkServices::V1::DepService::Rest::ServiceStub.stub :transcode_update_lb_traffic_extension_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_lb_traffic_extension_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::DepService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_lb_traffic_extension({ update_mask: update_mask, lb_traffic_extension: lb_traffic_extension, request_id: request_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_lb_traffic_extension update_mask: update_mask, lb_traffic_extension: lb_traffic_extension, request_id: request_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_lb_traffic_extension ::Google::Cloud::NetworkServices::V1::UpdateLbTrafficExtensionRequest.new(update_mask: update_mask, lb_traffic_extension: lb_traffic_extension, request_id: request_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_lb_traffic_extension({ update_mask: update_mask, lb_traffic_extension: lb_traffic_extension, request_id: request_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_lb_traffic_extension(::Google::Cloud::NetworkServices::V1::UpdateLbTrafficExtensionRequest.new(update_mask: update_mask, lb_traffic_extension: lb_traffic_extension, request_id: request_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_lb_traffic_extension_client_stub.call_count - end - end - end - - def test_delete_lb_traffic_extension - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - request_id = "hello world" - - delete_lb_traffic_extension_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::NetworkServices::V1::DepService::Rest::ServiceStub.stub :transcode_delete_lb_traffic_extension_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_lb_traffic_extension_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::DepService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_lb_traffic_extension({ name: name, request_id: request_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_lb_traffic_extension name: name, request_id: request_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.delete_lb_traffic_extension ::Google::Cloud::NetworkServices::V1::DeleteLbTrafficExtensionRequest.new(name: name, request_id: request_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.delete_lb_traffic_extension({ name: name, request_id: request_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.delete_lb_traffic_extension(::Google::Cloud::NetworkServices::V1::DeleteLbTrafficExtensionRequest.new(name: name, request_id: request_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_lb_traffic_extension_client_stub.call_count - end - end - end - - def test_list_lb_route_extensions - # Create test objects. - client_result = ::Google::Cloud::NetworkServices::V1::ListLbRouteExtensionsResponse.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_lb_route_extensions_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::NetworkServices::V1::DepService::Rest::ServiceStub.stub :transcode_list_lb_route_extensions_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_lb_route_extensions_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::DepService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_lb_route_extensions({ 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 - c.list_lb_route_extensions 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 - c.list_lb_route_extensions ::Google::Cloud::NetworkServices::V1::ListLbRouteExtensionsRequest.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 - c.list_lb_route_extensions({ 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 - c.list_lb_route_extensions(::Google::Cloud::NetworkServices::V1::ListLbRouteExtensionsRequest.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_lb_route_extensions_client_stub.call_count - end - end - end - - def test_get_lb_route_extension - # Create test objects. - client_result = ::Google::Cloud::NetworkServices::V1::LbRouteExtension.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_lb_route_extension_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::NetworkServices::V1::DepService::Rest::ServiceStub.stub :transcode_get_lb_route_extension_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_lb_route_extension_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::DepService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_lb_route_extension({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_lb_route_extension name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_lb_route_extension ::Google::Cloud::NetworkServices::V1::GetLbRouteExtensionRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_lb_route_extension({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_lb_route_extension(::Google::Cloud::NetworkServices::V1::GetLbRouteExtensionRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_lb_route_extension_client_stub.call_count - end - end - end - - def test_create_lb_route_extension - # 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" - lb_route_extension_id = "hello world" - lb_route_extension = {} - request_id = "hello world" - - create_lb_route_extension_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::NetworkServices::V1::DepService::Rest::ServiceStub.stub :transcode_create_lb_route_extension_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_lb_route_extension_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::DepService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.create_lb_route_extension({ parent: parent, lb_route_extension_id: lb_route_extension_id, lb_route_extension: lb_route_extension, request_id: request_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.create_lb_route_extension parent: parent, lb_route_extension_id: lb_route_extension_id, lb_route_extension: lb_route_extension, request_id: request_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.create_lb_route_extension ::Google::Cloud::NetworkServices::V1::CreateLbRouteExtensionRequest.new(parent: parent, lb_route_extension_id: lb_route_extension_id, lb_route_extension: lb_route_extension, request_id: request_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.create_lb_route_extension({ parent: parent, lb_route_extension_id: lb_route_extension_id, lb_route_extension: lb_route_extension, request_id: request_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.create_lb_route_extension(::Google::Cloud::NetworkServices::V1::CreateLbRouteExtensionRequest.new(parent: parent, lb_route_extension_id: lb_route_extension_id, lb_route_extension: lb_route_extension, request_id: request_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_lb_route_extension_client_stub.call_count - end - end - end - - def test_update_lb_route_extension - # 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 = {} - lb_route_extension = {} - request_id = "hello world" - - update_lb_route_extension_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::NetworkServices::V1::DepService::Rest::ServiceStub.stub :transcode_update_lb_route_extension_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_lb_route_extension_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::DepService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_lb_route_extension({ update_mask: update_mask, lb_route_extension: lb_route_extension, request_id: request_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_lb_route_extension update_mask: update_mask, lb_route_extension: lb_route_extension, request_id: request_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_lb_route_extension ::Google::Cloud::NetworkServices::V1::UpdateLbRouteExtensionRequest.new(update_mask: update_mask, lb_route_extension: lb_route_extension, request_id: request_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_lb_route_extension({ update_mask: update_mask, lb_route_extension: lb_route_extension, request_id: request_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_lb_route_extension(::Google::Cloud::NetworkServices::V1::UpdateLbRouteExtensionRequest.new(update_mask: update_mask, lb_route_extension: lb_route_extension, request_id: request_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_lb_route_extension_client_stub.call_count - end - end - end - - def test_delete_lb_route_extension - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - request_id = "hello world" - - delete_lb_route_extension_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::NetworkServices::V1::DepService::Rest::ServiceStub.stub :transcode_delete_lb_route_extension_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_lb_route_extension_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::DepService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_lb_route_extension({ name: name, request_id: request_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_lb_route_extension name: name, request_id: request_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.delete_lb_route_extension ::Google::Cloud::NetworkServices::V1::DeleteLbRouteExtensionRequest.new(name: name, request_id: request_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.delete_lb_route_extension({ name: name, request_id: request_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.delete_lb_route_extension(::Google::Cloud::NetworkServices::V1::DeleteLbRouteExtensionRequest.new(name: name, request_id: request_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_lb_route_extension_client_stub.call_count - end - end - end - - def test_list_lb_edge_extensions - # Create test objects. - client_result = ::Google::Cloud::NetworkServices::V1::ListLbEdgeExtensionsResponse.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_lb_edge_extensions_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::NetworkServices::V1::DepService::Rest::ServiceStub.stub :transcode_list_lb_edge_extensions_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_lb_edge_extensions_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::DepService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_lb_edge_extensions({ 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 - c.list_lb_edge_extensions 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 - c.list_lb_edge_extensions ::Google::Cloud::NetworkServices::V1::ListLbEdgeExtensionsRequest.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 - c.list_lb_edge_extensions({ 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 - c.list_lb_edge_extensions(::Google::Cloud::NetworkServices::V1::ListLbEdgeExtensionsRequest.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_lb_edge_extensions_client_stub.call_count - end - end - end - - def test_get_lb_edge_extension - # Create test objects. - client_result = ::Google::Cloud::NetworkServices::V1::LbEdgeExtension.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_lb_edge_extension_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::NetworkServices::V1::DepService::Rest::ServiceStub.stub :transcode_get_lb_edge_extension_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_lb_edge_extension_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::DepService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_lb_edge_extension({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_lb_edge_extension name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_lb_edge_extension ::Google::Cloud::NetworkServices::V1::GetLbEdgeExtensionRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_lb_edge_extension({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_lb_edge_extension(::Google::Cloud::NetworkServices::V1::GetLbEdgeExtensionRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_lb_edge_extension_client_stub.call_count - end - end - end - - def test_create_lb_edge_extension - # 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" - lb_edge_extension_id = "hello world" - lb_edge_extension = {} - request_id = "hello world" - - create_lb_edge_extension_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::NetworkServices::V1::DepService::Rest::ServiceStub.stub :transcode_create_lb_edge_extension_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_lb_edge_extension_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::DepService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.create_lb_edge_extension({ parent: parent, lb_edge_extension_id: lb_edge_extension_id, lb_edge_extension: lb_edge_extension, request_id: request_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.create_lb_edge_extension parent: parent, lb_edge_extension_id: lb_edge_extension_id, lb_edge_extension: lb_edge_extension, request_id: request_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.create_lb_edge_extension ::Google::Cloud::NetworkServices::V1::CreateLbEdgeExtensionRequest.new(parent: parent, lb_edge_extension_id: lb_edge_extension_id, lb_edge_extension: lb_edge_extension, request_id: request_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.create_lb_edge_extension({ parent: parent, lb_edge_extension_id: lb_edge_extension_id, lb_edge_extension: lb_edge_extension, request_id: request_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.create_lb_edge_extension(::Google::Cloud::NetworkServices::V1::CreateLbEdgeExtensionRequest.new(parent: parent, lb_edge_extension_id: lb_edge_extension_id, lb_edge_extension: lb_edge_extension, request_id: request_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_lb_edge_extension_client_stub.call_count - end - end - end - - def test_update_lb_edge_extension - # 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 = {} - lb_edge_extension = {} - request_id = "hello world" - - update_lb_edge_extension_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::NetworkServices::V1::DepService::Rest::ServiceStub.stub :transcode_update_lb_edge_extension_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_lb_edge_extension_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::DepService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_lb_edge_extension({ update_mask: update_mask, lb_edge_extension: lb_edge_extension, request_id: request_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_lb_edge_extension update_mask: update_mask, lb_edge_extension: lb_edge_extension, request_id: request_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_lb_edge_extension ::Google::Cloud::NetworkServices::V1::UpdateLbEdgeExtensionRequest.new(update_mask: update_mask, lb_edge_extension: lb_edge_extension, request_id: request_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_lb_edge_extension({ update_mask: update_mask, lb_edge_extension: lb_edge_extension, request_id: request_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_lb_edge_extension(::Google::Cloud::NetworkServices::V1::UpdateLbEdgeExtensionRequest.new(update_mask: update_mask, lb_edge_extension: lb_edge_extension, request_id: request_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_lb_edge_extension_client_stub.call_count - end - end - end - - def test_delete_lb_edge_extension - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - request_id = "hello world" - - delete_lb_edge_extension_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::NetworkServices::V1::DepService::Rest::ServiceStub.stub :transcode_delete_lb_edge_extension_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_lb_edge_extension_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::DepService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_lb_edge_extension({ name: name, request_id: request_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_lb_edge_extension name: name, request_id: request_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.delete_lb_edge_extension ::Google::Cloud::NetworkServices::V1::DeleteLbEdgeExtensionRequest.new(name: name, request_id: request_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.delete_lb_edge_extension({ name: name, request_id: request_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.delete_lb_edge_extension(::Google::Cloud::NetworkServices::V1::DeleteLbEdgeExtensionRequest.new(name: name, request_id: request_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_lb_edge_extension_client_stub.call_count - end - end - end - - def test_list_authz_extensions - # Create test objects. - client_result = ::Google::Cloud::NetworkServices::V1::ListAuthzExtensionsResponse.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_authz_extensions_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::NetworkServices::V1::DepService::Rest::ServiceStub.stub :transcode_list_authz_extensions_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_authz_extensions_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::DepService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_authz_extensions({ 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 - c.list_authz_extensions 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 - c.list_authz_extensions ::Google::Cloud::NetworkServices::V1::ListAuthzExtensionsRequest.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 - c.list_authz_extensions({ 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 - c.list_authz_extensions(::Google::Cloud::NetworkServices::V1::ListAuthzExtensionsRequest.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_authz_extensions_client_stub.call_count - end - end - end - - def test_get_authz_extension - # Create test objects. - client_result = ::Google::Cloud::NetworkServices::V1::AuthzExtension.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_authz_extension_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::NetworkServices::V1::DepService::Rest::ServiceStub.stub :transcode_get_authz_extension_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_authz_extension_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::DepService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_authz_extension({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_authz_extension name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_authz_extension ::Google::Cloud::NetworkServices::V1::GetAuthzExtensionRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_authz_extension({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_authz_extension(::Google::Cloud::NetworkServices::V1::GetAuthzExtensionRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_authz_extension_client_stub.call_count - end - end - end - - def test_create_authz_extension - # 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" - authz_extension_id = "hello world" - authz_extension = {} - request_id = "hello world" - - create_authz_extension_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::NetworkServices::V1::DepService::Rest::ServiceStub.stub :transcode_create_authz_extension_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_authz_extension_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::DepService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.create_authz_extension({ parent: parent, authz_extension_id: authz_extension_id, authz_extension: authz_extension, request_id: request_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.create_authz_extension parent: parent, authz_extension_id: authz_extension_id, authz_extension: authz_extension, request_id: request_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.create_authz_extension ::Google::Cloud::NetworkServices::V1::CreateAuthzExtensionRequest.new(parent: parent, authz_extension_id: authz_extension_id, authz_extension: authz_extension, request_id: request_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.create_authz_extension({ parent: parent, authz_extension_id: authz_extension_id, authz_extension: authz_extension, request_id: request_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.create_authz_extension(::Google::Cloud::NetworkServices::V1::CreateAuthzExtensionRequest.new(parent: parent, authz_extension_id: authz_extension_id, authz_extension: authz_extension, request_id: request_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_authz_extension_client_stub.call_count - end - end - end - - def test_update_authz_extension - # 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 = {} - authz_extension = {} - request_id = "hello world" - - update_authz_extension_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::NetworkServices::V1::DepService::Rest::ServiceStub.stub :transcode_update_authz_extension_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_authz_extension_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::DepService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_authz_extension({ update_mask: update_mask, authz_extension: authz_extension, request_id: request_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_authz_extension update_mask: update_mask, authz_extension: authz_extension, request_id: request_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_authz_extension ::Google::Cloud::NetworkServices::V1::UpdateAuthzExtensionRequest.new(update_mask: update_mask, authz_extension: authz_extension, request_id: request_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_authz_extension({ update_mask: update_mask, authz_extension: authz_extension, request_id: request_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_authz_extension(::Google::Cloud::NetworkServices::V1::UpdateAuthzExtensionRequest.new(update_mask: update_mask, authz_extension: authz_extension, request_id: request_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_authz_extension_client_stub.call_count - end - end - end - - def test_delete_authz_extension - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - request_id = "hello world" - - delete_authz_extension_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::NetworkServices::V1::DepService::Rest::ServiceStub.stub :transcode_delete_authz_extension_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_authz_extension_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::DepService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_authz_extension({ name: name, request_id: request_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_authz_extension name: name, request_id: request_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.delete_authz_extension ::Google::Cloud::NetworkServices::V1::DeleteAuthzExtensionRequest.new(name: name, request_id: request_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.delete_authz_extension({ name: name, request_id: request_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.delete_authz_extension(::Google::Cloud::NetworkServices::V1::DeleteAuthzExtensionRequest.new(name: name, request_id: request_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_authz_extension_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::NetworkServices::V1::DepService::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::NetworkServices::V1::DepService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-network_services-v1/test/google/cloud/network_services/v1/dep_service_test.rb b/owl-bot-staging/google-cloud-network_services-v1/test/google/cloud/network_services/v1/dep_service_test.rb deleted file mode 100644 index ad6741a96c49..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/test/google/cloud/network_services/v1/dep_service_test.rb +++ /dev/null @@ -1,1438 +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/networkservices/v1/dep_pb" -require "google/cloud/network_services/v1/dep_service" - -class ::Google::Cloud::NetworkServices::V1::DepService::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_lb_traffic_extensions - # Create GRPC objects. - grpc_response = ::Google::Cloud::NetworkServices::V1::ListLbTrafficExtensionsResponse.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_lb_traffic_extensions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_lb_traffic_extensions, name - assert_kind_of ::Google::Cloud::NetworkServices::V1::ListLbTrafficExtensionsRequest, 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_lb_traffic_extensions_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::DepService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_lb_traffic_extensions({ 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 - c.list_lb_traffic_extensions 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 - c.list_lb_traffic_extensions ::Google::Cloud::NetworkServices::V1::ListLbTrafficExtensionsRequest.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 - c.list_lb_traffic_extensions({ 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 - c.list_lb_traffic_extensions(::Google::Cloud::NetworkServices::V1::ListLbTrafficExtensionsRequest.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_lb_traffic_extensions_client_stub.call_rpc_count - end - end - - def test_get_lb_traffic_extension - # Create GRPC objects. - grpc_response = ::Google::Cloud::NetworkServices::V1::LbTrafficExtension.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_lb_traffic_extension_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_lb_traffic_extension, name - assert_kind_of ::Google::Cloud::NetworkServices::V1::GetLbTrafficExtensionRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_lb_traffic_extension_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::DepService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_lb_traffic_extension({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_lb_traffic_extension name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_lb_traffic_extension ::Google::Cloud::NetworkServices::V1::GetLbTrafficExtensionRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_lb_traffic_extension({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_lb_traffic_extension(::Google::Cloud::NetworkServices::V1::GetLbTrafficExtensionRequest.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_lb_traffic_extension_client_stub.call_rpc_count - end - end - - def test_create_lb_traffic_extension - # 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" - lb_traffic_extension_id = "hello world" - lb_traffic_extension = {} - request_id = "hello world" - - create_lb_traffic_extension_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_lb_traffic_extension, name - assert_kind_of ::Google::Cloud::NetworkServices::V1::CreateLbTrafficExtensionRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["lb_traffic_extension_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::NetworkServices::V1::LbTrafficExtension), request["lb_traffic_extension"] - assert_equal "hello world", request["request_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_lb_traffic_extension_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::DepService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.create_lb_traffic_extension({ parent: parent, lb_traffic_extension_id: lb_traffic_extension_id, lb_traffic_extension: lb_traffic_extension, request_id: request_id }) 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 - c.create_lb_traffic_extension parent: parent, lb_traffic_extension_id: lb_traffic_extension_id, lb_traffic_extension: lb_traffic_extension, request_id: request_id 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 - c.create_lb_traffic_extension ::Google::Cloud::NetworkServices::V1::CreateLbTrafficExtensionRequest.new(parent: parent, lb_traffic_extension_id: lb_traffic_extension_id, lb_traffic_extension: lb_traffic_extension, request_id: request_id) 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 - c.create_lb_traffic_extension({ parent: parent, lb_traffic_extension_id: lb_traffic_extension_id, lb_traffic_extension: lb_traffic_extension, request_id: request_id }, 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 - c.create_lb_traffic_extension(::Google::Cloud::NetworkServices::V1::CreateLbTrafficExtensionRequest.new(parent: parent, lb_traffic_extension_id: lb_traffic_extension_id, lb_traffic_extension: lb_traffic_extension, request_id: request_id), 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_lb_traffic_extension_client_stub.call_rpc_count - end - end - - def test_update_lb_traffic_extension - # 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 = {} - lb_traffic_extension = {} - request_id = "hello world" - - update_lb_traffic_extension_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_lb_traffic_extension, name - assert_kind_of ::Google::Cloud::NetworkServices::V1::UpdateLbTrafficExtensionRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::NetworkServices::V1::LbTrafficExtension), request["lb_traffic_extension"] - assert_equal "hello world", request["request_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_lb_traffic_extension_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::DepService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_lb_traffic_extension({ update_mask: update_mask, lb_traffic_extension: lb_traffic_extension, request_id: request_id }) 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 - c.update_lb_traffic_extension update_mask: update_mask, lb_traffic_extension: lb_traffic_extension, request_id: request_id 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 - c.update_lb_traffic_extension ::Google::Cloud::NetworkServices::V1::UpdateLbTrafficExtensionRequest.new(update_mask: update_mask, lb_traffic_extension: lb_traffic_extension, request_id: request_id) 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 - c.update_lb_traffic_extension({ update_mask: update_mask, lb_traffic_extension: lb_traffic_extension, request_id: request_id }, 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 - c.update_lb_traffic_extension(::Google::Cloud::NetworkServices::V1::UpdateLbTrafficExtensionRequest.new(update_mask: update_mask, lb_traffic_extension: lb_traffic_extension, request_id: request_id), 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_lb_traffic_extension_client_stub.call_rpc_count - end - end - - def test_delete_lb_traffic_extension - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - request_id = "hello world" - - delete_lb_traffic_extension_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_lb_traffic_extension, name - assert_kind_of ::Google::Cloud::NetworkServices::V1::DeleteLbTrafficExtensionRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["request_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_lb_traffic_extension_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::DepService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_lb_traffic_extension({ name: name, request_id: request_id }) 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 - c.delete_lb_traffic_extension name: name, request_id: request_id 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 - c.delete_lb_traffic_extension ::Google::Cloud::NetworkServices::V1::DeleteLbTrafficExtensionRequest.new(name: name, request_id: request_id) 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 - c.delete_lb_traffic_extension({ name: name, request_id: request_id }, 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 - c.delete_lb_traffic_extension(::Google::Cloud::NetworkServices::V1::DeleteLbTrafficExtensionRequest.new(name: name, request_id: request_id), 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_lb_traffic_extension_client_stub.call_rpc_count - end - end - - def test_list_lb_route_extensions - # Create GRPC objects. - grpc_response = ::Google::Cloud::NetworkServices::V1::ListLbRouteExtensionsResponse.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_lb_route_extensions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_lb_route_extensions, name - assert_kind_of ::Google::Cloud::NetworkServices::V1::ListLbRouteExtensionsRequest, 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_lb_route_extensions_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::DepService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_lb_route_extensions({ 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 - c.list_lb_route_extensions 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 - c.list_lb_route_extensions ::Google::Cloud::NetworkServices::V1::ListLbRouteExtensionsRequest.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 - c.list_lb_route_extensions({ 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 - c.list_lb_route_extensions(::Google::Cloud::NetworkServices::V1::ListLbRouteExtensionsRequest.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_lb_route_extensions_client_stub.call_rpc_count - end - end - - def test_get_lb_route_extension - # Create GRPC objects. - grpc_response = ::Google::Cloud::NetworkServices::V1::LbRouteExtension.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_lb_route_extension_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_lb_route_extension, name - assert_kind_of ::Google::Cloud::NetworkServices::V1::GetLbRouteExtensionRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_lb_route_extension_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::DepService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_lb_route_extension({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_lb_route_extension name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_lb_route_extension ::Google::Cloud::NetworkServices::V1::GetLbRouteExtensionRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_lb_route_extension({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_lb_route_extension(::Google::Cloud::NetworkServices::V1::GetLbRouteExtensionRequest.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_lb_route_extension_client_stub.call_rpc_count - end - end - - def test_create_lb_route_extension - # 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" - lb_route_extension_id = "hello world" - lb_route_extension = {} - request_id = "hello world" - - create_lb_route_extension_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_lb_route_extension, name - assert_kind_of ::Google::Cloud::NetworkServices::V1::CreateLbRouteExtensionRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["lb_route_extension_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::NetworkServices::V1::LbRouteExtension), request["lb_route_extension"] - assert_equal "hello world", request["request_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_lb_route_extension_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::DepService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.create_lb_route_extension({ parent: parent, lb_route_extension_id: lb_route_extension_id, lb_route_extension: lb_route_extension, request_id: request_id }) 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 - c.create_lb_route_extension parent: parent, lb_route_extension_id: lb_route_extension_id, lb_route_extension: lb_route_extension, request_id: request_id 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 - c.create_lb_route_extension ::Google::Cloud::NetworkServices::V1::CreateLbRouteExtensionRequest.new(parent: parent, lb_route_extension_id: lb_route_extension_id, lb_route_extension: lb_route_extension, request_id: request_id) 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 - c.create_lb_route_extension({ parent: parent, lb_route_extension_id: lb_route_extension_id, lb_route_extension: lb_route_extension, request_id: request_id }, 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 - c.create_lb_route_extension(::Google::Cloud::NetworkServices::V1::CreateLbRouteExtensionRequest.new(parent: parent, lb_route_extension_id: lb_route_extension_id, lb_route_extension: lb_route_extension, request_id: request_id), 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_lb_route_extension_client_stub.call_rpc_count - end - end - - def test_update_lb_route_extension - # 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 = {} - lb_route_extension = {} - request_id = "hello world" - - update_lb_route_extension_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_lb_route_extension, name - assert_kind_of ::Google::Cloud::NetworkServices::V1::UpdateLbRouteExtensionRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::NetworkServices::V1::LbRouteExtension), request["lb_route_extension"] - assert_equal "hello world", request["request_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_lb_route_extension_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::DepService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_lb_route_extension({ update_mask: update_mask, lb_route_extension: lb_route_extension, request_id: request_id }) 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 - c.update_lb_route_extension update_mask: update_mask, lb_route_extension: lb_route_extension, request_id: request_id 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 - c.update_lb_route_extension ::Google::Cloud::NetworkServices::V1::UpdateLbRouteExtensionRequest.new(update_mask: update_mask, lb_route_extension: lb_route_extension, request_id: request_id) 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 - c.update_lb_route_extension({ update_mask: update_mask, lb_route_extension: lb_route_extension, request_id: request_id }, 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 - c.update_lb_route_extension(::Google::Cloud::NetworkServices::V1::UpdateLbRouteExtensionRequest.new(update_mask: update_mask, lb_route_extension: lb_route_extension, request_id: request_id), 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_lb_route_extension_client_stub.call_rpc_count - end - end - - def test_delete_lb_route_extension - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - request_id = "hello world" - - delete_lb_route_extension_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_lb_route_extension, name - assert_kind_of ::Google::Cloud::NetworkServices::V1::DeleteLbRouteExtensionRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["request_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_lb_route_extension_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::DepService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_lb_route_extension({ name: name, request_id: request_id }) 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 - c.delete_lb_route_extension name: name, request_id: request_id 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 - c.delete_lb_route_extension ::Google::Cloud::NetworkServices::V1::DeleteLbRouteExtensionRequest.new(name: name, request_id: request_id) 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 - c.delete_lb_route_extension({ name: name, request_id: request_id }, 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 - c.delete_lb_route_extension(::Google::Cloud::NetworkServices::V1::DeleteLbRouteExtensionRequest.new(name: name, request_id: request_id), 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_lb_route_extension_client_stub.call_rpc_count - end - end - - def test_list_lb_edge_extensions - # Create GRPC objects. - grpc_response = ::Google::Cloud::NetworkServices::V1::ListLbEdgeExtensionsResponse.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_lb_edge_extensions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_lb_edge_extensions, name - assert_kind_of ::Google::Cloud::NetworkServices::V1::ListLbEdgeExtensionsRequest, 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_lb_edge_extensions_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::DepService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_lb_edge_extensions({ 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 - c.list_lb_edge_extensions 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 - c.list_lb_edge_extensions ::Google::Cloud::NetworkServices::V1::ListLbEdgeExtensionsRequest.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 - c.list_lb_edge_extensions({ 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 - c.list_lb_edge_extensions(::Google::Cloud::NetworkServices::V1::ListLbEdgeExtensionsRequest.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_lb_edge_extensions_client_stub.call_rpc_count - end - end - - def test_get_lb_edge_extension - # Create GRPC objects. - grpc_response = ::Google::Cloud::NetworkServices::V1::LbEdgeExtension.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_lb_edge_extension_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_lb_edge_extension, name - assert_kind_of ::Google::Cloud::NetworkServices::V1::GetLbEdgeExtensionRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_lb_edge_extension_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::DepService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_lb_edge_extension({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_lb_edge_extension name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_lb_edge_extension ::Google::Cloud::NetworkServices::V1::GetLbEdgeExtensionRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_lb_edge_extension({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_lb_edge_extension(::Google::Cloud::NetworkServices::V1::GetLbEdgeExtensionRequest.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_lb_edge_extension_client_stub.call_rpc_count - end - end - - def test_create_lb_edge_extension - # 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" - lb_edge_extension_id = "hello world" - lb_edge_extension = {} - request_id = "hello world" - - create_lb_edge_extension_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_lb_edge_extension, name - assert_kind_of ::Google::Cloud::NetworkServices::V1::CreateLbEdgeExtensionRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["lb_edge_extension_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::NetworkServices::V1::LbEdgeExtension), request["lb_edge_extension"] - assert_equal "hello world", request["request_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_lb_edge_extension_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::DepService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.create_lb_edge_extension({ parent: parent, lb_edge_extension_id: lb_edge_extension_id, lb_edge_extension: lb_edge_extension, request_id: request_id }) 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 - c.create_lb_edge_extension parent: parent, lb_edge_extension_id: lb_edge_extension_id, lb_edge_extension: lb_edge_extension, request_id: request_id 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 - c.create_lb_edge_extension ::Google::Cloud::NetworkServices::V1::CreateLbEdgeExtensionRequest.new(parent: parent, lb_edge_extension_id: lb_edge_extension_id, lb_edge_extension: lb_edge_extension, request_id: request_id) 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 - c.create_lb_edge_extension({ parent: parent, lb_edge_extension_id: lb_edge_extension_id, lb_edge_extension: lb_edge_extension, request_id: request_id }, 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 - c.create_lb_edge_extension(::Google::Cloud::NetworkServices::V1::CreateLbEdgeExtensionRequest.new(parent: parent, lb_edge_extension_id: lb_edge_extension_id, lb_edge_extension: lb_edge_extension, request_id: request_id), 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_lb_edge_extension_client_stub.call_rpc_count - end - end - - def test_update_lb_edge_extension - # 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 = {} - lb_edge_extension = {} - request_id = "hello world" - - update_lb_edge_extension_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_lb_edge_extension, name - assert_kind_of ::Google::Cloud::NetworkServices::V1::UpdateLbEdgeExtensionRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::NetworkServices::V1::LbEdgeExtension), request["lb_edge_extension"] - assert_equal "hello world", request["request_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_lb_edge_extension_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::DepService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_lb_edge_extension({ update_mask: update_mask, lb_edge_extension: lb_edge_extension, request_id: request_id }) 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 - c.update_lb_edge_extension update_mask: update_mask, lb_edge_extension: lb_edge_extension, request_id: request_id 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 - c.update_lb_edge_extension ::Google::Cloud::NetworkServices::V1::UpdateLbEdgeExtensionRequest.new(update_mask: update_mask, lb_edge_extension: lb_edge_extension, request_id: request_id) 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 - c.update_lb_edge_extension({ update_mask: update_mask, lb_edge_extension: lb_edge_extension, request_id: request_id }, 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 - c.update_lb_edge_extension(::Google::Cloud::NetworkServices::V1::UpdateLbEdgeExtensionRequest.new(update_mask: update_mask, lb_edge_extension: lb_edge_extension, request_id: request_id), 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_lb_edge_extension_client_stub.call_rpc_count - end - end - - def test_delete_lb_edge_extension - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - request_id = "hello world" - - delete_lb_edge_extension_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_lb_edge_extension, name - assert_kind_of ::Google::Cloud::NetworkServices::V1::DeleteLbEdgeExtensionRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["request_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_lb_edge_extension_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::DepService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_lb_edge_extension({ name: name, request_id: request_id }) 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 - c.delete_lb_edge_extension name: name, request_id: request_id 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 - c.delete_lb_edge_extension ::Google::Cloud::NetworkServices::V1::DeleteLbEdgeExtensionRequest.new(name: name, request_id: request_id) 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 - c.delete_lb_edge_extension({ name: name, request_id: request_id }, 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 - c.delete_lb_edge_extension(::Google::Cloud::NetworkServices::V1::DeleteLbEdgeExtensionRequest.new(name: name, request_id: request_id), 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_lb_edge_extension_client_stub.call_rpc_count - end - end - - def test_list_authz_extensions - # Create GRPC objects. - grpc_response = ::Google::Cloud::NetworkServices::V1::ListAuthzExtensionsResponse.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_authz_extensions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_authz_extensions, name - assert_kind_of ::Google::Cloud::NetworkServices::V1::ListAuthzExtensionsRequest, 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_authz_extensions_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::DepService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_authz_extensions({ 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 - c.list_authz_extensions 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 - c.list_authz_extensions ::Google::Cloud::NetworkServices::V1::ListAuthzExtensionsRequest.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 - c.list_authz_extensions({ 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 - c.list_authz_extensions(::Google::Cloud::NetworkServices::V1::ListAuthzExtensionsRequest.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_authz_extensions_client_stub.call_rpc_count - end - end - - def test_get_authz_extension - # Create GRPC objects. - grpc_response = ::Google::Cloud::NetworkServices::V1::AuthzExtension.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_authz_extension_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_authz_extension, name - assert_kind_of ::Google::Cloud::NetworkServices::V1::GetAuthzExtensionRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_authz_extension_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::DepService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_authz_extension({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_authz_extension name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_authz_extension ::Google::Cloud::NetworkServices::V1::GetAuthzExtensionRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_authz_extension({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_authz_extension(::Google::Cloud::NetworkServices::V1::GetAuthzExtensionRequest.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_authz_extension_client_stub.call_rpc_count - end - end - - def test_create_authz_extension - # 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" - authz_extension_id = "hello world" - authz_extension = {} - request_id = "hello world" - - create_authz_extension_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_authz_extension, name - assert_kind_of ::Google::Cloud::NetworkServices::V1::CreateAuthzExtensionRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["authz_extension_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::NetworkServices::V1::AuthzExtension), request["authz_extension"] - assert_equal "hello world", request["request_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_authz_extension_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::DepService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.create_authz_extension({ parent: parent, authz_extension_id: authz_extension_id, authz_extension: authz_extension, request_id: request_id }) 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 - c.create_authz_extension parent: parent, authz_extension_id: authz_extension_id, authz_extension: authz_extension, request_id: request_id 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 - c.create_authz_extension ::Google::Cloud::NetworkServices::V1::CreateAuthzExtensionRequest.new(parent: parent, authz_extension_id: authz_extension_id, authz_extension: authz_extension, request_id: request_id) 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 - c.create_authz_extension({ parent: parent, authz_extension_id: authz_extension_id, authz_extension: authz_extension, request_id: request_id }, 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 - c.create_authz_extension(::Google::Cloud::NetworkServices::V1::CreateAuthzExtensionRequest.new(parent: parent, authz_extension_id: authz_extension_id, authz_extension: authz_extension, request_id: request_id), 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_authz_extension_client_stub.call_rpc_count - end - end - - def test_update_authz_extension - # 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 = {} - authz_extension = {} - request_id = "hello world" - - update_authz_extension_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_authz_extension, name - assert_kind_of ::Google::Cloud::NetworkServices::V1::UpdateAuthzExtensionRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::NetworkServices::V1::AuthzExtension), request["authz_extension"] - assert_equal "hello world", request["request_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_authz_extension_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::DepService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_authz_extension({ update_mask: update_mask, authz_extension: authz_extension, request_id: request_id }) 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 - c.update_authz_extension update_mask: update_mask, authz_extension: authz_extension, request_id: request_id 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 - c.update_authz_extension ::Google::Cloud::NetworkServices::V1::UpdateAuthzExtensionRequest.new(update_mask: update_mask, authz_extension: authz_extension, request_id: request_id) 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 - c.update_authz_extension({ update_mask: update_mask, authz_extension: authz_extension, request_id: request_id }, 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 - c.update_authz_extension(::Google::Cloud::NetworkServices::V1::UpdateAuthzExtensionRequest.new(update_mask: update_mask, authz_extension: authz_extension, request_id: request_id), 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_authz_extension_client_stub.call_rpc_count - end - end - - def test_delete_authz_extension - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - request_id = "hello world" - - delete_authz_extension_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_authz_extension, name - assert_kind_of ::Google::Cloud::NetworkServices::V1::DeleteAuthzExtensionRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["request_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_authz_extension_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::DepService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_authz_extension({ name: name, request_id: request_id }) 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 - c.delete_authz_extension name: name, request_id: request_id 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 - c.delete_authz_extension ::Google::Cloud::NetworkServices::V1::DeleteAuthzExtensionRequest.new(name: name, request_id: request_id) 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 - c.delete_authz_extension({ name: name, request_id: request_id }, 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 - c.delete_authz_extension(::Google::Cloud::NetworkServices::V1::DeleteAuthzExtensionRequest.new(name: name, request_id: request_id), 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_authz_extension_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::NetworkServices::V1::DepService::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::NetworkServices::V1::DepService::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::NetworkServices::V1::DepService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::NetworkServices::V1::DepService::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::NetworkServices::V1::DepService::Client.new do |config| - config.credentials = grpc_channel - end - end - - assert_kind_of ::Google::Cloud::NetworkServices::V1::DepService::Operations, client.operations_client - end -end diff --git a/owl-bot-staging/google-cloud-network_services-v1/test/google/cloud/network_services/v1/network_services_operations_test.rb b/owl-bot-staging/google-cloud-network_services-v1/test/google/cloud/network_services/v1/network_services_operations_test.rb deleted file mode 100644 index ae79f6f84a18..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/test/google/cloud/network_services/v1/network_services_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/networkservices/v1/network_services_pb" -require "google/cloud/networkservices/v1/network_services_services_pb" -require "google/cloud/network_services/v1/network_services" - -class ::Google::Cloud::NetworkServices::V1::NetworkServices::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 - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.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 - c.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 - c.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 - c.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 - c.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 - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.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 - c.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 - c.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 - c.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 - c.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 - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_operation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.delete_operation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.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 - c.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 - c.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 - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.cancel_operation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.cancel_operation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.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 - c.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 - c.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 - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.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 - c.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 - c.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 - c.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 - c.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::NetworkServices::V1::NetworkServices::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::NetworkServices::V1::NetworkServices::Operations::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-network_services-v1/test/google/cloud/network_services/v1/network_services_paths_test.rb b/owl-bot-staging/google-cloud-network_services-v1/test/google/cloud/network_services/v1/network_services_paths_test.rb deleted file mode 100644 index fa877883b8aa..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/test/google/cloud/network_services/v1/network_services_paths_test.rb +++ /dev/null @@ -1,355 +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_services/v1/network_services" - -class ::Google::Cloud::NetworkServices::V1::NetworkServices::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_address_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.address_path project: "value0", region: "value1", address: "value2" - assert_equal "projects/value0/regions/value1/addresses/value2", path - end - end - - def test_agent_gateway_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.agent_gateway_path project: "value0", location: "value1", agent_gateway: "value2" - assert_equal "projects/value0/locations/value1/agentGateways/value2", path - end - end - - def test_authorization_policy_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.authorization_policy_path project: "value0", location: "value1", authorization_policy: "value2" - assert_equal "projects/value0/locations/value1/authorizationPolicies/value2", path - end - end - - def test_backend_service_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.backend_service_path project: "value0", location: "value1", backend_service: "value2" - assert_equal "projects/value0/locations/value1/backendServices/value2", path - end - end - - def test_certificate_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.certificate_path project: "value0", location: "value1", certificate: "value2" - assert_equal "projects/value0/locations/value1/certificates/value2", path - end - end - - def test_client_tls_policy_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.client_tls_policy_path project: "value0", location: "value1", client_tls_policy: "value2" - assert_equal "projects/value0/locations/value1/clientTlsPolicies/value2", path - end - end - - def test_endpoint_policy_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.endpoint_policy_path project: "value0", location: "value1", endpoint_policy: "value2" - assert_equal "projects/value0/locations/value1/endpointPolicies/value2", path - end - end - - def test_gateway_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.gateway_path project: "value0", location: "value1", gateway: "value2" - assert_equal "projects/value0/locations/value1/gateways/value2", path - end - end - - def test_gateway_route_view_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.gateway_route_view_path project: "value0", location: "value1", gateway: "value2", route_view: "value3" - assert_equal "projects/value0/locations/value1/gateways/value2/routeViews/value3", path - end - end - - def test_gateway_security_policy_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.gateway_security_policy_path project: "value0", location: "value1", gateway_security_policy: "value2" - assert_equal "projects/value0/locations/value1/gatewaySecurityPolicies/value2", path - end - end - - def test_grpc_route_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.grpc_route_path project: "value0", location: "value1", grpc_route: "value2" - assert_equal "projects/value0/locations/value1/grpcRoutes/value2", path - end - end - - def test_http_route_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.http_route_path project: "value0", location: "value1", http_route: "value2" - assert_equal "projects/value0/locations/value1/httpRoutes/value2", path - end - end - - def test_location_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::NetworkServices::V1::NetworkServices::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_mesh_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.mesh_path project: "value0", location: "value1", mesh: "value2" - assert_equal "projects/value0/locations/value1/meshes/value2", path - end - end - - def test_mesh_route_view_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.mesh_route_view_path project: "value0", location: "value1", mesh: "value2", route_view: "value3" - assert_equal "projects/value0/locations/value1/meshes/value2/routeViews/value3", path - end - end - - def test_network_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.network_path project: "value0", network: "value1" - assert_equal "projects/value0/global/networks/value1", path - end - end - - def test_server_tls_policy_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.server_tls_policy_path project: "value0", location: "value1", server_tls_policy: "value2" - assert_equal "projects/value0/locations/value1/serverTlsPolicies/value2", path - end - end - - def test_service_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.service_path project: "value0", location: "value1", namespace: "value2", service: "value3" - assert_equal "projects/value0/locations/value1/namespaces/value2/services/value3", path - end - end - - def test_service_binding_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.service_binding_path project: "value0", location: "value1", service_binding: "value2" - assert_equal "projects/value0/locations/value1/serviceBindings/value2", path - end - end - - def test_service_lb_policy_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.service_lb_policy_path project: "value0", location: "value1", service_lb_policy: "value2" - assert_equal "projects/value0/locations/value1/serviceLbPolicies/value2", path - end - end - - def test_subnetwork_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.subnetwork_path project: "value0", region: "value1", subnetwork: "value2" - assert_equal "projects/value0/regions/value1/subnetworks/value2", path - end - end - - def test_target_tcp_proxy_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.target_tcp_proxy_path project: "value0", location: "value1", target_tcp_proxy: "value2" - assert_equal "projects/value0/locations/value1/targetTcpProxies/value2", path - end - end - - def test_tcp_route_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.tcp_route_path project: "value0", location: "value1", tcp_route: "value2" - assert_equal "projects/value0/locations/value1/tcpRoutes/value2", path - end - end - - def test_tls_route_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.tls_route_path project: "value0", location: "value1", tls_route: "value2" - assert_equal "projects/value0/locations/value1/tlsRoutes/value2", path - end - end - - def test_wasm_plugin_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.wasm_plugin_path project: "value0", location: "value1", wasm_plugin: "value2" - assert_equal "projects/value0/locations/value1/wasmPlugins/value2", path - end - end - - def test_wasm_plugin_version_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.wasm_plugin_version_path project: "value0", location: "value1", wasm_plugin: "value2", wasm_plugin_version: "value3" - assert_equal "projects/value0/locations/value1/wasmPlugins/value2/versions/value3", path - end - end -end diff --git a/owl-bot-staging/google-cloud-network_services-v1/test/google/cloud/network_services/v1/network_services_rest_test.rb b/owl-bot-staging/google-cloud-network_services-v1/test/google/cloud/network_services/v1/network_services_rest_test.rb deleted file mode 100644 index d40dfc844722..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/test/google/cloud/network_services/v1/network_services_rest_test.rb +++ /dev/null @@ -1,3575 +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/networkservices/v1/network_services_pb" -require "google/cloud/network_services/v1/network_services/rest" - - -class ::Google::Cloud::NetworkServices::V1::NetworkServices::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_endpoint_policies - # Create test objects. - client_result = ::Google::Cloud::NetworkServices::V1::ListEndpointPoliciesResponse.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" - return_partial_success = true - - list_endpoint_policies_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_list_endpoint_policies_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_endpoint_policies_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_endpoint_policies({ parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_endpoint_policies parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_endpoint_policies ::Google::Cloud::NetworkServices::V1::ListEndpointPoliciesRequest.new(parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_endpoint_policies({ parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_endpoint_policies(::Google::Cloud::NetworkServices::V1::ListEndpointPoliciesRequest.new(parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_endpoint_policies_client_stub.call_count - end - end - end - - def test_get_endpoint_policy - # Create test objects. - client_result = ::Google::Cloud::NetworkServices::V1::EndpointPolicy.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_endpoint_policy_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_get_endpoint_policy_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_endpoint_policy_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_endpoint_policy({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_endpoint_policy name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_endpoint_policy ::Google::Cloud::NetworkServices::V1::GetEndpointPolicyRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_endpoint_policy({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_endpoint_policy(::Google::Cloud::NetworkServices::V1::GetEndpointPolicyRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_endpoint_policy_client_stub.call_count - end - end - end - - def test_create_endpoint_policy - # 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" - endpoint_policy_id = "hello world" - endpoint_policy = {} - - create_endpoint_policy_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_create_endpoint_policy_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_endpoint_policy_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.create_endpoint_policy({ parent: parent, endpoint_policy_id: endpoint_policy_id, endpoint_policy: endpoint_policy }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.create_endpoint_policy parent: parent, endpoint_policy_id: endpoint_policy_id, endpoint_policy: endpoint_policy do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.create_endpoint_policy ::Google::Cloud::NetworkServices::V1::CreateEndpointPolicyRequest.new(parent: parent, endpoint_policy_id: endpoint_policy_id, endpoint_policy: endpoint_policy) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.create_endpoint_policy({ parent: parent, endpoint_policy_id: endpoint_policy_id, endpoint_policy: endpoint_policy }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.create_endpoint_policy(::Google::Cloud::NetworkServices::V1::CreateEndpointPolicyRequest.new(parent: parent, endpoint_policy_id: endpoint_policy_id, endpoint_policy: endpoint_policy), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_endpoint_policy_client_stub.call_count - end - end - end - - def test_update_endpoint_policy - # 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 = {} - endpoint_policy = {} - - update_endpoint_policy_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_update_endpoint_policy_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_endpoint_policy_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_endpoint_policy({ update_mask: update_mask, endpoint_policy: endpoint_policy }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_endpoint_policy update_mask: update_mask, endpoint_policy: endpoint_policy do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_endpoint_policy ::Google::Cloud::NetworkServices::V1::UpdateEndpointPolicyRequest.new(update_mask: update_mask, endpoint_policy: endpoint_policy) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_endpoint_policy({ update_mask: update_mask, endpoint_policy: endpoint_policy }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_endpoint_policy(::Google::Cloud::NetworkServices::V1::UpdateEndpointPolicyRequest.new(update_mask: update_mask, endpoint_policy: endpoint_policy), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_endpoint_policy_client_stub.call_count - end - end - end - - def test_delete_endpoint_policy - # 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_endpoint_policy_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_delete_endpoint_policy_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_endpoint_policy_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_endpoint_policy({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_endpoint_policy name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.delete_endpoint_policy ::Google::Cloud::NetworkServices::V1::DeleteEndpointPolicyRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.delete_endpoint_policy({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.delete_endpoint_policy(::Google::Cloud::NetworkServices::V1::DeleteEndpointPolicyRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_endpoint_policy_client_stub.call_count - end - end - end - - def test_list_wasm_plugin_versions - # Create test objects. - client_result = ::Google::Cloud::NetworkServices::V1::ListWasmPluginVersionsResponse.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" - - list_wasm_plugin_versions_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_list_wasm_plugin_versions_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_wasm_plugin_versions_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_wasm_plugin_versions({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_wasm_plugin_versions parent: parent, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_wasm_plugin_versions ::Google::Cloud::NetworkServices::V1::ListWasmPluginVersionsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_wasm_plugin_versions({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_wasm_plugin_versions(::Google::Cloud::NetworkServices::V1::ListWasmPluginVersionsRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_wasm_plugin_versions_client_stub.call_count - end - end - end - - def test_get_wasm_plugin_version - # Create test objects. - client_result = ::Google::Cloud::NetworkServices::V1::WasmPluginVersion.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_wasm_plugin_version_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_get_wasm_plugin_version_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_wasm_plugin_version_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_wasm_plugin_version({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_wasm_plugin_version name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_wasm_plugin_version ::Google::Cloud::NetworkServices::V1::GetWasmPluginVersionRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_wasm_plugin_version({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_wasm_plugin_version(::Google::Cloud::NetworkServices::V1::GetWasmPluginVersionRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_wasm_plugin_version_client_stub.call_count - end - end - end - - def test_create_wasm_plugin_version - # 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" - wasm_plugin_version_id = "hello world" - wasm_plugin_version = {} - - create_wasm_plugin_version_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_create_wasm_plugin_version_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_wasm_plugin_version_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.create_wasm_plugin_version({ parent: parent, wasm_plugin_version_id: wasm_plugin_version_id, wasm_plugin_version: wasm_plugin_version }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.create_wasm_plugin_version parent: parent, wasm_plugin_version_id: wasm_plugin_version_id, wasm_plugin_version: wasm_plugin_version do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.create_wasm_plugin_version ::Google::Cloud::NetworkServices::V1::CreateWasmPluginVersionRequest.new(parent: parent, wasm_plugin_version_id: wasm_plugin_version_id, wasm_plugin_version: wasm_plugin_version) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.create_wasm_plugin_version({ parent: parent, wasm_plugin_version_id: wasm_plugin_version_id, wasm_plugin_version: wasm_plugin_version }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.create_wasm_plugin_version(::Google::Cloud::NetworkServices::V1::CreateWasmPluginVersionRequest.new(parent: parent, wasm_plugin_version_id: wasm_plugin_version_id, wasm_plugin_version: wasm_plugin_version), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_wasm_plugin_version_client_stub.call_count - end - end - end - - def test_delete_wasm_plugin_version - # 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_wasm_plugin_version_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_delete_wasm_plugin_version_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_wasm_plugin_version_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_wasm_plugin_version({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_wasm_plugin_version name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.delete_wasm_plugin_version ::Google::Cloud::NetworkServices::V1::DeleteWasmPluginVersionRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.delete_wasm_plugin_version({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.delete_wasm_plugin_version(::Google::Cloud::NetworkServices::V1::DeleteWasmPluginVersionRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_wasm_plugin_version_client_stub.call_count - end - end - end - - def test_list_wasm_plugins - # Create test objects. - client_result = ::Google::Cloud::NetworkServices::V1::ListWasmPluginsResponse.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" - - list_wasm_plugins_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_list_wasm_plugins_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_wasm_plugins_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_wasm_plugins({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_wasm_plugins parent: parent, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_wasm_plugins ::Google::Cloud::NetworkServices::V1::ListWasmPluginsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_wasm_plugins({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_wasm_plugins(::Google::Cloud::NetworkServices::V1::ListWasmPluginsRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_wasm_plugins_client_stub.call_count - end - end - end - - def test_get_wasm_plugin - # Create test objects. - client_result = ::Google::Cloud::NetworkServices::V1::WasmPlugin.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - view = :WASM_PLUGIN_VIEW_UNSPECIFIED - - get_wasm_plugin_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_get_wasm_plugin_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_wasm_plugin_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_wasm_plugin({ name: name, view: view }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_wasm_plugin name: name, view: view do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_wasm_plugin ::Google::Cloud::NetworkServices::V1::GetWasmPluginRequest.new(name: name, view: view) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_wasm_plugin({ name: name, view: view }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_wasm_plugin(::Google::Cloud::NetworkServices::V1::GetWasmPluginRequest.new(name: name, view: view), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_wasm_plugin_client_stub.call_count - end - end - end - - def test_create_wasm_plugin - # 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" - wasm_plugin_id = "hello world" - wasm_plugin = {} - - create_wasm_plugin_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_create_wasm_plugin_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_wasm_plugin_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.create_wasm_plugin({ parent: parent, wasm_plugin_id: wasm_plugin_id, wasm_plugin: wasm_plugin }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.create_wasm_plugin parent: parent, wasm_plugin_id: wasm_plugin_id, wasm_plugin: wasm_plugin do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.create_wasm_plugin ::Google::Cloud::NetworkServices::V1::CreateWasmPluginRequest.new(parent: parent, wasm_plugin_id: wasm_plugin_id, wasm_plugin: wasm_plugin) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.create_wasm_plugin({ parent: parent, wasm_plugin_id: wasm_plugin_id, wasm_plugin: wasm_plugin }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.create_wasm_plugin(::Google::Cloud::NetworkServices::V1::CreateWasmPluginRequest.new(parent: parent, wasm_plugin_id: wasm_plugin_id, wasm_plugin: wasm_plugin), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_wasm_plugin_client_stub.call_count - end - end - end - - def test_update_wasm_plugin - # 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 = {} - wasm_plugin = {} - - update_wasm_plugin_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_update_wasm_plugin_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_wasm_plugin_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_wasm_plugin({ update_mask: update_mask, wasm_plugin: wasm_plugin }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_wasm_plugin update_mask: update_mask, wasm_plugin: wasm_plugin do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_wasm_plugin ::Google::Cloud::NetworkServices::V1::UpdateWasmPluginRequest.new(update_mask: update_mask, wasm_plugin: wasm_plugin) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_wasm_plugin({ update_mask: update_mask, wasm_plugin: wasm_plugin }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_wasm_plugin(::Google::Cloud::NetworkServices::V1::UpdateWasmPluginRequest.new(update_mask: update_mask, wasm_plugin: wasm_plugin), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_wasm_plugin_client_stub.call_count - end - end - end - - def test_delete_wasm_plugin - # 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_wasm_plugin_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_delete_wasm_plugin_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_wasm_plugin_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_wasm_plugin({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_wasm_plugin name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.delete_wasm_plugin ::Google::Cloud::NetworkServices::V1::DeleteWasmPluginRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.delete_wasm_plugin({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.delete_wasm_plugin(::Google::Cloud::NetworkServices::V1::DeleteWasmPluginRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_wasm_plugin_client_stub.call_count - end - end - end - - def test_list_gateways - # Create test objects. - client_result = ::Google::Cloud::NetworkServices::V1::ListGatewaysResponse.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" - - list_gateways_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_list_gateways_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_gateways_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_gateways({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_gateways parent: parent, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_gateways ::Google::Cloud::NetworkServices::V1::ListGatewaysRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_gateways({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_gateways(::Google::Cloud::NetworkServices::V1::ListGatewaysRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_gateways_client_stub.call_count - end - end - end - - def test_get_gateway - # Create test objects. - client_result = ::Google::Cloud::NetworkServices::V1::Gateway.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_gateway_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_get_gateway_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_gateway_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_gateway({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_gateway name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_gateway ::Google::Cloud::NetworkServices::V1::GetGatewayRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_gateway({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_gateway(::Google::Cloud::NetworkServices::V1::GetGatewayRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_gateway_client_stub.call_count - end - end - end - - def test_create_gateway - # 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" - gateway_id = "hello world" - gateway = {} - - create_gateway_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_create_gateway_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_gateway_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.create_gateway({ parent: parent, gateway_id: gateway_id, gateway: gateway }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.create_gateway parent: parent, gateway_id: gateway_id, gateway: gateway do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.create_gateway ::Google::Cloud::NetworkServices::V1::CreateGatewayRequest.new(parent: parent, gateway_id: gateway_id, gateway: gateway) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.create_gateway({ parent: parent, gateway_id: gateway_id, gateway: gateway }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.create_gateway(::Google::Cloud::NetworkServices::V1::CreateGatewayRequest.new(parent: parent, gateway_id: gateway_id, gateway: gateway), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_gateway_client_stub.call_count - end - end - end - - def test_update_gateway - # 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 = {} - gateway = {} - - update_gateway_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_update_gateway_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_gateway_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_gateway({ update_mask: update_mask, gateway: gateway }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_gateway update_mask: update_mask, gateway: gateway do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_gateway ::Google::Cloud::NetworkServices::V1::UpdateGatewayRequest.new(update_mask: update_mask, gateway: gateway) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_gateway({ update_mask: update_mask, gateway: gateway }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_gateway(::Google::Cloud::NetworkServices::V1::UpdateGatewayRequest.new(update_mask: update_mask, gateway: gateway), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_gateway_client_stub.call_count - end - end - end - - def test_delete_gateway - # 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_gateway_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_delete_gateway_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_gateway_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_gateway({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_gateway name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.delete_gateway ::Google::Cloud::NetworkServices::V1::DeleteGatewayRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.delete_gateway({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.delete_gateway(::Google::Cloud::NetworkServices::V1::DeleteGatewayRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_gateway_client_stub.call_count - end - end - end - - def test_list_grpc_routes - # Create test objects. - client_result = ::Google::Cloud::NetworkServices::V1::ListGrpcRoutesResponse.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" - return_partial_success = true - - list_grpc_routes_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_list_grpc_routes_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_grpc_routes_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_grpc_routes({ parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_grpc_routes parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_grpc_routes ::Google::Cloud::NetworkServices::V1::ListGrpcRoutesRequest.new(parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_grpc_routes({ parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_grpc_routes(::Google::Cloud::NetworkServices::V1::ListGrpcRoutesRequest.new(parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_grpc_routes_client_stub.call_count - end - end - end - - def test_get_grpc_route - # Create test objects. - client_result = ::Google::Cloud::NetworkServices::V1::GrpcRoute.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_grpc_route_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_get_grpc_route_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_grpc_route_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_grpc_route({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_grpc_route name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_grpc_route ::Google::Cloud::NetworkServices::V1::GetGrpcRouteRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_grpc_route({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_grpc_route(::Google::Cloud::NetworkServices::V1::GetGrpcRouteRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_grpc_route_client_stub.call_count - end - end - end - - def test_create_grpc_route - # 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" - grpc_route_id = "hello world" - grpc_route = {} - - create_grpc_route_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_create_grpc_route_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_grpc_route_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.create_grpc_route({ parent: parent, grpc_route_id: grpc_route_id, grpc_route: grpc_route }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.create_grpc_route parent: parent, grpc_route_id: grpc_route_id, grpc_route: grpc_route do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.create_grpc_route ::Google::Cloud::NetworkServices::V1::CreateGrpcRouteRequest.new(parent: parent, grpc_route_id: grpc_route_id, grpc_route: grpc_route) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.create_grpc_route({ parent: parent, grpc_route_id: grpc_route_id, grpc_route: grpc_route }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.create_grpc_route(::Google::Cloud::NetworkServices::V1::CreateGrpcRouteRequest.new(parent: parent, grpc_route_id: grpc_route_id, grpc_route: grpc_route), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_grpc_route_client_stub.call_count - end - end - end - - def test_update_grpc_route - # 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 = {} - grpc_route = {} - - update_grpc_route_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_update_grpc_route_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_grpc_route_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_grpc_route({ update_mask: update_mask, grpc_route: grpc_route }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_grpc_route update_mask: update_mask, grpc_route: grpc_route do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_grpc_route ::Google::Cloud::NetworkServices::V1::UpdateGrpcRouteRequest.new(update_mask: update_mask, grpc_route: grpc_route) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_grpc_route({ update_mask: update_mask, grpc_route: grpc_route }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_grpc_route(::Google::Cloud::NetworkServices::V1::UpdateGrpcRouteRequest.new(update_mask: update_mask, grpc_route: grpc_route), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_grpc_route_client_stub.call_count - end - end - end - - def test_delete_grpc_route - # 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_grpc_route_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_delete_grpc_route_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_grpc_route_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_grpc_route({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_grpc_route name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.delete_grpc_route ::Google::Cloud::NetworkServices::V1::DeleteGrpcRouteRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.delete_grpc_route({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.delete_grpc_route(::Google::Cloud::NetworkServices::V1::DeleteGrpcRouteRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_grpc_route_client_stub.call_count - end - end - end - - def test_list_http_routes - # Create test objects. - client_result = ::Google::Cloud::NetworkServices::V1::ListHttpRoutesResponse.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" - return_partial_success = true - filter = "hello world" - - list_http_routes_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_list_http_routes_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_http_routes_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_http_routes({ parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success, filter: filter }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_http_routes parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success, filter: filter do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_http_routes ::Google::Cloud::NetworkServices::V1::ListHttpRoutesRequest.new(parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success, filter: filter) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_http_routes({ parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success, filter: filter }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_http_routes(::Google::Cloud::NetworkServices::V1::ListHttpRoutesRequest.new(parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success, filter: filter), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_http_routes_client_stub.call_count - end - end - end - - def test_get_http_route - # Create test objects. - client_result = ::Google::Cloud::NetworkServices::V1::HttpRoute.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_http_route_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_get_http_route_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_http_route_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_http_route({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_http_route name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_http_route ::Google::Cloud::NetworkServices::V1::GetHttpRouteRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_http_route({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_http_route(::Google::Cloud::NetworkServices::V1::GetHttpRouteRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_http_route_client_stub.call_count - end - end - end - - def test_create_http_route - # 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" - http_route_id = "hello world" - http_route = {} - request_id = "hello world" - - create_http_route_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_create_http_route_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_http_route_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.create_http_route({ parent: parent, http_route_id: http_route_id, http_route: http_route, request_id: request_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.create_http_route parent: parent, http_route_id: http_route_id, http_route: http_route, request_id: request_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.create_http_route ::Google::Cloud::NetworkServices::V1::CreateHttpRouteRequest.new(parent: parent, http_route_id: http_route_id, http_route: http_route, request_id: request_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.create_http_route({ parent: parent, http_route_id: http_route_id, http_route: http_route, request_id: request_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.create_http_route(::Google::Cloud::NetworkServices::V1::CreateHttpRouteRequest.new(parent: parent, http_route_id: http_route_id, http_route: http_route, request_id: request_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_http_route_client_stub.call_count - end - end - end - - def test_update_http_route - # 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 = {} - http_route = {} - - update_http_route_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_update_http_route_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_http_route_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_http_route({ update_mask: update_mask, http_route: http_route }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_http_route update_mask: update_mask, http_route: http_route do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_http_route ::Google::Cloud::NetworkServices::V1::UpdateHttpRouteRequest.new(update_mask: update_mask, http_route: http_route) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_http_route({ update_mask: update_mask, http_route: http_route }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_http_route(::Google::Cloud::NetworkServices::V1::UpdateHttpRouteRequest.new(update_mask: update_mask, http_route: http_route), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_http_route_client_stub.call_count - end - end - end - - def test_delete_http_route - # 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_http_route_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_delete_http_route_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_http_route_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_http_route({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_http_route name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.delete_http_route ::Google::Cloud::NetworkServices::V1::DeleteHttpRouteRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.delete_http_route({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.delete_http_route(::Google::Cloud::NetworkServices::V1::DeleteHttpRouteRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_http_route_client_stub.call_count - end - end - end - - def test_list_tcp_routes - # Create test objects. - client_result = ::Google::Cloud::NetworkServices::V1::ListTcpRoutesResponse.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" - return_partial_success = true - - list_tcp_routes_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_list_tcp_routes_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_tcp_routes_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_tcp_routes({ parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_tcp_routes parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_tcp_routes ::Google::Cloud::NetworkServices::V1::ListTcpRoutesRequest.new(parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_tcp_routes({ parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_tcp_routes(::Google::Cloud::NetworkServices::V1::ListTcpRoutesRequest.new(parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_tcp_routes_client_stub.call_count - end - end - end - - def test_get_tcp_route - # Create test objects. - client_result = ::Google::Cloud::NetworkServices::V1::TcpRoute.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_tcp_route_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_get_tcp_route_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_tcp_route_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_tcp_route({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_tcp_route name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_tcp_route ::Google::Cloud::NetworkServices::V1::GetTcpRouteRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_tcp_route({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_tcp_route(::Google::Cloud::NetworkServices::V1::GetTcpRouteRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_tcp_route_client_stub.call_count - end - end - end - - def test_create_tcp_route - # 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" - tcp_route_id = "hello world" - tcp_route = {} - - create_tcp_route_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_create_tcp_route_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_tcp_route_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.create_tcp_route({ parent: parent, tcp_route_id: tcp_route_id, tcp_route: tcp_route }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.create_tcp_route parent: parent, tcp_route_id: tcp_route_id, tcp_route: tcp_route do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.create_tcp_route ::Google::Cloud::NetworkServices::V1::CreateTcpRouteRequest.new(parent: parent, tcp_route_id: tcp_route_id, tcp_route: tcp_route) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.create_tcp_route({ parent: parent, tcp_route_id: tcp_route_id, tcp_route: tcp_route }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.create_tcp_route(::Google::Cloud::NetworkServices::V1::CreateTcpRouteRequest.new(parent: parent, tcp_route_id: tcp_route_id, tcp_route: tcp_route), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_tcp_route_client_stub.call_count - end - end - end - - def test_update_tcp_route - # 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 = {} - tcp_route = {} - - update_tcp_route_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_update_tcp_route_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_tcp_route_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_tcp_route({ update_mask: update_mask, tcp_route: tcp_route }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_tcp_route update_mask: update_mask, tcp_route: tcp_route do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_tcp_route ::Google::Cloud::NetworkServices::V1::UpdateTcpRouteRequest.new(update_mask: update_mask, tcp_route: tcp_route) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_tcp_route({ update_mask: update_mask, tcp_route: tcp_route }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_tcp_route(::Google::Cloud::NetworkServices::V1::UpdateTcpRouteRequest.new(update_mask: update_mask, tcp_route: tcp_route), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_tcp_route_client_stub.call_count - end - end - end - - def test_delete_tcp_route - # 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_tcp_route_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_delete_tcp_route_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_tcp_route_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_tcp_route({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_tcp_route name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.delete_tcp_route ::Google::Cloud::NetworkServices::V1::DeleteTcpRouteRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.delete_tcp_route({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.delete_tcp_route(::Google::Cloud::NetworkServices::V1::DeleteTcpRouteRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_tcp_route_client_stub.call_count - end - end - end - - def test_list_tls_routes - # Create test objects. - client_result = ::Google::Cloud::NetworkServices::V1::ListTlsRoutesResponse.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" - return_partial_success = true - - list_tls_routes_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_list_tls_routes_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_tls_routes_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_tls_routes({ parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_tls_routes parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_tls_routes ::Google::Cloud::NetworkServices::V1::ListTlsRoutesRequest.new(parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_tls_routes({ parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_tls_routes(::Google::Cloud::NetworkServices::V1::ListTlsRoutesRequest.new(parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_tls_routes_client_stub.call_count - end - end - end - - def test_get_tls_route - # Create test objects. - client_result = ::Google::Cloud::NetworkServices::V1::TlsRoute.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_tls_route_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_get_tls_route_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_tls_route_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_tls_route({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_tls_route name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_tls_route ::Google::Cloud::NetworkServices::V1::GetTlsRouteRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_tls_route({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_tls_route(::Google::Cloud::NetworkServices::V1::GetTlsRouteRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_tls_route_client_stub.call_count - end - end - end - - def test_create_tls_route - # 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" - tls_route_id = "hello world" - tls_route = {} - - create_tls_route_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_create_tls_route_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_tls_route_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.create_tls_route({ parent: parent, tls_route_id: tls_route_id, tls_route: tls_route }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.create_tls_route parent: parent, tls_route_id: tls_route_id, tls_route: tls_route do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.create_tls_route ::Google::Cloud::NetworkServices::V1::CreateTlsRouteRequest.new(parent: parent, tls_route_id: tls_route_id, tls_route: tls_route) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.create_tls_route({ parent: parent, tls_route_id: tls_route_id, tls_route: tls_route }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.create_tls_route(::Google::Cloud::NetworkServices::V1::CreateTlsRouteRequest.new(parent: parent, tls_route_id: tls_route_id, tls_route: tls_route), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_tls_route_client_stub.call_count - end - end - end - - def test_update_tls_route - # 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 = {} - tls_route = {} - - update_tls_route_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_update_tls_route_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_tls_route_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_tls_route({ update_mask: update_mask, tls_route: tls_route }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_tls_route update_mask: update_mask, tls_route: tls_route do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_tls_route ::Google::Cloud::NetworkServices::V1::UpdateTlsRouteRequest.new(update_mask: update_mask, tls_route: tls_route) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_tls_route({ update_mask: update_mask, tls_route: tls_route }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_tls_route(::Google::Cloud::NetworkServices::V1::UpdateTlsRouteRequest.new(update_mask: update_mask, tls_route: tls_route), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_tls_route_client_stub.call_count - end - end - end - - def test_delete_tls_route - # 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_tls_route_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_delete_tls_route_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_tls_route_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_tls_route({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_tls_route name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.delete_tls_route ::Google::Cloud::NetworkServices::V1::DeleteTlsRouteRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.delete_tls_route({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.delete_tls_route(::Google::Cloud::NetworkServices::V1::DeleteTlsRouteRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_tls_route_client_stub.call_count - end - end - end - - def test_list_service_bindings - # Create test objects. - client_result = ::Google::Cloud::NetworkServices::V1::ListServiceBindingsResponse.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" - - list_service_bindings_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_list_service_bindings_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_service_bindings_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_service_bindings({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_service_bindings parent: parent, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_service_bindings ::Google::Cloud::NetworkServices::V1::ListServiceBindingsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_service_bindings({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_service_bindings(::Google::Cloud::NetworkServices::V1::ListServiceBindingsRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_service_bindings_client_stub.call_count - end - end - end - - def test_get_service_binding - # Create test objects. - client_result = ::Google::Cloud::NetworkServices::V1::ServiceBinding.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_service_binding_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_get_service_binding_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_service_binding_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_service_binding({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_service_binding name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_service_binding ::Google::Cloud::NetworkServices::V1::GetServiceBindingRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_service_binding({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_service_binding(::Google::Cloud::NetworkServices::V1::GetServiceBindingRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_service_binding_client_stub.call_count - end - end - end - - def test_create_service_binding - # 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" - service_binding_id = "hello world" - service_binding = {} - - create_service_binding_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_create_service_binding_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_service_binding_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.create_service_binding({ parent: parent, service_binding_id: service_binding_id, service_binding: service_binding }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.create_service_binding parent: parent, service_binding_id: service_binding_id, service_binding: service_binding do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.create_service_binding ::Google::Cloud::NetworkServices::V1::CreateServiceBindingRequest.new(parent: parent, service_binding_id: service_binding_id, service_binding: service_binding) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.create_service_binding({ parent: parent, service_binding_id: service_binding_id, service_binding: service_binding }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.create_service_binding(::Google::Cloud::NetworkServices::V1::CreateServiceBindingRequest.new(parent: parent, service_binding_id: service_binding_id, service_binding: service_binding), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_service_binding_client_stub.call_count - end - end - end - - def test_update_service_binding - # 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 = {} - service_binding = {} - - update_service_binding_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_update_service_binding_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_service_binding_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_service_binding({ update_mask: update_mask, service_binding: service_binding }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_service_binding update_mask: update_mask, service_binding: service_binding do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_service_binding ::Google::Cloud::NetworkServices::V1::UpdateServiceBindingRequest.new(update_mask: update_mask, service_binding: service_binding) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_service_binding({ update_mask: update_mask, service_binding: service_binding }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_service_binding(::Google::Cloud::NetworkServices::V1::UpdateServiceBindingRequest.new(update_mask: update_mask, service_binding: service_binding), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_service_binding_client_stub.call_count - end - end - end - - def test_delete_service_binding - # 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_service_binding_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_delete_service_binding_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_service_binding_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_service_binding({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_service_binding name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.delete_service_binding ::Google::Cloud::NetworkServices::V1::DeleteServiceBindingRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.delete_service_binding({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.delete_service_binding(::Google::Cloud::NetworkServices::V1::DeleteServiceBindingRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_service_binding_client_stub.call_count - end - end - end - - def test_list_meshes - # Create test objects. - client_result = ::Google::Cloud::NetworkServices::V1::ListMeshesResponse.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" - return_partial_success = true - - list_meshes_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_list_meshes_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_meshes_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_meshes({ parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_meshes parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_meshes ::Google::Cloud::NetworkServices::V1::ListMeshesRequest.new(parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_meshes({ parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_meshes(::Google::Cloud::NetworkServices::V1::ListMeshesRequest.new(parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_meshes_client_stub.call_count - end - end - end - - def test_get_mesh - # Create test objects. - client_result = ::Google::Cloud::NetworkServices::V1::Mesh.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_mesh_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_get_mesh_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_mesh_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_mesh({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_mesh name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_mesh ::Google::Cloud::NetworkServices::V1::GetMeshRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_mesh({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_mesh(::Google::Cloud::NetworkServices::V1::GetMeshRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_mesh_client_stub.call_count - end - end - end - - def test_create_mesh - # 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" - mesh_id = "hello world" - mesh = {} - - create_mesh_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_create_mesh_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_mesh_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.create_mesh({ parent: parent, mesh_id: mesh_id, mesh: mesh }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.create_mesh parent: parent, mesh_id: mesh_id, mesh: mesh do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.create_mesh ::Google::Cloud::NetworkServices::V1::CreateMeshRequest.new(parent: parent, mesh_id: mesh_id, mesh: mesh) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.create_mesh({ parent: parent, mesh_id: mesh_id, mesh: mesh }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.create_mesh(::Google::Cloud::NetworkServices::V1::CreateMeshRequest.new(parent: parent, mesh_id: mesh_id, mesh: mesh), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_mesh_client_stub.call_count - end - end - end - - def test_update_mesh - # 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 = {} - mesh = {} - - update_mesh_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_update_mesh_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_mesh_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_mesh({ update_mask: update_mask, mesh: mesh }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_mesh update_mask: update_mask, mesh: mesh do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_mesh ::Google::Cloud::NetworkServices::V1::UpdateMeshRequest.new(update_mask: update_mask, mesh: mesh) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_mesh({ update_mask: update_mask, mesh: mesh }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_mesh(::Google::Cloud::NetworkServices::V1::UpdateMeshRequest.new(update_mask: update_mask, mesh: mesh), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_mesh_client_stub.call_count - end - end - end - - def test_delete_mesh - # 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_mesh_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_delete_mesh_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_mesh_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_mesh({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_mesh name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.delete_mesh ::Google::Cloud::NetworkServices::V1::DeleteMeshRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.delete_mesh({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.delete_mesh(::Google::Cloud::NetworkServices::V1::DeleteMeshRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_mesh_client_stub.call_count - end - end - end - - def test_list_service_lb_policies - # Create test objects. - client_result = ::Google::Cloud::NetworkServices::V1::ListServiceLbPoliciesResponse.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" - - list_service_lb_policies_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_list_service_lb_policies_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_service_lb_policies_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_service_lb_policies({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_service_lb_policies parent: parent, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_service_lb_policies ::Google::Cloud::NetworkServices::V1::ListServiceLbPoliciesRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_service_lb_policies({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_service_lb_policies(::Google::Cloud::NetworkServices::V1::ListServiceLbPoliciesRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_service_lb_policies_client_stub.call_count - end - end - end - - def test_get_service_lb_policy - # Create test objects. - client_result = ::Google::Cloud::NetworkServices::V1::ServiceLbPolicy.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_service_lb_policy_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_get_service_lb_policy_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_service_lb_policy_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_service_lb_policy({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_service_lb_policy name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_service_lb_policy ::Google::Cloud::NetworkServices::V1::GetServiceLbPolicyRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_service_lb_policy({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_service_lb_policy(::Google::Cloud::NetworkServices::V1::GetServiceLbPolicyRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_service_lb_policy_client_stub.call_count - end - end - end - - def test_create_service_lb_policy - # 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" - service_lb_policy_id = "hello world" - service_lb_policy = {} - - create_service_lb_policy_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_create_service_lb_policy_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_service_lb_policy_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.create_service_lb_policy({ parent: parent, service_lb_policy_id: service_lb_policy_id, service_lb_policy: service_lb_policy }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.create_service_lb_policy parent: parent, service_lb_policy_id: service_lb_policy_id, service_lb_policy: service_lb_policy do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.create_service_lb_policy ::Google::Cloud::NetworkServices::V1::CreateServiceLbPolicyRequest.new(parent: parent, service_lb_policy_id: service_lb_policy_id, service_lb_policy: service_lb_policy) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.create_service_lb_policy({ parent: parent, service_lb_policy_id: service_lb_policy_id, service_lb_policy: service_lb_policy }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.create_service_lb_policy(::Google::Cloud::NetworkServices::V1::CreateServiceLbPolicyRequest.new(parent: parent, service_lb_policy_id: service_lb_policy_id, service_lb_policy: service_lb_policy), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_service_lb_policy_client_stub.call_count - end - end - end - - def test_update_service_lb_policy - # 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 = {} - service_lb_policy = {} - - update_service_lb_policy_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_update_service_lb_policy_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_service_lb_policy_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_service_lb_policy({ update_mask: update_mask, service_lb_policy: service_lb_policy }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_service_lb_policy update_mask: update_mask, service_lb_policy: service_lb_policy do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_service_lb_policy ::Google::Cloud::NetworkServices::V1::UpdateServiceLbPolicyRequest.new(update_mask: update_mask, service_lb_policy: service_lb_policy) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_service_lb_policy({ update_mask: update_mask, service_lb_policy: service_lb_policy }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_service_lb_policy(::Google::Cloud::NetworkServices::V1::UpdateServiceLbPolicyRequest.new(update_mask: update_mask, service_lb_policy: service_lb_policy), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_service_lb_policy_client_stub.call_count - end - end - end - - def test_delete_service_lb_policy - # 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_service_lb_policy_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_delete_service_lb_policy_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_service_lb_policy_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_service_lb_policy({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_service_lb_policy name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.delete_service_lb_policy ::Google::Cloud::NetworkServices::V1::DeleteServiceLbPolicyRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.delete_service_lb_policy({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.delete_service_lb_policy(::Google::Cloud::NetworkServices::V1::DeleteServiceLbPolicyRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_service_lb_policy_client_stub.call_count - end - end - end - - def test_get_gateway_route_view - # Create test objects. - client_result = ::Google::Cloud::NetworkServices::V1::GatewayRouteView.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_gateway_route_view_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_get_gateway_route_view_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_gateway_route_view_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_gateway_route_view({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_gateway_route_view name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_gateway_route_view ::Google::Cloud::NetworkServices::V1::GetGatewayRouteViewRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_gateway_route_view({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_gateway_route_view(::Google::Cloud::NetworkServices::V1::GetGatewayRouteViewRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_gateway_route_view_client_stub.call_count - end - end - end - - def test_get_mesh_route_view - # Create test objects. - client_result = ::Google::Cloud::NetworkServices::V1::MeshRouteView.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_mesh_route_view_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_get_mesh_route_view_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_mesh_route_view_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_mesh_route_view({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_mesh_route_view name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_mesh_route_view ::Google::Cloud::NetworkServices::V1::GetMeshRouteViewRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_mesh_route_view({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_mesh_route_view(::Google::Cloud::NetworkServices::V1::GetMeshRouteViewRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_mesh_route_view_client_stub.call_count - end - end - end - - def test_list_gateway_route_views - # Create test objects. - client_result = ::Google::Cloud::NetworkServices::V1::ListGatewayRouteViewsResponse.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" - - list_gateway_route_views_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_list_gateway_route_views_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_gateway_route_views_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_gateway_route_views({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_gateway_route_views parent: parent, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_gateway_route_views ::Google::Cloud::NetworkServices::V1::ListGatewayRouteViewsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_gateway_route_views({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_gateway_route_views(::Google::Cloud::NetworkServices::V1::ListGatewayRouteViewsRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_gateway_route_views_client_stub.call_count - end - end - end - - def test_list_mesh_route_views - # Create test objects. - client_result = ::Google::Cloud::NetworkServices::V1::ListMeshRouteViewsResponse.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" - - list_mesh_route_views_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_list_mesh_route_views_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_mesh_route_views_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_mesh_route_views({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_mesh_route_views parent: parent, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_mesh_route_views ::Google::Cloud::NetworkServices::V1::ListMeshRouteViewsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_mesh_route_views({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_mesh_route_views(::Google::Cloud::NetworkServices::V1::ListMeshRouteViewsRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_mesh_route_views_client_stub.call_count - end - end - end - - def test_list_agent_gateways - # Create test objects. - client_result = ::Google::Cloud::NetworkServices::V1::ListAgentGatewaysResponse.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" - return_partial_success = true - - list_agent_gateways_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_list_agent_gateways_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_agent_gateways_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_agent_gateways({ parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_agent_gateways parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_agent_gateways ::Google::Cloud::NetworkServices::V1::ListAgentGatewaysRequest.new(parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_agent_gateways({ parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_agent_gateways(::Google::Cloud::NetworkServices::V1::ListAgentGatewaysRequest.new(parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_agent_gateways_client_stub.call_count - end - end - end - - def test_get_agent_gateway - # Create test objects. - client_result = ::Google::Cloud::NetworkServices::V1::AgentGateway.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_agent_gateway_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_get_agent_gateway_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_agent_gateway_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_agent_gateway({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_agent_gateway name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_agent_gateway ::Google::Cloud::NetworkServices::V1::GetAgentGatewayRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_agent_gateway({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_agent_gateway(::Google::Cloud::NetworkServices::V1::GetAgentGatewayRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_agent_gateway_client_stub.call_count - end - end - end - - def test_create_agent_gateway - # 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" - agent_gateway_id = "hello world" - agent_gateway = {} - - create_agent_gateway_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_create_agent_gateway_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_agent_gateway_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.create_agent_gateway({ parent: parent, agent_gateway_id: agent_gateway_id, agent_gateway: agent_gateway }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.create_agent_gateway parent: parent, agent_gateway_id: agent_gateway_id, agent_gateway: agent_gateway do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.create_agent_gateway ::Google::Cloud::NetworkServices::V1::CreateAgentGatewayRequest.new(parent: parent, agent_gateway_id: agent_gateway_id, agent_gateway: agent_gateway) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.create_agent_gateway({ parent: parent, agent_gateway_id: agent_gateway_id, agent_gateway: agent_gateway }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.create_agent_gateway(::Google::Cloud::NetworkServices::V1::CreateAgentGatewayRequest.new(parent: parent, agent_gateway_id: agent_gateway_id, agent_gateway: agent_gateway), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_agent_gateway_client_stub.call_count - end - end - end - - def test_update_agent_gateway - # 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 = {} - agent_gateway = {} - - update_agent_gateway_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_update_agent_gateway_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_agent_gateway_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_agent_gateway({ update_mask: update_mask, agent_gateway: agent_gateway }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_agent_gateway update_mask: update_mask, agent_gateway: agent_gateway do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_agent_gateway ::Google::Cloud::NetworkServices::V1::UpdateAgentGatewayRequest.new(update_mask: update_mask, agent_gateway: agent_gateway) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_agent_gateway({ update_mask: update_mask, agent_gateway: agent_gateway }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_agent_gateway(::Google::Cloud::NetworkServices::V1::UpdateAgentGatewayRequest.new(update_mask: update_mask, agent_gateway: agent_gateway), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_agent_gateway_client_stub.call_count - end - end - end - - def test_delete_agent_gateway - # 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" - etag = "hello world" - - delete_agent_gateway_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_delete_agent_gateway_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_agent_gateway_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_agent_gateway({ name: name, etag: etag }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_agent_gateway name: name, etag: etag do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.delete_agent_gateway ::Google::Cloud::NetworkServices::V1::DeleteAgentGatewayRequest.new(name: name, etag: etag) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.delete_agent_gateway({ name: name, etag: etag }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.delete_agent_gateway(::Google::Cloud::NetworkServices::V1::DeleteAgentGatewayRequest.new(name: name, etag: etag), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_agent_gateway_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::NetworkServices::V1::NetworkServices::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::NetworkServices::V1::NetworkServices::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-network_services-v1/test/google/cloud/network_services/v1/network_services_test.rb b/owl-bot-staging/google-cloud-network_services-v1/test/google/cloud/network_services/v1/network_services_test.rb deleted file mode 100644 index fdcf703cac35..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/test/google/cloud/network_services/v1/network_services_test.rb +++ /dev/null @@ -1,4165 +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/networkservices/v1/network_services_pb" -require "google/cloud/network_services/v1/network_services" - -class ::Google::Cloud::NetworkServices::V1::NetworkServices::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_endpoint_policies - # Create GRPC objects. - grpc_response = ::Google::Cloud::NetworkServices::V1::ListEndpointPoliciesResponse.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" - return_partial_success = true - - list_endpoint_policies_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_endpoint_policies, name - assert_kind_of ::Google::Cloud::NetworkServices::V1::ListEndpointPoliciesRequest, request - assert_equal "hello world", request["parent"] - 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_endpoint_policies_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_endpoint_policies({ parent: parent, 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 - c.list_endpoint_policies parent: parent, 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 - c.list_endpoint_policies ::Google::Cloud::NetworkServices::V1::ListEndpointPoliciesRequest.new(parent: parent, 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 - c.list_endpoint_policies({ parent: parent, 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 - c.list_endpoint_policies(::Google::Cloud::NetworkServices::V1::ListEndpointPoliciesRequest.new(parent: parent, 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_endpoint_policies_client_stub.call_rpc_count - end - end - - def test_get_endpoint_policy - # Create GRPC objects. - grpc_response = ::Google::Cloud::NetworkServices::V1::EndpointPolicy.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_endpoint_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_endpoint_policy, name - assert_kind_of ::Google::Cloud::NetworkServices::V1::GetEndpointPolicyRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_endpoint_policy_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_endpoint_policy({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_endpoint_policy name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_endpoint_policy ::Google::Cloud::NetworkServices::V1::GetEndpointPolicyRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_endpoint_policy({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_endpoint_policy(::Google::Cloud::NetworkServices::V1::GetEndpointPolicyRequest.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_endpoint_policy_client_stub.call_rpc_count - end - end - - def test_create_endpoint_policy - # 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" - endpoint_policy_id = "hello world" - endpoint_policy = {} - - create_endpoint_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_endpoint_policy, name - assert_kind_of ::Google::Cloud::NetworkServices::V1::CreateEndpointPolicyRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["endpoint_policy_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::NetworkServices::V1::EndpointPolicy), request["endpoint_policy"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_endpoint_policy_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.create_endpoint_policy({ parent: parent, endpoint_policy_id: endpoint_policy_id, endpoint_policy: endpoint_policy }) 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 - c.create_endpoint_policy parent: parent, endpoint_policy_id: endpoint_policy_id, endpoint_policy: endpoint_policy 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 - c.create_endpoint_policy ::Google::Cloud::NetworkServices::V1::CreateEndpointPolicyRequest.new(parent: parent, endpoint_policy_id: endpoint_policy_id, endpoint_policy: endpoint_policy) 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 - c.create_endpoint_policy({ parent: parent, endpoint_policy_id: endpoint_policy_id, endpoint_policy: endpoint_policy }, 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 - c.create_endpoint_policy(::Google::Cloud::NetworkServices::V1::CreateEndpointPolicyRequest.new(parent: parent, endpoint_policy_id: endpoint_policy_id, endpoint_policy: endpoint_policy), 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_endpoint_policy_client_stub.call_rpc_count - end - end - - def test_update_endpoint_policy - # 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 = {} - endpoint_policy = {} - - update_endpoint_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_endpoint_policy, name - assert_kind_of ::Google::Cloud::NetworkServices::V1::UpdateEndpointPolicyRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::NetworkServices::V1::EndpointPolicy), request["endpoint_policy"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_endpoint_policy_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_endpoint_policy({ update_mask: update_mask, endpoint_policy: endpoint_policy }) 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 - c.update_endpoint_policy update_mask: update_mask, endpoint_policy: endpoint_policy 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 - c.update_endpoint_policy ::Google::Cloud::NetworkServices::V1::UpdateEndpointPolicyRequest.new(update_mask: update_mask, endpoint_policy: endpoint_policy) 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 - c.update_endpoint_policy({ update_mask: update_mask, endpoint_policy: endpoint_policy }, 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 - c.update_endpoint_policy(::Google::Cloud::NetworkServices::V1::UpdateEndpointPolicyRequest.new(update_mask: update_mask, endpoint_policy: endpoint_policy), 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_endpoint_policy_client_stub.call_rpc_count - end - end - - def test_delete_endpoint_policy - # 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_endpoint_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_endpoint_policy, name - assert_kind_of ::Google::Cloud::NetworkServices::V1::DeleteEndpointPolicyRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_endpoint_policy_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_endpoint_policy({ 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 - c.delete_endpoint_policy 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 - c.delete_endpoint_policy ::Google::Cloud::NetworkServices::V1::DeleteEndpointPolicyRequest.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 - c.delete_endpoint_policy({ 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 - c.delete_endpoint_policy(::Google::Cloud::NetworkServices::V1::DeleteEndpointPolicyRequest.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_endpoint_policy_client_stub.call_rpc_count - end - end - - def test_list_wasm_plugin_versions - # Create GRPC objects. - grpc_response = ::Google::Cloud::NetworkServices::V1::ListWasmPluginVersionsResponse.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" - - list_wasm_plugin_versions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_wasm_plugin_versions, name - assert_kind_of ::Google::Cloud::NetworkServices::V1::ListWasmPluginVersionsRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_wasm_plugin_versions_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_wasm_plugin_versions({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_wasm_plugin_versions parent: parent, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_wasm_plugin_versions ::Google::Cloud::NetworkServices::V1::ListWasmPluginVersionsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_wasm_plugin_versions({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_wasm_plugin_versions(::Google::Cloud::NetworkServices::V1::ListWasmPluginVersionsRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_wasm_plugin_versions_client_stub.call_rpc_count - end - end - - def test_get_wasm_plugin_version - # Create GRPC objects. - grpc_response = ::Google::Cloud::NetworkServices::V1::WasmPluginVersion.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_wasm_plugin_version_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_wasm_plugin_version, name - assert_kind_of ::Google::Cloud::NetworkServices::V1::GetWasmPluginVersionRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_wasm_plugin_version_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_wasm_plugin_version({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_wasm_plugin_version name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_wasm_plugin_version ::Google::Cloud::NetworkServices::V1::GetWasmPluginVersionRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_wasm_plugin_version({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_wasm_plugin_version(::Google::Cloud::NetworkServices::V1::GetWasmPluginVersionRequest.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_wasm_plugin_version_client_stub.call_rpc_count - end - end - - def test_create_wasm_plugin_version - # 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" - wasm_plugin_version_id = "hello world" - wasm_plugin_version = {} - - create_wasm_plugin_version_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_wasm_plugin_version, name - assert_kind_of ::Google::Cloud::NetworkServices::V1::CreateWasmPluginVersionRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["wasm_plugin_version_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::NetworkServices::V1::WasmPluginVersion), request["wasm_plugin_version"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_wasm_plugin_version_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.create_wasm_plugin_version({ parent: parent, wasm_plugin_version_id: wasm_plugin_version_id, wasm_plugin_version: wasm_plugin_version }) 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 - c.create_wasm_plugin_version parent: parent, wasm_plugin_version_id: wasm_plugin_version_id, wasm_plugin_version: wasm_plugin_version 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 - c.create_wasm_plugin_version ::Google::Cloud::NetworkServices::V1::CreateWasmPluginVersionRequest.new(parent: parent, wasm_plugin_version_id: wasm_plugin_version_id, wasm_plugin_version: wasm_plugin_version) 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 - c.create_wasm_plugin_version({ parent: parent, wasm_plugin_version_id: wasm_plugin_version_id, wasm_plugin_version: wasm_plugin_version }, 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 - c.create_wasm_plugin_version(::Google::Cloud::NetworkServices::V1::CreateWasmPluginVersionRequest.new(parent: parent, wasm_plugin_version_id: wasm_plugin_version_id, wasm_plugin_version: wasm_plugin_version), 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_wasm_plugin_version_client_stub.call_rpc_count - end - end - - def test_delete_wasm_plugin_version - # 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_wasm_plugin_version_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_wasm_plugin_version, name - assert_kind_of ::Google::Cloud::NetworkServices::V1::DeleteWasmPluginVersionRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_wasm_plugin_version_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_wasm_plugin_version({ 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 - c.delete_wasm_plugin_version 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 - c.delete_wasm_plugin_version ::Google::Cloud::NetworkServices::V1::DeleteWasmPluginVersionRequest.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 - c.delete_wasm_plugin_version({ 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 - c.delete_wasm_plugin_version(::Google::Cloud::NetworkServices::V1::DeleteWasmPluginVersionRequest.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_wasm_plugin_version_client_stub.call_rpc_count - end - end - - def test_list_wasm_plugins - # Create GRPC objects. - grpc_response = ::Google::Cloud::NetworkServices::V1::ListWasmPluginsResponse.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" - - list_wasm_plugins_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_wasm_plugins, name - assert_kind_of ::Google::Cloud::NetworkServices::V1::ListWasmPluginsRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_wasm_plugins_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_wasm_plugins({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_wasm_plugins parent: parent, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_wasm_plugins ::Google::Cloud::NetworkServices::V1::ListWasmPluginsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_wasm_plugins({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_wasm_plugins(::Google::Cloud::NetworkServices::V1::ListWasmPluginsRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_wasm_plugins_client_stub.call_rpc_count - end - end - - def test_get_wasm_plugin - # Create GRPC objects. - grpc_response = ::Google::Cloud::NetworkServices::V1::WasmPlugin.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" - view = :WASM_PLUGIN_VIEW_UNSPECIFIED - - get_wasm_plugin_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_wasm_plugin, name - assert_kind_of ::Google::Cloud::NetworkServices::V1::GetWasmPluginRequest, request - assert_equal "hello world", request["name"] - assert_equal :WASM_PLUGIN_VIEW_UNSPECIFIED, request["view"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_wasm_plugin_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_wasm_plugin({ name: name, view: view }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_wasm_plugin name: name, view: view do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_wasm_plugin ::Google::Cloud::NetworkServices::V1::GetWasmPluginRequest.new(name: name, view: view) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_wasm_plugin({ name: name, view: view }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_wasm_plugin(::Google::Cloud::NetworkServices::V1::GetWasmPluginRequest.new(name: name, view: view), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_wasm_plugin_client_stub.call_rpc_count - end - end - - def test_create_wasm_plugin - # 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" - wasm_plugin_id = "hello world" - wasm_plugin = {} - - create_wasm_plugin_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_wasm_plugin, name - assert_kind_of ::Google::Cloud::NetworkServices::V1::CreateWasmPluginRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["wasm_plugin_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::NetworkServices::V1::WasmPlugin), request["wasm_plugin"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_wasm_plugin_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.create_wasm_plugin({ parent: parent, wasm_plugin_id: wasm_plugin_id, wasm_plugin: wasm_plugin }) 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 - c.create_wasm_plugin parent: parent, wasm_plugin_id: wasm_plugin_id, wasm_plugin: wasm_plugin 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 - c.create_wasm_plugin ::Google::Cloud::NetworkServices::V1::CreateWasmPluginRequest.new(parent: parent, wasm_plugin_id: wasm_plugin_id, wasm_plugin: wasm_plugin) 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 - c.create_wasm_plugin({ parent: parent, wasm_plugin_id: wasm_plugin_id, wasm_plugin: wasm_plugin }, 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 - c.create_wasm_plugin(::Google::Cloud::NetworkServices::V1::CreateWasmPluginRequest.new(parent: parent, wasm_plugin_id: wasm_plugin_id, wasm_plugin: wasm_plugin), 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_wasm_plugin_client_stub.call_rpc_count - end - end - - def test_update_wasm_plugin - # 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 = {} - wasm_plugin = {} - - update_wasm_plugin_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_wasm_plugin, name - assert_kind_of ::Google::Cloud::NetworkServices::V1::UpdateWasmPluginRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::NetworkServices::V1::WasmPlugin), request["wasm_plugin"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_wasm_plugin_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_wasm_plugin({ update_mask: update_mask, wasm_plugin: wasm_plugin }) 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 - c.update_wasm_plugin update_mask: update_mask, wasm_plugin: wasm_plugin 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 - c.update_wasm_plugin ::Google::Cloud::NetworkServices::V1::UpdateWasmPluginRequest.new(update_mask: update_mask, wasm_plugin: wasm_plugin) 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 - c.update_wasm_plugin({ update_mask: update_mask, wasm_plugin: wasm_plugin }, 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 - c.update_wasm_plugin(::Google::Cloud::NetworkServices::V1::UpdateWasmPluginRequest.new(update_mask: update_mask, wasm_plugin: wasm_plugin), 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_wasm_plugin_client_stub.call_rpc_count - end - end - - def test_delete_wasm_plugin - # 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_wasm_plugin_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_wasm_plugin, name - assert_kind_of ::Google::Cloud::NetworkServices::V1::DeleteWasmPluginRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_wasm_plugin_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_wasm_plugin({ 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 - c.delete_wasm_plugin 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 - c.delete_wasm_plugin ::Google::Cloud::NetworkServices::V1::DeleteWasmPluginRequest.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 - c.delete_wasm_plugin({ 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 - c.delete_wasm_plugin(::Google::Cloud::NetworkServices::V1::DeleteWasmPluginRequest.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_wasm_plugin_client_stub.call_rpc_count - end - end - - def test_list_gateways - # Create GRPC objects. - grpc_response = ::Google::Cloud::NetworkServices::V1::ListGatewaysResponse.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" - - list_gateways_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_gateways, name - assert_kind_of ::Google::Cloud::NetworkServices::V1::ListGatewaysRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_gateways_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_gateways({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_gateways parent: parent, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_gateways ::Google::Cloud::NetworkServices::V1::ListGatewaysRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_gateways({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_gateways(::Google::Cloud::NetworkServices::V1::ListGatewaysRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_gateways_client_stub.call_rpc_count - end - end - - def test_get_gateway - # Create GRPC objects. - grpc_response = ::Google::Cloud::NetworkServices::V1::Gateway.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_gateway_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_gateway, name - assert_kind_of ::Google::Cloud::NetworkServices::V1::GetGatewayRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_gateway_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_gateway({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_gateway name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_gateway ::Google::Cloud::NetworkServices::V1::GetGatewayRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_gateway({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_gateway(::Google::Cloud::NetworkServices::V1::GetGatewayRequest.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_gateway_client_stub.call_rpc_count - end - end - - def test_create_gateway - # 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" - gateway_id = "hello world" - gateway = {} - - create_gateway_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_gateway, name - assert_kind_of ::Google::Cloud::NetworkServices::V1::CreateGatewayRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["gateway_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::NetworkServices::V1::Gateway), request["gateway"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_gateway_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.create_gateway({ parent: parent, gateway_id: gateway_id, gateway: gateway }) 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 - c.create_gateway parent: parent, gateway_id: gateway_id, gateway: gateway 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 - c.create_gateway ::Google::Cloud::NetworkServices::V1::CreateGatewayRequest.new(parent: parent, gateway_id: gateway_id, gateway: gateway) 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 - c.create_gateway({ parent: parent, gateway_id: gateway_id, gateway: gateway }, 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 - c.create_gateway(::Google::Cloud::NetworkServices::V1::CreateGatewayRequest.new(parent: parent, gateway_id: gateway_id, gateway: gateway), 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_gateway_client_stub.call_rpc_count - end - end - - def test_update_gateway - # 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 = {} - gateway = {} - - update_gateway_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_gateway, name - assert_kind_of ::Google::Cloud::NetworkServices::V1::UpdateGatewayRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::NetworkServices::V1::Gateway), request["gateway"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_gateway_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_gateway({ update_mask: update_mask, gateway: gateway }) 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 - c.update_gateway update_mask: update_mask, gateway: gateway 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 - c.update_gateway ::Google::Cloud::NetworkServices::V1::UpdateGatewayRequest.new(update_mask: update_mask, gateway: gateway) 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 - c.update_gateway({ update_mask: update_mask, gateway: gateway }, 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 - c.update_gateway(::Google::Cloud::NetworkServices::V1::UpdateGatewayRequest.new(update_mask: update_mask, gateway: gateway), 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_gateway_client_stub.call_rpc_count - end - end - - def test_delete_gateway - # 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_gateway_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_gateway, name - assert_kind_of ::Google::Cloud::NetworkServices::V1::DeleteGatewayRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_gateway_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_gateway({ 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 - c.delete_gateway 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 - c.delete_gateway ::Google::Cloud::NetworkServices::V1::DeleteGatewayRequest.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 - c.delete_gateway({ 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 - c.delete_gateway(::Google::Cloud::NetworkServices::V1::DeleteGatewayRequest.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_gateway_client_stub.call_rpc_count - end - end - - def test_list_grpc_routes - # Create GRPC objects. - grpc_response = ::Google::Cloud::NetworkServices::V1::ListGrpcRoutesResponse.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" - return_partial_success = true - - list_grpc_routes_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_grpc_routes, name - assert_kind_of ::Google::Cloud::NetworkServices::V1::ListGrpcRoutesRequest, request - assert_equal "hello world", request["parent"] - 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_grpc_routes_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_grpc_routes({ parent: parent, 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 - c.list_grpc_routes parent: parent, 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 - c.list_grpc_routes ::Google::Cloud::NetworkServices::V1::ListGrpcRoutesRequest.new(parent: parent, 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 - c.list_grpc_routes({ parent: parent, 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 - c.list_grpc_routes(::Google::Cloud::NetworkServices::V1::ListGrpcRoutesRequest.new(parent: parent, 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_grpc_routes_client_stub.call_rpc_count - end - end - - def test_get_grpc_route - # Create GRPC objects. - grpc_response = ::Google::Cloud::NetworkServices::V1::GrpcRoute.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_grpc_route_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_grpc_route, name - assert_kind_of ::Google::Cloud::NetworkServices::V1::GetGrpcRouteRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_grpc_route_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_grpc_route({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_grpc_route name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_grpc_route ::Google::Cloud::NetworkServices::V1::GetGrpcRouteRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_grpc_route({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_grpc_route(::Google::Cloud::NetworkServices::V1::GetGrpcRouteRequest.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_grpc_route_client_stub.call_rpc_count - end - end - - def test_create_grpc_route - # 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" - grpc_route_id = "hello world" - grpc_route = {} - - create_grpc_route_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_grpc_route, name - assert_kind_of ::Google::Cloud::NetworkServices::V1::CreateGrpcRouteRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["grpc_route_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::NetworkServices::V1::GrpcRoute), request["grpc_route"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_grpc_route_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.create_grpc_route({ parent: parent, grpc_route_id: grpc_route_id, grpc_route: grpc_route }) 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 - c.create_grpc_route parent: parent, grpc_route_id: grpc_route_id, grpc_route: grpc_route 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 - c.create_grpc_route ::Google::Cloud::NetworkServices::V1::CreateGrpcRouteRequest.new(parent: parent, grpc_route_id: grpc_route_id, grpc_route: grpc_route) 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 - c.create_grpc_route({ parent: parent, grpc_route_id: grpc_route_id, grpc_route: grpc_route }, 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 - c.create_grpc_route(::Google::Cloud::NetworkServices::V1::CreateGrpcRouteRequest.new(parent: parent, grpc_route_id: grpc_route_id, grpc_route: grpc_route), 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_grpc_route_client_stub.call_rpc_count - end - end - - def test_update_grpc_route - # 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 = {} - grpc_route = {} - - update_grpc_route_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_grpc_route, name - assert_kind_of ::Google::Cloud::NetworkServices::V1::UpdateGrpcRouteRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::NetworkServices::V1::GrpcRoute), request["grpc_route"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_grpc_route_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_grpc_route({ update_mask: update_mask, grpc_route: grpc_route }) 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 - c.update_grpc_route update_mask: update_mask, grpc_route: grpc_route 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 - c.update_grpc_route ::Google::Cloud::NetworkServices::V1::UpdateGrpcRouteRequest.new(update_mask: update_mask, grpc_route: grpc_route) 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 - c.update_grpc_route({ update_mask: update_mask, grpc_route: grpc_route }, 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 - c.update_grpc_route(::Google::Cloud::NetworkServices::V1::UpdateGrpcRouteRequest.new(update_mask: update_mask, grpc_route: grpc_route), 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_grpc_route_client_stub.call_rpc_count - end - end - - def test_delete_grpc_route - # 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_grpc_route_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_grpc_route, name - assert_kind_of ::Google::Cloud::NetworkServices::V1::DeleteGrpcRouteRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_grpc_route_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_grpc_route({ 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 - c.delete_grpc_route 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 - c.delete_grpc_route ::Google::Cloud::NetworkServices::V1::DeleteGrpcRouteRequest.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 - c.delete_grpc_route({ 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 - c.delete_grpc_route(::Google::Cloud::NetworkServices::V1::DeleteGrpcRouteRequest.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_grpc_route_client_stub.call_rpc_count - end - end - - def test_list_http_routes - # Create GRPC objects. - grpc_response = ::Google::Cloud::NetworkServices::V1::ListHttpRoutesResponse.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" - return_partial_success = true - filter = "hello world" - - list_http_routes_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_http_routes, name - assert_kind_of ::Google::Cloud::NetworkServices::V1::ListHttpRoutesRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal true, request["return_partial_success"] - assert_equal "hello world", request["filter"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_http_routes_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_http_routes({ parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success, 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 - c.list_http_routes parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success, 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 - c.list_http_routes ::Google::Cloud::NetworkServices::V1::ListHttpRoutesRequest.new(parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success, 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 - c.list_http_routes({ parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success, 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 - c.list_http_routes(::Google::Cloud::NetworkServices::V1::ListHttpRoutesRequest.new(parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success, filter: filter), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_http_routes_client_stub.call_rpc_count - end - end - - def test_get_http_route - # Create GRPC objects. - grpc_response = ::Google::Cloud::NetworkServices::V1::HttpRoute.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_http_route_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_http_route, name - assert_kind_of ::Google::Cloud::NetworkServices::V1::GetHttpRouteRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_http_route_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_http_route({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_http_route name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_http_route ::Google::Cloud::NetworkServices::V1::GetHttpRouteRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_http_route({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_http_route(::Google::Cloud::NetworkServices::V1::GetHttpRouteRequest.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_http_route_client_stub.call_rpc_count - end - end - - def test_create_http_route - # 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" - http_route_id = "hello world" - http_route = {} - request_id = "hello world" - - create_http_route_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_http_route, name - assert_kind_of ::Google::Cloud::NetworkServices::V1::CreateHttpRouteRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["http_route_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::NetworkServices::V1::HttpRoute), request["http_route"] - assert_equal "hello world", request["request_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_http_route_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.create_http_route({ parent: parent, http_route_id: http_route_id, http_route: http_route, request_id: request_id }) 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 - c.create_http_route parent: parent, http_route_id: http_route_id, http_route: http_route, request_id: request_id 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 - c.create_http_route ::Google::Cloud::NetworkServices::V1::CreateHttpRouteRequest.new(parent: parent, http_route_id: http_route_id, http_route: http_route, request_id: request_id) 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 - c.create_http_route({ parent: parent, http_route_id: http_route_id, http_route: http_route, request_id: request_id }, 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 - c.create_http_route(::Google::Cloud::NetworkServices::V1::CreateHttpRouteRequest.new(parent: parent, http_route_id: http_route_id, http_route: http_route, request_id: request_id), 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_http_route_client_stub.call_rpc_count - end - end - - def test_update_http_route - # 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 = {} - http_route = {} - - update_http_route_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_http_route, name - assert_kind_of ::Google::Cloud::NetworkServices::V1::UpdateHttpRouteRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::NetworkServices::V1::HttpRoute), request["http_route"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_http_route_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_http_route({ update_mask: update_mask, http_route: http_route }) 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 - c.update_http_route update_mask: update_mask, http_route: http_route 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 - c.update_http_route ::Google::Cloud::NetworkServices::V1::UpdateHttpRouteRequest.new(update_mask: update_mask, http_route: http_route) 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 - c.update_http_route({ update_mask: update_mask, http_route: http_route }, 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 - c.update_http_route(::Google::Cloud::NetworkServices::V1::UpdateHttpRouteRequest.new(update_mask: update_mask, http_route: http_route), 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_http_route_client_stub.call_rpc_count - end - end - - def test_delete_http_route - # 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_http_route_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_http_route, name - assert_kind_of ::Google::Cloud::NetworkServices::V1::DeleteHttpRouteRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_http_route_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_http_route({ 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 - c.delete_http_route 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 - c.delete_http_route ::Google::Cloud::NetworkServices::V1::DeleteHttpRouteRequest.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 - c.delete_http_route({ 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 - c.delete_http_route(::Google::Cloud::NetworkServices::V1::DeleteHttpRouteRequest.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_http_route_client_stub.call_rpc_count - end - end - - def test_list_tcp_routes - # Create GRPC objects. - grpc_response = ::Google::Cloud::NetworkServices::V1::ListTcpRoutesResponse.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" - return_partial_success = true - - list_tcp_routes_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_tcp_routes, name - assert_kind_of ::Google::Cloud::NetworkServices::V1::ListTcpRoutesRequest, request - assert_equal "hello world", request["parent"] - 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_tcp_routes_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_tcp_routes({ parent: parent, 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 - c.list_tcp_routes parent: parent, 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 - c.list_tcp_routes ::Google::Cloud::NetworkServices::V1::ListTcpRoutesRequest.new(parent: parent, 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 - c.list_tcp_routes({ parent: parent, 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 - c.list_tcp_routes(::Google::Cloud::NetworkServices::V1::ListTcpRoutesRequest.new(parent: parent, 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_tcp_routes_client_stub.call_rpc_count - end - end - - def test_get_tcp_route - # Create GRPC objects. - grpc_response = ::Google::Cloud::NetworkServices::V1::TcpRoute.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_tcp_route_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_tcp_route, name - assert_kind_of ::Google::Cloud::NetworkServices::V1::GetTcpRouteRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_tcp_route_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_tcp_route({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_tcp_route name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_tcp_route ::Google::Cloud::NetworkServices::V1::GetTcpRouteRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_tcp_route({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_tcp_route(::Google::Cloud::NetworkServices::V1::GetTcpRouteRequest.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_tcp_route_client_stub.call_rpc_count - end - end - - def test_create_tcp_route - # 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" - tcp_route_id = "hello world" - tcp_route = {} - - create_tcp_route_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_tcp_route, name - assert_kind_of ::Google::Cloud::NetworkServices::V1::CreateTcpRouteRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["tcp_route_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::NetworkServices::V1::TcpRoute), request["tcp_route"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_tcp_route_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.create_tcp_route({ parent: parent, tcp_route_id: tcp_route_id, tcp_route: tcp_route }) 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 - c.create_tcp_route parent: parent, tcp_route_id: tcp_route_id, tcp_route: tcp_route 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 - c.create_tcp_route ::Google::Cloud::NetworkServices::V1::CreateTcpRouteRequest.new(parent: parent, tcp_route_id: tcp_route_id, tcp_route: tcp_route) 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 - c.create_tcp_route({ parent: parent, tcp_route_id: tcp_route_id, tcp_route: tcp_route }, 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 - c.create_tcp_route(::Google::Cloud::NetworkServices::V1::CreateTcpRouteRequest.new(parent: parent, tcp_route_id: tcp_route_id, tcp_route: tcp_route), 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_tcp_route_client_stub.call_rpc_count - end - end - - def test_update_tcp_route - # 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 = {} - tcp_route = {} - - update_tcp_route_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_tcp_route, name - assert_kind_of ::Google::Cloud::NetworkServices::V1::UpdateTcpRouteRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::NetworkServices::V1::TcpRoute), request["tcp_route"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_tcp_route_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_tcp_route({ update_mask: update_mask, tcp_route: tcp_route }) 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 - c.update_tcp_route update_mask: update_mask, tcp_route: tcp_route 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 - c.update_tcp_route ::Google::Cloud::NetworkServices::V1::UpdateTcpRouteRequest.new(update_mask: update_mask, tcp_route: tcp_route) 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 - c.update_tcp_route({ update_mask: update_mask, tcp_route: tcp_route }, 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 - c.update_tcp_route(::Google::Cloud::NetworkServices::V1::UpdateTcpRouteRequest.new(update_mask: update_mask, tcp_route: tcp_route), 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_tcp_route_client_stub.call_rpc_count - end - end - - def test_delete_tcp_route - # 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_tcp_route_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_tcp_route, name - assert_kind_of ::Google::Cloud::NetworkServices::V1::DeleteTcpRouteRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_tcp_route_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_tcp_route({ 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 - c.delete_tcp_route 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 - c.delete_tcp_route ::Google::Cloud::NetworkServices::V1::DeleteTcpRouteRequest.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 - c.delete_tcp_route({ 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 - c.delete_tcp_route(::Google::Cloud::NetworkServices::V1::DeleteTcpRouteRequest.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_tcp_route_client_stub.call_rpc_count - end - end - - def test_list_tls_routes - # Create GRPC objects. - grpc_response = ::Google::Cloud::NetworkServices::V1::ListTlsRoutesResponse.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" - return_partial_success = true - - list_tls_routes_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_tls_routes, name - assert_kind_of ::Google::Cloud::NetworkServices::V1::ListTlsRoutesRequest, request - assert_equal "hello world", request["parent"] - 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_tls_routes_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_tls_routes({ parent: parent, 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 - c.list_tls_routes parent: parent, 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 - c.list_tls_routes ::Google::Cloud::NetworkServices::V1::ListTlsRoutesRequest.new(parent: parent, 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 - c.list_tls_routes({ parent: parent, 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 - c.list_tls_routes(::Google::Cloud::NetworkServices::V1::ListTlsRoutesRequest.new(parent: parent, 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_tls_routes_client_stub.call_rpc_count - end - end - - def test_get_tls_route - # Create GRPC objects. - grpc_response = ::Google::Cloud::NetworkServices::V1::TlsRoute.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_tls_route_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_tls_route, name - assert_kind_of ::Google::Cloud::NetworkServices::V1::GetTlsRouteRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_tls_route_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_tls_route({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_tls_route name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_tls_route ::Google::Cloud::NetworkServices::V1::GetTlsRouteRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_tls_route({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_tls_route(::Google::Cloud::NetworkServices::V1::GetTlsRouteRequest.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_tls_route_client_stub.call_rpc_count - end - end - - def test_create_tls_route - # 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" - tls_route_id = "hello world" - tls_route = {} - - create_tls_route_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_tls_route, name - assert_kind_of ::Google::Cloud::NetworkServices::V1::CreateTlsRouteRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["tls_route_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::NetworkServices::V1::TlsRoute), request["tls_route"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_tls_route_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.create_tls_route({ parent: parent, tls_route_id: tls_route_id, tls_route: tls_route }) 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 - c.create_tls_route parent: parent, tls_route_id: tls_route_id, tls_route: tls_route 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 - c.create_tls_route ::Google::Cloud::NetworkServices::V1::CreateTlsRouteRequest.new(parent: parent, tls_route_id: tls_route_id, tls_route: tls_route) 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 - c.create_tls_route({ parent: parent, tls_route_id: tls_route_id, tls_route: tls_route }, 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 - c.create_tls_route(::Google::Cloud::NetworkServices::V1::CreateTlsRouteRequest.new(parent: parent, tls_route_id: tls_route_id, tls_route: tls_route), 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_tls_route_client_stub.call_rpc_count - end - end - - def test_update_tls_route - # 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 = {} - tls_route = {} - - update_tls_route_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_tls_route, name - assert_kind_of ::Google::Cloud::NetworkServices::V1::UpdateTlsRouteRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::NetworkServices::V1::TlsRoute), request["tls_route"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_tls_route_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_tls_route({ update_mask: update_mask, tls_route: tls_route }) 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 - c.update_tls_route update_mask: update_mask, tls_route: tls_route 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 - c.update_tls_route ::Google::Cloud::NetworkServices::V1::UpdateTlsRouteRequest.new(update_mask: update_mask, tls_route: tls_route) 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 - c.update_tls_route({ update_mask: update_mask, tls_route: tls_route }, 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 - c.update_tls_route(::Google::Cloud::NetworkServices::V1::UpdateTlsRouteRequest.new(update_mask: update_mask, tls_route: tls_route), 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_tls_route_client_stub.call_rpc_count - end - end - - def test_delete_tls_route - # 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_tls_route_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_tls_route, name - assert_kind_of ::Google::Cloud::NetworkServices::V1::DeleteTlsRouteRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_tls_route_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_tls_route({ 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 - c.delete_tls_route 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 - c.delete_tls_route ::Google::Cloud::NetworkServices::V1::DeleteTlsRouteRequest.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 - c.delete_tls_route({ 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 - c.delete_tls_route(::Google::Cloud::NetworkServices::V1::DeleteTlsRouteRequest.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_tls_route_client_stub.call_rpc_count - end - end - - def test_list_service_bindings - # Create GRPC objects. - grpc_response = ::Google::Cloud::NetworkServices::V1::ListServiceBindingsResponse.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" - - list_service_bindings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_service_bindings, name - assert_kind_of ::Google::Cloud::NetworkServices::V1::ListServiceBindingsRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_service_bindings_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_service_bindings({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_service_bindings parent: parent, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_service_bindings ::Google::Cloud::NetworkServices::V1::ListServiceBindingsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_service_bindings({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_service_bindings(::Google::Cloud::NetworkServices::V1::ListServiceBindingsRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_service_bindings_client_stub.call_rpc_count - end - end - - def test_get_service_binding - # Create GRPC objects. - grpc_response = ::Google::Cloud::NetworkServices::V1::ServiceBinding.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_service_binding_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_service_binding, name - assert_kind_of ::Google::Cloud::NetworkServices::V1::GetServiceBindingRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_service_binding_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_service_binding({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_service_binding name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_service_binding ::Google::Cloud::NetworkServices::V1::GetServiceBindingRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_service_binding({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_service_binding(::Google::Cloud::NetworkServices::V1::GetServiceBindingRequest.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_service_binding_client_stub.call_rpc_count - end - end - - def test_create_service_binding - # 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" - service_binding_id = "hello world" - service_binding = {} - - create_service_binding_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_service_binding, name - assert_kind_of ::Google::Cloud::NetworkServices::V1::CreateServiceBindingRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["service_binding_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::NetworkServices::V1::ServiceBinding), request["service_binding"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_service_binding_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.create_service_binding({ parent: parent, service_binding_id: service_binding_id, service_binding: service_binding }) 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 - c.create_service_binding parent: parent, service_binding_id: service_binding_id, service_binding: service_binding 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 - c.create_service_binding ::Google::Cloud::NetworkServices::V1::CreateServiceBindingRequest.new(parent: parent, service_binding_id: service_binding_id, service_binding: service_binding) 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 - c.create_service_binding({ parent: parent, service_binding_id: service_binding_id, service_binding: service_binding }, 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 - c.create_service_binding(::Google::Cloud::NetworkServices::V1::CreateServiceBindingRequest.new(parent: parent, service_binding_id: service_binding_id, service_binding: service_binding), 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_service_binding_client_stub.call_rpc_count - end - end - - def test_update_service_binding - # 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 = {} - service_binding = {} - - update_service_binding_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_service_binding, name - assert_kind_of ::Google::Cloud::NetworkServices::V1::UpdateServiceBindingRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::NetworkServices::V1::ServiceBinding), request["service_binding"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_service_binding_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_service_binding({ update_mask: update_mask, service_binding: service_binding }) 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 - c.update_service_binding update_mask: update_mask, service_binding: service_binding 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 - c.update_service_binding ::Google::Cloud::NetworkServices::V1::UpdateServiceBindingRequest.new(update_mask: update_mask, service_binding: service_binding) 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 - c.update_service_binding({ update_mask: update_mask, service_binding: service_binding }, 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 - c.update_service_binding(::Google::Cloud::NetworkServices::V1::UpdateServiceBindingRequest.new(update_mask: update_mask, service_binding: service_binding), 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_service_binding_client_stub.call_rpc_count - end - end - - def test_delete_service_binding - # 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_service_binding_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_service_binding, name - assert_kind_of ::Google::Cloud::NetworkServices::V1::DeleteServiceBindingRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_service_binding_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_service_binding({ 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 - c.delete_service_binding 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 - c.delete_service_binding ::Google::Cloud::NetworkServices::V1::DeleteServiceBindingRequest.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 - c.delete_service_binding({ 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 - c.delete_service_binding(::Google::Cloud::NetworkServices::V1::DeleteServiceBindingRequest.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_service_binding_client_stub.call_rpc_count - end - end - - def test_list_meshes - # Create GRPC objects. - grpc_response = ::Google::Cloud::NetworkServices::V1::ListMeshesResponse.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" - return_partial_success = true - - list_meshes_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_meshes, name - assert_kind_of ::Google::Cloud::NetworkServices::V1::ListMeshesRequest, request - assert_equal "hello world", request["parent"] - 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_meshes_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_meshes({ parent: parent, 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 - c.list_meshes parent: parent, 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 - c.list_meshes ::Google::Cloud::NetworkServices::V1::ListMeshesRequest.new(parent: parent, 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 - c.list_meshes({ parent: parent, 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 - c.list_meshes(::Google::Cloud::NetworkServices::V1::ListMeshesRequest.new(parent: parent, 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_meshes_client_stub.call_rpc_count - end - end - - def test_get_mesh - # Create GRPC objects. - grpc_response = ::Google::Cloud::NetworkServices::V1::Mesh.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_mesh_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_mesh, name - assert_kind_of ::Google::Cloud::NetworkServices::V1::GetMeshRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_mesh_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_mesh({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_mesh name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_mesh ::Google::Cloud::NetworkServices::V1::GetMeshRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_mesh({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_mesh(::Google::Cloud::NetworkServices::V1::GetMeshRequest.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_mesh_client_stub.call_rpc_count - end - end - - def test_create_mesh - # 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" - mesh_id = "hello world" - mesh = {} - - create_mesh_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_mesh, name - assert_kind_of ::Google::Cloud::NetworkServices::V1::CreateMeshRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["mesh_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::NetworkServices::V1::Mesh), request["mesh"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_mesh_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.create_mesh({ parent: parent, mesh_id: mesh_id, mesh: mesh }) 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 - c.create_mesh parent: parent, mesh_id: mesh_id, mesh: mesh 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 - c.create_mesh ::Google::Cloud::NetworkServices::V1::CreateMeshRequest.new(parent: parent, mesh_id: mesh_id, mesh: mesh) 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 - c.create_mesh({ parent: parent, mesh_id: mesh_id, mesh: mesh }, 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 - c.create_mesh(::Google::Cloud::NetworkServices::V1::CreateMeshRequest.new(parent: parent, mesh_id: mesh_id, mesh: mesh), 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_mesh_client_stub.call_rpc_count - end - end - - def test_update_mesh - # 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 = {} - mesh = {} - - update_mesh_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_mesh, name - assert_kind_of ::Google::Cloud::NetworkServices::V1::UpdateMeshRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::NetworkServices::V1::Mesh), request["mesh"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_mesh_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_mesh({ update_mask: update_mask, mesh: mesh }) 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 - c.update_mesh update_mask: update_mask, mesh: mesh 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 - c.update_mesh ::Google::Cloud::NetworkServices::V1::UpdateMeshRequest.new(update_mask: update_mask, mesh: mesh) 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 - c.update_mesh({ update_mask: update_mask, mesh: mesh }, 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 - c.update_mesh(::Google::Cloud::NetworkServices::V1::UpdateMeshRequest.new(update_mask: update_mask, mesh: mesh), 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_mesh_client_stub.call_rpc_count - end - end - - def test_delete_mesh - # 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_mesh_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_mesh, name - assert_kind_of ::Google::Cloud::NetworkServices::V1::DeleteMeshRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_mesh_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_mesh({ 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 - c.delete_mesh 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 - c.delete_mesh ::Google::Cloud::NetworkServices::V1::DeleteMeshRequest.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 - c.delete_mesh({ 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 - c.delete_mesh(::Google::Cloud::NetworkServices::V1::DeleteMeshRequest.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_mesh_client_stub.call_rpc_count - end - end - - def test_list_service_lb_policies - # Create GRPC objects. - grpc_response = ::Google::Cloud::NetworkServices::V1::ListServiceLbPoliciesResponse.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" - - list_service_lb_policies_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_service_lb_policies, name - assert_kind_of ::Google::Cloud::NetworkServices::V1::ListServiceLbPoliciesRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_service_lb_policies_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_service_lb_policies({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_service_lb_policies parent: parent, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_service_lb_policies ::Google::Cloud::NetworkServices::V1::ListServiceLbPoliciesRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_service_lb_policies({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_service_lb_policies(::Google::Cloud::NetworkServices::V1::ListServiceLbPoliciesRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_service_lb_policies_client_stub.call_rpc_count - end - end - - def test_get_service_lb_policy - # Create GRPC objects. - grpc_response = ::Google::Cloud::NetworkServices::V1::ServiceLbPolicy.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_service_lb_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_service_lb_policy, name - assert_kind_of ::Google::Cloud::NetworkServices::V1::GetServiceLbPolicyRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_service_lb_policy_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_service_lb_policy({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_service_lb_policy name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_service_lb_policy ::Google::Cloud::NetworkServices::V1::GetServiceLbPolicyRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_service_lb_policy({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_service_lb_policy(::Google::Cloud::NetworkServices::V1::GetServiceLbPolicyRequest.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_service_lb_policy_client_stub.call_rpc_count - end - end - - def test_create_service_lb_policy - # 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" - service_lb_policy_id = "hello world" - service_lb_policy = {} - - create_service_lb_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_service_lb_policy, name - assert_kind_of ::Google::Cloud::NetworkServices::V1::CreateServiceLbPolicyRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["service_lb_policy_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::NetworkServices::V1::ServiceLbPolicy), request["service_lb_policy"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_service_lb_policy_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.create_service_lb_policy({ parent: parent, service_lb_policy_id: service_lb_policy_id, service_lb_policy: service_lb_policy }) 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 - c.create_service_lb_policy parent: parent, service_lb_policy_id: service_lb_policy_id, service_lb_policy: service_lb_policy 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 - c.create_service_lb_policy ::Google::Cloud::NetworkServices::V1::CreateServiceLbPolicyRequest.new(parent: parent, service_lb_policy_id: service_lb_policy_id, service_lb_policy: service_lb_policy) 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 - c.create_service_lb_policy({ parent: parent, service_lb_policy_id: service_lb_policy_id, service_lb_policy: service_lb_policy }, 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 - c.create_service_lb_policy(::Google::Cloud::NetworkServices::V1::CreateServiceLbPolicyRequest.new(parent: parent, service_lb_policy_id: service_lb_policy_id, service_lb_policy: service_lb_policy), 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_service_lb_policy_client_stub.call_rpc_count - end - end - - def test_update_service_lb_policy - # 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 = {} - service_lb_policy = {} - - update_service_lb_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_service_lb_policy, name - assert_kind_of ::Google::Cloud::NetworkServices::V1::UpdateServiceLbPolicyRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::NetworkServices::V1::ServiceLbPolicy), request["service_lb_policy"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_service_lb_policy_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_service_lb_policy({ update_mask: update_mask, service_lb_policy: service_lb_policy }) 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 - c.update_service_lb_policy update_mask: update_mask, service_lb_policy: service_lb_policy 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 - c.update_service_lb_policy ::Google::Cloud::NetworkServices::V1::UpdateServiceLbPolicyRequest.new(update_mask: update_mask, service_lb_policy: service_lb_policy) 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 - c.update_service_lb_policy({ update_mask: update_mask, service_lb_policy: service_lb_policy }, 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 - c.update_service_lb_policy(::Google::Cloud::NetworkServices::V1::UpdateServiceLbPolicyRequest.new(update_mask: update_mask, service_lb_policy: service_lb_policy), 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_service_lb_policy_client_stub.call_rpc_count - end - end - - def test_delete_service_lb_policy - # 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_service_lb_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_service_lb_policy, name - assert_kind_of ::Google::Cloud::NetworkServices::V1::DeleteServiceLbPolicyRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_service_lb_policy_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_service_lb_policy({ 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 - c.delete_service_lb_policy 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 - c.delete_service_lb_policy ::Google::Cloud::NetworkServices::V1::DeleteServiceLbPolicyRequest.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 - c.delete_service_lb_policy({ 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 - c.delete_service_lb_policy(::Google::Cloud::NetworkServices::V1::DeleteServiceLbPolicyRequest.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_service_lb_policy_client_stub.call_rpc_count - end - end - - def test_get_gateway_route_view - # Create GRPC objects. - grpc_response = ::Google::Cloud::NetworkServices::V1::GatewayRouteView.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_gateway_route_view_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_gateway_route_view, name - assert_kind_of ::Google::Cloud::NetworkServices::V1::GetGatewayRouteViewRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_gateway_route_view_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_gateway_route_view({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_gateway_route_view name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_gateway_route_view ::Google::Cloud::NetworkServices::V1::GetGatewayRouteViewRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_gateway_route_view({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_gateway_route_view(::Google::Cloud::NetworkServices::V1::GetGatewayRouteViewRequest.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_gateway_route_view_client_stub.call_rpc_count - end - end - - def test_get_mesh_route_view - # Create GRPC objects. - grpc_response = ::Google::Cloud::NetworkServices::V1::MeshRouteView.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_mesh_route_view_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_mesh_route_view, name - assert_kind_of ::Google::Cloud::NetworkServices::V1::GetMeshRouteViewRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_mesh_route_view_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_mesh_route_view({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_mesh_route_view name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_mesh_route_view ::Google::Cloud::NetworkServices::V1::GetMeshRouteViewRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_mesh_route_view({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_mesh_route_view(::Google::Cloud::NetworkServices::V1::GetMeshRouteViewRequest.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_mesh_route_view_client_stub.call_rpc_count - end - end - - def test_list_gateway_route_views - # Create GRPC objects. - grpc_response = ::Google::Cloud::NetworkServices::V1::ListGatewayRouteViewsResponse.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" - - list_gateway_route_views_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_gateway_route_views, name - assert_kind_of ::Google::Cloud::NetworkServices::V1::ListGatewayRouteViewsRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_gateway_route_views_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_gateway_route_views({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_gateway_route_views parent: parent, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_gateway_route_views ::Google::Cloud::NetworkServices::V1::ListGatewayRouteViewsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_gateway_route_views({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_gateway_route_views(::Google::Cloud::NetworkServices::V1::ListGatewayRouteViewsRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_gateway_route_views_client_stub.call_rpc_count - end - end - - def test_list_mesh_route_views - # Create GRPC objects. - grpc_response = ::Google::Cloud::NetworkServices::V1::ListMeshRouteViewsResponse.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" - - list_mesh_route_views_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_mesh_route_views, name - assert_kind_of ::Google::Cloud::NetworkServices::V1::ListMeshRouteViewsRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_mesh_route_views_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_mesh_route_views({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_mesh_route_views parent: parent, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_mesh_route_views ::Google::Cloud::NetworkServices::V1::ListMeshRouteViewsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_mesh_route_views({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_mesh_route_views(::Google::Cloud::NetworkServices::V1::ListMeshRouteViewsRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_mesh_route_views_client_stub.call_rpc_count - end - end - - def test_list_agent_gateways - # Create GRPC objects. - grpc_response = ::Google::Cloud::NetworkServices::V1::ListAgentGatewaysResponse.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" - return_partial_success = true - - list_agent_gateways_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_agent_gateways, name - assert_kind_of ::Google::Cloud::NetworkServices::V1::ListAgentGatewaysRequest, request - assert_equal "hello world", request["parent"] - 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_agent_gateways_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_agent_gateways({ parent: parent, 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 - c.list_agent_gateways parent: parent, 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 - c.list_agent_gateways ::Google::Cloud::NetworkServices::V1::ListAgentGatewaysRequest.new(parent: parent, 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 - c.list_agent_gateways({ parent: parent, 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 - c.list_agent_gateways(::Google::Cloud::NetworkServices::V1::ListAgentGatewaysRequest.new(parent: parent, 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_agent_gateways_client_stub.call_rpc_count - end - end - - def test_get_agent_gateway - # Create GRPC objects. - grpc_response = ::Google::Cloud::NetworkServices::V1::AgentGateway.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_agent_gateway_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_agent_gateway, name - assert_kind_of ::Google::Cloud::NetworkServices::V1::GetAgentGatewayRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_agent_gateway_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_agent_gateway({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_agent_gateway name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_agent_gateway ::Google::Cloud::NetworkServices::V1::GetAgentGatewayRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_agent_gateway({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_agent_gateway(::Google::Cloud::NetworkServices::V1::GetAgentGatewayRequest.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_agent_gateway_client_stub.call_rpc_count - end - end - - def test_create_agent_gateway - # 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" - agent_gateway_id = "hello world" - agent_gateway = {} - - create_agent_gateway_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_agent_gateway, name - assert_kind_of ::Google::Cloud::NetworkServices::V1::CreateAgentGatewayRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["agent_gateway_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::NetworkServices::V1::AgentGateway), request["agent_gateway"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_agent_gateway_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.create_agent_gateway({ parent: parent, agent_gateway_id: agent_gateway_id, agent_gateway: agent_gateway }) 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 - c.create_agent_gateway parent: parent, agent_gateway_id: agent_gateway_id, agent_gateway: agent_gateway 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 - c.create_agent_gateway ::Google::Cloud::NetworkServices::V1::CreateAgentGatewayRequest.new(parent: parent, agent_gateway_id: agent_gateway_id, agent_gateway: agent_gateway) 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 - c.create_agent_gateway({ parent: parent, agent_gateway_id: agent_gateway_id, agent_gateway: agent_gateway }, 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 - c.create_agent_gateway(::Google::Cloud::NetworkServices::V1::CreateAgentGatewayRequest.new(parent: parent, agent_gateway_id: agent_gateway_id, agent_gateway: agent_gateway), 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_agent_gateway_client_stub.call_rpc_count - end - end - - def test_update_agent_gateway - # 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 = {} - agent_gateway = {} - - update_agent_gateway_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_agent_gateway, name - assert_kind_of ::Google::Cloud::NetworkServices::V1::UpdateAgentGatewayRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::NetworkServices::V1::AgentGateway), request["agent_gateway"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_agent_gateway_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_agent_gateway({ update_mask: update_mask, agent_gateway: agent_gateway }) 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 - c.update_agent_gateway update_mask: update_mask, agent_gateway: agent_gateway 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 - c.update_agent_gateway ::Google::Cloud::NetworkServices::V1::UpdateAgentGatewayRequest.new(update_mask: update_mask, agent_gateway: agent_gateway) 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 - c.update_agent_gateway({ update_mask: update_mask, agent_gateway: agent_gateway }, 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 - c.update_agent_gateway(::Google::Cloud::NetworkServices::V1::UpdateAgentGatewayRequest.new(update_mask: update_mask, agent_gateway: agent_gateway), 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_agent_gateway_client_stub.call_rpc_count - end - end - - def test_delete_agent_gateway - # 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" - etag = "hello world" - - delete_agent_gateway_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_agent_gateway, name - assert_kind_of ::Google::Cloud::NetworkServices::V1::DeleteAgentGatewayRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["etag"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_agent_gateway_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_agent_gateway({ name: name, etag: etag }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.delete_agent_gateway name: name, etag: etag do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.delete_agent_gateway ::Google::Cloud::NetworkServices::V1::DeleteAgentGatewayRequest.new(name: name, etag: etag) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.delete_agent_gateway({ name: name, etag: etag }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.delete_agent_gateway(::Google::Cloud::NetworkServices::V1::DeleteAgentGatewayRequest.new(name: name, etag: etag), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_agent_gateway_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::NetworkServices::V1::NetworkServices::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::NetworkServices::V1::NetworkServices::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::NetworkServices::V1::NetworkServices::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::NetworkServices::V1::NetworkServices::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::NetworkServices::V1::NetworkServices::Client.new do |config| - config.credentials = grpc_channel - end - end - - assert_kind_of ::Google::Cloud::NetworkServices::V1::NetworkServices::Operations, client.operations_client - end -end diff --git a/owl-bot-staging/google-cloud-network_services-v1/test/helper.rb b/owl-bot-staging/google-cloud-network_services-v1/test/helper.rb deleted file mode 100644 index 672b337030e7..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/test/helper.rb +++ /dev/null @@ -1,26 +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/mock" -require "minitest/rg" - -require "grpc" - -require "ostruct" From d7993bc8f1142fe85be48bdee8f7eec47098c817 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Thu, 11 Jun 2026 19:08:43 +0000 Subject: [PATCH 3/3] =?UTF-8?q?=F0=9F=A6=89=20Updates=20from=20OwlBot=20po?= =?UTF-8?q?st-processor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --- .../.owlbot-manifest.json | 7 + .../gapic_metadata.json | 25 + .../v1/network_services/client.rb | 575 +- .../v1/network_services/paths.rb | 38 + .../v1/network_services/rest/client.rb | 540 +- .../v1/network_services/rest/service_stub.rb | 307 + .../networkservices/v1/agent_gateway_pb.rb | 0 .../google/cloud/networkservices/v1/dep_pb.rb | 3 +- .../cloud/networkservices/v1/gateway_pb.rb | 2 +- .../cloud/networkservices/v1/http_route_pb.rb | 3 +- .../cloud/networkservices/v1/mesh_pb.rb | 2 +- .../networkservices/v1/network_services_pb.rb | 3 +- .../v1/network_services_services_pb.rb | 10 + .../networkservices/v1/service_binding_pb.rb | 3 +- .../cloud/networkservices/v1/tls_route_pb.rb | 2 +- .../cloud/networkservices/v1/agent_gateway.rb | 0 .../google/cloud/networkservices/v1/common.rb | 8 +- .../google/cloud/networkservices/v1/dep.rb | 117 +- .../networkservices/v1/endpoint_policy.rb | 10 +- .../cloud/networkservices/v1/extensibility.rb | 123 +- .../cloud/networkservices/v1/gateway.rb | 12 +- .../cloud/networkservices/v1/grpc_route.rb | 14 +- .../cloud/networkservices/v1/http_route.rb | 20 +- .../google/cloud/networkservices/v1/mesh.rb | 10 +- .../cloud/networkservices/v1/tcp_route.rb | 14 +- .../cloud/networkservices/v1/tls_route.rb | 22 +- .../network_services/create_agent_gateway.rb | 0 .../network_services/delete_agent_gateway.rb | 0 .../network_services/get_agent_gateway.rb | 0 .../network_services/list_agent_gateways.rb | 0 .../network_services/update_agent_gateway.rb | 0 ...adata_google.cloud.networkservices.v1.json | 200 + .../v1/network_services_paths_test.rb | 24 + .../v1/network_services_rest_test.rb | 299 +- .../v1/network_services_test.rb | 348 +- .../.gitignore | 22 - .../.repo-metadata.json | 17 - .../.rubocop.yml | 33 - .../google-cloud-network_services-v1/.toys.rb | 28 - .../.yardopts | 12 - .../AUTHENTICATION.md | 122 - .../CHANGELOG.md | 2 - .../google-cloud-network_services-v1/Gemfile | 14 - .../LICENSE.md | 201 - .../README.md | 154 - .../google-cloud-network_services-v1/Rakefile | 169 - .../gapic_metadata.json | 442 -- .../google-cloud-network_services-v1.gemspec | 30 - .../lib/google-cloud-network_services-v1.rb | 21 - .../lib/google/cloud/network_services/v1.rb | 46 - .../network_services/v1/bindings_override.rb | 252 - .../cloud/network_services/v1/dep_service.rb | 56 - .../network_services/v1/dep_service/client.rb | 2670 ------- .../v1/dep_service/credentials.rb | 47 - .../v1/dep_service/operations.rb | 843 -- .../network_services/v1/dep_service/paths.rb | 126 - .../network_services/v1/dep_service/rest.rb | 54 - .../v1/dep_service/rest/client.rb | 2496 ------ .../v1/dep_service/rest/operations.rb | 927 --- .../v1/dep_service/rest/service_stub.rb | 1309 ---- .../network_services/v1/network_services.rb | 56 - .../v1/network_services/client.rb | 6946 ----------------- .../v1/network_services/credentials.rb | 47 - .../v1/network_services/operations.rb | 843 -- .../v1/network_services/paths.rb | 531 -- .../v1/network_services/rest.rb | 54 - .../v1/network_services/rest/client.rb | 6471 --------------- .../v1/network_services/rest/operations.rb | 927 --- .../v1/network_services/rest/service_stub.rb | 3947 ---------- .../google/cloud/network_services/v1/rest.rb | 39 - .../cloud/network_services/v1/version.rb | 28 - .../cloud/networkservices/v1/common_pb.rb | 30 - .../google/cloud/networkservices/v1/dep_pb.rb | 68 - .../networkservices/v1/dep_services_pb.rb | 86 - .../networkservices/v1/endpoint_policy_pb.rb | 34 - .../networkservices/v1/extensibility_pb.rb | 43 - .../cloud/networkservices/v1/gateway_pb.rb | 36 - .../cloud/networkservices/v1/grpc_route_pb.rb | 46 - .../cloud/networkservices/v1/http_route_pb.rb | 53 - .../cloud/networkservices/v1/mesh_pb.rb | 33 - .../networkservices/v1/network_services_pb.rb | 38 - .../v1/network_services_services_pb.rb | 173 - .../cloud/networkservices/v1/route_view_pb.rb | 31 - .../networkservices/v1/service_binding_pb.rb | 33 - .../v1/service_lb_policy_pb.rb | 38 - .../cloud/networkservices/v1/tcp_route_pb.rb | 37 - .../cloud/networkservices/v1/tls_route_pb.rb | 37 - .../proto_docs/README.md | 4 - .../proto_docs/google/api/client.rb | 593 -- .../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 - .../google/cloud/networkservices/v1/common.rb | 164 - .../google/cloud/networkservices/v1/dep.rb | 1209 --- .../networkservices/v1/endpoint_policy.rb | 205 - .../cloud/networkservices/v1/extensibility.rb | 575 -- .../cloud/networkservices/v1/gateway.rb | 285 - .../cloud/networkservices/v1/grpc_route.rb | 474 -- .../cloud/networkservices/v1/http_route.rb | 785 -- .../google/cloud/networkservices/v1/mesh.rb | 170 - .../cloud/networkservices/v1/route_view.rb | 168 - .../networkservices/v1/service_binding.rb | 168 - .../networkservices/v1/service_lb_policy.rb | 258 - .../cloud/networkservices/v1/tcp_route.rb | 263 - .../cloud/networkservices/v1/tls_route.rb | 256 - .../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/struct.rb | 108 - .../proto_docs/google/protobuf/timestamp.rb | 127 - .../proto_docs/google/rpc/status.rb | 48 - .../proto_docs/google/type/expr.rb | 75 - .../snippets/Gemfile | 32 - .../dep_service/create_authz_extension.rb | 54 - .../dep_service/create_lb_edge_extension.rb | 54 - .../dep_service/create_lb_route_extension.rb | 54 - .../create_lb_traffic_extension.rb | 54 - .../dep_service/delete_authz_extension.rb | 54 - .../dep_service/delete_lb_edge_extension.rb | 54 - .../dep_service/delete_lb_route_extension.rb | 54 - .../delete_lb_traffic_extension.rb | 54 - .../dep_service/get_authz_extension.rb | 47 - .../dep_service/get_lb_edge_extension.rb | 47 - .../dep_service/get_lb_route_extension.rb | 47 - .../dep_service/get_lb_traffic_extension.rb | 47 - .../dep_service/list_authz_extensions.rb | 51 - .../dep_service/list_lb_edge_extensions.rb | 51 - .../dep_service/list_lb_route_extensions.rb | 51 - .../dep_service/list_lb_traffic_extensions.rb | 51 - .../dep_service/update_authz_extension.rb | 54 - .../dep_service/update_lb_edge_extension.rb | 54 - .../dep_service/update_lb_route_extension.rb | 54 - .../update_lb_traffic_extension.rb | 54 - .../create_endpoint_policy.rb | 54 - .../network_services/create_gateway.rb | 54 - .../network_services/create_grpc_route.rb | 54 - .../network_services/create_http_route.rb | 54 - .../snippets/network_services/create_mesh.rb | 54 - .../create_service_binding.rb | 54 - .../create_service_lb_policy.rb | 54 - .../network_services/create_tcp_route.rb | 54 - .../network_services/create_tls_route.rb | 54 - .../network_services/create_wasm_plugin.rb | 54 - .../create_wasm_plugin_version.rb | 54 - .../delete_endpoint_policy.rb | 54 - .../network_services/delete_gateway.rb | 54 - .../network_services/delete_grpc_route.rb | 54 - .../network_services/delete_http_route.rb | 54 - .../snippets/network_services/delete_mesh.rb | 54 - .../delete_service_binding.rb | 54 - .../delete_service_lb_policy.rb | 54 - .../network_services/delete_tcp_route.rb | 54 - .../network_services/delete_tls_route.rb | 54 - .../network_services/delete_wasm_plugin.rb | 54 - .../delete_wasm_plugin_version.rb | 54 - .../network_services/get_endpoint_policy.rb | 47 - .../snippets/network_services/get_gateway.rb | 47 - .../get_gateway_route_view.rb | 47 - .../network_services/get_grpc_route.rb | 47 - .../network_services/get_http_route.rb | 47 - .../snippets/network_services/get_mesh.rb | 47 - .../network_services/get_mesh_route_view.rb | 47 - .../network_services/get_service_binding.rb | 47 - .../network_services/get_service_lb_policy.rb | 47 - .../network_services/get_tcp_route.rb | 47 - .../network_services/get_tls_route.rb | 47 - .../network_services/get_wasm_plugin.rb | 47 - .../get_wasm_plugin_version.rb | 47 - .../list_endpoint_policies.rb | 51 - .../list_gateway_route_views.rb | 51 - .../network_services/list_gateways.rb | 51 - .../network_services/list_grpc_routes.rb | 51 - .../network_services/list_http_routes.rb | 51 - .../network_services/list_mesh_route_views.rb | 51 - .../snippets/network_services/list_meshes.rb | 51 - .../network_services/list_service_bindings.rb | 51 - .../list_service_lb_policies.rb | 51 - .../network_services/list_tcp_routes.rb | 51 - .../network_services/list_tls_routes.rb | 51 - .../list_wasm_plugin_versions.rb | 51 - .../network_services/list_wasm_plugins.rb | 51 - .../update_endpoint_policy.rb | 54 - .../network_services/update_gateway.rb | 54 - .../network_services/update_grpc_route.rb | 54 - .../network_services/update_http_route.rb | 54 - .../snippets/network_services/update_mesh.rb | 54 - .../update_service_binding.rb | 54 - .../update_service_lb_policy.rb | 54 - .../network_services/update_tcp_route.rb | 54 - .../network_services/update_tls_route.rb | 54 - .../network_services/update_wasm_plugin.rb | 54 - ...adata_google.cloud.networkservices.v1.json | 3335 -------- .../v1/dep_service_operations_test.rb | 400 - .../v1/dep_service_paths_test.rb | 103 - .../v1/dep_service_rest_test.rb | 1219 --- .../network_services/v1/dep_service_test.rb | 1438 ---- .../v1/network_services_operations_test.rb | 400 - .../v1/network_services_paths_test.rb | 355 - .../v1/network_services_rest_test.rb | 3575 --------- .../v1/network_services_test.rb | 4165 ---------- .../test/helper.rb | 26 - 204 files changed, 2579 insertions(+), 57153 deletions(-) rename {owl-bot-staging/google-cloud-network_services-v1 => google-cloud-network_services-v1}/lib/google/cloud/networkservices/v1/agent_gateway_pb.rb (100%) rename {owl-bot-staging/google-cloud-network_services-v1 => google-cloud-network_services-v1}/proto_docs/google/cloud/networkservices/v1/agent_gateway.rb (100%) rename {owl-bot-staging/google-cloud-network_services-v1 => google-cloud-network_services-v1}/snippets/network_services/create_agent_gateway.rb (100%) rename {owl-bot-staging/google-cloud-network_services-v1 => google-cloud-network_services-v1}/snippets/network_services/delete_agent_gateway.rb (100%) rename {owl-bot-staging/google-cloud-network_services-v1 => google-cloud-network_services-v1}/snippets/network_services/get_agent_gateway.rb (100%) rename {owl-bot-staging/google-cloud-network_services-v1 => google-cloud-network_services-v1}/snippets/network_services/list_agent_gateways.rb (100%) rename {owl-bot-staging/google-cloud-network_services-v1 => google-cloud-network_services-v1}/snippets/network_services/update_agent_gateway.rb (100%) delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/.gitignore delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/.repo-metadata.json delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/.rubocop.yml delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/.toys.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/.yardopts delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/CHANGELOG.md delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/Gemfile delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/LICENSE.md delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/README.md delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/Rakefile delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/gapic_metadata.json delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/google-cloud-network_services-v1.gemspec delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/lib/google-cloud-network_services-v1.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/bindings_override.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/dep_service.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/dep_service/client.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/dep_service/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/dep_service/operations.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/dep_service/paths.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/dep_service/rest.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/dep_service/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/dep_service/rest/operations.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/dep_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/network_services.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/network_services/client.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/network_services/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/network_services/operations.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/network_services/paths.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/network_services/rest.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/network_services/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/network_services/rest/operations.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/network_services/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/rest.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/version.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/common_pb.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/dep_pb.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/dep_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/endpoint_policy_pb.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/extensibility_pb.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/gateway_pb.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/grpc_route_pb.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/http_route_pb.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/mesh_pb.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/network_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/network_services_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/route_view_pb.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/service_binding_pb.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/service_lb_policy_pb.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/tcp_route_pb.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/tls_route_pb.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/proto_docs/README.md delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/api/field_info.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/common.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/dep.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/endpoint_policy.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/extensibility.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/gateway.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/grpc_route.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/http_route.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/mesh.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/route_view.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/service_binding.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/service_lb_policy.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/tcp_route.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/tls_route.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/longrunning/operations.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/protobuf/any.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/protobuf/empty.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/protobuf/field_mask.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/protobuf/struct.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/protobuf/timestamp.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/rpc/status.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/type/expr.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/Gemfile delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/create_authz_extension.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/create_lb_edge_extension.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/create_lb_route_extension.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/create_lb_traffic_extension.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/delete_authz_extension.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/delete_lb_edge_extension.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/delete_lb_route_extension.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/delete_lb_traffic_extension.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/get_authz_extension.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/get_lb_edge_extension.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/get_lb_route_extension.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/get_lb_traffic_extension.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/list_authz_extensions.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/list_lb_edge_extensions.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/list_lb_route_extensions.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/list_lb_traffic_extensions.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/update_authz_extension.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/update_lb_edge_extension.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/update_lb_route_extension.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/update_lb_traffic_extension.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/create_endpoint_policy.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/create_gateway.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/create_grpc_route.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/create_http_route.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/create_mesh.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/create_service_binding.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/create_service_lb_policy.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/create_tcp_route.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/create_tls_route.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/create_wasm_plugin.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/create_wasm_plugin_version.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/delete_endpoint_policy.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/delete_gateway.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/delete_grpc_route.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/delete_http_route.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/delete_mesh.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/delete_service_binding.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/delete_service_lb_policy.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/delete_tcp_route.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/delete_tls_route.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/delete_wasm_plugin.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/delete_wasm_plugin_version.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/get_endpoint_policy.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/get_gateway.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/get_gateway_route_view.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/get_grpc_route.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/get_http_route.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/get_mesh.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/get_mesh_route_view.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/get_service_binding.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/get_service_lb_policy.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/get_tcp_route.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/get_tls_route.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/get_wasm_plugin.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/get_wasm_plugin_version.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/list_endpoint_policies.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/list_gateway_route_views.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/list_gateways.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/list_grpc_routes.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/list_http_routes.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/list_mesh_route_views.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/list_meshes.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/list_service_bindings.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/list_service_lb_policies.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/list_tcp_routes.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/list_tls_routes.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/list_wasm_plugin_versions.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/list_wasm_plugins.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/update_endpoint_policy.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/update_gateway.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/update_grpc_route.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/update_http_route.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/update_mesh.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/update_service_binding.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/update_service_lb_policy.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/update_tcp_route.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/update_tls_route.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/update_wasm_plugin.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/snippets/snippet_metadata_google.cloud.networkservices.v1.json delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/test/google/cloud/network_services/v1/dep_service_operations_test.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/test/google/cloud/network_services/v1/dep_service_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/test/google/cloud/network_services/v1/dep_service_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/test/google/cloud/network_services/v1/dep_service_test.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/test/google/cloud/network_services/v1/network_services_operations_test.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/test/google/cloud/network_services/v1/network_services_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/test/google/cloud/network_services/v1/network_services_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/test/google/cloud/network_services/v1/network_services_test.rb delete mode 100644 owl-bot-staging/google-cloud-network_services-v1/test/helper.rb diff --git a/google-cloud-network_services-v1/.owlbot-manifest.json b/google-cloud-network_services-v1/.owlbot-manifest.json index 37ba38c21678..917a37200d38 100644 --- a/google-cloud-network_services-v1/.owlbot-manifest.json +++ b/google-cloud-network_services-v1/.owlbot-manifest.json @@ -36,6 +36,7 @@ "lib/google/cloud/network_services/v1/network_services/rest/service_stub.rb", "lib/google/cloud/network_services/v1/rest.rb", "lib/google/cloud/network_services/v1/version.rb", + "lib/google/cloud/networkservices/v1/agent_gateway_pb.rb", "lib/google/cloud/networkservices/v1/common_pb.rb", "lib/google/cloud/networkservices/v1/dep_pb.rb", "lib/google/cloud/networkservices/v1/dep_services_pb.rb", @@ -58,6 +59,7 @@ "proto_docs/google/api/field_info.rb", "proto_docs/google/api/launch_stage.rb", "proto_docs/google/api/resource.rb", + "proto_docs/google/cloud/networkservices/v1/agent_gateway.rb", "proto_docs/google/cloud/networkservices/v1/common.rb", "proto_docs/google/cloud/networkservices/v1/dep.rb", "proto_docs/google/cloud/networkservices/v1/endpoint_policy.rb", @@ -101,6 +103,7 @@ "snippets/dep_service/update_lb_edge_extension.rb", "snippets/dep_service/update_lb_route_extension.rb", "snippets/dep_service/update_lb_traffic_extension.rb", + "snippets/network_services/create_agent_gateway.rb", "snippets/network_services/create_endpoint_policy.rb", "snippets/network_services/create_gateway.rb", "snippets/network_services/create_grpc_route.rb", @@ -112,6 +115,7 @@ "snippets/network_services/create_tls_route.rb", "snippets/network_services/create_wasm_plugin.rb", "snippets/network_services/create_wasm_plugin_version.rb", + "snippets/network_services/delete_agent_gateway.rb", "snippets/network_services/delete_endpoint_policy.rb", "snippets/network_services/delete_gateway.rb", "snippets/network_services/delete_grpc_route.rb", @@ -123,6 +127,7 @@ "snippets/network_services/delete_tls_route.rb", "snippets/network_services/delete_wasm_plugin.rb", "snippets/network_services/delete_wasm_plugin_version.rb", + "snippets/network_services/get_agent_gateway.rb", "snippets/network_services/get_endpoint_policy.rb", "snippets/network_services/get_gateway.rb", "snippets/network_services/get_gateway_route_view.rb", @@ -136,6 +141,7 @@ "snippets/network_services/get_tls_route.rb", "snippets/network_services/get_wasm_plugin.rb", "snippets/network_services/get_wasm_plugin_version.rb", + "snippets/network_services/list_agent_gateways.rb", "snippets/network_services/list_endpoint_policies.rb", "snippets/network_services/list_gateway_route_views.rb", "snippets/network_services/list_gateways.rb", @@ -149,6 +155,7 @@ "snippets/network_services/list_tls_routes.rb", "snippets/network_services/list_wasm_plugin_versions.rb", "snippets/network_services/list_wasm_plugins.rb", + "snippets/network_services/update_agent_gateway.rb", "snippets/network_services/update_endpoint_policy.rb", "snippets/network_services/update_gateway.rb", "snippets/network_services/update_grpc_route.rb", diff --git a/google-cloud-network_services-v1/gapic_metadata.json b/google-cloud-network_services-v1/gapic_metadata.json index 0f2ae7f1d859..b9bc5946fba2 100644 --- a/google-cloud-network_services-v1/gapic_metadata.json +++ b/google-cloud-network_services-v1/gapic_metadata.json @@ -408,6 +408,31 @@ "methods": [ "list_mesh_route_views" ] + }, + "ListAgentGateways": { + "methods": [ + "list_agent_gateways" + ] + }, + "GetAgentGateway": { + "methods": [ + "get_agent_gateway" + ] + }, + "CreateAgentGateway": { + "methods": [ + "create_agent_gateway" + ] + }, + "UpdateAgentGateway": { + "methods": [ + "update_agent_gateway" + ] + }, + "DeleteAgentGateway": { + "methods": [ + "delete_agent_gateway" + ] } } } diff --git a/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/network_services/client.rb b/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/network_services/client.rb index 1872acd867f6..3f3e7d35e0da 100644 --- a/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/network_services/client.rb +++ b/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/network_services/client.rb @@ -251,7 +251,7 @@ def logger # # @param parent [::String] # Required. The project and location from which the EndpointPolicies should - # be listed, specified in the format `projects/*/locations/global`. + # be listed, specified in the format `projects/*/locations/*`. # @param page_size [::Integer] # Maximum number of EndpointPolicies to return per call. # @param page_token [::String] @@ -354,7 +354,7 @@ def list_endpoint_policies request, options = nil # # @param name [::String] # Required. A name of the EndpointPolicy to get. Must be in the format - # `projects/*/locations/global/endpointPolicies/*`. + # `projects/*/locations/*/endpointPolicies/*`. # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Google::Cloud::NetworkServices::V1::EndpointPolicy] @@ -440,7 +440,7 @@ def get_endpoint_policy request, options = nil # # @param parent [::String] # Required. The parent resource of the EndpointPolicy. Must be in the - # format `projects/*/locations/global`. + # format `projects/*/locations/*`. # @param endpoint_policy_id [::String] # Required. Short name of the EndpointPolicy resource to be created. # E.g. "CustomECS". @@ -640,7 +640,7 @@ def update_endpoint_policy request, options = nil # # @param name [::String] # Required. A name of the EndpointPolicy to delete. Must be in the format - # `projects/*/locations/global/endpointPolicies/*`. + # `projects/*/locations/*/endpointPolicies/*`. # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Gapic::Operation] @@ -2094,7 +2094,7 @@ def delete_gateway request, options = nil # # @param parent [::String] # Required. The project and location from which the GrpcRoutes should be - # listed, specified in the format `projects/*/locations/global`. + # listed, specified in the format `projects/*/locations/*`. # @param page_size [::Integer] # Maximum number of GrpcRoutes to return per call. # @param page_token [::String] @@ -2196,7 +2196,7 @@ def list_grpc_routes request, options = nil # # @param name [::String] # Required. A name of the GrpcRoute to get. Must be in the format - # `projects/*/locations/global/grpcRoutes/*`. + # `projects/*/locations/*/grpcRoutes/*`. # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Google::Cloud::NetworkServices::V1::GrpcRoute] @@ -2282,7 +2282,7 @@ def get_grpc_route request, options = nil # # @param parent [::String] # Required. The parent resource of the GrpcRoute. Must be in the - # format `projects/*/locations/global`. + # format `projects/*/locations/*`. # @param grpc_route_id [::String] # Required. Short name of the GrpcRoute resource to be created. # @param grpc_route [::Google::Cloud::NetworkServices::V1::GrpcRoute, ::Hash] @@ -2481,7 +2481,7 @@ def update_grpc_route request, options = nil # # @param name [::String] # Required. A name of the GrpcRoute to delete. Must be in the format - # `projects/*/locations/global/grpcRoutes/*`. + # `projects/*/locations/*/grpcRoutes/*`. # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Gapic::Operation] @@ -2569,14 +2569,14 @@ def delete_grpc_route request, options = nil # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. # - # @overload list_http_routes(parent: nil, page_size: nil, page_token: nil, return_partial_success: nil) + # @overload list_http_routes(parent: nil, page_size: nil, page_token: nil, return_partial_success: nil, filter: nil) # Pass arguments to `list_http_routes` via keyword arguments. Note that at # least one keyword argument is 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 project and location from which the HttpRoutes should be - # listed, specified in the format `projects/*/locations/global`. + # listed, specified in the format `projects/*/locations/*`. # @param page_size [::Integer] # Maximum number of HttpRoutes to return per call. # @param page_token [::String] @@ -2587,6 +2587,8 @@ def delete_grpc_route request, options = nil # Optional. If true, allow partial responses for multi-regional Aggregated # List requests. Otherwise if one of the locations is down or unreachable, # the Aggregated List request will fail. + # @param filter [::String] + # Optional. Filter expression to restrict the list. # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::NetworkServices::V1::HttpRoute>] @@ -2678,7 +2680,7 @@ def list_http_routes request, options = nil # # @param name [::String] # Required. A name of the HttpRoute to get. Must be in the format - # `projects/*/locations/global/httpRoutes/*`. + # `projects/*/locations/*/httpRoutes/*`. # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Google::Cloud::NetworkServices::V1::HttpRoute] @@ -2757,18 +2759,20 @@ def get_http_route request, options = nil # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. # - # @overload create_http_route(parent: nil, http_route_id: nil, http_route: nil) + # @overload create_http_route(parent: nil, http_route_id: nil, http_route: nil, request_id: nil) # Pass arguments to `create_http_route` via keyword arguments. Note that at # least one keyword argument is 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 HttpRoute. Must be in the - # format `projects/*/locations/global`. + # format `projects/*/locations/*`. # @param http_route_id [::String] # Required. Short name of the HttpRoute resource to be created. # @param http_route [::Google::Cloud::NetworkServices::V1::HttpRoute, ::Hash] # Required. HttpRoute resource to be created. + # @param request_id [::String] + # Optional. Idempotent request UUID. # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Gapic::Operation] @@ -2963,7 +2967,7 @@ def update_http_route request, options = nil # # @param name [::String] # Required. A name of the HttpRoute to delete. Must be in the format - # `projects/*/locations/global/httpRoutes/*`. + # `projects/*/locations/*/httpRoutes/*`. # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Gapic::Operation] @@ -3058,7 +3062,7 @@ def delete_http_route request, options = nil # # @param parent [::String] # Required. The project and location from which the TcpRoutes should be - # listed, specified in the format `projects/*/locations/global`. + # listed, specified in the format `projects/*/locations/*`. # @param page_size [::Integer] # Maximum number of TcpRoutes to return per call. # @param page_token [::String] @@ -3160,7 +3164,7 @@ def list_tcp_routes request, options = nil # # @param name [::String] # Required. A name of the TcpRoute to get. Must be in the format - # `projects/*/locations/global/tcpRoutes/*`. + # `projects/*/locations/*/tcpRoutes/*`. # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Google::Cloud::NetworkServices::V1::TcpRoute] @@ -3246,7 +3250,7 @@ def get_tcp_route request, options = nil # # @param parent [::String] # Required. The parent resource of the TcpRoute. Must be in the - # format `projects/*/locations/global`. + # format `projects/*/locations/*`. # @param tcp_route_id [::String] # Required. Short name of the TcpRoute resource to be created. # @param tcp_route [::Google::Cloud::NetworkServices::V1::TcpRoute, ::Hash] @@ -3445,7 +3449,7 @@ def update_tcp_route request, options = nil # # @param name [::String] # Required. A name of the TcpRoute to delete. Must be in the format - # `projects/*/locations/global/tcpRoutes/*`. + # `projects/*/locations/*/tcpRoutes/*`. # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Gapic::Operation] @@ -3540,7 +3544,7 @@ def delete_tcp_route request, options = nil # # @param parent [::String] # Required. The project and location from which the TlsRoutes should be - # listed, specified in the format `projects/*/locations/global`. + # listed, specified in the format `projects/*/locations/*`. # @param page_size [::Integer] # Maximum number of TlsRoutes to return per call. # @param page_token [::String] @@ -3642,7 +3646,7 @@ def list_tls_routes request, options = nil # # @param name [::String] # Required. A name of the TlsRoute to get. Must be in the format - # `projects/*/locations/global/tlsRoutes/*`. + # `projects/*/locations/*/tlsRoutes/*`. # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Google::Cloud::NetworkServices::V1::TlsRoute] @@ -3728,7 +3732,7 @@ def get_tls_route request, options = nil # # @param parent [::String] # Required. The parent resource of the TlsRoute. Must be in the - # format `projects/*/locations/global`. + # format `projects/*/locations/*`. # @param tls_route_id [::String] # Required. Short name of the TlsRoute resource to be created. # @param tls_route [::Google::Cloud::NetworkServices::V1::TlsRoute, ::Hash] @@ -3927,7 +3931,7 @@ def update_tls_route request, options = nil # # @param name [::String] # Required. A name of the TlsRoute to delete. Must be in the format - # `projects/*/locations/global/tlsRoutes/*`. + # `projects/*/locations/*/tlsRoutes/*`. # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Gapic::Operation] @@ -4500,7 +4504,7 @@ def delete_service_binding request, options = nil # # @param parent [::String] # Required. The project and location from which the Meshes should be - # listed, specified in the format `projects/*/locations/global`. + # listed, specified in the format `projects/*/locations/*`. # @param page_size [::Integer] # Maximum number of Meshes to return per call. # @param page_token [::String] @@ -4602,7 +4606,7 @@ def list_meshes request, options = nil # # @param name [::String] # Required. A name of the Mesh to get. Must be in the format - # `projects/*/locations/global/meshes/*`. + # `projects/*/locations/*/meshes/*`. # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Google::Cloud::NetworkServices::V1::Mesh] @@ -4688,7 +4692,7 @@ def get_mesh request, options = nil # # @param parent [::String] # Required. The parent resource of the Mesh. Must be in the - # format `projects/*/locations/global`. + # format `projects/*/locations/*`. # @param mesh_id [::String] # Required. Short name of the Mesh resource to be created. # @param mesh [::Google::Cloud::NetworkServices::V1::Mesh, ::Hash] @@ -4887,7 +4891,7 @@ def update_mesh request, options = nil # # @param name [::String] # Required. A name of the Mesh to delete. Must be in the format - # `projects/*/locations/global/meshes/*`. + # `projects/*/locations/*/meshes/*`. # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Gapic::Operation] @@ -5816,6 +5820,490 @@ def list_mesh_route_views request, options = nil raise ::Google::Cloud::Error.from_error(e) end + ## + # Lists AgentGateways in a given project and location. + # + # @overload list_agent_gateways(request, options = nil) + # Pass arguments to `list_agent_gateways` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::ListAgentGatewaysRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::ListAgentGatewaysRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_agent_gateways(parent: nil, page_size: nil, page_token: nil, return_partial_success: nil) + # Pass arguments to `list_agent_gateways` via keyword arguments. Note that at + # least one keyword argument is 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 project and location from which the AgentGateways should be + # listed, specified in the format `projects/*/locations/*`. + # @param page_size [::Integer] + # Optional. Maximum number of AgentGateways to return per call. + # @param page_token [::String] + # Optional. The value returned by the last `ListAgentGatewaysResponse` + # Indicates that this is a continuation of a prior `ListAgentGateways` + # call, and that the system should return the next page of data. + # @param return_partial_success [::Boolean] + # Optional. If true, allow partial responses for multi-regional Aggregated + # List requests. Otherwise if one of the locations is down or unreachable, + # the Aggregated List request will fail. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::NetworkServices::V1::AgentGateway>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::NetworkServices::V1::AgentGateway>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/network_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::ListAgentGatewaysRequest.new + # + # # Call the list_agent_gateways method. + # result = client.list_agent_gateways 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::NetworkServices::V1::AgentGateway. + # p item + # end + # + def list_agent_gateways request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::ListAgentGatewaysRequest + + # Converts hash 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_agent_gateways.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::NetworkServices::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_agent_gateways.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_agent_gateways.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @network_services_stub.call_rpc :list_agent_gateways, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @network_services_stub, :list_agent_gateways, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets details of a single AgentGateway. + # + # @overload get_agent_gateway(request, options = nil) + # Pass arguments to `get_agent_gateway` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::GetAgentGatewayRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::GetAgentGatewayRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_agent_gateway(name: nil) + # Pass arguments to `get_agent_gateway` via keyword arguments. Note that at + # least one keyword argument is 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. A name of the AgentGateway to get. Must be in the format + # `projects/*/locations/*/agentGateways/*`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::NetworkServices::V1::AgentGateway] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::NetworkServices::V1::AgentGateway] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/network_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::GetAgentGatewayRequest.new + # + # # Call the get_agent_gateway method. + # result = client.get_agent_gateway request + # + # # The returned object is of type Google::Cloud::NetworkServices::V1::AgentGateway. + # p result + # + def get_agent_gateway request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::GetAgentGatewayRequest + + # Converts hash 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_agent_gateway.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::NetworkServices::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_agent_gateway.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_agent_gateway.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @network_services_stub.call_rpc :get_agent_gateway, 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 AgentGateway in a given project and location. + # + # @overload create_agent_gateway(request, options = nil) + # Pass arguments to `create_agent_gateway` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::CreateAgentGatewayRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::CreateAgentGatewayRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_agent_gateway(parent: nil, agent_gateway_id: nil, agent_gateway: nil) + # Pass arguments to `create_agent_gateway` via keyword arguments. Note that at + # least one keyword argument is 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 AgentGateway. Must be in the + # format `projects/*/locations/*`. + # @param agent_gateway_id [::String] + # Required. Short name of the AgentGateway resource to be created. + # @param agent_gateway [::Google::Cloud::NetworkServices::V1::AgentGateway, ::Hash] + # Required. AgentGateway resource to be created. + # + # @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_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::CreateAgentGatewayRequest.new + # + # # Call the create_agent_gateway method. + # result = client.create_agent_gateway 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_agent_gateway request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::CreateAgentGatewayRequest + + # Converts hash 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_agent_gateway.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::NetworkServices::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_agent_gateway.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_agent_gateway.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @network_services_stub.call_rpc :create_agent_gateway, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates the parameters of a single AgentGateway. + # + # @overload update_agent_gateway(request, options = nil) + # Pass arguments to `update_agent_gateway` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::UpdateAgentGatewayRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::UpdateAgentGatewayRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_agent_gateway(update_mask: nil, agent_gateway: nil) + # Pass arguments to `update_agent_gateway` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. Field mask is used to specify the fields to be overwritten in the + # AgentGateway resource by the update. + # The fields specified in the update_mask are relative to the resource, not + # the full request. A field will be overwritten if it is in the mask. If the + # user does not provide a mask then all fields will be overwritten. + # @param agent_gateway [::Google::Cloud::NetworkServices::V1::AgentGateway, ::Hash] + # Required. Updated AgentGateway 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_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::UpdateAgentGatewayRequest.new + # + # # Call the update_agent_gateway method. + # result = client.update_agent_gateway 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_agent_gateway request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::UpdateAgentGatewayRequest + + # Converts hash 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_agent_gateway.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::NetworkServices::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.agent_gateway&.name + header_params["agent_gateway.name"] = request.agent_gateway.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_agent_gateway.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_agent_gateway.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @network_services_stub.call_rpc :update_agent_gateway, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a single AgentGateway. + # + # @overload delete_agent_gateway(request, options = nil) + # Pass arguments to `delete_agent_gateway` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::DeleteAgentGatewayRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::DeleteAgentGatewayRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_agent_gateway(name: nil, etag: nil) + # Pass arguments to `delete_agent_gateway` via keyword arguments. Note that at + # least one keyword argument is 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. A name of the AgentGateway to delete. Must be in the format + # `projects/*/locations/*/agentGateways/*`. + # @param etag [::String] + # Optional. The etag of the AgentGateway to delete. + # + # @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_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::DeleteAgentGatewayRequest.new + # + # # Call the delete_agent_gateway method. + # result = client.delete_agent_gateway 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_agent_gateway request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::DeleteAgentGatewayRequest + + # Converts hash 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_agent_gateway.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::NetworkServices::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_agent_gateway.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_agent_gateway.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @network_services_stub.call_rpc :delete_agent_gateway, 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 NetworkServices API. # @@ -6291,6 +6779,31 @@ class Rpcs # @return [::Gapic::Config::Method] # attr_reader :list_mesh_route_views + ## + # RPC-specific configuration for `list_agent_gateways` + # @return [::Gapic::Config::Method] + # + attr_reader :list_agent_gateways + ## + # RPC-specific configuration for `get_agent_gateway` + # @return [::Gapic::Config::Method] + # + attr_reader :get_agent_gateway + ## + # RPC-specific configuration for `create_agent_gateway` + # @return [::Gapic::Config::Method] + # + attr_reader :create_agent_gateway + ## + # RPC-specific configuration for `update_agent_gateway` + # @return [::Gapic::Config::Method] + # + attr_reader :update_agent_gateway + ## + # RPC-specific configuration for `delete_agent_gateway` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_agent_gateway # @private def initialize parent_rpcs = nil @@ -6410,6 +6923,16 @@ def initialize parent_rpcs = nil @list_gateway_route_views = ::Gapic::Config::Method.new list_gateway_route_views_config list_mesh_route_views_config = parent_rpcs.list_mesh_route_views if parent_rpcs.respond_to? :list_mesh_route_views @list_mesh_route_views = ::Gapic::Config::Method.new list_mesh_route_views_config + list_agent_gateways_config = parent_rpcs.list_agent_gateways if parent_rpcs.respond_to? :list_agent_gateways + @list_agent_gateways = ::Gapic::Config::Method.new list_agent_gateways_config + get_agent_gateway_config = parent_rpcs.get_agent_gateway if parent_rpcs.respond_to? :get_agent_gateway + @get_agent_gateway = ::Gapic::Config::Method.new get_agent_gateway_config + create_agent_gateway_config = parent_rpcs.create_agent_gateway if parent_rpcs.respond_to? :create_agent_gateway + @create_agent_gateway = ::Gapic::Config::Method.new create_agent_gateway_config + update_agent_gateway_config = parent_rpcs.update_agent_gateway if parent_rpcs.respond_to? :update_agent_gateway + @update_agent_gateway = ::Gapic::Config::Method.new update_agent_gateway_config + delete_agent_gateway_config = parent_rpcs.delete_agent_gateway if parent_rpcs.respond_to? :delete_agent_gateway + @delete_agent_gateway = ::Gapic::Config::Method.new delete_agent_gateway_config yield self if block_given? end diff --git a/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/network_services/paths.rb b/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/network_services/paths.rb index 95061bacebe6..348536ccbc65 100644 --- a/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/network_services/paths.rb +++ b/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/network_services/paths.rb @@ -43,6 +43,25 @@ def address_path project:, region:, address: "projects/#{project}/regions/#{region}/addresses/#{address}" end + ## + # Create a fully-qualified AgentGateway resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/agentGateways/{agent_gateway}` + # + # @param project [String] + # @param location [String] + # @param agent_gateway [String] + # + # @return [::String] + def agent_gateway_path project:, location:, agent_gateway: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/agentGateways/#{agent_gateway}" + end + ## # Create a fully-qualified AuthorizationPolicy resource string. # @@ -406,6 +425,25 @@ def subnetwork_path project:, region:, subnetwork: "projects/#{project}/regions/#{region}/subnetworks/#{subnetwork}" end + ## + # Create a fully-qualified TargetTcpProxy resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/targetTcpProxies/{target_tcp_proxy}` + # + # @param project [String] + # @param location [String] + # @param target_tcp_proxy [String] + # + # @return [::String] + def target_tcp_proxy_path project:, location:, target_tcp_proxy: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/targetTcpProxies/#{target_tcp_proxy}" + end + ## # Create a fully-qualified TcpRoute resource string. # diff --git a/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/network_services/rest/client.rb b/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/network_services/rest/client.rb index 60a44b96a598..88742913d84a 100644 --- a/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/network_services/rest/client.rb +++ b/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/network_services/rest/client.rb @@ -246,7 +246,7 @@ def logger # # @param parent [::String] # Required. The project and location from which the EndpointPolicies should - # be listed, specified in the format `projects/*/locations/global`. + # be listed, specified in the format `projects/*/locations/*`. # @param page_size [::Integer] # Maximum number of EndpointPolicies to return per call. # @param page_token [::String] @@ -342,7 +342,7 @@ def list_endpoint_policies request, options = nil # # @param name [::String] # Required. A name of the EndpointPolicy to get. Must be in the format - # `projects/*/locations/global/endpointPolicies/*`. + # `projects/*/locations/*/endpointPolicies/*`. # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Google::Cloud::NetworkServices::V1::EndpointPolicy] # @yieldparam operation [::Gapic::Rest::TransportOperation] @@ -421,7 +421,7 @@ def get_endpoint_policy request, options = nil # # @param parent [::String] # Required. The parent resource of the EndpointPolicy. Must be in the - # format `projects/*/locations/global`. + # format `projects/*/locations/*`. # @param endpoint_policy_id [::String] # Required. Short name of the EndpointPolicy resource to be created. # E.g. "CustomECS". @@ -607,7 +607,7 @@ def update_endpoint_policy request, options = nil # # @param name [::String] # Required. A name of the EndpointPolicy to delete. Must be in the format - # `projects/*/locations/global/endpointPolicies/*`. + # `projects/*/locations/*/endpointPolicies/*`. # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Gapic::Operation] # @yieldparam operation [::Gapic::Rest::TransportOperation] @@ -1956,7 +1956,7 @@ def delete_gateway request, options = nil # # @param parent [::String] # Required. The project and location from which the GrpcRoutes should be - # listed, specified in the format `projects/*/locations/global`. + # listed, specified in the format `projects/*/locations/*`. # @param page_size [::Integer] # Maximum number of GrpcRoutes to return per call. # @param page_token [::String] @@ -2051,7 +2051,7 @@ def list_grpc_routes request, options = nil # # @param name [::String] # Required. A name of the GrpcRoute to get. Must be in the format - # `projects/*/locations/global/grpcRoutes/*`. + # `projects/*/locations/*/grpcRoutes/*`. # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Google::Cloud::NetworkServices::V1::GrpcRoute] # @yieldparam operation [::Gapic::Rest::TransportOperation] @@ -2130,7 +2130,7 @@ def get_grpc_route request, options = nil # # @param parent [::String] # Required. The parent resource of the GrpcRoute. Must be in the - # format `projects/*/locations/global`. + # format `projects/*/locations/*`. # @param grpc_route_id [::String] # Required. Short name of the GrpcRoute resource to be created. # @param grpc_route [::Google::Cloud::NetworkServices::V1::GrpcRoute, ::Hash] @@ -2315,7 +2315,7 @@ def update_grpc_route request, options = nil # # @param name [::String] # Required. A name of the GrpcRoute to delete. Must be in the format - # `projects/*/locations/global/grpcRoutes/*`. + # `projects/*/locations/*/grpcRoutes/*`. # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Gapic::Operation] # @yieldparam operation [::Gapic::Rest::TransportOperation] @@ -2396,14 +2396,14 @@ def delete_grpc_route request, options = nil # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # - # @overload list_http_routes(parent: nil, page_size: nil, page_token: nil, return_partial_success: nil) + # @overload list_http_routes(parent: nil, page_size: nil, page_token: nil, return_partial_success: nil, filter: nil) # Pass arguments to `list_http_routes` via keyword arguments. Note that at # least one keyword argument is 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 project and location from which the HttpRoutes should be - # listed, specified in the format `projects/*/locations/global`. + # listed, specified in the format `projects/*/locations/*`. # @param page_size [::Integer] # Maximum number of HttpRoutes to return per call. # @param page_token [::String] @@ -2414,6 +2414,8 @@ def delete_grpc_route request, options = nil # Optional. If true, allow partial responses for multi-regional Aggregated # List requests. Otherwise if one of the locations is down or unreachable, # the Aggregated List request will fail. + # @param filter [::String] + # Optional. Filter expression to restrict the list. # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::HttpRoute>] # @yieldparam operation [::Gapic::Rest::TransportOperation] @@ -2498,7 +2500,7 @@ def list_http_routes request, options = nil # # @param name [::String] # Required. A name of the HttpRoute to get. Must be in the format - # `projects/*/locations/global/httpRoutes/*`. + # `projects/*/locations/*/httpRoutes/*`. # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Google::Cloud::NetworkServices::V1::HttpRoute] # @yieldparam operation [::Gapic::Rest::TransportOperation] @@ -2570,18 +2572,20 @@ def get_http_route request, options = nil # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # - # @overload create_http_route(parent: nil, http_route_id: nil, http_route: nil) + # @overload create_http_route(parent: nil, http_route_id: nil, http_route: nil, request_id: nil) # Pass arguments to `create_http_route` via keyword arguments. Note that at # least one keyword argument is 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 HttpRoute. Must be in the - # format `projects/*/locations/global`. + # format `projects/*/locations/*`. # @param http_route_id [::String] # Required. Short name of the HttpRoute resource to be created. # @param http_route [::Google::Cloud::NetworkServices::V1::HttpRoute, ::Hash] # Required. HttpRoute resource to be created. + # @param request_id [::String] + # Optional. Idempotent request UUID. # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Gapic::Operation] # @yieldparam operation [::Gapic::Rest::TransportOperation] @@ -2762,7 +2766,7 @@ def update_http_route request, options = nil # # @param name [::String] # Required. A name of the HttpRoute to delete. Must be in the format - # `projects/*/locations/global/httpRoutes/*`. + # `projects/*/locations/*/httpRoutes/*`. # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Gapic::Operation] # @yieldparam operation [::Gapic::Rest::TransportOperation] @@ -2850,7 +2854,7 @@ def delete_http_route request, options = nil # # @param parent [::String] # Required. The project and location from which the TcpRoutes should be - # listed, specified in the format `projects/*/locations/global`. + # listed, specified in the format `projects/*/locations/*`. # @param page_size [::Integer] # Maximum number of TcpRoutes to return per call. # @param page_token [::String] @@ -2945,7 +2949,7 @@ def list_tcp_routes request, options = nil # # @param name [::String] # Required. A name of the TcpRoute to get. Must be in the format - # `projects/*/locations/global/tcpRoutes/*`. + # `projects/*/locations/*/tcpRoutes/*`. # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Google::Cloud::NetworkServices::V1::TcpRoute] # @yieldparam operation [::Gapic::Rest::TransportOperation] @@ -3024,7 +3028,7 @@ def get_tcp_route request, options = nil # # @param parent [::String] # Required. The parent resource of the TcpRoute. Must be in the - # format `projects/*/locations/global`. + # format `projects/*/locations/*`. # @param tcp_route_id [::String] # Required. Short name of the TcpRoute resource to be created. # @param tcp_route [::Google::Cloud::NetworkServices::V1::TcpRoute, ::Hash] @@ -3209,7 +3213,7 @@ def update_tcp_route request, options = nil # # @param name [::String] # Required. A name of the TcpRoute to delete. Must be in the format - # `projects/*/locations/global/tcpRoutes/*`. + # `projects/*/locations/*/tcpRoutes/*`. # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Gapic::Operation] # @yieldparam operation [::Gapic::Rest::TransportOperation] @@ -3297,7 +3301,7 @@ def delete_tcp_route request, options = nil # # @param parent [::String] # Required. The project and location from which the TlsRoutes should be - # listed, specified in the format `projects/*/locations/global`. + # listed, specified in the format `projects/*/locations/*`. # @param page_size [::Integer] # Maximum number of TlsRoutes to return per call. # @param page_token [::String] @@ -3392,7 +3396,7 @@ def list_tls_routes request, options = nil # # @param name [::String] # Required. A name of the TlsRoute to get. Must be in the format - # `projects/*/locations/global/tlsRoutes/*`. + # `projects/*/locations/*/tlsRoutes/*`. # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Google::Cloud::NetworkServices::V1::TlsRoute] # @yieldparam operation [::Gapic::Rest::TransportOperation] @@ -3471,7 +3475,7 @@ def get_tls_route request, options = nil # # @param parent [::String] # Required. The parent resource of the TlsRoute. Must be in the - # format `projects/*/locations/global`. + # format `projects/*/locations/*`. # @param tls_route_id [::String] # Required. Short name of the TlsRoute resource to be created. # @param tls_route [::Google::Cloud::NetworkServices::V1::TlsRoute, ::Hash] @@ -3656,7 +3660,7 @@ def update_tls_route request, options = nil # # @param name [::String] # Required. A name of the TlsRoute to delete. Must be in the format - # `projects/*/locations/global/tlsRoutes/*`. + # `projects/*/locations/*/tlsRoutes/*`. # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Gapic::Operation] # @yieldparam operation [::Gapic::Rest::TransportOperation] @@ -4187,7 +4191,7 @@ def delete_service_binding request, options = nil # # @param parent [::String] # Required. The project and location from which the Meshes should be - # listed, specified in the format `projects/*/locations/global`. + # listed, specified in the format `projects/*/locations/*`. # @param page_size [::Integer] # Maximum number of Meshes to return per call. # @param page_token [::String] @@ -4282,7 +4286,7 @@ def list_meshes request, options = nil # # @param name [::String] # Required. A name of the Mesh to get. Must be in the format - # `projects/*/locations/global/meshes/*`. + # `projects/*/locations/*/meshes/*`. # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Google::Cloud::NetworkServices::V1::Mesh] # @yieldparam operation [::Gapic::Rest::TransportOperation] @@ -4361,7 +4365,7 @@ def get_mesh request, options = nil # # @param parent [::String] # Required. The parent resource of the Mesh. Must be in the - # format `projects/*/locations/global`. + # format `projects/*/locations/*`. # @param mesh_id [::String] # Required. Short name of the Mesh resource to be created. # @param mesh [::Google::Cloud::NetworkServices::V1::Mesh, ::Hash] @@ -4546,7 +4550,7 @@ def update_mesh request, options = nil # # @param name [::String] # Required. A name of the Mesh to delete. Must be in the format - # `projects/*/locations/global/meshes/*`. + # `projects/*/locations/*/meshes/*`. # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Gapic::Operation] # @yieldparam operation [::Gapic::Rest::TransportOperation] @@ -5405,6 +5409,455 @@ def list_mesh_route_views request, options = nil raise ::Google::Cloud::Error.from_error(e) end + ## + # Lists AgentGateways in a given project and location. + # + # @overload list_agent_gateways(request, options = nil) + # Pass arguments to `list_agent_gateways` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::ListAgentGatewaysRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::ListAgentGatewaysRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_agent_gateways(parent: nil, page_size: nil, page_token: nil, return_partial_success: nil) + # Pass arguments to `list_agent_gateways` via keyword arguments. Note that at + # least one keyword argument is 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 project and location from which the AgentGateways should be + # listed, specified in the format `projects/*/locations/*`. + # @param page_size [::Integer] + # Optional. Maximum number of AgentGateways to return per call. + # @param page_token [::String] + # Optional. The value returned by the last `ListAgentGatewaysResponse` + # Indicates that this is a continuation of a prior `ListAgentGateways` + # call, and that the system should return the next page of data. + # @param return_partial_success [::Boolean] + # Optional. If true, allow partial responses for multi-regional Aggregated + # List requests. Otherwise if one of the locations is down or unreachable, + # the Aggregated List request will fail. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::AgentGateway>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::AgentGateway>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/network_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::ListAgentGatewaysRequest.new + # + # # Call the list_agent_gateways method. + # result = client.list_agent_gateways 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::NetworkServices::V1::AgentGateway. + # p item + # end + # + def list_agent_gateways request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::ListAgentGatewaysRequest + + # Converts hash 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_agent_gateways.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::NetworkServices::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_agent_gateways.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_agent_gateways.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @network_services_stub.list_agent_gateways request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @network_services_stub, :list_agent_gateways, "agent_gateways", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets details of a single AgentGateway. + # + # @overload get_agent_gateway(request, options = nil) + # Pass arguments to `get_agent_gateway` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::GetAgentGatewayRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::GetAgentGatewayRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_agent_gateway(name: nil) + # Pass arguments to `get_agent_gateway` via keyword arguments. Note that at + # least one keyword argument is 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. A name of the AgentGateway to get. Must be in the format + # `projects/*/locations/*/agentGateways/*`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::NetworkServices::V1::AgentGateway] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::NetworkServices::V1::AgentGateway] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/network_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::GetAgentGatewayRequest.new + # + # # Call the get_agent_gateway method. + # result = client.get_agent_gateway request + # + # # The returned object is of type Google::Cloud::NetworkServices::V1::AgentGateway. + # p result + # + def get_agent_gateway request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::GetAgentGatewayRequest + + # Converts hash 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_agent_gateway.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::NetworkServices::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_agent_gateway.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_agent_gateway.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @network_services_stub.get_agent_gateway 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 AgentGateway in a given project and location. + # + # @overload create_agent_gateway(request, options = nil) + # Pass arguments to `create_agent_gateway` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::CreateAgentGatewayRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::CreateAgentGatewayRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_agent_gateway(parent: nil, agent_gateway_id: nil, agent_gateway: nil) + # Pass arguments to `create_agent_gateway` via keyword arguments. Note that at + # least one keyword argument is 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 AgentGateway. Must be in the + # format `projects/*/locations/*`. + # @param agent_gateway_id [::String] + # Required. Short name of the AgentGateway resource to be created. + # @param agent_gateway [::Google::Cloud::NetworkServices::V1::AgentGateway, ::Hash] + # Required. AgentGateway resource to be created. + # @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_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::CreateAgentGatewayRequest.new + # + # # Call the create_agent_gateway method. + # result = client.create_agent_gateway 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_agent_gateway request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::CreateAgentGatewayRequest + + # Converts hash 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_agent_gateway.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::NetworkServices::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_agent_gateway.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_agent_gateway.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @network_services_stub.create_agent_gateway request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates the parameters of a single AgentGateway. + # + # @overload update_agent_gateway(request, options = nil) + # Pass arguments to `update_agent_gateway` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::UpdateAgentGatewayRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::UpdateAgentGatewayRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_agent_gateway(update_mask: nil, agent_gateway: nil) + # Pass arguments to `update_agent_gateway` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. Field mask is used to specify the fields to be overwritten in the + # AgentGateway resource by the update. + # The fields specified in the update_mask are relative to the resource, not + # the full request. A field will be overwritten if it is in the mask. If the + # user does not provide a mask then all fields will be overwritten. + # @param agent_gateway [::Google::Cloud::NetworkServices::V1::AgentGateway, ::Hash] + # Required. Updated AgentGateway 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_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::UpdateAgentGatewayRequest.new + # + # # Call the update_agent_gateway method. + # result = client.update_agent_gateway 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_agent_gateway request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::UpdateAgentGatewayRequest + + # Converts hash 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_agent_gateway.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::NetworkServices::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_agent_gateway.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_agent_gateway.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @network_services_stub.update_agent_gateway request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a single AgentGateway. + # + # @overload delete_agent_gateway(request, options = nil) + # Pass arguments to `delete_agent_gateway` via a request object, either of type + # {::Google::Cloud::NetworkServices::V1::DeleteAgentGatewayRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::NetworkServices::V1::DeleteAgentGatewayRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_agent_gateway(name: nil, etag: nil) + # Pass arguments to `delete_agent_gateway` via keyword arguments. Note that at + # least one keyword argument is 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. A name of the AgentGateway to delete. Must be in the format + # `projects/*/locations/*/agentGateways/*`. + # @param etag [::String] + # Optional. The etag of the AgentGateway to delete. + # @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_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::NetworkServices::V1::DeleteAgentGatewayRequest.new + # + # # Call the delete_agent_gateway method. + # result = client.delete_agent_gateway 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_agent_gateway request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::DeleteAgentGatewayRequest + + # Converts hash 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_agent_gateway.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::NetworkServices::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_agent_gateway.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_agent_gateway.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @network_services_stub.delete_agent_gateway 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 NetworkServices REST API. # @@ -5850,6 +6303,31 @@ class Rpcs # @return [::Gapic::Config::Method] # attr_reader :list_mesh_route_views + ## + # RPC-specific configuration for `list_agent_gateways` + # @return [::Gapic::Config::Method] + # + attr_reader :list_agent_gateways + ## + # RPC-specific configuration for `get_agent_gateway` + # @return [::Gapic::Config::Method] + # + attr_reader :get_agent_gateway + ## + # RPC-specific configuration for `create_agent_gateway` + # @return [::Gapic::Config::Method] + # + attr_reader :create_agent_gateway + ## + # RPC-specific configuration for `update_agent_gateway` + # @return [::Gapic::Config::Method] + # + attr_reader :update_agent_gateway + ## + # RPC-specific configuration for `delete_agent_gateway` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_agent_gateway # @private def initialize parent_rpcs = nil @@ -5969,6 +6447,16 @@ def initialize parent_rpcs = nil @list_gateway_route_views = ::Gapic::Config::Method.new list_gateway_route_views_config list_mesh_route_views_config = parent_rpcs.list_mesh_route_views if parent_rpcs.respond_to? :list_mesh_route_views @list_mesh_route_views = ::Gapic::Config::Method.new list_mesh_route_views_config + list_agent_gateways_config = parent_rpcs.list_agent_gateways if parent_rpcs.respond_to? :list_agent_gateways + @list_agent_gateways = ::Gapic::Config::Method.new list_agent_gateways_config + get_agent_gateway_config = parent_rpcs.get_agent_gateway if parent_rpcs.respond_to? :get_agent_gateway + @get_agent_gateway = ::Gapic::Config::Method.new get_agent_gateway_config + create_agent_gateway_config = parent_rpcs.create_agent_gateway if parent_rpcs.respond_to? :create_agent_gateway + @create_agent_gateway = ::Gapic::Config::Method.new create_agent_gateway_config + update_agent_gateway_config = parent_rpcs.update_agent_gateway if parent_rpcs.respond_to? :update_agent_gateway + @update_agent_gateway = ::Gapic::Config::Method.new update_agent_gateway_config + delete_agent_gateway_config = parent_rpcs.delete_agent_gateway if parent_rpcs.respond_to? :delete_agent_gateway + @delete_agent_gateway = ::Gapic::Config::Method.new delete_agent_gateway_config yield self if block_given? end diff --git a/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/network_services/rest/service_stub.rb b/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/network_services/rest/service_stub.rb index ebeca45c1c1e..f670a228b42b 100644 --- a/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/network_services/rest/service_stub.rb +++ b/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/network_services/rest/service_stub.rb @@ -2393,6 +2393,206 @@ def list_mesh_route_views request_pb, options = nil end end + ## + # Baseline implementation for the list_agent_gateways REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::ListAgentGatewaysRequest] + # 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::NetworkServices::V1::ListAgentGatewaysResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::NetworkServices::V1::ListAgentGatewaysResponse] + # A result object deserialized from the server's reply + def list_agent_gateways request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_agent_gateways_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_agent_gateways", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::NetworkServices::V1::ListAgentGatewaysResponse.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_agent_gateway REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::GetAgentGatewayRequest] + # 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::NetworkServices::V1::AgentGateway] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::NetworkServices::V1::AgentGateway] + # A result object deserialized from the server's reply + def get_agent_gateway request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_agent_gateway_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_agent_gateway", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::NetworkServices::V1::AgentGateway.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_agent_gateway REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::CreateAgentGatewayRequest] + # 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_agent_gateway request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_agent_gateway_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_agent_gateway", + 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_agent_gateway REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::UpdateAgentGatewayRequest] + # 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_agent_gateway request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_agent_gateway_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_agent_gateway", + 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_agent_gateway REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::DeleteAgentGatewayRequest] + # 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_agent_gateway request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_agent_gateway_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_agent_gateway", + 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 # @@ -3631,6 +3831,113 @@ def self.transcode_list_mesh_route_views_request request_pb ) transcoder.transcode request_pb end + + ## + # @private + # + # GRPC transcoding helper method for the list_agent_gateways REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::ListAgentGatewaysRequest] + # 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_agent_gateways_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/agentGateways", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_agent_gateway REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::GetAgentGatewayRequest] + # 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_agent_gateway_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/agentGateways/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_agent_gateway REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::CreateAgentGatewayRequest] + # 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_agent_gateway_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/agentGateways", + body: "agent_gateway", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_agent_gateway REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::UpdateAgentGatewayRequest] + # 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_agent_gateway_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{agent_gateway.name}", + body: "agent_gateway", + matches: [ + ["agent_gateway.name", %r{^projects/[^/]+/locations/[^/]+/agentGateways/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_agent_gateway REST call + # + # @param request_pb [::Google::Cloud::NetworkServices::V1::DeleteAgentGatewayRequest] + # 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_agent_gateway_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/agentGateways/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end end end end diff --git a/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/agent_gateway_pb.rb b/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/agent_gateway_pb.rb similarity index 100% rename from owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/agent_gateway_pb.rb rename to google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/agent_gateway_pb.rb diff --git a/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/dep_pb.rb b/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/dep_pb.rb index cbab496ae8b2..189ed93ceeaf 100644 --- a/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/dep_pb.rb +++ b/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/dep_pb.rb @@ -18,7 +18,7 @@ require 'google/protobuf/timestamp_pb' -descriptor_data = "\n)google/cloud/networkservices/v1/dep.proto\x12\x1fgoogle.cloud.networkservices.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1bgoogle/api/field_info.proto\x1a\x19google/api/resource.proto\x1a,google/cloud/networkservices/v1/common.proto\x1a#google/longrunning/operations.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xb5\x04\n\x0e\x45xtensionChain\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\\\n\x0fmatch_condition\x18\x02 \x01(\x0b\x32>.google.cloud.networkservices.v1.ExtensionChain.MatchConditionB\x03\xe0\x41\x02\x12R\n\nextensions\x18\x03 \x03(\x0b\x32\x39.google.cloud.networkservices.v1.ExtensionChain.ExtensionB\x03\xe0\x41\x02\x1a-\n\x0eMatchCondition\x12\x1b\n\x0e\x63\x65l_expression\x18\x01 \x01(\tB\x03\xe0\x41\x02\x1a\xae\x02\n\tExtension\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x16\n\tauthority\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x14\n\x07service\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12I\n\x10supported_events\x18\x04 \x03(\x0e\x32*.google.cloud.networkservices.v1.EventTypeB\x03\xe0\x41\x01\x12/\n\x07timeout\x18\x05 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x01\x12\x16\n\tfail_open\x18\x06 \x01(\x08\x42\x03\xe0\x41\x01\x12\x1c\n\x0f\x66orward_headers\x18\x07 \x03(\tB\x03\xe0\x41\x01\x12.\n\x08metadata\x18\t \x01(\x0b\x32\x17.google.protobuf.StructB\x03\xe0\x41\x01\"\xe5\x05\n\x12LbTrafficExtension\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x08\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\t \x01(\tB\x03\xe0\x41\x01\x12T\n\x06labels\x18\x04 \x03(\x0b\x32?.google.cloud.networkservices.v1.LbTrafficExtension.LabelsEntryB\x03\xe0\x41\x01\x12\x1d\n\x10\x66orwarding_rules\x18\x05 \x03(\tB\x03\xe0\x41\x01\x12N\n\x10\x65xtension_chains\x18\x07 \x03(\x0b\x32/.google.cloud.networkservices.v1.ExtensionChainB\x03\xe0\x41\x02\x12X\n\x15load_balancing_scheme\x18\x08 \x01(\x0e\x32\x34.google.cloud.networkservices.v1.LoadBalancingSchemeB\x03\xe0\x41\x02\x12.\n\x08metadata\x18\n \x01(\x0b\x32\x17.google.protobuf.StructB\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\xb4\x01\xea\x41\xb0\x01\n1networkservices.googleapis.com/LbTrafficExtension\x12Rprojects/{project}/locations/{location}/lbTrafficExtensions/{lb_traffic_extension}*\x13lbTrafficExtensions2\x12lbTrafficExtension\"\xc8\x01\n\x1eListLbTrafficExtensionsRequest\x12I\n\x06parent\x18\x01 \x01(\tB9\xe0\x41\x02\xfa\x41\x33\x12\x31networkservices.googleapis.com/LbTrafficExtension\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\xa3\x01\n\x1fListLbTrafficExtensionsResponse\x12R\n\x15lb_traffic_extensions\x18\x01 \x03(\x0b\x32\x33.google.cloud.networkservices.v1.LbTrafficExtension\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"g\n\x1cGetLbTrafficExtensionRequest\x12G\n\x04name\x18\x01 \x01(\tB9\xe0\x41\x02\xfa\x41\x33\n1networkservices.googleapis.com/LbTrafficExtension\"\x8b\x02\n\x1f\x43reateLbTrafficExtensionRequest\x12I\n\x06parent\x18\x01 \x01(\tB9\xe0\x41\x02\xfa\x41\x33\x12\x31networkservices.googleapis.com/LbTrafficExtension\x12$\n\x17lb_traffic_extension_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12V\n\x14lb_traffic_extension\x18\x03 \x01(\x0b\x32\x33.google.cloud.networkservices.v1.LbTrafficExtensionB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x04 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\xd0\x01\n\x1fUpdateLbTrafficExtensionRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x12V\n\x14lb_traffic_extension\x18\x02 \x01(\x0b\x32\x33.google.cloud.networkservices.v1.LbTrafficExtensionB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x03 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\x8b\x01\n\x1f\x44\x65leteLbTrafficExtensionRequest\x12G\n\x04name\x18\x01 \x01(\tB9\xe0\x41\x02\xfa\x41\x33\n1networkservices.googleapis.com/LbTrafficExtension\x12\x1f\n\nrequest_id\x18\x02 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\xd7\x05\n\x10LbRouteExtension\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x08\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\t \x01(\tB\x03\xe0\x41\x01\x12R\n\x06labels\x18\x04 \x03(\x0b\x32=.google.cloud.networkservices.v1.LbRouteExtension.LabelsEntryB\x03\xe0\x41\x01\x12\x1d\n\x10\x66orwarding_rules\x18\x05 \x03(\tB\x03\xe0\x41\x02\x12N\n\x10\x65xtension_chains\x18\x07 \x03(\x0b\x32/.google.cloud.networkservices.v1.ExtensionChainB\x03\xe0\x41\x02\x12X\n\x15load_balancing_scheme\x18\x08 \x01(\x0e\x32\x34.google.cloud.networkservices.v1.LoadBalancingSchemeB\x03\xe0\x41\x02\x12.\n\x08metadata\x18\n \x01(\x0b\x32\x17.google.protobuf.StructB\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\xaa\x01\xea\x41\xa6\x01\n/networkservices.googleapis.com/LbRouteExtension\x12Nprojects/{project}/locations/{location}/lbRouteExtensions/{lb_route_extension}*\x11lbRouteExtensions2\x10lbRouteExtension\"\xc4\x01\n\x1cListLbRouteExtensionsRequest\x12G\n\x06parent\x18\x01 \x01(\tB7\xe0\x41\x02\xfa\x41\x31\x12/networkservices.googleapis.com/LbRouteExtension\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x9d\x01\n\x1dListLbRouteExtensionsResponse\x12N\n\x13lb_route_extensions\x18\x01 \x03(\x0b\x32\x31.google.cloud.networkservices.v1.LbRouteExtension\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"c\n\x1aGetLbRouteExtensionRequest\x12\x45\n\x04name\x18\x01 \x01(\tB7\xe0\x41\x02\xfa\x41\x31\n/networkservices.googleapis.com/LbRouteExtension\"\x81\x02\n\x1d\x43reateLbRouteExtensionRequest\x12G\n\x06parent\x18\x01 \x01(\tB7\xe0\x41\x02\xfa\x41\x31\x12/networkservices.googleapis.com/LbRouteExtension\x12\"\n\x15lb_route_extension_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12R\n\x12lb_route_extension\x18\x03 \x01(\x0b\x32\x31.google.cloud.networkservices.v1.LbRouteExtensionB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x04 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\xca\x01\n\x1dUpdateLbRouteExtensionRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x12R\n\x12lb_route_extension\x18\x02 \x01(\x0b\x32\x31.google.cloud.networkservices.v1.LbRouteExtensionB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x03 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\x87\x01\n\x1d\x44\x65leteLbRouteExtensionRequest\x12\x45\n\x04name\x18\x01 \x01(\tB7\xe0\x41\x02\xfa\x41\x31\n/networkservices.googleapis.com/LbRouteExtension\x12\x1f\n\nrequest_id\x18\x02 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\xa0\x05\n\x0fLbEdgeExtension\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x08\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\t \x01(\tB\x03\xe0\x41\x01\x12Q\n\x06labels\x18\x04 \x03(\x0b\x32<.google.cloud.networkservices.v1.LbEdgeExtension.LabelsEntryB\x03\xe0\x41\x01\x12\x1d\n\x10\x66orwarding_rules\x18\x05 \x03(\tB\x03\xe0\x41\x02\x12N\n\x10\x65xtension_chains\x18\x06 \x03(\x0b\x32/.google.cloud.networkservices.v1.ExtensionChainB\x03\xe0\x41\x02\x12X\n\x15load_balancing_scheme\x18\x07 \x01(\x0e\x32\x34.google.cloud.networkservices.v1.LoadBalancingSchemeB\x03\xe0\x41\x02\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\xa5\x01\xea\x41\xa1\x01\n.networkservices.googleapis.com/LbEdgeExtension\x12Lprojects/{project}/locations/{location}/lbEdgeExtensions/{lb_edge_extension}*\x10lbEdgeExtensions2\x0flbEdgeExtension\"\xc2\x01\n\x1bListLbEdgeExtensionsRequest\x12\x46\n\x06parent\x18\x01 \x01(\tB6\xe0\x41\x02\xfa\x41\x30\x12.networkservices.googleapis.com/LbEdgeExtension\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x9a\x01\n\x1cListLbEdgeExtensionsResponse\x12L\n\x12lb_edge_extensions\x18\x01 \x03(\x0b\x32\x30.google.cloud.networkservices.v1.LbEdgeExtension\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"a\n\x19GetLbEdgeExtensionRequest\x12\x44\n\x04name\x18\x01 \x01(\tB6\xe0\x41\x02\xfa\x41\x30\n.networkservices.googleapis.com/LbEdgeExtension\"\xfc\x01\n\x1c\x43reateLbEdgeExtensionRequest\x12\x46\n\x06parent\x18\x01 \x01(\tB6\xe0\x41\x02\xfa\x41\x30\x12.networkservices.googleapis.com/LbEdgeExtension\x12!\n\x14lb_edge_extension_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12P\n\x11lb_edge_extension\x18\x03 \x01(\x0b\x32\x30.google.cloud.networkservices.v1.LbEdgeExtensionB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x04 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\xc7\x01\n\x1cUpdateLbEdgeExtensionRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x12P\n\x11lb_edge_extension\x18\x02 \x01(\x0b\x32\x30.google.cloud.networkservices.v1.LbEdgeExtensionB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x03 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\x85\x01\n\x1c\x44\x65leteLbEdgeExtensionRequest\x12\x44\n\x04name\x18\x01 \x01(\tB6\xe0\x41\x02\xfa\x41\x30\n.networkservices.googleapis.com/LbEdgeExtension\x12\x1f\n\nrequest_id\x18\x02 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\xb5\x06\n\x0e\x41uthzExtension\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x08\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12P\n\x06labels\x18\x05 \x03(\x0b\x32;.google.cloud.networkservices.v1.AuthzExtension.LabelsEntryB\x03\xe0\x41\x01\x12X\n\x15load_balancing_scheme\x18\x06 \x01(\x0e\x32\x34.google.cloud.networkservices.v1.LoadBalancingSchemeB\x03\xe0\x41\x02\x12\x16\n\tauthority\x18\x07 \x01(\tB\x03\xe0\x41\x02\x12\x14\n\x07service\x18\x08 \x01(\tB\x03\xe0\x41\x02\x12/\n\x07timeout\x18\t \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x02\x12\x16\n\tfail_open\x18\n \x01(\x08\x42\x03\xe0\x41\x01\x12.\n\x08metadata\x18\x0b \x01(\x0b\x32\x17.google.protobuf.StructB\x03\xe0\x41\x01\x12\x1c\n\x0f\x66orward_headers\x18\x0c \x03(\tB\x03\xe0\x41\x01\x12\x45\n\x0bwire_format\x18\x0e \x01(\x0e\x32+.google.cloud.networkservices.v1.WireFormatB\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\x9f\x01\xea\x41\x9b\x01\n-networkservices.googleapis.com/AuthzExtension\x12Iprojects/{project}/locations/{location}/authzExtensions/{authz_extension}*\x0f\x61uthzExtensions2\x0e\x61uthzExtension\"\xc0\x01\n\x1aListAuthzExtensionsRequest\x12\x45\n\x06parent\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\x12-networkservices.googleapis.com/AuthzExtension\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x96\x01\n\x1bListAuthzExtensionsResponse\x12I\n\x10\x61uthz_extensions\x18\x01 \x03(\x0b\x32/.google.cloud.networkservices.v1.AuthzExtension\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"_\n\x18GetAuthzExtensionRequest\x12\x43\n\x04name\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-networkservices.googleapis.com/AuthzExtension\"\xf5\x01\n\x1b\x43reateAuthzExtensionRequest\x12\x45\n\x06parent\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\x12-networkservices.googleapis.com/AuthzExtension\x12\x1f\n\x12\x61uthz_extension_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12M\n\x0f\x61uthz_extension\x18\x03 \x01(\x0b\x32/.google.cloud.networkservices.v1.AuthzExtensionB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x04 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\xc3\x01\n\x1bUpdateAuthzExtensionRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12M\n\x0f\x61uthz_extension\x18\x02 \x01(\x0b\x32/.google.cloud.networkservices.v1.AuthzExtensionB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x03 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\x83\x01\n\x1b\x44\x65leteAuthzExtensionRequest\x12\x43\n\x04name\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-networkservices.googleapis.com/AuthzExtension\x12\x1f\n\nrequest_id\x18\x02 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01*\xa4\x01\n\tEventType\x12\x1a\n\x16\x45VENT_TYPE_UNSPECIFIED\x10\x00\x12\x13\n\x0fREQUEST_HEADERS\x10\x01\x12\x10\n\x0cREQUEST_BODY\x10\x02\x12\x14\n\x10RESPONSE_HEADERS\x10\x03\x12\x11\n\rRESPONSE_BODY\x10\x04\x12\x14\n\x10REQUEST_TRAILERS\x10\x05\x12\x15\n\x11RESPONSE_TRAILERS\x10\x06*h\n\x13LoadBalancingScheme\x12%\n!LOAD_BALANCING_SCHEME_UNSPECIFIED\x10\x00\x12\x14\n\x10INTERNAL_MANAGED\x10\x01\x12\x14\n\x10\x45XTERNAL_MANAGED\x10\x02*<\n\nWireFormat\x12\x1b\n\x17WIRE_FORMAT_UNSPECIFIED\x10\x00\x12\x11\n\rEXT_PROC_GRPC\x10\x01\x32\xf9\'\n\nDepService\x12\xe6\x01\n\x17ListLbTrafficExtensions\x12?.google.cloud.networkservices.v1.ListLbTrafficExtensionsRequest\x1a@.google.cloud.networkservices.v1.ListLbTrafficExtensionsResponse\"H\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x39\x12\x37/v1/{parent=projects/*/locations/*}/lbTrafficExtensions\x12\xd3\x01\n\x15GetLbTrafficExtension\x12=.google.cloud.networkservices.v1.GetLbTrafficExtensionRequest\x1a\x33.google.cloud.networkservices.v1.LbTrafficExtension\"F\xda\x41\x04name\x82\xd3\xe4\x93\x02\x39\x12\x37/v1/{name=projects/*/locations/*/lbTrafficExtensions/*}\x12\xb3\x02\n\x18\x43reateLbTrafficExtension\x12@.google.cloud.networkservices.v1.CreateLbTrafficExtensionRequest\x1a\x1d.google.longrunning.Operation\"\xb5\x01\xca\x41\'\n\x12LbTrafficExtension\x12\x11OperationMetadata\xda\x41\x33parent,lb_traffic_extension,lb_traffic_extension_id\x82\xd3\xe4\x93\x02O\"7/v1/{parent=projects/*/locations/*}/lbTrafficExtensions:\x14lb_traffic_extension\x12\xb5\x02\n\x18UpdateLbTrafficExtension\x12@.google.cloud.networkservices.v1.UpdateLbTrafficExtensionRequest\x1a\x1d.google.longrunning.Operation\"\xb7\x01\xca\x41\'\n\x12LbTrafficExtension\x12\x11OperationMetadata\xda\x41 lb_traffic_extension,update_mask\x82\xd3\xe4\x93\x02\x64\x32L/v1/{lb_traffic_extension.name=projects/*/locations/*/lbTrafficExtensions/*}:\x14lb_traffic_extension\x12\xf0\x01\n\x18\x44\x65leteLbTrafficExtension\x12@.google.cloud.networkservices.v1.DeleteLbTrafficExtensionRequest\x1a\x1d.google.longrunning.Operation\"s\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x39*7/v1/{name=projects/*/locations/*/lbTrafficExtensions/*}\x12\xde\x01\n\x15ListLbRouteExtensions\x12=.google.cloud.networkservices.v1.ListLbRouteExtensionsRequest\x1a>.google.cloud.networkservices.v1.ListLbRouteExtensionsResponse\"F\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x37\x12\x35/v1/{parent=projects/*/locations/*}/lbRouteExtensions\x12\xcb\x01\n\x13GetLbRouteExtension\x12;.google.cloud.networkservices.v1.GetLbRouteExtensionRequest\x1a\x31.google.cloud.networkservices.v1.LbRouteExtension\"D\xda\x41\x04name\x82\xd3\xe4\x93\x02\x37\x12\x35/v1/{name=projects/*/locations/*/lbRouteExtensions/*}\x12\xa5\x02\n\x16\x43reateLbRouteExtension\x12>.google.cloud.networkservices.v1.CreateLbRouteExtensionRequest\x1a\x1d.google.longrunning.Operation\"\xab\x01\xca\x41%\n\x10LbRouteExtension\x12\x11OperationMetadata\xda\x41/parent,lb_route_extension,lb_route_extension_id\x82\xd3\xe4\x93\x02K\"5/v1/{parent=projects/*/locations/*}/lbRouteExtensions:\x12lb_route_extension\x12\xa7\x02\n\x16UpdateLbRouteExtension\x12>.google.cloud.networkservices.v1.UpdateLbRouteExtensionRequest\x1a\x1d.google.longrunning.Operation\"\xad\x01\xca\x41%\n\x10LbRouteExtension\x12\x11OperationMetadata\xda\x41\x1elb_route_extension,update_mask\x82\xd3\xe4\x93\x02^2H/v1/{lb_route_extension.name=projects/*/locations/*/lbRouteExtensions/*}:\x12lb_route_extension\x12\xea\x01\n\x16\x44\x65leteLbRouteExtension\x12>.google.cloud.networkservices.v1.DeleteLbRouteExtensionRequest\x1a\x1d.google.longrunning.Operation\"q\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x37*5/v1/{name=projects/*/locations/*/lbRouteExtensions/*}\x12\xda\x01\n\x14ListLbEdgeExtensions\x12<.google.cloud.networkservices.v1.ListLbEdgeExtensionsRequest\x1a=.google.cloud.networkservices.v1.ListLbEdgeExtensionsResponse\"E\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x36\x12\x34/v1/{parent=projects/*/locations/*}/lbEdgeExtensions\x12\xc7\x01\n\x12GetLbEdgeExtension\x12:.google.cloud.networkservices.v1.GetLbEdgeExtensionRequest\x1a\x30.google.cloud.networkservices.v1.LbEdgeExtension\"C\xda\x41\x04name\x82\xd3\xe4\x93\x02\x36\x12\x34/v1/{name=projects/*/locations/*/lbEdgeExtensions/*}\x12\x9e\x02\n\x15\x43reateLbEdgeExtension\x12=.google.cloud.networkservices.v1.CreateLbEdgeExtensionRequest\x1a\x1d.google.longrunning.Operation\"\xa6\x01\xca\x41$\n\x0fLbEdgeExtension\x12\x11OperationMetadata\xda\x41-parent,lb_edge_extension,lb_edge_extension_id\x82\xd3\xe4\x93\x02I\"4/v1/{parent=projects/*/locations/*}/lbEdgeExtensions:\x11lb_edge_extension\x12\xa0\x02\n\x15UpdateLbEdgeExtension\x12=.google.cloud.networkservices.v1.UpdateLbEdgeExtensionRequest\x1a\x1d.google.longrunning.Operation\"\xa8\x01\xca\x41$\n\x0fLbEdgeExtension\x12\x11OperationMetadata\xda\x41\x1dlb_edge_extension,update_mask\x82\xd3\xe4\x93\x02[2F/v1/{lb_edge_extension.name=projects/*/locations/*/lbEdgeExtensions/*}:\x11lb_edge_extension\x12\xe7\x01\n\x15\x44\x65leteLbEdgeExtension\x12=.google.cloud.networkservices.v1.DeleteLbEdgeExtensionRequest\x1a\x1d.google.longrunning.Operation\"p\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x36*4/v1/{name=projects/*/locations/*/lbEdgeExtensions/*}\x12\xd6\x01\n\x13ListAuthzExtensions\x12;.google.cloud.networkservices.v1.ListAuthzExtensionsRequest\x1a<.google.cloud.networkservices.v1.ListAuthzExtensionsResponse\"D\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x35\x12\x33/v1/{parent=projects/*/locations/*}/authzExtensions\x12\xc3\x01\n\x11GetAuthzExtension\x12\x39.google.cloud.networkservices.v1.GetAuthzExtensionRequest\x1a/.google.cloud.networkservices.v1.AuthzExtension\"B\xda\x41\x04name\x82\xd3\xe4\x93\x02\x35\x12\x33/v1/{name=projects/*/locations/*/authzExtensions/*}\x12\x94\x02\n\x14\x43reateAuthzExtension\x12<.google.cloud.networkservices.v1.CreateAuthzExtensionRequest\x1a\x1d.google.longrunning.Operation\"\x9e\x01\xca\x41#\n\x0e\x41uthzExtension\x12\x11OperationMetadata\xda\x41)parent,authz_extension,authz_extension_id\x82\xd3\xe4\x93\x02\x46\"3/v1/{parent=projects/*/locations/*}/authzExtensions:\x0f\x61uthz_extension\x12\x96\x02\n\x14UpdateAuthzExtension\x12<.google.cloud.networkservices.v1.UpdateAuthzExtensionRequest\x1a\x1d.google.longrunning.Operation\"\xa0\x01\xca\x41#\n\x0e\x41uthzExtension\x12\x11OperationMetadata\xda\x41\x1b\x61uthz_extension,update_mask\x82\xd3\xe4\x93\x02V2C/v1/{authz_extension.name=projects/*/locations/*/authzExtensions/*}:\x0f\x61uthz_extension\x12\xe4\x01\n\x14\x44\x65leteAuthzExtension\x12<.google.cloud.networkservices.v1.DeleteAuthzExtensionRequest\x1a\x1d.google.longrunning.Operation\"o\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x35*3/v1/{name=projects/*/locations/*/authzExtensions/*}\x1aR\xca\x41\x1enetworkservices.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xe9\x01\n#com.google.cloud.networkservices.v1B\x08\x44\x65pProtoP\x01ZMcloud.google.com/go/networkservices/apiv1/networkservicespb;networkservicespb\xaa\x02\x1fGoogle.Cloud.NetworkServices.V1\xca\x02\x1fGoogle\\Cloud\\NetworkServices\\V1\xea\x02\"Google::Cloud::NetworkServices::V1b\x06proto3" +descriptor_data = "\n)google/cloud/networkservices/v1/dep.proto\x12\x1fgoogle.cloud.networkservices.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1bgoogle/api/field_info.proto\x1a\x19google/api/resource.proto\x1a,google/cloud/networkservices/v1/common.proto\x1a#google/longrunning/operations.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xa0\x06\n\x0e\x45xtensionChain\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\\\n\x0fmatch_condition\x18\x02 \x01(\x0b\x32>.google.cloud.networkservices.v1.ExtensionChain.MatchConditionB\x03\xe0\x41\x02\x12R\n\nextensions\x18\x03 \x03(\x0b\x32\x39.google.cloud.networkservices.v1.ExtensionChain.ExtensionB\x03\xe0\x41\x02\x1a-\n\x0eMatchCondition\x12\x1b\n\x0e\x63\x65l_expression\x18\x01 \x01(\tB\x03\xe0\x41\x02\x1a\x99\x04\n\tExtension\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tauthority\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x14\n\x07service\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12I\n\x10supported_events\x18\x04 \x03(\x0e\x32*.google.cloud.networkservices.v1.EventTypeB\x03\xe0\x41\x01\x12/\n\x07timeout\x18\x05 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x01\x12\x16\n\tfail_open\x18\x06 \x01(\x08\x42\x03\xe0\x41\x01\x12\x1c\n\x0f\x66orward_headers\x18\x07 \x03(\tB\x03\xe0\x41\x01\x12\x1f\n\x12\x66orward_attributes\x18\x08 \x03(\tB\x03\xe0\x41\x01\x12.\n\x08metadata\x18\t \x01(\x0b\x32\x17.google.protobuf.StructB\x03\xe0\x41\x01\x12R\n\x16request_body_send_mode\x18\x0e \x01(\x0e\x32-.google.cloud.networkservices.v1.BodySendModeB\x03\xe0\x41\x01\x12S\n\x17response_body_send_mode\x18\x0f \x01(\x0e\x32-.google.cloud.networkservices.v1.BodySendModeB\x03\xe0\x41\x01\x12\x1f\n\x12observability_mode\x18\x10 \x01(\x08\x42\x03\xe0\x41\x01\"\xe5\x05\n\x12LbTrafficExtension\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x08\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\t \x01(\tB\x03\xe0\x41\x01\x12T\n\x06labels\x18\x04 \x03(\x0b\x32?.google.cloud.networkservices.v1.LbTrafficExtension.LabelsEntryB\x03\xe0\x41\x01\x12\x1d\n\x10\x66orwarding_rules\x18\x05 \x03(\tB\x03\xe0\x41\x01\x12N\n\x10\x65xtension_chains\x18\x07 \x03(\x0b\x32/.google.cloud.networkservices.v1.ExtensionChainB\x03\xe0\x41\x02\x12X\n\x15load_balancing_scheme\x18\x08 \x01(\x0e\x32\x34.google.cloud.networkservices.v1.LoadBalancingSchemeB\x03\xe0\x41\x02\x12.\n\x08metadata\x18\n \x01(\x0b\x32\x17.google.protobuf.StructB\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\xb4\x01\xea\x41\xb0\x01\n1networkservices.googleapis.com/LbTrafficExtension\x12Rprojects/{project}/locations/{location}/lbTrafficExtensions/{lb_traffic_extension}*\x13lbTrafficExtensions2\x12lbTrafficExtension\"\xc8\x01\n\x1eListLbTrafficExtensionsRequest\x12I\n\x06parent\x18\x01 \x01(\tB9\xe0\x41\x02\xfa\x41\x33\x12\x31networkservices.googleapis.com/LbTrafficExtension\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\xa3\x01\n\x1fListLbTrafficExtensionsResponse\x12R\n\x15lb_traffic_extensions\x18\x01 \x03(\x0b\x32\x33.google.cloud.networkservices.v1.LbTrafficExtension\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"g\n\x1cGetLbTrafficExtensionRequest\x12G\n\x04name\x18\x01 \x01(\tB9\xe0\x41\x02\xfa\x41\x33\n1networkservices.googleapis.com/LbTrafficExtension\"\x8b\x02\n\x1f\x43reateLbTrafficExtensionRequest\x12I\n\x06parent\x18\x01 \x01(\tB9\xe0\x41\x02\xfa\x41\x33\x12\x31networkservices.googleapis.com/LbTrafficExtension\x12$\n\x17lb_traffic_extension_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12V\n\x14lb_traffic_extension\x18\x03 \x01(\x0b\x32\x33.google.cloud.networkservices.v1.LbTrafficExtensionB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x04 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\xd0\x01\n\x1fUpdateLbTrafficExtensionRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x12V\n\x14lb_traffic_extension\x18\x02 \x01(\x0b\x32\x33.google.cloud.networkservices.v1.LbTrafficExtensionB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x03 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\x8b\x01\n\x1f\x44\x65leteLbTrafficExtensionRequest\x12G\n\x04name\x18\x01 \x01(\tB9\xe0\x41\x02\xfa\x41\x33\n1networkservices.googleapis.com/LbTrafficExtension\x12\x1f\n\nrequest_id\x18\x02 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\xd7\x05\n\x10LbRouteExtension\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x08\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\t \x01(\tB\x03\xe0\x41\x01\x12R\n\x06labels\x18\x04 \x03(\x0b\x32=.google.cloud.networkservices.v1.LbRouteExtension.LabelsEntryB\x03\xe0\x41\x01\x12\x1d\n\x10\x66orwarding_rules\x18\x05 \x03(\tB\x03\xe0\x41\x02\x12N\n\x10\x65xtension_chains\x18\x07 \x03(\x0b\x32/.google.cloud.networkservices.v1.ExtensionChainB\x03\xe0\x41\x02\x12X\n\x15load_balancing_scheme\x18\x08 \x01(\x0e\x32\x34.google.cloud.networkservices.v1.LoadBalancingSchemeB\x03\xe0\x41\x02\x12.\n\x08metadata\x18\n \x01(\x0b\x32\x17.google.protobuf.StructB\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\xaa\x01\xea\x41\xa6\x01\n/networkservices.googleapis.com/LbRouteExtension\x12Nprojects/{project}/locations/{location}/lbRouteExtensions/{lb_route_extension}*\x11lbRouteExtensions2\x10lbRouteExtension\"\xc4\x01\n\x1cListLbRouteExtensionsRequest\x12G\n\x06parent\x18\x01 \x01(\tB7\xe0\x41\x02\xfa\x41\x31\x12/networkservices.googleapis.com/LbRouteExtension\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x9d\x01\n\x1dListLbRouteExtensionsResponse\x12N\n\x13lb_route_extensions\x18\x01 \x03(\x0b\x32\x31.google.cloud.networkservices.v1.LbRouteExtension\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"c\n\x1aGetLbRouteExtensionRequest\x12\x45\n\x04name\x18\x01 \x01(\tB7\xe0\x41\x02\xfa\x41\x31\n/networkservices.googleapis.com/LbRouteExtension\"\x81\x02\n\x1d\x43reateLbRouteExtensionRequest\x12G\n\x06parent\x18\x01 \x01(\tB7\xe0\x41\x02\xfa\x41\x31\x12/networkservices.googleapis.com/LbRouteExtension\x12\"\n\x15lb_route_extension_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12R\n\x12lb_route_extension\x18\x03 \x01(\x0b\x32\x31.google.cloud.networkservices.v1.LbRouteExtensionB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x04 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\xca\x01\n\x1dUpdateLbRouteExtensionRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x12R\n\x12lb_route_extension\x18\x02 \x01(\x0b\x32\x31.google.cloud.networkservices.v1.LbRouteExtensionB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x03 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\x87\x01\n\x1d\x44\x65leteLbRouteExtensionRequest\x12\x45\n\x04name\x18\x01 \x01(\tB7\xe0\x41\x02\xfa\x41\x31\n/networkservices.googleapis.com/LbRouteExtension\x12\x1f\n\nrequest_id\x18\x02 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\xa0\x05\n\x0fLbEdgeExtension\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x08\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\t \x01(\tB\x03\xe0\x41\x01\x12Q\n\x06labels\x18\x04 \x03(\x0b\x32<.google.cloud.networkservices.v1.LbEdgeExtension.LabelsEntryB\x03\xe0\x41\x01\x12\x1d\n\x10\x66orwarding_rules\x18\x05 \x03(\tB\x03\xe0\x41\x02\x12N\n\x10\x65xtension_chains\x18\x06 \x03(\x0b\x32/.google.cloud.networkservices.v1.ExtensionChainB\x03\xe0\x41\x02\x12X\n\x15load_balancing_scheme\x18\x07 \x01(\x0e\x32\x34.google.cloud.networkservices.v1.LoadBalancingSchemeB\x03\xe0\x41\x02\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\xa5\x01\xea\x41\xa1\x01\n.networkservices.googleapis.com/LbEdgeExtension\x12Lprojects/{project}/locations/{location}/lbEdgeExtensions/{lb_edge_extension}*\x10lbEdgeExtensions2\x0flbEdgeExtension\"\xc2\x01\n\x1bListLbEdgeExtensionsRequest\x12\x46\n\x06parent\x18\x01 \x01(\tB6\xe0\x41\x02\xfa\x41\x30\x12.networkservices.googleapis.com/LbEdgeExtension\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x9a\x01\n\x1cListLbEdgeExtensionsResponse\x12L\n\x12lb_edge_extensions\x18\x01 \x03(\x0b\x32\x30.google.cloud.networkservices.v1.LbEdgeExtension\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"a\n\x19GetLbEdgeExtensionRequest\x12\x44\n\x04name\x18\x01 \x01(\tB6\xe0\x41\x02\xfa\x41\x30\n.networkservices.googleapis.com/LbEdgeExtension\"\xfc\x01\n\x1c\x43reateLbEdgeExtensionRequest\x12\x46\n\x06parent\x18\x01 \x01(\tB6\xe0\x41\x02\xfa\x41\x30\x12.networkservices.googleapis.com/LbEdgeExtension\x12!\n\x14lb_edge_extension_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12P\n\x11lb_edge_extension\x18\x03 \x01(\x0b\x32\x30.google.cloud.networkservices.v1.LbEdgeExtensionB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x04 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\xc7\x01\n\x1cUpdateLbEdgeExtensionRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x12P\n\x11lb_edge_extension\x18\x02 \x01(\x0b\x32\x30.google.cloud.networkservices.v1.LbEdgeExtensionB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x03 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\x85\x01\n\x1c\x44\x65leteLbEdgeExtensionRequest\x12\x44\n\x04name\x18\x01 \x01(\tB6\xe0\x41\x02\xfa\x41\x30\n.networkservices.googleapis.com/LbEdgeExtension\x12\x1f\n\nrequest_id\x18\x02 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\xd6\x06\n\x0e\x41uthzExtension\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x08\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12P\n\x06labels\x18\x05 \x03(\x0b\x32;.google.cloud.networkservices.v1.AuthzExtension.LabelsEntryB\x03\xe0\x41\x01\x12X\n\x15load_balancing_scheme\x18\x06 \x01(\x0e\x32\x34.google.cloud.networkservices.v1.LoadBalancingSchemeB\x03\xe0\x41\x01\x12\x16\n\tauthority\x18\x07 \x01(\tB\x03\xe0\x41\x01\x12\x14\n\x07service\x18\x08 \x01(\tB\x03\xe0\x41\x02\x12/\n\x07timeout\x18\t \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x02\x12\x16\n\tfail_open\x18\n \x01(\x08\x42\x03\xe0\x41\x01\x12.\n\x08metadata\x18\x0b \x01(\x0b\x32\x17.google.protobuf.StructB\x03\xe0\x41\x01\x12\x1c\n\x0f\x66orward_headers\x18\x0c \x03(\tB\x03\xe0\x41\x01\x12\x1f\n\x12\x66orward_attributes\x18\r \x03(\tB\x03\xe0\x41\x01\x12\x45\n\x0bwire_format\x18\x0e \x01(\x0e\x32+.google.cloud.networkservices.v1.WireFormatB\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\x9f\x01\xea\x41\x9b\x01\n-networkservices.googleapis.com/AuthzExtension\x12Iprojects/{project}/locations/{location}/authzExtensions/{authz_extension}*\x0f\x61uthzExtensions2\x0e\x61uthzExtension\"\xc0\x01\n\x1aListAuthzExtensionsRequest\x12\x45\n\x06parent\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\x12-networkservices.googleapis.com/AuthzExtension\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x96\x01\n\x1bListAuthzExtensionsResponse\x12I\n\x10\x61uthz_extensions\x18\x01 \x03(\x0b\x32/.google.cloud.networkservices.v1.AuthzExtension\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"_\n\x18GetAuthzExtensionRequest\x12\x43\n\x04name\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-networkservices.googleapis.com/AuthzExtension\"\xf5\x01\n\x1b\x43reateAuthzExtensionRequest\x12\x45\n\x06parent\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\x12-networkservices.googleapis.com/AuthzExtension\x12\x1f\n\x12\x61uthz_extension_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12M\n\x0f\x61uthz_extension\x18\x03 \x01(\x0b\x32/.google.cloud.networkservices.v1.AuthzExtensionB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x04 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\xc3\x01\n\x1bUpdateAuthzExtensionRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12M\n\x0f\x61uthz_extension\x18\x02 \x01(\x0b\x32/.google.cloud.networkservices.v1.AuthzExtensionB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x03 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\x83\x01\n\x1b\x44\x65leteAuthzExtensionRequest\x12\x43\n\x04name\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-networkservices.googleapis.com/AuthzExtension\x12\x1f\n\nrequest_id\x18\x02 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01*\xa4\x01\n\tEventType\x12\x1a\n\x16\x45VENT_TYPE_UNSPECIFIED\x10\x00\x12\x13\n\x0fREQUEST_HEADERS\x10\x01\x12\x10\n\x0cREQUEST_BODY\x10\x02\x12\x14\n\x10RESPONSE_HEADERS\x10\x03\x12\x11\n\rRESPONSE_BODY\x10\x04\x12\x14\n\x10REQUEST_TRAILERS\x10\x05\x12\x15\n\x11RESPONSE_TRAILERS\x10\x06*h\n\x13LoadBalancingScheme\x12%\n!LOAD_BALANCING_SCHEME_UNSPECIFIED\x10\x00\x12\x14\n\x10INTERNAL_MANAGED\x10\x01\x12\x14\n\x10\x45XTERNAL_MANAGED\x10\x02*P\n\nWireFormat\x12\x1b\n\x17WIRE_FORMAT_UNSPECIFIED\x10\x00\x12\x11\n\rEXT_PROC_GRPC\x10\x01\x12\x12\n\x0e\x45XT_AUTHZ_GRPC\x10\x03*t\n\x0c\x42odySendMode\x12\x1e\n\x1a\x42ODY_SEND_MODE_UNSPECIFIED\x10\x00\x12\x1b\n\x17\x42ODY_SEND_MODE_STREAMED\x10\x01\x12\'\n#BODY_SEND_MODE_FULL_DUPLEX_STREAMED\x10\x02\x32\xf9\'\n\nDepService\x12\xe6\x01\n\x17ListLbTrafficExtensions\x12?.google.cloud.networkservices.v1.ListLbTrafficExtensionsRequest\x1a@.google.cloud.networkservices.v1.ListLbTrafficExtensionsResponse\"H\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x39\x12\x37/v1/{parent=projects/*/locations/*}/lbTrafficExtensions\x12\xd3\x01\n\x15GetLbTrafficExtension\x12=.google.cloud.networkservices.v1.GetLbTrafficExtensionRequest\x1a\x33.google.cloud.networkservices.v1.LbTrafficExtension\"F\xda\x41\x04name\x82\xd3\xe4\x93\x02\x39\x12\x37/v1/{name=projects/*/locations/*/lbTrafficExtensions/*}\x12\xb3\x02\n\x18\x43reateLbTrafficExtension\x12@.google.cloud.networkservices.v1.CreateLbTrafficExtensionRequest\x1a\x1d.google.longrunning.Operation\"\xb5\x01\xca\x41\'\n\x12LbTrafficExtension\x12\x11OperationMetadata\xda\x41\x33parent,lb_traffic_extension,lb_traffic_extension_id\x82\xd3\xe4\x93\x02O\"7/v1/{parent=projects/*/locations/*}/lbTrafficExtensions:\x14lb_traffic_extension\x12\xb5\x02\n\x18UpdateLbTrafficExtension\x12@.google.cloud.networkservices.v1.UpdateLbTrafficExtensionRequest\x1a\x1d.google.longrunning.Operation\"\xb7\x01\xca\x41\'\n\x12LbTrafficExtension\x12\x11OperationMetadata\xda\x41 lb_traffic_extension,update_mask\x82\xd3\xe4\x93\x02\x64\x32L/v1/{lb_traffic_extension.name=projects/*/locations/*/lbTrafficExtensions/*}:\x14lb_traffic_extension\x12\xf0\x01\n\x18\x44\x65leteLbTrafficExtension\x12@.google.cloud.networkservices.v1.DeleteLbTrafficExtensionRequest\x1a\x1d.google.longrunning.Operation\"s\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x39*7/v1/{name=projects/*/locations/*/lbTrafficExtensions/*}\x12\xde\x01\n\x15ListLbRouteExtensions\x12=.google.cloud.networkservices.v1.ListLbRouteExtensionsRequest\x1a>.google.cloud.networkservices.v1.ListLbRouteExtensionsResponse\"F\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x37\x12\x35/v1/{parent=projects/*/locations/*}/lbRouteExtensions\x12\xcb\x01\n\x13GetLbRouteExtension\x12;.google.cloud.networkservices.v1.GetLbRouteExtensionRequest\x1a\x31.google.cloud.networkservices.v1.LbRouteExtension\"D\xda\x41\x04name\x82\xd3\xe4\x93\x02\x37\x12\x35/v1/{name=projects/*/locations/*/lbRouteExtensions/*}\x12\xa5\x02\n\x16\x43reateLbRouteExtension\x12>.google.cloud.networkservices.v1.CreateLbRouteExtensionRequest\x1a\x1d.google.longrunning.Operation\"\xab\x01\xca\x41%\n\x10LbRouteExtension\x12\x11OperationMetadata\xda\x41/parent,lb_route_extension,lb_route_extension_id\x82\xd3\xe4\x93\x02K\"5/v1/{parent=projects/*/locations/*}/lbRouteExtensions:\x12lb_route_extension\x12\xa7\x02\n\x16UpdateLbRouteExtension\x12>.google.cloud.networkservices.v1.UpdateLbRouteExtensionRequest\x1a\x1d.google.longrunning.Operation\"\xad\x01\xca\x41%\n\x10LbRouteExtension\x12\x11OperationMetadata\xda\x41\x1elb_route_extension,update_mask\x82\xd3\xe4\x93\x02^2H/v1/{lb_route_extension.name=projects/*/locations/*/lbRouteExtensions/*}:\x12lb_route_extension\x12\xea\x01\n\x16\x44\x65leteLbRouteExtension\x12>.google.cloud.networkservices.v1.DeleteLbRouteExtensionRequest\x1a\x1d.google.longrunning.Operation\"q\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x37*5/v1/{name=projects/*/locations/*/lbRouteExtensions/*}\x12\xda\x01\n\x14ListLbEdgeExtensions\x12<.google.cloud.networkservices.v1.ListLbEdgeExtensionsRequest\x1a=.google.cloud.networkservices.v1.ListLbEdgeExtensionsResponse\"E\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x36\x12\x34/v1/{parent=projects/*/locations/*}/lbEdgeExtensions\x12\xc7\x01\n\x12GetLbEdgeExtension\x12:.google.cloud.networkservices.v1.GetLbEdgeExtensionRequest\x1a\x30.google.cloud.networkservices.v1.LbEdgeExtension\"C\xda\x41\x04name\x82\xd3\xe4\x93\x02\x36\x12\x34/v1/{name=projects/*/locations/*/lbEdgeExtensions/*}\x12\x9e\x02\n\x15\x43reateLbEdgeExtension\x12=.google.cloud.networkservices.v1.CreateLbEdgeExtensionRequest\x1a\x1d.google.longrunning.Operation\"\xa6\x01\xca\x41$\n\x0fLbEdgeExtension\x12\x11OperationMetadata\xda\x41-parent,lb_edge_extension,lb_edge_extension_id\x82\xd3\xe4\x93\x02I\"4/v1/{parent=projects/*/locations/*}/lbEdgeExtensions:\x11lb_edge_extension\x12\xa0\x02\n\x15UpdateLbEdgeExtension\x12=.google.cloud.networkservices.v1.UpdateLbEdgeExtensionRequest\x1a\x1d.google.longrunning.Operation\"\xa8\x01\xca\x41$\n\x0fLbEdgeExtension\x12\x11OperationMetadata\xda\x41\x1dlb_edge_extension,update_mask\x82\xd3\xe4\x93\x02[2F/v1/{lb_edge_extension.name=projects/*/locations/*/lbEdgeExtensions/*}:\x11lb_edge_extension\x12\xe7\x01\n\x15\x44\x65leteLbEdgeExtension\x12=.google.cloud.networkservices.v1.DeleteLbEdgeExtensionRequest\x1a\x1d.google.longrunning.Operation\"p\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x36*4/v1/{name=projects/*/locations/*/lbEdgeExtensions/*}\x12\xd6\x01\n\x13ListAuthzExtensions\x12;.google.cloud.networkservices.v1.ListAuthzExtensionsRequest\x1a<.google.cloud.networkservices.v1.ListAuthzExtensionsResponse\"D\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x35\x12\x33/v1/{parent=projects/*/locations/*}/authzExtensions\x12\xc3\x01\n\x11GetAuthzExtension\x12\x39.google.cloud.networkservices.v1.GetAuthzExtensionRequest\x1a/.google.cloud.networkservices.v1.AuthzExtension\"B\xda\x41\x04name\x82\xd3\xe4\x93\x02\x35\x12\x33/v1/{name=projects/*/locations/*/authzExtensions/*}\x12\x94\x02\n\x14\x43reateAuthzExtension\x12<.google.cloud.networkservices.v1.CreateAuthzExtensionRequest\x1a\x1d.google.longrunning.Operation\"\x9e\x01\xca\x41#\n\x0e\x41uthzExtension\x12\x11OperationMetadata\xda\x41)parent,authz_extension,authz_extension_id\x82\xd3\xe4\x93\x02\x46\"3/v1/{parent=projects/*/locations/*}/authzExtensions:\x0f\x61uthz_extension\x12\x96\x02\n\x14UpdateAuthzExtension\x12<.google.cloud.networkservices.v1.UpdateAuthzExtensionRequest\x1a\x1d.google.longrunning.Operation\"\xa0\x01\xca\x41#\n\x0e\x41uthzExtension\x12\x11OperationMetadata\xda\x41\x1b\x61uthz_extension,update_mask\x82\xd3\xe4\x93\x02V2C/v1/{authz_extension.name=projects/*/locations/*/authzExtensions/*}:\x0f\x61uthz_extension\x12\xe4\x01\n\x14\x44\x65leteAuthzExtension\x12<.google.cloud.networkservices.v1.DeleteAuthzExtensionRequest\x1a\x1d.google.longrunning.Operation\"o\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x35*3/v1/{name=projects/*/locations/*/authzExtensions/*}\x1aR\xca\x41\x1enetworkservices.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xe9\x01\n#com.google.cloud.networkservices.v1B\x08\x44\x65pProtoP\x01ZMcloud.google.com/go/networkservices/apiv1/networkservicespb;networkservicespb\xaa\x02\x1fGoogle.Cloud.NetworkServices.V1\xca\x02\x1fGoogle\\Cloud\\NetworkServices\\V1\xea\x02\"Google::Cloud::NetworkServices::V1b\x06proto3" pool = ::Google::Protobuf::DescriptorPool.generated_pool pool.add_serialized_file(descriptor_data) @@ -61,6 +61,7 @@ module V1 EventType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.EventType").enummodule LoadBalancingScheme = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.LoadBalancingScheme").enummodule WireFormat = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.WireFormat").enummodule + BodySendMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.BodySendMode").enummodule end end end diff --git a/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/gateway_pb.rb b/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/gateway_pb.rb index 7bd4644ea8b1..69ea84d4661a 100644 --- a/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/gateway_pb.rb +++ b/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/gateway_pb.rb @@ -11,7 +11,7 @@ require 'google/protobuf/timestamp_pb' -descriptor_data = "\n-google/cloud/networkservices/v1/gateway.proto\x12\x1fgoogle.cloud.networkservices.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a,google/cloud/networkservices/v1/common.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x84\x0b\n\x07Gateway\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x16\n\tself_link\x18\r \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12I\n\x06labels\x18\x04 \x03(\x0b\x32\x34.google.cloud.networkservices.v1.Gateway.LabelsEntryB\x03\xe0\x41\x01\x12\x18\n\x0b\x64\x65scription\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12@\n\x04type\x18\x06 \x01(\x0e\x32-.google.cloud.networkservices.v1.Gateway.TypeB\x03\xe0\x41\x05\x12\x39\n\taddresses\x18\x07 \x03(\tB&\xe0\x41\x01\xfa\x41 \n\x1e\x63ompute.googleapis.com/Address\x12\x12\n\x05ports\x18\x0b \x03(\x05\x42\x03\xe0\x41\x02\x12\x12\n\x05scope\x18\x08 \x01(\tB\x03\xe0\x41\x01\x12Q\n\x11server_tls_policy\x18\t \x01(\tB6\xe0\x41\x01\xfa\x41\x30\n.networksecurity.googleapis.com/ServerTlsPolicy\x12O\n\x10\x63\x65rtificate_urls\x18\x0e \x03(\tB5\xe0\x41\x01\xfa\x41/\n-certificatemanager.googleapis.com/Certificate\x12]\n\x17gateway_security_policy\x18\x12 \x01(\tB<\xe0\x41\x01\xfa\x41\x36\n4networksecurity.googleapis.com/GatewaySecurityPolicy\x12\x37\n\x07network\x18\x10 \x01(\tB&\xe0\x41\x01\xfa\x41 \n\x1e\x63ompute.googleapis.com/Network\x12=\n\nsubnetwork\x18\x11 \x01(\tB)\xe0\x41\x01\xfa\x41#\n!compute.googleapis.com/Subnetwork\x12K\n\nip_version\x18\x15 \x01(\x0e\x32\x32.google.cloud.networkservices.v1.Gateway.IpVersionB\x03\xe0\x41\x01\x12N\n\renvoy_headers\x18\x1c \x01(\x0e\x32-.google.cloud.networkservices.v1.EnvoyHeadersB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12O\n\x0crouting_mode\x18 \x01(\x0e\x32\x34.google.cloud.networkservices.v1.Gateway.RoutingModeB\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"C\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\r\n\tOPEN_MESH\x10\x01\x12\x16\n\x12SECURE_WEB_GATEWAY\x10\x02\";\n\tIpVersion\x12\x1a\n\x16IP_VERSION_UNSPECIFIED\x10\x00\x12\x08\n\x04IPV4\x10\x01\x12\x08\n\x04IPV6\x10\x02\"C\n\x0bRoutingMode\x12\x19\n\x15\x45XPLICIT_ROUTING_MODE\x10\x00\x12\x19\n\x15NEXT_HOP_ROUTING_MODE\x10\x01:g\xea\x41\x64\n&networkservices.googleapis.com/Gateway\x12:projects/{project}/locations/{location}/gateways/{gateway}B\x10\n\x0e_envoy_headers\"|\n\x13ListGatewaysRequest\x12>\n\x06parent\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\x12&networkservices.googleapis.com/Gateway\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"\x80\x01\n\x14ListGatewaysResponse\x12:\n\x08gateways\x18\x01 \x03(\x0b\x32(.google.cloud.networkservices.v1.Gateway\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"Q\n\x11GetGatewayRequest\x12<\n\x04name\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\n&networkservices.googleapis.com/Gateway\"\xaf\x01\n\x14\x43reateGatewayRequest\x12>\n\x06parent\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\x12&networkservices.googleapis.com/Gateway\x12\x17\n\ngateway_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12>\n\x07gateway\x18\x03 \x01(\x0b\x32(.google.cloud.networkservices.v1.GatewayB\x03\xe0\x41\x02\"\x8c\x01\n\x14UpdateGatewayRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x12>\n\x07gateway\x18\x02 \x01(\x0b\x32(.google.cloud.networkservices.v1.GatewayB\x03\xe0\x41\x02\"T\n\x14\x44\x65leteGatewayRequest\x12<\n\x04name\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\n&networkservices.googleapis.com/GatewayB\x89\x06\n#com.google.cloud.networkservices.v1B\x0cGatewayProtoP\x01ZMcloud.google.com/go/networkservices/apiv1/networkservicespb;networkservicespb\xaa\x02\x1fGoogle.Cloud.NetworkServices.V1\xca\x02\x1fGoogle\\Cloud\\NetworkServices\\V1\xea\x02\"Google::Cloud::NetworkServices::V1\xea\x41\x91\x01\n4networksecurity.googleapis.com/GatewaySecurityPolicy\x12Yprojects/{project}/locations/{location}/gatewaySecurityPolicies/{gateway_security_policy}\xea\x41\x61\n!compute.googleapis.com/Subnetwork\x12\n\x06parent\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\x12&networkservices.googleapis.com/Gateway\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"\x80\x01\n\x14ListGatewaysResponse\x12:\n\x08gateways\x18\x01 \x03(\x0b\x32(.google.cloud.networkservices.v1.Gateway\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"Q\n\x11GetGatewayRequest\x12<\n\x04name\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\n&networkservices.googleapis.com/Gateway\"\xaf\x01\n\x14\x43reateGatewayRequest\x12>\n\x06parent\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\x12&networkservices.googleapis.com/Gateway\x12\x17\n\ngateway_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12>\n\x07gateway\x18\x03 \x01(\x0b\x32(.google.cloud.networkservices.v1.GatewayB\x03\xe0\x41\x02\"\x8c\x01\n\x14UpdateGatewayRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x12>\n\x07gateway\x18\x02 \x01(\x0b\x32(.google.cloud.networkservices.v1.GatewayB\x03\xe0\x41\x02\"T\n\x14\x44\x65leteGatewayRequest\x12<\n\x04name\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\n&networkservices.googleapis.com/GatewayB\x89\x06\n#com.google.cloud.networkservices.v1B\x0cGatewayProtoP\x01ZMcloud.google.com/go/networkservices/apiv1/networkservicespb;networkservicespb\xaa\x02\x1fGoogle.Cloud.NetworkServices.V1\xca\x02\x1fGoogle\\Cloud\\NetworkServices\\V1\xea\x02\"Google::Cloud::NetworkServices::V1\xea\x41\x91\x01\n4networksecurity.googleapis.com/GatewaySecurityPolicy\x12Yprojects/{project}/locations/{location}/gatewaySecurityPolicies/{gateway_security_policy}\xea\x41\x61\n!compute.googleapis.com/Subnetwork\x12.google.cloud.networkservices.v1.HttpRoute.QueryParameterMatchB\x0b\n\tPathMatch\x1a\xa2\x02\n\x0b\x44\x65stination\x12@\n\x0cservice_name\x18\x01 \x01(\tB*\xfa\x41\'\n%compute.googleapis.com/BackendService\x12\x0e\n\x06weight\x18\x02 \x01(\x05\x12_\n\x17request_header_modifier\x18\x03 \x01(\x0b\x32\x39.google.cloud.networkservices.v1.HttpRoute.HeaderModifierB\x03\xe0\x41\x01\x12`\n\x18response_header_modifier\x18\x04 \x01(\x0b\x32\x39.google.cloud.networkservices.v1.HttpRoute.HeaderModifierB\x03\xe0\x41\x01\x1a\x86\x03\n\x08Redirect\x12\x15\n\rhost_redirect\x18\x01 \x01(\t\x12\x15\n\rpath_redirect\x18\x02 \x01(\t\x12\x16\n\x0eprefix_rewrite\x18\x03 \x01(\t\x12W\n\rresponse_code\x18\x04 \x01(\x0e\x32@.google.cloud.networkservices.v1.HttpRoute.Redirect.ResponseCode\x12\x16\n\x0ehttps_redirect\x18\x05 \x01(\x08\x12\x13\n\x0bstrip_query\x18\x06 \x01(\x08\x12\x15\n\rport_redirect\x18\x07 \x01(\x05\"\x96\x01\n\x0cResponseCode\x12\x1d\n\x19RESPONSE_CODE_UNSPECIFIED\x10\x00\x12\x1d\n\x19MOVED_PERMANENTLY_DEFAULT\x10\x01\x12\t\n\x05\x46OUND\x10\x02\x12\r\n\tSEE_OTHER\x10\x03\x12\x16\n\x12TEMPORARY_REDIRECT\x10\x04\x12\x16\n\x12PERMANENT_REDIRECT\x10\x05\x1a\xc1\x02\n\x14\x46\x61ultInjectionPolicy\x12T\n\x05\x64\x65lay\x18\x01 \x01(\x0b\x32\x45.google.cloud.networkservices.v1.HttpRoute.FaultInjectionPolicy.Delay\x12T\n\x05\x61\x62ort\x18\x02 \x01(\x0b\x32\x45.google.cloud.networkservices.v1.HttpRoute.FaultInjectionPolicy.Abort\x1aK\n\x05\x44\x65lay\x12.\n\x0b\x66ixed_delay\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x12\n\npercentage\x18\x02 \x01(\x05\x1a\x30\n\x05\x41\x62ort\x12\x13\n\x0bhttp_status\x18\x01 \x01(\x05\x12\x12\n\npercentage\x18\x02 \x01(\x05\x1aS\n\x1dStatefulSessionAffinityPolicy\x12\x32\n\ncookie_ttl\x18\x01 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x02\x1a\x9a\x02\n\x0eHeaderModifier\x12O\n\x03set\x18\x01 \x03(\x0b\x32\x42.google.cloud.networkservices.v1.HttpRoute.HeaderModifier.SetEntry\x12O\n\x03\x61\x64\x64\x18\x02 \x03(\x0b\x32\x42.google.cloud.networkservices.v1.HttpRoute.HeaderModifier.AddEntry\x12\x0e\n\x06remove\x18\x03 \x03(\t\x1a*\n\x08SetEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a*\n\x08\x41\x64\x64\x45ntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a?\n\nURLRewrite\x12\x1b\n\x13path_prefix_rewrite\x18\x01 \x01(\t\x12\x14\n\x0chost_rewrite\x18\x02 \x01(\t\x1ap\n\x0bRetryPolicy\x12\x18\n\x10retry_conditions\x18\x01 \x03(\t\x12\x13\n\x0bnum_retries\x18\x02 \x01(\x05\x12\x32\n\x0fper_try_timeout\x18\x03 \x01(\x0b\x32\x19.google.protobuf.Duration\x1a\x7f\n\x13RequestMirrorPolicy\x12K\n\x0b\x64\x65stination\x18\x01 \x01(\x0b\x32\x36.google.cloud.networkservices.v1.HttpRoute.Destination\x12\x1b\n\x0emirror_percent\x18\x02 \x01(\x02\x42\x03\xe0\x41\x01\x1a\xc5\x01\n\nCorsPolicy\x12\x15\n\rallow_origins\x18\x01 \x03(\t\x12\x1c\n\x14\x61llow_origin_regexes\x18\x02 \x03(\t\x12\x15\n\rallow_methods\x18\x03 \x03(\t\x12\x15\n\rallow_headers\x18\x04 \x03(\t\x12\x16\n\x0e\x65xpose_headers\x18\x05 \x03(\t\x12\x0f\n\x07max_age\x18\x06 \x01(\t\x12\x19\n\x11\x61llow_credentials\x18\x07 \x01(\x08\x12\x10\n\x08\x64isabled\x18\x08 \x01(\x08\x1al\n\x12HttpDirectResponse\x12\x1a\n\x0bstring_body\x18\x02 \x01(\tB\x03\xe0\x41\x01H\x00\x12\x19\n\nbytes_body\x18\x03 \x01(\x0c\x42\x03\xe0\x41\x01H\x00\x12\x13\n\x06status\x18\x01 \x01(\x05\x42\x03\xe0\x41\x02\x42\n\n\x08HttpBody\x1a\xb2\x08\n\x0bRouteAction\x12L\n\x0c\x64\x65stinations\x18\x01 \x03(\x0b\x32\x36.google.cloud.networkservices.v1.HttpRoute.Destination\x12\x45\n\x08redirect\x18\x02 \x01(\x0b\x32\x33.google.cloud.networkservices.v1.HttpRoute.Redirect\x12_\n\x16\x66\x61ult_injection_policy\x18\x04 \x01(\x0b\x32?.google.cloud.networkservices.v1.HttpRoute.FaultInjectionPolicy\x12Z\n\x17request_header_modifier\x18\x05 \x01(\x0b\x32\x39.google.cloud.networkservices.v1.HttpRoute.HeaderModifier\x12[\n\x18response_header_modifier\x18\x06 \x01(\x0b\x32\x39.google.cloud.networkservices.v1.HttpRoute.HeaderModifier\x12J\n\x0burl_rewrite\x18\x07 \x01(\x0b\x32\x35.google.cloud.networkservices.v1.HttpRoute.URLRewrite\x12*\n\x07timeout\x18\x08 \x01(\x0b\x32\x19.google.protobuf.Duration\x12L\n\x0cretry_policy\x18\t \x01(\x0b\x32\x36.google.cloud.networkservices.v1.HttpRoute.RetryPolicy\x12]\n\x15request_mirror_policy\x18\n \x01(\x0b\x32>.google.cloud.networkservices.v1.HttpRoute.RequestMirrorPolicy\x12J\n\x0b\x63ors_policy\x18\x0b \x01(\x0b\x32\x35.google.cloud.networkservices.v1.HttpRoute.CorsPolicy\x12p\n\x19stateful_session_affinity\x18\x0c \x01(\x0b\x32H.google.cloud.networkservices.v1.HttpRoute.StatefulSessionAffinityPolicyB\x03\xe0\x41\x01\x12[\n\x0f\x64irect_response\x18\r \x01(\x0b\x32=.google.cloud.networkservices.v1.HttpRoute.HttpDirectResponseB\x03\xe0\x41\x01\x12\x34\n\x0cidle_timeout\x18\x0e \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x01\x1a\x9b\x01\n\tRouteRule\x12\x46\n\x07matches\x18\x01 \x03(\x0b\x32\x35.google.cloud.networkservices.v1.HttpRoute.RouteMatch\x12\x46\n\x06\x61\x63tion\x18\x02 \x01(\x0b\x32\x36.google.cloud.networkservices.v1.HttpRoute.RouteAction\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:n\xea\x41k\n(networkservices.googleapis.com/HttpRoute\x12?projects/{project}/locations/{location}/httpRoutes/{http_route}\"\xa5\x01\n\x15ListHttpRoutesRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\x12(networkservices.googleapis.com/HttpRoute\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12#\n\x16return_partial_success\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"\x87\x01\n\x16ListHttpRoutesResponse\x12?\n\x0bhttp_routes\x18\x01 \x03(\x0b\x32*.google.cloud.networkservices.v1.HttpRoute\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"U\n\x13GetHttpRouteRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(networkservices.googleapis.com/HttpRoute\"\xbb\x01\n\x16\x43reateHttpRouteRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\x12(networkservices.googleapis.com/HttpRoute\x12\x1a\n\rhttp_route_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x43\n\nhttp_route\x18\x03 \x01(\x0b\x32*.google.cloud.networkservices.v1.HttpRouteB\x03\xe0\x41\x02\"\x93\x01\n\x16UpdateHttpRouteRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x12\x43\n\nhttp_route\x18\x02 \x01(\x0b\x32*.google.cloud.networkservices.v1.HttpRouteB\x03\xe0\x41\x02\"X\n\x16\x44\x65leteHttpRouteRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(networkservices.googleapis.com/HttpRouteB\xef\x01\n#com.google.cloud.networkservices.v1B\x0eHttpRouteProtoP\x01ZMcloud.google.com/go/networkservices/apiv1/networkservicespb;networkservicespb\xaa\x02\x1fGoogle.Cloud.NetworkServices.V1\xca\x02\x1fGoogle\\Cloud\\NetworkServices\\V1\xea\x02\"Google::Cloud::NetworkServices::V1b\x06proto3" +descriptor_data = "\n0google/cloud/networkservices/v1/http_route.proto\x12\x1fgoogle.cloud.networkservices.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1bgoogle/api/field_info.proto\x1a\x19google/api/resource.proto\x1a\x1egoogle/protobuf/duration.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x8f$\n\tHttpRoute\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x16\n\tself_link\x18\x0b \x01(\tB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x34\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x16\n\thostnames\x18\x05 \x03(\tB\x03\xe0\x41\x02\x12;\n\x06meshes\x18\x08 \x03(\tB+\xe0\x41\x01\xfa\x41%\n#networkservices.googleapis.com/Mesh\x12@\n\x08gateways\x18\t \x03(\tB.\xe0\x41\x01\xfa\x41(\n&networkservices.googleapis.com/Gateway\x12K\n\x06labels\x18\n \x03(\x0b\x32\x36.google.cloud.networkservices.v1.HttpRoute.LabelsEntryB\x03\xe0\x41\x01\x12H\n\x05rules\x18\x06 \x03(\x0b\x32\x34.google.cloud.networkservices.v1.HttpRoute.RouteRuleB\x03\xe0\x41\x02\x1a\xbf\x02\n\x0bHeaderMatch\x12\x15\n\x0b\x65xact_match\x18\x02 \x01(\tH\x00\x12\x15\n\x0bregex_match\x18\x03 \x01(\tH\x00\x12\x16\n\x0cprefix_match\x18\x04 \x01(\tH\x00\x12\x17\n\rpresent_match\x18\x05 \x01(\x08H\x00\x12\x16\n\x0csuffix_match\x18\x06 \x01(\tH\x00\x12Z\n\x0brange_match\x18\x07 \x01(\x0b\x32\x43.google.cloud.networkservices.v1.HttpRoute.HeaderMatch.IntegerRangeH\x00\x12\x0e\n\x06header\x18\x01 \x01(\t\x12\x14\n\x0cinvert_match\x18\x08 \x01(\x08\x1a*\n\x0cIntegerRange\x12\r\n\x05start\x18\x01 \x01(\x05\x12\x0b\n\x03\x65nd\x18\x02 \x01(\x05\x42\x0b\n\tMatchType\x1a\x82\x01\n\x13QueryParameterMatch\x12\x15\n\x0b\x65xact_match\x18\x02 \x01(\tH\x00\x12\x15\n\x0bregex_match\x18\x03 \x01(\tH\x00\x12\x17\n\rpresent_match\x18\x04 \x01(\x08H\x00\x12\x17\n\x0fquery_parameter\x18\x01 \x01(\tB\x0b\n\tMatchType\x1a\x9b\x02\n\nRouteMatch\x12\x19\n\x0f\x66ull_path_match\x18\x01 \x01(\tH\x00\x12\x16\n\x0cprefix_match\x18\x02 \x01(\tH\x00\x12\x15\n\x0bregex_match\x18\x03 \x01(\tH\x00\x12\x13\n\x0bignore_case\x18\x04 \x01(\x08\x12G\n\x07headers\x18\x05 \x03(\x0b\x32\x36.google.cloud.networkservices.v1.HttpRoute.HeaderMatch\x12X\n\x10query_parameters\x18\x06 \x03(\x0b\x32>.google.cloud.networkservices.v1.HttpRoute.QueryParameterMatchB\x0b\n\tPathMatch\x1a\xa2\x02\n\x0b\x44\x65stination\x12@\n\x0cservice_name\x18\x01 \x01(\tB*\xfa\x41\'\n%compute.googleapis.com/BackendService\x12\x0e\n\x06weight\x18\x02 \x01(\x05\x12_\n\x17request_header_modifier\x18\x03 \x01(\x0b\x32\x39.google.cloud.networkservices.v1.HttpRoute.HeaderModifierB\x03\xe0\x41\x01\x12`\n\x18response_header_modifier\x18\x04 \x01(\x0b\x32\x39.google.cloud.networkservices.v1.HttpRoute.HeaderModifierB\x03\xe0\x41\x01\x1a\x86\x03\n\x08Redirect\x12\x15\n\rhost_redirect\x18\x01 \x01(\t\x12\x15\n\rpath_redirect\x18\x02 \x01(\t\x12\x16\n\x0eprefix_rewrite\x18\x03 \x01(\t\x12W\n\rresponse_code\x18\x04 \x01(\x0e\x32@.google.cloud.networkservices.v1.HttpRoute.Redirect.ResponseCode\x12\x16\n\x0ehttps_redirect\x18\x05 \x01(\x08\x12\x13\n\x0bstrip_query\x18\x06 \x01(\x08\x12\x15\n\rport_redirect\x18\x07 \x01(\x05\"\x96\x01\n\x0cResponseCode\x12\x1d\n\x19RESPONSE_CODE_UNSPECIFIED\x10\x00\x12\x1d\n\x19MOVED_PERMANENTLY_DEFAULT\x10\x01\x12\t\n\x05\x46OUND\x10\x02\x12\r\n\tSEE_OTHER\x10\x03\x12\x16\n\x12TEMPORARY_REDIRECT\x10\x04\x12\x16\n\x12PERMANENT_REDIRECT\x10\x05\x1a\xc1\x02\n\x14\x46\x61ultInjectionPolicy\x12T\n\x05\x64\x65lay\x18\x01 \x01(\x0b\x32\x45.google.cloud.networkservices.v1.HttpRoute.FaultInjectionPolicy.Delay\x12T\n\x05\x61\x62ort\x18\x02 \x01(\x0b\x32\x45.google.cloud.networkservices.v1.HttpRoute.FaultInjectionPolicy.Abort\x1aK\n\x05\x44\x65lay\x12.\n\x0b\x66ixed_delay\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x12\n\npercentage\x18\x02 \x01(\x05\x1a\x30\n\x05\x41\x62ort\x12\x13\n\x0bhttp_status\x18\x01 \x01(\x05\x12\x12\n\npercentage\x18\x02 \x01(\x05\x1aS\n\x1dStatefulSessionAffinityPolicy\x12\x32\n\ncookie_ttl\x18\x01 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x02\x1a\x9a\x02\n\x0eHeaderModifier\x12O\n\x03set\x18\x01 \x03(\x0b\x32\x42.google.cloud.networkservices.v1.HttpRoute.HeaderModifier.SetEntry\x12O\n\x03\x61\x64\x64\x18\x02 \x03(\x0b\x32\x42.google.cloud.networkservices.v1.HttpRoute.HeaderModifier.AddEntry\x12\x0e\n\x06remove\x18\x03 \x03(\t\x1a*\n\x08SetEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a*\n\x08\x41\x64\x64\x45ntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a?\n\nURLRewrite\x12\x1b\n\x13path_prefix_rewrite\x18\x01 \x01(\t\x12\x14\n\x0chost_rewrite\x18\x02 \x01(\t\x1ap\n\x0bRetryPolicy\x12\x18\n\x10retry_conditions\x18\x01 \x03(\t\x12\x13\n\x0bnum_retries\x18\x02 \x01(\x05\x12\x32\n\x0fper_try_timeout\x18\x03 \x01(\x0b\x32\x19.google.protobuf.Duration\x1a\x7f\n\x13RequestMirrorPolicy\x12K\n\x0b\x64\x65stination\x18\x01 \x01(\x0b\x32\x36.google.cloud.networkservices.v1.HttpRoute.Destination\x12\x1b\n\x0emirror_percent\x18\x02 \x01(\x02\x42\x03\xe0\x41\x01\x1a\xc5\x01\n\nCorsPolicy\x12\x15\n\rallow_origins\x18\x01 \x03(\t\x12\x1c\n\x14\x61llow_origin_regexes\x18\x02 \x03(\t\x12\x15\n\rallow_methods\x18\x03 \x03(\t\x12\x15\n\rallow_headers\x18\x04 \x03(\t\x12\x16\n\x0e\x65xpose_headers\x18\x05 \x03(\t\x12\x0f\n\x07max_age\x18\x06 \x01(\t\x12\x19\n\x11\x61llow_credentials\x18\x07 \x01(\x08\x12\x10\n\x08\x64isabled\x18\x08 \x01(\x08\x1al\n\x12HttpDirectResponse\x12\x1a\n\x0bstring_body\x18\x02 \x01(\tB\x03\xe0\x41\x01H\x00\x12\x19\n\nbytes_body\x18\x03 \x01(\x0c\x42\x03\xe0\x41\x01H\x00\x12\x13\n\x06status\x18\x01 \x01(\x05\x42\x03\xe0\x41\x02\x42\n\n\x08HttpBody\x1a\xb2\x08\n\x0bRouteAction\x12L\n\x0c\x64\x65stinations\x18\x01 \x03(\x0b\x32\x36.google.cloud.networkservices.v1.HttpRoute.Destination\x12\x45\n\x08redirect\x18\x02 \x01(\x0b\x32\x33.google.cloud.networkservices.v1.HttpRoute.Redirect\x12_\n\x16\x66\x61ult_injection_policy\x18\x04 \x01(\x0b\x32?.google.cloud.networkservices.v1.HttpRoute.FaultInjectionPolicy\x12Z\n\x17request_header_modifier\x18\x05 \x01(\x0b\x32\x39.google.cloud.networkservices.v1.HttpRoute.HeaderModifier\x12[\n\x18response_header_modifier\x18\x06 \x01(\x0b\x32\x39.google.cloud.networkservices.v1.HttpRoute.HeaderModifier\x12J\n\x0burl_rewrite\x18\x07 \x01(\x0b\x32\x35.google.cloud.networkservices.v1.HttpRoute.URLRewrite\x12*\n\x07timeout\x18\x08 \x01(\x0b\x32\x19.google.protobuf.Duration\x12L\n\x0cretry_policy\x18\t \x01(\x0b\x32\x36.google.cloud.networkservices.v1.HttpRoute.RetryPolicy\x12]\n\x15request_mirror_policy\x18\n \x01(\x0b\x32>.google.cloud.networkservices.v1.HttpRoute.RequestMirrorPolicy\x12J\n\x0b\x63ors_policy\x18\x0b \x01(\x0b\x32\x35.google.cloud.networkservices.v1.HttpRoute.CorsPolicy\x12p\n\x19stateful_session_affinity\x18\x0c \x01(\x0b\x32H.google.cloud.networkservices.v1.HttpRoute.StatefulSessionAffinityPolicyB\x03\xe0\x41\x01\x12[\n\x0f\x64irect_response\x18\r \x01(\x0b\x32=.google.cloud.networkservices.v1.HttpRoute.HttpDirectResponseB\x03\xe0\x41\x01\x12\x34\n\x0cidle_timeout\x18\x0e \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x01\x1a\x9b\x01\n\tRouteRule\x12\x46\n\x07matches\x18\x01 \x03(\x0b\x32\x35.google.cloud.networkservices.v1.HttpRoute.RouteMatch\x12\x46\n\x06\x61\x63tion\x18\x02 \x01(\x0b\x32\x36.google.cloud.networkservices.v1.HttpRoute.RouteAction\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:n\xea\x41k\n(networkservices.googleapis.com/HttpRoute\x12?projects/{project}/locations/{location}/httpRoutes/{http_route}\"\xba\x01\n\x15ListHttpRoutesRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\x12(networkservices.googleapis.com/HttpRoute\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12#\n\x16return_partial_success\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x87\x01\n\x16ListHttpRoutesResponse\x12?\n\x0bhttp_routes\x18\x01 \x03(\x0b\x32*.google.cloud.networkservices.v1.HttpRoute\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"U\n\x13GetHttpRouteRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(networkservices.googleapis.com/HttpRoute\"\xdc\x01\n\x16\x43reateHttpRouteRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\x12(networkservices.googleapis.com/HttpRoute\x12\x1a\n\rhttp_route_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x43\n\nhttp_route\x18\x03 \x01(\x0b\x32*.google.cloud.networkservices.v1.HttpRouteB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x04 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\x93\x01\n\x16UpdateHttpRouteRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x12\x43\n\nhttp_route\x18\x02 \x01(\x0b\x32*.google.cloud.networkservices.v1.HttpRouteB\x03\xe0\x41\x02\"X\n\x16\x44\x65leteHttpRouteRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(networkservices.googleapis.com/HttpRouteB\xef\x01\n#com.google.cloud.networkservices.v1B\x0eHttpRouteProtoP\x01ZMcloud.google.com/go/networkservices/apiv1/networkservicespb;networkservicespb\xaa\x02\x1fGoogle.Cloud.NetworkServices.V1\xca\x02\x1fGoogle\\Cloud\\NetworkServices\\V1\xea\x02\"Google::Cloud::NetworkServices::V1b\x06proto3" pool = ::Google::Protobuf::DescriptorPool.generated_pool pool.add_serialized_file(descriptor_data) diff --git a/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/mesh_pb.rb b/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/mesh_pb.rb index d1a55ea58336..876e2212ea88 100644 --- a/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/mesh_pb.rb +++ b/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/mesh_pb.rb @@ -11,7 +11,7 @@ require 'google/protobuf/timestamp_pb' -descriptor_data = "\n*google/cloud/networkservices/v1/mesh.proto\x12\x1fgoogle.cloud.networkservices.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a,google/cloud/networkservices/v1/common.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x91\x04\n\x04Mesh\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x16\n\tself_link\x18\t \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x46\n\x06labels\x18\x04 \x03(\x0b\x32\x31.google.cloud.networkservices.v1.Mesh.LabelsEntryB\x03\xe0\x41\x01\x12\x18\n\x0b\x64\x65scription\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x1e\n\x11interception_port\x18\x08 \x01(\x05\x42\x03\xe0\x41\x01\x12N\n\renvoy_headers\x18\x10 \x01(\x0e\x32-.google.cloud.networkservices.v1.EnvoyHeadersB\x03\xe0\x41\x01H\x00\x88\x01\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:_\xea\x41\\\n#networkservices.googleapis.com/Mesh\x12\x35projects/{project}/locations/{location}/meshes/{mesh}B\x10\n\x0e_envoy_headers\"\x9c\x01\n\x11ListMeshesRequest\x12;\n\x06parent\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\x12#networkservices.googleapis.com/Mesh\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12#\n\x16return_partial_success\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"y\n\x12ListMeshesResponse\x12\x35\n\x06meshes\x18\x01 \x03(\x0b\x32%.google.cloud.networkservices.v1.Mesh\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"K\n\x0eGetMeshRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#networkservices.googleapis.com/Mesh\"\xa0\x01\n\x11\x43reateMeshRequest\x12;\n\x06parent\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\x12#networkservices.googleapis.com/Mesh\x12\x14\n\x07mesh_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x38\n\x04mesh\x18\x03 \x01(\x0b\x32%.google.cloud.networkservices.v1.MeshB\x03\xe0\x41\x02\"\x83\x01\n\x11UpdateMeshRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x12\x38\n\x04mesh\x18\x02 \x01(\x0b\x32%.google.cloud.networkservices.v1.MeshB\x03\xe0\x41\x02\"N\n\x11\x44\x65leteMeshRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#networkservices.googleapis.com/MeshB\xe4\x02\n#com.google.cloud.networkservices.v1B\tMeshProtoP\x01ZMcloud.google.com/go/networkservices/apiv1/networkservicespb;networkservicespb\xaa\x02\x1fGoogle.Cloud.NetworkServices.V1\xca\x02\x1fGoogle\\Cloud\\NetworkServices\\V1\xea\x02\"Google::Cloud::NetworkServices::V1\xea\x41w\n(compute.googleapis.com/ServiceAttachment\x12Kprojects/{project}/regions/{region}/serviceAttachments/{service_attachment}b\x06proto3" +descriptor_data = "\n*google/cloud/networkservices/v1/mesh.proto\x12\x1fgoogle.cloud.networkservices.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a,google/cloud/networkservices/v1/common.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x9f\x04\n\x04Mesh\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x16\n\tself_link\x18\t \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x46\n\x06labels\x18\x04 \x03(\x0b\x32\x31.google.cloud.networkservices.v1.Mesh.LabelsEntryB\x03\xe0\x41\x01\x12\x18\n\x0b\x64\x65scription\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x1e\n\x11interception_port\x18\x08 \x01(\x05\x42\x03\xe0\x41\x01\x12N\n\renvoy_headers\x18\x10 \x01(\x0e\x32-.google.cloud.networkservices.v1.EnvoyHeadersB\x03\xe0\x41\x01H\x00\x88\x01\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:m\xea\x41j\n#networkservices.googleapis.com/Mesh\x12\x35projects/{project}/locations/{location}/meshes/{mesh}*\x06meshes2\x04meshB\x10\n\x0e_envoy_headers\"\x9c\x01\n\x11ListMeshesRequest\x12;\n\x06parent\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\x12#networkservices.googleapis.com/Mesh\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12#\n\x16return_partial_success\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"y\n\x12ListMeshesResponse\x12\x35\n\x06meshes\x18\x01 \x03(\x0b\x32%.google.cloud.networkservices.v1.Mesh\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"K\n\x0eGetMeshRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#networkservices.googleapis.com/Mesh\"\xa0\x01\n\x11\x43reateMeshRequest\x12;\n\x06parent\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\x12#networkservices.googleapis.com/Mesh\x12\x14\n\x07mesh_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x38\n\x04mesh\x18\x03 \x01(\x0b\x32%.google.cloud.networkservices.v1.MeshB\x03\xe0\x41\x02\"\x83\x01\n\x11UpdateMeshRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x12\x38\n\x04mesh\x18\x02 \x01(\x0b\x32%.google.cloud.networkservices.v1.MeshB\x03\xe0\x41\x02\"N\n\x11\x44\x65leteMeshRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#networkservices.googleapis.com/MeshB\xe4\x02\n#com.google.cloud.networkservices.v1B\tMeshProtoP\x01ZMcloud.google.com/go/networkservices/apiv1/networkservicespb;networkservicespb\xaa\x02\x1fGoogle.Cloud.NetworkServices.V1\xca\x02\x1fGoogle\\Cloud\\NetworkServices\\V1\xea\x02\"Google::Cloud::NetworkServices::V1\xea\x41w\n(compute.googleapis.com/ServiceAttachment\x12Kprojects/{project}/regions/{region}/serviceAttachments/{service_attachment}b\x06proto3" pool = ::Google::Protobuf::DescriptorPool.generated_pool pool.add_serialized_file(descriptor_data) diff --git a/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/network_services_pb.rb b/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/network_services_pb.rb index ebd630fa0414..83a16384a07d 100644 --- a/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/network_services_pb.rb +++ b/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/network_services_pb.rb @@ -6,6 +6,7 @@ require 'google/api/annotations_pb' require 'google/api/client_pb' +require 'google/cloud/networkservices/v1/agent_gateway_pb' require 'google/cloud/networkservices/v1/common_pb' require 'google/cloud/networkservices/v1/endpoint_policy_pb' require 'google/cloud/networkservices/v1/extensibility_pb' @@ -22,7 +23,7 @@ require 'google/protobuf/empty_pb' -descriptor_data = "\n6google/cloud/networkservices/v1/network_services.proto\x12\x1fgoogle.cloud.networkservices.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a,google/cloud/networkservices/v1/common.proto\x1a\x35google/cloud/networkservices/v1/endpoint_policy.proto\x1a\x33google/cloud/networkservices/v1/extensibility.proto\x1a-google/cloud/networkservices/v1/gateway.proto\x1a\x30google/cloud/networkservices/v1/grpc_route.proto\x1a\x30google/cloud/networkservices/v1/http_route.proto\x1a*google/cloud/networkservices/v1/mesh.proto\x1a\x30google/cloud/networkservices/v1/route_view.proto\x1a\x35google/cloud/networkservices/v1/service_binding.proto\x1a\x37google/cloud/networkservices/v1/service_lb_policy.proto\x1a/google/cloud/networkservices/v1/tcp_route.proto\x1a/google/cloud/networkservices/v1/tls_route.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto2\xc2m\n\x0fNetworkServices\x12\xda\x01\n\x14ListEndpointPolicies\x12<.google.cloud.networkservices.v1.ListEndpointPoliciesRequest\x1a=.google.cloud.networkservices.v1.ListEndpointPoliciesResponse\"E\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x36\x12\x34/v1/{parent=projects/*/locations/*}/endpointPolicies\x12\xc4\x01\n\x11GetEndpointPolicy\x12\x39.google.cloud.networkservices.v1.GetEndpointPolicyRequest\x1a/.google.cloud.networkservices.v1.EndpointPolicy\"C\xda\x41\x04name\x82\xd3\xe4\x93\x02\x36\x12\x34/v1/{name=projects/*/locations/*/endpointPolicies/*}\x12\xb5\x02\n\x14\x43reateEndpointPolicy\x12<.google.cloud.networkservices.v1.CreateEndpointPolicyRequest\x1a\x1d.google.longrunning.Operation\"\xbf\x01\xca\x41\x43\n\x0e\x45ndpointPolicy\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41)parent,endpoint_policy,endpoint_policy_id\x82\xd3\xe4\x93\x02G\"4/v1/{parent=projects/*/locations/*}/endpointPolicies:\x0f\x65ndpoint_policy\x12\xb7\x02\n\x14UpdateEndpointPolicy\x12<.google.cloud.networkservices.v1.UpdateEndpointPolicyRequest\x1a\x1d.google.longrunning.Operation\"\xc1\x01\xca\x41\x43\n\x0e\x45ndpointPolicy\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x1b\x65ndpoint_policy,update_mask\x82\xd3\xe4\x93\x02W2D/v1/{endpoint_policy.name=projects/*/locations/*/endpointPolicies/*}:\x0f\x65ndpoint_policy\x12\x86\x02\n\x14\x44\x65leteEndpointPolicy\x12<.google.cloud.networkservices.v1.DeleteEndpointPolicyRequest\x1a\x1d.google.longrunning.Operation\"\x90\x01\xca\x41J\n\x15google.protobuf.Empty\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x36*4/v1/{name=projects/*/locations/*/endpointPolicies/*}\x12\xe6\x01\n\x16ListWasmPluginVersions\x12>.google.cloud.networkservices.v1.ListWasmPluginVersionsRequest\x1a?.google.cloud.networkservices.v1.ListWasmPluginVersionsResponse\"K\xda\x41\x06parent\x82\xd3\xe4\x93\x02<\x12:/v1/{parent=projects/*/locations/*/wasmPlugins/*}/versions\x12\xd3\x01\n\x14GetWasmPluginVersion\x12<.google.cloud.networkservices.v1.GetWasmPluginVersionRequest\x1a\x32.google.cloud.networkservices.v1.WasmPluginVersion\"I\xda\x41\x04name\x82\xd3\xe4\x93\x02<\x12:/v1/{name=projects/*/locations/*/wasmPlugins/*/versions/*}\x12\xd0\x02\n\x17\x43reateWasmPluginVersion\x12?.google.cloud.networkservices.v1.CreateWasmPluginVersionRequest\x1a\x1d.google.longrunning.Operation\"\xd4\x01\xca\x41\x46\n\x11WasmPluginVersion\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x31parent,wasm_plugin_version,wasm_plugin_version_id\x82\xd3\xe4\x93\x02Q\":/v1/{parent=projects/*/locations/*/wasmPlugins/*}/versions:\x13wasm_plugin_version\x12\x92\x02\n\x17\x44\x65leteWasmPluginVersion\x12?.google.cloud.networkservices.v1.DeleteWasmPluginVersionRequest\x1a\x1d.google.longrunning.Operation\"\x96\x01\xca\x41J\n\x15google.protobuf.Empty\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02<*:/v1/{name=projects/*/locations/*/wasmPlugins/*/versions/*}\x12\xc6\x01\n\x0fListWasmPlugins\x12\x37.google.cloud.networkservices.v1.ListWasmPluginsRequest\x1a\x38.google.cloud.networkservices.v1.ListWasmPluginsResponse\"@\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x31\x12//v1/{parent=projects/*/locations/*}/wasmPlugins\x12\xb3\x01\n\rGetWasmPlugin\x12\x35.google.cloud.networkservices.v1.GetWasmPluginRequest\x1a+.google.cloud.networkservices.v1.WasmPlugin\">\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31\x12//v1/{name=projects/*/locations/*/wasmPlugins/*}\x12\x98\x02\n\x10\x43reateWasmPlugin\x12\x38.google.cloud.networkservices.v1.CreateWasmPluginRequest\x1a\x1d.google.longrunning.Operation\"\xaa\x01\xca\x41?\n\nWasmPlugin\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41!parent,wasm_plugin,wasm_plugin_id\x82\xd3\xe4\x93\x02>\"//v1/{parent=projects/*/locations/*}/wasmPlugins:\x0bwasm_plugin\x12\x9a\x02\n\x10UpdateWasmPlugin\x12\x38.google.cloud.networkservices.v1.UpdateWasmPluginRequest\x1a\x1d.google.longrunning.Operation\"\xac\x01\xca\x41?\n\nWasmPlugin\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x17wasm_plugin,update_mask\x82\xd3\xe4\x93\x02J2;/v1/{wasm_plugin.name=projects/*/locations/*/wasmPlugins/*}:\x0bwasm_plugin\x12\xf9\x01\n\x10\x44\x65leteWasmPlugin\x12\x38.google.cloud.networkservices.v1.DeleteWasmPluginRequest\x1a\x1d.google.longrunning.Operation\"\x8b\x01\xca\x41J\n\x15google.protobuf.Empty\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31*//v1/{name=projects/*/locations/*/wasmPlugins/*}\x12\xba\x01\n\x0cListGateways\x12\x34.google.cloud.networkservices.v1.ListGatewaysRequest\x1a\x35.google.cloud.networkservices.v1.ListGatewaysResponse\"=\xda\x41\x06parent\x82\xd3\xe4\x93\x02.\x12,/v1/{parent=projects/*/locations/*}/gateways\x12\xa7\x01\n\nGetGateway\x12\x32.google.cloud.networkservices.v1.GetGatewayRequest\x1a(.google.cloud.networkservices.v1.Gateway\";\xda\x41\x04name\x82\xd3\xe4\x93\x02.\x12,/v1/{name=projects/*/locations/*/gateways/*}\x12\x80\x02\n\rCreateGateway\x12\x35.google.cloud.networkservices.v1.CreateGatewayRequest\x1a\x1d.google.longrunning.Operation\"\x98\x01\xca\x41<\n\x07Gateway\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x19parent,gateway,gateway_id\x82\xd3\xe4\x93\x02\x37\",/v1/{parent=projects/*/locations/*}/gateways:\x07gateway\x12\x82\x02\n\rUpdateGateway\x12\x35.google.cloud.networkservices.v1.UpdateGatewayRequest\x1a\x1d.google.longrunning.Operation\"\x9a\x01\xca\x41<\n\x07Gateway\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x13gateway,update_mask\x82\xd3\xe4\x93\x02?24/v1/{gateway.name=projects/*/locations/*/gateways/*}:\x07gateway\x12\xf0\x01\n\rDeleteGateway\x12\x35.google.cloud.networkservices.v1.DeleteGatewayRequest\x1a\x1d.google.longrunning.Operation\"\x88\x01\xca\x41J\n\x15google.protobuf.Empty\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02.*,/v1/{name=projects/*/locations/*/gateways/*}\x12\xc2\x01\n\x0eListGrpcRoutes\x12\x36.google.cloud.networkservices.v1.ListGrpcRoutesRequest\x1a\x37.google.cloud.networkservices.v1.ListGrpcRoutesResponse\"?\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x30\x12./v1/{parent=projects/*/locations/*}/grpcRoutes\x12\xaf\x01\n\x0cGetGrpcRoute\x12\x34.google.cloud.networkservices.v1.GetGrpcRouteRequest\x1a*.google.cloud.networkservices.v1.GrpcRoute\"=\xda\x41\x04name\x82\xd3\xe4\x93\x02\x30\x12./v1/{name=projects/*/locations/*/grpcRoutes/*}\x12\x91\x02\n\x0f\x43reateGrpcRoute\x12\x37.google.cloud.networkservices.v1.CreateGrpcRouteRequest\x1a\x1d.google.longrunning.Operation\"\xa5\x01\xca\x41>\n\tGrpcRoute\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x1fparent,grpc_route,grpc_route_id\x82\xd3\xe4\x93\x02<\"./v1/{parent=projects/*/locations/*}/grpcRoutes:\ngrpc_route\x12\x93\x02\n\x0fUpdateGrpcRoute\x12\x37.google.cloud.networkservices.v1.UpdateGrpcRouteRequest\x1a\x1d.google.longrunning.Operation\"\xa7\x01\xca\x41>\n\tGrpcRoute\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x16grpc_route,update_mask\x82\xd3\xe4\x93\x02G29/v1/{grpc_route.name=projects/*/locations/*/grpcRoutes/*}:\ngrpc_route\x12\xf6\x01\n\x0f\x44\x65leteGrpcRoute\x12\x37.google.cloud.networkservices.v1.DeleteGrpcRouteRequest\x1a\x1d.google.longrunning.Operation\"\x8a\x01\xca\x41J\n\x15google.protobuf.Empty\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x30*./v1/{name=projects/*/locations/*/grpcRoutes/*}\x12\xc2\x01\n\x0eListHttpRoutes\x12\x36.google.cloud.networkservices.v1.ListHttpRoutesRequest\x1a\x37.google.cloud.networkservices.v1.ListHttpRoutesResponse\"?\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x30\x12./v1/{parent=projects/*/locations/*}/httpRoutes\x12\xaf\x01\n\x0cGetHttpRoute\x12\x34.google.cloud.networkservices.v1.GetHttpRouteRequest\x1a*.google.cloud.networkservices.v1.HttpRoute\"=\xda\x41\x04name\x82\xd3\xe4\x93\x02\x30\x12./v1/{name=projects/*/locations/*/httpRoutes/*}\x12\x91\x02\n\x0f\x43reateHttpRoute\x12\x37.google.cloud.networkservices.v1.CreateHttpRouteRequest\x1a\x1d.google.longrunning.Operation\"\xa5\x01\xca\x41>\n\tHttpRoute\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x1fparent,http_route,http_route_id\x82\xd3\xe4\x93\x02<\"./v1/{parent=projects/*/locations/*}/httpRoutes:\nhttp_route\x12\x93\x02\n\x0fUpdateHttpRoute\x12\x37.google.cloud.networkservices.v1.UpdateHttpRouteRequest\x1a\x1d.google.longrunning.Operation\"\xa7\x01\xca\x41>\n\tHttpRoute\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x16http_route,update_mask\x82\xd3\xe4\x93\x02G29/v1/{http_route.name=projects/*/locations/*/httpRoutes/*}:\nhttp_route\x12\xf6\x01\n\x0f\x44\x65leteHttpRoute\x12\x37.google.cloud.networkservices.v1.DeleteHttpRouteRequest\x1a\x1d.google.longrunning.Operation\"\x8a\x01\xca\x41J\n\x15google.protobuf.Empty\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x30*./v1/{name=projects/*/locations/*/httpRoutes/*}\x12\xbe\x01\n\rListTcpRoutes\x12\x35.google.cloud.networkservices.v1.ListTcpRoutesRequest\x1a\x36.google.cloud.networkservices.v1.ListTcpRoutesResponse\">\xda\x41\x06parent\x82\xd3\xe4\x93\x02/\x12-/v1/{parent=projects/*/locations/*}/tcpRoutes\x12\xab\x01\n\x0bGetTcpRoute\x12\x33.google.cloud.networkservices.v1.GetTcpRouteRequest\x1a).google.cloud.networkservices.v1.TcpRoute\"<\xda\x41\x04name\x82\xd3\xe4\x93\x02/\x12-/v1/{name=projects/*/locations/*/tcpRoutes/*}\x12\x8a\x02\n\x0e\x43reateTcpRoute\x12\x36.google.cloud.networkservices.v1.CreateTcpRouteRequest\x1a\x1d.google.longrunning.Operation\"\xa0\x01\xca\x41=\n\x08TcpRoute\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x1dparent,tcp_route,tcp_route_id\x82\xd3\xe4\x93\x02:\"-/v1/{parent=projects/*/locations/*}/tcpRoutes:\ttcp_route\x12\x8c\x02\n\x0eUpdateTcpRoute\x12\x36.google.cloud.networkservices.v1.UpdateTcpRouteRequest\x1a\x1d.google.longrunning.Operation\"\xa2\x01\xca\x41=\n\x08TcpRoute\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x15tcp_route,update_mask\x82\xd3\xe4\x93\x02\x44\x32\x37/v1/{tcp_route.name=projects/*/locations/*/tcpRoutes/*}:\ttcp_route\x12\xf3\x01\n\x0e\x44\x65leteTcpRoute\x12\x36.google.cloud.networkservices.v1.DeleteTcpRouteRequest\x1a\x1d.google.longrunning.Operation\"\x89\x01\xca\x41J\n\x15google.protobuf.Empty\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02/*-/v1/{name=projects/*/locations/*/tcpRoutes/*}\x12\xbe\x01\n\rListTlsRoutes\x12\x35.google.cloud.networkservices.v1.ListTlsRoutesRequest\x1a\x36.google.cloud.networkservices.v1.ListTlsRoutesResponse\">\xda\x41\x06parent\x82\xd3\xe4\x93\x02/\x12-/v1/{parent=projects/*/locations/*}/tlsRoutes\x12\xab\x01\n\x0bGetTlsRoute\x12\x33.google.cloud.networkservices.v1.GetTlsRouteRequest\x1a).google.cloud.networkservices.v1.TlsRoute\"<\xda\x41\x04name\x82\xd3\xe4\x93\x02/\x12-/v1/{name=projects/*/locations/*/tlsRoutes/*}\x12\x8a\x02\n\x0e\x43reateTlsRoute\x12\x36.google.cloud.networkservices.v1.CreateTlsRouteRequest\x1a\x1d.google.longrunning.Operation\"\xa0\x01\xca\x41=\n\x08TlsRoute\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x1dparent,tls_route,tls_route_id\x82\xd3\xe4\x93\x02:\"-/v1/{parent=projects/*/locations/*}/tlsRoutes:\ttls_route\x12\x8c\x02\n\x0eUpdateTlsRoute\x12\x36.google.cloud.networkservices.v1.UpdateTlsRouteRequest\x1a\x1d.google.longrunning.Operation\"\xa2\x01\xca\x41=\n\x08TlsRoute\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x15tls_route,update_mask\x82\xd3\xe4\x93\x02\x44\x32\x37/v1/{tls_route.name=projects/*/locations/*/tlsRoutes/*}:\ttls_route\x12\xf3\x01\n\x0e\x44\x65leteTlsRoute\x12\x36.google.cloud.networkservices.v1.DeleteTlsRouteRequest\x1a\x1d.google.longrunning.Operation\"\x89\x01\xca\x41J\n\x15google.protobuf.Empty\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02/*-/v1/{name=projects/*/locations/*/tlsRoutes/*}\x12\xd6\x01\n\x13ListServiceBindings\x12;.google.cloud.networkservices.v1.ListServiceBindingsRequest\x1a<.google.cloud.networkservices.v1.ListServiceBindingsResponse\"D\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x35\x12\x33/v1/{parent=projects/*/locations/*}/serviceBindings\x12\xc3\x01\n\x11GetServiceBinding\x12\x39.google.cloud.networkservices.v1.GetServiceBindingRequest\x1a/.google.cloud.networkservices.v1.ServiceBinding\"B\xda\x41\x04name\x82\xd3\xe4\x93\x02\x35\x12\x33/v1/{name=projects/*/locations/*/serviceBindings/*}\x12\xb4\x02\n\x14\x43reateServiceBinding\x12<.google.cloud.networkservices.v1.CreateServiceBindingRequest\x1a\x1d.google.longrunning.Operation\"\xbe\x01\xca\x41\x43\n\x0eServiceBinding\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41)parent,service_binding,service_binding_id\x82\xd3\xe4\x93\x02\x46\"3/v1/{parent=projects/*/locations/*}/serviceBindings:\x0fservice_binding\x12\xb6\x02\n\x14UpdateServiceBinding\x12<.google.cloud.networkservices.v1.UpdateServiceBindingRequest\x1a\x1d.google.longrunning.Operation\"\xc0\x01\xca\x41\x43\n\x0eServiceBinding\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x1bservice_binding,update_mask\x82\xd3\xe4\x93\x02V2C/v1/{service_binding.name=projects/*/locations/*/serviceBindings/*}:\x0fservice_binding\x12\x85\x02\n\x14\x44\x65leteServiceBinding\x12<.google.cloud.networkservices.v1.DeleteServiceBindingRequest\x1a\x1d.google.longrunning.Operation\"\x8f\x01\xca\x41J\n\x15google.protobuf.Empty\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x35*3/v1/{name=projects/*/locations/*/serviceBindings/*}\x12\xb2\x01\n\nListMeshes\x12\x32.google.cloud.networkservices.v1.ListMeshesRequest\x1a\x33.google.cloud.networkservices.v1.ListMeshesResponse\";\xda\x41\x06parent\x82\xd3\xe4\x93\x02,\x12*/v1/{parent=projects/*/locations/*}/meshes\x12\x9c\x01\n\x07GetMesh\x12/.google.cloud.networkservices.v1.GetMeshRequest\x1a%.google.cloud.networkservices.v1.Mesh\"9\xda\x41\x04name\x82\xd3\xe4\x93\x02,\x12*/v1/{name=projects/*/locations/*/meshes/*}\x12\xec\x01\n\nCreateMesh\x12\x32.google.cloud.networkservices.v1.CreateMeshRequest\x1a\x1d.google.longrunning.Operation\"\x8a\x01\xca\x41\x39\n\x04Mesh\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x13parent,mesh,mesh_id\x82\xd3\xe4\x93\x02\x32\"*/v1/{parent=projects/*/locations/*}/meshes:\x04mesh\x12\xee\x01\n\nUpdateMesh\x12\x32.google.cloud.networkservices.v1.UpdateMeshRequest\x1a\x1d.google.longrunning.Operation\"\x8c\x01\xca\x41\x39\n\x04Mesh\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x10mesh,update_mask\x82\xd3\xe4\x93\x02\x37\x32//v1/{mesh.name=projects/*/locations/*/meshes/*}:\x04mesh\x12\xe8\x01\n\nDeleteMesh\x12\x32.google.cloud.networkservices.v1.DeleteMeshRequest\x1a\x1d.google.longrunning.Operation\"\x86\x01\xca\x41J\n\x15google.protobuf.Empty\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02,**/v1/{name=projects/*/locations/*/meshes/*}\x12\xde\x01\n\x15ListServiceLbPolicies\x12=.google.cloud.networkservices.v1.ListServiceLbPoliciesRequest\x1a>.google.cloud.networkservices.v1.ListServiceLbPoliciesResponse\"F\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x37\x12\x35/v1/{parent=projects/*/locations/*}/serviceLbPolicies\x12\xc8\x01\n\x12GetServiceLbPolicy\x12:.google.cloud.networkservices.v1.GetServiceLbPolicyRequest\x1a\x30.google.cloud.networkservices.v1.ServiceLbPolicy\"D\xda\x41\x04name\x82\xd3\xe4\x93\x02\x37\x12\x35/v1/{name=projects/*/locations/*/serviceLbPolicies/*}\x12\xbf\x02\n\x15\x43reateServiceLbPolicy\x12=.google.cloud.networkservices.v1.CreateServiceLbPolicyRequest\x1a\x1d.google.longrunning.Operation\"\xc7\x01\xca\x41\x44\n\x0fServiceLbPolicy\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41-parent,service_lb_policy,service_lb_policy_id\x82\xd3\xe4\x93\x02J\"5/v1/{parent=projects/*/locations/*}/serviceLbPolicies:\x11service_lb_policy\x12\xc1\x02\n\x15UpdateServiceLbPolicy\x12=.google.cloud.networkservices.v1.UpdateServiceLbPolicyRequest\x1a\x1d.google.longrunning.Operation\"\xc9\x01\xca\x41\x44\n\x0fServiceLbPolicy\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x1dservice_lb_policy,update_mask\x82\xd3\xe4\x93\x02\\2G/v1/{service_lb_policy.name=projects/*/locations/*/serviceLbPolicies/*}:\x11service_lb_policy\x12\x89\x02\n\x15\x44\x65leteServiceLbPolicy\x12=.google.cloud.networkservices.v1.DeleteServiceLbPolicyRequest\x1a\x1d.google.longrunning.Operation\"\x91\x01\xca\x41J\n\x15google.protobuf.Empty\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x37*5/v1/{name=projects/*/locations/*/serviceLbPolicies/*}\x12\xcf\x01\n\x13GetGatewayRouteView\x12;.google.cloud.networkservices.v1.GetGatewayRouteViewRequest\x1a\x31.google.cloud.networkservices.v1.GatewayRouteView\"H\xda\x41\x04name\x82\xd3\xe4\x93\x02;\x12\x39/v1/{name=projects/*/locations/*/gateways/*/routeViews/*}\x12\xc4\x01\n\x10GetMeshRouteView\x12\x38.google.cloud.networkservices.v1.GetMeshRouteViewRequest\x1a..google.cloud.networkservices.v1.MeshRouteView\"F\xda\x41\x04name\x82\xd3\xe4\x93\x02\x39\x12\x37/v1/{name=projects/*/locations/*/meshes/*/routeViews/*}\x12\xe2\x01\n\x15ListGatewayRouteViews\x12=.google.cloud.networkservices.v1.ListGatewayRouteViewsRequest\x1a>.google.cloud.networkservices.v1.ListGatewayRouteViewsResponse\"J\xda\x41\x06parent\x82\xd3\xe4\x93\x02;\x12\x39/v1/{parent=projects/*/locations/*/gateways/*}/routeViews\x12\xd7\x01\n\x12ListMeshRouteViews\x12:.google.cloud.networkservices.v1.ListMeshRouteViewsRequest\x1a;.google.cloud.networkservices.v1.ListMeshRouteViewsResponse\"H\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x39\x12\x37/v1/{parent=projects/*/locations/*/meshes/*}/routeViews\x1aR\xca\x41\x1enetworkservices.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xdf\x01\n#com.google.cloud.networkservices.v1P\x01ZMcloud.google.com/go/networkservices/apiv1/networkservicespb;networkservicespb\xaa\x02\x1fGoogle.Cloud.NetworkServices.V1\xca\x02\x1fGoogle\\Cloud\\NetworkServices\\V1\xea\x02\"Google::Cloud::NetworkServices::V1b\x06proto3" +descriptor_data = "\n6google/cloud/networkservices/v1/network_services.proto\x12\x1fgoogle.cloud.networkservices.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x33google/cloud/networkservices/v1/agent_gateway.proto\x1a,google/cloud/networkservices/v1/common.proto\x1a\x35google/cloud/networkservices/v1/endpoint_policy.proto\x1a\x33google/cloud/networkservices/v1/extensibility.proto\x1a-google/cloud/networkservices/v1/gateway.proto\x1a\x30google/cloud/networkservices/v1/grpc_route.proto\x1a\x30google/cloud/networkservices/v1/http_route.proto\x1a*google/cloud/networkservices/v1/mesh.proto\x1a\x30google/cloud/networkservices/v1/route_view.proto\x1a\x35google/cloud/networkservices/v1/service_binding.proto\x1a\x37google/cloud/networkservices/v1/service_lb_policy.proto\x1a/google/cloud/networkservices/v1/tcp_route.proto\x1a/google/cloud/networkservices/v1/tls_route.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto2\xa7w\n\x0fNetworkServices\x12\xda\x01\n\x14ListEndpointPolicies\x12<.google.cloud.networkservices.v1.ListEndpointPoliciesRequest\x1a=.google.cloud.networkservices.v1.ListEndpointPoliciesResponse\"E\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x36\x12\x34/v1/{parent=projects/*/locations/*}/endpointPolicies\x12\xc4\x01\n\x11GetEndpointPolicy\x12\x39.google.cloud.networkservices.v1.GetEndpointPolicyRequest\x1a/.google.cloud.networkservices.v1.EndpointPolicy\"C\xda\x41\x04name\x82\xd3\xe4\x93\x02\x36\x12\x34/v1/{name=projects/*/locations/*/endpointPolicies/*}\x12\xb5\x02\n\x14\x43reateEndpointPolicy\x12<.google.cloud.networkservices.v1.CreateEndpointPolicyRequest\x1a\x1d.google.longrunning.Operation\"\xbf\x01\xca\x41\x43\n\x0e\x45ndpointPolicy\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41)parent,endpoint_policy,endpoint_policy_id\x82\xd3\xe4\x93\x02G\"4/v1/{parent=projects/*/locations/*}/endpointPolicies:\x0f\x65ndpoint_policy\x12\xb7\x02\n\x14UpdateEndpointPolicy\x12<.google.cloud.networkservices.v1.UpdateEndpointPolicyRequest\x1a\x1d.google.longrunning.Operation\"\xc1\x01\xca\x41\x43\n\x0e\x45ndpointPolicy\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x1b\x65ndpoint_policy,update_mask\x82\xd3\xe4\x93\x02W2D/v1/{endpoint_policy.name=projects/*/locations/*/endpointPolicies/*}:\x0f\x65ndpoint_policy\x12\x86\x02\n\x14\x44\x65leteEndpointPolicy\x12<.google.cloud.networkservices.v1.DeleteEndpointPolicyRequest\x1a\x1d.google.longrunning.Operation\"\x90\x01\xca\x41J\n\x15google.protobuf.Empty\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x36*4/v1/{name=projects/*/locations/*/endpointPolicies/*}\x12\xe6\x01\n\x16ListWasmPluginVersions\x12>.google.cloud.networkservices.v1.ListWasmPluginVersionsRequest\x1a?.google.cloud.networkservices.v1.ListWasmPluginVersionsResponse\"K\xda\x41\x06parent\x82\xd3\xe4\x93\x02<\x12:/v1/{parent=projects/*/locations/*/wasmPlugins/*}/versions\x12\xd3\x01\n\x14GetWasmPluginVersion\x12<.google.cloud.networkservices.v1.GetWasmPluginVersionRequest\x1a\x32.google.cloud.networkservices.v1.WasmPluginVersion\"I\xda\x41\x04name\x82\xd3\xe4\x93\x02<\x12:/v1/{name=projects/*/locations/*/wasmPlugins/*/versions/*}\x12\xd0\x02\n\x17\x43reateWasmPluginVersion\x12?.google.cloud.networkservices.v1.CreateWasmPluginVersionRequest\x1a\x1d.google.longrunning.Operation\"\xd4\x01\xca\x41\x46\n\x11WasmPluginVersion\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x31parent,wasm_plugin_version,wasm_plugin_version_id\x82\xd3\xe4\x93\x02Q\":/v1/{parent=projects/*/locations/*/wasmPlugins/*}/versions:\x13wasm_plugin_version\x12\x92\x02\n\x17\x44\x65leteWasmPluginVersion\x12?.google.cloud.networkservices.v1.DeleteWasmPluginVersionRequest\x1a\x1d.google.longrunning.Operation\"\x96\x01\xca\x41J\n\x15google.protobuf.Empty\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02<*:/v1/{name=projects/*/locations/*/wasmPlugins/*/versions/*}\x12\xc6\x01\n\x0fListWasmPlugins\x12\x37.google.cloud.networkservices.v1.ListWasmPluginsRequest\x1a\x38.google.cloud.networkservices.v1.ListWasmPluginsResponse\"@\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x31\x12//v1/{parent=projects/*/locations/*}/wasmPlugins\x12\xb3\x01\n\rGetWasmPlugin\x12\x35.google.cloud.networkservices.v1.GetWasmPluginRequest\x1a+.google.cloud.networkservices.v1.WasmPlugin\">\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31\x12//v1/{name=projects/*/locations/*/wasmPlugins/*}\x12\x98\x02\n\x10\x43reateWasmPlugin\x12\x38.google.cloud.networkservices.v1.CreateWasmPluginRequest\x1a\x1d.google.longrunning.Operation\"\xaa\x01\xca\x41?\n\nWasmPlugin\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41!parent,wasm_plugin,wasm_plugin_id\x82\xd3\xe4\x93\x02>\"//v1/{parent=projects/*/locations/*}/wasmPlugins:\x0bwasm_plugin\x12\x9a\x02\n\x10UpdateWasmPlugin\x12\x38.google.cloud.networkservices.v1.UpdateWasmPluginRequest\x1a\x1d.google.longrunning.Operation\"\xac\x01\xca\x41?\n\nWasmPlugin\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x17wasm_plugin,update_mask\x82\xd3\xe4\x93\x02J2;/v1/{wasm_plugin.name=projects/*/locations/*/wasmPlugins/*}:\x0bwasm_plugin\x12\xf9\x01\n\x10\x44\x65leteWasmPlugin\x12\x38.google.cloud.networkservices.v1.DeleteWasmPluginRequest\x1a\x1d.google.longrunning.Operation\"\x8b\x01\xca\x41J\n\x15google.protobuf.Empty\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31*//v1/{name=projects/*/locations/*/wasmPlugins/*}\x12\xba\x01\n\x0cListGateways\x12\x34.google.cloud.networkservices.v1.ListGatewaysRequest\x1a\x35.google.cloud.networkservices.v1.ListGatewaysResponse\"=\xda\x41\x06parent\x82\xd3\xe4\x93\x02.\x12,/v1/{parent=projects/*/locations/*}/gateways\x12\xa7\x01\n\nGetGateway\x12\x32.google.cloud.networkservices.v1.GetGatewayRequest\x1a(.google.cloud.networkservices.v1.Gateway\";\xda\x41\x04name\x82\xd3\xe4\x93\x02.\x12,/v1/{name=projects/*/locations/*/gateways/*}\x12\x80\x02\n\rCreateGateway\x12\x35.google.cloud.networkservices.v1.CreateGatewayRequest\x1a\x1d.google.longrunning.Operation\"\x98\x01\xca\x41<\n\x07Gateway\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x19parent,gateway,gateway_id\x82\xd3\xe4\x93\x02\x37\",/v1/{parent=projects/*/locations/*}/gateways:\x07gateway\x12\x82\x02\n\rUpdateGateway\x12\x35.google.cloud.networkservices.v1.UpdateGatewayRequest\x1a\x1d.google.longrunning.Operation\"\x9a\x01\xca\x41<\n\x07Gateway\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x13gateway,update_mask\x82\xd3\xe4\x93\x02?24/v1/{gateway.name=projects/*/locations/*/gateways/*}:\x07gateway\x12\xf0\x01\n\rDeleteGateway\x12\x35.google.cloud.networkservices.v1.DeleteGatewayRequest\x1a\x1d.google.longrunning.Operation\"\x88\x01\xca\x41J\n\x15google.protobuf.Empty\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02.*,/v1/{name=projects/*/locations/*/gateways/*}\x12\xc2\x01\n\x0eListGrpcRoutes\x12\x36.google.cloud.networkservices.v1.ListGrpcRoutesRequest\x1a\x37.google.cloud.networkservices.v1.ListGrpcRoutesResponse\"?\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x30\x12./v1/{parent=projects/*/locations/*}/grpcRoutes\x12\xaf\x01\n\x0cGetGrpcRoute\x12\x34.google.cloud.networkservices.v1.GetGrpcRouteRequest\x1a*.google.cloud.networkservices.v1.GrpcRoute\"=\xda\x41\x04name\x82\xd3\xe4\x93\x02\x30\x12./v1/{name=projects/*/locations/*/grpcRoutes/*}\x12\x91\x02\n\x0f\x43reateGrpcRoute\x12\x37.google.cloud.networkservices.v1.CreateGrpcRouteRequest\x1a\x1d.google.longrunning.Operation\"\xa5\x01\xca\x41>\n\tGrpcRoute\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x1fparent,grpc_route,grpc_route_id\x82\xd3\xe4\x93\x02<\"./v1/{parent=projects/*/locations/*}/grpcRoutes:\ngrpc_route\x12\x93\x02\n\x0fUpdateGrpcRoute\x12\x37.google.cloud.networkservices.v1.UpdateGrpcRouteRequest\x1a\x1d.google.longrunning.Operation\"\xa7\x01\xca\x41>\n\tGrpcRoute\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x16grpc_route,update_mask\x82\xd3\xe4\x93\x02G29/v1/{grpc_route.name=projects/*/locations/*/grpcRoutes/*}:\ngrpc_route\x12\xf6\x01\n\x0f\x44\x65leteGrpcRoute\x12\x37.google.cloud.networkservices.v1.DeleteGrpcRouteRequest\x1a\x1d.google.longrunning.Operation\"\x8a\x01\xca\x41J\n\x15google.protobuf.Empty\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x30*./v1/{name=projects/*/locations/*/grpcRoutes/*}\x12\xc2\x01\n\x0eListHttpRoutes\x12\x36.google.cloud.networkservices.v1.ListHttpRoutesRequest\x1a\x37.google.cloud.networkservices.v1.ListHttpRoutesResponse\"?\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x30\x12./v1/{parent=projects/*/locations/*}/httpRoutes\x12\xaf\x01\n\x0cGetHttpRoute\x12\x34.google.cloud.networkservices.v1.GetHttpRouteRequest\x1a*.google.cloud.networkservices.v1.HttpRoute\"=\xda\x41\x04name\x82\xd3\xe4\x93\x02\x30\x12./v1/{name=projects/*/locations/*/httpRoutes/*}\x12\x91\x02\n\x0f\x43reateHttpRoute\x12\x37.google.cloud.networkservices.v1.CreateHttpRouteRequest\x1a\x1d.google.longrunning.Operation\"\xa5\x01\xca\x41>\n\tHttpRoute\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x1fparent,http_route,http_route_id\x82\xd3\xe4\x93\x02<\"./v1/{parent=projects/*/locations/*}/httpRoutes:\nhttp_route\x12\x93\x02\n\x0fUpdateHttpRoute\x12\x37.google.cloud.networkservices.v1.UpdateHttpRouteRequest\x1a\x1d.google.longrunning.Operation\"\xa7\x01\xca\x41>\n\tHttpRoute\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x16http_route,update_mask\x82\xd3\xe4\x93\x02G29/v1/{http_route.name=projects/*/locations/*/httpRoutes/*}:\nhttp_route\x12\xf6\x01\n\x0f\x44\x65leteHttpRoute\x12\x37.google.cloud.networkservices.v1.DeleteHttpRouteRequest\x1a\x1d.google.longrunning.Operation\"\x8a\x01\xca\x41J\n\x15google.protobuf.Empty\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x30*./v1/{name=projects/*/locations/*/httpRoutes/*}\x12\xbe\x01\n\rListTcpRoutes\x12\x35.google.cloud.networkservices.v1.ListTcpRoutesRequest\x1a\x36.google.cloud.networkservices.v1.ListTcpRoutesResponse\">\xda\x41\x06parent\x82\xd3\xe4\x93\x02/\x12-/v1/{parent=projects/*/locations/*}/tcpRoutes\x12\xab\x01\n\x0bGetTcpRoute\x12\x33.google.cloud.networkservices.v1.GetTcpRouteRequest\x1a).google.cloud.networkservices.v1.TcpRoute\"<\xda\x41\x04name\x82\xd3\xe4\x93\x02/\x12-/v1/{name=projects/*/locations/*/tcpRoutes/*}\x12\x8a\x02\n\x0e\x43reateTcpRoute\x12\x36.google.cloud.networkservices.v1.CreateTcpRouteRequest\x1a\x1d.google.longrunning.Operation\"\xa0\x01\xca\x41=\n\x08TcpRoute\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x1dparent,tcp_route,tcp_route_id\x82\xd3\xe4\x93\x02:\"-/v1/{parent=projects/*/locations/*}/tcpRoutes:\ttcp_route\x12\x8c\x02\n\x0eUpdateTcpRoute\x12\x36.google.cloud.networkservices.v1.UpdateTcpRouteRequest\x1a\x1d.google.longrunning.Operation\"\xa2\x01\xca\x41=\n\x08TcpRoute\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x15tcp_route,update_mask\x82\xd3\xe4\x93\x02\x44\x32\x37/v1/{tcp_route.name=projects/*/locations/*/tcpRoutes/*}:\ttcp_route\x12\xf3\x01\n\x0e\x44\x65leteTcpRoute\x12\x36.google.cloud.networkservices.v1.DeleteTcpRouteRequest\x1a\x1d.google.longrunning.Operation\"\x89\x01\xca\x41J\n\x15google.protobuf.Empty\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02/*-/v1/{name=projects/*/locations/*/tcpRoutes/*}\x12\xbe\x01\n\rListTlsRoutes\x12\x35.google.cloud.networkservices.v1.ListTlsRoutesRequest\x1a\x36.google.cloud.networkservices.v1.ListTlsRoutesResponse\">\xda\x41\x06parent\x82\xd3\xe4\x93\x02/\x12-/v1/{parent=projects/*/locations/*}/tlsRoutes\x12\xab\x01\n\x0bGetTlsRoute\x12\x33.google.cloud.networkservices.v1.GetTlsRouteRequest\x1a).google.cloud.networkservices.v1.TlsRoute\"<\xda\x41\x04name\x82\xd3\xe4\x93\x02/\x12-/v1/{name=projects/*/locations/*/tlsRoutes/*}\x12\x8a\x02\n\x0e\x43reateTlsRoute\x12\x36.google.cloud.networkservices.v1.CreateTlsRouteRequest\x1a\x1d.google.longrunning.Operation\"\xa0\x01\xca\x41=\n\x08TlsRoute\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x1dparent,tls_route,tls_route_id\x82\xd3\xe4\x93\x02:\"-/v1/{parent=projects/*/locations/*}/tlsRoutes:\ttls_route\x12\x8c\x02\n\x0eUpdateTlsRoute\x12\x36.google.cloud.networkservices.v1.UpdateTlsRouteRequest\x1a\x1d.google.longrunning.Operation\"\xa2\x01\xca\x41=\n\x08TlsRoute\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x15tls_route,update_mask\x82\xd3\xe4\x93\x02\x44\x32\x37/v1/{tls_route.name=projects/*/locations/*/tlsRoutes/*}:\ttls_route\x12\xf3\x01\n\x0e\x44\x65leteTlsRoute\x12\x36.google.cloud.networkservices.v1.DeleteTlsRouteRequest\x1a\x1d.google.longrunning.Operation\"\x89\x01\xca\x41J\n\x15google.protobuf.Empty\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02/*-/v1/{name=projects/*/locations/*/tlsRoutes/*}\x12\xd6\x01\n\x13ListServiceBindings\x12;.google.cloud.networkservices.v1.ListServiceBindingsRequest\x1a<.google.cloud.networkservices.v1.ListServiceBindingsResponse\"D\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x35\x12\x33/v1/{parent=projects/*/locations/*}/serviceBindings\x12\xc3\x01\n\x11GetServiceBinding\x12\x39.google.cloud.networkservices.v1.GetServiceBindingRequest\x1a/.google.cloud.networkservices.v1.ServiceBinding\"B\xda\x41\x04name\x82\xd3\xe4\x93\x02\x35\x12\x33/v1/{name=projects/*/locations/*/serviceBindings/*}\x12\xb4\x02\n\x14\x43reateServiceBinding\x12<.google.cloud.networkservices.v1.CreateServiceBindingRequest\x1a\x1d.google.longrunning.Operation\"\xbe\x01\xca\x41\x43\n\x0eServiceBinding\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41)parent,service_binding,service_binding_id\x82\xd3\xe4\x93\x02\x46\"3/v1/{parent=projects/*/locations/*}/serviceBindings:\x0fservice_binding\x12\xb6\x02\n\x14UpdateServiceBinding\x12<.google.cloud.networkservices.v1.UpdateServiceBindingRequest\x1a\x1d.google.longrunning.Operation\"\xc0\x01\xca\x41\x43\n\x0eServiceBinding\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x1bservice_binding,update_mask\x82\xd3\xe4\x93\x02V2C/v1/{service_binding.name=projects/*/locations/*/serviceBindings/*}:\x0fservice_binding\x12\x85\x02\n\x14\x44\x65leteServiceBinding\x12<.google.cloud.networkservices.v1.DeleteServiceBindingRequest\x1a\x1d.google.longrunning.Operation\"\x8f\x01\xca\x41J\n\x15google.protobuf.Empty\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x35*3/v1/{name=projects/*/locations/*/serviceBindings/*}\x12\xb2\x01\n\nListMeshes\x12\x32.google.cloud.networkservices.v1.ListMeshesRequest\x1a\x33.google.cloud.networkservices.v1.ListMeshesResponse\";\xda\x41\x06parent\x82\xd3\xe4\x93\x02,\x12*/v1/{parent=projects/*/locations/*}/meshes\x12\x9c\x01\n\x07GetMesh\x12/.google.cloud.networkservices.v1.GetMeshRequest\x1a%.google.cloud.networkservices.v1.Mesh\"9\xda\x41\x04name\x82\xd3\xe4\x93\x02,\x12*/v1/{name=projects/*/locations/*/meshes/*}\x12\xec\x01\n\nCreateMesh\x12\x32.google.cloud.networkservices.v1.CreateMeshRequest\x1a\x1d.google.longrunning.Operation\"\x8a\x01\xca\x41\x39\n\x04Mesh\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x13parent,mesh,mesh_id\x82\xd3\xe4\x93\x02\x32\"*/v1/{parent=projects/*/locations/*}/meshes:\x04mesh\x12\xee\x01\n\nUpdateMesh\x12\x32.google.cloud.networkservices.v1.UpdateMeshRequest\x1a\x1d.google.longrunning.Operation\"\x8c\x01\xca\x41\x39\n\x04Mesh\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x10mesh,update_mask\x82\xd3\xe4\x93\x02\x37\x32//v1/{mesh.name=projects/*/locations/*/meshes/*}:\x04mesh\x12\xe8\x01\n\nDeleteMesh\x12\x32.google.cloud.networkservices.v1.DeleteMeshRequest\x1a\x1d.google.longrunning.Operation\"\x86\x01\xca\x41J\n\x15google.protobuf.Empty\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02,**/v1/{name=projects/*/locations/*/meshes/*}\x12\xde\x01\n\x15ListServiceLbPolicies\x12=.google.cloud.networkservices.v1.ListServiceLbPoliciesRequest\x1a>.google.cloud.networkservices.v1.ListServiceLbPoliciesResponse\"F\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x37\x12\x35/v1/{parent=projects/*/locations/*}/serviceLbPolicies\x12\xc8\x01\n\x12GetServiceLbPolicy\x12:.google.cloud.networkservices.v1.GetServiceLbPolicyRequest\x1a\x30.google.cloud.networkservices.v1.ServiceLbPolicy\"D\xda\x41\x04name\x82\xd3\xe4\x93\x02\x37\x12\x35/v1/{name=projects/*/locations/*/serviceLbPolicies/*}\x12\xbf\x02\n\x15\x43reateServiceLbPolicy\x12=.google.cloud.networkservices.v1.CreateServiceLbPolicyRequest\x1a\x1d.google.longrunning.Operation\"\xc7\x01\xca\x41\x44\n\x0fServiceLbPolicy\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41-parent,service_lb_policy,service_lb_policy_id\x82\xd3\xe4\x93\x02J\"5/v1/{parent=projects/*/locations/*}/serviceLbPolicies:\x11service_lb_policy\x12\xc1\x02\n\x15UpdateServiceLbPolicy\x12=.google.cloud.networkservices.v1.UpdateServiceLbPolicyRequest\x1a\x1d.google.longrunning.Operation\"\xc9\x01\xca\x41\x44\n\x0fServiceLbPolicy\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x1dservice_lb_policy,update_mask\x82\xd3\xe4\x93\x02\\2G/v1/{service_lb_policy.name=projects/*/locations/*/serviceLbPolicies/*}:\x11service_lb_policy\x12\x89\x02\n\x15\x44\x65leteServiceLbPolicy\x12=.google.cloud.networkservices.v1.DeleteServiceLbPolicyRequest\x1a\x1d.google.longrunning.Operation\"\x91\x01\xca\x41J\n\x15google.protobuf.Empty\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x37*5/v1/{name=projects/*/locations/*/serviceLbPolicies/*}\x12\xcf\x01\n\x13GetGatewayRouteView\x12;.google.cloud.networkservices.v1.GetGatewayRouteViewRequest\x1a\x31.google.cloud.networkservices.v1.GatewayRouteView\"H\xda\x41\x04name\x82\xd3\xe4\x93\x02;\x12\x39/v1/{name=projects/*/locations/*/gateways/*/routeViews/*}\x12\xc4\x01\n\x10GetMeshRouteView\x12\x38.google.cloud.networkservices.v1.GetMeshRouteViewRequest\x1a..google.cloud.networkservices.v1.MeshRouteView\"F\xda\x41\x04name\x82\xd3\xe4\x93\x02\x39\x12\x37/v1/{name=projects/*/locations/*/meshes/*/routeViews/*}\x12\xe2\x01\n\x15ListGatewayRouteViews\x12=.google.cloud.networkservices.v1.ListGatewayRouteViewsRequest\x1a>.google.cloud.networkservices.v1.ListGatewayRouteViewsResponse\"J\xda\x41\x06parent\x82\xd3\xe4\x93\x02;\x12\x39/v1/{parent=projects/*/locations/*/gateways/*}/routeViews\x12\xd7\x01\n\x12ListMeshRouteViews\x12:.google.cloud.networkservices.v1.ListMeshRouteViewsRequest\x1a;.google.cloud.networkservices.v1.ListMeshRouteViewsResponse\"H\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x39\x12\x37/v1/{parent=projects/*/locations/*/meshes/*}/routeViews\x12\xce\x01\n\x11ListAgentGateways\x12\x39.google.cloud.networkservices.v1.ListAgentGatewaysRequest\x1a:.google.cloud.networkservices.v1.ListAgentGatewaysResponse\"B\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x33\x12\x31/v1/{parent=projects/*/locations/*}/agentGateways\x12\xbb\x01\n\x0fGetAgentGateway\x12\x37.google.cloud.networkservices.v1.GetAgentGatewayRequest\x1a-.google.cloud.networkservices.v1.AgentGateway\"@\xda\x41\x04name\x82\xd3\xe4\x93\x02\x33\x12\x31/v1/{name=projects/*/locations/*/agentGateways/*}\x12\xa6\x02\n\x12\x43reateAgentGateway\x12:.google.cloud.networkservices.v1.CreateAgentGatewayRequest\x1a\x1d.google.longrunning.Operation\"\xb4\x01\xca\x41\x41\n\x0c\x41gentGateway\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41%parent,agent_gateway,agent_gateway_id\x82\xd3\xe4\x93\x02\x42\"1/v1/{parent=projects/*/locations/*}/agentGateways:\ragent_gateway\x12\xa8\x02\n\x12UpdateAgentGateway\x12:.google.cloud.networkservices.v1.UpdateAgentGatewayRequest\x1a\x1d.google.longrunning.Operation\"\xb6\x01\xca\x41\x41\n\x0c\x41gentGateway\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x19\x61gent_gateway,update_mask\x82\xd3\xe4\x93\x02P2?/v1/{agent_gateway.name=projects/*/locations/*/agentGateways/*}:\ragent_gateway\x12\xff\x01\n\x12\x44\x65leteAgentGateway\x12:.google.cloud.networkservices.v1.DeleteAgentGatewayRequest\x1a\x1d.google.longrunning.Operation\"\x8d\x01\xca\x41J\n\x15google.protobuf.Empty\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x33*1/v1/{name=projects/*/locations/*/agentGateways/*}\x1aR\xca\x41\x1enetworkservices.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xdf\x01\n#com.google.cloud.networkservices.v1P\x01ZMcloud.google.com/go/networkservices/apiv1/networkservicespb;networkservicespb\xaa\x02\x1fGoogle.Cloud.NetworkServices.V1\xca\x02\x1fGoogle\\Cloud\\NetworkServices\\V1\xea\x02\"Google::Cloud::NetworkServices::V1b\x06proto3" pool = ::Google::Protobuf::DescriptorPool.generated_pool pool.add_serialized_file(descriptor_data) diff --git a/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/network_services_services_pb.rb b/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/network_services_services_pb.rb index 00e52df44ca1..d02f03a0f472 100644 --- a/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/network_services_services_pb.rb +++ b/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/network_services_services_pb.rb @@ -153,6 +153,16 @@ class Service rpc :ListGatewayRouteViews, ::Google::Cloud::NetworkServices::V1::ListGatewayRouteViewsRequest, ::Google::Cloud::NetworkServices::V1::ListGatewayRouteViewsResponse # Lists RouteViews rpc :ListMeshRouteViews, ::Google::Cloud::NetworkServices::V1::ListMeshRouteViewsRequest, ::Google::Cloud::NetworkServices::V1::ListMeshRouteViewsResponse + # Lists AgentGateways in a given project and location. + rpc :ListAgentGateways, ::Google::Cloud::NetworkServices::V1::ListAgentGatewaysRequest, ::Google::Cloud::NetworkServices::V1::ListAgentGatewaysResponse + # Gets details of a single AgentGateway. + rpc :GetAgentGateway, ::Google::Cloud::NetworkServices::V1::GetAgentGatewayRequest, ::Google::Cloud::NetworkServices::V1::AgentGateway + # Creates a new AgentGateway in a given project and location. + rpc :CreateAgentGateway, ::Google::Cloud::NetworkServices::V1::CreateAgentGatewayRequest, ::Google::Longrunning::Operation + # Updates the parameters of a single AgentGateway. + rpc :UpdateAgentGateway, ::Google::Cloud::NetworkServices::V1::UpdateAgentGatewayRequest, ::Google::Longrunning::Operation + # Deletes a single AgentGateway. + rpc :DeleteAgentGateway, ::Google::Cloud::NetworkServices::V1::DeleteAgentGatewayRequest, ::Google::Longrunning::Operation end Stub = Service.rpc_stub_class diff --git a/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/service_binding_pb.rb b/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/service_binding_pb.rb index 0e4e2a1f1310..ee63ef59e8ca 100644 --- a/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/service_binding_pb.rb +++ b/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/service_binding_pb.rb @@ -5,12 +5,13 @@ require 'google/protobuf' require 'google/api/field_behavior_pb' +require 'google/api/field_info_pb' require 'google/api/resource_pb' require 'google/protobuf/field_mask_pb' require 'google/protobuf/timestamp_pb' -descriptor_data = "\n5google/cloud/networkservices/v1/service_binding.proto\x12\x1fgoogle.cloud.networkservices.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x88\x04\n\x0eServiceBinding\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x18\n\x0b\x64\x65scription\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x34\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x42\n\x07service\x18\x05 \x01(\tB1\x18\x01\xe0\x41\x01\xfa\x41)\n\'servicedirectory.googleapis.com/Service\x12\x19\n\nservice_id\x18\x08 \x01(\tB\x05\x18\x01\xe0\x41\x03\x12P\n\x06labels\x18\x07 \x03(\x0b\x32;.google.cloud.networkservices.v1.ServiceBinding.LabelsEntryB\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:}\xea\x41z\n-networkservices.googleapis.com/ServiceBinding\x12Iprojects/{project}/locations/{location}/serviceBindings/{service_binding}\"\x8a\x01\n\x1aListServiceBindingsRequest\x12\x45\n\x06parent\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\x12-networkservices.googleapis.com/ServiceBinding\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"\x96\x01\n\x1bListServiceBindingsResponse\x12I\n\x10service_bindings\x18\x01 \x03(\x0b\x32/.google.cloud.networkservices.v1.ServiceBinding\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"_\n\x18GetServiceBindingRequest\x12\x43\n\x04name\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-networkservices.googleapis.com/ServiceBinding\"\xd4\x01\n\x1b\x43reateServiceBindingRequest\x12\x45\n\x06parent\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\x12-networkservices.googleapis.com/ServiceBinding\x12\x1f\n\x12service_binding_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12M\n\x0fservice_binding\x18\x03 \x01(\x0b\x32/.google.cloud.networkservices.v1.ServiceBindingB\x03\xe0\x41\x02\"\xa2\x01\n\x1bUpdateServiceBindingRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x12M\n\x0fservice_binding\x18\x02 \x01(\x0b\x32/.google.cloud.networkservices.v1.ServiceBindingB\x03\xe0\x41\x02\"b\n\x1b\x44\x65leteServiceBindingRequest\x12\x43\n\x04name\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-networkservices.googleapis.com/ServiceBindingB\xf3\x02\n#com.google.cloud.networkservices.v1B\x13ServiceBindingProtoP\x01ZMcloud.google.com/go/networkservices/apiv1/networkservicespb;networkservicespb\xaa\x02\x1fGoogle.Cloud.NetworkServices.V1\xca\x02\x1fGoogle\\Cloud\\NetworkServices\\V1\xea\x02\"Google::Cloud::NetworkServices::V1\xea\x41|\n\'servicedirectory.googleapis.com/Service\x12Qprojects/{project}/locations/{location}/namespaces/{namespace}/services/{service}b\x06proto3" +descriptor_data = "\n5google/cloud/networkservices/v1/service_binding.proto\x12\x1fgoogle.cloud.networkservices.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1bgoogle/api/field_info.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x88\x04\n\x0eServiceBinding\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x18\n\x0b\x64\x65scription\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x34\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x42\n\x07service\x18\x05 \x01(\tB1\x18\x01\xe0\x41\x01\xfa\x41)\n\'servicedirectory.googleapis.com/Service\x12\x19\n\nservice_id\x18\x08 \x01(\tB\x05\x18\x01\xe0\x41\x03\x12P\n\x06labels\x18\x07 \x03(\x0b\x32;.google.cloud.networkservices.v1.ServiceBinding.LabelsEntryB\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:}\xea\x41z\n-networkservices.googleapis.com/ServiceBinding\x12Iprojects/{project}/locations/{location}/serviceBindings/{service_binding}\"\x8a\x01\n\x1aListServiceBindingsRequest\x12\x45\n\x06parent\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\x12-networkservices.googleapis.com/ServiceBinding\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"\x96\x01\n\x1bListServiceBindingsResponse\x12I\n\x10service_bindings\x18\x01 \x03(\x0b\x32/.google.cloud.networkservices.v1.ServiceBinding\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"_\n\x18GetServiceBindingRequest\x12\x43\n\x04name\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-networkservices.googleapis.com/ServiceBinding\"\xd4\x01\n\x1b\x43reateServiceBindingRequest\x12\x45\n\x06parent\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\x12-networkservices.googleapis.com/ServiceBinding\x12\x1f\n\x12service_binding_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12M\n\x0fservice_binding\x18\x03 \x01(\x0b\x32/.google.cloud.networkservices.v1.ServiceBindingB\x03\xe0\x41\x02\"\xa2\x01\n\x1bUpdateServiceBindingRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x12M\n\x0fservice_binding\x18\x02 \x01(\x0b\x32/.google.cloud.networkservices.v1.ServiceBindingB\x03\xe0\x41\x02\"b\n\x1b\x44\x65leteServiceBindingRequest\x12\x43\n\x04name\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-networkservices.googleapis.com/ServiceBindingB\xf3\x02\n#com.google.cloud.networkservices.v1B\x13ServiceBindingProtoP\x01ZMcloud.google.com/go/networkservices/apiv1/networkservicespb;networkservicespb\xaa\x02\x1fGoogle.Cloud.NetworkServices.V1\xca\x02\x1fGoogle\\Cloud\\NetworkServices\\V1\xea\x02\"Google::Cloud::NetworkServices::V1\xea\x41|\n\'servicedirectory.googleapis.com/Service\x12Qprojects/{project}/locations/{location}/namespaces/{namespace}/services/{service}b\x06proto3" pool = ::Google::Protobuf::DescriptorPool.generated_pool pool.add_serialized_file(descriptor_data) diff --git a/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/tls_route_pb.rb b/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/tls_route_pb.rb index a9e92148d70a..3b1b6565b309 100644 --- a/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/tls_route_pb.rb +++ b/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/tls_route_pb.rb @@ -11,7 +11,7 @@ require 'google/protobuf/timestamp_pb' -descriptor_data = "\n/google/cloud/networkservices/v1/tls_route.proto\x12\x1fgoogle.cloud.networkservices.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1egoogle/protobuf/duration.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xd4\x08\n\x08TlsRoute\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x16\n\tself_link\x18\x08 \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12G\n\x05rules\x18\x05 \x03(\x0b\x32\x33.google.cloud.networkservices.v1.TlsRoute.RouteRuleB\x03\xe0\x41\x02\x12;\n\x06meshes\x18\x06 \x03(\tB+\xe0\x41\x01\xfa\x41%\n#networkservices.googleapis.com/Mesh\x12@\n\x08gateways\x18\x07 \x03(\tB.\xe0\x41\x01\xfa\x41(\n&networkservices.googleapis.com/Gateway\x12J\n\x06labels\x18\x0b \x03(\x0b\x32\x35.google.cloud.networkservices.v1.TlsRoute.LabelsEntryB\x03\xe0\x41\x01\x1a\xa3\x01\n\tRouteRule\x12J\n\x07matches\x18\x01 \x03(\x0b\x32\x34.google.cloud.networkservices.v1.TlsRoute.RouteMatchB\x03\xe0\x41\x02\x12J\n\x06\x61\x63tion\x18\x02 \x01(\x0b\x32\x35.google.cloud.networkservices.v1.TlsRoute.RouteActionB\x03\xe0\x41\x02\x1a\x36\n\nRouteMatch\x12\x15\n\x08sni_host\x18\x01 \x03(\tB\x03\xe0\x41\x01\x12\x11\n\x04\x61lpn\x18\x02 \x03(\tB\x03\xe0\x41\x01\x1a\x9a\x01\n\x0bRouteAction\x12U\n\x0c\x64\x65stinations\x18\x01 \x03(\x0b\x32:.google.cloud.networkservices.v1.TlsRoute.RouteDestinationB\x03\xe0\x41\x02\x12\x34\n\x0cidle_timeout\x18\x04 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x01\x1al\n\x10RouteDestination\x12\x43\n\x0cservice_name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%compute.googleapis.com/BackendService\x12\x13\n\x06weight\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:k\xea\x41h\n\'networkservices.googleapis.com/TlsRoute\x12=projects/{project}/locations/{location}/tlsRoutes/{tls_route}\"\xa3\x01\n\x14ListTlsRoutesRequest\x12?\n\x06parent\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\x12\'networkservices.googleapis.com/TlsRoute\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12#\n\x16return_partial_success\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"\x84\x01\n\x15ListTlsRoutesResponse\x12=\n\ntls_routes\x18\x01 \x03(\x0b\x32).google.cloud.networkservices.v1.TlsRoute\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"S\n\x12GetTlsRouteRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'networkservices.googleapis.com/TlsRoute\"\xb6\x01\n\x15\x43reateTlsRouteRequest\x12?\n\x06parent\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\x12\'networkservices.googleapis.com/TlsRoute\x12\x19\n\x0ctls_route_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x41\n\ttls_route\x18\x03 \x01(\x0b\x32).google.cloud.networkservices.v1.TlsRouteB\x03\xe0\x41\x02\"\x90\x01\n\x15UpdateTlsRouteRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x12\x41\n\ttls_route\x18\x02 \x01(\x0b\x32).google.cloud.networkservices.v1.TlsRouteB\x03\xe0\x41\x02\"V\n\x15\x44\x65leteTlsRouteRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'networkservices.googleapis.com/TlsRouteB\xee\x01\n#com.google.cloud.networkservices.v1B\rTlsRouteProtoP\x01ZMcloud.google.com/go/networkservices/apiv1/networkservicespb;networkservicespb\xaa\x02\x1fGoogle.Cloud.NetworkServices.V1\xca\x02\x1fGoogle\\Cloud\\NetworkServices\\V1\xea\x02\"Google::Cloud::NetworkServices::V1b\x06proto3" +descriptor_data = "\n/google/cloud/networkservices/v1/tls_route.proto\x12\x1fgoogle.cloud.networkservices.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1egoogle/protobuf/duration.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x9b\t\n\x08TlsRoute\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x16\n\tself_link\x18\x08 \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12G\n\x05rules\x18\x05 \x03(\x0b\x32\x33.google.cloud.networkservices.v1.TlsRoute.RouteRuleB\x03\xe0\x41\x02\x12;\n\x06meshes\x18\x06 \x03(\tB+\xe0\x41\x01\xfa\x41%\n#networkservices.googleapis.com/Mesh\x12@\n\x08gateways\x18\x07 \x03(\tB.\xe0\x41\x01\xfa\x41(\n&networkservices.googleapis.com/Gateway\x12\x45\n\x0etarget_proxies\x18\r \x03(\tB-\xe0\x41\x01\xfa\x41\'\n%compute.googleapis.com/TargetTcpProxy\x12J\n\x06labels\x18\x0b \x03(\x0b\x32\x35.google.cloud.networkservices.v1.TlsRoute.LabelsEntryB\x03\xe0\x41\x01\x1a\xa3\x01\n\tRouteRule\x12J\n\x07matches\x18\x01 \x03(\x0b\x32\x34.google.cloud.networkservices.v1.TlsRoute.RouteMatchB\x03\xe0\x41\x02\x12J\n\x06\x61\x63tion\x18\x02 \x01(\x0b\x32\x35.google.cloud.networkservices.v1.TlsRoute.RouteActionB\x03\xe0\x41\x02\x1a\x36\n\nRouteMatch\x12\x15\n\x08sni_host\x18\x01 \x03(\tB\x03\xe0\x41\x01\x12\x11\n\x04\x61lpn\x18\x02 \x03(\tB\x03\xe0\x41\x01\x1a\x9a\x01\n\x0bRouteAction\x12U\n\x0c\x64\x65stinations\x18\x01 \x03(\x0b\x32:.google.cloud.networkservices.v1.TlsRoute.RouteDestinationB\x03\xe0\x41\x02\x12\x34\n\x0cidle_timeout\x18\x04 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x01\x1al\n\x10RouteDestination\x12\x43\n\x0cservice_name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%compute.googleapis.com/BackendService\x12\x13\n\x06weight\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:k\xea\x41h\n\'networkservices.googleapis.com/TlsRoute\x12=projects/{project}/locations/{location}/tlsRoutes/{tls_route}\"\xa3\x01\n\x14ListTlsRoutesRequest\x12?\n\x06parent\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\x12\'networkservices.googleapis.com/TlsRoute\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12#\n\x16return_partial_success\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"\x84\x01\n\x15ListTlsRoutesResponse\x12=\n\ntls_routes\x18\x01 \x03(\x0b\x32).google.cloud.networkservices.v1.TlsRoute\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"S\n\x12GetTlsRouteRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'networkservices.googleapis.com/TlsRoute\"\xb6\x01\n\x15\x43reateTlsRouteRequest\x12?\n\x06parent\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\x12\'networkservices.googleapis.com/TlsRoute\x12\x19\n\x0ctls_route_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x41\n\ttls_route\x18\x03 \x01(\x0b\x32).google.cloud.networkservices.v1.TlsRouteB\x03\xe0\x41\x02\"\x90\x01\n\x15UpdateTlsRouteRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x12\x41\n\ttls_route\x18\x02 \x01(\x0b\x32).google.cloud.networkservices.v1.TlsRouteB\x03\xe0\x41\x02\"V\n\x15\x44\x65leteTlsRouteRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'networkservices.googleapis.com/TlsRouteB\xe5\x02\n#com.google.cloud.networkservices.v1B\rTlsRouteProtoP\x01ZMcloud.google.com/go/networkservices/apiv1/networkservicespb;networkservicespb\xaa\x02\x1fGoogle.Cloud.NetworkServices.V1\xca\x02\x1fGoogle\\Cloud\\NetworkServices\\V1\xea\x02\"Google::Cloud::NetworkServices::V1\xea\x41t\n%compute.googleapis.com/TargetTcpProxy\x12Kprojects/{project}/locations/{location}/targetTcpProxies/{target_tcp_proxy}b\x06proto3" pool = ::Google::Protobuf::DescriptorPool.generated_pool pool.add_serialized_file(descriptor_data) diff --git a/owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/agent_gateway.rb b/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/agent_gateway.rb similarity index 100% rename from owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/agent_gateway.rb rename to google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/agent_gateway.rb diff --git a/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/common.rb b/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/common.rb index 7ba9c40c394c..de9ea008823f 100644 --- a/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/common.rb +++ b/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/common.rb @@ -151,10 +151,10 @@ module EnvoyHeaders NONE = 1 # Envoy will insert default internal debug headers into upstream requests: - # x-envoy-attempt-count - # x-envoy-is-timeout-retry - # x-envoy-expected-rq-timeout-ms - # x-envoy-original-path + # x-envoy-attempt-count, + # x-envoy-is-timeout-retry, + # x-envoy-expected-rq-timeout-ms, + # x-envoy-original-path, # x-envoy-upstream-stream-duration-ms DEBUG_HEADERS = 2 end diff --git a/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/dep.rb b/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/dep.rb index aac96e319d55..2bee31a5cd46 100644 --- a/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/dep.rb +++ b/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/dep.rb @@ -62,12 +62,14 @@ class MatchCondition # A single extension in the chain to execute for the matching request. # @!attribute [rw] name # @return [::String] - # Required. The name for this extension. + # Optional. The name for this extension. # The name is logged as part of the HTTP request logs. # The name must conform with RFC-1034, is restricted to lower-cased # letters, numbers and hyphens, and can have a maximum length of 63 # characters. Additionally, the first character must be a letter and the # last a letter or a number. + # + # This field is required except for AuthzExtension. # @!attribute [rw] authority # @return [::String] # Optional. The `:authority` header in the gRPC request sent from Envoy @@ -112,6 +114,10 @@ class MatchCondition # # For the `LbEdgeExtension` resource, this field is required and must only # contain `REQUEST_HEADERS` event. + # + # For the `AuthzExtension` resource, this field is optional. + # `REQUEST_HEADERS` is the only supported event. If unspecified, + # `REQUEST_HEADERS` event is assumed as supported. # @!attribute [rw] timeout # @return [::Google::Protobuf::Duration] # Optional. Specifies the timeout for each individual message on the @@ -141,13 +147,27 @@ class MatchCondition # Optional. List of the HTTP headers to forward to the extension # (from the client or backend). If omitted, all headers are sent. # Each element is a string indicating the header name. + # @!attribute [rw] forward_attributes + # @return [::Array<::String>] + # Optional. List of the Envoy attributes to forward to the extension + # server. The attributes provided here are included as part of the + # `ProcessingRequest.attributes` field (of type + # `map`), where the keys are the attribute + # names. Refer to the + # [documentation](https://cloud.google.com/service-extensions/docs/cel-matcher-language-reference#attributes) + # for the names of attributes that can be forwarded. If omitted, no + # attributes are sent. Each element is a string indicating the + # attribute name. # @!attribute [rw] metadata # @return [::Google::Protobuf::Struct] # Optional. The metadata provided here is included as part of the # `metadata_context` (of type `google.protobuf.Struct`) in the # `ProcessingRequest` message sent to the extension server. # - # The metadata is available under the namespace + # For `AuthzExtension` resources, the metadata is available under the + # namespace `com.google.authz_extension.`. + # For other types of extensions, the metadata is available under the + # namespace # `com.google....`. # For example: # `com.google.lb_traffic_extension.lbtrafficextension1.chain1.ext1`. @@ -171,6 +191,45 @@ class MatchCondition # * The length of each key must be less than 64 characters. # * The length of each value must be less than 1024 characters. # * All values must be strings. + # @!attribute [rw] request_body_send_mode + # @return [::Google::Cloud::NetworkServices::V1::BodySendMode] + # Optional. Configures the send mode for request body processing. + # + # The field can only be set if `supported_events` includes `REQUEST_BODY`. + # If `supported_events` includes `REQUEST_BODY`, + # but `request_body_send_mode` is unset, the default value `STREAMED` is + # used. + # + # When this field is set to `FULL_DUPLEX_STREAMED`, `supported_events` + # must include both `REQUEST_BODY` and `REQUEST_TRAILERS`. + # + # This field can be set only for `LbTrafficExtension` and + # `LbRouteExtension` resources, and only when the `service` field of the + # extension points to a `BackendService`. Only `FULL_DUPLEX_STREAMED` mode + # is supported for `LbRouteExtension` resources. + # @!attribute [rw] response_body_send_mode + # @return [::Google::Cloud::NetworkServices::V1::BodySendMode] + # Optional. Configures the send mode for response processing. If + # unspecified, the default value `STREAMED` is used. + # + # The field can only be set if `supported_events` includes `RESPONSE_BODY`. + # If `supported_events` includes `RESPONSE_BODY`, but + # `response_body_send_mode` is unset, the default value `STREAMED` is used. + # + # When this field is set to `FULL_DUPLEX_STREAMED`, `supported_events` + # must include both `RESPONSE_BODY` and `RESPONSE_TRAILERS`. + # + # This field can be set only for `LbTrafficExtension` resources, and only + # when the `service` field of the extension points to a `BackendService`. + # @!attribute [rw] observability_mode + # @return [::Boolean] + # Optional. When set to `true`, the calls to the extension backend are + # performed asynchronously, without pausing the processing of the ongoing + # request. In this mode, only `STREAMED` (default) body processing is + # supported. Responses, if any, are ignored. + # + # Supported by regional `LbTrafficExtension` and `LbRouteExtension` + # resources. class Extension include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -831,15 +890,17 @@ class DeleteLbEdgeExtensionRequest # resources. # @!attribute [rw] load_balancing_scheme # @return [::Google::Cloud::NetworkServices::V1::LoadBalancingScheme] - # Required. All backend services and forwarding rules referenced by this + # Optional. All backend services and forwarding rules referenced by this # extension must share the same load balancing scheme. Supported values: - # `INTERNAL_MANAGED`, `EXTERNAL_MANAGED`. For more information, refer to + # `INTERNAL_MANAGED`, `EXTERNAL_MANAGED`. Can be omitted for AuthzExtensions + # that do not reference a backend service. For more information, refer to # [Backend services # overview](https://cloud.google.com/load-balancing/docs/backend-service). # @!attribute [rw] authority # @return [::String] - # Required. The `:authority` header in the gRPC request sent from Envoy - # to the extension service. + # Optional. The `:authority` header in the gRPC request sent from Envoy to + # the extension service. It is required when the `service` field points to a + # backend service or a wasm plugin. # @!attribute [rw] service # @return [::String] # Required. The reference to the service that runs the extension. @@ -888,10 +949,23 @@ class DeleteLbEdgeExtensionRequest # Optional. List of the HTTP headers to forward to the extension # (from the client). If omitted, all headers are sent. # Each element is a string indicating the header name. + # @!attribute [rw] forward_attributes + # @return [::Array<::String>] + # Optional. List of the Envoy attributes to forward to the extension server. + # The attributes provided here are included as part of the + # `ProcessingRequest.attributes` field (of type + # `map`), where the keys are the attribute + # names. Refer to the + # [documentation](https://cloud.google.com/service-extensions/docs/cel-matcher-language-reference#attributes) + # for the names of attributes that can be forwarded. If omitted, no + # attributes are sent. Each element is a string indicating the + # attribute name. # @!attribute [rw] wire_format # @return [::Google::Cloud::NetworkServices::V1::WireFormat] # Optional. The format of communication supported by the callout extension. - # If not specified, the default value `EXT_PROC_GRPC` is used. + # This field is supported only for regional `AuthzExtension` resources. If + # not specified, the default value `EXT_PROC_GRPC` is used. Global + # `AuthzExtension` resources use the `EXT_PROC_GRPC` wire format. class AuthzExtension include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -1099,6 +1173,35 @@ module WireFormat # `supported_events` for a client request are sent as part of the same # gRPC stream. EXT_PROC_GRPC = 1 + + # The extension service uses Envoy's `ext_authz` gRPC API. The backend + # service for the extension must use HTTP2 or H2C as the protocol. + # `EXT_AUTHZ_GRPC` is only supported for regional `AuthzExtension` resources. + EXT_AUTHZ_GRPC = 3 + end + + # The send mode for body processing. + module BodySendMode + # Default value. Do not use. + BODY_SEND_MODE_UNSPECIFIED = 0 + + # Calls to the extension are executed in the streamed mode. Subsequent + # chunks will be sent only after the previous chunks have been processed. + # + # The content of the body chunks is sent one way to the extension. Extension + # may send modified chunks back. + # + # This is the default value if the processing mode is not specified. + BODY_SEND_MODE_STREAMED = 1 + + # Calls are executed in the full duplex mode. Subsequent chunks will be sent + # for processing without waiting for the response for the previous chunk or + # for the response for `REQUEST_HEADERS` event. + # + # Extension can freely modify or chunk the body contents. If the extension + # doesn't send the body contents back, the next extension in the chain or the + # upstream will receive an empty body. + BODY_SEND_MODE_FULL_DUPLEX_STREAMED = 2 end end end diff --git a/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/endpoint_policy.rb b/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/endpoint_policy.rb index b1c4d5222c24..6d0a76def9df 100644 --- a/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/endpoint_policy.rb +++ b/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/endpoint_policy.rb @@ -28,7 +28,7 @@ module V1 # @!attribute [rw] name # @return [::String] # Identifier. Name of the EndpointPolicy resource. It matches pattern - # `projects/{project}/locations/global/endpointPolicies/{endpoint_policy}`. + # `projects/{project}/locations/*/endpointPolicies/{endpoint_policy}`. # @!attribute [r] create_time # @return [::Google::Protobuf::Timestamp] # Output only. The timestamp when the resource was created. @@ -107,7 +107,7 @@ module EndpointPolicyType # @!attribute [rw] parent # @return [::String] # Required. The project and location from which the EndpointPolicies should - # be listed, specified in the format `projects/*/locations/global`. + # be listed, specified in the format `projects/*/locations/*`. # @!attribute [rw] page_size # @return [::Integer] # Maximum number of EndpointPolicies to return per call. @@ -151,7 +151,7 @@ class ListEndpointPoliciesResponse # @!attribute [rw] name # @return [::String] # Required. A name of the EndpointPolicy to get. Must be in the format - # `projects/*/locations/global/endpointPolicies/*`. + # `projects/*/locations/*/endpointPolicies/*`. class GetEndpointPolicyRequest include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -161,7 +161,7 @@ class GetEndpointPolicyRequest # @!attribute [rw] parent # @return [::String] # Required. The parent resource of the EndpointPolicy. Must be in the - # format `projects/*/locations/global`. + # format `projects/*/locations/*`. # @!attribute [rw] endpoint_policy_id # @return [::String] # Required. Short name of the EndpointPolicy resource to be created. @@ -194,7 +194,7 @@ class UpdateEndpointPolicyRequest # @!attribute [rw] name # @return [::String] # Required. A name of the EndpointPolicy to delete. Must be in the format - # `projects/*/locations/global/endpointPolicies/*`. + # `projects/*/locations/*/endpointPolicies/*`. class DeleteEndpointPolicyRequest include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods diff --git a/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/extensibility.rb b/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/extensibility.rb index dcd31f1c461a..f7f43bac6c49 100644 --- a/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/extensibility.rb +++ b/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/extensibility.rb @@ -96,10 +96,23 @@ class WasmPlugin # @return [::String] # URI of the plugin configuration stored in the Artifact Registry. # The configuration is provided to the plugin at runtime through - # the `ON_CONFIGURE` callback. The container image must - # contain only a single file with the name - # `plugin.config`. When a new `WasmPluginVersion` - # resource is created, the digest of the container image is saved in the + # the `ON_CONFIGURE` callback. + # + # The URI can refer to one of the following repository formats: + # + # * Container images: the `plugin_config_uri` must point to a container + # that contains a single file with the name `plugin.config`. + # When a new `WasmPluginVersion` resource is created, the digest of the + # image is saved in the `plugin_config_digest` field. + # When pulling a container image from Artifact Registry, the digest + # value is used instead of an image tag. + # + # * Generic artifacts: the `plugin_config_uri` must be in this format: + # `projects/{project}/locations/{location}/repositories/{repository}/ + # genericArtifacts/\\{package}:\\{version}`. + # The specified package and version must contain a file with the name + # `plugin.config`. When a new `WasmPluginVersion` resource is + # created, the checksum of the contents of the file is saved in the # `plugin_config_digest` field. # # Note: The following fields are mutually exclusive: `plugin_config_uri`, `plugin_config_data`. If a field in that set is populated, all other fields in the set will automatically be cleared. @@ -118,23 +131,38 @@ class WasmPlugin # resource. # @!attribute [rw] image_uri # @return [::String] - # Optional. URI of the container image containing the Wasm module, stored - # in the Artifact Registry. The container image must contain only a single - # file with the name `plugin.wasm`. When a new `WasmPluginVersion` resource - # is created, the URI gets resolved to an image digest and saved in the - # `image_digest` field. + # Optional. URI of the image containing the Wasm module, stored in + # Artifact Registry. + # + # The URI can refer to one of the following repository formats: + # + # * Container images: the `image_uri` must point to a container that + # contains a single file with the name `plugin.wasm`. + # When a new `WasmPluginVersion` resource is created, the digest of the + # image is saved in the `image_digest` field. + # When pulling a container image from Artifact Registry, the digest value + # is used instead of an image tag. + # + # * Generic artifacts: the `image_uri` must be in this format: + # `projects/{project}/locations/{location}/repositories/{repository}/ + # genericArtifacts/\\{package}:\\{version}`. + # The specified package and version must contain a file with the name + # `plugin.wasm`. When a new `WasmPluginVersion` resource is created, the + # checksum of the contents of the file is saved in the `image_digest` + # field. # @!attribute [r] image_digest # @return [::String] - # Output only. The resolved digest for the image specified in `image`. - # The digest is resolved during the creation of a - # `WasmPluginVersion` resource. - # This field holds the digest value regardless of whether a tag or - # digest was originally specified in the `image` field. + # Output only. This field holds the digest (usually checksum) value for the + # plugin image. The value is calculated based on the `image_uri` field. If + # the `image_uri` field refers to a container image, the digest value is + # obtained from the container image. If the `image_uri` field refers to + # a generic artifact, the digest value is calculated based on the + # contents of the file. # @!attribute [r] plugin_config_digest # @return [::String] # Output only. This field holds the digest (usually checksum) value for the # plugin configuration. The value is calculated based on the contents of - # the `plugin_config_data` field or the container image defined by the + # `plugin_config_data` field or the image defined by the # `plugin_config_uri` field. class VersionDetails include ::Google::Protobuf::MessageExts @@ -172,9 +200,9 @@ class LabelsEntry # This field can be specified only if logging is enabled for this plugin. # @!attribute [rw] min_log_level # @return [::Google::Cloud::NetworkServices::V1::WasmPlugin::LogConfig::LogLevel] - # Non-empty default. Specificies the lowest level of the plugin logs that - # are exported to Cloud Logging. This setting relates to the logs generated - # by using logging statements in your Wasm code. + # Non-empty default. Specifies the lowest level of the plugin logs that are + # exported to Cloud Logging. This setting relates to the logs generated by + # using logging statements in your Wasm code. # # This field is can be set only if logging is enabled for the plugin. # @@ -255,10 +283,24 @@ class VersionsEntry # @return [::String] # URI of the plugin configuration stored in the Artifact Registry. # The configuration is provided to the plugin at runtime through - # the `ON_CONFIGURE` callback. The container image must contain - # only a single file with the name `plugin.config`. When a - # new `WasmPluginVersion` resource is created, the digest of the - # container image is saved in the `plugin_config_digest` field. + # the `ON_CONFIGURE` callback. + # + # The URI can refer to one of the following repository formats: + # + # * Container images: the `plugin_config_uri` must point to a container + # that contains a single file with the name `plugin.config`. + # When a new `WasmPluginVersion` resource is created, the digest of the + # image is saved in the `plugin_config_digest` field. + # When pulling a container image from Artifact Registry, the digest + # value is used instead of an image tag. + # + # * Generic artifacts: the `plugin_config_uri` must be in this format: + # `projects/{project}/locations/{location}/repositories/{repository}/ + # genericArtifacts/\\{package}:\\{version}`. + # The specified package and version must contain a file with the name + # `plugin.config`. When a new `WasmPluginVersion` resource is + # created, the checksum of the contents of the file is saved in the + # `plugin_config_digest` field. # # Note: The following fields are mutually exclusive: `plugin_config_uri`, `plugin_config_data`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] name @@ -281,24 +323,39 @@ class VersionsEntry # resource. # @!attribute [rw] image_uri # @return [::String] - # Optional. URI of the container image containing the plugin, stored in the + # Optional. URI of the image containing the Wasm module, stored in # Artifact Registry. - # When a new `WasmPluginVersion` resource is created, the digest - # of the container image is saved in the `image_digest` field. - # When downloading an image, the digest value is used instead of an - # image tag. + # + # The URI can refer to one of the following repository formats: + # + # * Container images: the `image_uri` must point to a container that + # contains a single file with the name `plugin.wasm`. + # When a new `WasmPluginVersion` resource is created, the digest of the + # image is saved in the `image_digest` field. + # When pulling a container image from Artifact Registry, the digest value + # is used instead of an image tag. + # + # * Generic artifacts: the `image_uri` must be in this format: + # `projects/{project}/locations/{location}/repositories/{repository}/ + # genericArtifacts/\\{package}:\\{version}`. + # The specified package and version must contain a file with the name + # `plugin.wasm`. When a new `WasmPluginVersion` resource is created, the + # checksum of the contents of the file is saved in the `image_digest` + # field. # @!attribute [r] image_digest # @return [::String] - # Output only. The resolved digest for the image specified in the `image` - # field. The digest is resolved during the creation of `WasmPluginVersion` - # resource. This field holds the digest value, regardless of whether a tag or - # digest was originally specified in the `image` field. + # Output only. This field holds the digest (usually checksum) value for the + # plugin image. The value is calculated based on the `image_uri` field. If + # the `image_uri` field refers to a container image, the digest value is + # obtained from the container image. If the `image_uri` field refers to + # a generic artifact, the digest value is calculated based on the + # contents of the file. # @!attribute [r] plugin_config_digest # @return [::String] # Output only. This field holds the digest (usually checksum) value for the # plugin configuration. The value is calculated based on the contents of - # `plugin_config_data` or the container image defined by - # the `plugin_config_uri` field. + # `plugin_config_data` field or the image defined by the + # `plugin_config_uri` field. class WasmPluginVersion include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods diff --git a/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/gateway.rb b/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/gateway.rb index 9313bb453909..95f4cea563ee 100644 --- a/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/gateway.rb +++ b/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/gateway.rb @@ -61,9 +61,14 @@ module V1 # @return [::Array<::Integer>] # Required. One or more port numbers (1-65535), on which the Gateway will # receive traffic. The proxy binds to the specified ports. - # Gateways of type 'SECURE_WEB_GATEWAY' are limited to 1 port. + # Gateways of type 'SECURE_WEB_GATEWAY' are limited to 5 ports. # Gateways of type 'OPEN_MESH' listen on 0.0.0.0 for IPv4 and :: for IPv6 and # support multiple ports. + # @!attribute [rw] all_ports + # @return [::Boolean] + # Optional. If true, the Gateway will listen on all ports. This is mutually + # exclusive with the `ports` field. This field only applies to gateways of + # type 'SECURE_WEB_GATEWAY'. # @!attribute [rw] scope # @return [::String] # Optional. Scope determines how configuration across multiple Gateway @@ -121,6 +126,11 @@ module V1 # Optional. The routing mode of the Gateway. # This field is configurable only for gateways of type SECURE_WEB_GATEWAY. # This field is required for gateways of type SECURE_WEB_GATEWAY. + # @!attribute [rw] allow_global_access + # @return [::Boolean] + # Optional. If true, the gateway will allow traffic from clients outside of + # the region where the gateway is located. + # This field is configurable only for gateways of type SECURE_WEB_GATEWAY. class Gateway include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods diff --git a/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/grpc_route.rb b/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/grpc_route.rb index 141b96f6920e..0c659d9b1e02 100644 --- a/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/grpc_route.rb +++ b/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/grpc_route.rb @@ -26,7 +26,7 @@ module V1 # @!attribute [rw] name # @return [::String] # Identifier. Name of the GrpcRoute resource. It matches pattern - # `projects/*/locations/global/grpcRoutes/` + # `projects/*/locations/*/grpcRoutes/` # @!attribute [r] self_link # @return [::String] # Output only. Server-defined URL of this resource @@ -82,7 +82,7 @@ module V1 # one of the routing rules to route the requests served by the mesh. # # Each mesh reference should match the pattern: - # `projects/*/locations/global/meshes/` + # `projects/*/locations/*/meshes/` # @!attribute [rw] gateways # @return [::Array<::String>] # Optional. Gateways defines a list of gateways this GrpcRoute is attached @@ -90,7 +90,7 @@ module V1 # gateway. # # Each gateway reference should match the pattern: - # `projects/*/locations/global/gateways/` + # `projects/*/locations/*/gateways/` # @!attribute [rw] rules # @return [::Array<::Google::Cloud::NetworkServices::V1::GrpcRoute::RouteRule>] # Required. A list of detailed rules defining how to route traffic. @@ -378,7 +378,7 @@ class LabelsEntry # @!attribute [rw] parent # @return [::String] # Required. The project and location from which the GrpcRoutes should be - # listed, specified in the format `projects/*/locations/global`. + # listed, specified in the format `projects/*/locations/*`. # @!attribute [rw] page_size # @return [::Integer] # Maximum number of GrpcRoutes to return per call. @@ -421,7 +421,7 @@ class ListGrpcRoutesResponse # @!attribute [rw] name # @return [::String] # Required. A name of the GrpcRoute to get. Must be in the format - # `projects/*/locations/global/grpcRoutes/*`. + # `projects/*/locations/*/grpcRoutes/*`. class GetGrpcRouteRequest include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -431,7 +431,7 @@ class GetGrpcRouteRequest # @!attribute [rw] parent # @return [::String] # Required. The parent resource of the GrpcRoute. Must be in the - # format `projects/*/locations/global`. + # format `projects/*/locations/*`. # @!attribute [rw] grpc_route_id # @return [::String] # Required. Short name of the GrpcRoute resource to be created. @@ -463,7 +463,7 @@ class UpdateGrpcRouteRequest # @!attribute [rw] name # @return [::String] # Required. A name of the GrpcRoute to delete. Must be in the format - # `projects/*/locations/global/grpcRoutes/*`. + # `projects/*/locations/*/grpcRoutes/*`. class DeleteGrpcRouteRequest include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods diff --git a/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/http_route.rb b/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/http_route.rb index 6993bb98088a..d1b46b9a8ccf 100644 --- a/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/http_route.rb +++ b/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/http_route.rb @@ -26,7 +26,7 @@ module V1 # @!attribute [rw] name # @return [::String] # Identifier. Name of the HttpRoute resource. It matches pattern - # `projects/*/locations/global/httpRoutes/http_route_name>`. + # `projects/*/locations/*/httpRoutes/http_route_name>`. # @!attribute [r] self_link # @return [::String] # Output only. Server-defined URL of this resource @@ -72,7 +72,7 @@ module V1 # one of the routing rules to route the requests served by the mesh. # # Each mesh reference should match the pattern: - # `projects/*/locations/global/meshes/` + # `projects/*/locations/*/meshes/` # # The attached Mesh should be of a type SIDECAR # @!attribute [rw] gateways @@ -82,7 +82,7 @@ module V1 # gateway. # # Each gateway reference should match the pattern: - # `projects/*/locations/global/gateways/` + # `projects/*/locations/*/gateways/` # @!attribute [rw] labels # @return [::Google::Protobuf::Map{::String => ::String}] # Optional. Set of label tags associated with the HttpRoute resource. @@ -683,7 +683,7 @@ class LabelsEntry # @!attribute [rw] parent # @return [::String] # Required. The project and location from which the HttpRoutes should be - # listed, specified in the format `projects/*/locations/global`. + # listed, specified in the format `projects/*/locations/*`. # @!attribute [rw] page_size # @return [::Integer] # Maximum number of HttpRoutes to return per call. @@ -697,6 +697,9 @@ class LabelsEntry # Optional. If true, allow partial responses for multi-regional Aggregated # List requests. Otherwise if one of the locations is down or unreachable, # the Aggregated List request will fail. + # @!attribute [rw] filter + # @return [::String] + # Optional. Filter expression to restrict the list. class ListHttpRoutesRequest include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -726,7 +729,7 @@ class ListHttpRoutesResponse # @!attribute [rw] name # @return [::String] # Required. A name of the HttpRoute to get. Must be in the format - # `projects/*/locations/global/httpRoutes/*`. + # `projects/*/locations/*/httpRoutes/*`. class GetHttpRouteRequest include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -736,13 +739,16 @@ class GetHttpRouteRequest # @!attribute [rw] parent # @return [::String] # Required. The parent resource of the HttpRoute. Must be in the - # format `projects/*/locations/global`. + # format `projects/*/locations/*`. # @!attribute [rw] http_route_id # @return [::String] # Required. Short name of the HttpRoute resource to be created. # @!attribute [rw] http_route # @return [::Google::Cloud::NetworkServices::V1::HttpRoute] # Required. HttpRoute resource to be created. + # @!attribute [rw] request_id + # @return [::String] + # Optional. Idempotent request UUID. class CreateHttpRouteRequest include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -768,7 +774,7 @@ class UpdateHttpRouteRequest # @!attribute [rw] name # @return [::String] # Required. A name of the HttpRoute to delete. Must be in the format - # `projects/*/locations/global/httpRoutes/*`. + # `projects/*/locations/*/httpRoutes/*`. class DeleteHttpRouteRequest include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods diff --git a/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/mesh.rb b/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/mesh.rb index 68dda0e6ad07..e122fa2b2d6c 100644 --- a/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/mesh.rb +++ b/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/mesh.rb @@ -27,7 +27,7 @@ module V1 # @!attribute [rw] name # @return [::String] # Identifier. Name of the Mesh resource. It matches pattern - # `projects/*/locations/global/meshes/`. + # `projects/*/locations/*/meshes/`. # @!attribute [r] self_link # @return [::String] # Output only. Server-defined URL of this resource @@ -75,7 +75,7 @@ class LabelsEntry # @!attribute [rw] parent # @return [::String] # Required. The project and location from which the Meshes should be - # listed, specified in the format `projects/*/locations/global`. + # listed, specified in the format `projects/*/locations/*`. # @!attribute [rw] page_size # @return [::Integer] # Maximum number of Meshes to return per call. @@ -117,7 +117,7 @@ class ListMeshesResponse # @!attribute [rw] name # @return [::String] # Required. A name of the Mesh to get. Must be in the format - # `projects/*/locations/global/meshes/*`. + # `projects/*/locations/*/meshes/*`. class GetMeshRequest include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -127,7 +127,7 @@ class GetMeshRequest # @!attribute [rw] parent # @return [::String] # Required. The parent resource of the Mesh. Must be in the - # format `projects/*/locations/global`. + # format `projects/*/locations/*`. # @!attribute [rw] mesh_id # @return [::String] # Required. Short name of the Mesh resource to be created. @@ -159,7 +159,7 @@ class UpdateMeshRequest # @!attribute [rw] name # @return [::String] # Required. A name of the Mesh to delete. Must be in the format - # `projects/*/locations/global/meshes/*`. + # `projects/*/locations/*/meshes/*`. class DeleteMeshRequest include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods diff --git a/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/tcp_route.rb b/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/tcp_route.rb index 93e7b5209820..2b36aec1d8ab 100644 --- a/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/tcp_route.rb +++ b/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/tcp_route.rb @@ -26,7 +26,7 @@ module V1 # @!attribute [rw] name # @return [::String] # Identifier. Name of the TcpRoute resource. It matches pattern - # `projects/*/locations/global/tcpRoutes/tcp_route_name>`. + # `projects/*/locations/*/tcpRoutes/tcp_route_name>`. # @!attribute [r] self_link # @return [::String] # Output only. Server-defined URL of this resource @@ -51,7 +51,7 @@ module V1 # one of the routing rules to route the requests served by the mesh. # # Each mesh reference should match the pattern: - # `projects/*/locations/global/meshes/` + # `projects/*/locations/*/meshes/` # # The attached Mesh should be of a type SIDECAR # @!attribute [rw] gateways @@ -60,7 +60,7 @@ module V1 # as one of the routing rules to route the requests served by the gateway. # # Each gateway reference should match the pattern: - # `projects/*/locations/global/gateways/` + # `projects/*/locations/*/gateways/` # @!attribute [rw] labels # @return [::Google::Protobuf::Map{::String => ::String}] # Optional. Set of label tags associated with the TcpRoute resource. @@ -167,7 +167,7 @@ class LabelsEntry # @!attribute [rw] parent # @return [::String] # Required. The project and location from which the TcpRoutes should be - # listed, specified in the format `projects/*/locations/global`. + # listed, specified in the format `projects/*/locations/*`. # @!attribute [rw] page_size # @return [::Integer] # Maximum number of TcpRoutes to return per call. @@ -210,7 +210,7 @@ class ListTcpRoutesResponse # @!attribute [rw] name # @return [::String] # Required. A name of the TcpRoute to get. Must be in the format - # `projects/*/locations/global/tcpRoutes/*`. + # `projects/*/locations/*/tcpRoutes/*`. class GetTcpRouteRequest include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -220,7 +220,7 @@ class GetTcpRouteRequest # @!attribute [rw] parent # @return [::String] # Required. The parent resource of the TcpRoute. Must be in the - # format `projects/*/locations/global`. + # format `projects/*/locations/*`. # @!attribute [rw] tcp_route_id # @return [::String] # Required. Short name of the TcpRoute resource to be created. @@ -252,7 +252,7 @@ class UpdateTcpRouteRequest # @!attribute [rw] name # @return [::String] # Required. A name of the TcpRoute to delete. Must be in the format - # `projects/*/locations/global/tcpRoutes/*`. + # `projects/*/locations/*/tcpRoutes/*`. class DeleteTcpRouteRequest include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods diff --git a/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/tls_route.rb b/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/tls_route.rb index 420c2011c430..55d108c98b24 100644 --- a/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/tls_route.rb +++ b/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/tls_route.rb @@ -26,7 +26,7 @@ module V1 # @!attribute [rw] name # @return [::String] # Identifier. Name of the TlsRoute resource. It matches pattern - # `projects/*/locations/global/tlsRoutes/tls_route_name>`. + # `projects/*/locations/*/tlsRoutes/tls_route_name>`. # @!attribute [r] self_link # @return [::String] # Output only. Server-defined URL of this resource @@ -51,7 +51,7 @@ module V1 # one of the routing rules to route the requests served by the mesh. # # Each mesh reference should match the pattern: - # `projects/*/locations/global/meshes/` + # `projects/*/locations/*/meshes/` # # The attached Mesh should be of a type SIDECAR # @!attribute [rw] gateways @@ -60,7 +60,15 @@ module V1 # as one of the routing rules to route the requests served by the gateway. # # Each gateway reference should match the pattern: - # `projects/*/locations/global/gateways/` + # `projects/*/locations/*/gateways/` + # @!attribute [rw] target_proxies + # @return [::Array<::String>] + # Optional. TargetProxies defines a list of TargetTcpProxies this TlsRoute is + # attached to, as one of the routing rules to route the requests served by + # the TargetTcpProxy. + # + # Each TargetTcpProxy reference should match the pattern: + # `projects/*/locations/*/targetTcpProxies/` # @!attribute [rw] labels # @return [::Google::Protobuf::Map{::String => ::String}] # Optional. Set of label tags associated with the TlsRoute resource. @@ -152,7 +160,7 @@ class LabelsEntry # @!attribute [rw] parent # @return [::String] # Required. The project and location from which the TlsRoutes should be - # listed, specified in the format `projects/*/locations/global`. + # listed, specified in the format `projects/*/locations/*`. # @!attribute [rw] page_size # @return [::Integer] # Maximum number of TlsRoutes to return per call. @@ -195,7 +203,7 @@ class ListTlsRoutesResponse # @!attribute [rw] name # @return [::String] # Required. A name of the TlsRoute to get. Must be in the format - # `projects/*/locations/global/tlsRoutes/*`. + # `projects/*/locations/*/tlsRoutes/*`. class GetTlsRouteRequest include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -205,7 +213,7 @@ class GetTlsRouteRequest # @!attribute [rw] parent # @return [::String] # Required. The parent resource of the TlsRoute. Must be in the - # format `projects/*/locations/global`. + # format `projects/*/locations/*`. # @!attribute [rw] tls_route_id # @return [::String] # Required. Short name of the TlsRoute resource to be created. @@ -237,7 +245,7 @@ class UpdateTlsRouteRequest # @!attribute [rw] name # @return [::String] # Required. A name of the TlsRoute to delete. Must be in the format - # `projects/*/locations/global/tlsRoutes/*`. + # `projects/*/locations/*/tlsRoutes/*`. class DeleteTlsRouteRequest include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/create_agent_gateway.rb b/google-cloud-network_services-v1/snippets/network_services/create_agent_gateway.rb similarity index 100% rename from owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/create_agent_gateway.rb rename to google-cloud-network_services-v1/snippets/network_services/create_agent_gateway.rb diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/delete_agent_gateway.rb b/google-cloud-network_services-v1/snippets/network_services/delete_agent_gateway.rb similarity index 100% rename from owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/delete_agent_gateway.rb rename to google-cloud-network_services-v1/snippets/network_services/delete_agent_gateway.rb diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/get_agent_gateway.rb b/google-cloud-network_services-v1/snippets/network_services/get_agent_gateway.rb similarity index 100% rename from owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/get_agent_gateway.rb rename to google-cloud-network_services-v1/snippets/network_services/get_agent_gateway.rb diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/list_agent_gateways.rb b/google-cloud-network_services-v1/snippets/network_services/list_agent_gateways.rb similarity index 100% rename from owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/list_agent_gateways.rb rename to google-cloud-network_services-v1/snippets/network_services/list_agent_gateways.rb diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/update_agent_gateway.rb b/google-cloud-network_services-v1/snippets/network_services/update_agent_gateway.rb similarity index 100% rename from owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/update_agent_gateway.rb rename to google-cloud-network_services-v1/snippets/network_services/update_agent_gateway.rb diff --git a/google-cloud-network_services-v1/snippets/snippet_metadata_google.cloud.networkservices.v1.json b/google-cloud-network_services-v1/snippets/snippet_metadata_google.cloud.networkservices.v1.json index 767394ad683f..c67bac3d9427 100644 --- a/google-cloud-network_services-v1/snippets/snippet_metadata_google.cloud.networkservices.v1.json +++ b/google-cloud-network_services-v1/snippets/snippet_metadata_google.cloud.networkservices.v1.json @@ -3130,6 +3130,206 @@ "type": "FULL" } ] + }, + { + "region_tag": "networkservices_v1_generated_NetworkServices_ListAgentGateways_sync", + "title": "Snippet for the list_agent_gateways call in the NetworkServices service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#list_agent_gateways.", + "file": "network_services/list_agent_gateways.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_agent_gateways", + "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#list_agent_gateways", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::NetworkServices::V1::ListAgentGatewaysRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::NetworkServices::V1::ListAgentGatewaysResponse", + "client": { + "short_name": "NetworkServices::Client", + "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" + }, + "method": { + "short_name": "ListAgentGateways", + "full_name": "google.cloud.networkservices.v1.NetworkServices.ListAgentGateways", + "service": { + "short_name": "NetworkServices", + "full_name": "google.cloud.networkservices.v1.NetworkServices" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "networkservices_v1_generated_NetworkServices_GetAgentGateway_sync", + "title": "Snippet for the get_agent_gateway call in the NetworkServices service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#get_agent_gateway.", + "file": "network_services/get_agent_gateway.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_agent_gateway", + "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#get_agent_gateway", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::NetworkServices::V1::GetAgentGatewayRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::NetworkServices::V1::AgentGateway", + "client": { + "short_name": "NetworkServices::Client", + "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" + }, + "method": { + "short_name": "GetAgentGateway", + "full_name": "google.cloud.networkservices.v1.NetworkServices.GetAgentGateway", + "service": { + "short_name": "NetworkServices", + "full_name": "google.cloud.networkservices.v1.NetworkServices" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "networkservices_v1_generated_NetworkServices_CreateAgentGateway_sync", + "title": "Snippet for the create_agent_gateway call in the NetworkServices service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#create_agent_gateway.", + "file": "network_services/create_agent_gateway.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_agent_gateway", + "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#create_agent_gateway", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::NetworkServices::V1::CreateAgentGatewayRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "NetworkServices::Client", + "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" + }, + "method": { + "short_name": "CreateAgentGateway", + "full_name": "google.cloud.networkservices.v1.NetworkServices.CreateAgentGateway", + "service": { + "short_name": "NetworkServices", + "full_name": "google.cloud.networkservices.v1.NetworkServices" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "networkservices_v1_generated_NetworkServices_UpdateAgentGateway_sync", + "title": "Snippet for the update_agent_gateway call in the NetworkServices service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#update_agent_gateway.", + "file": "network_services/update_agent_gateway.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_agent_gateway", + "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#update_agent_gateway", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::NetworkServices::V1::UpdateAgentGatewayRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "NetworkServices::Client", + "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" + }, + "method": { + "short_name": "UpdateAgentGateway", + "full_name": "google.cloud.networkservices.v1.NetworkServices.UpdateAgentGateway", + "service": { + "short_name": "NetworkServices", + "full_name": "google.cloud.networkservices.v1.NetworkServices" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "networkservices_v1_generated_NetworkServices_DeleteAgentGateway_sync", + "title": "Snippet for the delete_agent_gateway call in the NetworkServices service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#delete_agent_gateway.", + "file": "network_services/delete_agent_gateway.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_agent_gateway", + "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#delete_agent_gateway", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::NetworkServices::V1::DeleteAgentGatewayRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "NetworkServices::Client", + "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" + }, + "method": { + "short_name": "DeleteAgentGateway", + "full_name": "google.cloud.networkservices.v1.NetworkServices.DeleteAgentGateway", + "service": { + "short_name": "NetworkServices", + "full_name": "google.cloud.networkservices.v1.NetworkServices" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] } ] } \ No newline at end of file diff --git a/google-cloud-network_services-v1/test/google/cloud/network_services/v1/network_services_paths_test.rb b/google-cloud-network_services-v1/test/google/cloud/network_services/v1/network_services_paths_test.rb index c0746ffe810e..8a18dd9d209e 100644 --- a/google-cloud-network_services-v1/test/google/cloud/network_services/v1/network_services_paths_test.rb +++ b/google-cloud-network_services-v1/test/google/cloud/network_services/v1/network_services_paths_test.rb @@ -53,6 +53,18 @@ def test_address_path end end + def test_agent_gateway_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.agent_gateway_path project: "value0", location: "value1", agent_gateway: "value2" + assert_equal "projects/value0/locations/value1/agentGateways/value2", path + end + end + def test_authorization_policy_path grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure ::Gapic::ServiceStub.stub :new, DummyStub.new do @@ -281,6 +293,18 @@ def test_subnetwork_path end end + def test_target_tcp_proxy_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.target_tcp_proxy_path project: "value0", location: "value1", target_tcp_proxy: "value2" + assert_equal "projects/value0/locations/value1/targetTcpProxies/value2", path + end + end + def test_tcp_route_path grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure ::Gapic::ServiceStub.stub :new, DummyStub.new do diff --git a/google-cloud-network_services-v1/test/google/cloud/network_services/v1/network_services_rest_test.rb b/google-cloud-network_services-v1/test/google/cloud/network_services/v1/network_services_rest_test.rb index a25f12826070..ed4a930d672c 100644 --- a/google-cloud-network_services-v1/test/google/cloud/network_services/v1/network_services_rest_test.rb +++ b/google-cloud-network_services-v1/test/google/cloud/network_services/v1/network_services_rest_test.rb @@ -1413,6 +1413,7 @@ def test_list_http_routes page_size = 42 page_token = "hello world" return_partial_success = true + filter = "hello world" list_http_routes_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| assert options.metadata.key? :"x-goog-api-client" @@ -1428,27 +1429,27 @@ def test_list_http_routes end # Use hash object - c.list_http_routes({ parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }) do |_result, response| + c.list_http_routes({ parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success, filter: filter }) do |_result, response| assert_equal http_response, response.underlying_op end # Use named arguments - c.list_http_routes parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success do |_result, response| + c.list_http_routes parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success, filter: filter do |_result, response| assert_equal http_response, response.underlying_op end # Use protobuf object - c.list_http_routes ::Google::Cloud::NetworkServices::V1::ListHttpRoutesRequest.new(parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success) do |_result, response| + c.list_http_routes ::Google::Cloud::NetworkServices::V1::ListHttpRoutesRequest.new(parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success, filter: filter) do |_result, response| assert_equal http_response, response.underlying_op end # Use hash object with options - c.list_http_routes({ parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }, call_options) do |_result, response| + c.list_http_routes({ parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success, filter: filter }, call_options) do |_result, response| assert_equal http_response, response.underlying_op end # Use protobuf object with options - c.list_http_routes(::Google::Cloud::NetworkServices::V1::ListHttpRoutesRequest.new(parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success), call_options) do |_result, response| + c.list_http_routes(::Google::Cloud::NetworkServices::V1::ListHttpRoutesRequest.new(parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success, filter: filter), call_options) do |_result, response| assert_equal http_response, response.underlying_op end @@ -1523,6 +1524,7 @@ def test_create_http_route parent = "hello world" http_route_id = "hello world" http_route = {} + request_id = "hello world" create_http_route_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| assert options.metadata.key? :"x-goog-api-client" @@ -1538,27 +1540,27 @@ def test_create_http_route end # Use hash object - c.create_http_route({ parent: parent, http_route_id: http_route_id, http_route: http_route }) do |_result, response| + c.create_http_route({ parent: parent, http_route_id: http_route_id, http_route: http_route, request_id: request_id }) do |_result, response| assert_equal http_response, response.underlying_op end # Use named arguments - c.create_http_route parent: parent, http_route_id: http_route_id, http_route: http_route do |_result, response| + c.create_http_route parent: parent, http_route_id: http_route_id, http_route: http_route, request_id: request_id do |_result, response| assert_equal http_response, response.underlying_op end # Use protobuf object - c.create_http_route ::Google::Cloud::NetworkServices::V1::CreateHttpRouteRequest.new(parent: parent, http_route_id: http_route_id, http_route: http_route) do |_result, response| + c.create_http_route ::Google::Cloud::NetworkServices::V1::CreateHttpRouteRequest.new(parent: parent, http_route_id: http_route_id, http_route: http_route, request_id: request_id) do |_result, response| assert_equal http_response, response.underlying_op end # Use hash object with options - c.create_http_route({ parent: parent, http_route_id: http_route_id, http_route: http_route }, call_options) do |_result, response| + c.create_http_route({ parent: parent, http_route_id: http_route_id, http_route: http_route, request_id: request_id }, call_options) do |_result, response| assert_equal http_response, response.underlying_op end # Use protobuf object with options - c.create_http_route(::Google::Cloud::NetworkServices::V1::CreateHttpRouteRequest.new(parent: parent, http_route_id: http_route_id, http_route: http_route), call_options) do |_result, response| + c.create_http_route(::Google::Cloud::NetworkServices::V1::CreateHttpRouteRequest.new(parent: parent, http_route_id: http_route_id, http_route: http_route, request_id: request_id), call_options) do |_result, response| assert_equal http_response, response.underlying_op end @@ -3275,6 +3277,283 @@ def test_list_mesh_route_views end end + def test_list_agent_gateways + # Create test objects. + client_result = ::Google::Cloud::NetworkServices::V1::ListAgentGatewaysResponse.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" + return_partial_success = true + + list_agent_gateways_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_list_agent_gateways_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_agent_gateways_client_stub do + # Create client + c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_agent_gateways({ parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.list_agent_gateways parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.list_agent_gateways ::Google::Cloud::NetworkServices::V1::ListAgentGatewaysRequest.new(parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.list_agent_gateways({ parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.list_agent_gateways(::Google::Cloud::NetworkServices::V1::ListAgentGatewaysRequest.new(parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_agent_gateways_client_stub.call_count + end + end + end + + def test_get_agent_gateway + # Create test objects. + client_result = ::Google::Cloud::NetworkServices::V1::AgentGateway.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_agent_gateway_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_get_agent_gateway_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_agent_gateway_client_stub do + # Create client + c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_agent_gateway({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_agent_gateway name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_agent_gateway ::Google::Cloud::NetworkServices::V1::GetAgentGatewayRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_agent_gateway({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_agent_gateway(::Google::Cloud::NetworkServices::V1::GetAgentGatewayRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_agent_gateway_client_stub.call_count + end + end + end + + def test_create_agent_gateway + # 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" + agent_gateway_id = "hello world" + agent_gateway = {} + + create_agent_gateway_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_create_agent_gateway_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_agent_gateway_client_stub do + # Create client + c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.create_agent_gateway({ parent: parent, agent_gateway_id: agent_gateway_id, agent_gateway: agent_gateway }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.create_agent_gateway parent: parent, agent_gateway_id: agent_gateway_id, agent_gateway: agent_gateway do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.create_agent_gateway ::Google::Cloud::NetworkServices::V1::CreateAgentGatewayRequest.new(parent: parent, agent_gateway_id: agent_gateway_id, agent_gateway: agent_gateway) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.create_agent_gateway({ parent: parent, agent_gateway_id: agent_gateway_id, agent_gateway: agent_gateway }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.create_agent_gateway(::Google::Cloud::NetworkServices::V1::CreateAgentGatewayRequest.new(parent: parent, agent_gateway_id: agent_gateway_id, agent_gateway: agent_gateway), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_agent_gateway_client_stub.call_count + end + end + end + + def test_update_agent_gateway + # 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 = {} + agent_gateway = {} + + update_agent_gateway_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_update_agent_gateway_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_agent_gateway_client_stub do + # Create client + c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.update_agent_gateway({ update_mask: update_mask, agent_gateway: agent_gateway }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.update_agent_gateway update_mask: update_mask, agent_gateway: agent_gateway do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.update_agent_gateway ::Google::Cloud::NetworkServices::V1::UpdateAgentGatewayRequest.new(update_mask: update_mask, agent_gateway: agent_gateway) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.update_agent_gateway({ update_mask: update_mask, agent_gateway: agent_gateway }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.update_agent_gateway(::Google::Cloud::NetworkServices::V1::UpdateAgentGatewayRequest.new(update_mask: update_mask, agent_gateway: agent_gateway), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_agent_gateway_client_stub.call_count + end + end + end + + def test_delete_agent_gateway + # 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" + etag = "hello world" + + delete_agent_gateway_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_delete_agent_gateway_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_agent_gateway_client_stub do + # Create client + c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.delete_agent_gateway({ name: name, etag: etag }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.delete_agent_gateway name: name, etag: etag do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.delete_agent_gateway ::Google::Cloud::NetworkServices::V1::DeleteAgentGatewayRequest.new(name: name, etag: etag) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.delete_agent_gateway({ name: name, etag: etag }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.delete_agent_gateway(::Google::Cloud::NetworkServices::V1::DeleteAgentGatewayRequest.new(name: name, etag: etag), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_agent_gateway_client_stub.call_count + end + end + end + def test_configure credentials_token = :dummy_value diff --git a/google-cloud-network_services-v1/test/google/cloud/network_services/v1/network_services_test.rb b/google-cloud-network_services-v1/test/google/cloud/network_services/v1/network_services_test.rb index 148fe228280d..003eea3d2989 100644 --- a/google-cloud-network_services-v1/test/google/cloud/network_services/v1/network_services_test.rb +++ b/google-cloud-network_services-v1/test/google/cloud/network_services/v1/network_services_test.rb @@ -1616,6 +1616,7 @@ def test_list_http_routes page_size = 42 page_token = "hello world" return_partial_success = true + filter = "hello world" list_http_routes_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| assert_equal :list_http_routes, name @@ -1624,6 +1625,7 @@ def test_list_http_routes assert_equal 42, request["page_size"] assert_equal "hello world", request["page_token"] assert_equal true, request["return_partial_success"] + assert_equal "hello world", request["filter"] refute_nil options end @@ -1634,35 +1636,35 @@ def test_list_http_routes end # Use hash object - c.list_http_routes({ parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }) do |response, operation| + c.list_http_routes({ parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success, 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 - c.list_http_routes parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success do |response, operation| + c.list_http_routes parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success, 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 - c.list_http_routes ::Google::Cloud::NetworkServices::V1::ListHttpRoutesRequest.new(parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success) do |response, operation| + c.list_http_routes ::Google::Cloud::NetworkServices::V1::ListHttpRoutesRequest.new(parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success, 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 - c.list_http_routes({ parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }, grpc_options) do |response, operation| + c.list_http_routes({ parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success, 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 - c.list_http_routes(::Google::Cloud::NetworkServices::V1::ListHttpRoutesRequest.new(parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success), grpc_options) do |response, operation| + c.list_http_routes(::Google::Cloud::NetworkServices::V1::ListHttpRoutesRequest.new(parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success, filter: filter), grpc_options) do |response, operation| assert_kind_of Gapic::PagedEnumerable, response assert_equal grpc_response, response.response assert_equal grpc_operation, operation @@ -1742,6 +1744,7 @@ def test_create_http_route parent = "hello world" http_route_id = "hello world" http_route = {} + request_id = "hello world" create_http_route_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| assert_equal :create_http_route, name @@ -1749,6 +1752,7 @@ def test_create_http_route assert_equal "hello world", request["parent"] assert_equal "hello world", request["http_route_id"] assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::NetworkServices::V1::HttpRoute), request["http_route"] + assert_equal "hello world", request["request_id"] refute_nil options end @@ -1759,35 +1763,35 @@ def test_create_http_route end # Use hash object - c.create_http_route({ parent: parent, http_route_id: http_route_id, http_route: http_route }) do |response, operation| + c.create_http_route({ parent: parent, http_route_id: http_route_id, http_route: http_route, request_id: request_id }) 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 - c.create_http_route parent: parent, http_route_id: http_route_id, http_route: http_route do |response, operation| + c.create_http_route parent: parent, http_route_id: http_route_id, http_route: http_route, request_id: request_id 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 - c.create_http_route ::Google::Cloud::NetworkServices::V1::CreateHttpRouteRequest.new(parent: parent, http_route_id: http_route_id, http_route: http_route) do |response, operation| + c.create_http_route ::Google::Cloud::NetworkServices::V1::CreateHttpRouteRequest.new(parent: parent, http_route_id: http_route_id, http_route: http_route, request_id: request_id) 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 - c.create_http_route({ parent: parent, http_route_id: http_route_id, http_route: http_route }, grpc_options) do |response, operation| + c.create_http_route({ parent: parent, http_route_id: http_route_id, http_route: http_route, request_id: request_id }, 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 - c.create_http_route(::Google::Cloud::NetworkServices::V1::CreateHttpRouteRequest.new(parent: parent, http_route_id: http_route_id, http_route: http_route), grpc_options) do |response, operation| + c.create_http_route(::Google::Cloud::NetworkServices::V1::CreateHttpRouteRequest.new(parent: parent, http_route_id: http_route_id, http_route: http_route, request_id: request_id), grpc_options) do |response, operation| assert_kind_of Gapic::Operation, response assert_equal grpc_response, response.grpc_op assert_equal grpc_operation, operation @@ -3782,6 +3786,330 @@ def test_list_mesh_route_views end end + def test_list_agent_gateways + # Create GRPC objects. + grpc_response = ::Google::Cloud::NetworkServices::V1::ListAgentGatewaysResponse.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" + return_partial_success = true + + list_agent_gateways_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_agent_gateways, name + assert_kind_of ::Google::Cloud::NetworkServices::V1::ListAgentGatewaysRequest, request + assert_equal "hello world", request["parent"] + 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_agent_gateways_client_stub do + # Create client + c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_agent_gateways({ parent: parent, 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 + c.list_agent_gateways parent: parent, 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 + c.list_agent_gateways ::Google::Cloud::NetworkServices::V1::ListAgentGatewaysRequest.new(parent: parent, 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 + c.list_agent_gateways({ parent: parent, 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 + c.list_agent_gateways(::Google::Cloud::NetworkServices::V1::ListAgentGatewaysRequest.new(parent: parent, 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_agent_gateways_client_stub.call_rpc_count + end + end + + def test_get_agent_gateway + # Create GRPC objects. + grpc_response = ::Google::Cloud::NetworkServices::V1::AgentGateway.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_agent_gateway_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_agent_gateway, name + assert_kind_of ::Google::Cloud::NetworkServices::V1::GetAgentGatewayRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_agent_gateway_client_stub do + # Create client + c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_agent_gateway({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_agent_gateway name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_agent_gateway ::Google::Cloud::NetworkServices::V1::GetAgentGatewayRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_agent_gateway({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_agent_gateway(::Google::Cloud::NetworkServices::V1::GetAgentGatewayRequest.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_agent_gateway_client_stub.call_rpc_count + end + end + + def test_create_agent_gateway + # 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" + agent_gateway_id = "hello world" + agent_gateway = {} + + create_agent_gateway_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_agent_gateway, name + assert_kind_of ::Google::Cloud::NetworkServices::V1::CreateAgentGatewayRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["agent_gateway_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::NetworkServices::V1::AgentGateway), request["agent_gateway"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_agent_gateway_client_stub do + # Create client + c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.create_agent_gateway({ parent: parent, agent_gateway_id: agent_gateway_id, agent_gateway: agent_gateway }) 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 + c.create_agent_gateway parent: parent, agent_gateway_id: agent_gateway_id, agent_gateway: agent_gateway 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 + c.create_agent_gateway ::Google::Cloud::NetworkServices::V1::CreateAgentGatewayRequest.new(parent: parent, agent_gateway_id: agent_gateway_id, agent_gateway: agent_gateway) 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 + c.create_agent_gateway({ parent: parent, agent_gateway_id: agent_gateway_id, agent_gateway: agent_gateway }, 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 + c.create_agent_gateway(::Google::Cloud::NetworkServices::V1::CreateAgentGatewayRequest.new(parent: parent, agent_gateway_id: agent_gateway_id, agent_gateway: agent_gateway), 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_agent_gateway_client_stub.call_rpc_count + end + end + + def test_update_agent_gateway + # 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 = {} + agent_gateway = {} + + update_agent_gateway_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_agent_gateway, name + assert_kind_of ::Google::Cloud::NetworkServices::V1::UpdateAgentGatewayRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::NetworkServices::V1::AgentGateway), request["agent_gateway"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_agent_gateway_client_stub do + # Create client + c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.update_agent_gateway({ update_mask: update_mask, agent_gateway: agent_gateway }) 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 + c.update_agent_gateway update_mask: update_mask, agent_gateway: agent_gateway 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 + c.update_agent_gateway ::Google::Cloud::NetworkServices::V1::UpdateAgentGatewayRequest.new(update_mask: update_mask, agent_gateway: agent_gateway) 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 + c.update_agent_gateway({ update_mask: update_mask, agent_gateway: agent_gateway }, 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 + c.update_agent_gateway(::Google::Cloud::NetworkServices::V1::UpdateAgentGatewayRequest.new(update_mask: update_mask, agent_gateway: agent_gateway), 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_agent_gateway_client_stub.call_rpc_count + end + end + + def test_delete_agent_gateway + # 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" + etag = "hello world" + + delete_agent_gateway_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_agent_gateway, name + assert_kind_of ::Google::Cloud::NetworkServices::V1::DeleteAgentGatewayRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["etag"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_agent_gateway_client_stub do + # Create client + c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.delete_agent_gateway({ name: name, etag: etag }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + c.delete_agent_gateway name: name, etag: etag do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.delete_agent_gateway ::Google::Cloud::NetworkServices::V1::DeleteAgentGatewayRequest.new(name: name, etag: etag) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.delete_agent_gateway({ name: name, etag: etag }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.delete_agent_gateway(::Google::Cloud::NetworkServices::V1::DeleteAgentGatewayRequest.new(name: name, etag: etag), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_agent_gateway_client_stub.call_rpc_count + end + end + def test_configure grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure diff --git a/owl-bot-staging/google-cloud-network_services-v1/.gitignore b/owl-bot-staging/google-cloud-network_services-v1/.gitignore deleted file mode 100644 index 0135b6bc6cfc..000000000000 --- a/owl-bot-staging/google-cloud-network_services-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_services-v1/.repo-metadata.json b/owl-bot-staging/google-cloud-network_services-v1/.repo-metadata.json deleted file mode 100644 index 22508f7ad38b..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/.repo-metadata.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "api_id": "networkservices.googleapis.com", - "api_shortname": "networkservices", - "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-network_services-v1/latest", - "distribution_name": "google-cloud-network_services-v1", - "is_cloud": true, - "language": "ruby", - "name": "networkservices", - "name_pretty": "Network Services V1 API", - "product_documentation": "https://cloud.google.com/products/networking", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "google-cloud-network_services-v1 is the official client library for the Network Services V1 API. Note that google-cloud-network_services-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-network_services instead. See the readme for more details.", - "ruby-cloud-product-url": "https://cloud.google.com/products/networking", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-cloud-network_services-v1/.rubocop.yml b/owl-bot-staging/google-cloud-network_services-v1/.rubocop.yml deleted file mode 100644 index 7cf0c71c9775..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-cloud-network_services-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_services-v1.rb" diff --git a/owl-bot-staging/google-cloud-network_services-v1/.toys.rb b/owl-bot-staging/google-cloud-network_services-v1/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-cloud-network_services-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_services-v1/.yardopts b/owl-bot-staging/google-cloud-network_services-v1/.yardopts deleted file mode 100644 index 386b136a01eb..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/.yardopts +++ /dev/null @@ -1,12 +0,0 @@ ---no-private ---title="Network Services 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_services-v1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-network_services-v1/AUTHENTICATION.md deleted file mode 100644 index 9d309720ea10..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-cloud-network_services-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_services-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_services/v1" - -client = ::Google::Cloud::NetworkServices::V1::DepService::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_services/v1" - -::Google::Cloud::NetworkServices::V1::DepService::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Cloud::NetworkServices::V1::DepService::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_services-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_services/v1" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Cloud::NetworkServices::V1::DepService::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_services-v1/CHANGELOG.md b/owl-bot-staging/google-cloud-network_services-v1/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-cloud-network_services-v1/Gemfile b/owl-bot-staging/google-cloud-network_services-v1/Gemfile deleted file mode 100644 index 1d08558908d8..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/Gemfile +++ /dev/null @@ -1,14 +0,0 @@ -source "https://rubygems.org" - -gemspec - -gem "google-style", "~> 1.32.0" -gem "irb", "~> 1.17" -gem "minitest", "~> 6.0.2" -gem "minitest-focus", "~> 1.4" -gem "minitest-mock", "~> 5.27" -gem "minitest-rg", "~> 5.3" -gem "ostruct", "~> 0.5.5" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-network_services-v1/LICENSE.md b/owl-bot-staging/google-cloud-network_services-v1/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-cloud-network_services-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_services-v1/README.md b/owl-bot-staging/google-cloud-network_services-v1/README.md deleted file mode 100644 index 2c9d05e41146..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/README.md +++ /dev/null @@ -1,154 +0,0 @@ -# Ruby Client for the Network Services V1 API - -API Client library for the Network Services V1 API - -google-cloud-network_services-v1 is the official client library for the Network Services V1 API. - -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 Services V1 API. Most users should consider using -the main client gem, -[google-cloud-network_services](https://rubygems.org/gems/google-cloud-network_services). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-cloud-network_services-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/networkservices.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -## Quick Start - -```ruby -require "google/cloud/network_services/v1" - -client = ::Google::Cloud::NetworkServices::V1::DepService::Client.new -request = ::Google::Cloud::NetworkServices::V1::ListLbTrafficExtensionsRequest.new # (request fields as keyword arguments...) -response = client.list_lb_traffic_extensions request -``` - -View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-network_services-v1/latest) -for class and method documentation. - -See also the [Product Documentation](https://cloud.google.com/products/networking) -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_services/v1" -require "logger" - -client = ::Google::Cloud::NetworkServices::V1::DepService::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.2+. - -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_services`, -and lower-level _versioned_ client libraries with names such as -`google-cloud-network_services-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_services`. -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_services-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_services-v1/Rakefile b/owl-bot-staging/google-cloud-network_services-v1/Rakefile deleted file mode 100644 index 40c3ff775533..000000000000 --- a/owl-bot-staging/google-cloud-network_services-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_services-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_services/v1/dep_service/credentials" - ::Google::Cloud::NetworkServices::V1::DepService::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_services-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_services-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_services-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_services-v1 gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-cloud-network_services-v1" - header "google-cloud-network_services-v1 rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-cloud-network_services-v1 yard", "*" - Rake::Task[:yard].invoke - header "google-cloud-network_services-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_services-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_services-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_services-v1/gapic_metadata.json b/owl-bot-staging/google-cloud-network_services-v1/gapic_metadata.json deleted file mode 100644 index b9bc5946fba2..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/gapic_metadata.json +++ /dev/null @@ -1,442 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "ruby", - "protoPackage": "google.cloud.networkservices.v1", - "libraryPackage": "::Google::Cloud::NetworkServices::V1", - "services": { - "DepService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::NetworkServices::V1::DepService::Client", - "rpcs": { - "ListLbTrafficExtensions": { - "methods": [ - "list_lb_traffic_extensions" - ] - }, - "GetLbTrafficExtension": { - "methods": [ - "get_lb_traffic_extension" - ] - }, - "CreateLbTrafficExtension": { - "methods": [ - "create_lb_traffic_extension" - ] - }, - "UpdateLbTrafficExtension": { - "methods": [ - "update_lb_traffic_extension" - ] - }, - "DeleteLbTrafficExtension": { - "methods": [ - "delete_lb_traffic_extension" - ] - }, - "ListLbRouteExtensions": { - "methods": [ - "list_lb_route_extensions" - ] - }, - "GetLbRouteExtension": { - "methods": [ - "get_lb_route_extension" - ] - }, - "CreateLbRouteExtension": { - "methods": [ - "create_lb_route_extension" - ] - }, - "UpdateLbRouteExtension": { - "methods": [ - "update_lb_route_extension" - ] - }, - "DeleteLbRouteExtension": { - "methods": [ - "delete_lb_route_extension" - ] - }, - "ListLbEdgeExtensions": { - "methods": [ - "list_lb_edge_extensions" - ] - }, - "GetLbEdgeExtension": { - "methods": [ - "get_lb_edge_extension" - ] - }, - "CreateLbEdgeExtension": { - "methods": [ - "create_lb_edge_extension" - ] - }, - "UpdateLbEdgeExtension": { - "methods": [ - "update_lb_edge_extension" - ] - }, - "DeleteLbEdgeExtension": { - "methods": [ - "delete_lb_edge_extension" - ] - }, - "ListAuthzExtensions": { - "methods": [ - "list_authz_extensions" - ] - }, - "GetAuthzExtension": { - "methods": [ - "get_authz_extension" - ] - }, - "CreateAuthzExtension": { - "methods": [ - "create_authz_extension" - ] - }, - "UpdateAuthzExtension": { - "methods": [ - "update_authz_extension" - ] - }, - "DeleteAuthzExtension": { - "methods": [ - "delete_authz_extension" - ] - } - } - } - } - }, - "NetworkServices": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client", - "rpcs": { - "ListEndpointPolicies": { - "methods": [ - "list_endpoint_policies" - ] - }, - "GetEndpointPolicy": { - "methods": [ - "get_endpoint_policy" - ] - }, - "CreateEndpointPolicy": { - "methods": [ - "create_endpoint_policy" - ] - }, - "UpdateEndpointPolicy": { - "methods": [ - "update_endpoint_policy" - ] - }, - "DeleteEndpointPolicy": { - "methods": [ - "delete_endpoint_policy" - ] - }, - "ListWasmPluginVersions": { - "methods": [ - "list_wasm_plugin_versions" - ] - }, - "GetWasmPluginVersion": { - "methods": [ - "get_wasm_plugin_version" - ] - }, - "CreateWasmPluginVersion": { - "methods": [ - "create_wasm_plugin_version" - ] - }, - "DeleteWasmPluginVersion": { - "methods": [ - "delete_wasm_plugin_version" - ] - }, - "ListWasmPlugins": { - "methods": [ - "list_wasm_plugins" - ] - }, - "GetWasmPlugin": { - "methods": [ - "get_wasm_plugin" - ] - }, - "CreateWasmPlugin": { - "methods": [ - "create_wasm_plugin" - ] - }, - "UpdateWasmPlugin": { - "methods": [ - "update_wasm_plugin" - ] - }, - "DeleteWasmPlugin": { - "methods": [ - "delete_wasm_plugin" - ] - }, - "ListGateways": { - "methods": [ - "list_gateways" - ] - }, - "GetGateway": { - "methods": [ - "get_gateway" - ] - }, - "CreateGateway": { - "methods": [ - "create_gateway" - ] - }, - "UpdateGateway": { - "methods": [ - "update_gateway" - ] - }, - "DeleteGateway": { - "methods": [ - "delete_gateway" - ] - }, - "ListGrpcRoutes": { - "methods": [ - "list_grpc_routes" - ] - }, - "GetGrpcRoute": { - "methods": [ - "get_grpc_route" - ] - }, - "CreateGrpcRoute": { - "methods": [ - "create_grpc_route" - ] - }, - "UpdateGrpcRoute": { - "methods": [ - "update_grpc_route" - ] - }, - "DeleteGrpcRoute": { - "methods": [ - "delete_grpc_route" - ] - }, - "ListHttpRoutes": { - "methods": [ - "list_http_routes" - ] - }, - "GetHttpRoute": { - "methods": [ - "get_http_route" - ] - }, - "CreateHttpRoute": { - "methods": [ - "create_http_route" - ] - }, - "UpdateHttpRoute": { - "methods": [ - "update_http_route" - ] - }, - "DeleteHttpRoute": { - "methods": [ - "delete_http_route" - ] - }, - "ListTcpRoutes": { - "methods": [ - "list_tcp_routes" - ] - }, - "GetTcpRoute": { - "methods": [ - "get_tcp_route" - ] - }, - "CreateTcpRoute": { - "methods": [ - "create_tcp_route" - ] - }, - "UpdateTcpRoute": { - "methods": [ - "update_tcp_route" - ] - }, - "DeleteTcpRoute": { - "methods": [ - "delete_tcp_route" - ] - }, - "ListTlsRoutes": { - "methods": [ - "list_tls_routes" - ] - }, - "GetTlsRoute": { - "methods": [ - "get_tls_route" - ] - }, - "CreateTlsRoute": { - "methods": [ - "create_tls_route" - ] - }, - "UpdateTlsRoute": { - "methods": [ - "update_tls_route" - ] - }, - "DeleteTlsRoute": { - "methods": [ - "delete_tls_route" - ] - }, - "ListServiceBindings": { - "methods": [ - "list_service_bindings" - ] - }, - "GetServiceBinding": { - "methods": [ - "get_service_binding" - ] - }, - "CreateServiceBinding": { - "methods": [ - "create_service_binding" - ] - }, - "UpdateServiceBinding": { - "methods": [ - "update_service_binding" - ] - }, - "DeleteServiceBinding": { - "methods": [ - "delete_service_binding" - ] - }, - "ListMeshes": { - "methods": [ - "list_meshes" - ] - }, - "GetMesh": { - "methods": [ - "get_mesh" - ] - }, - "CreateMesh": { - "methods": [ - "create_mesh" - ] - }, - "UpdateMesh": { - "methods": [ - "update_mesh" - ] - }, - "DeleteMesh": { - "methods": [ - "delete_mesh" - ] - }, - "ListServiceLbPolicies": { - "methods": [ - "list_service_lb_policies" - ] - }, - "GetServiceLbPolicy": { - "methods": [ - "get_service_lb_policy" - ] - }, - "CreateServiceLbPolicy": { - "methods": [ - "create_service_lb_policy" - ] - }, - "UpdateServiceLbPolicy": { - "methods": [ - "update_service_lb_policy" - ] - }, - "DeleteServiceLbPolicy": { - "methods": [ - "delete_service_lb_policy" - ] - }, - "GetGatewayRouteView": { - "methods": [ - "get_gateway_route_view" - ] - }, - "GetMeshRouteView": { - "methods": [ - "get_mesh_route_view" - ] - }, - "ListGatewayRouteViews": { - "methods": [ - "list_gateway_route_views" - ] - }, - "ListMeshRouteViews": { - "methods": [ - "list_mesh_route_views" - ] - }, - "ListAgentGateways": { - "methods": [ - "list_agent_gateways" - ] - }, - "GetAgentGateway": { - "methods": [ - "get_agent_gateway" - ] - }, - "CreateAgentGateway": { - "methods": [ - "create_agent_gateway" - ] - }, - "UpdateAgentGateway": { - "methods": [ - "update_agent_gateway" - ] - }, - "DeleteAgentGateway": { - "methods": [ - "delete_agent_gateway" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-network_services-v1/google-cloud-network_services-v1.gemspec b/owl-bot-staging/google-cloud-network_services-v1/google-cloud-network_services-v1.gemspec deleted file mode 100644 index 69e143b54323..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/google-cloud-network_services-v1.gemspec +++ /dev/null @@ -1,30 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/cloud/network_services/v1/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-cloud-network_services-v1" - gem.version = Google::Cloud::NetworkServices::V1::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "google-cloud-network_services-v1 is the official client library for the Network Services V1 API. Note that google-cloud-network_services-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-network_services instead. See the readme for more details." - gem.summary = "API Client library for the Network Services V1 API" - 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.2" - - gem.add_dependency "gapic-common", "~> 1.3" - 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_services-v1/lib/google-cloud-network_services-v1.rb b/owl-bot-staging/google-cloud-network_services-v1/lib/google-cloud-network_services-v1.rb deleted file mode 100644 index 3a282b9851bf..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/lib/google-cloud-network_services-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_services/v1" diff --git a/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1.rb b/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1.rb deleted file mode 100644 index b9f5c2321503..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1.rb +++ /dev/null @@ -1,46 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/network_services/v1/dep_service" -require "google/cloud/network_services/v1/network_services" -require "google/cloud/network_services/v1/version" - -module Google - module Cloud - module NetworkServices - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/cloud/network_services/v1" - # client = ::Google::Cloud::NetworkServices::V1::DepService::Client.new - # - # @example Load this package, including all its services, and instantiate a REST client - # - # require "google/cloud/network_services/v1" - # client = ::Google::Cloud::NetworkServices::V1::DepService::Rest::Client.new - # - module V1 - end - end - end -end - -helper_path = ::File.join __dir__, "v1", "_helpers.rb" -require "google/cloud/network_services/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/bindings_override.rb b/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/bindings_override.rb deleted file mode 100644 index dd83f9cbf7ab..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/bindings_override.rb +++ /dev/null @@ -1,252 +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 NetworkServices - ## - # @example Loading just the REST part of this package, including all its services, and instantiating a REST client - # - # require "google/cloud/network_services/v1/rest" - # client = ::Google::Cloud::NetworkServices::V1::DepService::Rest::Client.new - # - module V1 - ## - # @private - # Initialize the mixin bindings configuration - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "NetworkServices"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - - default_config = ::Gapic::Rest::HttpBindingOverrideConfiguration.new parent_config - default_config.bindings_override["google.cloud.location.Locations.GetLocation"] = [ - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ], - body: nil - ) - ] - default_config.bindings_override["google.cloud.location.Locations.ListLocations"] = [ - - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :get, - uri_template: "/v1/{name}/locations", - matches: [ - ["name", %r{^projects/[^/]+/?$}, false] - ], - body: nil - ) - ] - default_config.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/[^/]+/edgeCacheKeysets/[^/]+/?$}, false] - ], - body: nil - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :get, - uri_template: "/v1/{resource}:getIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/edgeCacheOrigins/[^/]+/?$}, false] - ], - body: nil - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :get, - uri_template: "/v1/{resource}:getIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/edgeCacheServices/[^/]+/?$}, false] - ], - body: nil - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :get, - uri_template: "/v1/{resource}:getIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/endpointPolicies/[^/]+/?$}, false] - ], - body: nil - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :get, - uri_template: "/v1/{resource}:getIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/serviceBindings/[^/]+/?$}, false] - ], - body: nil - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :get, - uri_template: "/v1/{resource}:getIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/meshes/[^/]+/?$}, false] - ], - body: nil - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :get, - uri_template: "/v1/{resource}:getIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/gateways/[^/]+/?$}, 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/[^/]+/edgeCacheKeysets/[^/]+/?$}, false] - ], - body: "*" - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:setIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/edgeCacheOrigins/[^/]+/?$}, false] - ], - body: "*" - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:setIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/edgeCacheServices/[^/]+/?$}, false] - ], - body: "*" - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:setIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/endpointPolicies/[^/]+/?$}, false] - ], - body: "*" - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:setIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/serviceBindings/[^/]+/?$}, false] - ], - body: "*" - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:setIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/meshes/[^/]+/?$}, false] - ], - body: "*" - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:setIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/gateways/[^/]+/?$}, 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/[^/]+/edgeCacheKeysets/[^/]+/?$}, false] - ], - body: "*" - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:testIamPermissions", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/edgeCacheOrigins/[^/]+/?$}, false] - ], - body: "*" - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:testIamPermissions", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/edgeCacheServices/[^/]+/?$}, false] - ], - body: "*" - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:testIamPermissions", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/endpointPolicies/[^/]+/?$}, false] - ], - body: "*" - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:testIamPermissions", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/serviceBindings/[^/]+/?$}, false] - ], - body: "*" - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:testIamPermissions", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/meshes/[^/]+/?$}, false] - ], - body: "*" - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:testIamPermissions", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/gateways/[^/]+/?$}, 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_services-v1/lib/google/cloud/network_services/v1/dep_service.rb b/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/dep_service.rb deleted file mode 100644 index 90828e3419ac..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/dep_service.rb +++ /dev/null @@ -1,56 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/network_services/v1/version" - -require "google/cloud/network_services/v1/dep_service/credentials" -require "google/cloud/network_services/v1/dep_service/paths" -require "google/cloud/network_services/v1/dep_service/operations" -require "google/cloud/network_services/v1/dep_service/client" -require "google/cloud/network_services/v1/dep_service/rest" - -module Google - module Cloud - module NetworkServices - module V1 - ## - # Service describing handlers for resources. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/network_services/v1/dep_service" - # client = ::Google::Cloud::NetworkServices::V1::DepService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/cloud/network_services/v1/dep_service/rest" - # client = ::Google::Cloud::NetworkServices::V1::DepService::Rest::Client.new - # - module DepService - end - end - end - end -end - -helper_path = ::File.join __dir__, "dep_service", "helpers.rb" -require "google/cloud/network_services/v1/dep_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/dep_service/client.rb b/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/dep_service/client.rb deleted file mode 100644 index 554ebe4a2ca0..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/dep_service/client.rb +++ /dev/null @@ -1,2670 +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/networkservices/v1/dep_pb" -require "google/cloud/location" -require "google/iam/v1" - -module Google - module Cloud - module NetworkServices - module V1 - module DepService - ## - # Client for the DepService service. - # - # Service describing handlers for resources. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "networkservices.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :dep_service_stub - - ## - # Configure the DepService Client class. - # - # See {::Google::Cloud::NetworkServices::V1::DepService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all DepService clients - # ::Google::Cloud::NetworkServices::V1::DepService::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", "NetworkServices", "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 DepService 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::NetworkServices::V1::DepService::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 - @dep_service_stub.universe_domain - end - - ## - # Create a new DepService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::NetworkServices::V1::DepService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::NetworkServices::V1::DepService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the DepService 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/networkservices/v1/dep_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 - - @dep_service_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::NetworkServices::V1::DepService::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 - ) - - @dep_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 = @dep_service_stub.endpoint - config.universe_domain = @dep_service_stub.universe_domain - config.logger = @dep_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 = @dep_service_stub.endpoint - config.universe_domain = @dep_service_stub.universe_domain - config.logger = @dep_service_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::NetworkServices::V1::DepService::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 - @dep_service_stub.logger - end - - # Service calls - - ## - # Lists `LbTrafficExtension` resources in a given project and location. - # - # @overload list_lb_traffic_extensions(request, options = nil) - # Pass arguments to `list_lb_traffic_extensions` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::ListLbTrafficExtensionsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::ListLbTrafficExtensionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_lb_traffic_extensions(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_lb_traffic_extensions` via keyword arguments. Note that at - # least one keyword argument is 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 project and location from which the `LbTrafficExtension` - # resources are listed. These values are specified in the following format: - # `projects/{project}/locations/{location}`. - # @param page_size [::Integer] - # Optional. Requested page size. The server might return fewer items than - # requested. If unspecified, the server picks an appropriate default. - # @param page_token [::String] - # Optional. A token identifying a page of results that the server returns. - # @param filter [::String] - # Optional. Filtering results. - # @param order_by [::String] - # Optional. Hint about how to order the results. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::NetworkServices::V1::LbTrafficExtension>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::NetworkServices::V1::LbTrafficExtension>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/network_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::DepService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::ListLbTrafficExtensionsRequest.new - # - # # Call the list_lb_traffic_extensions method. - # result = client.list_lb_traffic_extensions 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::NetworkServices::V1::LbTrafficExtension. - # p item - # end - # - def list_lb_traffic_extensions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::ListLbTrafficExtensionsRequest - - # Converts hash 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_lb_traffic_extensions.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::NetworkServices::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_lb_traffic_extensions.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_lb_traffic_extensions.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dep_service_stub.call_rpc :list_lb_traffic_extensions, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @dep_service_stub, :list_lb_traffic_extensions, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets details of the specified `LbTrafficExtension` resource. - # - # @overload get_lb_traffic_extension(request, options = nil) - # Pass arguments to `get_lb_traffic_extension` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::GetLbTrafficExtensionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::GetLbTrafficExtensionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_lb_traffic_extension(name: nil) - # Pass arguments to `get_lb_traffic_extension` via keyword arguments. Note that at - # least one keyword argument is 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. A name of the `LbTrafficExtension` resource to get. Must be in - # the format - # `projects/{project}/locations/{location}/lbTrafficExtensions/{lb_traffic_extension}`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::NetworkServices::V1::LbTrafficExtension] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::NetworkServices::V1::LbTrafficExtension] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/network_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::DepService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::GetLbTrafficExtensionRequest.new - # - # # Call the get_lb_traffic_extension method. - # result = client.get_lb_traffic_extension request - # - # # The returned object is of type Google::Cloud::NetworkServices::V1::LbTrafficExtension. - # p result - # - def get_lb_traffic_extension request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::GetLbTrafficExtensionRequest - - # Converts hash 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_lb_traffic_extension.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::NetworkServices::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_lb_traffic_extension.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_lb_traffic_extension.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dep_service_stub.call_rpc :get_lb_traffic_extension, 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 `LbTrafficExtension` resource in a given project and - # location. - # - # @overload create_lb_traffic_extension(request, options = nil) - # Pass arguments to `create_lb_traffic_extension` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::CreateLbTrafficExtensionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::CreateLbTrafficExtensionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_lb_traffic_extension(parent: nil, lb_traffic_extension_id: nil, lb_traffic_extension: nil, request_id: nil) - # Pass arguments to `create_lb_traffic_extension` via keyword arguments. Note that at - # least one keyword argument is 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 `LbTrafficExtension` resource. Must be - # in the format `projects/{project}/locations/{location}`. - # @param lb_traffic_extension_id [::String] - # Required. User-provided ID of the `LbTrafficExtension` resource to be - # created. - # @param lb_traffic_extension [::Google::Cloud::NetworkServices::V1::LbTrafficExtension, ::Hash] - # Required. `LbTrafficExtension` resource to be created. - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server can ignore - # the request if it has already been completed. The server guarantees - # that for 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server ignores the second request This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # - # @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_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::DepService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::CreateLbTrafficExtensionRequest.new - # - # # Call the create_lb_traffic_extension method. - # result = client.create_lb_traffic_extension 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_lb_traffic_extension request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::CreateLbTrafficExtensionRequest - - # Converts hash 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_lb_traffic_extension.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::NetworkServices::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_lb_traffic_extension.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_lb_traffic_extension.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dep_service_stub.call_rpc :create_lb_traffic_extension, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the parameters of the specified `LbTrafficExtension` resource. - # - # @overload update_lb_traffic_extension(request, options = nil) - # Pass arguments to `update_lb_traffic_extension` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::UpdateLbTrafficExtensionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::UpdateLbTrafficExtensionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_lb_traffic_extension(update_mask: nil, lb_traffic_extension: nil, request_id: nil) - # Pass arguments to `update_lb_traffic_extension` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. Used to specify the fields to be overwritten in the - # `LbTrafficExtension` resource by the update. - # The fields specified in the `update_mask` are relative to the resource, not - # the full request. A field is overwritten if it is in the mask. If the - # user does not specify a mask, then all fields are overwritten. - # @param lb_traffic_extension [::Google::Cloud::NetworkServices::V1::LbTrafficExtension, ::Hash] - # Required. `LbTrafficExtension` resource being updated. - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server can ignore - # the request if it has already been completed. The server guarantees - # that for 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server ignores the second request This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # - # @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_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::DepService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::UpdateLbTrafficExtensionRequest.new - # - # # Call the update_lb_traffic_extension method. - # result = client.update_lb_traffic_extension 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_lb_traffic_extension request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::UpdateLbTrafficExtensionRequest - - # Converts hash 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_lb_traffic_extension.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::NetworkServices::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.lb_traffic_extension&.name - header_params["lb_traffic_extension.name"] = request.lb_traffic_extension.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_lb_traffic_extension.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_lb_traffic_extension.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dep_service_stub.call_rpc :update_lb_traffic_extension, 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 the specified `LbTrafficExtension` resource. - # - # @overload delete_lb_traffic_extension(request, options = nil) - # Pass arguments to `delete_lb_traffic_extension` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::DeleteLbTrafficExtensionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::DeleteLbTrafficExtensionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_lb_traffic_extension(name: nil, request_id: nil) - # Pass arguments to `delete_lb_traffic_extension` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the `LbTrafficExtension` resource to delete. Must be - # in the format - # `projects/{project}/locations/{location}/lbTrafficExtensions/{lb_traffic_extension}`. - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server can ignore - # the request if it has already been completed. The server guarantees - # that for 60 minutes after the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server ignores the second request This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # - # @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_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::DepService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::DeleteLbTrafficExtensionRequest.new - # - # # Call the delete_lb_traffic_extension method. - # result = client.delete_lb_traffic_extension 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_lb_traffic_extension request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::DeleteLbTrafficExtensionRequest - - # Converts hash 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_lb_traffic_extension.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::NetworkServices::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_lb_traffic_extension.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_lb_traffic_extension.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dep_service_stub.call_rpc :delete_lb_traffic_extension, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists `LbRouteExtension` resources in a given project and location. - # - # @overload list_lb_route_extensions(request, options = nil) - # Pass arguments to `list_lb_route_extensions` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::ListLbRouteExtensionsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::ListLbRouteExtensionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_lb_route_extensions(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_lb_route_extensions` via keyword arguments. Note that at - # least one keyword argument is 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 project and location from which the `LbRouteExtension` - # resources are listed. These values are specified in the following format: - # `projects/{project}/locations/{location}`. - # @param page_size [::Integer] - # Optional. Requested page size. The server might return fewer items than - # requested. If unspecified, the server picks an appropriate default. - # @param page_token [::String] - # Optional. A token identifying a page of results that the server returns. - # @param filter [::String] - # Optional. Filtering results. - # @param order_by [::String] - # Optional. Hint about how to order the results. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::NetworkServices::V1::LbRouteExtension>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::NetworkServices::V1::LbRouteExtension>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/network_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::DepService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::ListLbRouteExtensionsRequest.new - # - # # Call the list_lb_route_extensions method. - # result = client.list_lb_route_extensions 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::NetworkServices::V1::LbRouteExtension. - # p item - # end - # - def list_lb_route_extensions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::ListLbRouteExtensionsRequest - - # Converts hash 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_lb_route_extensions.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::NetworkServices::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_lb_route_extensions.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_lb_route_extensions.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dep_service_stub.call_rpc :list_lb_route_extensions, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @dep_service_stub, :list_lb_route_extensions, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets details of the specified `LbRouteExtension` resource. - # - # @overload get_lb_route_extension(request, options = nil) - # Pass arguments to `get_lb_route_extension` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::GetLbRouteExtensionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::GetLbRouteExtensionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_lb_route_extension(name: nil) - # Pass arguments to `get_lb_route_extension` via keyword arguments. Note that at - # least one keyword argument is 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. A name of the `LbRouteExtension` resource to get. Must be in the - # format - # `projects/{project}/locations/{location}/lbRouteExtensions/{lb_route_extension}`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::NetworkServices::V1::LbRouteExtension] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::NetworkServices::V1::LbRouteExtension] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/network_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::DepService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::GetLbRouteExtensionRequest.new - # - # # Call the get_lb_route_extension method. - # result = client.get_lb_route_extension request - # - # # The returned object is of type Google::Cloud::NetworkServices::V1::LbRouteExtension. - # p result - # - def get_lb_route_extension request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::GetLbRouteExtensionRequest - - # Converts hash 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_lb_route_extension.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::NetworkServices::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_lb_route_extension.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_lb_route_extension.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dep_service_stub.call_rpc :get_lb_route_extension, 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 `LbRouteExtension` resource in a given project and location. - # - # @overload create_lb_route_extension(request, options = nil) - # Pass arguments to `create_lb_route_extension` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::CreateLbRouteExtensionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::CreateLbRouteExtensionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_lb_route_extension(parent: nil, lb_route_extension_id: nil, lb_route_extension: nil, request_id: nil) - # Pass arguments to `create_lb_route_extension` via keyword arguments. Note that at - # least one keyword argument is 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 `LbRouteExtension` resource. Must be - # in the format `projects/{project}/locations/{location}`. - # @param lb_route_extension_id [::String] - # Required. User-provided ID of the `LbRouteExtension` resource to be - # created. - # @param lb_route_extension [::Google::Cloud::NetworkServices::V1::LbRouteExtension, ::Hash] - # Required. `LbRouteExtension` resource to be created. - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server can ignore - # the request if it has already been completed. The server guarantees - # that for 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server ignores the second request This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # - # @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_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::DepService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::CreateLbRouteExtensionRequest.new - # - # # Call the create_lb_route_extension method. - # result = client.create_lb_route_extension 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_lb_route_extension request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::CreateLbRouteExtensionRequest - - # Converts hash 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_lb_route_extension.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::NetworkServices::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_lb_route_extension.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_lb_route_extension.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dep_service_stub.call_rpc :create_lb_route_extension, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the parameters of the specified `LbRouteExtension` resource. - # - # @overload update_lb_route_extension(request, options = nil) - # Pass arguments to `update_lb_route_extension` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::UpdateLbRouteExtensionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::UpdateLbRouteExtensionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_lb_route_extension(update_mask: nil, lb_route_extension: nil, request_id: nil) - # Pass arguments to `update_lb_route_extension` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. Used to specify the fields to be overwritten in the - # `LbRouteExtension` resource by the update. - # The fields specified in the `update_mask` are relative to the resource, not - # the full request. A field is overwritten if it is in the mask. If the - # user does not specify a mask, then all fields are overwritten. - # @param lb_route_extension [::Google::Cloud::NetworkServices::V1::LbRouteExtension, ::Hash] - # Required. `LbRouteExtension` resource being updated. - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server can ignore - # the request if it has already been completed. The server guarantees - # that for 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server ignores the second request This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # - # @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_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::DepService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::UpdateLbRouteExtensionRequest.new - # - # # Call the update_lb_route_extension method. - # result = client.update_lb_route_extension 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_lb_route_extension request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::UpdateLbRouteExtensionRequest - - # Converts hash 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_lb_route_extension.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::NetworkServices::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.lb_route_extension&.name - header_params["lb_route_extension.name"] = request.lb_route_extension.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_lb_route_extension.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_lb_route_extension.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dep_service_stub.call_rpc :update_lb_route_extension, 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 the specified `LbRouteExtension` resource. - # - # @overload delete_lb_route_extension(request, options = nil) - # Pass arguments to `delete_lb_route_extension` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::DeleteLbRouteExtensionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::DeleteLbRouteExtensionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_lb_route_extension(name: nil, request_id: nil) - # Pass arguments to `delete_lb_route_extension` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the `LbRouteExtension` resource to delete. Must be in - # the format - # `projects/{project}/locations/{location}/lbRouteExtensions/{lb_route_extension}`. - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server can ignore - # the request if it has already been completed. The server guarantees - # that for 60 minutes after the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server ignores the second request This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # - # @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_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::DepService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::DeleteLbRouteExtensionRequest.new - # - # # Call the delete_lb_route_extension method. - # result = client.delete_lb_route_extension 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_lb_route_extension request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::DeleteLbRouteExtensionRequest - - # Converts hash 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_lb_route_extension.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::NetworkServices::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_lb_route_extension.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_lb_route_extension.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dep_service_stub.call_rpc :delete_lb_route_extension, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists `LbEdgeExtension` resources in a given project and location. - # - # @overload list_lb_edge_extensions(request, options = nil) - # Pass arguments to `list_lb_edge_extensions` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::ListLbEdgeExtensionsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::ListLbEdgeExtensionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_lb_edge_extensions(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_lb_edge_extensions` via keyword arguments. Note that at - # least one keyword argument is 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 project and location from which the `LbEdgeExtension` - # resources are listed. These values are specified in the following format: - # `projects/{project}/locations/{location}`. - # @param page_size [::Integer] - # Optional. Requested page size. The server might return fewer items than - # requested. If unspecified, the server picks an appropriate default. - # @param page_token [::String] - # Optional. A token identifying a page of results that the server returns. - # @param filter [::String] - # Optional. Filtering results. - # @param order_by [::String] - # Optional. Hint about how to order the results. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::NetworkServices::V1::LbEdgeExtension>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::NetworkServices::V1::LbEdgeExtension>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/network_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::DepService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::ListLbEdgeExtensionsRequest.new - # - # # Call the list_lb_edge_extensions method. - # result = client.list_lb_edge_extensions 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::NetworkServices::V1::LbEdgeExtension. - # p item - # end - # - def list_lb_edge_extensions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::ListLbEdgeExtensionsRequest - - # Converts hash 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_lb_edge_extensions.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::NetworkServices::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_lb_edge_extensions.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_lb_edge_extensions.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dep_service_stub.call_rpc :list_lb_edge_extensions, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @dep_service_stub, :list_lb_edge_extensions, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets details of the specified `LbEdgeExtension` resource. - # - # @overload get_lb_edge_extension(request, options = nil) - # Pass arguments to `get_lb_edge_extension` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::GetLbEdgeExtensionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::GetLbEdgeExtensionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_lb_edge_extension(name: nil) - # Pass arguments to `get_lb_edge_extension` via keyword arguments. Note that at - # least one keyword argument is 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. A name of the `LbEdgeExtension` resource to get. Must be in the - # format - # `projects/{project}/locations/{location}/lbEdgeExtensions/{lb_edge_extension}`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::NetworkServices::V1::LbEdgeExtension] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::NetworkServices::V1::LbEdgeExtension] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/network_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::DepService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::GetLbEdgeExtensionRequest.new - # - # # Call the get_lb_edge_extension method. - # result = client.get_lb_edge_extension request - # - # # The returned object is of type Google::Cloud::NetworkServices::V1::LbEdgeExtension. - # p result - # - def get_lb_edge_extension request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::GetLbEdgeExtensionRequest - - # Converts hash 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_lb_edge_extension.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::NetworkServices::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_lb_edge_extension.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_lb_edge_extension.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dep_service_stub.call_rpc :get_lb_edge_extension, 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 `LbEdgeExtension` resource in a given project and location. - # - # @overload create_lb_edge_extension(request, options = nil) - # Pass arguments to `create_lb_edge_extension` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::CreateLbEdgeExtensionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::CreateLbEdgeExtensionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_lb_edge_extension(parent: nil, lb_edge_extension_id: nil, lb_edge_extension: nil, request_id: nil) - # Pass arguments to `create_lb_edge_extension` via keyword arguments. Note that at - # least one keyword argument is 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 `LbEdgeExtension` resource. Must be in - # the format `projects/{project}/locations/{location}`. - # @param lb_edge_extension_id [::String] - # Required. User-provided ID of the `LbEdgeExtension` resource to be created. - # @param lb_edge_extension [::Google::Cloud::NetworkServices::V1::LbEdgeExtension, ::Hash] - # Required. `LbEdgeExtension` resource to be created. - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server can ignore - # the request if it has already been completed. The server guarantees - # that for 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server ignores the second request This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # - # @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_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::DepService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::CreateLbEdgeExtensionRequest.new - # - # # Call the create_lb_edge_extension method. - # result = client.create_lb_edge_extension 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_lb_edge_extension request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::CreateLbEdgeExtensionRequest - - # Converts hash 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_lb_edge_extension.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::NetworkServices::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_lb_edge_extension.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_lb_edge_extension.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dep_service_stub.call_rpc :create_lb_edge_extension, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the parameters of the specified `LbEdgeExtension` resource. - # - # @overload update_lb_edge_extension(request, options = nil) - # Pass arguments to `update_lb_edge_extension` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::UpdateLbEdgeExtensionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::UpdateLbEdgeExtensionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_lb_edge_extension(update_mask: nil, lb_edge_extension: nil, request_id: nil) - # Pass arguments to `update_lb_edge_extension` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. Used to specify the fields to be overwritten in the - # `LbEdgeExtension` resource by the update. - # The fields specified in the `update_mask` are relative to the resource, not - # the full request. A field is overwritten if it is in the mask. If the - # user does not specify a mask, then all fields are overwritten. - # @param lb_edge_extension [::Google::Cloud::NetworkServices::V1::LbEdgeExtension, ::Hash] - # Required. `LbEdgeExtension` resource being updated. - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server can ignore - # the request if it has already been completed. The server guarantees - # that for 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server ignores the second request This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # - # @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_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::DepService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::UpdateLbEdgeExtensionRequest.new - # - # # Call the update_lb_edge_extension method. - # result = client.update_lb_edge_extension 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_lb_edge_extension request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::UpdateLbEdgeExtensionRequest - - # Converts hash 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_lb_edge_extension.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::NetworkServices::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.lb_edge_extension&.name - header_params["lb_edge_extension.name"] = request.lb_edge_extension.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_lb_edge_extension.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_lb_edge_extension.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dep_service_stub.call_rpc :update_lb_edge_extension, 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 the specified `LbEdgeExtension` resource. - # - # @overload delete_lb_edge_extension(request, options = nil) - # Pass arguments to `delete_lb_edge_extension` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::DeleteLbEdgeExtensionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::DeleteLbEdgeExtensionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_lb_edge_extension(name: nil, request_id: nil) - # Pass arguments to `delete_lb_edge_extension` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the `LbEdgeExtension` resource to delete. Must be in - # the format - # `projects/{project}/locations/{location}/lbEdgeExtensions/{lb_edge_extension}`. - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server can ignore - # the request if it has already been completed. The server guarantees - # that for 60 minutes after the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server ignores the second request This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # - # @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_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::DepService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::DeleteLbEdgeExtensionRequest.new - # - # # Call the delete_lb_edge_extension method. - # result = client.delete_lb_edge_extension 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_lb_edge_extension request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::DeleteLbEdgeExtensionRequest - - # Converts hash 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_lb_edge_extension.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::NetworkServices::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_lb_edge_extension.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_lb_edge_extension.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dep_service_stub.call_rpc :delete_lb_edge_extension, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists `AuthzExtension` resources in a given project and location. - # - # @overload list_authz_extensions(request, options = nil) - # Pass arguments to `list_authz_extensions` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::ListAuthzExtensionsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::ListAuthzExtensionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_authz_extensions(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_authz_extensions` via keyword arguments. Note that at - # least one keyword argument is 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 project and location from which the `AuthzExtension` - # resources are listed. These values are specified in the following format: - # `projects/{project}/locations/{location}`. - # @param page_size [::Integer] - # Optional. Requested page size. The server might return fewer items than - # requested. If unspecified, the server picks an appropriate default. - # @param page_token [::String] - # Optional. A token identifying a page of results that the server returns. - # @param filter [::String] - # Optional. Filtering results. - # @param order_by [::String] - # Optional. Hint about how to order the results. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::NetworkServices::V1::AuthzExtension>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::NetworkServices::V1::AuthzExtension>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/network_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::DepService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::ListAuthzExtensionsRequest.new - # - # # Call the list_authz_extensions method. - # result = client.list_authz_extensions 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::NetworkServices::V1::AuthzExtension. - # p item - # end - # - def list_authz_extensions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::ListAuthzExtensionsRequest - - # Converts hash 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_authz_extensions.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::NetworkServices::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_authz_extensions.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_authz_extensions.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dep_service_stub.call_rpc :list_authz_extensions, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @dep_service_stub, :list_authz_extensions, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets details of the specified `AuthzExtension` resource. - # - # @overload get_authz_extension(request, options = nil) - # Pass arguments to `get_authz_extension` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::GetAuthzExtensionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::GetAuthzExtensionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_authz_extension(name: nil) - # Pass arguments to `get_authz_extension` via keyword arguments. Note that at - # least one keyword argument is 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. A name of the `AuthzExtension` resource to get. Must be in - # the format - # `projects/{project}/locations/{location}/authzExtensions/{authz_extension}`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::NetworkServices::V1::AuthzExtension] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::NetworkServices::V1::AuthzExtension] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/network_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::DepService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::GetAuthzExtensionRequest.new - # - # # Call the get_authz_extension method. - # result = client.get_authz_extension request - # - # # The returned object is of type Google::Cloud::NetworkServices::V1::AuthzExtension. - # p result - # - def get_authz_extension request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::GetAuthzExtensionRequest - - # Converts hash 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_authz_extension.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::NetworkServices::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_authz_extension.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_authz_extension.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dep_service_stub.call_rpc :get_authz_extension, 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 `AuthzExtension` resource in a given project - # and location. - # - # @overload create_authz_extension(request, options = nil) - # Pass arguments to `create_authz_extension` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::CreateAuthzExtensionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::CreateAuthzExtensionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_authz_extension(parent: nil, authz_extension_id: nil, authz_extension: nil, request_id: nil) - # Pass arguments to `create_authz_extension` via keyword arguments. Note that at - # least one keyword argument is 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 `AuthzExtension` resource. Must - # be in the format `projects/{project}/locations/{location}`. - # @param authz_extension_id [::String] - # Required. User-provided ID of the `AuthzExtension` resource to be - # created. - # @param authz_extension [::Google::Cloud::NetworkServices::V1::AuthzExtension, ::Hash] - # Required. `AuthzExtension` resource to be created. - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server can ignore - # the request if it has already been completed. The server guarantees - # that for 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server ignores the second request This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # - # @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_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::DepService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::CreateAuthzExtensionRequest.new - # - # # Call the create_authz_extension method. - # result = client.create_authz_extension 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_authz_extension request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::CreateAuthzExtensionRequest - - # Converts hash 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_authz_extension.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::NetworkServices::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_authz_extension.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_authz_extension.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dep_service_stub.call_rpc :create_authz_extension, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the parameters of the specified `AuthzExtension` - # resource. - # - # @overload update_authz_extension(request, options = nil) - # Pass arguments to `update_authz_extension` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::UpdateAuthzExtensionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::UpdateAuthzExtensionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_authz_extension(update_mask: nil, authz_extension: nil, request_id: nil) - # Pass arguments to `update_authz_extension` via keyword arguments. Note that at - # least one keyword argument is 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. Used to specify the fields to be overwritten in the - # `AuthzExtension` resource by the update. - # The fields specified in the `update_mask` are relative to the resource, not - # the full request. A field is overwritten if it is in the mask. If the - # user does not specify a mask, then all fields are overwritten. - # @param authz_extension [::Google::Cloud::NetworkServices::V1::AuthzExtension, ::Hash] - # Required. `AuthzExtension` resource being updated. - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server can ignore - # the request if it has already been completed. The server guarantees - # that for 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server ignores the second request This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # - # @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_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::DepService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::UpdateAuthzExtensionRequest.new - # - # # Call the update_authz_extension method. - # result = client.update_authz_extension 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_authz_extension request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::UpdateAuthzExtensionRequest - - # Converts hash 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_authz_extension.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::NetworkServices::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.authz_extension&.name - header_params["authz_extension.name"] = request.authz_extension.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_authz_extension.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_authz_extension.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dep_service_stub.call_rpc :update_authz_extension, 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 the specified `AuthzExtension` resource. - # - # @overload delete_authz_extension(request, options = nil) - # Pass arguments to `delete_authz_extension` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::DeleteAuthzExtensionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::DeleteAuthzExtensionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_authz_extension(name: nil, request_id: nil) - # Pass arguments to `delete_authz_extension` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the `AuthzExtension` resource to delete. Must - # be in the format - # `projects/{project}/locations/{location}/authzExtensions/{authz_extension}`. - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server can ignore - # the request if it has already been completed. The server guarantees - # that for 60 minutes after the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server ignores the second request This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # - # @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_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::DepService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::DeleteAuthzExtensionRequest.new - # - # # Call the delete_authz_extension method. - # result = client.delete_authz_extension 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_authz_extension request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::DeleteAuthzExtensionRequest - - # Converts hash 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_authz_extension.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::NetworkServices::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_authz_extension.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_authz_extension.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dep_service_stub.call_rpc :delete_authz_extension, 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 DepService API. - # - # This class represents the configuration for DepService, - # 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::NetworkServices::V1::DepService::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_lb_traffic_extensions to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::NetworkServices::V1::DepService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_lb_traffic_extensions.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::NetworkServices::V1::DepService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_lb_traffic_extensions.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::NetworkServices::V1::DepService::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. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `: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 = "networkservices.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 DepService 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. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_lb_traffic_extensions` - # @return [::Gapic::Config::Method] - # - attr_reader :list_lb_traffic_extensions - ## - # RPC-specific configuration for `get_lb_traffic_extension` - # @return [::Gapic::Config::Method] - # - attr_reader :get_lb_traffic_extension - ## - # RPC-specific configuration for `create_lb_traffic_extension` - # @return [::Gapic::Config::Method] - # - attr_reader :create_lb_traffic_extension - ## - # RPC-specific configuration for `update_lb_traffic_extension` - # @return [::Gapic::Config::Method] - # - attr_reader :update_lb_traffic_extension - ## - # RPC-specific configuration for `delete_lb_traffic_extension` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_lb_traffic_extension - ## - # RPC-specific configuration for `list_lb_route_extensions` - # @return [::Gapic::Config::Method] - # - attr_reader :list_lb_route_extensions - ## - # RPC-specific configuration for `get_lb_route_extension` - # @return [::Gapic::Config::Method] - # - attr_reader :get_lb_route_extension - ## - # RPC-specific configuration for `create_lb_route_extension` - # @return [::Gapic::Config::Method] - # - attr_reader :create_lb_route_extension - ## - # RPC-specific configuration for `update_lb_route_extension` - # @return [::Gapic::Config::Method] - # - attr_reader :update_lb_route_extension - ## - # RPC-specific configuration for `delete_lb_route_extension` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_lb_route_extension - ## - # RPC-specific configuration for `list_lb_edge_extensions` - # @return [::Gapic::Config::Method] - # - attr_reader :list_lb_edge_extensions - ## - # RPC-specific configuration for `get_lb_edge_extension` - # @return [::Gapic::Config::Method] - # - attr_reader :get_lb_edge_extension - ## - # RPC-specific configuration for `create_lb_edge_extension` - # @return [::Gapic::Config::Method] - # - attr_reader :create_lb_edge_extension - ## - # RPC-specific configuration for `update_lb_edge_extension` - # @return [::Gapic::Config::Method] - # - attr_reader :update_lb_edge_extension - ## - # RPC-specific configuration for `delete_lb_edge_extension` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_lb_edge_extension - ## - # RPC-specific configuration for `list_authz_extensions` - # @return [::Gapic::Config::Method] - # - attr_reader :list_authz_extensions - ## - # RPC-specific configuration for `get_authz_extension` - # @return [::Gapic::Config::Method] - # - attr_reader :get_authz_extension - ## - # RPC-specific configuration for `create_authz_extension` - # @return [::Gapic::Config::Method] - # - attr_reader :create_authz_extension - ## - # RPC-specific configuration for `update_authz_extension` - # @return [::Gapic::Config::Method] - # - attr_reader :update_authz_extension - ## - # RPC-specific configuration for `delete_authz_extension` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_authz_extension - - # @private - def initialize parent_rpcs = nil - list_lb_traffic_extensions_config = parent_rpcs.list_lb_traffic_extensions if parent_rpcs.respond_to? :list_lb_traffic_extensions - @list_lb_traffic_extensions = ::Gapic::Config::Method.new list_lb_traffic_extensions_config - get_lb_traffic_extension_config = parent_rpcs.get_lb_traffic_extension if parent_rpcs.respond_to? :get_lb_traffic_extension - @get_lb_traffic_extension = ::Gapic::Config::Method.new get_lb_traffic_extension_config - create_lb_traffic_extension_config = parent_rpcs.create_lb_traffic_extension if parent_rpcs.respond_to? :create_lb_traffic_extension - @create_lb_traffic_extension = ::Gapic::Config::Method.new create_lb_traffic_extension_config - update_lb_traffic_extension_config = parent_rpcs.update_lb_traffic_extension if parent_rpcs.respond_to? :update_lb_traffic_extension - @update_lb_traffic_extension = ::Gapic::Config::Method.new update_lb_traffic_extension_config - delete_lb_traffic_extension_config = parent_rpcs.delete_lb_traffic_extension if parent_rpcs.respond_to? :delete_lb_traffic_extension - @delete_lb_traffic_extension = ::Gapic::Config::Method.new delete_lb_traffic_extension_config - list_lb_route_extensions_config = parent_rpcs.list_lb_route_extensions if parent_rpcs.respond_to? :list_lb_route_extensions - @list_lb_route_extensions = ::Gapic::Config::Method.new list_lb_route_extensions_config - get_lb_route_extension_config = parent_rpcs.get_lb_route_extension if parent_rpcs.respond_to? :get_lb_route_extension - @get_lb_route_extension = ::Gapic::Config::Method.new get_lb_route_extension_config - create_lb_route_extension_config = parent_rpcs.create_lb_route_extension if parent_rpcs.respond_to? :create_lb_route_extension - @create_lb_route_extension = ::Gapic::Config::Method.new create_lb_route_extension_config - update_lb_route_extension_config = parent_rpcs.update_lb_route_extension if parent_rpcs.respond_to? :update_lb_route_extension - @update_lb_route_extension = ::Gapic::Config::Method.new update_lb_route_extension_config - delete_lb_route_extension_config = parent_rpcs.delete_lb_route_extension if parent_rpcs.respond_to? :delete_lb_route_extension - @delete_lb_route_extension = ::Gapic::Config::Method.new delete_lb_route_extension_config - list_lb_edge_extensions_config = parent_rpcs.list_lb_edge_extensions if parent_rpcs.respond_to? :list_lb_edge_extensions - @list_lb_edge_extensions = ::Gapic::Config::Method.new list_lb_edge_extensions_config - get_lb_edge_extension_config = parent_rpcs.get_lb_edge_extension if parent_rpcs.respond_to? :get_lb_edge_extension - @get_lb_edge_extension = ::Gapic::Config::Method.new get_lb_edge_extension_config - create_lb_edge_extension_config = parent_rpcs.create_lb_edge_extension if parent_rpcs.respond_to? :create_lb_edge_extension - @create_lb_edge_extension = ::Gapic::Config::Method.new create_lb_edge_extension_config - update_lb_edge_extension_config = parent_rpcs.update_lb_edge_extension if parent_rpcs.respond_to? :update_lb_edge_extension - @update_lb_edge_extension = ::Gapic::Config::Method.new update_lb_edge_extension_config - delete_lb_edge_extension_config = parent_rpcs.delete_lb_edge_extension if parent_rpcs.respond_to? :delete_lb_edge_extension - @delete_lb_edge_extension = ::Gapic::Config::Method.new delete_lb_edge_extension_config - list_authz_extensions_config = parent_rpcs.list_authz_extensions if parent_rpcs.respond_to? :list_authz_extensions - @list_authz_extensions = ::Gapic::Config::Method.new list_authz_extensions_config - get_authz_extension_config = parent_rpcs.get_authz_extension if parent_rpcs.respond_to? :get_authz_extension - @get_authz_extension = ::Gapic::Config::Method.new get_authz_extension_config - create_authz_extension_config = parent_rpcs.create_authz_extension if parent_rpcs.respond_to? :create_authz_extension - @create_authz_extension = ::Gapic::Config::Method.new create_authz_extension_config - update_authz_extension_config = parent_rpcs.update_authz_extension if parent_rpcs.respond_to? :update_authz_extension - @update_authz_extension = ::Gapic::Config::Method.new update_authz_extension_config - delete_authz_extension_config = parent_rpcs.delete_authz_extension if parent_rpcs.respond_to? :delete_authz_extension - @delete_authz_extension = ::Gapic::Config::Method.new delete_authz_extension_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/dep_service/credentials.rb b/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/dep_service/credentials.rb deleted file mode 100644 index 103a25485138..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/dep_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 NetworkServices - module V1 - module DepService - # Credentials for the DepService 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_services-v1/lib/google/cloud/network_services/v1/dep_service/operations.rb b/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/dep_service/operations.rb deleted file mode 100644 index b4f64b0b9b5f..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/dep_service/operations.rb +++ /dev/null @@ -1,843 +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 NetworkServices - module V1 - module DepService - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "networkservices.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the DepService 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 DepService 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::NetworkServices::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::NetworkServices::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::NetworkServices::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::NetworkServices::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::NetworkServices::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. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `: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 = "networkservices.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. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `: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_services-v1/lib/google/cloud/network_services/v1/dep_service/paths.rb b/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/dep_service/paths.rb deleted file mode 100644 index 72e3552bd4e6..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/dep_service/paths.rb +++ /dev/null @@ -1,126 +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 NetworkServices - module V1 - module DepService - # Path helper methods for the DepService API. - module Paths - ## - # Create a fully-qualified AuthzExtension resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/authzExtensions/{authz_extension}` - # - # @param project [String] - # @param location [String] - # @param authz_extension [String] - # - # @return [::String] - def authz_extension_path project:, location:, authz_extension: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/authzExtensions/#{authz_extension}" - end - - ## - # Create a fully-qualified LbEdgeExtension resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/lbEdgeExtensions/{lb_edge_extension}` - # - # @param project [String] - # @param location [String] - # @param lb_edge_extension [String] - # - # @return [::String] - def lb_edge_extension_path project:, location:, lb_edge_extension: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/lbEdgeExtensions/#{lb_edge_extension}" - end - - ## - # Create a fully-qualified LbRouteExtension resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/lbRouteExtensions/{lb_route_extension}` - # - # @param project [String] - # @param location [String] - # @param lb_route_extension [String] - # - # @return [::String] - def lb_route_extension_path project:, location:, lb_route_extension: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/lbRouteExtensions/#{lb_route_extension}" - end - - ## - # Create a fully-qualified LbTrafficExtension resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/lbTrafficExtensions/{lb_traffic_extension}` - # - # @param project [String] - # @param location [String] - # @param lb_traffic_extension [String] - # - # @return [::String] - def lb_traffic_extension_path project:, location:, lb_traffic_extension: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/lbTrafficExtensions/#{lb_traffic_extension}" - end - - ## - # Create a fully-qualified Location resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}` - # - # @param project [String] - # @param location [String] - # - # @return [::String] - def location_path project:, location: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - - "projects/#{project}/locations/#{location}" - end - - extend self - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/dep_service/rest.rb b/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/dep_service/rest.rb deleted file mode 100644 index 064a2772797b..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/dep_service/rest.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/network_services/v1/version" -require "google/cloud/network_services/v1/bindings_override" - -require "google/cloud/network_services/v1/dep_service/credentials" -require "google/cloud/network_services/v1/dep_service/paths" -require "google/cloud/network_services/v1/dep_service/rest/operations" -require "google/cloud/network_services/v1/dep_service/rest/client" - -module Google - module Cloud - module NetworkServices - module V1 - ## - # Service describing handlers for resources. - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/network_services/v1/dep_service/rest" - # client = ::Google::Cloud::NetworkServices::V1::DepService::Rest::Client.new - # - module DepService - # 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_services/v1/dep_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/dep_service/rest/client.rb b/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/dep_service/rest/client.rb deleted file mode 100644 index ed3ddf2e75ff..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/dep_service/rest/client.rb +++ /dev/null @@ -1,2496 +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/networkservices/v1/dep_pb" -require "google/cloud/network_services/v1/dep_service/rest/service_stub" -require "google/cloud/location/rest" -require "google/iam/v1/rest" - -module Google - module Cloud - module NetworkServices - module V1 - module DepService - module Rest - ## - # REST client for the DepService service. - # - # Service describing handlers for resources. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "networkservices.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :dep_service_stub - - ## - # Configure the DepService Client class. - # - # See {::Google::Cloud::NetworkServices::V1::DepService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all DepService clients - # ::Google::Cloud::NetworkServices::V1::DepService::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", "NetworkServices", "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 DepService 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::NetworkServices::V1::DepService::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 - @dep_service_stub.universe_domain - end - - ## - # Create a new DepService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::NetworkServices::V1::DepService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::NetworkServices::V1::DepService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the DepService 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::NetworkServices::V1::DepService::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 - - @dep_service_stub = ::Google::Cloud::NetworkServices::V1::DepService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @dep_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 = @dep_service_stub.endpoint - config.universe_domain = @dep_service_stub.universe_domain - config.bindings_override = @config.bindings_override - config.logger = @dep_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 = @dep_service_stub.endpoint - config.universe_domain = @dep_service_stub.universe_domain - config.bindings_override = @config.bindings_override - config.logger = @dep_service_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::NetworkServices::V1::DepService::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 - @dep_service_stub.logger - end - - # Service calls - - ## - # Lists `LbTrafficExtension` resources in a given project and location. - # - # @overload list_lb_traffic_extensions(request, options = nil) - # Pass arguments to `list_lb_traffic_extensions` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::ListLbTrafficExtensionsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::ListLbTrafficExtensionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_lb_traffic_extensions(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_lb_traffic_extensions` via keyword arguments. Note that at - # least one keyword argument is 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 project and location from which the `LbTrafficExtension` - # resources are listed. These values are specified in the following format: - # `projects/{project}/locations/{location}`. - # @param page_size [::Integer] - # Optional. Requested page size. The server might return fewer items than - # requested. If unspecified, the server picks an appropriate default. - # @param page_token [::String] - # Optional. A token identifying a page of results that the server returns. - # @param filter [::String] - # Optional. Filtering results. - # @param order_by [::String] - # Optional. Hint about how to order the results. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::LbTrafficExtension>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::LbTrafficExtension>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/network_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::DepService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::ListLbTrafficExtensionsRequest.new - # - # # Call the list_lb_traffic_extensions method. - # result = client.list_lb_traffic_extensions 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::NetworkServices::V1::LbTrafficExtension. - # p item - # end - # - def list_lb_traffic_extensions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::ListLbTrafficExtensionsRequest - - # Converts hash 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_lb_traffic_extensions.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::NetworkServices::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_lb_traffic_extensions.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_lb_traffic_extensions.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dep_service_stub.list_lb_traffic_extensions request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @dep_service_stub, :list_lb_traffic_extensions, "lb_traffic_extensions", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets details of the specified `LbTrafficExtension` resource. - # - # @overload get_lb_traffic_extension(request, options = nil) - # Pass arguments to `get_lb_traffic_extension` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::GetLbTrafficExtensionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::GetLbTrafficExtensionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_lb_traffic_extension(name: nil) - # Pass arguments to `get_lb_traffic_extension` via keyword arguments. Note that at - # least one keyword argument is 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. A name of the `LbTrafficExtension` resource to get. Must be in - # the format - # `projects/{project}/locations/{location}/lbTrafficExtensions/{lb_traffic_extension}`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::NetworkServices::V1::LbTrafficExtension] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::NetworkServices::V1::LbTrafficExtension] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/network_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::DepService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::GetLbTrafficExtensionRequest.new - # - # # Call the get_lb_traffic_extension method. - # result = client.get_lb_traffic_extension request - # - # # The returned object is of type Google::Cloud::NetworkServices::V1::LbTrafficExtension. - # p result - # - def get_lb_traffic_extension request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::GetLbTrafficExtensionRequest - - # Converts hash 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_lb_traffic_extension.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::NetworkServices::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_lb_traffic_extension.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_lb_traffic_extension.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dep_service_stub.get_lb_traffic_extension 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 `LbTrafficExtension` resource in a given project and - # location. - # - # @overload create_lb_traffic_extension(request, options = nil) - # Pass arguments to `create_lb_traffic_extension` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::CreateLbTrafficExtensionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::CreateLbTrafficExtensionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_lb_traffic_extension(parent: nil, lb_traffic_extension_id: nil, lb_traffic_extension: nil, request_id: nil) - # Pass arguments to `create_lb_traffic_extension` via keyword arguments. Note that at - # least one keyword argument is 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 `LbTrafficExtension` resource. Must be - # in the format `projects/{project}/locations/{location}`. - # @param lb_traffic_extension_id [::String] - # Required. User-provided ID of the `LbTrafficExtension` resource to be - # created. - # @param lb_traffic_extension [::Google::Cloud::NetworkServices::V1::LbTrafficExtension, ::Hash] - # Required. `LbTrafficExtension` resource to be created. - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server can ignore - # the request if it has already been completed. The server guarantees - # that for 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server ignores the second request This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @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_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::DepService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::CreateLbTrafficExtensionRequest.new - # - # # Call the create_lb_traffic_extension method. - # result = client.create_lb_traffic_extension 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_lb_traffic_extension request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::CreateLbTrafficExtensionRequest - - # Converts hash 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_lb_traffic_extension.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::NetworkServices::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_lb_traffic_extension.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_lb_traffic_extension.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dep_service_stub.create_lb_traffic_extension request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the parameters of the specified `LbTrafficExtension` resource. - # - # @overload update_lb_traffic_extension(request, options = nil) - # Pass arguments to `update_lb_traffic_extension` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::UpdateLbTrafficExtensionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::UpdateLbTrafficExtensionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_lb_traffic_extension(update_mask: nil, lb_traffic_extension: nil, request_id: nil) - # Pass arguments to `update_lb_traffic_extension` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. Used to specify the fields to be overwritten in the - # `LbTrafficExtension` resource by the update. - # The fields specified in the `update_mask` are relative to the resource, not - # the full request. A field is overwritten if it is in the mask. If the - # user does not specify a mask, then all fields are overwritten. - # @param lb_traffic_extension [::Google::Cloud::NetworkServices::V1::LbTrafficExtension, ::Hash] - # Required. `LbTrafficExtension` resource being updated. - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server can ignore - # the request if it has already been completed. The server guarantees - # that for 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server ignores the second request This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @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_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::DepService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::UpdateLbTrafficExtensionRequest.new - # - # # Call the update_lb_traffic_extension method. - # result = client.update_lb_traffic_extension 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_lb_traffic_extension request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::UpdateLbTrafficExtensionRequest - - # Converts hash 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_lb_traffic_extension.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::NetworkServices::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_lb_traffic_extension.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_lb_traffic_extension.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dep_service_stub.update_lb_traffic_extension 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 the specified `LbTrafficExtension` resource. - # - # @overload delete_lb_traffic_extension(request, options = nil) - # Pass arguments to `delete_lb_traffic_extension` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::DeleteLbTrafficExtensionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::DeleteLbTrafficExtensionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_lb_traffic_extension(name: nil, request_id: nil) - # Pass arguments to `delete_lb_traffic_extension` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the `LbTrafficExtension` resource to delete. Must be - # in the format - # `projects/{project}/locations/{location}/lbTrafficExtensions/{lb_traffic_extension}`. - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server can ignore - # the request if it has already been completed. The server guarantees - # that for 60 minutes after the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server ignores the second request This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @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_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::DepService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::DeleteLbTrafficExtensionRequest.new - # - # # Call the delete_lb_traffic_extension method. - # result = client.delete_lb_traffic_extension 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_lb_traffic_extension request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::DeleteLbTrafficExtensionRequest - - # Converts hash 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_lb_traffic_extension.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::NetworkServices::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_lb_traffic_extension.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_lb_traffic_extension.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dep_service_stub.delete_lb_traffic_extension request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists `LbRouteExtension` resources in a given project and location. - # - # @overload list_lb_route_extensions(request, options = nil) - # Pass arguments to `list_lb_route_extensions` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::ListLbRouteExtensionsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::ListLbRouteExtensionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_lb_route_extensions(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_lb_route_extensions` via keyword arguments. Note that at - # least one keyword argument is 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 project and location from which the `LbRouteExtension` - # resources are listed. These values are specified in the following format: - # `projects/{project}/locations/{location}`. - # @param page_size [::Integer] - # Optional. Requested page size. The server might return fewer items than - # requested. If unspecified, the server picks an appropriate default. - # @param page_token [::String] - # Optional. A token identifying a page of results that the server returns. - # @param filter [::String] - # Optional. Filtering results. - # @param order_by [::String] - # Optional. Hint about how to order the results. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::LbRouteExtension>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::LbRouteExtension>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/network_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::DepService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::ListLbRouteExtensionsRequest.new - # - # # Call the list_lb_route_extensions method. - # result = client.list_lb_route_extensions 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::NetworkServices::V1::LbRouteExtension. - # p item - # end - # - def list_lb_route_extensions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::ListLbRouteExtensionsRequest - - # Converts hash 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_lb_route_extensions.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::NetworkServices::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_lb_route_extensions.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_lb_route_extensions.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dep_service_stub.list_lb_route_extensions request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @dep_service_stub, :list_lb_route_extensions, "lb_route_extensions", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets details of the specified `LbRouteExtension` resource. - # - # @overload get_lb_route_extension(request, options = nil) - # Pass arguments to `get_lb_route_extension` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::GetLbRouteExtensionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::GetLbRouteExtensionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_lb_route_extension(name: nil) - # Pass arguments to `get_lb_route_extension` via keyword arguments. Note that at - # least one keyword argument is 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. A name of the `LbRouteExtension` resource to get. Must be in the - # format - # `projects/{project}/locations/{location}/lbRouteExtensions/{lb_route_extension}`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::NetworkServices::V1::LbRouteExtension] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::NetworkServices::V1::LbRouteExtension] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/network_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::DepService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::GetLbRouteExtensionRequest.new - # - # # Call the get_lb_route_extension method. - # result = client.get_lb_route_extension request - # - # # The returned object is of type Google::Cloud::NetworkServices::V1::LbRouteExtension. - # p result - # - def get_lb_route_extension request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::GetLbRouteExtensionRequest - - # Converts hash 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_lb_route_extension.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::NetworkServices::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_lb_route_extension.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_lb_route_extension.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dep_service_stub.get_lb_route_extension 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 `LbRouteExtension` resource in a given project and location. - # - # @overload create_lb_route_extension(request, options = nil) - # Pass arguments to `create_lb_route_extension` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::CreateLbRouteExtensionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::CreateLbRouteExtensionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_lb_route_extension(parent: nil, lb_route_extension_id: nil, lb_route_extension: nil, request_id: nil) - # Pass arguments to `create_lb_route_extension` via keyword arguments. Note that at - # least one keyword argument is 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 `LbRouteExtension` resource. Must be - # in the format `projects/{project}/locations/{location}`. - # @param lb_route_extension_id [::String] - # Required. User-provided ID of the `LbRouteExtension` resource to be - # created. - # @param lb_route_extension [::Google::Cloud::NetworkServices::V1::LbRouteExtension, ::Hash] - # Required. `LbRouteExtension` resource to be created. - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server can ignore - # the request if it has already been completed. The server guarantees - # that for 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server ignores the second request This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @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_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::DepService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::CreateLbRouteExtensionRequest.new - # - # # Call the create_lb_route_extension method. - # result = client.create_lb_route_extension 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_lb_route_extension request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::CreateLbRouteExtensionRequest - - # Converts hash 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_lb_route_extension.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::NetworkServices::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_lb_route_extension.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_lb_route_extension.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dep_service_stub.create_lb_route_extension request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the parameters of the specified `LbRouteExtension` resource. - # - # @overload update_lb_route_extension(request, options = nil) - # Pass arguments to `update_lb_route_extension` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::UpdateLbRouteExtensionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::UpdateLbRouteExtensionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_lb_route_extension(update_mask: nil, lb_route_extension: nil, request_id: nil) - # Pass arguments to `update_lb_route_extension` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. Used to specify the fields to be overwritten in the - # `LbRouteExtension` resource by the update. - # The fields specified in the `update_mask` are relative to the resource, not - # the full request. A field is overwritten if it is in the mask. If the - # user does not specify a mask, then all fields are overwritten. - # @param lb_route_extension [::Google::Cloud::NetworkServices::V1::LbRouteExtension, ::Hash] - # Required. `LbRouteExtension` resource being updated. - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server can ignore - # the request if it has already been completed. The server guarantees - # that for 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server ignores the second request This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @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_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::DepService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::UpdateLbRouteExtensionRequest.new - # - # # Call the update_lb_route_extension method. - # result = client.update_lb_route_extension 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_lb_route_extension request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::UpdateLbRouteExtensionRequest - - # Converts hash 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_lb_route_extension.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::NetworkServices::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_lb_route_extension.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_lb_route_extension.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dep_service_stub.update_lb_route_extension 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 the specified `LbRouteExtension` resource. - # - # @overload delete_lb_route_extension(request, options = nil) - # Pass arguments to `delete_lb_route_extension` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::DeleteLbRouteExtensionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::DeleteLbRouteExtensionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_lb_route_extension(name: nil, request_id: nil) - # Pass arguments to `delete_lb_route_extension` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the `LbRouteExtension` resource to delete. Must be in - # the format - # `projects/{project}/locations/{location}/lbRouteExtensions/{lb_route_extension}`. - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server can ignore - # the request if it has already been completed. The server guarantees - # that for 60 minutes after the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server ignores the second request This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @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_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::DepService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::DeleteLbRouteExtensionRequest.new - # - # # Call the delete_lb_route_extension method. - # result = client.delete_lb_route_extension 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_lb_route_extension request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::DeleteLbRouteExtensionRequest - - # Converts hash 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_lb_route_extension.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::NetworkServices::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_lb_route_extension.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_lb_route_extension.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dep_service_stub.delete_lb_route_extension request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists `LbEdgeExtension` resources in a given project and location. - # - # @overload list_lb_edge_extensions(request, options = nil) - # Pass arguments to `list_lb_edge_extensions` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::ListLbEdgeExtensionsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::ListLbEdgeExtensionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_lb_edge_extensions(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_lb_edge_extensions` via keyword arguments. Note that at - # least one keyword argument is 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 project and location from which the `LbEdgeExtension` - # resources are listed. These values are specified in the following format: - # `projects/{project}/locations/{location}`. - # @param page_size [::Integer] - # Optional. Requested page size. The server might return fewer items than - # requested. If unspecified, the server picks an appropriate default. - # @param page_token [::String] - # Optional. A token identifying a page of results that the server returns. - # @param filter [::String] - # Optional. Filtering results. - # @param order_by [::String] - # Optional. Hint about how to order the results. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::LbEdgeExtension>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::LbEdgeExtension>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/network_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::DepService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::ListLbEdgeExtensionsRequest.new - # - # # Call the list_lb_edge_extensions method. - # result = client.list_lb_edge_extensions 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::NetworkServices::V1::LbEdgeExtension. - # p item - # end - # - def list_lb_edge_extensions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::ListLbEdgeExtensionsRequest - - # Converts hash 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_lb_edge_extensions.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::NetworkServices::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_lb_edge_extensions.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_lb_edge_extensions.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dep_service_stub.list_lb_edge_extensions request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @dep_service_stub, :list_lb_edge_extensions, "lb_edge_extensions", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets details of the specified `LbEdgeExtension` resource. - # - # @overload get_lb_edge_extension(request, options = nil) - # Pass arguments to `get_lb_edge_extension` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::GetLbEdgeExtensionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::GetLbEdgeExtensionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_lb_edge_extension(name: nil) - # Pass arguments to `get_lb_edge_extension` via keyword arguments. Note that at - # least one keyword argument is 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. A name of the `LbEdgeExtension` resource to get. Must be in the - # format - # `projects/{project}/locations/{location}/lbEdgeExtensions/{lb_edge_extension}`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::NetworkServices::V1::LbEdgeExtension] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::NetworkServices::V1::LbEdgeExtension] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/network_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::DepService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::GetLbEdgeExtensionRequest.new - # - # # Call the get_lb_edge_extension method. - # result = client.get_lb_edge_extension request - # - # # The returned object is of type Google::Cloud::NetworkServices::V1::LbEdgeExtension. - # p result - # - def get_lb_edge_extension request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::GetLbEdgeExtensionRequest - - # Converts hash 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_lb_edge_extension.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::NetworkServices::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_lb_edge_extension.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_lb_edge_extension.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dep_service_stub.get_lb_edge_extension 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 `LbEdgeExtension` resource in a given project and location. - # - # @overload create_lb_edge_extension(request, options = nil) - # Pass arguments to `create_lb_edge_extension` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::CreateLbEdgeExtensionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::CreateLbEdgeExtensionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_lb_edge_extension(parent: nil, lb_edge_extension_id: nil, lb_edge_extension: nil, request_id: nil) - # Pass arguments to `create_lb_edge_extension` via keyword arguments. Note that at - # least one keyword argument is 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 `LbEdgeExtension` resource. Must be in - # the format `projects/{project}/locations/{location}`. - # @param lb_edge_extension_id [::String] - # Required. User-provided ID of the `LbEdgeExtension` resource to be created. - # @param lb_edge_extension [::Google::Cloud::NetworkServices::V1::LbEdgeExtension, ::Hash] - # Required. `LbEdgeExtension` resource to be created. - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server can ignore - # the request if it has already been completed. The server guarantees - # that for 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server ignores the second request This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @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_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::DepService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::CreateLbEdgeExtensionRequest.new - # - # # Call the create_lb_edge_extension method. - # result = client.create_lb_edge_extension 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_lb_edge_extension request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::CreateLbEdgeExtensionRequest - - # Converts hash 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_lb_edge_extension.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::NetworkServices::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_lb_edge_extension.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_lb_edge_extension.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dep_service_stub.create_lb_edge_extension request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the parameters of the specified `LbEdgeExtension` resource. - # - # @overload update_lb_edge_extension(request, options = nil) - # Pass arguments to `update_lb_edge_extension` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::UpdateLbEdgeExtensionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::UpdateLbEdgeExtensionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_lb_edge_extension(update_mask: nil, lb_edge_extension: nil, request_id: nil) - # Pass arguments to `update_lb_edge_extension` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. Used to specify the fields to be overwritten in the - # `LbEdgeExtension` resource by the update. - # The fields specified in the `update_mask` are relative to the resource, not - # the full request. A field is overwritten if it is in the mask. If the - # user does not specify a mask, then all fields are overwritten. - # @param lb_edge_extension [::Google::Cloud::NetworkServices::V1::LbEdgeExtension, ::Hash] - # Required. `LbEdgeExtension` resource being updated. - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server can ignore - # the request if it has already been completed. The server guarantees - # that for 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server ignores the second request This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @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_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::DepService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::UpdateLbEdgeExtensionRequest.new - # - # # Call the update_lb_edge_extension method. - # result = client.update_lb_edge_extension 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_lb_edge_extension request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::UpdateLbEdgeExtensionRequest - - # Converts hash 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_lb_edge_extension.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::NetworkServices::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_lb_edge_extension.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_lb_edge_extension.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dep_service_stub.update_lb_edge_extension 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 the specified `LbEdgeExtension` resource. - # - # @overload delete_lb_edge_extension(request, options = nil) - # Pass arguments to `delete_lb_edge_extension` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::DeleteLbEdgeExtensionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::DeleteLbEdgeExtensionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_lb_edge_extension(name: nil, request_id: nil) - # Pass arguments to `delete_lb_edge_extension` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the `LbEdgeExtension` resource to delete. Must be in - # the format - # `projects/{project}/locations/{location}/lbEdgeExtensions/{lb_edge_extension}`. - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server can ignore - # the request if it has already been completed. The server guarantees - # that for 60 minutes after the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server ignores the second request This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @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_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::DepService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::DeleteLbEdgeExtensionRequest.new - # - # # Call the delete_lb_edge_extension method. - # result = client.delete_lb_edge_extension 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_lb_edge_extension request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::DeleteLbEdgeExtensionRequest - - # Converts hash 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_lb_edge_extension.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::NetworkServices::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_lb_edge_extension.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_lb_edge_extension.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dep_service_stub.delete_lb_edge_extension request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists `AuthzExtension` resources in a given project and location. - # - # @overload list_authz_extensions(request, options = nil) - # Pass arguments to `list_authz_extensions` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::ListAuthzExtensionsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::ListAuthzExtensionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_authz_extensions(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_authz_extensions` via keyword arguments. Note that at - # least one keyword argument is 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 project and location from which the `AuthzExtension` - # resources are listed. These values are specified in the following format: - # `projects/{project}/locations/{location}`. - # @param page_size [::Integer] - # Optional. Requested page size. The server might return fewer items than - # requested. If unspecified, the server picks an appropriate default. - # @param page_token [::String] - # Optional. A token identifying a page of results that the server returns. - # @param filter [::String] - # Optional. Filtering results. - # @param order_by [::String] - # Optional. Hint about how to order the results. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::AuthzExtension>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::AuthzExtension>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/network_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::DepService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::ListAuthzExtensionsRequest.new - # - # # Call the list_authz_extensions method. - # result = client.list_authz_extensions 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::NetworkServices::V1::AuthzExtension. - # p item - # end - # - def list_authz_extensions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::ListAuthzExtensionsRequest - - # Converts hash 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_authz_extensions.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::NetworkServices::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_authz_extensions.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_authz_extensions.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dep_service_stub.list_authz_extensions request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @dep_service_stub, :list_authz_extensions, "authz_extensions", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets details of the specified `AuthzExtension` resource. - # - # @overload get_authz_extension(request, options = nil) - # Pass arguments to `get_authz_extension` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::GetAuthzExtensionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::GetAuthzExtensionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_authz_extension(name: nil) - # Pass arguments to `get_authz_extension` via keyword arguments. Note that at - # least one keyword argument is 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. A name of the `AuthzExtension` resource to get. Must be in - # the format - # `projects/{project}/locations/{location}/authzExtensions/{authz_extension}`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::NetworkServices::V1::AuthzExtension] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::NetworkServices::V1::AuthzExtension] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/network_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::DepService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::GetAuthzExtensionRequest.new - # - # # Call the get_authz_extension method. - # result = client.get_authz_extension request - # - # # The returned object is of type Google::Cloud::NetworkServices::V1::AuthzExtension. - # p result - # - def get_authz_extension request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::GetAuthzExtensionRequest - - # Converts hash 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_authz_extension.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::NetworkServices::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_authz_extension.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_authz_extension.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dep_service_stub.get_authz_extension 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 `AuthzExtension` resource in a given project - # and location. - # - # @overload create_authz_extension(request, options = nil) - # Pass arguments to `create_authz_extension` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::CreateAuthzExtensionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::CreateAuthzExtensionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_authz_extension(parent: nil, authz_extension_id: nil, authz_extension: nil, request_id: nil) - # Pass arguments to `create_authz_extension` via keyword arguments. Note that at - # least one keyword argument is 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 `AuthzExtension` resource. Must - # be in the format `projects/{project}/locations/{location}`. - # @param authz_extension_id [::String] - # Required. User-provided ID of the `AuthzExtension` resource to be - # created. - # @param authz_extension [::Google::Cloud::NetworkServices::V1::AuthzExtension, ::Hash] - # Required. `AuthzExtension` resource to be created. - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server can ignore - # the request if it has already been completed. The server guarantees - # that for 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server ignores the second request This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @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_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::DepService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::CreateAuthzExtensionRequest.new - # - # # Call the create_authz_extension method. - # result = client.create_authz_extension 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_authz_extension request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::CreateAuthzExtensionRequest - - # Converts hash 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_authz_extension.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::NetworkServices::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_authz_extension.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_authz_extension.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dep_service_stub.create_authz_extension request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the parameters of the specified `AuthzExtension` - # resource. - # - # @overload update_authz_extension(request, options = nil) - # Pass arguments to `update_authz_extension` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::UpdateAuthzExtensionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::UpdateAuthzExtensionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_authz_extension(update_mask: nil, authz_extension: nil, request_id: nil) - # Pass arguments to `update_authz_extension` via keyword arguments. Note that at - # least one keyword argument is 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. Used to specify the fields to be overwritten in the - # `AuthzExtension` resource by the update. - # The fields specified in the `update_mask` are relative to the resource, not - # the full request. A field is overwritten if it is in the mask. If the - # user does not specify a mask, then all fields are overwritten. - # @param authz_extension [::Google::Cloud::NetworkServices::V1::AuthzExtension, ::Hash] - # Required. `AuthzExtension` resource being updated. - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server can ignore - # the request if it has already been completed. The server guarantees - # that for 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server ignores the second request This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @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_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::DepService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::UpdateAuthzExtensionRequest.new - # - # # Call the update_authz_extension method. - # result = client.update_authz_extension 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_authz_extension request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::UpdateAuthzExtensionRequest - - # Converts hash 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_authz_extension.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::NetworkServices::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_authz_extension.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_authz_extension.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dep_service_stub.update_authz_extension 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 the specified `AuthzExtension` resource. - # - # @overload delete_authz_extension(request, options = nil) - # Pass arguments to `delete_authz_extension` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::DeleteAuthzExtensionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::DeleteAuthzExtensionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_authz_extension(name: nil, request_id: nil) - # Pass arguments to `delete_authz_extension` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the `AuthzExtension` resource to delete. Must - # be in the format - # `projects/{project}/locations/{location}/authzExtensions/{authz_extension}`. - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server can ignore - # the request if it has already been completed. The server guarantees - # that for 60 minutes after the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server ignores the second request This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @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_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::DepService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::DeleteAuthzExtensionRequest.new - # - # # Call the delete_authz_extension method. - # result = client.delete_authz_extension 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_authz_extension request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::DeleteAuthzExtensionRequest - - # Converts hash 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_authz_extension.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::NetworkServices::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_authz_extension.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_authz_extension.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dep_service_stub.delete_authz_extension 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 DepService REST API. - # - # This class represents the configuration for DepService 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::NetworkServices::V1::DepService::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_lb_traffic_extensions to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::NetworkServices::V1::DepService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_lb_traffic_extensions.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::NetworkServices::V1::DepService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_lb_traffic_extensions.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. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `: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 = "networkservices.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 DepService 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. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_lb_traffic_extensions` - # @return [::Gapic::Config::Method] - # - attr_reader :list_lb_traffic_extensions - ## - # RPC-specific configuration for `get_lb_traffic_extension` - # @return [::Gapic::Config::Method] - # - attr_reader :get_lb_traffic_extension - ## - # RPC-specific configuration for `create_lb_traffic_extension` - # @return [::Gapic::Config::Method] - # - attr_reader :create_lb_traffic_extension - ## - # RPC-specific configuration for `update_lb_traffic_extension` - # @return [::Gapic::Config::Method] - # - attr_reader :update_lb_traffic_extension - ## - # RPC-specific configuration for `delete_lb_traffic_extension` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_lb_traffic_extension - ## - # RPC-specific configuration for `list_lb_route_extensions` - # @return [::Gapic::Config::Method] - # - attr_reader :list_lb_route_extensions - ## - # RPC-specific configuration for `get_lb_route_extension` - # @return [::Gapic::Config::Method] - # - attr_reader :get_lb_route_extension - ## - # RPC-specific configuration for `create_lb_route_extension` - # @return [::Gapic::Config::Method] - # - attr_reader :create_lb_route_extension - ## - # RPC-specific configuration for `update_lb_route_extension` - # @return [::Gapic::Config::Method] - # - attr_reader :update_lb_route_extension - ## - # RPC-specific configuration for `delete_lb_route_extension` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_lb_route_extension - ## - # RPC-specific configuration for `list_lb_edge_extensions` - # @return [::Gapic::Config::Method] - # - attr_reader :list_lb_edge_extensions - ## - # RPC-specific configuration for `get_lb_edge_extension` - # @return [::Gapic::Config::Method] - # - attr_reader :get_lb_edge_extension - ## - # RPC-specific configuration for `create_lb_edge_extension` - # @return [::Gapic::Config::Method] - # - attr_reader :create_lb_edge_extension - ## - # RPC-specific configuration for `update_lb_edge_extension` - # @return [::Gapic::Config::Method] - # - attr_reader :update_lb_edge_extension - ## - # RPC-specific configuration for `delete_lb_edge_extension` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_lb_edge_extension - ## - # RPC-specific configuration for `list_authz_extensions` - # @return [::Gapic::Config::Method] - # - attr_reader :list_authz_extensions - ## - # RPC-specific configuration for `get_authz_extension` - # @return [::Gapic::Config::Method] - # - attr_reader :get_authz_extension - ## - # RPC-specific configuration for `create_authz_extension` - # @return [::Gapic::Config::Method] - # - attr_reader :create_authz_extension - ## - # RPC-specific configuration for `update_authz_extension` - # @return [::Gapic::Config::Method] - # - attr_reader :update_authz_extension - ## - # RPC-specific configuration for `delete_authz_extension` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_authz_extension - - # @private - def initialize parent_rpcs = nil - list_lb_traffic_extensions_config = parent_rpcs.list_lb_traffic_extensions if parent_rpcs.respond_to? :list_lb_traffic_extensions - @list_lb_traffic_extensions = ::Gapic::Config::Method.new list_lb_traffic_extensions_config - get_lb_traffic_extension_config = parent_rpcs.get_lb_traffic_extension if parent_rpcs.respond_to? :get_lb_traffic_extension - @get_lb_traffic_extension = ::Gapic::Config::Method.new get_lb_traffic_extension_config - create_lb_traffic_extension_config = parent_rpcs.create_lb_traffic_extension if parent_rpcs.respond_to? :create_lb_traffic_extension - @create_lb_traffic_extension = ::Gapic::Config::Method.new create_lb_traffic_extension_config - update_lb_traffic_extension_config = parent_rpcs.update_lb_traffic_extension if parent_rpcs.respond_to? :update_lb_traffic_extension - @update_lb_traffic_extension = ::Gapic::Config::Method.new update_lb_traffic_extension_config - delete_lb_traffic_extension_config = parent_rpcs.delete_lb_traffic_extension if parent_rpcs.respond_to? :delete_lb_traffic_extension - @delete_lb_traffic_extension = ::Gapic::Config::Method.new delete_lb_traffic_extension_config - list_lb_route_extensions_config = parent_rpcs.list_lb_route_extensions if parent_rpcs.respond_to? :list_lb_route_extensions - @list_lb_route_extensions = ::Gapic::Config::Method.new list_lb_route_extensions_config - get_lb_route_extension_config = parent_rpcs.get_lb_route_extension if parent_rpcs.respond_to? :get_lb_route_extension - @get_lb_route_extension = ::Gapic::Config::Method.new get_lb_route_extension_config - create_lb_route_extension_config = parent_rpcs.create_lb_route_extension if parent_rpcs.respond_to? :create_lb_route_extension - @create_lb_route_extension = ::Gapic::Config::Method.new create_lb_route_extension_config - update_lb_route_extension_config = parent_rpcs.update_lb_route_extension if parent_rpcs.respond_to? :update_lb_route_extension - @update_lb_route_extension = ::Gapic::Config::Method.new update_lb_route_extension_config - delete_lb_route_extension_config = parent_rpcs.delete_lb_route_extension if parent_rpcs.respond_to? :delete_lb_route_extension - @delete_lb_route_extension = ::Gapic::Config::Method.new delete_lb_route_extension_config - list_lb_edge_extensions_config = parent_rpcs.list_lb_edge_extensions if parent_rpcs.respond_to? :list_lb_edge_extensions - @list_lb_edge_extensions = ::Gapic::Config::Method.new list_lb_edge_extensions_config - get_lb_edge_extension_config = parent_rpcs.get_lb_edge_extension if parent_rpcs.respond_to? :get_lb_edge_extension - @get_lb_edge_extension = ::Gapic::Config::Method.new get_lb_edge_extension_config - create_lb_edge_extension_config = parent_rpcs.create_lb_edge_extension if parent_rpcs.respond_to? :create_lb_edge_extension - @create_lb_edge_extension = ::Gapic::Config::Method.new create_lb_edge_extension_config - update_lb_edge_extension_config = parent_rpcs.update_lb_edge_extension if parent_rpcs.respond_to? :update_lb_edge_extension - @update_lb_edge_extension = ::Gapic::Config::Method.new update_lb_edge_extension_config - delete_lb_edge_extension_config = parent_rpcs.delete_lb_edge_extension if parent_rpcs.respond_to? :delete_lb_edge_extension - @delete_lb_edge_extension = ::Gapic::Config::Method.new delete_lb_edge_extension_config - list_authz_extensions_config = parent_rpcs.list_authz_extensions if parent_rpcs.respond_to? :list_authz_extensions - @list_authz_extensions = ::Gapic::Config::Method.new list_authz_extensions_config - get_authz_extension_config = parent_rpcs.get_authz_extension if parent_rpcs.respond_to? :get_authz_extension - @get_authz_extension = ::Gapic::Config::Method.new get_authz_extension_config - create_authz_extension_config = parent_rpcs.create_authz_extension if parent_rpcs.respond_to? :create_authz_extension - @create_authz_extension = ::Gapic::Config::Method.new create_authz_extension_config - update_authz_extension_config = parent_rpcs.update_authz_extension if parent_rpcs.respond_to? :update_authz_extension - @update_authz_extension = ::Gapic::Config::Method.new update_authz_extension_config - delete_authz_extension_config = parent_rpcs.delete_authz_extension if parent_rpcs.respond_to? :delete_authz_extension - @delete_authz_extension = ::Gapic::Config::Method.new delete_authz_extension_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_services-v1/lib/google/cloud/network_services/v1/dep_service/rest/operations.rb b/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/dep_service/rest/operations.rb deleted file mode 100644 index cfac5b24bc2c..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/dep_service/rest/operations.rb +++ /dev/null @@ -1,927 +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 NetworkServices - module V1 - module DepService - module Rest - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "networkservices.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the DepService 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 DepService 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::NetworkServices::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::NetworkServices::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::NetworkServices::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::NetworkServices::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. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `: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 = "networkservices.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. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_operations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_operations - ## - # RPC-specific configuration for `get_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_operation - ## - # RPC-specific configuration for `delete_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_operation - ## - # RPC-specific configuration for `cancel_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_operation - - # @private - def initialize parent_rpcs = nil - list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations - @list_operations = ::Gapic::Config::Method.new list_operations_config - get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation - @get_operation = ::Gapic::Config::Method.new get_operation_config - delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation - @delete_operation = ::Gapic::Config::Method.new delete_operation_config - cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation - @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config - - yield self if block_given? - end - end - end - end - - ## - # @private - # REST service stub for the Longrunning Operations API. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - class OperationsServiceStub - def initialize endpoint:, endpoint_template:, universe_domain:, credentials: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials - end - - ## - # Baseline implementation for the list_operations REST call - # - # @param request_pb [::Google::Longrunning::ListOperationsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::ListOperationsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::ListOperationsResponse] - # A result object deserialized from the server's reply - def list_operations request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_list_operations_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_operations", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::ListOperationsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_operation REST call - # - # @param request_pb [::Google::Longrunning::GetOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def get_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_get_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_operation REST call - # - # @param request_pb [::Google::Longrunning::DeleteOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def delete_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_delete_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the cancel_operation REST call - # - # @param request_pb [::Google::Longrunning::CancelOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def cancel_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_cancel_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "cancel_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the list_operations REST call - # - # @param request_pb [::Google::Longrunning::ListOperationsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_operations_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}/operations", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_operation REST call - # - # @param request_pb [::Google::Longrunning::GetOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_operation REST call - # - # @param request_pb [::Google::Longrunning::DeleteOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the cancel_operation REST call - # - # @param request_pb [::Google::Longrunning::CancelOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_cancel_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:cancel", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/dep_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/dep_service/rest/service_stub.rb deleted file mode 100644 index 7a87a810b6ef..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/dep_service/rest/service_stub.rb +++ /dev/null @@ -1,1309 +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/networkservices/v1/dep_pb" - -module Google - module Cloud - module NetworkServices - module V1 - module DepService - module Rest - ## - # REST service stub for the DepService 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_lb_traffic_extensions REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::ListLbTrafficExtensionsRequest] - # 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::NetworkServices::V1::ListLbTrafficExtensionsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::NetworkServices::V1::ListLbTrafficExtensionsResponse] - # A result object deserialized from the server's reply - def list_lb_traffic_extensions request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_lb_traffic_extensions_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_lb_traffic_extensions", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::NetworkServices::V1::ListLbTrafficExtensionsResponse.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_lb_traffic_extension REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::GetLbTrafficExtensionRequest] - # 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::NetworkServices::V1::LbTrafficExtension] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::NetworkServices::V1::LbTrafficExtension] - # A result object deserialized from the server's reply - def get_lb_traffic_extension request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_lb_traffic_extension_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_lb_traffic_extension", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::NetworkServices::V1::LbTrafficExtension.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_lb_traffic_extension REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::CreateLbTrafficExtensionRequest] - # 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_lb_traffic_extension request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_lb_traffic_extension_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_lb_traffic_extension", - 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_lb_traffic_extension REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::UpdateLbTrafficExtensionRequest] - # 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_lb_traffic_extension request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_lb_traffic_extension_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_lb_traffic_extension", - 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_lb_traffic_extension REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::DeleteLbTrafficExtensionRequest] - # 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_lb_traffic_extension request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_lb_traffic_extension_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_lb_traffic_extension", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_lb_route_extensions REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::ListLbRouteExtensionsRequest] - # 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::NetworkServices::V1::ListLbRouteExtensionsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::NetworkServices::V1::ListLbRouteExtensionsResponse] - # A result object deserialized from the server's reply - def list_lb_route_extensions request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_lb_route_extensions_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_lb_route_extensions", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::NetworkServices::V1::ListLbRouteExtensionsResponse.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_lb_route_extension REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::GetLbRouteExtensionRequest] - # 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::NetworkServices::V1::LbRouteExtension] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::NetworkServices::V1::LbRouteExtension] - # A result object deserialized from the server's reply - def get_lb_route_extension request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_lb_route_extension_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_lb_route_extension", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::NetworkServices::V1::LbRouteExtension.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_lb_route_extension REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::CreateLbRouteExtensionRequest] - # 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_lb_route_extension request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_lb_route_extension_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_lb_route_extension", - 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_lb_route_extension REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::UpdateLbRouteExtensionRequest] - # 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_lb_route_extension request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_lb_route_extension_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_lb_route_extension", - 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_lb_route_extension REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::DeleteLbRouteExtensionRequest] - # 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_lb_route_extension request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_lb_route_extension_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_lb_route_extension", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_lb_edge_extensions REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::ListLbEdgeExtensionsRequest] - # 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::NetworkServices::V1::ListLbEdgeExtensionsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::NetworkServices::V1::ListLbEdgeExtensionsResponse] - # A result object deserialized from the server's reply - def list_lb_edge_extensions request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_lb_edge_extensions_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_lb_edge_extensions", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::NetworkServices::V1::ListLbEdgeExtensionsResponse.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_lb_edge_extension REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::GetLbEdgeExtensionRequest] - # 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::NetworkServices::V1::LbEdgeExtension] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::NetworkServices::V1::LbEdgeExtension] - # A result object deserialized from the server's reply - def get_lb_edge_extension request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_lb_edge_extension_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_lb_edge_extension", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::NetworkServices::V1::LbEdgeExtension.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_lb_edge_extension REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::CreateLbEdgeExtensionRequest] - # 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_lb_edge_extension request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_lb_edge_extension_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_lb_edge_extension", - 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_lb_edge_extension REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::UpdateLbEdgeExtensionRequest] - # 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_lb_edge_extension request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_lb_edge_extension_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_lb_edge_extension", - 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_lb_edge_extension REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::DeleteLbEdgeExtensionRequest] - # 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_lb_edge_extension request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_lb_edge_extension_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_lb_edge_extension", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_authz_extensions REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::ListAuthzExtensionsRequest] - # 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::NetworkServices::V1::ListAuthzExtensionsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::NetworkServices::V1::ListAuthzExtensionsResponse] - # A result object deserialized from the server's reply - def list_authz_extensions request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_authz_extensions_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_authz_extensions", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::NetworkServices::V1::ListAuthzExtensionsResponse.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_authz_extension REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::GetAuthzExtensionRequest] - # 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::NetworkServices::V1::AuthzExtension] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::NetworkServices::V1::AuthzExtension] - # A result object deserialized from the server's reply - def get_authz_extension request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_authz_extension_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_authz_extension", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::NetworkServices::V1::AuthzExtension.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_authz_extension REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::CreateAuthzExtensionRequest] - # 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_authz_extension request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_authz_extension_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_authz_extension", - 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_authz_extension REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::UpdateAuthzExtensionRequest] - # 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_authz_extension request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_authz_extension_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_authz_extension", - 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_authz_extension REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::DeleteAuthzExtensionRequest] - # 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_authz_extension request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_authz_extension_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_authz_extension", - 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_lb_traffic_extensions REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::ListLbTrafficExtensionsRequest] - # 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_lb_traffic_extensions_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/lbTrafficExtensions", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_lb_traffic_extension REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::GetLbTrafficExtensionRequest] - # 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_lb_traffic_extension_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/lbTrafficExtensions/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_lb_traffic_extension REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::CreateLbTrafficExtensionRequest] - # 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_lb_traffic_extension_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/lbTrafficExtensions", - body: "lb_traffic_extension", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_lb_traffic_extension REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::UpdateLbTrafficExtensionRequest] - # 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_lb_traffic_extension_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{lb_traffic_extension.name}", - body: "lb_traffic_extension", - matches: [ - ["lb_traffic_extension.name", %r{^projects/[^/]+/locations/[^/]+/lbTrafficExtensions/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_lb_traffic_extension REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::DeleteLbTrafficExtensionRequest] - # 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_lb_traffic_extension_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/lbTrafficExtensions/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_lb_route_extensions REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::ListLbRouteExtensionsRequest] - # 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_lb_route_extensions_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/lbRouteExtensions", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_lb_route_extension REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::GetLbRouteExtensionRequest] - # 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_lb_route_extension_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/lbRouteExtensions/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_lb_route_extension REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::CreateLbRouteExtensionRequest] - # 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_lb_route_extension_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/lbRouteExtensions", - body: "lb_route_extension", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_lb_route_extension REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::UpdateLbRouteExtensionRequest] - # 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_lb_route_extension_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{lb_route_extension.name}", - body: "lb_route_extension", - matches: [ - ["lb_route_extension.name", %r{^projects/[^/]+/locations/[^/]+/lbRouteExtensions/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_lb_route_extension REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::DeleteLbRouteExtensionRequest] - # 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_lb_route_extension_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/lbRouteExtensions/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_lb_edge_extensions REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::ListLbEdgeExtensionsRequest] - # 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_lb_edge_extensions_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/lbEdgeExtensions", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_lb_edge_extension REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::GetLbEdgeExtensionRequest] - # 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_lb_edge_extension_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/lbEdgeExtensions/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_lb_edge_extension REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::CreateLbEdgeExtensionRequest] - # 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_lb_edge_extension_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/lbEdgeExtensions", - body: "lb_edge_extension", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_lb_edge_extension REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::UpdateLbEdgeExtensionRequest] - # 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_lb_edge_extension_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{lb_edge_extension.name}", - body: "lb_edge_extension", - matches: [ - ["lb_edge_extension.name", %r{^projects/[^/]+/locations/[^/]+/lbEdgeExtensions/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_lb_edge_extension REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::DeleteLbEdgeExtensionRequest] - # 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_lb_edge_extension_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/lbEdgeExtensions/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_authz_extensions REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::ListAuthzExtensionsRequest] - # 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_authz_extensions_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/authzExtensions", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_authz_extension REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::GetAuthzExtensionRequest] - # 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_authz_extension_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/authzExtensions/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_authz_extension REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::CreateAuthzExtensionRequest] - # 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_authz_extension_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/authzExtensions", - body: "authz_extension", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_authz_extension REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::UpdateAuthzExtensionRequest] - # 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_authz_extension_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{authz_extension.name}", - body: "authz_extension", - matches: [ - ["authz_extension.name", %r{^projects/[^/]+/locations/[^/]+/authzExtensions/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_authz_extension REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::DeleteAuthzExtensionRequest] - # 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_authz_extension_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/authzExtensions/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/network_services.rb b/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/network_services.rb deleted file mode 100644 index 7bb1dcbb0480..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/network_services.rb +++ /dev/null @@ -1,56 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/network_services/v1/version" - -require "google/cloud/network_services/v1/network_services/credentials" -require "google/cloud/network_services/v1/network_services/paths" -require "google/cloud/network_services/v1/network_services/operations" -require "google/cloud/network_services/v1/network_services/client" -require "google/cloud/network_services/v1/network_services/rest" - -module Google - module Cloud - module NetworkServices - module V1 - ## - # Service describing handlers for resources. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/network_services/v1/network_services" - # client = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/cloud/network_services/v1/network_services/rest" - # client = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new - # - module NetworkServices - end - end - end - end -end - -helper_path = ::File.join __dir__, "network_services", "helpers.rb" -require "google/cloud/network_services/v1/network_services/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/network_services/client.rb b/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/network_services/client.rb deleted file mode 100644 index fbe7a359c85d..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/network_services/client.rb +++ /dev/null @@ -1,6946 +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/networkservices/v1/network_services_pb" -require "google/cloud/location" -require "google/iam/v1" - -module Google - module Cloud - module NetworkServices - module V1 - module NetworkServices - ## - # Client for the NetworkServices service. - # - # Service describing handlers for resources. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "networkservices.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :network_services_stub - - ## - # Configure the NetworkServices Client class. - # - # See {::Google::Cloud::NetworkServices::V1::NetworkServices::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all NetworkServices clients - # ::Google::Cloud::NetworkServices::V1::NetworkServices::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", "NetworkServices", "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 NetworkServices 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::NetworkServices::V1::NetworkServices::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 - @network_services_stub.universe_domain - end - - ## - # Create a new NetworkServices client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the NetworkServices 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/networkservices/v1/network_services_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 - - @network_services_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::NetworkServices::V1::NetworkServices::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 - ) - - @network_services_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 = @network_services_stub.endpoint - config.universe_domain = @network_services_stub.universe_domain - config.logger = @network_services_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 = @network_services_stub.endpoint - config.universe_domain = @network_services_stub.universe_domain - config.logger = @network_services_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::NetworkServices::V1::NetworkServices::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 - @network_services_stub.logger - end - - # Service calls - - ## - # Lists EndpointPolicies in a given project and location. - # - # @overload list_endpoint_policies(request, options = nil) - # Pass arguments to `list_endpoint_policies` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::ListEndpointPoliciesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::ListEndpointPoliciesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_endpoint_policies(parent: nil, page_size: nil, page_token: nil, return_partial_success: nil) - # Pass arguments to `list_endpoint_policies` via keyword arguments. Note that at - # least one keyword argument is 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 project and location from which the EndpointPolicies should - # be listed, specified in the format `projects/*/locations/*`. - # @param page_size [::Integer] - # Maximum number of EndpointPolicies to return per call. - # @param page_token [::String] - # The value returned by the last `ListEndpointPoliciesResponse` - # Indicates that this is a continuation of a prior - # `ListEndpointPolicies` call, and that the system should return the - # next page of data. - # @param return_partial_success [::Boolean] - # Optional. If true, allow partial responses for multi-regional Aggregated - # List requests. Otherwise if one of the locations is down or unreachable, - # the Aggregated List request will fail. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::NetworkServices::V1::EndpointPolicy>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::NetworkServices::V1::EndpointPolicy>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/network_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::ListEndpointPoliciesRequest.new - # - # # Call the list_endpoint_policies method. - # result = client.list_endpoint_policies 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::NetworkServices::V1::EndpointPolicy. - # p item - # end - # - def list_endpoint_policies request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::ListEndpointPoliciesRequest - - # Converts hash 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_endpoint_policies.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::NetworkServices::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_endpoint_policies.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_endpoint_policies.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.call_rpc :list_endpoint_policies, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @network_services_stub, :list_endpoint_policies, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets details of a single EndpointPolicy. - # - # @overload get_endpoint_policy(request, options = nil) - # Pass arguments to `get_endpoint_policy` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::GetEndpointPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::GetEndpointPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_endpoint_policy(name: nil) - # Pass arguments to `get_endpoint_policy` via keyword arguments. Note that at - # least one keyword argument is 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. A name of the EndpointPolicy to get. Must be in the format - # `projects/*/locations/*/endpointPolicies/*`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::NetworkServices::V1::EndpointPolicy] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::NetworkServices::V1::EndpointPolicy] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/network_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::GetEndpointPolicyRequest.new - # - # # Call the get_endpoint_policy method. - # result = client.get_endpoint_policy request - # - # # The returned object is of type Google::Cloud::NetworkServices::V1::EndpointPolicy. - # p result - # - def get_endpoint_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::GetEndpointPolicyRequest - - # Converts hash 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_endpoint_policy.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::NetworkServices::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_endpoint_policy.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_endpoint_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.call_rpc :get_endpoint_policy, 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 EndpointPolicy in a given project and location. - # - # @overload create_endpoint_policy(request, options = nil) - # Pass arguments to `create_endpoint_policy` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::CreateEndpointPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::CreateEndpointPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_endpoint_policy(parent: nil, endpoint_policy_id: nil, endpoint_policy: nil) - # Pass arguments to `create_endpoint_policy` via keyword arguments. Note that at - # least one keyword argument is 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 EndpointPolicy. Must be in the - # format `projects/*/locations/*`. - # @param endpoint_policy_id [::String] - # Required. Short name of the EndpointPolicy resource to be created. - # E.g. "CustomECS". - # @param endpoint_policy [::Google::Cloud::NetworkServices::V1::EndpointPolicy, ::Hash] - # Required. EndpointPolicy resource to be created. - # - # @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_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::CreateEndpointPolicyRequest.new - # - # # Call the create_endpoint_policy method. - # result = client.create_endpoint_policy 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_endpoint_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::CreateEndpointPolicyRequest - - # Converts hash 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_endpoint_policy.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::NetworkServices::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_endpoint_policy.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_endpoint_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.call_rpc :create_endpoint_policy, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the parameters of a single EndpointPolicy. - # - # @overload update_endpoint_policy(request, options = nil) - # Pass arguments to `update_endpoint_policy` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::UpdateEndpointPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::UpdateEndpointPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_endpoint_policy(update_mask: nil, endpoint_policy: nil) - # Pass arguments to `update_endpoint_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. Field mask is used to specify the fields to be overwritten in the - # EndpointPolicy resource by the update. - # The fields specified in the update_mask are relative to the resource, not - # the full request. A field will be overwritten if it is in the mask. If the - # user does not provide a mask then all fields will be overwritten. - # @param endpoint_policy [::Google::Cloud::NetworkServices::V1::EndpointPolicy, ::Hash] - # Required. Updated EndpointPolicy 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_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::UpdateEndpointPolicyRequest.new - # - # # Call the update_endpoint_policy method. - # result = client.update_endpoint_policy 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_endpoint_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::UpdateEndpointPolicyRequest - - # Converts hash 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_endpoint_policy.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::NetworkServices::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.endpoint_policy&.name - header_params["endpoint_policy.name"] = request.endpoint_policy.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_endpoint_policy.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_endpoint_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.call_rpc :update_endpoint_policy, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a single EndpointPolicy. - # - # @overload delete_endpoint_policy(request, options = nil) - # Pass arguments to `delete_endpoint_policy` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::DeleteEndpointPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::DeleteEndpointPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_endpoint_policy(name: nil) - # Pass arguments to `delete_endpoint_policy` via keyword arguments. Note that at - # least one keyword argument is 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. A name of the EndpointPolicy to delete. Must be in the format - # `projects/*/locations/*/endpointPolicies/*`. - # - # @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_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::DeleteEndpointPolicyRequest.new - # - # # Call the delete_endpoint_policy method. - # result = client.delete_endpoint_policy 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_endpoint_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::DeleteEndpointPolicyRequest - - # Converts hash 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_endpoint_policy.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::NetworkServices::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_endpoint_policy.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_endpoint_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.call_rpc :delete_endpoint_policy, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists `WasmPluginVersion` resources in a given project and - # location. - # - # @overload list_wasm_plugin_versions(request, options = nil) - # Pass arguments to `list_wasm_plugin_versions` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::ListWasmPluginVersionsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::ListWasmPluginVersionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_wasm_plugin_versions(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_wasm_plugin_versions` via keyword arguments. Note that at - # least one keyword argument is 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 `WasmPlugin` resource whose `WasmPluginVersion`s - # are listed, specified in the following format: - # `projects/{project}/locations/global/wasmPlugins/{wasm_plugin}`. - # @param page_size [::Integer] - # Maximum number of `WasmPluginVersion` resources to return per - # call. If not specified, at most 50 `WasmPluginVersion` resources are - # returned. The maximum value is 1000; values above 1000 are coerced to - # 1000. - # @param page_token [::String] - # The value returned by the last `ListWasmPluginVersionsResponse` call. - # Indicates that this is a continuation of a prior - # `ListWasmPluginVersions` call, and that the - # next page of data is to be returned. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::NetworkServices::V1::WasmPluginVersion>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::NetworkServices::V1::WasmPluginVersion>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/network_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::ListWasmPluginVersionsRequest.new - # - # # Call the list_wasm_plugin_versions method. - # result = client.list_wasm_plugin_versions 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::NetworkServices::V1::WasmPluginVersion. - # p item - # end - # - def list_wasm_plugin_versions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::ListWasmPluginVersionsRequest - - # Converts hash 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_wasm_plugin_versions.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::NetworkServices::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_wasm_plugin_versions.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_wasm_plugin_versions.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.call_rpc :list_wasm_plugin_versions, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @network_services_stub, :list_wasm_plugin_versions, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets details of the specified `WasmPluginVersion` resource. - # - # @overload get_wasm_plugin_version(request, options = nil) - # Pass arguments to `get_wasm_plugin_version` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::GetWasmPluginVersionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::GetWasmPluginVersionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_wasm_plugin_version(name: nil) - # Pass arguments to `get_wasm_plugin_version` via keyword arguments. Note that at - # least one keyword argument is 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. A name of the `WasmPluginVersion` resource to get. Must be in - # the format - # `projects/{project}/locations/global/wasmPlugins/{wasm_plugin}/versions/{wasm_plugin_version}`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::NetworkServices::V1::WasmPluginVersion] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::NetworkServices::V1::WasmPluginVersion] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/network_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::GetWasmPluginVersionRequest.new - # - # # Call the get_wasm_plugin_version method. - # result = client.get_wasm_plugin_version request - # - # # The returned object is of type Google::Cloud::NetworkServices::V1::WasmPluginVersion. - # p result - # - def get_wasm_plugin_version request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::GetWasmPluginVersionRequest - - # Converts hash 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_wasm_plugin_version.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::NetworkServices::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_wasm_plugin_version.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_wasm_plugin_version.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.call_rpc :get_wasm_plugin_version, 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 `WasmPluginVersion` resource in a given project - # and location. - # - # @overload create_wasm_plugin_version(request, options = nil) - # Pass arguments to `create_wasm_plugin_version` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::CreateWasmPluginVersionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::CreateWasmPluginVersionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_wasm_plugin_version(parent: nil, wasm_plugin_version_id: nil, wasm_plugin_version: nil) - # Pass arguments to `create_wasm_plugin_version` via keyword arguments. Note that at - # least one keyword argument is 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 `WasmPluginVersion` resource. Must be - # in the format - # `projects/{project}/locations/global/wasmPlugins/{wasm_plugin}`. - # @param wasm_plugin_version_id [::String] - # Required. User-provided ID of the `WasmPluginVersion` resource to be - # created. - # @param wasm_plugin_version [::Google::Cloud::NetworkServices::V1::WasmPluginVersion, ::Hash] - # Required. `WasmPluginVersion` resource to be created. - # - # @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_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::CreateWasmPluginVersionRequest.new - # - # # Call the create_wasm_plugin_version method. - # result = client.create_wasm_plugin_version 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_wasm_plugin_version request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::CreateWasmPluginVersionRequest - - # Converts hash 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_wasm_plugin_version.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::NetworkServices::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_wasm_plugin_version.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_wasm_plugin_version.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.call_rpc :create_wasm_plugin_version, 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 the specified `WasmPluginVersion` resource. - # - # @overload delete_wasm_plugin_version(request, options = nil) - # Pass arguments to `delete_wasm_plugin_version` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::DeleteWasmPluginVersionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::DeleteWasmPluginVersionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_wasm_plugin_version(name: nil) - # Pass arguments to `delete_wasm_plugin_version` via keyword arguments. Note that at - # least one keyword argument is 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. A name of the `WasmPluginVersion` resource to delete. Must be in - # the format - # `projects/{project}/locations/global/wasmPlugins/{wasm_plugin}/versions/{wasm_plugin_version}`. - # - # @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_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::DeleteWasmPluginVersionRequest.new - # - # # Call the delete_wasm_plugin_version method. - # result = client.delete_wasm_plugin_version 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_wasm_plugin_version request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::DeleteWasmPluginVersionRequest - - # Converts hash 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_wasm_plugin_version.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::NetworkServices::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_wasm_plugin_version.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_wasm_plugin_version.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.call_rpc :delete_wasm_plugin_version, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists `WasmPlugin` resources in a given project and - # location. - # - # @overload list_wasm_plugins(request, options = nil) - # Pass arguments to `list_wasm_plugins` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::ListWasmPluginsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::ListWasmPluginsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_wasm_plugins(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_wasm_plugins` via keyword arguments. Note that at - # least one keyword argument is 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 project and location from which the `WasmPlugin` resources - # are listed, specified in the following format: - # `projects/{project}/locations/global`. - # @param page_size [::Integer] - # Maximum number of `WasmPlugin` resources to return per call. - # If not specified, at most 50 `WasmPlugin` resources are returned. - # The maximum value is 1000; values above 1000 are coerced to 1000. - # @param page_token [::String] - # The value returned by the last `ListWasmPluginsResponse` call. - # Indicates that this is a continuation of a prior - # `ListWasmPlugins` call, and that the - # next page of data is to be returned. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::NetworkServices::V1::WasmPlugin>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::NetworkServices::V1::WasmPlugin>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/network_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::ListWasmPluginsRequest.new - # - # # Call the list_wasm_plugins method. - # result = client.list_wasm_plugins 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::NetworkServices::V1::WasmPlugin. - # p item - # end - # - def list_wasm_plugins request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::ListWasmPluginsRequest - - # Converts hash 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_wasm_plugins.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::NetworkServices::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_wasm_plugins.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_wasm_plugins.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.call_rpc :list_wasm_plugins, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @network_services_stub, :list_wasm_plugins, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets details of the specified `WasmPlugin` resource. - # - # @overload get_wasm_plugin(request, options = nil) - # Pass arguments to `get_wasm_plugin` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::GetWasmPluginRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::GetWasmPluginRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_wasm_plugin(name: nil, view: nil) - # Pass arguments to `get_wasm_plugin` via keyword arguments. Note that at - # least one keyword argument is 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. A name of the `WasmPlugin` resource to get. Must be in the - # format `projects/{project}/locations/global/wasmPlugins/{wasm_plugin}`. - # @param view [::Google::Cloud::NetworkServices::V1::WasmPluginView] - # Determines how much data must be returned in the response. See - # [AIP-157](https://google.aip.dev/157). - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::NetworkServices::V1::WasmPlugin] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::NetworkServices::V1::WasmPlugin] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/network_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::GetWasmPluginRequest.new - # - # # Call the get_wasm_plugin method. - # result = client.get_wasm_plugin request - # - # # The returned object is of type Google::Cloud::NetworkServices::V1::WasmPlugin. - # p result - # - def get_wasm_plugin request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::GetWasmPluginRequest - - # Converts hash 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_wasm_plugin.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::NetworkServices::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_wasm_plugin.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_wasm_plugin.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.call_rpc :get_wasm_plugin, 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 `WasmPlugin` resource in a given project - # and location. - # - # @overload create_wasm_plugin(request, options = nil) - # Pass arguments to `create_wasm_plugin` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::CreateWasmPluginRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::CreateWasmPluginRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_wasm_plugin(parent: nil, wasm_plugin_id: nil, wasm_plugin: nil) - # Pass arguments to `create_wasm_plugin` via keyword arguments. Note that at - # least one keyword argument is 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 `WasmPlugin` resource. Must be in the - # format `projects/{project}/locations/global`. - # @param wasm_plugin_id [::String] - # Required. User-provided ID of the `WasmPlugin` resource to be created. - # @param wasm_plugin [::Google::Cloud::NetworkServices::V1::WasmPlugin, ::Hash] - # Required. `WasmPlugin` resource to be created. - # - # @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_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::CreateWasmPluginRequest.new - # - # # Call the create_wasm_plugin method. - # result = client.create_wasm_plugin 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_wasm_plugin request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::CreateWasmPluginRequest - - # Converts hash 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_wasm_plugin.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::NetworkServices::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_wasm_plugin.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_wasm_plugin.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.call_rpc :create_wasm_plugin, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the parameters of the specified `WasmPlugin` resource. - # - # @overload update_wasm_plugin(request, options = nil) - # Pass arguments to `update_wasm_plugin` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::UpdateWasmPluginRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::UpdateWasmPluginRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_wasm_plugin(update_mask: nil, wasm_plugin: nil) - # Pass arguments to `update_wasm_plugin` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. Used to specify the fields to be overwritten in the - # `WasmPlugin` resource by the update. - # The fields specified in the `update_mask` field are relative to the - # resource, not the full request. - # An omitted `update_mask` field is treated as an implied `update_mask` - # field equivalent to all fields that are populated (that have a non-empty - # value). - # The `update_mask` field supports a special value `*`, which means that - # each field in the given `WasmPlugin` resource (including the empty ones) - # replaces the current value. - # @param wasm_plugin [::Google::Cloud::NetworkServices::V1::WasmPlugin, ::Hash] - # Required. Updated `WasmPlugin` 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_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::UpdateWasmPluginRequest.new - # - # # Call the update_wasm_plugin method. - # result = client.update_wasm_plugin 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_wasm_plugin request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::UpdateWasmPluginRequest - - # Converts hash 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_wasm_plugin.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::NetworkServices::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.wasm_plugin&.name - header_params["wasm_plugin.name"] = request.wasm_plugin.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_wasm_plugin.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_wasm_plugin.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.call_rpc :update_wasm_plugin, 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 the specified `WasmPlugin` resource. - # - # @overload delete_wasm_plugin(request, options = nil) - # Pass arguments to `delete_wasm_plugin` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::DeleteWasmPluginRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::DeleteWasmPluginRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_wasm_plugin(name: nil) - # Pass arguments to `delete_wasm_plugin` via keyword arguments. Note that at - # least one keyword argument is 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. A name of the `WasmPlugin` resource to delete. Must be in the - # format `projects/{project}/locations/global/wasmPlugins/{wasm_plugin}`. - # - # @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_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::DeleteWasmPluginRequest.new - # - # # Call the delete_wasm_plugin method. - # result = client.delete_wasm_plugin 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_wasm_plugin request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::DeleteWasmPluginRequest - - # Converts hash 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_wasm_plugin.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::NetworkServices::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_wasm_plugin.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_wasm_plugin.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.call_rpc :delete_wasm_plugin, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists Gateways in a given project and location. - # - # @overload list_gateways(request, options = nil) - # Pass arguments to `list_gateways` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::ListGatewaysRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::ListGatewaysRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_gateways(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_gateways` via keyword arguments. Note that at - # least one keyword argument is 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 project and location from which the Gateways should be - # listed, specified in the format `projects/*/locations/*`. - # @param page_size [::Integer] - # Maximum number of Gateways to return per call. - # @param page_token [::String] - # The value returned by the last `ListGatewaysResponse` - # Indicates that this is a continuation of a prior `ListGateways` call, - # and that the system should return the next page of data. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::NetworkServices::V1::Gateway>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::NetworkServices::V1::Gateway>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/network_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::ListGatewaysRequest.new - # - # # Call the list_gateways method. - # result = client.list_gateways 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::NetworkServices::V1::Gateway. - # p item - # end - # - def list_gateways request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::ListGatewaysRequest - - # Converts hash 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_gateways.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::NetworkServices::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_gateways.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_gateways.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.call_rpc :list_gateways, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @network_services_stub, :list_gateways, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets details of a single Gateway. - # - # @overload get_gateway(request, options = nil) - # Pass arguments to `get_gateway` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::GetGatewayRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::GetGatewayRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_gateway(name: nil) - # Pass arguments to `get_gateway` via keyword arguments. Note that at - # least one keyword argument is 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. A name of the Gateway to get. Must be in the format - # `projects/*/locations/*/gateways/*`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::NetworkServices::V1::Gateway] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::NetworkServices::V1::Gateway] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/network_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::GetGatewayRequest.new - # - # # Call the get_gateway method. - # result = client.get_gateway request - # - # # The returned object is of type Google::Cloud::NetworkServices::V1::Gateway. - # p result - # - def get_gateway request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::GetGatewayRequest - - # Converts hash 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_gateway.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::NetworkServices::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_gateway.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_gateway.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.call_rpc :get_gateway, 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 Gateway in a given project and location. - # - # @overload create_gateway(request, options = nil) - # Pass arguments to `create_gateway` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::CreateGatewayRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::CreateGatewayRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_gateway(parent: nil, gateway_id: nil, gateway: nil) - # Pass arguments to `create_gateway` via keyword arguments. Note that at - # least one keyword argument is 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 Gateway. Must be in the - # format `projects/*/locations/*`. - # @param gateway_id [::String] - # Required. Short name of the Gateway resource to be created. - # @param gateway [::Google::Cloud::NetworkServices::V1::Gateway, ::Hash] - # Required. Gateway resource to be created. - # - # @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_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::CreateGatewayRequest.new - # - # # Call the create_gateway method. - # result = client.create_gateway 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_gateway request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::CreateGatewayRequest - - # Converts hash 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_gateway.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::NetworkServices::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_gateway.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_gateway.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.call_rpc :create_gateway, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the parameters of a single Gateway. - # - # @overload update_gateway(request, options = nil) - # Pass arguments to `update_gateway` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::UpdateGatewayRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::UpdateGatewayRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_gateway(update_mask: nil, gateway: nil) - # Pass arguments to `update_gateway` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. Field mask is used to specify the fields to be overwritten in the - # Gateway resource by the update. - # The fields specified in the update_mask are relative to the resource, not - # the full request. A field will be overwritten if it is in the mask. If the - # user does not provide a mask then all fields will be overwritten. - # @param gateway [::Google::Cloud::NetworkServices::V1::Gateway, ::Hash] - # Required. Updated Gateway 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_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::UpdateGatewayRequest.new - # - # # Call the update_gateway method. - # result = client.update_gateway 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_gateway request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::UpdateGatewayRequest - - # Converts hash 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_gateway.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::NetworkServices::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.gateway&.name - header_params["gateway.name"] = request.gateway.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_gateway.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_gateway.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.call_rpc :update_gateway, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a single Gateway. - # - # @overload delete_gateway(request, options = nil) - # Pass arguments to `delete_gateway` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::DeleteGatewayRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::DeleteGatewayRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_gateway(name: nil) - # Pass arguments to `delete_gateway` via keyword arguments. Note that at - # least one keyword argument is 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. A name of the Gateway to delete. Must be in the format - # `projects/*/locations/*/gateways/*`. - # - # @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_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::DeleteGatewayRequest.new - # - # # Call the delete_gateway method. - # result = client.delete_gateway 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_gateway request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::DeleteGatewayRequest - - # Converts hash 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_gateway.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::NetworkServices::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_gateway.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_gateway.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.call_rpc :delete_gateway, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists GrpcRoutes in a given project and location. - # - # @overload list_grpc_routes(request, options = nil) - # Pass arguments to `list_grpc_routes` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::ListGrpcRoutesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::ListGrpcRoutesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_grpc_routes(parent: nil, page_size: nil, page_token: nil, return_partial_success: nil) - # Pass arguments to `list_grpc_routes` via keyword arguments. Note that at - # least one keyword argument is 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 project and location from which the GrpcRoutes should be - # listed, specified in the format `projects/*/locations/*`. - # @param page_size [::Integer] - # Maximum number of GrpcRoutes to return per call. - # @param page_token [::String] - # The value returned by the last `ListGrpcRoutesResponse` - # Indicates that this is a continuation of a prior `ListGrpcRoutes` call, - # and that the system should return the next page of data. - # @param return_partial_success [::Boolean] - # Optional. If true, allow partial responses for multi-regional Aggregated - # List requests. Otherwise if one of the locations is down or unreachable, - # the Aggregated List request will fail. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::NetworkServices::V1::GrpcRoute>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::NetworkServices::V1::GrpcRoute>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/network_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::ListGrpcRoutesRequest.new - # - # # Call the list_grpc_routes method. - # result = client.list_grpc_routes 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::NetworkServices::V1::GrpcRoute. - # p item - # end - # - def list_grpc_routes request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::ListGrpcRoutesRequest - - # Converts hash 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_grpc_routes.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::NetworkServices::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_grpc_routes.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_grpc_routes.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.call_rpc :list_grpc_routes, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @network_services_stub, :list_grpc_routes, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets details of a single GrpcRoute. - # - # @overload get_grpc_route(request, options = nil) - # Pass arguments to `get_grpc_route` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::GetGrpcRouteRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::GetGrpcRouteRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_grpc_route(name: nil) - # Pass arguments to `get_grpc_route` via keyword arguments. Note that at - # least one keyword argument is 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. A name of the GrpcRoute to get. Must be in the format - # `projects/*/locations/*/grpcRoutes/*`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::NetworkServices::V1::GrpcRoute] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::NetworkServices::V1::GrpcRoute] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/network_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::GetGrpcRouteRequest.new - # - # # Call the get_grpc_route method. - # result = client.get_grpc_route request - # - # # The returned object is of type Google::Cloud::NetworkServices::V1::GrpcRoute. - # p result - # - def get_grpc_route request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::GetGrpcRouteRequest - - # Converts hash 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_grpc_route.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::NetworkServices::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_grpc_route.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_grpc_route.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.call_rpc :get_grpc_route, 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 GrpcRoute in a given project and location. - # - # @overload create_grpc_route(request, options = nil) - # Pass arguments to `create_grpc_route` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::CreateGrpcRouteRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::CreateGrpcRouteRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_grpc_route(parent: nil, grpc_route_id: nil, grpc_route: nil) - # Pass arguments to `create_grpc_route` via keyword arguments. Note that at - # least one keyword argument is 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 GrpcRoute. Must be in the - # format `projects/*/locations/*`. - # @param grpc_route_id [::String] - # Required. Short name of the GrpcRoute resource to be created. - # @param grpc_route [::Google::Cloud::NetworkServices::V1::GrpcRoute, ::Hash] - # Required. GrpcRoute resource to be created. - # - # @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_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::CreateGrpcRouteRequest.new - # - # # Call the create_grpc_route method. - # result = client.create_grpc_route 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_grpc_route request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::CreateGrpcRouteRequest - - # Converts hash 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_grpc_route.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::NetworkServices::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_grpc_route.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_grpc_route.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.call_rpc :create_grpc_route, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the parameters of a single GrpcRoute. - # - # @overload update_grpc_route(request, options = nil) - # Pass arguments to `update_grpc_route` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::UpdateGrpcRouteRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::UpdateGrpcRouteRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_grpc_route(update_mask: nil, grpc_route: nil) - # Pass arguments to `update_grpc_route` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. Field mask is used to specify the fields to be overwritten in the - # GrpcRoute resource by the update. - # The fields specified in the update_mask are relative to the resource, not - # the full request. A field will be overwritten if it is in the mask. If the - # user does not provide a mask then all fields will be overwritten. - # @param grpc_route [::Google::Cloud::NetworkServices::V1::GrpcRoute, ::Hash] - # Required. Updated GrpcRoute 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_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::UpdateGrpcRouteRequest.new - # - # # Call the update_grpc_route method. - # result = client.update_grpc_route 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_grpc_route request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::UpdateGrpcRouteRequest - - # Converts hash 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_grpc_route.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::NetworkServices::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.grpc_route&.name - header_params["grpc_route.name"] = request.grpc_route.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_grpc_route.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_grpc_route.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.call_rpc :update_grpc_route, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a single GrpcRoute. - # - # @overload delete_grpc_route(request, options = nil) - # Pass arguments to `delete_grpc_route` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::DeleteGrpcRouteRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::DeleteGrpcRouteRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_grpc_route(name: nil) - # Pass arguments to `delete_grpc_route` via keyword arguments. Note that at - # least one keyword argument is 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. A name of the GrpcRoute to delete. Must be in the format - # `projects/*/locations/*/grpcRoutes/*`. - # - # @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_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::DeleteGrpcRouteRequest.new - # - # # Call the delete_grpc_route method. - # result = client.delete_grpc_route 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_grpc_route request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::DeleteGrpcRouteRequest - - # Converts hash 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_grpc_route.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::NetworkServices::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_grpc_route.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_grpc_route.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.call_rpc :delete_grpc_route, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists HttpRoute in a given project and location. - # - # @overload list_http_routes(request, options = nil) - # Pass arguments to `list_http_routes` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::ListHttpRoutesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::ListHttpRoutesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_http_routes(parent: nil, page_size: nil, page_token: nil, return_partial_success: nil, filter: nil) - # Pass arguments to `list_http_routes` via keyword arguments. Note that at - # least one keyword argument is 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 project and location from which the HttpRoutes should be - # listed, specified in the format `projects/*/locations/*`. - # @param page_size [::Integer] - # Maximum number of HttpRoutes to return per call. - # @param page_token [::String] - # The value returned by the last `ListHttpRoutesResponse` - # Indicates that this is a continuation of a prior `ListHttpRoutes` call, - # and that the system should return the next page of data. - # @param return_partial_success [::Boolean] - # Optional. If true, allow partial responses for multi-regional Aggregated - # List requests. Otherwise if one of the locations is down or unreachable, - # the Aggregated List request will fail. - # @param filter [::String] - # Optional. Filter expression to restrict the list. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::NetworkServices::V1::HttpRoute>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::NetworkServices::V1::HttpRoute>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/network_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::ListHttpRoutesRequest.new - # - # # Call the list_http_routes method. - # result = client.list_http_routes 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::NetworkServices::V1::HttpRoute. - # p item - # end - # - def list_http_routes request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::ListHttpRoutesRequest - - # Converts hash 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_http_routes.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::NetworkServices::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_http_routes.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_http_routes.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.call_rpc :list_http_routes, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @network_services_stub, :list_http_routes, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets details of a single HttpRoute. - # - # @overload get_http_route(request, options = nil) - # Pass arguments to `get_http_route` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::GetHttpRouteRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::GetHttpRouteRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_http_route(name: nil) - # Pass arguments to `get_http_route` via keyword arguments. Note that at - # least one keyword argument is 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. A name of the HttpRoute to get. Must be in the format - # `projects/*/locations/*/httpRoutes/*`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::NetworkServices::V1::HttpRoute] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::NetworkServices::V1::HttpRoute] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/network_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::GetHttpRouteRequest.new - # - # # Call the get_http_route method. - # result = client.get_http_route request - # - # # The returned object is of type Google::Cloud::NetworkServices::V1::HttpRoute. - # p result - # - def get_http_route request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::GetHttpRouteRequest - - # Converts hash 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_http_route.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::NetworkServices::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_http_route.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_http_route.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.call_rpc :get_http_route, 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 HttpRoute in a given project and location. - # - # @overload create_http_route(request, options = nil) - # Pass arguments to `create_http_route` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::CreateHttpRouteRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::CreateHttpRouteRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_http_route(parent: nil, http_route_id: nil, http_route: nil, request_id: nil) - # Pass arguments to `create_http_route` via keyword arguments. Note that at - # least one keyword argument is 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 HttpRoute. Must be in the - # format `projects/*/locations/*`. - # @param http_route_id [::String] - # Required. Short name of the HttpRoute resource to be created. - # @param http_route [::Google::Cloud::NetworkServices::V1::HttpRoute, ::Hash] - # Required. HttpRoute resource to be created. - # @param request_id [::String] - # Optional. Idempotent request UUID. - # - # @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_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::CreateHttpRouteRequest.new - # - # # Call the create_http_route method. - # result = client.create_http_route 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_http_route request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::CreateHttpRouteRequest - - # Converts hash 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_http_route.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::NetworkServices::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_http_route.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_http_route.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.call_rpc :create_http_route, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the parameters of a single HttpRoute. - # - # @overload update_http_route(request, options = nil) - # Pass arguments to `update_http_route` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::UpdateHttpRouteRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::UpdateHttpRouteRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_http_route(update_mask: nil, http_route: nil) - # Pass arguments to `update_http_route` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. Field mask is used to specify the fields to be overwritten in the - # HttpRoute resource by the update. - # The fields specified in the update_mask are relative to the resource, not - # the full request. A field will be overwritten if it is in the mask. If the - # user does not provide a mask then all fields will be overwritten. - # @param http_route [::Google::Cloud::NetworkServices::V1::HttpRoute, ::Hash] - # Required. Updated HttpRoute 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_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::UpdateHttpRouteRequest.new - # - # # Call the update_http_route method. - # result = client.update_http_route 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_http_route request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::UpdateHttpRouteRequest - - # Converts hash 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_http_route.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::NetworkServices::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.http_route&.name - header_params["http_route.name"] = request.http_route.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_http_route.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_http_route.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.call_rpc :update_http_route, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a single HttpRoute. - # - # @overload delete_http_route(request, options = nil) - # Pass arguments to `delete_http_route` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::DeleteHttpRouteRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::DeleteHttpRouteRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_http_route(name: nil) - # Pass arguments to `delete_http_route` via keyword arguments. Note that at - # least one keyword argument is 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. A name of the HttpRoute to delete. Must be in the format - # `projects/*/locations/*/httpRoutes/*`. - # - # @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_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::DeleteHttpRouteRequest.new - # - # # Call the delete_http_route method. - # result = client.delete_http_route 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_http_route request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::DeleteHttpRouteRequest - - # Converts hash 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_http_route.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::NetworkServices::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_http_route.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_http_route.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.call_rpc :delete_http_route, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists TcpRoute in a given project and location. - # - # @overload list_tcp_routes(request, options = nil) - # Pass arguments to `list_tcp_routes` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::ListTcpRoutesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::ListTcpRoutesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_tcp_routes(parent: nil, page_size: nil, page_token: nil, return_partial_success: nil) - # Pass arguments to `list_tcp_routes` via keyword arguments. Note that at - # least one keyword argument is 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 project and location from which the TcpRoutes should be - # listed, specified in the format `projects/*/locations/*`. - # @param page_size [::Integer] - # Maximum number of TcpRoutes to return per call. - # @param page_token [::String] - # The value returned by the last `ListTcpRoutesResponse` - # Indicates that this is a continuation of a prior `ListTcpRoutes` call, - # and that the system should return the next page of data. - # @param return_partial_success [::Boolean] - # Optional. If true, allow partial responses for multi-regional Aggregated - # List requests. Otherwise if one of the locations is down or unreachable, - # the Aggregated List request will fail. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::NetworkServices::V1::TcpRoute>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::NetworkServices::V1::TcpRoute>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/network_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::ListTcpRoutesRequest.new - # - # # Call the list_tcp_routes method. - # result = client.list_tcp_routes 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::NetworkServices::V1::TcpRoute. - # p item - # end - # - def list_tcp_routes request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::ListTcpRoutesRequest - - # Converts hash 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_tcp_routes.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::NetworkServices::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_tcp_routes.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_tcp_routes.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.call_rpc :list_tcp_routes, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @network_services_stub, :list_tcp_routes, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets details of a single TcpRoute. - # - # @overload get_tcp_route(request, options = nil) - # Pass arguments to `get_tcp_route` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::GetTcpRouteRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::GetTcpRouteRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_tcp_route(name: nil) - # Pass arguments to `get_tcp_route` via keyword arguments. Note that at - # least one keyword argument is 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. A name of the TcpRoute to get. Must be in the format - # `projects/*/locations/*/tcpRoutes/*`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::NetworkServices::V1::TcpRoute] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::NetworkServices::V1::TcpRoute] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/network_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::GetTcpRouteRequest.new - # - # # Call the get_tcp_route method. - # result = client.get_tcp_route request - # - # # The returned object is of type Google::Cloud::NetworkServices::V1::TcpRoute. - # p result - # - def get_tcp_route request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::GetTcpRouteRequest - - # Converts hash 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_tcp_route.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::NetworkServices::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_tcp_route.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_tcp_route.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.call_rpc :get_tcp_route, 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 TcpRoute in a given project and location. - # - # @overload create_tcp_route(request, options = nil) - # Pass arguments to `create_tcp_route` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::CreateTcpRouteRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::CreateTcpRouteRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_tcp_route(parent: nil, tcp_route_id: nil, tcp_route: nil) - # Pass arguments to `create_tcp_route` via keyword arguments. Note that at - # least one keyword argument is 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 TcpRoute. Must be in the - # format `projects/*/locations/*`. - # @param tcp_route_id [::String] - # Required. Short name of the TcpRoute resource to be created. - # @param tcp_route [::Google::Cloud::NetworkServices::V1::TcpRoute, ::Hash] - # Required. TcpRoute resource to be created. - # - # @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_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::CreateTcpRouteRequest.new - # - # # Call the create_tcp_route method. - # result = client.create_tcp_route 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_tcp_route request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::CreateTcpRouteRequest - - # Converts hash 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_tcp_route.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::NetworkServices::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_tcp_route.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_tcp_route.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.call_rpc :create_tcp_route, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the parameters of a single TcpRoute. - # - # @overload update_tcp_route(request, options = nil) - # Pass arguments to `update_tcp_route` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::UpdateTcpRouteRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::UpdateTcpRouteRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_tcp_route(update_mask: nil, tcp_route: nil) - # Pass arguments to `update_tcp_route` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. Field mask is used to specify the fields to be overwritten in the - # TcpRoute resource by the update. - # The fields specified in the update_mask are relative to the resource, not - # the full request. A field will be overwritten if it is in the mask. If the - # user does not provide a mask then all fields will be overwritten. - # @param tcp_route [::Google::Cloud::NetworkServices::V1::TcpRoute, ::Hash] - # Required. Updated TcpRoute 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_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::UpdateTcpRouteRequest.new - # - # # Call the update_tcp_route method. - # result = client.update_tcp_route 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_tcp_route request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::UpdateTcpRouteRequest - - # Converts hash 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_tcp_route.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::NetworkServices::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.tcp_route&.name - header_params["tcp_route.name"] = request.tcp_route.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_tcp_route.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_tcp_route.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.call_rpc :update_tcp_route, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a single TcpRoute. - # - # @overload delete_tcp_route(request, options = nil) - # Pass arguments to `delete_tcp_route` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::DeleteTcpRouteRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::DeleteTcpRouteRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_tcp_route(name: nil) - # Pass arguments to `delete_tcp_route` via keyword arguments. Note that at - # least one keyword argument is 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. A name of the TcpRoute to delete. Must be in the format - # `projects/*/locations/*/tcpRoutes/*`. - # - # @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_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::DeleteTcpRouteRequest.new - # - # # Call the delete_tcp_route method. - # result = client.delete_tcp_route 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_tcp_route request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::DeleteTcpRouteRequest - - # Converts hash 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_tcp_route.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::NetworkServices::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_tcp_route.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_tcp_route.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.call_rpc :delete_tcp_route, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists TlsRoute in a given project and location. - # - # @overload list_tls_routes(request, options = nil) - # Pass arguments to `list_tls_routes` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::ListTlsRoutesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::ListTlsRoutesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_tls_routes(parent: nil, page_size: nil, page_token: nil, return_partial_success: nil) - # Pass arguments to `list_tls_routes` via keyword arguments. Note that at - # least one keyword argument is 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 project and location from which the TlsRoutes should be - # listed, specified in the format `projects/*/locations/*`. - # @param page_size [::Integer] - # Maximum number of TlsRoutes to return per call. - # @param page_token [::String] - # The value returned by the last `ListTlsRoutesResponse` - # Indicates that this is a continuation of a prior `ListTlsRoutes` call, - # and that the system should return the next page of data. - # @param return_partial_success [::Boolean] - # Optional. If true, allow partial responses for multi-regional Aggregated - # List requests. Otherwise if one of the locations is down or unreachable, - # the Aggregated List request will fail. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::NetworkServices::V1::TlsRoute>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::NetworkServices::V1::TlsRoute>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/network_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::ListTlsRoutesRequest.new - # - # # Call the list_tls_routes method. - # result = client.list_tls_routes 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::NetworkServices::V1::TlsRoute. - # p item - # end - # - def list_tls_routes request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::ListTlsRoutesRequest - - # Converts hash 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_tls_routes.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::NetworkServices::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_tls_routes.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_tls_routes.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.call_rpc :list_tls_routes, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @network_services_stub, :list_tls_routes, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets details of a single TlsRoute. - # - # @overload get_tls_route(request, options = nil) - # Pass arguments to `get_tls_route` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::GetTlsRouteRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::GetTlsRouteRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_tls_route(name: nil) - # Pass arguments to `get_tls_route` via keyword arguments. Note that at - # least one keyword argument is 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. A name of the TlsRoute to get. Must be in the format - # `projects/*/locations/*/tlsRoutes/*`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::NetworkServices::V1::TlsRoute] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::NetworkServices::V1::TlsRoute] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/network_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::GetTlsRouteRequest.new - # - # # Call the get_tls_route method. - # result = client.get_tls_route request - # - # # The returned object is of type Google::Cloud::NetworkServices::V1::TlsRoute. - # p result - # - def get_tls_route request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::GetTlsRouteRequest - - # Converts hash 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_tls_route.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::NetworkServices::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_tls_route.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_tls_route.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.call_rpc :get_tls_route, 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 TlsRoute in a given project and location. - # - # @overload create_tls_route(request, options = nil) - # Pass arguments to `create_tls_route` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::CreateTlsRouteRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::CreateTlsRouteRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_tls_route(parent: nil, tls_route_id: nil, tls_route: nil) - # Pass arguments to `create_tls_route` via keyword arguments. Note that at - # least one keyword argument is 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 TlsRoute. Must be in the - # format `projects/*/locations/*`. - # @param tls_route_id [::String] - # Required. Short name of the TlsRoute resource to be created. - # @param tls_route [::Google::Cloud::NetworkServices::V1::TlsRoute, ::Hash] - # Required. TlsRoute resource to be created. - # - # @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_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::CreateTlsRouteRequest.new - # - # # Call the create_tls_route method. - # result = client.create_tls_route 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_tls_route request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::CreateTlsRouteRequest - - # Converts hash 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_tls_route.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::NetworkServices::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_tls_route.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_tls_route.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.call_rpc :create_tls_route, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the parameters of a single TlsRoute. - # - # @overload update_tls_route(request, options = nil) - # Pass arguments to `update_tls_route` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::UpdateTlsRouteRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::UpdateTlsRouteRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_tls_route(update_mask: nil, tls_route: nil) - # Pass arguments to `update_tls_route` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. Field mask is used to specify the fields to be overwritten in the - # TlsRoute resource by the update. - # The fields specified in the update_mask are relative to the resource, not - # the full request. A field will be overwritten if it is in the mask. If the - # user does not provide a mask then all fields will be overwritten. - # @param tls_route [::Google::Cloud::NetworkServices::V1::TlsRoute, ::Hash] - # Required. Updated TlsRoute 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_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::UpdateTlsRouteRequest.new - # - # # Call the update_tls_route method. - # result = client.update_tls_route 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_tls_route request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::UpdateTlsRouteRequest - - # Converts hash 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_tls_route.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::NetworkServices::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.tls_route&.name - header_params["tls_route.name"] = request.tls_route.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_tls_route.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_tls_route.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.call_rpc :update_tls_route, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a single TlsRoute. - # - # @overload delete_tls_route(request, options = nil) - # Pass arguments to `delete_tls_route` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::DeleteTlsRouteRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::DeleteTlsRouteRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_tls_route(name: nil) - # Pass arguments to `delete_tls_route` via keyword arguments. Note that at - # least one keyword argument is 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. A name of the TlsRoute to delete. Must be in the format - # `projects/*/locations/*/tlsRoutes/*`. - # - # @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_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::DeleteTlsRouteRequest.new - # - # # Call the delete_tls_route method. - # result = client.delete_tls_route 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_tls_route request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::DeleteTlsRouteRequest - - # Converts hash 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_tls_route.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::NetworkServices::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_tls_route.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_tls_route.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.call_rpc :delete_tls_route, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists ServiceBinding in a given project and location. - # - # @overload list_service_bindings(request, options = nil) - # Pass arguments to `list_service_bindings` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::ListServiceBindingsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::ListServiceBindingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_service_bindings(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_service_bindings` via keyword arguments. Note that at - # least one keyword argument is 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 project and location from which the ServiceBindings should be - # listed, specified in the format `projects/*/locations/*`. - # @param page_size [::Integer] - # Maximum number of ServiceBindings to return per call. - # @param page_token [::String] - # The value returned by the last `ListServiceBindingsResponse` - # Indicates that this is a continuation of a prior `ListRouters` call, - # and that the system should return the next page of data. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::NetworkServices::V1::ServiceBinding>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::NetworkServices::V1::ServiceBinding>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/network_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::ListServiceBindingsRequest.new - # - # # Call the list_service_bindings method. - # result = client.list_service_bindings 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::NetworkServices::V1::ServiceBinding. - # p item - # end - # - def list_service_bindings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::ListServiceBindingsRequest - - # Converts hash 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_service_bindings.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::NetworkServices::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_service_bindings.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_service_bindings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.call_rpc :list_service_bindings, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @network_services_stub, :list_service_bindings, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets details of a single ServiceBinding. - # - # @overload get_service_binding(request, options = nil) - # Pass arguments to `get_service_binding` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::GetServiceBindingRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::GetServiceBindingRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_service_binding(name: nil) - # Pass arguments to `get_service_binding` via keyword arguments. Note that at - # least one keyword argument is 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. A name of the ServiceBinding to get. Must be in the format - # `projects/*/locations/*/serviceBindings/*`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::NetworkServices::V1::ServiceBinding] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::NetworkServices::V1::ServiceBinding] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/network_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::GetServiceBindingRequest.new - # - # # Call the get_service_binding method. - # result = client.get_service_binding request - # - # # The returned object is of type Google::Cloud::NetworkServices::V1::ServiceBinding. - # p result - # - def get_service_binding request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::GetServiceBindingRequest - - # Converts hash 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_service_binding.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::NetworkServices::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_service_binding.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_service_binding.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.call_rpc :get_service_binding, 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 ServiceBinding in a given project and location. - # - # @overload create_service_binding(request, options = nil) - # Pass arguments to `create_service_binding` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::CreateServiceBindingRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::CreateServiceBindingRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_service_binding(parent: nil, service_binding_id: nil, service_binding: nil) - # Pass arguments to `create_service_binding` via keyword arguments. Note that at - # least one keyword argument is 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 ServiceBinding. Must be in the - # format `projects/*/locations/*`. - # @param service_binding_id [::String] - # Required. Short name of the ServiceBinding resource to be created. - # @param service_binding [::Google::Cloud::NetworkServices::V1::ServiceBinding, ::Hash] - # Required. ServiceBinding resource to be created. - # - # @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_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::CreateServiceBindingRequest.new - # - # # Call the create_service_binding method. - # result = client.create_service_binding 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_service_binding request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::CreateServiceBindingRequest - - # Converts hash 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_service_binding.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::NetworkServices::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_service_binding.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_service_binding.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.call_rpc :create_service_binding, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the parameters of a single ServiceBinding. - # - # @overload update_service_binding(request, options = nil) - # Pass arguments to `update_service_binding` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::UpdateServiceBindingRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::UpdateServiceBindingRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_service_binding(update_mask: nil, service_binding: nil) - # Pass arguments to `update_service_binding` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. Field mask is used to specify the fields to be overwritten in the - # ServiceBinding resource by the update. - # The fields specified in the update_mask are relative to the resource, not - # the full request. A field will be overwritten if it is in the mask. If the - # user does not provide a mask then all fields will be overwritten. - # @param service_binding [::Google::Cloud::NetworkServices::V1::ServiceBinding, ::Hash] - # Required. Updated ServiceBinding 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_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::UpdateServiceBindingRequest.new - # - # # Call the update_service_binding method. - # result = client.update_service_binding 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_service_binding request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::UpdateServiceBindingRequest - - # Converts hash 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_service_binding.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::NetworkServices::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.service_binding&.name - header_params["service_binding.name"] = request.service_binding.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_service_binding.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_service_binding.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.call_rpc :update_service_binding, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a single ServiceBinding. - # - # @overload delete_service_binding(request, options = nil) - # Pass arguments to `delete_service_binding` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::DeleteServiceBindingRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::DeleteServiceBindingRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_service_binding(name: nil) - # Pass arguments to `delete_service_binding` via keyword arguments. Note that at - # least one keyword argument is 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. A name of the ServiceBinding to delete. Must be in the format - # `projects/*/locations/*/serviceBindings/*`. - # - # @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_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::DeleteServiceBindingRequest.new - # - # # Call the delete_service_binding method. - # result = client.delete_service_binding 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_service_binding request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::DeleteServiceBindingRequest - - # Converts hash 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_service_binding.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::NetworkServices::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_service_binding.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_service_binding.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.call_rpc :delete_service_binding, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists Meshes in a given project and location. - # - # @overload list_meshes(request, options = nil) - # Pass arguments to `list_meshes` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::ListMeshesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::ListMeshesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_meshes(parent: nil, page_size: nil, page_token: nil, return_partial_success: nil) - # Pass arguments to `list_meshes` via keyword arguments. Note that at - # least one keyword argument is 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 project and location from which the Meshes should be - # listed, specified in the format `projects/*/locations/*`. - # @param page_size [::Integer] - # Maximum number of Meshes to return per call. - # @param page_token [::String] - # The value returned by the last `ListMeshesResponse` - # Indicates that this is a continuation of a prior `ListMeshes` call, - # and that the system should return the next page of data. - # @param return_partial_success [::Boolean] - # Optional. If true, allow partial responses for multi-regional Aggregated - # List requests. Otherwise if one of the locations is down or unreachable, - # the Aggregated List request will fail. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::NetworkServices::V1::Mesh>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::NetworkServices::V1::Mesh>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/network_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::ListMeshesRequest.new - # - # # Call the list_meshes method. - # result = client.list_meshes 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::NetworkServices::V1::Mesh. - # p item - # end - # - def list_meshes request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::ListMeshesRequest - - # Converts hash 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_meshes.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::NetworkServices::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_meshes.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_meshes.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.call_rpc :list_meshes, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @network_services_stub, :list_meshes, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets details of a single Mesh. - # - # @overload get_mesh(request, options = nil) - # Pass arguments to `get_mesh` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::GetMeshRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::GetMeshRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_mesh(name: nil) - # Pass arguments to `get_mesh` via keyword arguments. Note that at - # least one keyword argument is 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. A name of the Mesh to get. Must be in the format - # `projects/*/locations/*/meshes/*`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::NetworkServices::V1::Mesh] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::NetworkServices::V1::Mesh] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/network_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::GetMeshRequest.new - # - # # Call the get_mesh method. - # result = client.get_mesh request - # - # # The returned object is of type Google::Cloud::NetworkServices::V1::Mesh. - # p result - # - def get_mesh request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::GetMeshRequest - - # Converts hash 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_mesh.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::NetworkServices::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_mesh.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_mesh.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.call_rpc :get_mesh, 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 Mesh in a given project and location. - # - # @overload create_mesh(request, options = nil) - # Pass arguments to `create_mesh` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::CreateMeshRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::CreateMeshRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_mesh(parent: nil, mesh_id: nil, mesh: nil) - # Pass arguments to `create_mesh` via keyword arguments. Note that at - # least one keyword argument is 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 Mesh. Must be in the - # format `projects/*/locations/*`. - # @param mesh_id [::String] - # Required. Short name of the Mesh resource to be created. - # @param mesh [::Google::Cloud::NetworkServices::V1::Mesh, ::Hash] - # Required. Mesh resource to be created. - # - # @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_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::CreateMeshRequest.new - # - # # Call the create_mesh method. - # result = client.create_mesh 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_mesh request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::CreateMeshRequest - - # Converts hash 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_mesh.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::NetworkServices::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_mesh.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_mesh.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.call_rpc :create_mesh, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the parameters of a single Mesh. - # - # @overload update_mesh(request, options = nil) - # Pass arguments to `update_mesh` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::UpdateMeshRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::UpdateMeshRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_mesh(update_mask: nil, mesh: nil) - # Pass arguments to `update_mesh` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. Field mask is used to specify the fields to be overwritten in the - # Mesh resource by the update. - # The fields specified in the update_mask are relative to the resource, not - # the full request. A field will be overwritten if it is in the mask. If the - # user does not provide a mask then all fields will be overwritten. - # @param mesh [::Google::Cloud::NetworkServices::V1::Mesh, ::Hash] - # Required. Updated Mesh 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_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::UpdateMeshRequest.new - # - # # Call the update_mesh method. - # result = client.update_mesh 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_mesh request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::UpdateMeshRequest - - # Converts hash 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_mesh.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::NetworkServices::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.mesh&.name - header_params["mesh.name"] = request.mesh.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_mesh.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_mesh.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.call_rpc :update_mesh, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a single Mesh. - # - # @overload delete_mesh(request, options = nil) - # Pass arguments to `delete_mesh` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::DeleteMeshRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::DeleteMeshRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_mesh(name: nil) - # Pass arguments to `delete_mesh` via keyword arguments. Note that at - # least one keyword argument is 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. A name of the Mesh to delete. Must be in the format - # `projects/*/locations/*/meshes/*`. - # - # @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_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::DeleteMeshRequest.new - # - # # Call the delete_mesh method. - # result = client.delete_mesh 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_mesh request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::DeleteMeshRequest - - # Converts hash 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_mesh.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::NetworkServices::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_mesh.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_mesh.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.call_rpc :delete_mesh, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists ServiceLbPolicies in a given project and location. - # - # @overload list_service_lb_policies(request, options = nil) - # Pass arguments to `list_service_lb_policies` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::ListServiceLbPoliciesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::ListServiceLbPoliciesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_service_lb_policies(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_service_lb_policies` via keyword arguments. Note that at - # least one keyword argument is 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 project and location from which the ServiceLbPolicies should - # be listed, specified in the format - # `projects/{project}/locations/{location}`. - # @param page_size [::Integer] - # Maximum number of ServiceLbPolicies to return per call. - # @param page_token [::String] - # The value returned by the last `ListServiceLbPoliciesResponse` - # Indicates that this is a continuation of a prior `ListRouters` call, - # and that the system should return the next page of data. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::NetworkServices::V1::ServiceLbPolicy>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::NetworkServices::V1::ServiceLbPolicy>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/network_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::ListServiceLbPoliciesRequest.new - # - # # Call the list_service_lb_policies method. - # result = client.list_service_lb_policies 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::NetworkServices::V1::ServiceLbPolicy. - # p item - # end - # - def list_service_lb_policies request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::ListServiceLbPoliciesRequest - - # Converts hash 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_service_lb_policies.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::NetworkServices::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_service_lb_policies.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_service_lb_policies.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.call_rpc :list_service_lb_policies, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @network_services_stub, :list_service_lb_policies, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets details of a single ServiceLbPolicy. - # - # @overload get_service_lb_policy(request, options = nil) - # Pass arguments to `get_service_lb_policy` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::GetServiceLbPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::GetServiceLbPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_service_lb_policy(name: nil) - # Pass arguments to `get_service_lb_policy` via keyword arguments. Note that at - # least one keyword argument is 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. A name of the ServiceLbPolicy to get. Must be in the format - # `projects/{project}/locations/{location}/serviceLbPolicies/*`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::NetworkServices::V1::ServiceLbPolicy] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::NetworkServices::V1::ServiceLbPolicy] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/network_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::GetServiceLbPolicyRequest.new - # - # # Call the get_service_lb_policy method. - # result = client.get_service_lb_policy request - # - # # The returned object is of type Google::Cloud::NetworkServices::V1::ServiceLbPolicy. - # p result - # - def get_service_lb_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::GetServiceLbPolicyRequest - - # Converts hash 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_service_lb_policy.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::NetworkServices::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_service_lb_policy.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_service_lb_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.call_rpc :get_service_lb_policy, 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 ServiceLbPolicy in a given project and location. - # - # @overload create_service_lb_policy(request, options = nil) - # Pass arguments to `create_service_lb_policy` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::CreateServiceLbPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::CreateServiceLbPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_service_lb_policy(parent: nil, service_lb_policy_id: nil, service_lb_policy: nil) - # Pass arguments to `create_service_lb_policy` via keyword arguments. Note that at - # least one keyword argument is 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 ServiceLbPolicy. Must be in the - # format `projects/{project}/locations/{location}`. - # @param service_lb_policy_id [::String] - # Required. Short name of the ServiceLbPolicy resource to be created. - # E.g. for resource name - # `projects/{project}/locations/{location}/serviceLbPolicies/{service_lb_policy_name}`. - # the id is value of \\{service_lb_policy_name} - # @param service_lb_policy [::Google::Cloud::NetworkServices::V1::ServiceLbPolicy, ::Hash] - # Required. ServiceLbPolicy resource to be created. - # - # @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_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::CreateServiceLbPolicyRequest.new - # - # # Call the create_service_lb_policy method. - # result = client.create_service_lb_policy 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_service_lb_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::CreateServiceLbPolicyRequest - - # Converts hash 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_service_lb_policy.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::NetworkServices::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_service_lb_policy.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_service_lb_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.call_rpc :create_service_lb_policy, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the parameters of a single ServiceLbPolicy. - # - # @overload update_service_lb_policy(request, options = nil) - # Pass arguments to `update_service_lb_policy` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::UpdateServiceLbPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::UpdateServiceLbPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_service_lb_policy(update_mask: nil, service_lb_policy: nil) - # Pass arguments to `update_service_lb_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. Field mask is used to specify the fields to be overwritten in the - # ServiceLbPolicy resource by the update. - # The fields specified in the update_mask are relative to the resource, not - # the full request. A field will be overwritten if it is in the mask. If the - # user does not provide a mask then all fields will be overwritten. - # @param service_lb_policy [::Google::Cloud::NetworkServices::V1::ServiceLbPolicy, ::Hash] - # Required. Updated ServiceLbPolicy 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_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::UpdateServiceLbPolicyRequest.new - # - # # Call the update_service_lb_policy method. - # result = client.update_service_lb_policy 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_service_lb_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::UpdateServiceLbPolicyRequest - - # Converts hash 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_service_lb_policy.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::NetworkServices::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.service_lb_policy&.name - header_params["service_lb_policy.name"] = request.service_lb_policy.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_service_lb_policy.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_service_lb_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.call_rpc :update_service_lb_policy, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a single ServiceLbPolicy. - # - # @overload delete_service_lb_policy(request, options = nil) - # Pass arguments to `delete_service_lb_policy` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::DeleteServiceLbPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::DeleteServiceLbPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_service_lb_policy(name: nil) - # Pass arguments to `delete_service_lb_policy` via keyword arguments. Note that at - # least one keyword argument is 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. A name of the ServiceLbPolicy to delete. Must be in the format - # `projects/{project}/locations/{location}/serviceLbPolicies/*`. - # - # @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_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::DeleteServiceLbPolicyRequest.new - # - # # Call the delete_service_lb_policy method. - # result = client.delete_service_lb_policy 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_service_lb_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::DeleteServiceLbPolicyRequest - - # Converts hash 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_service_lb_policy.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::NetworkServices::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_service_lb_policy.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_service_lb_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.call_rpc :delete_service_lb_policy, 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 - - ## - # Get a single RouteView of a Gateway. - # - # @overload get_gateway_route_view(request, options = nil) - # Pass arguments to `get_gateway_route_view` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::GetGatewayRouteViewRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::GetGatewayRouteViewRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_gateway_route_view(name: nil) - # Pass arguments to `get_gateway_route_view` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the GatewayRouteView resource. - # Formats: - # projects/\\{project}/locations/\\{location}/gateways/\\{gateway}/routeViews/\\{route_view} - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::NetworkServices::V1::GatewayRouteView] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::NetworkServices::V1::GatewayRouteView] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/network_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::GetGatewayRouteViewRequest.new - # - # # Call the get_gateway_route_view method. - # result = client.get_gateway_route_view request - # - # # The returned object is of type Google::Cloud::NetworkServices::V1::GatewayRouteView. - # p result - # - def get_gateway_route_view request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::GetGatewayRouteViewRequest - - # Converts hash 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_gateway_route_view.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::NetworkServices::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_gateway_route_view.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_gateway_route_view.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.call_rpc :get_gateway_route_view, 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 - - ## - # Get a single RouteView of a Mesh. - # - # @overload get_mesh_route_view(request, options = nil) - # Pass arguments to `get_mesh_route_view` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::GetMeshRouteViewRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::GetMeshRouteViewRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_mesh_route_view(name: nil) - # Pass arguments to `get_mesh_route_view` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the MeshRouteView resource. - # Format: - # projects/\\{project}/locations/\\{location}/meshes/\\{mesh}/routeViews/\\{route_view} - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::NetworkServices::V1::MeshRouteView] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::NetworkServices::V1::MeshRouteView] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/network_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::GetMeshRouteViewRequest.new - # - # # Call the get_mesh_route_view method. - # result = client.get_mesh_route_view request - # - # # The returned object is of type Google::Cloud::NetworkServices::V1::MeshRouteView. - # p result - # - def get_mesh_route_view request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::GetMeshRouteViewRequest - - # Converts hash 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_mesh_route_view.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::NetworkServices::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_mesh_route_view.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_mesh_route_view.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.call_rpc :get_mesh_route_view, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists RouteViews - # - # @overload list_gateway_route_views(request, options = nil) - # Pass arguments to `list_gateway_route_views` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::ListGatewayRouteViewsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::ListGatewayRouteViewsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_gateway_route_views(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_gateway_route_views` via keyword arguments. Note that at - # least one keyword argument is 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 Gateway to which a Route is associated. - # Formats: - # projects/\\{project}/locations/\\{location}/gateways/\\{gateway} - # @param page_size [::Integer] - # Maximum number of GatewayRouteViews to return per call. - # @param page_token [::String] - # The value returned by the last `ListGatewayRouteViewsResponse` - # Indicates that this is a continuation of a prior `ListGatewayRouteViews` - # call, and that the system should return the next page of data. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::NetworkServices::V1::GatewayRouteView>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::NetworkServices::V1::GatewayRouteView>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/network_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::ListGatewayRouteViewsRequest.new - # - # # Call the list_gateway_route_views method. - # result = client.list_gateway_route_views 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::NetworkServices::V1::GatewayRouteView. - # p item - # end - # - def list_gateway_route_views request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::ListGatewayRouteViewsRequest - - # Converts hash 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_gateway_route_views.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::NetworkServices::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_gateway_route_views.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_gateway_route_views.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.call_rpc :list_gateway_route_views, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @network_services_stub, :list_gateway_route_views, 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 - - ## - # Lists RouteViews - # - # @overload list_mesh_route_views(request, options = nil) - # Pass arguments to `list_mesh_route_views` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::ListMeshRouteViewsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::ListMeshRouteViewsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_mesh_route_views(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_mesh_route_views` via keyword arguments. Note that at - # least one keyword argument is 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 Mesh to which a Route is associated. - # Format: - # projects/\\{project}/locations/\\{location}/meshes/\\{mesh} - # @param page_size [::Integer] - # Maximum number of MeshRouteViews to return per call. - # @param page_token [::String] - # The value returned by the last `ListMeshRouteViewsResponse` - # Indicates that this is a continuation of a prior `ListMeshRouteViews` call, - # and that the system should return the next page of data. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::NetworkServices::V1::MeshRouteView>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::NetworkServices::V1::MeshRouteView>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/network_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::ListMeshRouteViewsRequest.new - # - # # Call the list_mesh_route_views method. - # result = client.list_mesh_route_views 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::NetworkServices::V1::MeshRouteView. - # p item - # end - # - def list_mesh_route_views request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::ListMeshRouteViewsRequest - - # Converts hash 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_mesh_route_views.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::NetworkServices::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_mesh_route_views.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_mesh_route_views.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.call_rpc :list_mesh_route_views, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @network_services_stub, :list_mesh_route_views, 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 - - ## - # Lists AgentGateways in a given project and location. - # - # @overload list_agent_gateways(request, options = nil) - # Pass arguments to `list_agent_gateways` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::ListAgentGatewaysRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::ListAgentGatewaysRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_agent_gateways(parent: nil, page_size: nil, page_token: nil, return_partial_success: nil) - # Pass arguments to `list_agent_gateways` via keyword arguments. Note that at - # least one keyword argument is 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 project and location from which the AgentGateways should be - # listed, specified in the format `projects/*/locations/*`. - # @param page_size [::Integer] - # Optional. Maximum number of AgentGateways to return per call. - # @param page_token [::String] - # Optional. The value returned by the last `ListAgentGatewaysResponse` - # Indicates that this is a continuation of a prior `ListAgentGateways` - # call, and that the system should return the next page of data. - # @param return_partial_success [::Boolean] - # Optional. If true, allow partial responses for multi-regional Aggregated - # List requests. Otherwise if one of the locations is down or unreachable, - # the Aggregated List request will fail. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::NetworkServices::V1::AgentGateway>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::NetworkServices::V1::AgentGateway>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/network_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::ListAgentGatewaysRequest.new - # - # # Call the list_agent_gateways method. - # result = client.list_agent_gateways 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::NetworkServices::V1::AgentGateway. - # p item - # end - # - def list_agent_gateways request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::ListAgentGatewaysRequest - - # Converts hash 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_agent_gateways.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::NetworkServices::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_agent_gateways.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_agent_gateways.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.call_rpc :list_agent_gateways, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @network_services_stub, :list_agent_gateways, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets details of a single AgentGateway. - # - # @overload get_agent_gateway(request, options = nil) - # Pass arguments to `get_agent_gateway` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::GetAgentGatewayRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::GetAgentGatewayRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_agent_gateway(name: nil) - # Pass arguments to `get_agent_gateway` via keyword arguments. Note that at - # least one keyword argument is 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. A name of the AgentGateway to get. Must be in the format - # `projects/*/locations/*/agentGateways/*`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::NetworkServices::V1::AgentGateway] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::NetworkServices::V1::AgentGateway] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/network_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::GetAgentGatewayRequest.new - # - # # Call the get_agent_gateway method. - # result = client.get_agent_gateway request - # - # # The returned object is of type Google::Cloud::NetworkServices::V1::AgentGateway. - # p result - # - def get_agent_gateway request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::GetAgentGatewayRequest - - # Converts hash 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_agent_gateway.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::NetworkServices::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_agent_gateway.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_agent_gateway.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.call_rpc :get_agent_gateway, 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 AgentGateway in a given project and location. - # - # @overload create_agent_gateway(request, options = nil) - # Pass arguments to `create_agent_gateway` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::CreateAgentGatewayRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::CreateAgentGatewayRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_agent_gateway(parent: nil, agent_gateway_id: nil, agent_gateway: nil) - # Pass arguments to `create_agent_gateway` via keyword arguments. Note that at - # least one keyword argument is 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 AgentGateway. Must be in the - # format `projects/*/locations/*`. - # @param agent_gateway_id [::String] - # Required. Short name of the AgentGateway resource to be created. - # @param agent_gateway [::Google::Cloud::NetworkServices::V1::AgentGateway, ::Hash] - # Required. AgentGateway resource to be created. - # - # @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_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::CreateAgentGatewayRequest.new - # - # # Call the create_agent_gateway method. - # result = client.create_agent_gateway 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_agent_gateway request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::CreateAgentGatewayRequest - - # Converts hash 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_agent_gateway.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::NetworkServices::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_agent_gateway.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_agent_gateway.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.call_rpc :create_agent_gateway, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the parameters of a single AgentGateway. - # - # @overload update_agent_gateway(request, options = nil) - # Pass arguments to `update_agent_gateway` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::UpdateAgentGatewayRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::UpdateAgentGatewayRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_agent_gateway(update_mask: nil, agent_gateway: nil) - # Pass arguments to `update_agent_gateway` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. Field mask is used to specify the fields to be overwritten in the - # AgentGateway resource by the update. - # The fields specified in the update_mask are relative to the resource, not - # the full request. A field will be overwritten if it is in the mask. If the - # user does not provide a mask then all fields will be overwritten. - # @param agent_gateway [::Google::Cloud::NetworkServices::V1::AgentGateway, ::Hash] - # Required. Updated AgentGateway 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_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::UpdateAgentGatewayRequest.new - # - # # Call the update_agent_gateway method. - # result = client.update_agent_gateway 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_agent_gateway request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::UpdateAgentGatewayRequest - - # Converts hash 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_agent_gateway.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::NetworkServices::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.agent_gateway&.name - header_params["agent_gateway.name"] = request.agent_gateway.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_agent_gateway.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_agent_gateway.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.call_rpc :update_agent_gateway, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a single AgentGateway. - # - # @overload delete_agent_gateway(request, options = nil) - # Pass arguments to `delete_agent_gateway` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::DeleteAgentGatewayRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::DeleteAgentGatewayRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_agent_gateway(name: nil, etag: nil) - # Pass arguments to `delete_agent_gateway` via keyword arguments. Note that at - # least one keyword argument is 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. A name of the AgentGateway to delete. Must be in the format - # `projects/*/locations/*/agentGateways/*`. - # @param etag [::String] - # Optional. The etag of the AgentGateway to delete. - # - # @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_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::DeleteAgentGatewayRequest.new - # - # # Call the delete_agent_gateway method. - # result = client.delete_agent_gateway 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_agent_gateway request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::DeleteAgentGatewayRequest - - # Converts hash 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_agent_gateway.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::NetworkServices::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_agent_gateway.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_agent_gateway.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.call_rpc :delete_agent_gateway, 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 NetworkServices API. - # - # This class represents the configuration for NetworkServices, - # 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::NetworkServices::V1::NetworkServices::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_endpoint_policies to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_endpoint_policies.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_endpoint_policies.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::NetworkServices::V1::NetworkServices::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. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `: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 = "networkservices.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 NetworkServices 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. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_endpoint_policies` - # @return [::Gapic::Config::Method] - # - attr_reader :list_endpoint_policies - ## - # RPC-specific configuration for `get_endpoint_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :get_endpoint_policy - ## - # RPC-specific configuration for `create_endpoint_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :create_endpoint_policy - ## - # RPC-specific configuration for `update_endpoint_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :update_endpoint_policy - ## - # RPC-specific configuration for `delete_endpoint_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_endpoint_policy - ## - # RPC-specific configuration for `list_wasm_plugin_versions` - # @return [::Gapic::Config::Method] - # - attr_reader :list_wasm_plugin_versions - ## - # RPC-specific configuration for `get_wasm_plugin_version` - # @return [::Gapic::Config::Method] - # - attr_reader :get_wasm_plugin_version - ## - # RPC-specific configuration for `create_wasm_plugin_version` - # @return [::Gapic::Config::Method] - # - attr_reader :create_wasm_plugin_version - ## - # RPC-specific configuration for `delete_wasm_plugin_version` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_wasm_plugin_version - ## - # RPC-specific configuration for `list_wasm_plugins` - # @return [::Gapic::Config::Method] - # - attr_reader :list_wasm_plugins - ## - # RPC-specific configuration for `get_wasm_plugin` - # @return [::Gapic::Config::Method] - # - attr_reader :get_wasm_plugin - ## - # RPC-specific configuration for `create_wasm_plugin` - # @return [::Gapic::Config::Method] - # - attr_reader :create_wasm_plugin - ## - # RPC-specific configuration for `update_wasm_plugin` - # @return [::Gapic::Config::Method] - # - attr_reader :update_wasm_plugin - ## - # RPC-specific configuration for `delete_wasm_plugin` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_wasm_plugin - ## - # RPC-specific configuration for `list_gateways` - # @return [::Gapic::Config::Method] - # - attr_reader :list_gateways - ## - # RPC-specific configuration for `get_gateway` - # @return [::Gapic::Config::Method] - # - attr_reader :get_gateway - ## - # RPC-specific configuration for `create_gateway` - # @return [::Gapic::Config::Method] - # - attr_reader :create_gateway - ## - # RPC-specific configuration for `update_gateway` - # @return [::Gapic::Config::Method] - # - attr_reader :update_gateway - ## - # RPC-specific configuration for `delete_gateway` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_gateway - ## - # RPC-specific configuration for `list_grpc_routes` - # @return [::Gapic::Config::Method] - # - attr_reader :list_grpc_routes - ## - # RPC-specific configuration for `get_grpc_route` - # @return [::Gapic::Config::Method] - # - attr_reader :get_grpc_route - ## - # RPC-specific configuration for `create_grpc_route` - # @return [::Gapic::Config::Method] - # - attr_reader :create_grpc_route - ## - # RPC-specific configuration for `update_grpc_route` - # @return [::Gapic::Config::Method] - # - attr_reader :update_grpc_route - ## - # RPC-specific configuration for `delete_grpc_route` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_grpc_route - ## - # RPC-specific configuration for `list_http_routes` - # @return [::Gapic::Config::Method] - # - attr_reader :list_http_routes - ## - # RPC-specific configuration for `get_http_route` - # @return [::Gapic::Config::Method] - # - attr_reader :get_http_route - ## - # RPC-specific configuration for `create_http_route` - # @return [::Gapic::Config::Method] - # - attr_reader :create_http_route - ## - # RPC-specific configuration for `update_http_route` - # @return [::Gapic::Config::Method] - # - attr_reader :update_http_route - ## - # RPC-specific configuration for `delete_http_route` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_http_route - ## - # RPC-specific configuration for `list_tcp_routes` - # @return [::Gapic::Config::Method] - # - attr_reader :list_tcp_routes - ## - # RPC-specific configuration for `get_tcp_route` - # @return [::Gapic::Config::Method] - # - attr_reader :get_tcp_route - ## - # RPC-specific configuration for `create_tcp_route` - # @return [::Gapic::Config::Method] - # - attr_reader :create_tcp_route - ## - # RPC-specific configuration for `update_tcp_route` - # @return [::Gapic::Config::Method] - # - attr_reader :update_tcp_route - ## - # RPC-specific configuration for `delete_tcp_route` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_tcp_route - ## - # RPC-specific configuration for `list_tls_routes` - # @return [::Gapic::Config::Method] - # - attr_reader :list_tls_routes - ## - # RPC-specific configuration for `get_tls_route` - # @return [::Gapic::Config::Method] - # - attr_reader :get_tls_route - ## - # RPC-specific configuration for `create_tls_route` - # @return [::Gapic::Config::Method] - # - attr_reader :create_tls_route - ## - # RPC-specific configuration for `update_tls_route` - # @return [::Gapic::Config::Method] - # - attr_reader :update_tls_route - ## - # RPC-specific configuration for `delete_tls_route` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_tls_route - ## - # RPC-specific configuration for `list_service_bindings` - # @return [::Gapic::Config::Method] - # - attr_reader :list_service_bindings - ## - # RPC-specific configuration for `get_service_binding` - # @return [::Gapic::Config::Method] - # - attr_reader :get_service_binding - ## - # RPC-specific configuration for `create_service_binding` - # @return [::Gapic::Config::Method] - # - attr_reader :create_service_binding - ## - # RPC-specific configuration for `update_service_binding` - # @return [::Gapic::Config::Method] - # - attr_reader :update_service_binding - ## - # RPC-specific configuration for `delete_service_binding` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_service_binding - ## - # RPC-specific configuration for `list_meshes` - # @return [::Gapic::Config::Method] - # - attr_reader :list_meshes - ## - # RPC-specific configuration for `get_mesh` - # @return [::Gapic::Config::Method] - # - attr_reader :get_mesh - ## - # RPC-specific configuration for `create_mesh` - # @return [::Gapic::Config::Method] - # - attr_reader :create_mesh - ## - # RPC-specific configuration for `update_mesh` - # @return [::Gapic::Config::Method] - # - attr_reader :update_mesh - ## - # RPC-specific configuration for `delete_mesh` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_mesh - ## - # RPC-specific configuration for `list_service_lb_policies` - # @return [::Gapic::Config::Method] - # - attr_reader :list_service_lb_policies - ## - # RPC-specific configuration for `get_service_lb_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :get_service_lb_policy - ## - # RPC-specific configuration for `create_service_lb_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :create_service_lb_policy - ## - # RPC-specific configuration for `update_service_lb_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :update_service_lb_policy - ## - # RPC-specific configuration for `delete_service_lb_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_service_lb_policy - ## - # RPC-specific configuration for `get_gateway_route_view` - # @return [::Gapic::Config::Method] - # - attr_reader :get_gateway_route_view - ## - # RPC-specific configuration for `get_mesh_route_view` - # @return [::Gapic::Config::Method] - # - attr_reader :get_mesh_route_view - ## - # RPC-specific configuration for `list_gateway_route_views` - # @return [::Gapic::Config::Method] - # - attr_reader :list_gateway_route_views - ## - # RPC-specific configuration for `list_mesh_route_views` - # @return [::Gapic::Config::Method] - # - attr_reader :list_mesh_route_views - ## - # RPC-specific configuration for `list_agent_gateways` - # @return [::Gapic::Config::Method] - # - attr_reader :list_agent_gateways - ## - # RPC-specific configuration for `get_agent_gateway` - # @return [::Gapic::Config::Method] - # - attr_reader :get_agent_gateway - ## - # RPC-specific configuration for `create_agent_gateway` - # @return [::Gapic::Config::Method] - # - attr_reader :create_agent_gateway - ## - # RPC-specific configuration for `update_agent_gateway` - # @return [::Gapic::Config::Method] - # - attr_reader :update_agent_gateway - ## - # RPC-specific configuration for `delete_agent_gateway` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_agent_gateway - - # @private - def initialize parent_rpcs = nil - list_endpoint_policies_config = parent_rpcs.list_endpoint_policies if parent_rpcs.respond_to? :list_endpoint_policies - @list_endpoint_policies = ::Gapic::Config::Method.new list_endpoint_policies_config - get_endpoint_policy_config = parent_rpcs.get_endpoint_policy if parent_rpcs.respond_to? :get_endpoint_policy - @get_endpoint_policy = ::Gapic::Config::Method.new get_endpoint_policy_config - create_endpoint_policy_config = parent_rpcs.create_endpoint_policy if parent_rpcs.respond_to? :create_endpoint_policy - @create_endpoint_policy = ::Gapic::Config::Method.new create_endpoint_policy_config - update_endpoint_policy_config = parent_rpcs.update_endpoint_policy if parent_rpcs.respond_to? :update_endpoint_policy - @update_endpoint_policy = ::Gapic::Config::Method.new update_endpoint_policy_config - delete_endpoint_policy_config = parent_rpcs.delete_endpoint_policy if parent_rpcs.respond_to? :delete_endpoint_policy - @delete_endpoint_policy = ::Gapic::Config::Method.new delete_endpoint_policy_config - list_wasm_plugin_versions_config = parent_rpcs.list_wasm_plugin_versions if parent_rpcs.respond_to? :list_wasm_plugin_versions - @list_wasm_plugin_versions = ::Gapic::Config::Method.new list_wasm_plugin_versions_config - get_wasm_plugin_version_config = parent_rpcs.get_wasm_plugin_version if parent_rpcs.respond_to? :get_wasm_plugin_version - @get_wasm_plugin_version = ::Gapic::Config::Method.new get_wasm_plugin_version_config - create_wasm_plugin_version_config = parent_rpcs.create_wasm_plugin_version if parent_rpcs.respond_to? :create_wasm_plugin_version - @create_wasm_plugin_version = ::Gapic::Config::Method.new create_wasm_plugin_version_config - delete_wasm_plugin_version_config = parent_rpcs.delete_wasm_plugin_version if parent_rpcs.respond_to? :delete_wasm_plugin_version - @delete_wasm_plugin_version = ::Gapic::Config::Method.new delete_wasm_plugin_version_config - list_wasm_plugins_config = parent_rpcs.list_wasm_plugins if parent_rpcs.respond_to? :list_wasm_plugins - @list_wasm_plugins = ::Gapic::Config::Method.new list_wasm_plugins_config - get_wasm_plugin_config = parent_rpcs.get_wasm_plugin if parent_rpcs.respond_to? :get_wasm_plugin - @get_wasm_plugin = ::Gapic::Config::Method.new get_wasm_plugin_config - create_wasm_plugin_config = parent_rpcs.create_wasm_plugin if parent_rpcs.respond_to? :create_wasm_plugin - @create_wasm_plugin = ::Gapic::Config::Method.new create_wasm_plugin_config - update_wasm_plugin_config = parent_rpcs.update_wasm_plugin if parent_rpcs.respond_to? :update_wasm_plugin - @update_wasm_plugin = ::Gapic::Config::Method.new update_wasm_plugin_config - delete_wasm_plugin_config = parent_rpcs.delete_wasm_plugin if parent_rpcs.respond_to? :delete_wasm_plugin - @delete_wasm_plugin = ::Gapic::Config::Method.new delete_wasm_plugin_config - list_gateways_config = parent_rpcs.list_gateways if parent_rpcs.respond_to? :list_gateways - @list_gateways = ::Gapic::Config::Method.new list_gateways_config - get_gateway_config = parent_rpcs.get_gateway if parent_rpcs.respond_to? :get_gateway - @get_gateway = ::Gapic::Config::Method.new get_gateway_config - create_gateway_config = parent_rpcs.create_gateway if parent_rpcs.respond_to? :create_gateway - @create_gateway = ::Gapic::Config::Method.new create_gateway_config - update_gateway_config = parent_rpcs.update_gateway if parent_rpcs.respond_to? :update_gateway - @update_gateway = ::Gapic::Config::Method.new update_gateway_config - delete_gateway_config = parent_rpcs.delete_gateway if parent_rpcs.respond_to? :delete_gateway - @delete_gateway = ::Gapic::Config::Method.new delete_gateway_config - list_grpc_routes_config = parent_rpcs.list_grpc_routes if parent_rpcs.respond_to? :list_grpc_routes - @list_grpc_routes = ::Gapic::Config::Method.new list_grpc_routes_config - get_grpc_route_config = parent_rpcs.get_grpc_route if parent_rpcs.respond_to? :get_grpc_route - @get_grpc_route = ::Gapic::Config::Method.new get_grpc_route_config - create_grpc_route_config = parent_rpcs.create_grpc_route if parent_rpcs.respond_to? :create_grpc_route - @create_grpc_route = ::Gapic::Config::Method.new create_grpc_route_config - update_grpc_route_config = parent_rpcs.update_grpc_route if parent_rpcs.respond_to? :update_grpc_route - @update_grpc_route = ::Gapic::Config::Method.new update_grpc_route_config - delete_grpc_route_config = parent_rpcs.delete_grpc_route if parent_rpcs.respond_to? :delete_grpc_route - @delete_grpc_route = ::Gapic::Config::Method.new delete_grpc_route_config - list_http_routes_config = parent_rpcs.list_http_routes if parent_rpcs.respond_to? :list_http_routes - @list_http_routes = ::Gapic::Config::Method.new list_http_routes_config - get_http_route_config = parent_rpcs.get_http_route if parent_rpcs.respond_to? :get_http_route - @get_http_route = ::Gapic::Config::Method.new get_http_route_config - create_http_route_config = parent_rpcs.create_http_route if parent_rpcs.respond_to? :create_http_route - @create_http_route = ::Gapic::Config::Method.new create_http_route_config - update_http_route_config = parent_rpcs.update_http_route if parent_rpcs.respond_to? :update_http_route - @update_http_route = ::Gapic::Config::Method.new update_http_route_config - delete_http_route_config = parent_rpcs.delete_http_route if parent_rpcs.respond_to? :delete_http_route - @delete_http_route = ::Gapic::Config::Method.new delete_http_route_config - list_tcp_routes_config = parent_rpcs.list_tcp_routes if parent_rpcs.respond_to? :list_tcp_routes - @list_tcp_routes = ::Gapic::Config::Method.new list_tcp_routes_config - get_tcp_route_config = parent_rpcs.get_tcp_route if parent_rpcs.respond_to? :get_tcp_route - @get_tcp_route = ::Gapic::Config::Method.new get_tcp_route_config - create_tcp_route_config = parent_rpcs.create_tcp_route if parent_rpcs.respond_to? :create_tcp_route - @create_tcp_route = ::Gapic::Config::Method.new create_tcp_route_config - update_tcp_route_config = parent_rpcs.update_tcp_route if parent_rpcs.respond_to? :update_tcp_route - @update_tcp_route = ::Gapic::Config::Method.new update_tcp_route_config - delete_tcp_route_config = parent_rpcs.delete_tcp_route if parent_rpcs.respond_to? :delete_tcp_route - @delete_tcp_route = ::Gapic::Config::Method.new delete_tcp_route_config - list_tls_routes_config = parent_rpcs.list_tls_routes if parent_rpcs.respond_to? :list_tls_routes - @list_tls_routes = ::Gapic::Config::Method.new list_tls_routes_config - get_tls_route_config = parent_rpcs.get_tls_route if parent_rpcs.respond_to? :get_tls_route - @get_tls_route = ::Gapic::Config::Method.new get_tls_route_config - create_tls_route_config = parent_rpcs.create_tls_route if parent_rpcs.respond_to? :create_tls_route - @create_tls_route = ::Gapic::Config::Method.new create_tls_route_config - update_tls_route_config = parent_rpcs.update_tls_route if parent_rpcs.respond_to? :update_tls_route - @update_tls_route = ::Gapic::Config::Method.new update_tls_route_config - delete_tls_route_config = parent_rpcs.delete_tls_route if parent_rpcs.respond_to? :delete_tls_route - @delete_tls_route = ::Gapic::Config::Method.new delete_tls_route_config - list_service_bindings_config = parent_rpcs.list_service_bindings if parent_rpcs.respond_to? :list_service_bindings - @list_service_bindings = ::Gapic::Config::Method.new list_service_bindings_config - get_service_binding_config = parent_rpcs.get_service_binding if parent_rpcs.respond_to? :get_service_binding - @get_service_binding = ::Gapic::Config::Method.new get_service_binding_config - create_service_binding_config = parent_rpcs.create_service_binding if parent_rpcs.respond_to? :create_service_binding - @create_service_binding = ::Gapic::Config::Method.new create_service_binding_config - update_service_binding_config = parent_rpcs.update_service_binding if parent_rpcs.respond_to? :update_service_binding - @update_service_binding = ::Gapic::Config::Method.new update_service_binding_config - delete_service_binding_config = parent_rpcs.delete_service_binding if parent_rpcs.respond_to? :delete_service_binding - @delete_service_binding = ::Gapic::Config::Method.new delete_service_binding_config - list_meshes_config = parent_rpcs.list_meshes if parent_rpcs.respond_to? :list_meshes - @list_meshes = ::Gapic::Config::Method.new list_meshes_config - get_mesh_config = parent_rpcs.get_mesh if parent_rpcs.respond_to? :get_mesh - @get_mesh = ::Gapic::Config::Method.new get_mesh_config - create_mesh_config = parent_rpcs.create_mesh if parent_rpcs.respond_to? :create_mesh - @create_mesh = ::Gapic::Config::Method.new create_mesh_config - update_mesh_config = parent_rpcs.update_mesh if parent_rpcs.respond_to? :update_mesh - @update_mesh = ::Gapic::Config::Method.new update_mesh_config - delete_mesh_config = parent_rpcs.delete_mesh if parent_rpcs.respond_to? :delete_mesh - @delete_mesh = ::Gapic::Config::Method.new delete_mesh_config - list_service_lb_policies_config = parent_rpcs.list_service_lb_policies if parent_rpcs.respond_to? :list_service_lb_policies - @list_service_lb_policies = ::Gapic::Config::Method.new list_service_lb_policies_config - get_service_lb_policy_config = parent_rpcs.get_service_lb_policy if parent_rpcs.respond_to? :get_service_lb_policy - @get_service_lb_policy = ::Gapic::Config::Method.new get_service_lb_policy_config - create_service_lb_policy_config = parent_rpcs.create_service_lb_policy if parent_rpcs.respond_to? :create_service_lb_policy - @create_service_lb_policy = ::Gapic::Config::Method.new create_service_lb_policy_config - update_service_lb_policy_config = parent_rpcs.update_service_lb_policy if parent_rpcs.respond_to? :update_service_lb_policy - @update_service_lb_policy = ::Gapic::Config::Method.new update_service_lb_policy_config - delete_service_lb_policy_config = parent_rpcs.delete_service_lb_policy if parent_rpcs.respond_to? :delete_service_lb_policy - @delete_service_lb_policy = ::Gapic::Config::Method.new delete_service_lb_policy_config - get_gateway_route_view_config = parent_rpcs.get_gateway_route_view if parent_rpcs.respond_to? :get_gateway_route_view - @get_gateway_route_view = ::Gapic::Config::Method.new get_gateway_route_view_config - get_mesh_route_view_config = parent_rpcs.get_mesh_route_view if parent_rpcs.respond_to? :get_mesh_route_view - @get_mesh_route_view = ::Gapic::Config::Method.new get_mesh_route_view_config - list_gateway_route_views_config = parent_rpcs.list_gateway_route_views if parent_rpcs.respond_to? :list_gateway_route_views - @list_gateway_route_views = ::Gapic::Config::Method.new list_gateway_route_views_config - list_mesh_route_views_config = parent_rpcs.list_mesh_route_views if parent_rpcs.respond_to? :list_mesh_route_views - @list_mesh_route_views = ::Gapic::Config::Method.new list_mesh_route_views_config - list_agent_gateways_config = parent_rpcs.list_agent_gateways if parent_rpcs.respond_to? :list_agent_gateways - @list_agent_gateways = ::Gapic::Config::Method.new list_agent_gateways_config - get_agent_gateway_config = parent_rpcs.get_agent_gateway if parent_rpcs.respond_to? :get_agent_gateway - @get_agent_gateway = ::Gapic::Config::Method.new get_agent_gateway_config - create_agent_gateway_config = parent_rpcs.create_agent_gateway if parent_rpcs.respond_to? :create_agent_gateway - @create_agent_gateway = ::Gapic::Config::Method.new create_agent_gateway_config - update_agent_gateway_config = parent_rpcs.update_agent_gateway if parent_rpcs.respond_to? :update_agent_gateway - @update_agent_gateway = ::Gapic::Config::Method.new update_agent_gateway_config - delete_agent_gateway_config = parent_rpcs.delete_agent_gateway if parent_rpcs.respond_to? :delete_agent_gateway - @delete_agent_gateway = ::Gapic::Config::Method.new delete_agent_gateway_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/network_services/credentials.rb b/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/network_services/credentials.rb deleted file mode 100644 index 2c356ec37e85..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/network_services/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 NetworkServices - module V1 - module NetworkServices - # Credentials for the NetworkServices 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_services-v1/lib/google/cloud/network_services/v1/network_services/operations.rb b/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/network_services/operations.rb deleted file mode 100644 index 415eb7efdc3e..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/network_services/operations.rb +++ /dev/null @@ -1,843 +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 NetworkServices - module V1 - module NetworkServices - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "networkservices.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the NetworkServices 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 NetworkServices 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::NetworkServices::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::NetworkServices::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::NetworkServices::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::NetworkServices::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::NetworkServices::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. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `: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 = "networkservices.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. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `: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_services-v1/lib/google/cloud/network_services/v1/network_services/paths.rb b/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/network_services/paths.rb deleted file mode 100644 index a3ea409e1195..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/network_services/paths.rb +++ /dev/null @@ -1,531 +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 NetworkServices - module V1 - module NetworkServices - # Path helper methods for the NetworkServices API. - module Paths - ## - # Create a fully-qualified Address resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/regions/{region}/addresses/{address}` - # - # @param project [String] - # @param region [String] - # @param address [String] - # - # @return [::String] - def address_path project:, region:, address: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "region cannot contain /" if region.to_s.include? "/" - - "projects/#{project}/regions/#{region}/addresses/#{address}" - end - - ## - # Create a fully-qualified AgentGateway resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/agentGateways/{agent_gateway}` - # - # @param project [String] - # @param location [String] - # @param agent_gateway [String] - # - # @return [::String] - def agent_gateway_path project:, location:, agent_gateway: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/agentGateways/#{agent_gateway}" - end - - ## - # Create a fully-qualified AuthorizationPolicy resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/authorizationPolicies/{authorization_policy}` - # - # @param project [String] - # @param location [String] - # @param authorization_policy [String] - # - # @return [::String] - def authorization_policy_path project:, location:, authorization_policy: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/authorizationPolicies/#{authorization_policy}" - end - - ## - # Create a fully-qualified BackendService resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/backendServices/{backend_service}` - # - # @param project [String] - # @param location [String] - # @param backend_service [String] - # - # @return [::String] - def backend_service_path project:, location:, backend_service: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/backendServices/#{backend_service}" - end - - ## - # Create a fully-qualified Certificate resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/certificates/{certificate}` - # - # @param project [String] - # @param location [String] - # @param certificate [String] - # - # @return [::String] - def certificate_path project:, location:, certificate: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/certificates/#{certificate}" - end - - ## - # Create a fully-qualified ClientTlsPolicy resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/clientTlsPolicies/{client_tls_policy}` - # - # @param project [String] - # @param location [String] - # @param client_tls_policy [String] - # - # @return [::String] - def client_tls_policy_path project:, location:, client_tls_policy: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/clientTlsPolicies/#{client_tls_policy}" - end - - ## - # Create a fully-qualified EndpointPolicy resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/endpointPolicies/{endpoint_policy}` - # - # @param project [String] - # @param location [String] - # @param endpoint_policy [String] - # - # @return [::String] - def endpoint_policy_path project:, location:, endpoint_policy: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/endpointPolicies/#{endpoint_policy}" - end - - ## - # Create a fully-qualified Gateway resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/gateways/{gateway}` - # - # @param project [String] - # @param location [String] - # @param gateway [String] - # - # @return [::String] - def gateway_path project:, location:, gateway: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/gateways/#{gateway}" - end - - ## - # Create a fully-qualified GatewayRouteView resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/gateways/{gateway}/routeViews/{route_view}` - # - # @param project [String] - # @param location [String] - # @param gateway [String] - # @param route_view [String] - # - # @return [::String] - def gateway_route_view_path project:, location:, gateway:, route_view: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "gateway cannot contain /" if gateway.to_s.include? "/" - - "projects/#{project}/locations/#{location}/gateways/#{gateway}/routeViews/#{route_view}" - end - - ## - # Create a fully-qualified GatewaySecurityPolicy resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/gatewaySecurityPolicies/{gateway_security_policy}` - # - # @param project [String] - # @param location [String] - # @param gateway_security_policy [String] - # - # @return [::String] - def gateway_security_policy_path project:, location:, gateway_security_policy: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/gatewaySecurityPolicies/#{gateway_security_policy}" - end - - ## - # Create a fully-qualified GrpcRoute resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/grpcRoutes/{grpc_route}` - # - # @param project [String] - # @param location [String] - # @param grpc_route [String] - # - # @return [::String] - def grpc_route_path project:, location:, grpc_route: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/grpcRoutes/#{grpc_route}" - end - - ## - # Create a fully-qualified HttpRoute resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/httpRoutes/{http_route}` - # - # @param project [String] - # @param location [String] - # @param http_route [String] - # - # @return [::String] - def http_route_path project:, location:, http_route: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/httpRoutes/#{http_route}" - end - - ## - # Create a fully-qualified Location resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}` - # - # @param project [String] - # @param location [String] - # - # @return [::String] - def location_path project:, location: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - - "projects/#{project}/locations/#{location}" - end - - ## - # Create a fully-qualified Mesh resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/meshes/{mesh}` - # - # @param project [String] - # @param location [String] - # @param mesh [String] - # - # @return [::String] - def mesh_path project:, location:, mesh: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/meshes/#{mesh}" - end - - ## - # Create a fully-qualified MeshRouteView resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/meshes/{mesh}/routeViews/{route_view}` - # - # @param project [String] - # @param location [String] - # @param mesh [String] - # @param route_view [String] - # - # @return [::String] - def mesh_route_view_path project:, location:, mesh:, route_view: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "mesh cannot contain /" if mesh.to_s.include? "/" - - "projects/#{project}/locations/#{location}/meshes/#{mesh}/routeViews/#{route_view}" - end - - ## - # Create a fully-qualified Network resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/global/networks/{network}` - # - # @param project [String] - # @param network [String] - # - # @return [::String] - def network_path project:, network: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - - "projects/#{project}/global/networks/#{network}" - end - - ## - # Create a fully-qualified ServerTlsPolicy resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/serverTlsPolicies/{server_tls_policy}` - # - # @param project [String] - # @param location [String] - # @param server_tls_policy [String] - # - # @return [::String] - def server_tls_policy_path project:, location:, server_tls_policy: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/serverTlsPolicies/#{server_tls_policy}" - end - - ## - # Create a fully-qualified Service resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/namespaces/{namespace}/services/{service}` - # - # @param project [String] - # @param location [String] - # @param namespace [String] - # @param service [String] - # - # @return [::String] - def service_path project:, location:, namespace:, service: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "namespace cannot contain /" if namespace.to_s.include? "/" - - "projects/#{project}/locations/#{location}/namespaces/#{namespace}/services/#{service}" - end - - ## - # Create a fully-qualified ServiceBinding resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/serviceBindings/{service_binding}` - # - # @param project [String] - # @param location [String] - # @param service_binding [String] - # - # @return [::String] - def service_binding_path project:, location:, service_binding: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/serviceBindings/#{service_binding}" - end - - ## - # Create a fully-qualified ServiceLbPolicy resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/serviceLbPolicies/{service_lb_policy}` - # - # @param project [String] - # @param location [String] - # @param service_lb_policy [String] - # - # @return [::String] - def service_lb_policy_path project:, location:, service_lb_policy: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/serviceLbPolicies/#{service_lb_policy}" - end - - ## - # Create a fully-qualified Subnetwork resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/regions/{region}/subnetworks/{subnetwork}` - # - # @param project [String] - # @param region [String] - # @param subnetwork [String] - # - # @return [::String] - def subnetwork_path project:, region:, subnetwork: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "region cannot contain /" if region.to_s.include? "/" - - "projects/#{project}/regions/#{region}/subnetworks/#{subnetwork}" - end - - ## - # Create a fully-qualified TargetTcpProxy resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/targetTcpProxies/{target_tcp_proxy}` - # - # @param project [String] - # @param location [String] - # @param target_tcp_proxy [String] - # - # @return [::String] - def target_tcp_proxy_path project:, location:, target_tcp_proxy: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/targetTcpProxies/#{target_tcp_proxy}" - end - - ## - # Create a fully-qualified TcpRoute resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/tcpRoutes/{tcp_route}` - # - # @param project [String] - # @param location [String] - # @param tcp_route [String] - # - # @return [::String] - def tcp_route_path project:, location:, tcp_route: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/tcpRoutes/#{tcp_route}" - end - - ## - # Create a fully-qualified TlsRoute resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/tlsRoutes/{tls_route}` - # - # @param project [String] - # @param location [String] - # @param tls_route [String] - # - # @return [::String] - def tls_route_path project:, location:, tls_route: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/tlsRoutes/#{tls_route}" - end - - ## - # Create a fully-qualified WasmPlugin resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/wasmPlugins/{wasm_plugin}` - # - # @param project [String] - # @param location [String] - # @param wasm_plugin [String] - # - # @return [::String] - def wasm_plugin_path project:, location:, wasm_plugin: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/wasmPlugins/#{wasm_plugin}" - end - - ## - # Create a fully-qualified WasmPluginVersion resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/wasmPlugins/{wasm_plugin}/versions/{wasm_plugin_version}` - # - # @param project [String] - # @param location [String] - # @param wasm_plugin [String] - # @param wasm_plugin_version [String] - # - # @return [::String] - def wasm_plugin_version_path project:, location:, wasm_plugin:, wasm_plugin_version: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "wasm_plugin cannot contain /" if wasm_plugin.to_s.include? "/" - - "projects/#{project}/locations/#{location}/wasmPlugins/#{wasm_plugin}/versions/#{wasm_plugin_version}" - end - - extend self - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/network_services/rest.rb b/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/network_services/rest.rb deleted file mode 100644 index 0820eaf0d414..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/network_services/rest.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/network_services/v1/version" -require "google/cloud/network_services/v1/bindings_override" - -require "google/cloud/network_services/v1/network_services/credentials" -require "google/cloud/network_services/v1/network_services/paths" -require "google/cloud/network_services/v1/network_services/rest/operations" -require "google/cloud/network_services/v1/network_services/rest/client" - -module Google - module Cloud - module NetworkServices - module V1 - ## - # Service describing handlers for resources. - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/network_services/v1/network_services/rest" - # client = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new - # - module NetworkServices - # 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_services/v1/network_services/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/network_services/rest/client.rb b/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/network_services/rest/client.rb deleted file mode 100644 index 15f371e0f354..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/network_services/rest/client.rb +++ /dev/null @@ -1,6471 +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/networkservices/v1/network_services_pb" -require "google/cloud/network_services/v1/network_services/rest/service_stub" -require "google/cloud/location/rest" -require "google/iam/v1/rest" - -module Google - module Cloud - module NetworkServices - module V1 - module NetworkServices - module Rest - ## - # REST client for the NetworkServices service. - # - # Service describing handlers for resources. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "networkservices.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :network_services_stub - - ## - # Configure the NetworkServices Client class. - # - # See {::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all NetworkServices clients - # ::Google::Cloud::NetworkServices::V1::NetworkServices::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", "NetworkServices", "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 NetworkServices 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::NetworkServices::V1::NetworkServices::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 - @network_services_stub.universe_domain - end - - ## - # Create a new NetworkServices REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the NetworkServices 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::NetworkServices::V1::NetworkServices::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 - - @network_services_stub = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @network_services_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 = @network_services_stub.endpoint - config.universe_domain = @network_services_stub.universe_domain - config.bindings_override = @config.bindings_override - config.logger = @network_services_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 = @network_services_stub.endpoint - config.universe_domain = @network_services_stub.universe_domain - config.bindings_override = @config.bindings_override - config.logger = @network_services_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::NetworkServices::V1::NetworkServices::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 - @network_services_stub.logger - end - - # Service calls - - ## - # Lists EndpointPolicies in a given project and location. - # - # @overload list_endpoint_policies(request, options = nil) - # Pass arguments to `list_endpoint_policies` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::ListEndpointPoliciesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::ListEndpointPoliciesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_endpoint_policies(parent: nil, page_size: nil, page_token: nil, return_partial_success: nil) - # Pass arguments to `list_endpoint_policies` via keyword arguments. Note that at - # least one keyword argument is 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 project and location from which the EndpointPolicies should - # be listed, specified in the format `projects/*/locations/*`. - # @param page_size [::Integer] - # Maximum number of EndpointPolicies to return per call. - # @param page_token [::String] - # The value returned by the last `ListEndpointPoliciesResponse` - # Indicates that this is a continuation of a prior - # `ListEndpointPolicies` call, and that the system should return the - # next page of data. - # @param return_partial_success [::Boolean] - # Optional. If true, allow partial responses for multi-regional Aggregated - # List requests. Otherwise if one of the locations is down or unreachable, - # the Aggregated List request will fail. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::EndpointPolicy>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::EndpointPolicy>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/network_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::ListEndpointPoliciesRequest.new - # - # # Call the list_endpoint_policies method. - # result = client.list_endpoint_policies 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::NetworkServices::V1::EndpointPolicy. - # p item - # end - # - def list_endpoint_policies request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::ListEndpointPoliciesRequest - - # Converts hash 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_endpoint_policies.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::NetworkServices::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_endpoint_policies.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_endpoint_policies.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.list_endpoint_policies request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @network_services_stub, :list_endpoint_policies, "endpoint_policies", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets details of a single EndpointPolicy. - # - # @overload get_endpoint_policy(request, options = nil) - # Pass arguments to `get_endpoint_policy` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::GetEndpointPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::GetEndpointPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_endpoint_policy(name: nil) - # Pass arguments to `get_endpoint_policy` via keyword arguments. Note that at - # least one keyword argument is 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. A name of the EndpointPolicy to get. Must be in the format - # `projects/*/locations/*/endpointPolicies/*`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::NetworkServices::V1::EndpointPolicy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::NetworkServices::V1::EndpointPolicy] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/network_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::GetEndpointPolicyRequest.new - # - # # Call the get_endpoint_policy method. - # result = client.get_endpoint_policy request - # - # # The returned object is of type Google::Cloud::NetworkServices::V1::EndpointPolicy. - # p result - # - def get_endpoint_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::GetEndpointPolicyRequest - - # Converts hash 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_endpoint_policy.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::NetworkServices::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_endpoint_policy.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_endpoint_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.get_endpoint_policy 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 EndpointPolicy in a given project and location. - # - # @overload create_endpoint_policy(request, options = nil) - # Pass arguments to `create_endpoint_policy` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::CreateEndpointPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::CreateEndpointPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_endpoint_policy(parent: nil, endpoint_policy_id: nil, endpoint_policy: nil) - # Pass arguments to `create_endpoint_policy` via keyword arguments. Note that at - # least one keyword argument is 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 EndpointPolicy. Must be in the - # format `projects/*/locations/*`. - # @param endpoint_policy_id [::String] - # Required. Short name of the EndpointPolicy resource to be created. - # E.g. "CustomECS". - # @param endpoint_policy [::Google::Cloud::NetworkServices::V1::EndpointPolicy, ::Hash] - # Required. EndpointPolicy resource to be created. - # @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_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::CreateEndpointPolicyRequest.new - # - # # Call the create_endpoint_policy method. - # result = client.create_endpoint_policy 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_endpoint_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::CreateEndpointPolicyRequest - - # Converts hash 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_endpoint_policy.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::NetworkServices::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_endpoint_policy.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_endpoint_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.create_endpoint_policy request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the parameters of a single EndpointPolicy. - # - # @overload update_endpoint_policy(request, options = nil) - # Pass arguments to `update_endpoint_policy` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::UpdateEndpointPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::UpdateEndpointPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_endpoint_policy(update_mask: nil, endpoint_policy: nil) - # Pass arguments to `update_endpoint_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. Field mask is used to specify the fields to be overwritten in the - # EndpointPolicy resource by the update. - # The fields specified in the update_mask are relative to the resource, not - # the full request. A field will be overwritten if it is in the mask. If the - # user does not provide a mask then all fields will be overwritten. - # @param endpoint_policy [::Google::Cloud::NetworkServices::V1::EndpointPolicy, ::Hash] - # Required. Updated EndpointPolicy 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_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::UpdateEndpointPolicyRequest.new - # - # # Call the update_endpoint_policy method. - # result = client.update_endpoint_policy 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_endpoint_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::UpdateEndpointPolicyRequest - - # Converts hash 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_endpoint_policy.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::NetworkServices::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_endpoint_policy.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_endpoint_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.update_endpoint_policy request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a single EndpointPolicy. - # - # @overload delete_endpoint_policy(request, options = nil) - # Pass arguments to `delete_endpoint_policy` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::DeleteEndpointPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::DeleteEndpointPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_endpoint_policy(name: nil) - # Pass arguments to `delete_endpoint_policy` via keyword arguments. Note that at - # least one keyword argument is 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. A name of the EndpointPolicy to delete. Must be in the format - # `projects/*/locations/*/endpointPolicies/*`. - # @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_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::DeleteEndpointPolicyRequest.new - # - # # Call the delete_endpoint_policy method. - # result = client.delete_endpoint_policy 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_endpoint_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::DeleteEndpointPolicyRequest - - # Converts hash 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_endpoint_policy.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::NetworkServices::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_endpoint_policy.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_endpoint_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.delete_endpoint_policy request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists `WasmPluginVersion` resources in a given project and - # location. - # - # @overload list_wasm_plugin_versions(request, options = nil) - # Pass arguments to `list_wasm_plugin_versions` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::ListWasmPluginVersionsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::ListWasmPluginVersionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_wasm_plugin_versions(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_wasm_plugin_versions` via keyword arguments. Note that at - # least one keyword argument is 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 `WasmPlugin` resource whose `WasmPluginVersion`s - # are listed, specified in the following format: - # `projects/{project}/locations/global/wasmPlugins/{wasm_plugin}`. - # @param page_size [::Integer] - # Maximum number of `WasmPluginVersion` resources to return per - # call. If not specified, at most 50 `WasmPluginVersion` resources are - # returned. The maximum value is 1000; values above 1000 are coerced to - # 1000. - # @param page_token [::String] - # The value returned by the last `ListWasmPluginVersionsResponse` call. - # Indicates that this is a continuation of a prior - # `ListWasmPluginVersions` call, and that the - # next page of data is to be returned. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::WasmPluginVersion>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::WasmPluginVersion>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/network_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::ListWasmPluginVersionsRequest.new - # - # # Call the list_wasm_plugin_versions method. - # result = client.list_wasm_plugin_versions 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::NetworkServices::V1::WasmPluginVersion. - # p item - # end - # - def list_wasm_plugin_versions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::ListWasmPluginVersionsRequest - - # Converts hash 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_wasm_plugin_versions.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::NetworkServices::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_wasm_plugin_versions.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_wasm_plugin_versions.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.list_wasm_plugin_versions request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @network_services_stub, :list_wasm_plugin_versions, "wasm_plugin_versions", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets details of the specified `WasmPluginVersion` resource. - # - # @overload get_wasm_plugin_version(request, options = nil) - # Pass arguments to `get_wasm_plugin_version` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::GetWasmPluginVersionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::GetWasmPluginVersionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_wasm_plugin_version(name: nil) - # Pass arguments to `get_wasm_plugin_version` via keyword arguments. Note that at - # least one keyword argument is 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. A name of the `WasmPluginVersion` resource to get. Must be in - # the format - # `projects/{project}/locations/global/wasmPlugins/{wasm_plugin}/versions/{wasm_plugin_version}`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::NetworkServices::V1::WasmPluginVersion] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::NetworkServices::V1::WasmPluginVersion] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/network_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::GetWasmPluginVersionRequest.new - # - # # Call the get_wasm_plugin_version method. - # result = client.get_wasm_plugin_version request - # - # # The returned object is of type Google::Cloud::NetworkServices::V1::WasmPluginVersion. - # p result - # - def get_wasm_plugin_version request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::GetWasmPluginVersionRequest - - # Converts hash 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_wasm_plugin_version.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::NetworkServices::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_wasm_plugin_version.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_wasm_plugin_version.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.get_wasm_plugin_version 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 `WasmPluginVersion` resource in a given project - # and location. - # - # @overload create_wasm_plugin_version(request, options = nil) - # Pass arguments to `create_wasm_plugin_version` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::CreateWasmPluginVersionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::CreateWasmPluginVersionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_wasm_plugin_version(parent: nil, wasm_plugin_version_id: nil, wasm_plugin_version: nil) - # Pass arguments to `create_wasm_plugin_version` via keyword arguments. Note that at - # least one keyword argument is 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 `WasmPluginVersion` resource. Must be - # in the format - # `projects/{project}/locations/global/wasmPlugins/{wasm_plugin}`. - # @param wasm_plugin_version_id [::String] - # Required. User-provided ID of the `WasmPluginVersion` resource to be - # created. - # @param wasm_plugin_version [::Google::Cloud::NetworkServices::V1::WasmPluginVersion, ::Hash] - # Required. `WasmPluginVersion` resource to be created. - # @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_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::CreateWasmPluginVersionRequest.new - # - # # Call the create_wasm_plugin_version method. - # result = client.create_wasm_plugin_version 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_wasm_plugin_version request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::CreateWasmPluginVersionRequest - - # Converts hash 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_wasm_plugin_version.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::NetworkServices::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_wasm_plugin_version.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_wasm_plugin_version.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.create_wasm_plugin_version 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 the specified `WasmPluginVersion` resource. - # - # @overload delete_wasm_plugin_version(request, options = nil) - # Pass arguments to `delete_wasm_plugin_version` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::DeleteWasmPluginVersionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::DeleteWasmPluginVersionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_wasm_plugin_version(name: nil) - # Pass arguments to `delete_wasm_plugin_version` via keyword arguments. Note that at - # least one keyword argument is 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. A name of the `WasmPluginVersion` resource to delete. Must be in - # the format - # `projects/{project}/locations/global/wasmPlugins/{wasm_plugin}/versions/{wasm_plugin_version}`. - # @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_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::DeleteWasmPluginVersionRequest.new - # - # # Call the delete_wasm_plugin_version method. - # result = client.delete_wasm_plugin_version 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_wasm_plugin_version request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::DeleteWasmPluginVersionRequest - - # Converts hash 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_wasm_plugin_version.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::NetworkServices::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_wasm_plugin_version.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_wasm_plugin_version.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.delete_wasm_plugin_version request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists `WasmPlugin` resources in a given project and - # location. - # - # @overload list_wasm_plugins(request, options = nil) - # Pass arguments to `list_wasm_plugins` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::ListWasmPluginsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::ListWasmPluginsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_wasm_plugins(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_wasm_plugins` via keyword arguments. Note that at - # least one keyword argument is 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 project and location from which the `WasmPlugin` resources - # are listed, specified in the following format: - # `projects/{project}/locations/global`. - # @param page_size [::Integer] - # Maximum number of `WasmPlugin` resources to return per call. - # If not specified, at most 50 `WasmPlugin` resources are returned. - # The maximum value is 1000; values above 1000 are coerced to 1000. - # @param page_token [::String] - # The value returned by the last `ListWasmPluginsResponse` call. - # Indicates that this is a continuation of a prior - # `ListWasmPlugins` call, and that the - # next page of data is to be returned. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::WasmPlugin>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::WasmPlugin>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/network_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::ListWasmPluginsRequest.new - # - # # Call the list_wasm_plugins method. - # result = client.list_wasm_plugins 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::NetworkServices::V1::WasmPlugin. - # p item - # end - # - def list_wasm_plugins request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::ListWasmPluginsRequest - - # Converts hash 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_wasm_plugins.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::NetworkServices::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_wasm_plugins.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_wasm_plugins.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.list_wasm_plugins request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @network_services_stub, :list_wasm_plugins, "wasm_plugins", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets details of the specified `WasmPlugin` resource. - # - # @overload get_wasm_plugin(request, options = nil) - # Pass arguments to `get_wasm_plugin` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::GetWasmPluginRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::GetWasmPluginRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_wasm_plugin(name: nil, view: nil) - # Pass arguments to `get_wasm_plugin` via keyword arguments. Note that at - # least one keyword argument is 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. A name of the `WasmPlugin` resource to get. Must be in the - # format `projects/{project}/locations/global/wasmPlugins/{wasm_plugin}`. - # @param view [::Google::Cloud::NetworkServices::V1::WasmPluginView] - # Determines how much data must be returned in the response. See - # [AIP-157](https://google.aip.dev/157). - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::NetworkServices::V1::WasmPlugin] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::NetworkServices::V1::WasmPlugin] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/network_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::GetWasmPluginRequest.new - # - # # Call the get_wasm_plugin method. - # result = client.get_wasm_plugin request - # - # # The returned object is of type Google::Cloud::NetworkServices::V1::WasmPlugin. - # p result - # - def get_wasm_plugin request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::GetWasmPluginRequest - - # Converts hash 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_wasm_plugin.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::NetworkServices::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_wasm_plugin.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_wasm_plugin.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.get_wasm_plugin 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 `WasmPlugin` resource in a given project - # and location. - # - # @overload create_wasm_plugin(request, options = nil) - # Pass arguments to `create_wasm_plugin` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::CreateWasmPluginRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::CreateWasmPluginRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_wasm_plugin(parent: nil, wasm_plugin_id: nil, wasm_plugin: nil) - # Pass arguments to `create_wasm_plugin` via keyword arguments. Note that at - # least one keyword argument is 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 `WasmPlugin` resource. Must be in the - # format `projects/{project}/locations/global`. - # @param wasm_plugin_id [::String] - # Required. User-provided ID of the `WasmPlugin` resource to be created. - # @param wasm_plugin [::Google::Cloud::NetworkServices::V1::WasmPlugin, ::Hash] - # Required. `WasmPlugin` resource to be created. - # @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_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::CreateWasmPluginRequest.new - # - # # Call the create_wasm_plugin method. - # result = client.create_wasm_plugin 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_wasm_plugin request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::CreateWasmPluginRequest - - # Converts hash 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_wasm_plugin.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::NetworkServices::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_wasm_plugin.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_wasm_plugin.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.create_wasm_plugin request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the parameters of the specified `WasmPlugin` resource. - # - # @overload update_wasm_plugin(request, options = nil) - # Pass arguments to `update_wasm_plugin` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::UpdateWasmPluginRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::UpdateWasmPluginRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_wasm_plugin(update_mask: nil, wasm_plugin: nil) - # Pass arguments to `update_wasm_plugin` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. Used to specify the fields to be overwritten in the - # `WasmPlugin` resource by the update. - # The fields specified in the `update_mask` field are relative to the - # resource, not the full request. - # An omitted `update_mask` field is treated as an implied `update_mask` - # field equivalent to all fields that are populated (that have a non-empty - # value). - # The `update_mask` field supports a special value `*`, which means that - # each field in the given `WasmPlugin` resource (including the empty ones) - # replaces the current value. - # @param wasm_plugin [::Google::Cloud::NetworkServices::V1::WasmPlugin, ::Hash] - # Required. Updated `WasmPlugin` 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_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::UpdateWasmPluginRequest.new - # - # # Call the update_wasm_plugin method. - # result = client.update_wasm_plugin 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_wasm_plugin request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::UpdateWasmPluginRequest - - # Converts hash 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_wasm_plugin.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::NetworkServices::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_wasm_plugin.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_wasm_plugin.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.update_wasm_plugin 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 the specified `WasmPlugin` resource. - # - # @overload delete_wasm_plugin(request, options = nil) - # Pass arguments to `delete_wasm_plugin` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::DeleteWasmPluginRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::DeleteWasmPluginRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_wasm_plugin(name: nil) - # Pass arguments to `delete_wasm_plugin` via keyword arguments. Note that at - # least one keyword argument is 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. A name of the `WasmPlugin` resource to delete. Must be in the - # format `projects/{project}/locations/global/wasmPlugins/{wasm_plugin}`. - # @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_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::DeleteWasmPluginRequest.new - # - # # Call the delete_wasm_plugin method. - # result = client.delete_wasm_plugin 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_wasm_plugin request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::DeleteWasmPluginRequest - - # Converts hash 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_wasm_plugin.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::NetworkServices::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_wasm_plugin.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_wasm_plugin.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.delete_wasm_plugin request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists Gateways in a given project and location. - # - # @overload list_gateways(request, options = nil) - # Pass arguments to `list_gateways` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::ListGatewaysRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::ListGatewaysRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_gateways(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_gateways` via keyword arguments. Note that at - # least one keyword argument is 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 project and location from which the Gateways should be - # listed, specified in the format `projects/*/locations/*`. - # @param page_size [::Integer] - # Maximum number of Gateways to return per call. - # @param page_token [::String] - # The value returned by the last `ListGatewaysResponse` - # Indicates that this is a continuation of a prior `ListGateways` call, - # and that the system should return the next page of data. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::Gateway>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::Gateway>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/network_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::ListGatewaysRequest.new - # - # # Call the list_gateways method. - # result = client.list_gateways 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::NetworkServices::V1::Gateway. - # p item - # end - # - def list_gateways request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::ListGatewaysRequest - - # Converts hash 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_gateways.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::NetworkServices::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_gateways.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_gateways.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.list_gateways request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @network_services_stub, :list_gateways, "gateways", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets details of a single Gateway. - # - # @overload get_gateway(request, options = nil) - # Pass arguments to `get_gateway` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::GetGatewayRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::GetGatewayRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_gateway(name: nil) - # Pass arguments to `get_gateway` via keyword arguments. Note that at - # least one keyword argument is 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. A name of the Gateway to get. Must be in the format - # `projects/*/locations/*/gateways/*`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::NetworkServices::V1::Gateway] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::NetworkServices::V1::Gateway] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/network_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::GetGatewayRequest.new - # - # # Call the get_gateway method. - # result = client.get_gateway request - # - # # The returned object is of type Google::Cloud::NetworkServices::V1::Gateway. - # p result - # - def get_gateway request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::GetGatewayRequest - - # Converts hash 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_gateway.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::NetworkServices::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_gateway.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_gateway.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.get_gateway 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 Gateway in a given project and location. - # - # @overload create_gateway(request, options = nil) - # Pass arguments to `create_gateway` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::CreateGatewayRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::CreateGatewayRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_gateway(parent: nil, gateway_id: nil, gateway: nil) - # Pass arguments to `create_gateway` via keyword arguments. Note that at - # least one keyword argument is 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 Gateway. Must be in the - # format `projects/*/locations/*`. - # @param gateway_id [::String] - # Required. Short name of the Gateway resource to be created. - # @param gateway [::Google::Cloud::NetworkServices::V1::Gateway, ::Hash] - # Required. Gateway resource to be created. - # @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_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::CreateGatewayRequest.new - # - # # Call the create_gateway method. - # result = client.create_gateway 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_gateway request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::CreateGatewayRequest - - # Converts hash 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_gateway.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::NetworkServices::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_gateway.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_gateway.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.create_gateway request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the parameters of a single Gateway. - # - # @overload update_gateway(request, options = nil) - # Pass arguments to `update_gateway` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::UpdateGatewayRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::UpdateGatewayRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_gateway(update_mask: nil, gateway: nil) - # Pass arguments to `update_gateway` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. Field mask is used to specify the fields to be overwritten in the - # Gateway resource by the update. - # The fields specified in the update_mask are relative to the resource, not - # the full request. A field will be overwritten if it is in the mask. If the - # user does not provide a mask then all fields will be overwritten. - # @param gateway [::Google::Cloud::NetworkServices::V1::Gateway, ::Hash] - # Required. Updated Gateway 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_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::UpdateGatewayRequest.new - # - # # Call the update_gateway method. - # result = client.update_gateway 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_gateway request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::UpdateGatewayRequest - - # Converts hash 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_gateway.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::NetworkServices::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_gateway.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_gateway.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.update_gateway request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a single Gateway. - # - # @overload delete_gateway(request, options = nil) - # Pass arguments to `delete_gateway` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::DeleteGatewayRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::DeleteGatewayRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_gateway(name: nil) - # Pass arguments to `delete_gateway` via keyword arguments. Note that at - # least one keyword argument is 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. A name of the Gateway to delete. Must be in the format - # `projects/*/locations/*/gateways/*`. - # @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_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::DeleteGatewayRequest.new - # - # # Call the delete_gateway method. - # result = client.delete_gateway 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_gateway request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::DeleteGatewayRequest - - # Converts hash 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_gateway.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::NetworkServices::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_gateway.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_gateway.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.delete_gateway request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists GrpcRoutes in a given project and location. - # - # @overload list_grpc_routes(request, options = nil) - # Pass arguments to `list_grpc_routes` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::ListGrpcRoutesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::ListGrpcRoutesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_grpc_routes(parent: nil, page_size: nil, page_token: nil, return_partial_success: nil) - # Pass arguments to `list_grpc_routes` via keyword arguments. Note that at - # least one keyword argument is 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 project and location from which the GrpcRoutes should be - # listed, specified in the format `projects/*/locations/*`. - # @param page_size [::Integer] - # Maximum number of GrpcRoutes to return per call. - # @param page_token [::String] - # The value returned by the last `ListGrpcRoutesResponse` - # Indicates that this is a continuation of a prior `ListGrpcRoutes` call, - # and that the system should return the next page of data. - # @param return_partial_success [::Boolean] - # Optional. If true, allow partial responses for multi-regional Aggregated - # List requests. Otherwise if one of the locations is down or unreachable, - # the Aggregated List request will fail. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::GrpcRoute>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::GrpcRoute>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/network_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::ListGrpcRoutesRequest.new - # - # # Call the list_grpc_routes method. - # result = client.list_grpc_routes 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::NetworkServices::V1::GrpcRoute. - # p item - # end - # - def list_grpc_routes request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::ListGrpcRoutesRequest - - # Converts hash 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_grpc_routes.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::NetworkServices::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_grpc_routes.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_grpc_routes.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.list_grpc_routes request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @network_services_stub, :list_grpc_routes, "grpc_routes", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets details of a single GrpcRoute. - # - # @overload get_grpc_route(request, options = nil) - # Pass arguments to `get_grpc_route` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::GetGrpcRouteRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::GetGrpcRouteRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_grpc_route(name: nil) - # Pass arguments to `get_grpc_route` via keyword arguments. Note that at - # least one keyword argument is 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. A name of the GrpcRoute to get. Must be in the format - # `projects/*/locations/*/grpcRoutes/*`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::NetworkServices::V1::GrpcRoute] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::NetworkServices::V1::GrpcRoute] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/network_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::GetGrpcRouteRequest.new - # - # # Call the get_grpc_route method. - # result = client.get_grpc_route request - # - # # The returned object is of type Google::Cloud::NetworkServices::V1::GrpcRoute. - # p result - # - def get_grpc_route request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::GetGrpcRouteRequest - - # Converts hash 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_grpc_route.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::NetworkServices::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_grpc_route.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_grpc_route.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.get_grpc_route 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 GrpcRoute in a given project and location. - # - # @overload create_grpc_route(request, options = nil) - # Pass arguments to `create_grpc_route` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::CreateGrpcRouteRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::CreateGrpcRouteRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_grpc_route(parent: nil, grpc_route_id: nil, grpc_route: nil) - # Pass arguments to `create_grpc_route` via keyword arguments. Note that at - # least one keyword argument is 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 GrpcRoute. Must be in the - # format `projects/*/locations/*`. - # @param grpc_route_id [::String] - # Required. Short name of the GrpcRoute resource to be created. - # @param grpc_route [::Google::Cloud::NetworkServices::V1::GrpcRoute, ::Hash] - # Required. GrpcRoute resource to be created. - # @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_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::CreateGrpcRouteRequest.new - # - # # Call the create_grpc_route method. - # result = client.create_grpc_route 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_grpc_route request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::CreateGrpcRouteRequest - - # Converts hash 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_grpc_route.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::NetworkServices::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_grpc_route.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_grpc_route.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.create_grpc_route request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the parameters of a single GrpcRoute. - # - # @overload update_grpc_route(request, options = nil) - # Pass arguments to `update_grpc_route` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::UpdateGrpcRouteRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::UpdateGrpcRouteRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_grpc_route(update_mask: nil, grpc_route: nil) - # Pass arguments to `update_grpc_route` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. Field mask is used to specify the fields to be overwritten in the - # GrpcRoute resource by the update. - # The fields specified in the update_mask are relative to the resource, not - # the full request. A field will be overwritten if it is in the mask. If the - # user does not provide a mask then all fields will be overwritten. - # @param grpc_route [::Google::Cloud::NetworkServices::V1::GrpcRoute, ::Hash] - # Required. Updated GrpcRoute 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_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::UpdateGrpcRouteRequest.new - # - # # Call the update_grpc_route method. - # result = client.update_grpc_route 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_grpc_route request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::UpdateGrpcRouteRequest - - # Converts hash 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_grpc_route.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::NetworkServices::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_grpc_route.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_grpc_route.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.update_grpc_route request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a single GrpcRoute. - # - # @overload delete_grpc_route(request, options = nil) - # Pass arguments to `delete_grpc_route` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::DeleteGrpcRouteRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::DeleteGrpcRouteRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_grpc_route(name: nil) - # Pass arguments to `delete_grpc_route` via keyword arguments. Note that at - # least one keyword argument is 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. A name of the GrpcRoute to delete. Must be in the format - # `projects/*/locations/*/grpcRoutes/*`. - # @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_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::DeleteGrpcRouteRequest.new - # - # # Call the delete_grpc_route method. - # result = client.delete_grpc_route 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_grpc_route request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::DeleteGrpcRouteRequest - - # Converts hash 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_grpc_route.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::NetworkServices::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_grpc_route.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_grpc_route.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.delete_grpc_route request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists HttpRoute in a given project and location. - # - # @overload list_http_routes(request, options = nil) - # Pass arguments to `list_http_routes` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::ListHttpRoutesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::ListHttpRoutesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_http_routes(parent: nil, page_size: nil, page_token: nil, return_partial_success: nil, filter: nil) - # Pass arguments to `list_http_routes` via keyword arguments. Note that at - # least one keyword argument is 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 project and location from which the HttpRoutes should be - # listed, specified in the format `projects/*/locations/*`. - # @param page_size [::Integer] - # Maximum number of HttpRoutes to return per call. - # @param page_token [::String] - # The value returned by the last `ListHttpRoutesResponse` - # Indicates that this is a continuation of a prior `ListHttpRoutes` call, - # and that the system should return the next page of data. - # @param return_partial_success [::Boolean] - # Optional. If true, allow partial responses for multi-regional Aggregated - # List requests. Otherwise if one of the locations is down or unreachable, - # the Aggregated List request will fail. - # @param filter [::String] - # Optional. Filter expression to restrict the list. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::HttpRoute>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::HttpRoute>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/network_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::ListHttpRoutesRequest.new - # - # # Call the list_http_routes method. - # result = client.list_http_routes 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::NetworkServices::V1::HttpRoute. - # p item - # end - # - def list_http_routes request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::ListHttpRoutesRequest - - # Converts hash 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_http_routes.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::NetworkServices::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_http_routes.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_http_routes.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.list_http_routes request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @network_services_stub, :list_http_routes, "http_routes", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets details of a single HttpRoute. - # - # @overload get_http_route(request, options = nil) - # Pass arguments to `get_http_route` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::GetHttpRouteRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::GetHttpRouteRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_http_route(name: nil) - # Pass arguments to `get_http_route` via keyword arguments. Note that at - # least one keyword argument is 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. A name of the HttpRoute to get. Must be in the format - # `projects/*/locations/*/httpRoutes/*`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::NetworkServices::V1::HttpRoute] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::NetworkServices::V1::HttpRoute] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/network_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::GetHttpRouteRequest.new - # - # # Call the get_http_route method. - # result = client.get_http_route request - # - # # The returned object is of type Google::Cloud::NetworkServices::V1::HttpRoute. - # p result - # - def get_http_route request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::GetHttpRouteRequest - - # Converts hash 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_http_route.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::NetworkServices::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_http_route.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_http_route.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.get_http_route 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 HttpRoute in a given project and location. - # - # @overload create_http_route(request, options = nil) - # Pass arguments to `create_http_route` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::CreateHttpRouteRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::CreateHttpRouteRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_http_route(parent: nil, http_route_id: nil, http_route: nil, request_id: nil) - # Pass arguments to `create_http_route` via keyword arguments. Note that at - # least one keyword argument is 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 HttpRoute. Must be in the - # format `projects/*/locations/*`. - # @param http_route_id [::String] - # Required. Short name of the HttpRoute resource to be created. - # @param http_route [::Google::Cloud::NetworkServices::V1::HttpRoute, ::Hash] - # Required. HttpRoute resource to be created. - # @param request_id [::String] - # Optional. Idempotent request UUID. - # @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_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::CreateHttpRouteRequest.new - # - # # Call the create_http_route method. - # result = client.create_http_route 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_http_route request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::CreateHttpRouteRequest - - # Converts hash 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_http_route.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::NetworkServices::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_http_route.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_http_route.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.create_http_route request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the parameters of a single HttpRoute. - # - # @overload update_http_route(request, options = nil) - # Pass arguments to `update_http_route` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::UpdateHttpRouteRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::UpdateHttpRouteRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_http_route(update_mask: nil, http_route: nil) - # Pass arguments to `update_http_route` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. Field mask is used to specify the fields to be overwritten in the - # HttpRoute resource by the update. - # The fields specified in the update_mask are relative to the resource, not - # the full request. A field will be overwritten if it is in the mask. If the - # user does not provide a mask then all fields will be overwritten. - # @param http_route [::Google::Cloud::NetworkServices::V1::HttpRoute, ::Hash] - # Required. Updated HttpRoute 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_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::UpdateHttpRouteRequest.new - # - # # Call the update_http_route method. - # result = client.update_http_route 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_http_route request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::UpdateHttpRouteRequest - - # Converts hash 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_http_route.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::NetworkServices::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_http_route.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_http_route.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.update_http_route request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a single HttpRoute. - # - # @overload delete_http_route(request, options = nil) - # Pass arguments to `delete_http_route` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::DeleteHttpRouteRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::DeleteHttpRouteRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_http_route(name: nil) - # Pass arguments to `delete_http_route` via keyword arguments. Note that at - # least one keyword argument is 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. A name of the HttpRoute to delete. Must be in the format - # `projects/*/locations/*/httpRoutes/*`. - # @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_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::DeleteHttpRouteRequest.new - # - # # Call the delete_http_route method. - # result = client.delete_http_route 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_http_route request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::DeleteHttpRouteRequest - - # Converts hash 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_http_route.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::NetworkServices::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_http_route.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_http_route.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.delete_http_route request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists TcpRoute in a given project and location. - # - # @overload list_tcp_routes(request, options = nil) - # Pass arguments to `list_tcp_routes` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::ListTcpRoutesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::ListTcpRoutesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_tcp_routes(parent: nil, page_size: nil, page_token: nil, return_partial_success: nil) - # Pass arguments to `list_tcp_routes` via keyword arguments. Note that at - # least one keyword argument is 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 project and location from which the TcpRoutes should be - # listed, specified in the format `projects/*/locations/*`. - # @param page_size [::Integer] - # Maximum number of TcpRoutes to return per call. - # @param page_token [::String] - # The value returned by the last `ListTcpRoutesResponse` - # Indicates that this is a continuation of a prior `ListTcpRoutes` call, - # and that the system should return the next page of data. - # @param return_partial_success [::Boolean] - # Optional. If true, allow partial responses for multi-regional Aggregated - # List requests. Otherwise if one of the locations is down or unreachable, - # the Aggregated List request will fail. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::TcpRoute>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::TcpRoute>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/network_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::ListTcpRoutesRequest.new - # - # # Call the list_tcp_routes method. - # result = client.list_tcp_routes 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::NetworkServices::V1::TcpRoute. - # p item - # end - # - def list_tcp_routes request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::ListTcpRoutesRequest - - # Converts hash 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_tcp_routes.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::NetworkServices::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_tcp_routes.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_tcp_routes.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.list_tcp_routes request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @network_services_stub, :list_tcp_routes, "tcp_routes", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets details of a single TcpRoute. - # - # @overload get_tcp_route(request, options = nil) - # Pass arguments to `get_tcp_route` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::GetTcpRouteRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::GetTcpRouteRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_tcp_route(name: nil) - # Pass arguments to `get_tcp_route` via keyword arguments. Note that at - # least one keyword argument is 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. A name of the TcpRoute to get. Must be in the format - # `projects/*/locations/*/tcpRoutes/*`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::NetworkServices::V1::TcpRoute] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::NetworkServices::V1::TcpRoute] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/network_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::GetTcpRouteRequest.new - # - # # Call the get_tcp_route method. - # result = client.get_tcp_route request - # - # # The returned object is of type Google::Cloud::NetworkServices::V1::TcpRoute. - # p result - # - def get_tcp_route request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::GetTcpRouteRequest - - # Converts hash 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_tcp_route.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::NetworkServices::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_tcp_route.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_tcp_route.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.get_tcp_route 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 TcpRoute in a given project and location. - # - # @overload create_tcp_route(request, options = nil) - # Pass arguments to `create_tcp_route` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::CreateTcpRouteRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::CreateTcpRouteRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_tcp_route(parent: nil, tcp_route_id: nil, tcp_route: nil) - # Pass arguments to `create_tcp_route` via keyword arguments. Note that at - # least one keyword argument is 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 TcpRoute. Must be in the - # format `projects/*/locations/*`. - # @param tcp_route_id [::String] - # Required. Short name of the TcpRoute resource to be created. - # @param tcp_route [::Google::Cloud::NetworkServices::V1::TcpRoute, ::Hash] - # Required. TcpRoute resource to be created. - # @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_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::CreateTcpRouteRequest.new - # - # # Call the create_tcp_route method. - # result = client.create_tcp_route 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_tcp_route request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::CreateTcpRouteRequest - - # Converts hash 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_tcp_route.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::NetworkServices::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_tcp_route.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_tcp_route.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.create_tcp_route request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the parameters of a single TcpRoute. - # - # @overload update_tcp_route(request, options = nil) - # Pass arguments to `update_tcp_route` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::UpdateTcpRouteRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::UpdateTcpRouteRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_tcp_route(update_mask: nil, tcp_route: nil) - # Pass arguments to `update_tcp_route` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. Field mask is used to specify the fields to be overwritten in the - # TcpRoute resource by the update. - # The fields specified in the update_mask are relative to the resource, not - # the full request. A field will be overwritten if it is in the mask. If the - # user does not provide a mask then all fields will be overwritten. - # @param tcp_route [::Google::Cloud::NetworkServices::V1::TcpRoute, ::Hash] - # Required. Updated TcpRoute 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_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::UpdateTcpRouteRequest.new - # - # # Call the update_tcp_route method. - # result = client.update_tcp_route 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_tcp_route request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::UpdateTcpRouteRequest - - # Converts hash 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_tcp_route.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::NetworkServices::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_tcp_route.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_tcp_route.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.update_tcp_route request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a single TcpRoute. - # - # @overload delete_tcp_route(request, options = nil) - # Pass arguments to `delete_tcp_route` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::DeleteTcpRouteRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::DeleteTcpRouteRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_tcp_route(name: nil) - # Pass arguments to `delete_tcp_route` via keyword arguments. Note that at - # least one keyword argument is 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. A name of the TcpRoute to delete. Must be in the format - # `projects/*/locations/*/tcpRoutes/*`. - # @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_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::DeleteTcpRouteRequest.new - # - # # Call the delete_tcp_route method. - # result = client.delete_tcp_route 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_tcp_route request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::DeleteTcpRouteRequest - - # Converts hash 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_tcp_route.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::NetworkServices::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_tcp_route.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_tcp_route.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.delete_tcp_route request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists TlsRoute in a given project and location. - # - # @overload list_tls_routes(request, options = nil) - # Pass arguments to `list_tls_routes` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::ListTlsRoutesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::ListTlsRoutesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_tls_routes(parent: nil, page_size: nil, page_token: nil, return_partial_success: nil) - # Pass arguments to `list_tls_routes` via keyword arguments. Note that at - # least one keyword argument is 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 project and location from which the TlsRoutes should be - # listed, specified in the format `projects/*/locations/*`. - # @param page_size [::Integer] - # Maximum number of TlsRoutes to return per call. - # @param page_token [::String] - # The value returned by the last `ListTlsRoutesResponse` - # Indicates that this is a continuation of a prior `ListTlsRoutes` call, - # and that the system should return the next page of data. - # @param return_partial_success [::Boolean] - # Optional. If true, allow partial responses for multi-regional Aggregated - # List requests. Otherwise if one of the locations is down or unreachable, - # the Aggregated List request will fail. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::TlsRoute>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::TlsRoute>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/network_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::ListTlsRoutesRequest.new - # - # # Call the list_tls_routes method. - # result = client.list_tls_routes 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::NetworkServices::V1::TlsRoute. - # p item - # end - # - def list_tls_routes request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::ListTlsRoutesRequest - - # Converts hash 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_tls_routes.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::NetworkServices::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_tls_routes.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_tls_routes.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.list_tls_routes request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @network_services_stub, :list_tls_routes, "tls_routes", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets details of a single TlsRoute. - # - # @overload get_tls_route(request, options = nil) - # Pass arguments to `get_tls_route` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::GetTlsRouteRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::GetTlsRouteRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_tls_route(name: nil) - # Pass arguments to `get_tls_route` via keyword arguments. Note that at - # least one keyword argument is 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. A name of the TlsRoute to get. Must be in the format - # `projects/*/locations/*/tlsRoutes/*`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::NetworkServices::V1::TlsRoute] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::NetworkServices::V1::TlsRoute] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/network_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::GetTlsRouteRequest.new - # - # # Call the get_tls_route method. - # result = client.get_tls_route request - # - # # The returned object is of type Google::Cloud::NetworkServices::V1::TlsRoute. - # p result - # - def get_tls_route request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::GetTlsRouteRequest - - # Converts hash 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_tls_route.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::NetworkServices::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_tls_route.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_tls_route.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.get_tls_route 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 TlsRoute in a given project and location. - # - # @overload create_tls_route(request, options = nil) - # Pass arguments to `create_tls_route` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::CreateTlsRouteRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::CreateTlsRouteRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_tls_route(parent: nil, tls_route_id: nil, tls_route: nil) - # Pass arguments to `create_tls_route` via keyword arguments. Note that at - # least one keyword argument is 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 TlsRoute. Must be in the - # format `projects/*/locations/*`. - # @param tls_route_id [::String] - # Required. Short name of the TlsRoute resource to be created. - # @param tls_route [::Google::Cloud::NetworkServices::V1::TlsRoute, ::Hash] - # Required. TlsRoute resource to be created. - # @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_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::CreateTlsRouteRequest.new - # - # # Call the create_tls_route method. - # result = client.create_tls_route 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_tls_route request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::CreateTlsRouteRequest - - # Converts hash 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_tls_route.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::NetworkServices::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_tls_route.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_tls_route.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.create_tls_route request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the parameters of a single TlsRoute. - # - # @overload update_tls_route(request, options = nil) - # Pass arguments to `update_tls_route` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::UpdateTlsRouteRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::UpdateTlsRouteRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_tls_route(update_mask: nil, tls_route: nil) - # Pass arguments to `update_tls_route` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. Field mask is used to specify the fields to be overwritten in the - # TlsRoute resource by the update. - # The fields specified in the update_mask are relative to the resource, not - # the full request. A field will be overwritten if it is in the mask. If the - # user does not provide a mask then all fields will be overwritten. - # @param tls_route [::Google::Cloud::NetworkServices::V1::TlsRoute, ::Hash] - # Required. Updated TlsRoute 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_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::UpdateTlsRouteRequest.new - # - # # Call the update_tls_route method. - # result = client.update_tls_route 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_tls_route request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::UpdateTlsRouteRequest - - # Converts hash 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_tls_route.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::NetworkServices::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_tls_route.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_tls_route.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.update_tls_route request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a single TlsRoute. - # - # @overload delete_tls_route(request, options = nil) - # Pass arguments to `delete_tls_route` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::DeleteTlsRouteRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::DeleteTlsRouteRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_tls_route(name: nil) - # Pass arguments to `delete_tls_route` via keyword arguments. Note that at - # least one keyword argument is 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. A name of the TlsRoute to delete. Must be in the format - # `projects/*/locations/*/tlsRoutes/*`. - # @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_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::DeleteTlsRouteRequest.new - # - # # Call the delete_tls_route method. - # result = client.delete_tls_route 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_tls_route request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::DeleteTlsRouteRequest - - # Converts hash 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_tls_route.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::NetworkServices::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_tls_route.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_tls_route.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.delete_tls_route request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists ServiceBinding in a given project and location. - # - # @overload list_service_bindings(request, options = nil) - # Pass arguments to `list_service_bindings` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::ListServiceBindingsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::ListServiceBindingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_service_bindings(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_service_bindings` via keyword arguments. Note that at - # least one keyword argument is 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 project and location from which the ServiceBindings should be - # listed, specified in the format `projects/*/locations/*`. - # @param page_size [::Integer] - # Maximum number of ServiceBindings to return per call. - # @param page_token [::String] - # The value returned by the last `ListServiceBindingsResponse` - # Indicates that this is a continuation of a prior `ListRouters` call, - # and that the system should return the next page of data. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::ServiceBinding>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::ServiceBinding>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/network_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::ListServiceBindingsRequest.new - # - # # Call the list_service_bindings method. - # result = client.list_service_bindings 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::NetworkServices::V1::ServiceBinding. - # p item - # end - # - def list_service_bindings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::ListServiceBindingsRequest - - # Converts hash 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_service_bindings.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::NetworkServices::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_service_bindings.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_service_bindings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.list_service_bindings request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @network_services_stub, :list_service_bindings, "service_bindings", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets details of a single ServiceBinding. - # - # @overload get_service_binding(request, options = nil) - # Pass arguments to `get_service_binding` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::GetServiceBindingRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::GetServiceBindingRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_service_binding(name: nil) - # Pass arguments to `get_service_binding` via keyword arguments. Note that at - # least one keyword argument is 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. A name of the ServiceBinding to get. Must be in the format - # `projects/*/locations/*/serviceBindings/*`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::NetworkServices::V1::ServiceBinding] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::NetworkServices::V1::ServiceBinding] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/network_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::GetServiceBindingRequest.new - # - # # Call the get_service_binding method. - # result = client.get_service_binding request - # - # # The returned object is of type Google::Cloud::NetworkServices::V1::ServiceBinding. - # p result - # - def get_service_binding request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::GetServiceBindingRequest - - # Converts hash 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_service_binding.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::NetworkServices::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_service_binding.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_service_binding.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.get_service_binding 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 ServiceBinding in a given project and location. - # - # @overload create_service_binding(request, options = nil) - # Pass arguments to `create_service_binding` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::CreateServiceBindingRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::CreateServiceBindingRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_service_binding(parent: nil, service_binding_id: nil, service_binding: nil) - # Pass arguments to `create_service_binding` via keyword arguments. Note that at - # least one keyword argument is 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 ServiceBinding. Must be in the - # format `projects/*/locations/*`. - # @param service_binding_id [::String] - # Required. Short name of the ServiceBinding resource to be created. - # @param service_binding [::Google::Cloud::NetworkServices::V1::ServiceBinding, ::Hash] - # Required. ServiceBinding resource to be created. - # @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_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::CreateServiceBindingRequest.new - # - # # Call the create_service_binding method. - # result = client.create_service_binding 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_service_binding request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::CreateServiceBindingRequest - - # Converts hash 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_service_binding.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::NetworkServices::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_service_binding.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_service_binding.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.create_service_binding request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the parameters of a single ServiceBinding. - # - # @overload update_service_binding(request, options = nil) - # Pass arguments to `update_service_binding` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::UpdateServiceBindingRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::UpdateServiceBindingRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_service_binding(update_mask: nil, service_binding: nil) - # Pass arguments to `update_service_binding` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. Field mask is used to specify the fields to be overwritten in the - # ServiceBinding resource by the update. - # The fields specified in the update_mask are relative to the resource, not - # the full request. A field will be overwritten if it is in the mask. If the - # user does not provide a mask then all fields will be overwritten. - # @param service_binding [::Google::Cloud::NetworkServices::V1::ServiceBinding, ::Hash] - # Required. Updated ServiceBinding 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_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::UpdateServiceBindingRequest.new - # - # # Call the update_service_binding method. - # result = client.update_service_binding 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_service_binding request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::UpdateServiceBindingRequest - - # Converts hash 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_service_binding.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::NetworkServices::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_service_binding.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_service_binding.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.update_service_binding request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a single ServiceBinding. - # - # @overload delete_service_binding(request, options = nil) - # Pass arguments to `delete_service_binding` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::DeleteServiceBindingRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::DeleteServiceBindingRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_service_binding(name: nil) - # Pass arguments to `delete_service_binding` via keyword arguments. Note that at - # least one keyword argument is 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. A name of the ServiceBinding to delete. Must be in the format - # `projects/*/locations/*/serviceBindings/*`. - # @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_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::DeleteServiceBindingRequest.new - # - # # Call the delete_service_binding method. - # result = client.delete_service_binding 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_service_binding request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::DeleteServiceBindingRequest - - # Converts hash 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_service_binding.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::NetworkServices::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_service_binding.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_service_binding.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.delete_service_binding request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists Meshes in a given project and location. - # - # @overload list_meshes(request, options = nil) - # Pass arguments to `list_meshes` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::ListMeshesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::ListMeshesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_meshes(parent: nil, page_size: nil, page_token: nil, return_partial_success: nil) - # Pass arguments to `list_meshes` via keyword arguments. Note that at - # least one keyword argument is 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 project and location from which the Meshes should be - # listed, specified in the format `projects/*/locations/*`. - # @param page_size [::Integer] - # Maximum number of Meshes to return per call. - # @param page_token [::String] - # The value returned by the last `ListMeshesResponse` - # Indicates that this is a continuation of a prior `ListMeshes` call, - # and that the system should return the next page of data. - # @param return_partial_success [::Boolean] - # Optional. If true, allow partial responses for multi-regional Aggregated - # List requests. Otherwise if one of the locations is down or unreachable, - # the Aggregated List request will fail. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::Mesh>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::Mesh>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/network_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::ListMeshesRequest.new - # - # # Call the list_meshes method. - # result = client.list_meshes 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::NetworkServices::V1::Mesh. - # p item - # end - # - def list_meshes request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::ListMeshesRequest - - # Converts hash 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_meshes.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::NetworkServices::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_meshes.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_meshes.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.list_meshes request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @network_services_stub, :list_meshes, "meshes", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets details of a single Mesh. - # - # @overload get_mesh(request, options = nil) - # Pass arguments to `get_mesh` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::GetMeshRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::GetMeshRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_mesh(name: nil) - # Pass arguments to `get_mesh` via keyword arguments. Note that at - # least one keyword argument is 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. A name of the Mesh to get. Must be in the format - # `projects/*/locations/*/meshes/*`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::NetworkServices::V1::Mesh] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::NetworkServices::V1::Mesh] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/network_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::GetMeshRequest.new - # - # # Call the get_mesh method. - # result = client.get_mesh request - # - # # The returned object is of type Google::Cloud::NetworkServices::V1::Mesh. - # p result - # - def get_mesh request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::GetMeshRequest - - # Converts hash 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_mesh.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::NetworkServices::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_mesh.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_mesh.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.get_mesh 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 Mesh in a given project and location. - # - # @overload create_mesh(request, options = nil) - # Pass arguments to `create_mesh` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::CreateMeshRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::CreateMeshRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_mesh(parent: nil, mesh_id: nil, mesh: nil) - # Pass arguments to `create_mesh` via keyword arguments. Note that at - # least one keyword argument is 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 Mesh. Must be in the - # format `projects/*/locations/*`. - # @param mesh_id [::String] - # Required. Short name of the Mesh resource to be created. - # @param mesh [::Google::Cloud::NetworkServices::V1::Mesh, ::Hash] - # Required. Mesh resource to be created. - # @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_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::CreateMeshRequest.new - # - # # Call the create_mesh method. - # result = client.create_mesh 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_mesh request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::CreateMeshRequest - - # Converts hash 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_mesh.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::NetworkServices::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_mesh.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_mesh.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.create_mesh request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the parameters of a single Mesh. - # - # @overload update_mesh(request, options = nil) - # Pass arguments to `update_mesh` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::UpdateMeshRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::UpdateMeshRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_mesh(update_mask: nil, mesh: nil) - # Pass arguments to `update_mesh` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. Field mask is used to specify the fields to be overwritten in the - # Mesh resource by the update. - # The fields specified in the update_mask are relative to the resource, not - # the full request. A field will be overwritten if it is in the mask. If the - # user does not provide a mask then all fields will be overwritten. - # @param mesh [::Google::Cloud::NetworkServices::V1::Mesh, ::Hash] - # Required. Updated Mesh 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_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::UpdateMeshRequest.new - # - # # Call the update_mesh method. - # result = client.update_mesh 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_mesh request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::UpdateMeshRequest - - # Converts hash 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_mesh.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::NetworkServices::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_mesh.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_mesh.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.update_mesh request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a single Mesh. - # - # @overload delete_mesh(request, options = nil) - # Pass arguments to `delete_mesh` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::DeleteMeshRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::DeleteMeshRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_mesh(name: nil) - # Pass arguments to `delete_mesh` via keyword arguments. Note that at - # least one keyword argument is 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. A name of the Mesh to delete. Must be in the format - # `projects/*/locations/*/meshes/*`. - # @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_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::DeleteMeshRequest.new - # - # # Call the delete_mesh method. - # result = client.delete_mesh 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_mesh request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::DeleteMeshRequest - - # Converts hash 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_mesh.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::NetworkServices::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_mesh.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_mesh.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.delete_mesh request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists ServiceLbPolicies in a given project and location. - # - # @overload list_service_lb_policies(request, options = nil) - # Pass arguments to `list_service_lb_policies` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::ListServiceLbPoliciesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::ListServiceLbPoliciesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_service_lb_policies(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_service_lb_policies` via keyword arguments. Note that at - # least one keyword argument is 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 project and location from which the ServiceLbPolicies should - # be listed, specified in the format - # `projects/{project}/locations/{location}`. - # @param page_size [::Integer] - # Maximum number of ServiceLbPolicies to return per call. - # @param page_token [::String] - # The value returned by the last `ListServiceLbPoliciesResponse` - # Indicates that this is a continuation of a prior `ListRouters` call, - # and that the system should return the next page of data. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::ServiceLbPolicy>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::ServiceLbPolicy>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/network_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::ListServiceLbPoliciesRequest.new - # - # # Call the list_service_lb_policies method. - # result = client.list_service_lb_policies 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::NetworkServices::V1::ServiceLbPolicy. - # p item - # end - # - def list_service_lb_policies request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::ListServiceLbPoliciesRequest - - # Converts hash 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_service_lb_policies.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::NetworkServices::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_service_lb_policies.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_service_lb_policies.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.list_service_lb_policies request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @network_services_stub, :list_service_lb_policies, "service_lb_policies", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets details of a single ServiceLbPolicy. - # - # @overload get_service_lb_policy(request, options = nil) - # Pass arguments to `get_service_lb_policy` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::GetServiceLbPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::GetServiceLbPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_service_lb_policy(name: nil) - # Pass arguments to `get_service_lb_policy` via keyword arguments. Note that at - # least one keyword argument is 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. A name of the ServiceLbPolicy to get. Must be in the format - # `projects/{project}/locations/{location}/serviceLbPolicies/*`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::NetworkServices::V1::ServiceLbPolicy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::NetworkServices::V1::ServiceLbPolicy] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/network_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::GetServiceLbPolicyRequest.new - # - # # Call the get_service_lb_policy method. - # result = client.get_service_lb_policy request - # - # # The returned object is of type Google::Cloud::NetworkServices::V1::ServiceLbPolicy. - # p result - # - def get_service_lb_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::GetServiceLbPolicyRequest - - # Converts hash 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_service_lb_policy.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::NetworkServices::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_service_lb_policy.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_service_lb_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.get_service_lb_policy 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 ServiceLbPolicy in a given project and location. - # - # @overload create_service_lb_policy(request, options = nil) - # Pass arguments to `create_service_lb_policy` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::CreateServiceLbPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::CreateServiceLbPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_service_lb_policy(parent: nil, service_lb_policy_id: nil, service_lb_policy: nil) - # Pass arguments to `create_service_lb_policy` via keyword arguments. Note that at - # least one keyword argument is 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 ServiceLbPolicy. Must be in the - # format `projects/{project}/locations/{location}`. - # @param service_lb_policy_id [::String] - # Required. Short name of the ServiceLbPolicy resource to be created. - # E.g. for resource name - # `projects/{project}/locations/{location}/serviceLbPolicies/{service_lb_policy_name}`. - # the id is value of \\{service_lb_policy_name} - # @param service_lb_policy [::Google::Cloud::NetworkServices::V1::ServiceLbPolicy, ::Hash] - # Required. ServiceLbPolicy resource to be created. - # @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_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::CreateServiceLbPolicyRequest.new - # - # # Call the create_service_lb_policy method. - # result = client.create_service_lb_policy 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_service_lb_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::CreateServiceLbPolicyRequest - - # Converts hash 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_service_lb_policy.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::NetworkServices::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_service_lb_policy.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_service_lb_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.create_service_lb_policy request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the parameters of a single ServiceLbPolicy. - # - # @overload update_service_lb_policy(request, options = nil) - # Pass arguments to `update_service_lb_policy` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::UpdateServiceLbPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::UpdateServiceLbPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_service_lb_policy(update_mask: nil, service_lb_policy: nil) - # Pass arguments to `update_service_lb_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. Field mask is used to specify the fields to be overwritten in the - # ServiceLbPolicy resource by the update. - # The fields specified in the update_mask are relative to the resource, not - # the full request. A field will be overwritten if it is in the mask. If the - # user does not provide a mask then all fields will be overwritten. - # @param service_lb_policy [::Google::Cloud::NetworkServices::V1::ServiceLbPolicy, ::Hash] - # Required. Updated ServiceLbPolicy 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_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::UpdateServiceLbPolicyRequest.new - # - # # Call the update_service_lb_policy method. - # result = client.update_service_lb_policy 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_service_lb_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::UpdateServiceLbPolicyRequest - - # Converts hash 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_service_lb_policy.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::NetworkServices::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_service_lb_policy.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_service_lb_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.update_service_lb_policy request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a single ServiceLbPolicy. - # - # @overload delete_service_lb_policy(request, options = nil) - # Pass arguments to `delete_service_lb_policy` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::DeleteServiceLbPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::DeleteServiceLbPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_service_lb_policy(name: nil) - # Pass arguments to `delete_service_lb_policy` via keyword arguments. Note that at - # least one keyword argument is 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. A name of the ServiceLbPolicy to delete. Must be in the format - # `projects/{project}/locations/{location}/serviceLbPolicies/*`. - # @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_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::DeleteServiceLbPolicyRequest.new - # - # # Call the delete_service_lb_policy method. - # result = client.delete_service_lb_policy 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_service_lb_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::DeleteServiceLbPolicyRequest - - # Converts hash 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_service_lb_policy.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::NetworkServices::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_service_lb_policy.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_service_lb_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.delete_service_lb_policy 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 - - ## - # Get a single RouteView of a Gateway. - # - # @overload get_gateway_route_view(request, options = nil) - # Pass arguments to `get_gateway_route_view` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::GetGatewayRouteViewRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::GetGatewayRouteViewRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_gateway_route_view(name: nil) - # Pass arguments to `get_gateway_route_view` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the GatewayRouteView resource. - # Formats: - # projects/\\{project}/locations/\\{location}/gateways/\\{gateway}/routeViews/\\{route_view} - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::NetworkServices::V1::GatewayRouteView] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::NetworkServices::V1::GatewayRouteView] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/network_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::GetGatewayRouteViewRequest.new - # - # # Call the get_gateway_route_view method. - # result = client.get_gateway_route_view request - # - # # The returned object is of type Google::Cloud::NetworkServices::V1::GatewayRouteView. - # p result - # - def get_gateway_route_view request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::GetGatewayRouteViewRequest - - # Converts hash 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_gateway_route_view.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::NetworkServices::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_gateway_route_view.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_gateway_route_view.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.get_gateway_route_view 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 - - ## - # Get a single RouteView of a Mesh. - # - # @overload get_mesh_route_view(request, options = nil) - # Pass arguments to `get_mesh_route_view` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::GetMeshRouteViewRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::GetMeshRouteViewRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_mesh_route_view(name: nil) - # Pass arguments to `get_mesh_route_view` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the MeshRouteView resource. - # Format: - # projects/\\{project}/locations/\\{location}/meshes/\\{mesh}/routeViews/\\{route_view} - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::NetworkServices::V1::MeshRouteView] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::NetworkServices::V1::MeshRouteView] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/network_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::GetMeshRouteViewRequest.new - # - # # Call the get_mesh_route_view method. - # result = client.get_mesh_route_view request - # - # # The returned object is of type Google::Cloud::NetworkServices::V1::MeshRouteView. - # p result - # - def get_mesh_route_view request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::GetMeshRouteViewRequest - - # Converts hash 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_mesh_route_view.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::NetworkServices::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_mesh_route_view.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_mesh_route_view.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.get_mesh_route_view request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists RouteViews - # - # @overload list_gateway_route_views(request, options = nil) - # Pass arguments to `list_gateway_route_views` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::ListGatewayRouteViewsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::ListGatewayRouteViewsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_gateway_route_views(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_gateway_route_views` via keyword arguments. Note that at - # least one keyword argument is 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 Gateway to which a Route is associated. - # Formats: - # projects/\\{project}/locations/\\{location}/gateways/\\{gateway} - # @param page_size [::Integer] - # Maximum number of GatewayRouteViews to return per call. - # @param page_token [::String] - # The value returned by the last `ListGatewayRouteViewsResponse` - # Indicates that this is a continuation of a prior `ListGatewayRouteViews` - # call, and that the system should return the next page of data. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::GatewayRouteView>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::GatewayRouteView>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/network_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::ListGatewayRouteViewsRequest.new - # - # # Call the list_gateway_route_views method. - # result = client.list_gateway_route_views 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::NetworkServices::V1::GatewayRouteView. - # p item - # end - # - def list_gateway_route_views request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::ListGatewayRouteViewsRequest - - # Converts hash 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_gateway_route_views.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::NetworkServices::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_gateway_route_views.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_gateway_route_views.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.list_gateway_route_views request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @network_services_stub, :list_gateway_route_views, "gateway_route_views", 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 - - ## - # Lists RouteViews - # - # @overload list_mesh_route_views(request, options = nil) - # Pass arguments to `list_mesh_route_views` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::ListMeshRouteViewsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::ListMeshRouteViewsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_mesh_route_views(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_mesh_route_views` via keyword arguments. Note that at - # least one keyword argument is 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 Mesh to which a Route is associated. - # Format: - # projects/\\{project}/locations/\\{location}/meshes/\\{mesh} - # @param page_size [::Integer] - # Maximum number of MeshRouteViews to return per call. - # @param page_token [::String] - # The value returned by the last `ListMeshRouteViewsResponse` - # Indicates that this is a continuation of a prior `ListMeshRouteViews` call, - # and that the system should return the next page of data. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::MeshRouteView>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::MeshRouteView>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/network_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::ListMeshRouteViewsRequest.new - # - # # Call the list_mesh_route_views method. - # result = client.list_mesh_route_views 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::NetworkServices::V1::MeshRouteView. - # p item - # end - # - def list_mesh_route_views request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::ListMeshRouteViewsRequest - - # Converts hash 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_mesh_route_views.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::NetworkServices::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_mesh_route_views.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_mesh_route_views.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.list_mesh_route_views request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @network_services_stub, :list_mesh_route_views, "mesh_route_views", 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 - - ## - # Lists AgentGateways in a given project and location. - # - # @overload list_agent_gateways(request, options = nil) - # Pass arguments to `list_agent_gateways` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::ListAgentGatewaysRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::ListAgentGatewaysRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_agent_gateways(parent: nil, page_size: nil, page_token: nil, return_partial_success: nil) - # Pass arguments to `list_agent_gateways` via keyword arguments. Note that at - # least one keyword argument is 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 project and location from which the AgentGateways should be - # listed, specified in the format `projects/*/locations/*`. - # @param page_size [::Integer] - # Optional. Maximum number of AgentGateways to return per call. - # @param page_token [::String] - # Optional. The value returned by the last `ListAgentGatewaysResponse` - # Indicates that this is a continuation of a prior `ListAgentGateways` - # call, and that the system should return the next page of data. - # @param return_partial_success [::Boolean] - # Optional. If true, allow partial responses for multi-regional Aggregated - # List requests. Otherwise if one of the locations is down or unreachable, - # the Aggregated List request will fail. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::AgentGateway>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::AgentGateway>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/network_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::ListAgentGatewaysRequest.new - # - # # Call the list_agent_gateways method. - # result = client.list_agent_gateways 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::NetworkServices::V1::AgentGateway. - # p item - # end - # - def list_agent_gateways request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::ListAgentGatewaysRequest - - # Converts hash 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_agent_gateways.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::NetworkServices::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_agent_gateways.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_agent_gateways.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.list_agent_gateways request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @network_services_stub, :list_agent_gateways, "agent_gateways", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets details of a single AgentGateway. - # - # @overload get_agent_gateway(request, options = nil) - # Pass arguments to `get_agent_gateway` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::GetAgentGatewayRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::GetAgentGatewayRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_agent_gateway(name: nil) - # Pass arguments to `get_agent_gateway` via keyword arguments. Note that at - # least one keyword argument is 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. A name of the AgentGateway to get. Must be in the format - # `projects/*/locations/*/agentGateways/*`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::NetworkServices::V1::AgentGateway] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::NetworkServices::V1::AgentGateway] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/network_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::GetAgentGatewayRequest.new - # - # # Call the get_agent_gateway method. - # result = client.get_agent_gateway request - # - # # The returned object is of type Google::Cloud::NetworkServices::V1::AgentGateway. - # p result - # - def get_agent_gateway request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::GetAgentGatewayRequest - - # Converts hash 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_agent_gateway.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::NetworkServices::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_agent_gateway.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_agent_gateway.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.get_agent_gateway 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 AgentGateway in a given project and location. - # - # @overload create_agent_gateway(request, options = nil) - # Pass arguments to `create_agent_gateway` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::CreateAgentGatewayRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::CreateAgentGatewayRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_agent_gateway(parent: nil, agent_gateway_id: nil, agent_gateway: nil) - # Pass arguments to `create_agent_gateway` via keyword arguments. Note that at - # least one keyword argument is 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 AgentGateway. Must be in the - # format `projects/*/locations/*`. - # @param agent_gateway_id [::String] - # Required. Short name of the AgentGateway resource to be created. - # @param agent_gateway [::Google::Cloud::NetworkServices::V1::AgentGateway, ::Hash] - # Required. AgentGateway resource to be created. - # @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_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::CreateAgentGatewayRequest.new - # - # # Call the create_agent_gateway method. - # result = client.create_agent_gateway 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_agent_gateway request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::CreateAgentGatewayRequest - - # Converts hash 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_agent_gateway.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::NetworkServices::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_agent_gateway.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_agent_gateway.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.create_agent_gateway request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the parameters of a single AgentGateway. - # - # @overload update_agent_gateway(request, options = nil) - # Pass arguments to `update_agent_gateway` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::UpdateAgentGatewayRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::UpdateAgentGatewayRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_agent_gateway(update_mask: nil, agent_gateway: nil) - # Pass arguments to `update_agent_gateway` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. Field mask is used to specify the fields to be overwritten in the - # AgentGateway resource by the update. - # The fields specified in the update_mask are relative to the resource, not - # the full request. A field will be overwritten if it is in the mask. If the - # user does not provide a mask then all fields will be overwritten. - # @param agent_gateway [::Google::Cloud::NetworkServices::V1::AgentGateway, ::Hash] - # Required. Updated AgentGateway 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_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::UpdateAgentGatewayRequest.new - # - # # Call the update_agent_gateway method. - # result = client.update_agent_gateway 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_agent_gateway request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::UpdateAgentGatewayRequest - - # Converts hash 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_agent_gateway.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::NetworkServices::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_agent_gateway.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_agent_gateway.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.update_agent_gateway request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a single AgentGateway. - # - # @overload delete_agent_gateway(request, options = nil) - # Pass arguments to `delete_agent_gateway` via a request object, either of type - # {::Google::Cloud::NetworkServices::V1::DeleteAgentGatewayRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::NetworkServices::V1::DeleteAgentGatewayRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_agent_gateway(name: nil, etag: nil) - # Pass arguments to `delete_agent_gateway` via keyword arguments. Note that at - # least one keyword argument is 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. A name of the AgentGateway to delete. Must be in the format - # `projects/*/locations/*/agentGateways/*`. - # @param etag [::String] - # Optional. The etag of the AgentGateway to delete. - # @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_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::NetworkServices::V1::DeleteAgentGatewayRequest.new - # - # # Call the delete_agent_gateway method. - # result = client.delete_agent_gateway 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_agent_gateway request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::DeleteAgentGatewayRequest - - # Converts hash 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_agent_gateway.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::NetworkServices::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_agent_gateway.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_agent_gateway.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @network_services_stub.delete_agent_gateway 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 NetworkServices REST API. - # - # This class represents the configuration for NetworkServices 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::NetworkServices::V1::NetworkServices::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_endpoint_policies to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_endpoint_policies.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_endpoint_policies.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. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `: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 = "networkservices.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 NetworkServices 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. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_endpoint_policies` - # @return [::Gapic::Config::Method] - # - attr_reader :list_endpoint_policies - ## - # RPC-specific configuration for `get_endpoint_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :get_endpoint_policy - ## - # RPC-specific configuration for `create_endpoint_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :create_endpoint_policy - ## - # RPC-specific configuration for `update_endpoint_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :update_endpoint_policy - ## - # RPC-specific configuration for `delete_endpoint_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_endpoint_policy - ## - # RPC-specific configuration for `list_wasm_plugin_versions` - # @return [::Gapic::Config::Method] - # - attr_reader :list_wasm_plugin_versions - ## - # RPC-specific configuration for `get_wasm_plugin_version` - # @return [::Gapic::Config::Method] - # - attr_reader :get_wasm_plugin_version - ## - # RPC-specific configuration for `create_wasm_plugin_version` - # @return [::Gapic::Config::Method] - # - attr_reader :create_wasm_plugin_version - ## - # RPC-specific configuration for `delete_wasm_plugin_version` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_wasm_plugin_version - ## - # RPC-specific configuration for `list_wasm_plugins` - # @return [::Gapic::Config::Method] - # - attr_reader :list_wasm_plugins - ## - # RPC-specific configuration for `get_wasm_plugin` - # @return [::Gapic::Config::Method] - # - attr_reader :get_wasm_plugin - ## - # RPC-specific configuration for `create_wasm_plugin` - # @return [::Gapic::Config::Method] - # - attr_reader :create_wasm_plugin - ## - # RPC-specific configuration for `update_wasm_plugin` - # @return [::Gapic::Config::Method] - # - attr_reader :update_wasm_plugin - ## - # RPC-specific configuration for `delete_wasm_plugin` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_wasm_plugin - ## - # RPC-specific configuration for `list_gateways` - # @return [::Gapic::Config::Method] - # - attr_reader :list_gateways - ## - # RPC-specific configuration for `get_gateway` - # @return [::Gapic::Config::Method] - # - attr_reader :get_gateway - ## - # RPC-specific configuration for `create_gateway` - # @return [::Gapic::Config::Method] - # - attr_reader :create_gateway - ## - # RPC-specific configuration for `update_gateway` - # @return [::Gapic::Config::Method] - # - attr_reader :update_gateway - ## - # RPC-specific configuration for `delete_gateway` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_gateway - ## - # RPC-specific configuration for `list_grpc_routes` - # @return [::Gapic::Config::Method] - # - attr_reader :list_grpc_routes - ## - # RPC-specific configuration for `get_grpc_route` - # @return [::Gapic::Config::Method] - # - attr_reader :get_grpc_route - ## - # RPC-specific configuration for `create_grpc_route` - # @return [::Gapic::Config::Method] - # - attr_reader :create_grpc_route - ## - # RPC-specific configuration for `update_grpc_route` - # @return [::Gapic::Config::Method] - # - attr_reader :update_grpc_route - ## - # RPC-specific configuration for `delete_grpc_route` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_grpc_route - ## - # RPC-specific configuration for `list_http_routes` - # @return [::Gapic::Config::Method] - # - attr_reader :list_http_routes - ## - # RPC-specific configuration for `get_http_route` - # @return [::Gapic::Config::Method] - # - attr_reader :get_http_route - ## - # RPC-specific configuration for `create_http_route` - # @return [::Gapic::Config::Method] - # - attr_reader :create_http_route - ## - # RPC-specific configuration for `update_http_route` - # @return [::Gapic::Config::Method] - # - attr_reader :update_http_route - ## - # RPC-specific configuration for `delete_http_route` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_http_route - ## - # RPC-specific configuration for `list_tcp_routes` - # @return [::Gapic::Config::Method] - # - attr_reader :list_tcp_routes - ## - # RPC-specific configuration for `get_tcp_route` - # @return [::Gapic::Config::Method] - # - attr_reader :get_tcp_route - ## - # RPC-specific configuration for `create_tcp_route` - # @return [::Gapic::Config::Method] - # - attr_reader :create_tcp_route - ## - # RPC-specific configuration for `update_tcp_route` - # @return [::Gapic::Config::Method] - # - attr_reader :update_tcp_route - ## - # RPC-specific configuration for `delete_tcp_route` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_tcp_route - ## - # RPC-specific configuration for `list_tls_routes` - # @return [::Gapic::Config::Method] - # - attr_reader :list_tls_routes - ## - # RPC-specific configuration for `get_tls_route` - # @return [::Gapic::Config::Method] - # - attr_reader :get_tls_route - ## - # RPC-specific configuration for `create_tls_route` - # @return [::Gapic::Config::Method] - # - attr_reader :create_tls_route - ## - # RPC-specific configuration for `update_tls_route` - # @return [::Gapic::Config::Method] - # - attr_reader :update_tls_route - ## - # RPC-specific configuration for `delete_tls_route` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_tls_route - ## - # RPC-specific configuration for `list_service_bindings` - # @return [::Gapic::Config::Method] - # - attr_reader :list_service_bindings - ## - # RPC-specific configuration for `get_service_binding` - # @return [::Gapic::Config::Method] - # - attr_reader :get_service_binding - ## - # RPC-specific configuration for `create_service_binding` - # @return [::Gapic::Config::Method] - # - attr_reader :create_service_binding - ## - # RPC-specific configuration for `update_service_binding` - # @return [::Gapic::Config::Method] - # - attr_reader :update_service_binding - ## - # RPC-specific configuration for `delete_service_binding` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_service_binding - ## - # RPC-specific configuration for `list_meshes` - # @return [::Gapic::Config::Method] - # - attr_reader :list_meshes - ## - # RPC-specific configuration for `get_mesh` - # @return [::Gapic::Config::Method] - # - attr_reader :get_mesh - ## - # RPC-specific configuration for `create_mesh` - # @return [::Gapic::Config::Method] - # - attr_reader :create_mesh - ## - # RPC-specific configuration for `update_mesh` - # @return [::Gapic::Config::Method] - # - attr_reader :update_mesh - ## - # RPC-specific configuration for `delete_mesh` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_mesh - ## - # RPC-specific configuration for `list_service_lb_policies` - # @return [::Gapic::Config::Method] - # - attr_reader :list_service_lb_policies - ## - # RPC-specific configuration for `get_service_lb_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :get_service_lb_policy - ## - # RPC-specific configuration for `create_service_lb_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :create_service_lb_policy - ## - # RPC-specific configuration for `update_service_lb_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :update_service_lb_policy - ## - # RPC-specific configuration for `delete_service_lb_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_service_lb_policy - ## - # RPC-specific configuration for `get_gateway_route_view` - # @return [::Gapic::Config::Method] - # - attr_reader :get_gateway_route_view - ## - # RPC-specific configuration for `get_mesh_route_view` - # @return [::Gapic::Config::Method] - # - attr_reader :get_mesh_route_view - ## - # RPC-specific configuration for `list_gateway_route_views` - # @return [::Gapic::Config::Method] - # - attr_reader :list_gateway_route_views - ## - # RPC-specific configuration for `list_mesh_route_views` - # @return [::Gapic::Config::Method] - # - attr_reader :list_mesh_route_views - ## - # RPC-specific configuration for `list_agent_gateways` - # @return [::Gapic::Config::Method] - # - attr_reader :list_agent_gateways - ## - # RPC-specific configuration for `get_agent_gateway` - # @return [::Gapic::Config::Method] - # - attr_reader :get_agent_gateway - ## - # RPC-specific configuration for `create_agent_gateway` - # @return [::Gapic::Config::Method] - # - attr_reader :create_agent_gateway - ## - # RPC-specific configuration for `update_agent_gateway` - # @return [::Gapic::Config::Method] - # - attr_reader :update_agent_gateway - ## - # RPC-specific configuration for `delete_agent_gateway` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_agent_gateway - - # @private - def initialize parent_rpcs = nil - list_endpoint_policies_config = parent_rpcs.list_endpoint_policies if parent_rpcs.respond_to? :list_endpoint_policies - @list_endpoint_policies = ::Gapic::Config::Method.new list_endpoint_policies_config - get_endpoint_policy_config = parent_rpcs.get_endpoint_policy if parent_rpcs.respond_to? :get_endpoint_policy - @get_endpoint_policy = ::Gapic::Config::Method.new get_endpoint_policy_config - create_endpoint_policy_config = parent_rpcs.create_endpoint_policy if parent_rpcs.respond_to? :create_endpoint_policy - @create_endpoint_policy = ::Gapic::Config::Method.new create_endpoint_policy_config - update_endpoint_policy_config = parent_rpcs.update_endpoint_policy if parent_rpcs.respond_to? :update_endpoint_policy - @update_endpoint_policy = ::Gapic::Config::Method.new update_endpoint_policy_config - delete_endpoint_policy_config = parent_rpcs.delete_endpoint_policy if parent_rpcs.respond_to? :delete_endpoint_policy - @delete_endpoint_policy = ::Gapic::Config::Method.new delete_endpoint_policy_config - list_wasm_plugin_versions_config = parent_rpcs.list_wasm_plugin_versions if parent_rpcs.respond_to? :list_wasm_plugin_versions - @list_wasm_plugin_versions = ::Gapic::Config::Method.new list_wasm_plugin_versions_config - get_wasm_plugin_version_config = parent_rpcs.get_wasm_plugin_version if parent_rpcs.respond_to? :get_wasm_plugin_version - @get_wasm_plugin_version = ::Gapic::Config::Method.new get_wasm_plugin_version_config - create_wasm_plugin_version_config = parent_rpcs.create_wasm_plugin_version if parent_rpcs.respond_to? :create_wasm_plugin_version - @create_wasm_plugin_version = ::Gapic::Config::Method.new create_wasm_plugin_version_config - delete_wasm_plugin_version_config = parent_rpcs.delete_wasm_plugin_version if parent_rpcs.respond_to? :delete_wasm_plugin_version - @delete_wasm_plugin_version = ::Gapic::Config::Method.new delete_wasm_plugin_version_config - list_wasm_plugins_config = parent_rpcs.list_wasm_plugins if parent_rpcs.respond_to? :list_wasm_plugins - @list_wasm_plugins = ::Gapic::Config::Method.new list_wasm_plugins_config - get_wasm_plugin_config = parent_rpcs.get_wasm_plugin if parent_rpcs.respond_to? :get_wasm_plugin - @get_wasm_plugin = ::Gapic::Config::Method.new get_wasm_plugin_config - create_wasm_plugin_config = parent_rpcs.create_wasm_plugin if parent_rpcs.respond_to? :create_wasm_plugin - @create_wasm_plugin = ::Gapic::Config::Method.new create_wasm_plugin_config - update_wasm_plugin_config = parent_rpcs.update_wasm_plugin if parent_rpcs.respond_to? :update_wasm_plugin - @update_wasm_plugin = ::Gapic::Config::Method.new update_wasm_plugin_config - delete_wasm_plugin_config = parent_rpcs.delete_wasm_plugin if parent_rpcs.respond_to? :delete_wasm_plugin - @delete_wasm_plugin = ::Gapic::Config::Method.new delete_wasm_plugin_config - list_gateways_config = parent_rpcs.list_gateways if parent_rpcs.respond_to? :list_gateways - @list_gateways = ::Gapic::Config::Method.new list_gateways_config - get_gateway_config = parent_rpcs.get_gateway if parent_rpcs.respond_to? :get_gateway - @get_gateway = ::Gapic::Config::Method.new get_gateway_config - create_gateway_config = parent_rpcs.create_gateway if parent_rpcs.respond_to? :create_gateway - @create_gateway = ::Gapic::Config::Method.new create_gateway_config - update_gateway_config = parent_rpcs.update_gateway if parent_rpcs.respond_to? :update_gateway - @update_gateway = ::Gapic::Config::Method.new update_gateway_config - delete_gateway_config = parent_rpcs.delete_gateway if parent_rpcs.respond_to? :delete_gateway - @delete_gateway = ::Gapic::Config::Method.new delete_gateway_config - list_grpc_routes_config = parent_rpcs.list_grpc_routes if parent_rpcs.respond_to? :list_grpc_routes - @list_grpc_routes = ::Gapic::Config::Method.new list_grpc_routes_config - get_grpc_route_config = parent_rpcs.get_grpc_route if parent_rpcs.respond_to? :get_grpc_route - @get_grpc_route = ::Gapic::Config::Method.new get_grpc_route_config - create_grpc_route_config = parent_rpcs.create_grpc_route if parent_rpcs.respond_to? :create_grpc_route - @create_grpc_route = ::Gapic::Config::Method.new create_grpc_route_config - update_grpc_route_config = parent_rpcs.update_grpc_route if parent_rpcs.respond_to? :update_grpc_route - @update_grpc_route = ::Gapic::Config::Method.new update_grpc_route_config - delete_grpc_route_config = parent_rpcs.delete_grpc_route if parent_rpcs.respond_to? :delete_grpc_route - @delete_grpc_route = ::Gapic::Config::Method.new delete_grpc_route_config - list_http_routes_config = parent_rpcs.list_http_routes if parent_rpcs.respond_to? :list_http_routes - @list_http_routes = ::Gapic::Config::Method.new list_http_routes_config - get_http_route_config = parent_rpcs.get_http_route if parent_rpcs.respond_to? :get_http_route - @get_http_route = ::Gapic::Config::Method.new get_http_route_config - create_http_route_config = parent_rpcs.create_http_route if parent_rpcs.respond_to? :create_http_route - @create_http_route = ::Gapic::Config::Method.new create_http_route_config - update_http_route_config = parent_rpcs.update_http_route if parent_rpcs.respond_to? :update_http_route - @update_http_route = ::Gapic::Config::Method.new update_http_route_config - delete_http_route_config = parent_rpcs.delete_http_route if parent_rpcs.respond_to? :delete_http_route - @delete_http_route = ::Gapic::Config::Method.new delete_http_route_config - list_tcp_routes_config = parent_rpcs.list_tcp_routes if parent_rpcs.respond_to? :list_tcp_routes - @list_tcp_routes = ::Gapic::Config::Method.new list_tcp_routes_config - get_tcp_route_config = parent_rpcs.get_tcp_route if parent_rpcs.respond_to? :get_tcp_route - @get_tcp_route = ::Gapic::Config::Method.new get_tcp_route_config - create_tcp_route_config = parent_rpcs.create_tcp_route if parent_rpcs.respond_to? :create_tcp_route - @create_tcp_route = ::Gapic::Config::Method.new create_tcp_route_config - update_tcp_route_config = parent_rpcs.update_tcp_route if parent_rpcs.respond_to? :update_tcp_route - @update_tcp_route = ::Gapic::Config::Method.new update_tcp_route_config - delete_tcp_route_config = parent_rpcs.delete_tcp_route if parent_rpcs.respond_to? :delete_tcp_route - @delete_tcp_route = ::Gapic::Config::Method.new delete_tcp_route_config - list_tls_routes_config = parent_rpcs.list_tls_routes if parent_rpcs.respond_to? :list_tls_routes - @list_tls_routes = ::Gapic::Config::Method.new list_tls_routes_config - get_tls_route_config = parent_rpcs.get_tls_route if parent_rpcs.respond_to? :get_tls_route - @get_tls_route = ::Gapic::Config::Method.new get_tls_route_config - create_tls_route_config = parent_rpcs.create_tls_route if parent_rpcs.respond_to? :create_tls_route - @create_tls_route = ::Gapic::Config::Method.new create_tls_route_config - update_tls_route_config = parent_rpcs.update_tls_route if parent_rpcs.respond_to? :update_tls_route - @update_tls_route = ::Gapic::Config::Method.new update_tls_route_config - delete_tls_route_config = parent_rpcs.delete_tls_route if parent_rpcs.respond_to? :delete_tls_route - @delete_tls_route = ::Gapic::Config::Method.new delete_tls_route_config - list_service_bindings_config = parent_rpcs.list_service_bindings if parent_rpcs.respond_to? :list_service_bindings - @list_service_bindings = ::Gapic::Config::Method.new list_service_bindings_config - get_service_binding_config = parent_rpcs.get_service_binding if parent_rpcs.respond_to? :get_service_binding - @get_service_binding = ::Gapic::Config::Method.new get_service_binding_config - create_service_binding_config = parent_rpcs.create_service_binding if parent_rpcs.respond_to? :create_service_binding - @create_service_binding = ::Gapic::Config::Method.new create_service_binding_config - update_service_binding_config = parent_rpcs.update_service_binding if parent_rpcs.respond_to? :update_service_binding - @update_service_binding = ::Gapic::Config::Method.new update_service_binding_config - delete_service_binding_config = parent_rpcs.delete_service_binding if parent_rpcs.respond_to? :delete_service_binding - @delete_service_binding = ::Gapic::Config::Method.new delete_service_binding_config - list_meshes_config = parent_rpcs.list_meshes if parent_rpcs.respond_to? :list_meshes - @list_meshes = ::Gapic::Config::Method.new list_meshes_config - get_mesh_config = parent_rpcs.get_mesh if parent_rpcs.respond_to? :get_mesh - @get_mesh = ::Gapic::Config::Method.new get_mesh_config - create_mesh_config = parent_rpcs.create_mesh if parent_rpcs.respond_to? :create_mesh - @create_mesh = ::Gapic::Config::Method.new create_mesh_config - update_mesh_config = parent_rpcs.update_mesh if parent_rpcs.respond_to? :update_mesh - @update_mesh = ::Gapic::Config::Method.new update_mesh_config - delete_mesh_config = parent_rpcs.delete_mesh if parent_rpcs.respond_to? :delete_mesh - @delete_mesh = ::Gapic::Config::Method.new delete_mesh_config - list_service_lb_policies_config = parent_rpcs.list_service_lb_policies if parent_rpcs.respond_to? :list_service_lb_policies - @list_service_lb_policies = ::Gapic::Config::Method.new list_service_lb_policies_config - get_service_lb_policy_config = parent_rpcs.get_service_lb_policy if parent_rpcs.respond_to? :get_service_lb_policy - @get_service_lb_policy = ::Gapic::Config::Method.new get_service_lb_policy_config - create_service_lb_policy_config = parent_rpcs.create_service_lb_policy if parent_rpcs.respond_to? :create_service_lb_policy - @create_service_lb_policy = ::Gapic::Config::Method.new create_service_lb_policy_config - update_service_lb_policy_config = parent_rpcs.update_service_lb_policy if parent_rpcs.respond_to? :update_service_lb_policy - @update_service_lb_policy = ::Gapic::Config::Method.new update_service_lb_policy_config - delete_service_lb_policy_config = parent_rpcs.delete_service_lb_policy if parent_rpcs.respond_to? :delete_service_lb_policy - @delete_service_lb_policy = ::Gapic::Config::Method.new delete_service_lb_policy_config - get_gateway_route_view_config = parent_rpcs.get_gateway_route_view if parent_rpcs.respond_to? :get_gateway_route_view - @get_gateway_route_view = ::Gapic::Config::Method.new get_gateway_route_view_config - get_mesh_route_view_config = parent_rpcs.get_mesh_route_view if parent_rpcs.respond_to? :get_mesh_route_view - @get_mesh_route_view = ::Gapic::Config::Method.new get_mesh_route_view_config - list_gateway_route_views_config = parent_rpcs.list_gateway_route_views if parent_rpcs.respond_to? :list_gateway_route_views - @list_gateway_route_views = ::Gapic::Config::Method.new list_gateway_route_views_config - list_mesh_route_views_config = parent_rpcs.list_mesh_route_views if parent_rpcs.respond_to? :list_mesh_route_views - @list_mesh_route_views = ::Gapic::Config::Method.new list_mesh_route_views_config - list_agent_gateways_config = parent_rpcs.list_agent_gateways if parent_rpcs.respond_to? :list_agent_gateways - @list_agent_gateways = ::Gapic::Config::Method.new list_agent_gateways_config - get_agent_gateway_config = parent_rpcs.get_agent_gateway if parent_rpcs.respond_to? :get_agent_gateway - @get_agent_gateway = ::Gapic::Config::Method.new get_agent_gateway_config - create_agent_gateway_config = parent_rpcs.create_agent_gateway if parent_rpcs.respond_to? :create_agent_gateway - @create_agent_gateway = ::Gapic::Config::Method.new create_agent_gateway_config - update_agent_gateway_config = parent_rpcs.update_agent_gateway if parent_rpcs.respond_to? :update_agent_gateway - @update_agent_gateway = ::Gapic::Config::Method.new update_agent_gateway_config - delete_agent_gateway_config = parent_rpcs.delete_agent_gateway if parent_rpcs.respond_to? :delete_agent_gateway - @delete_agent_gateway = ::Gapic::Config::Method.new delete_agent_gateway_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_services-v1/lib/google/cloud/network_services/v1/network_services/rest/operations.rb b/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/network_services/rest/operations.rb deleted file mode 100644 index d15dfc0a95b5..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/network_services/rest/operations.rb +++ /dev/null @@ -1,927 +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 NetworkServices - module V1 - module NetworkServices - module Rest - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "networkservices.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the NetworkServices 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 NetworkServices 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::NetworkServices::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::NetworkServices::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::NetworkServices::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::NetworkServices::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. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `: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 = "networkservices.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. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_operations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_operations - ## - # RPC-specific configuration for `get_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_operation - ## - # RPC-specific configuration for `delete_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_operation - ## - # RPC-specific configuration for `cancel_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_operation - - # @private - def initialize parent_rpcs = nil - list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations - @list_operations = ::Gapic::Config::Method.new list_operations_config - get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation - @get_operation = ::Gapic::Config::Method.new get_operation_config - delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation - @delete_operation = ::Gapic::Config::Method.new delete_operation_config - cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation - @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config - - yield self if block_given? - end - end - end - end - - ## - # @private - # REST service stub for the Longrunning Operations API. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - class OperationsServiceStub - def initialize endpoint:, endpoint_template:, universe_domain:, credentials: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials - end - - ## - # Baseline implementation for the list_operations REST call - # - # @param request_pb [::Google::Longrunning::ListOperationsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::ListOperationsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::ListOperationsResponse] - # A result object deserialized from the server's reply - def list_operations request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_list_operations_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_operations", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::ListOperationsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_operation REST call - # - # @param request_pb [::Google::Longrunning::GetOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def get_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_get_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_operation REST call - # - # @param request_pb [::Google::Longrunning::DeleteOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def delete_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_delete_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the cancel_operation REST call - # - # @param request_pb [::Google::Longrunning::CancelOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def cancel_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_cancel_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "cancel_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the list_operations REST call - # - # @param request_pb [::Google::Longrunning::ListOperationsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_operations_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}/operations", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_operation REST call - # - # @param request_pb [::Google::Longrunning::GetOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_operation REST call - # - # @param request_pb [::Google::Longrunning::DeleteOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the cancel_operation REST call - # - # @param request_pb [::Google::Longrunning::CancelOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_cancel_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:cancel", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/network_services/rest/service_stub.rb b/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/network_services/rest/service_stub.rb deleted file mode 100644 index 573b572e8d03..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/network_services/rest/service_stub.rb +++ /dev/null @@ -1,3947 +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/networkservices/v1/network_services_pb" - -module Google - module Cloud - module NetworkServices - module V1 - module NetworkServices - module Rest - ## - # REST service stub for the NetworkServices 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_endpoint_policies REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::ListEndpointPoliciesRequest] - # 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::NetworkServices::V1::ListEndpointPoliciesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::NetworkServices::V1::ListEndpointPoliciesResponse] - # A result object deserialized from the server's reply - def list_endpoint_policies request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_endpoint_policies_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_endpoint_policies", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::NetworkServices::V1::ListEndpointPoliciesResponse.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_endpoint_policy REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::GetEndpointPolicyRequest] - # 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::NetworkServices::V1::EndpointPolicy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::NetworkServices::V1::EndpointPolicy] - # A result object deserialized from the server's reply - def get_endpoint_policy request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_endpoint_policy_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_endpoint_policy", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::NetworkServices::V1::EndpointPolicy.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_endpoint_policy REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::CreateEndpointPolicyRequest] - # 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_endpoint_policy request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_endpoint_policy_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_endpoint_policy", - 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_endpoint_policy REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::UpdateEndpointPolicyRequest] - # 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_endpoint_policy request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_endpoint_policy_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_endpoint_policy", - 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_endpoint_policy REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::DeleteEndpointPolicyRequest] - # 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_endpoint_policy request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_endpoint_policy_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_endpoint_policy", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_wasm_plugin_versions REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::ListWasmPluginVersionsRequest] - # 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::NetworkServices::V1::ListWasmPluginVersionsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::NetworkServices::V1::ListWasmPluginVersionsResponse] - # A result object deserialized from the server's reply - def list_wasm_plugin_versions request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_wasm_plugin_versions_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_wasm_plugin_versions", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::NetworkServices::V1::ListWasmPluginVersionsResponse.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_wasm_plugin_version REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::GetWasmPluginVersionRequest] - # 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::NetworkServices::V1::WasmPluginVersion] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::NetworkServices::V1::WasmPluginVersion] - # A result object deserialized from the server's reply - def get_wasm_plugin_version request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_wasm_plugin_version_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_wasm_plugin_version", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::NetworkServices::V1::WasmPluginVersion.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_wasm_plugin_version REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::CreateWasmPluginVersionRequest] - # 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_wasm_plugin_version request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_wasm_plugin_version_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_wasm_plugin_version", - 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_wasm_plugin_version REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::DeleteWasmPluginVersionRequest] - # 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_wasm_plugin_version request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_wasm_plugin_version_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_wasm_plugin_version", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_wasm_plugins REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::ListWasmPluginsRequest] - # 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::NetworkServices::V1::ListWasmPluginsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::NetworkServices::V1::ListWasmPluginsResponse] - # A result object deserialized from the server's reply - def list_wasm_plugins request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_wasm_plugins_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_wasm_plugins", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::NetworkServices::V1::ListWasmPluginsResponse.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_wasm_plugin REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::GetWasmPluginRequest] - # 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::NetworkServices::V1::WasmPlugin] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::NetworkServices::V1::WasmPlugin] - # A result object deserialized from the server's reply - def get_wasm_plugin request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_wasm_plugin_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_wasm_plugin", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::NetworkServices::V1::WasmPlugin.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_wasm_plugin REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::CreateWasmPluginRequest] - # 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_wasm_plugin request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_wasm_plugin_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_wasm_plugin", - 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_wasm_plugin REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::UpdateWasmPluginRequest] - # 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_wasm_plugin request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_wasm_plugin_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_wasm_plugin", - 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_wasm_plugin REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::DeleteWasmPluginRequest] - # 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_wasm_plugin request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_wasm_plugin_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_wasm_plugin", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_gateways REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::ListGatewaysRequest] - # 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::NetworkServices::V1::ListGatewaysResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::NetworkServices::V1::ListGatewaysResponse] - # A result object deserialized from the server's reply - def list_gateways request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_gateways_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_gateways", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::NetworkServices::V1::ListGatewaysResponse.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_gateway REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::GetGatewayRequest] - # 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::NetworkServices::V1::Gateway] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::NetworkServices::V1::Gateway] - # A result object deserialized from the server's reply - def get_gateway request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_gateway_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_gateway", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::NetworkServices::V1::Gateway.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_gateway REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::CreateGatewayRequest] - # 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_gateway request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_gateway_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_gateway", - 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_gateway REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::UpdateGatewayRequest] - # 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_gateway request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_gateway_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_gateway", - 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_gateway REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::DeleteGatewayRequest] - # 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_gateway request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_gateway_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_gateway", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_grpc_routes REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::ListGrpcRoutesRequest] - # 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::NetworkServices::V1::ListGrpcRoutesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::NetworkServices::V1::ListGrpcRoutesResponse] - # A result object deserialized from the server's reply - def list_grpc_routes request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_grpc_routes_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_grpc_routes", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::NetworkServices::V1::ListGrpcRoutesResponse.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_grpc_route REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::GetGrpcRouteRequest] - # 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::NetworkServices::V1::GrpcRoute] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::NetworkServices::V1::GrpcRoute] - # A result object deserialized from the server's reply - def get_grpc_route request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_grpc_route_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_grpc_route", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::NetworkServices::V1::GrpcRoute.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_grpc_route REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::CreateGrpcRouteRequest] - # 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_grpc_route request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_grpc_route_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_grpc_route", - 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_grpc_route REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::UpdateGrpcRouteRequest] - # 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_grpc_route request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_grpc_route_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_grpc_route", - 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_grpc_route REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::DeleteGrpcRouteRequest] - # 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_grpc_route request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_grpc_route_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_grpc_route", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_http_routes REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::ListHttpRoutesRequest] - # 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::NetworkServices::V1::ListHttpRoutesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::NetworkServices::V1::ListHttpRoutesResponse] - # A result object deserialized from the server's reply - def list_http_routes request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_http_routes_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_http_routes", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::NetworkServices::V1::ListHttpRoutesResponse.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_http_route REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::GetHttpRouteRequest] - # 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::NetworkServices::V1::HttpRoute] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::NetworkServices::V1::HttpRoute] - # A result object deserialized from the server's reply - def get_http_route request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_http_route_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_http_route", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::NetworkServices::V1::HttpRoute.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_http_route REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::CreateHttpRouteRequest] - # 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_http_route request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_http_route_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_http_route", - 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_http_route REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::UpdateHttpRouteRequest] - # 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_http_route request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_http_route_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_http_route", - 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_http_route REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::DeleteHttpRouteRequest] - # 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_http_route request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_http_route_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_http_route", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_tcp_routes REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::ListTcpRoutesRequest] - # 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::NetworkServices::V1::ListTcpRoutesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::NetworkServices::V1::ListTcpRoutesResponse] - # A result object deserialized from the server's reply - def list_tcp_routes request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_tcp_routes_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_tcp_routes", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::NetworkServices::V1::ListTcpRoutesResponse.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_tcp_route REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::GetTcpRouteRequest] - # 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::NetworkServices::V1::TcpRoute] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::NetworkServices::V1::TcpRoute] - # A result object deserialized from the server's reply - def get_tcp_route request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_tcp_route_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_tcp_route", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::NetworkServices::V1::TcpRoute.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_tcp_route REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::CreateTcpRouteRequest] - # 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_tcp_route request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_tcp_route_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_tcp_route", - 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_tcp_route REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::UpdateTcpRouteRequest] - # 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_tcp_route request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_tcp_route_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_tcp_route", - 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_tcp_route REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::DeleteTcpRouteRequest] - # 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_tcp_route request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_tcp_route_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_tcp_route", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_tls_routes REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::ListTlsRoutesRequest] - # 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::NetworkServices::V1::ListTlsRoutesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::NetworkServices::V1::ListTlsRoutesResponse] - # A result object deserialized from the server's reply - def list_tls_routes request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_tls_routes_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_tls_routes", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::NetworkServices::V1::ListTlsRoutesResponse.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_tls_route REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::GetTlsRouteRequest] - # 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::NetworkServices::V1::TlsRoute] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::NetworkServices::V1::TlsRoute] - # A result object deserialized from the server's reply - def get_tls_route request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_tls_route_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_tls_route", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::NetworkServices::V1::TlsRoute.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_tls_route REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::CreateTlsRouteRequest] - # 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_tls_route request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_tls_route_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_tls_route", - 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_tls_route REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::UpdateTlsRouteRequest] - # 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_tls_route request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_tls_route_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_tls_route", - 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_tls_route REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::DeleteTlsRouteRequest] - # 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_tls_route request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_tls_route_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_tls_route", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_service_bindings REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::ListServiceBindingsRequest] - # 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::NetworkServices::V1::ListServiceBindingsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::NetworkServices::V1::ListServiceBindingsResponse] - # A result object deserialized from the server's reply - def list_service_bindings request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_service_bindings_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_service_bindings", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::NetworkServices::V1::ListServiceBindingsResponse.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_service_binding REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::GetServiceBindingRequest] - # 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::NetworkServices::V1::ServiceBinding] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::NetworkServices::V1::ServiceBinding] - # A result object deserialized from the server's reply - def get_service_binding request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_service_binding_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_service_binding", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::NetworkServices::V1::ServiceBinding.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_service_binding REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::CreateServiceBindingRequest] - # 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_service_binding request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_service_binding_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_service_binding", - 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_service_binding REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::UpdateServiceBindingRequest] - # 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_service_binding request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_service_binding_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_service_binding", - 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_service_binding REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::DeleteServiceBindingRequest] - # 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_service_binding request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_service_binding_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_service_binding", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_meshes REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::ListMeshesRequest] - # 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::NetworkServices::V1::ListMeshesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::NetworkServices::V1::ListMeshesResponse] - # A result object deserialized from the server's reply - def list_meshes request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_meshes_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_meshes", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::NetworkServices::V1::ListMeshesResponse.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_mesh REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::GetMeshRequest] - # 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::NetworkServices::V1::Mesh] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::NetworkServices::V1::Mesh] - # A result object deserialized from the server's reply - def get_mesh request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_mesh_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_mesh", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::NetworkServices::V1::Mesh.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_mesh REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::CreateMeshRequest] - # 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_mesh request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_mesh_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_mesh", - 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_mesh REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::UpdateMeshRequest] - # 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_mesh request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_mesh_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_mesh", - 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_mesh REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::DeleteMeshRequest] - # 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_mesh request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_mesh_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_mesh", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_service_lb_policies REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::ListServiceLbPoliciesRequest] - # 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::NetworkServices::V1::ListServiceLbPoliciesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::NetworkServices::V1::ListServiceLbPoliciesResponse] - # A result object deserialized from the server's reply - def list_service_lb_policies request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_service_lb_policies_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_service_lb_policies", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::NetworkServices::V1::ListServiceLbPoliciesResponse.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_service_lb_policy REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::GetServiceLbPolicyRequest] - # 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::NetworkServices::V1::ServiceLbPolicy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::NetworkServices::V1::ServiceLbPolicy] - # A result object deserialized from the server's reply - def get_service_lb_policy request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_service_lb_policy_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_service_lb_policy", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::NetworkServices::V1::ServiceLbPolicy.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_service_lb_policy REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::CreateServiceLbPolicyRequest] - # 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_service_lb_policy request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_service_lb_policy_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_service_lb_policy", - 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_service_lb_policy REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::UpdateServiceLbPolicyRequest] - # 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_service_lb_policy request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_service_lb_policy_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_service_lb_policy", - 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_service_lb_policy REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::DeleteServiceLbPolicyRequest] - # 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_service_lb_policy request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_service_lb_policy_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_service_lb_policy", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_gateway_route_view REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::GetGatewayRouteViewRequest] - # 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::NetworkServices::V1::GatewayRouteView] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::NetworkServices::V1::GatewayRouteView] - # A result object deserialized from the server's reply - def get_gateway_route_view request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_gateway_route_view_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_gateway_route_view", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::NetworkServices::V1::GatewayRouteView.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_mesh_route_view REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::GetMeshRouteViewRequest] - # 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::NetworkServices::V1::MeshRouteView] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::NetworkServices::V1::MeshRouteView] - # A result object deserialized from the server's reply - def get_mesh_route_view request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_mesh_route_view_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_mesh_route_view", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::NetworkServices::V1::MeshRouteView.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_gateway_route_views REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::ListGatewayRouteViewsRequest] - # 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::NetworkServices::V1::ListGatewayRouteViewsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::NetworkServices::V1::ListGatewayRouteViewsResponse] - # A result object deserialized from the server's reply - def list_gateway_route_views request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_gateway_route_views_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_gateway_route_views", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::NetworkServices::V1::ListGatewayRouteViewsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_mesh_route_views REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::ListMeshRouteViewsRequest] - # 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::NetworkServices::V1::ListMeshRouteViewsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::NetworkServices::V1::ListMeshRouteViewsResponse] - # A result object deserialized from the server's reply - def list_mesh_route_views request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_mesh_route_views_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_mesh_route_views", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::NetworkServices::V1::ListMeshRouteViewsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_agent_gateways REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::ListAgentGatewaysRequest] - # 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::NetworkServices::V1::ListAgentGatewaysResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::NetworkServices::V1::ListAgentGatewaysResponse] - # A result object deserialized from the server's reply - def list_agent_gateways request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_agent_gateways_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_agent_gateways", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::NetworkServices::V1::ListAgentGatewaysResponse.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_agent_gateway REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::GetAgentGatewayRequest] - # 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::NetworkServices::V1::AgentGateway] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::NetworkServices::V1::AgentGateway] - # A result object deserialized from the server's reply - def get_agent_gateway request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_agent_gateway_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_agent_gateway", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::NetworkServices::V1::AgentGateway.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_agent_gateway REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::CreateAgentGatewayRequest] - # 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_agent_gateway request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_agent_gateway_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_agent_gateway", - 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_agent_gateway REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::UpdateAgentGatewayRequest] - # 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_agent_gateway request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_agent_gateway_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_agent_gateway", - 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_agent_gateway REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::DeleteAgentGatewayRequest] - # 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_agent_gateway request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_agent_gateway_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_agent_gateway", - 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_endpoint_policies REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::ListEndpointPoliciesRequest] - # 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_endpoint_policies_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/endpointPolicies", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_endpoint_policy REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::GetEndpointPolicyRequest] - # 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_endpoint_policy_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/endpointPolicies/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_endpoint_policy REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::CreateEndpointPolicyRequest] - # 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_endpoint_policy_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/endpointPolicies", - body: "endpoint_policy", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_endpoint_policy REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::UpdateEndpointPolicyRequest] - # 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_endpoint_policy_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{endpoint_policy.name}", - body: "endpoint_policy", - matches: [ - ["endpoint_policy.name", %r{^projects/[^/]+/locations/[^/]+/endpointPolicies/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_endpoint_policy REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::DeleteEndpointPolicyRequest] - # 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_endpoint_policy_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/endpointPolicies/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_wasm_plugin_versions REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::ListWasmPluginVersionsRequest] - # 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_wasm_plugin_versions_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/versions", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/wasmPlugins/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_wasm_plugin_version REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::GetWasmPluginVersionRequest] - # 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_wasm_plugin_version_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/wasmPlugins/[^/]+/versions/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_wasm_plugin_version REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::CreateWasmPluginVersionRequest] - # 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_wasm_plugin_version_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/versions", - body: "wasm_plugin_version", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/wasmPlugins/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_wasm_plugin_version REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::DeleteWasmPluginVersionRequest] - # 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_wasm_plugin_version_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/wasmPlugins/[^/]+/versions/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_wasm_plugins REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::ListWasmPluginsRequest] - # 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_wasm_plugins_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/wasmPlugins", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_wasm_plugin REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::GetWasmPluginRequest] - # 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_wasm_plugin_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/wasmPlugins/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_wasm_plugin REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::CreateWasmPluginRequest] - # 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_wasm_plugin_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/wasmPlugins", - body: "wasm_plugin", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_wasm_plugin REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::UpdateWasmPluginRequest] - # 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_wasm_plugin_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{wasm_plugin.name}", - body: "wasm_plugin", - matches: [ - ["wasm_plugin.name", %r{^projects/[^/]+/locations/[^/]+/wasmPlugins/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_wasm_plugin REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::DeleteWasmPluginRequest] - # 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_wasm_plugin_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/wasmPlugins/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_gateways REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::ListGatewaysRequest] - # 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_gateways_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/gateways", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_gateway REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::GetGatewayRequest] - # 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_gateway_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/gateways/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_gateway REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::CreateGatewayRequest] - # 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_gateway_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/gateways", - body: "gateway", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_gateway REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::UpdateGatewayRequest] - # 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_gateway_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{gateway.name}", - body: "gateway", - matches: [ - ["gateway.name", %r{^projects/[^/]+/locations/[^/]+/gateways/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_gateway REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::DeleteGatewayRequest] - # 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_gateway_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/gateways/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_grpc_routes REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::ListGrpcRoutesRequest] - # 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_grpc_routes_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/grpcRoutes", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_grpc_route REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::GetGrpcRouteRequest] - # 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_grpc_route_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/grpcRoutes/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_grpc_route REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::CreateGrpcRouteRequest] - # 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_grpc_route_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/grpcRoutes", - body: "grpc_route", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_grpc_route REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::UpdateGrpcRouteRequest] - # 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_grpc_route_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{grpc_route.name}", - body: "grpc_route", - matches: [ - ["grpc_route.name", %r{^projects/[^/]+/locations/[^/]+/grpcRoutes/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_grpc_route REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::DeleteGrpcRouteRequest] - # 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_grpc_route_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/grpcRoutes/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_http_routes REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::ListHttpRoutesRequest] - # 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_http_routes_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/httpRoutes", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_http_route REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::GetHttpRouteRequest] - # 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_http_route_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/httpRoutes/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_http_route REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::CreateHttpRouteRequest] - # 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_http_route_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/httpRoutes", - body: "http_route", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_http_route REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::UpdateHttpRouteRequest] - # 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_http_route_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{http_route.name}", - body: "http_route", - matches: [ - ["http_route.name", %r{^projects/[^/]+/locations/[^/]+/httpRoutes/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_http_route REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::DeleteHttpRouteRequest] - # 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_http_route_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/httpRoutes/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_tcp_routes REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::ListTcpRoutesRequest] - # 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_tcp_routes_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/tcpRoutes", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_tcp_route REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::GetTcpRouteRequest] - # 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_tcp_route_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/tcpRoutes/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_tcp_route REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::CreateTcpRouteRequest] - # 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_tcp_route_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/tcpRoutes", - body: "tcp_route", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_tcp_route REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::UpdateTcpRouteRequest] - # 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_tcp_route_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{tcp_route.name}", - body: "tcp_route", - matches: [ - ["tcp_route.name", %r{^projects/[^/]+/locations/[^/]+/tcpRoutes/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_tcp_route REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::DeleteTcpRouteRequest] - # 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_tcp_route_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/tcpRoutes/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_tls_routes REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::ListTlsRoutesRequest] - # 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_tls_routes_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/tlsRoutes", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_tls_route REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::GetTlsRouteRequest] - # 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_tls_route_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/tlsRoutes/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_tls_route REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::CreateTlsRouteRequest] - # 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_tls_route_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/tlsRoutes", - body: "tls_route", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_tls_route REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::UpdateTlsRouteRequest] - # 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_tls_route_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{tls_route.name}", - body: "tls_route", - matches: [ - ["tls_route.name", %r{^projects/[^/]+/locations/[^/]+/tlsRoutes/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_tls_route REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::DeleteTlsRouteRequest] - # 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_tls_route_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/tlsRoutes/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_service_bindings REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::ListServiceBindingsRequest] - # 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_service_bindings_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/serviceBindings", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_service_binding REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::GetServiceBindingRequest] - # 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_service_binding_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/serviceBindings/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_service_binding REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::CreateServiceBindingRequest] - # 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_service_binding_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/serviceBindings", - body: "service_binding", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_service_binding REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::UpdateServiceBindingRequest] - # 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_service_binding_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{service_binding.name}", - body: "service_binding", - matches: [ - ["service_binding.name", %r{^projects/[^/]+/locations/[^/]+/serviceBindings/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_service_binding REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::DeleteServiceBindingRequest] - # 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_service_binding_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/serviceBindings/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_meshes REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::ListMeshesRequest] - # 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_meshes_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/meshes", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_mesh REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::GetMeshRequest] - # 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_mesh_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/meshes/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_mesh REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::CreateMeshRequest] - # 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_mesh_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/meshes", - body: "mesh", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_mesh REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::UpdateMeshRequest] - # 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_mesh_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{mesh.name}", - body: "mesh", - matches: [ - ["mesh.name", %r{^projects/[^/]+/locations/[^/]+/meshes/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_mesh REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::DeleteMeshRequest] - # 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_mesh_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/meshes/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_service_lb_policies REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::ListServiceLbPoliciesRequest] - # 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_service_lb_policies_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/serviceLbPolicies", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_service_lb_policy REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::GetServiceLbPolicyRequest] - # 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_service_lb_policy_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/serviceLbPolicies/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_service_lb_policy REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::CreateServiceLbPolicyRequest] - # 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_service_lb_policy_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/serviceLbPolicies", - body: "service_lb_policy", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_service_lb_policy REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::UpdateServiceLbPolicyRequest] - # 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_service_lb_policy_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{service_lb_policy.name}", - body: "service_lb_policy", - matches: [ - ["service_lb_policy.name", %r{^projects/[^/]+/locations/[^/]+/serviceLbPolicies/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_service_lb_policy REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::DeleteServiceLbPolicyRequest] - # 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_service_lb_policy_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/serviceLbPolicies/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_gateway_route_view REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::GetGatewayRouteViewRequest] - # 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_gateway_route_view_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/gateways/[^/]+/routeViews/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_mesh_route_view REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::GetMeshRouteViewRequest] - # 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_mesh_route_view_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/meshes/[^/]+/routeViews/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_gateway_route_views REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::ListGatewayRouteViewsRequest] - # 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_gateway_route_views_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/routeViews", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/gateways/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_mesh_route_views REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::ListMeshRouteViewsRequest] - # 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_mesh_route_views_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/routeViews", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/meshes/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_agent_gateways REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::ListAgentGatewaysRequest] - # 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_agent_gateways_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/agentGateways", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_agent_gateway REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::GetAgentGatewayRequest] - # 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_agent_gateway_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/agentGateways/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_agent_gateway REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::CreateAgentGatewayRequest] - # 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_agent_gateway_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/agentGateways", - body: "agent_gateway", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_agent_gateway REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::UpdateAgentGatewayRequest] - # 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_agent_gateway_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{agent_gateway.name}", - body: "agent_gateway", - matches: [ - ["agent_gateway.name", %r{^projects/[^/]+/locations/[^/]+/agentGateways/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_agent_gateway REST call - # - # @param request_pb [::Google::Cloud::NetworkServices::V1::DeleteAgentGatewayRequest] - # 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_agent_gateway_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/agentGateways/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/rest.rb b/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/rest.rb deleted file mode 100644 index d1fd99053120..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/rest.rb +++ /dev/null @@ -1,39 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/network_services/v1/dep_service/rest" -require "google/cloud/network_services/v1/network_services/rest" -require "google/cloud/network_services/v1/bindings_override" -require "google/cloud/network_services/v1/version" - -module Google - module Cloud - module NetworkServices - ## - # To load just the REST part of this package, including all its services, and instantiate a REST client: - # - # @example - # - # require "google/cloud/network_services/v1/rest" - # client = ::Google::Cloud::NetworkServices::V1::DepService::Rest::Client.new - # - module V1 - end - end - end -end diff --git a/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/version.rb b/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/v1/version.rb deleted file mode 100644 index dc762e5120ec..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/network_services/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 NetworkServices - module V1 - VERSION = "0.0.1" - end - end - end -end diff --git a/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/common_pb.rb b/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/common_pb.rb deleted file mode 100644 index 0265ca12a387..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/common_pb.rb +++ /dev/null @@ -1,30 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/networkservices/v1/common.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n,google/cloud/networkservices/v1/common.proto\x12\x1fgoogle.cloud.networkservices.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x80\x02\n\x11OperationMetadata\x12\x34\n\x0b\x63reate_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x31\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x13\n\x06target\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x11\n\x04verb\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\x1b\n\x0estatus_message\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12#\n\x16requested_cancellation\x18\x06 \x01(\x08\x42\x03\xe0\x41\x03\x12\x18\n\x0b\x61pi_version\x18\x07 \x01(\tB\x03\xe0\x41\x03\")\n\x13TrafficPortSelector\x12\x12\n\x05ports\x18\x01 \x03(\tB\x03\xe0\x41\x01\"\xcc\x04\n\x0f\x45ndpointMatcher\x12g\n\x16metadata_label_matcher\x18\x01 \x01(\x0b\x32\x45.google.cloud.networkservices.v1.EndpointMatcher.MetadataLabelMatcherH\x00\x1a\xbf\x03\n\x14MetadataLabelMatcher\x12\x87\x01\n\x1dmetadata_label_match_criteria\x18\x01 \x01(\x0e\x32`.google.cloud.networkservices.v1.EndpointMatcher.MetadataLabelMatcher.MetadataLabelMatchCriteria\x12m\n\x0fmetadata_labels\x18\x02 \x03(\x0b\x32T.google.cloud.networkservices.v1.EndpointMatcher.MetadataLabelMatcher.MetadataLabels\x1a\x43\n\x0eMetadataLabels\x12\x17\n\nlabel_name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0blabel_value\x18\x02 \x01(\tB\x03\xe0\x41\x02\"i\n\x1aMetadataLabelMatchCriteria\x12-\n)METADATA_LABEL_MATCH_CRITERIA_UNSPECIFIED\x10\x00\x12\r\n\tMATCH_ANY\x10\x01\x12\r\n\tMATCH_ALL\x10\x02\x42\x0e\n\x0cmatcher_type*J\n\x0c\x45nvoyHeaders\x12\x1d\n\x19\x45NVOY_HEADERS_UNSPECIFIED\x10\x00\x12\x08\n\x04NONE\x10\x01\x12\x11\n\rDEBUG_HEADERS\x10\x02\x42\xec\x01\n#com.google.cloud.networkservices.v1B\x0b\x43ommonProtoP\x01ZMcloud.google.com/go/networkservices/apiv1/networkservicespb;networkservicespb\xaa\x02\x1fGoogle.Cloud.NetworkServices.V1\xca\x02\x1fGoogle\\Cloud\\NetworkServices\\V1\xea\x02\"Google::Cloud::NetworkServices::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module NetworkServices - module V1 - OperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.OperationMetadata").msgclass - TrafficPortSelector = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.TrafficPortSelector").msgclass - EndpointMatcher = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.EndpointMatcher").msgclass - EndpointMatcher::MetadataLabelMatcher = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.EndpointMatcher.MetadataLabelMatcher").msgclass - EndpointMatcher::MetadataLabelMatcher::MetadataLabels = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.EndpointMatcher.MetadataLabelMatcher.MetadataLabels").msgclass - EndpointMatcher::MetadataLabelMatcher::MetadataLabelMatchCriteria = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.EndpointMatcher.MetadataLabelMatcher.MetadataLabelMatchCriteria").enummodule - EnvoyHeaders = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.EnvoyHeaders").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/dep_pb.rb b/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/dep_pb.rb deleted file mode 100644 index 189ed93ceeaf..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/dep_pb.rb +++ /dev/null @@ -1,68 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/networkservices/v1/dep.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/field_info_pb' -require 'google/api/resource_pb' -require 'google/cloud/networkservices/v1/common_pb' -require 'google/longrunning/operations_pb' -require 'google/protobuf/duration_pb' -require 'google/protobuf/empty_pb' -require 'google/protobuf/field_mask_pb' -require 'google/protobuf/struct_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n)google/cloud/networkservices/v1/dep.proto\x12\x1fgoogle.cloud.networkservices.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1bgoogle/api/field_info.proto\x1a\x19google/api/resource.proto\x1a,google/cloud/networkservices/v1/common.proto\x1a#google/longrunning/operations.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xa0\x06\n\x0e\x45xtensionChain\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\\\n\x0fmatch_condition\x18\x02 \x01(\x0b\x32>.google.cloud.networkservices.v1.ExtensionChain.MatchConditionB\x03\xe0\x41\x02\x12R\n\nextensions\x18\x03 \x03(\x0b\x32\x39.google.cloud.networkservices.v1.ExtensionChain.ExtensionB\x03\xe0\x41\x02\x1a-\n\x0eMatchCondition\x12\x1b\n\x0e\x63\x65l_expression\x18\x01 \x01(\tB\x03\xe0\x41\x02\x1a\x99\x04\n\tExtension\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tauthority\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x14\n\x07service\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12I\n\x10supported_events\x18\x04 \x03(\x0e\x32*.google.cloud.networkservices.v1.EventTypeB\x03\xe0\x41\x01\x12/\n\x07timeout\x18\x05 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x01\x12\x16\n\tfail_open\x18\x06 \x01(\x08\x42\x03\xe0\x41\x01\x12\x1c\n\x0f\x66orward_headers\x18\x07 \x03(\tB\x03\xe0\x41\x01\x12\x1f\n\x12\x66orward_attributes\x18\x08 \x03(\tB\x03\xe0\x41\x01\x12.\n\x08metadata\x18\t \x01(\x0b\x32\x17.google.protobuf.StructB\x03\xe0\x41\x01\x12R\n\x16request_body_send_mode\x18\x0e \x01(\x0e\x32-.google.cloud.networkservices.v1.BodySendModeB\x03\xe0\x41\x01\x12S\n\x17response_body_send_mode\x18\x0f \x01(\x0e\x32-.google.cloud.networkservices.v1.BodySendModeB\x03\xe0\x41\x01\x12\x1f\n\x12observability_mode\x18\x10 \x01(\x08\x42\x03\xe0\x41\x01\"\xe5\x05\n\x12LbTrafficExtension\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x08\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\t \x01(\tB\x03\xe0\x41\x01\x12T\n\x06labels\x18\x04 \x03(\x0b\x32?.google.cloud.networkservices.v1.LbTrafficExtension.LabelsEntryB\x03\xe0\x41\x01\x12\x1d\n\x10\x66orwarding_rules\x18\x05 \x03(\tB\x03\xe0\x41\x01\x12N\n\x10\x65xtension_chains\x18\x07 \x03(\x0b\x32/.google.cloud.networkservices.v1.ExtensionChainB\x03\xe0\x41\x02\x12X\n\x15load_balancing_scheme\x18\x08 \x01(\x0e\x32\x34.google.cloud.networkservices.v1.LoadBalancingSchemeB\x03\xe0\x41\x02\x12.\n\x08metadata\x18\n \x01(\x0b\x32\x17.google.protobuf.StructB\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\xb4\x01\xea\x41\xb0\x01\n1networkservices.googleapis.com/LbTrafficExtension\x12Rprojects/{project}/locations/{location}/lbTrafficExtensions/{lb_traffic_extension}*\x13lbTrafficExtensions2\x12lbTrafficExtension\"\xc8\x01\n\x1eListLbTrafficExtensionsRequest\x12I\n\x06parent\x18\x01 \x01(\tB9\xe0\x41\x02\xfa\x41\x33\x12\x31networkservices.googleapis.com/LbTrafficExtension\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\xa3\x01\n\x1fListLbTrafficExtensionsResponse\x12R\n\x15lb_traffic_extensions\x18\x01 \x03(\x0b\x32\x33.google.cloud.networkservices.v1.LbTrafficExtension\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"g\n\x1cGetLbTrafficExtensionRequest\x12G\n\x04name\x18\x01 \x01(\tB9\xe0\x41\x02\xfa\x41\x33\n1networkservices.googleapis.com/LbTrafficExtension\"\x8b\x02\n\x1f\x43reateLbTrafficExtensionRequest\x12I\n\x06parent\x18\x01 \x01(\tB9\xe0\x41\x02\xfa\x41\x33\x12\x31networkservices.googleapis.com/LbTrafficExtension\x12$\n\x17lb_traffic_extension_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12V\n\x14lb_traffic_extension\x18\x03 \x01(\x0b\x32\x33.google.cloud.networkservices.v1.LbTrafficExtensionB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x04 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\xd0\x01\n\x1fUpdateLbTrafficExtensionRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x12V\n\x14lb_traffic_extension\x18\x02 \x01(\x0b\x32\x33.google.cloud.networkservices.v1.LbTrafficExtensionB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x03 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\x8b\x01\n\x1f\x44\x65leteLbTrafficExtensionRequest\x12G\n\x04name\x18\x01 \x01(\tB9\xe0\x41\x02\xfa\x41\x33\n1networkservices.googleapis.com/LbTrafficExtension\x12\x1f\n\nrequest_id\x18\x02 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\xd7\x05\n\x10LbRouteExtension\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x08\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\t \x01(\tB\x03\xe0\x41\x01\x12R\n\x06labels\x18\x04 \x03(\x0b\x32=.google.cloud.networkservices.v1.LbRouteExtension.LabelsEntryB\x03\xe0\x41\x01\x12\x1d\n\x10\x66orwarding_rules\x18\x05 \x03(\tB\x03\xe0\x41\x02\x12N\n\x10\x65xtension_chains\x18\x07 \x03(\x0b\x32/.google.cloud.networkservices.v1.ExtensionChainB\x03\xe0\x41\x02\x12X\n\x15load_balancing_scheme\x18\x08 \x01(\x0e\x32\x34.google.cloud.networkservices.v1.LoadBalancingSchemeB\x03\xe0\x41\x02\x12.\n\x08metadata\x18\n \x01(\x0b\x32\x17.google.protobuf.StructB\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\xaa\x01\xea\x41\xa6\x01\n/networkservices.googleapis.com/LbRouteExtension\x12Nprojects/{project}/locations/{location}/lbRouteExtensions/{lb_route_extension}*\x11lbRouteExtensions2\x10lbRouteExtension\"\xc4\x01\n\x1cListLbRouteExtensionsRequest\x12G\n\x06parent\x18\x01 \x01(\tB7\xe0\x41\x02\xfa\x41\x31\x12/networkservices.googleapis.com/LbRouteExtension\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x9d\x01\n\x1dListLbRouteExtensionsResponse\x12N\n\x13lb_route_extensions\x18\x01 \x03(\x0b\x32\x31.google.cloud.networkservices.v1.LbRouteExtension\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"c\n\x1aGetLbRouteExtensionRequest\x12\x45\n\x04name\x18\x01 \x01(\tB7\xe0\x41\x02\xfa\x41\x31\n/networkservices.googleapis.com/LbRouteExtension\"\x81\x02\n\x1d\x43reateLbRouteExtensionRequest\x12G\n\x06parent\x18\x01 \x01(\tB7\xe0\x41\x02\xfa\x41\x31\x12/networkservices.googleapis.com/LbRouteExtension\x12\"\n\x15lb_route_extension_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12R\n\x12lb_route_extension\x18\x03 \x01(\x0b\x32\x31.google.cloud.networkservices.v1.LbRouteExtensionB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x04 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\xca\x01\n\x1dUpdateLbRouteExtensionRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x12R\n\x12lb_route_extension\x18\x02 \x01(\x0b\x32\x31.google.cloud.networkservices.v1.LbRouteExtensionB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x03 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\x87\x01\n\x1d\x44\x65leteLbRouteExtensionRequest\x12\x45\n\x04name\x18\x01 \x01(\tB7\xe0\x41\x02\xfa\x41\x31\n/networkservices.googleapis.com/LbRouteExtension\x12\x1f\n\nrequest_id\x18\x02 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\xa0\x05\n\x0fLbEdgeExtension\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x08\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\t \x01(\tB\x03\xe0\x41\x01\x12Q\n\x06labels\x18\x04 \x03(\x0b\x32<.google.cloud.networkservices.v1.LbEdgeExtension.LabelsEntryB\x03\xe0\x41\x01\x12\x1d\n\x10\x66orwarding_rules\x18\x05 \x03(\tB\x03\xe0\x41\x02\x12N\n\x10\x65xtension_chains\x18\x06 \x03(\x0b\x32/.google.cloud.networkservices.v1.ExtensionChainB\x03\xe0\x41\x02\x12X\n\x15load_balancing_scheme\x18\x07 \x01(\x0e\x32\x34.google.cloud.networkservices.v1.LoadBalancingSchemeB\x03\xe0\x41\x02\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\xa5\x01\xea\x41\xa1\x01\n.networkservices.googleapis.com/LbEdgeExtension\x12Lprojects/{project}/locations/{location}/lbEdgeExtensions/{lb_edge_extension}*\x10lbEdgeExtensions2\x0flbEdgeExtension\"\xc2\x01\n\x1bListLbEdgeExtensionsRequest\x12\x46\n\x06parent\x18\x01 \x01(\tB6\xe0\x41\x02\xfa\x41\x30\x12.networkservices.googleapis.com/LbEdgeExtension\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x9a\x01\n\x1cListLbEdgeExtensionsResponse\x12L\n\x12lb_edge_extensions\x18\x01 \x03(\x0b\x32\x30.google.cloud.networkservices.v1.LbEdgeExtension\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"a\n\x19GetLbEdgeExtensionRequest\x12\x44\n\x04name\x18\x01 \x01(\tB6\xe0\x41\x02\xfa\x41\x30\n.networkservices.googleapis.com/LbEdgeExtension\"\xfc\x01\n\x1c\x43reateLbEdgeExtensionRequest\x12\x46\n\x06parent\x18\x01 \x01(\tB6\xe0\x41\x02\xfa\x41\x30\x12.networkservices.googleapis.com/LbEdgeExtension\x12!\n\x14lb_edge_extension_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12P\n\x11lb_edge_extension\x18\x03 \x01(\x0b\x32\x30.google.cloud.networkservices.v1.LbEdgeExtensionB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x04 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\xc7\x01\n\x1cUpdateLbEdgeExtensionRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x12P\n\x11lb_edge_extension\x18\x02 \x01(\x0b\x32\x30.google.cloud.networkservices.v1.LbEdgeExtensionB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x03 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\x85\x01\n\x1c\x44\x65leteLbEdgeExtensionRequest\x12\x44\n\x04name\x18\x01 \x01(\tB6\xe0\x41\x02\xfa\x41\x30\n.networkservices.googleapis.com/LbEdgeExtension\x12\x1f\n\nrequest_id\x18\x02 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\xd6\x06\n\x0e\x41uthzExtension\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x08\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12P\n\x06labels\x18\x05 \x03(\x0b\x32;.google.cloud.networkservices.v1.AuthzExtension.LabelsEntryB\x03\xe0\x41\x01\x12X\n\x15load_balancing_scheme\x18\x06 \x01(\x0e\x32\x34.google.cloud.networkservices.v1.LoadBalancingSchemeB\x03\xe0\x41\x01\x12\x16\n\tauthority\x18\x07 \x01(\tB\x03\xe0\x41\x01\x12\x14\n\x07service\x18\x08 \x01(\tB\x03\xe0\x41\x02\x12/\n\x07timeout\x18\t \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x02\x12\x16\n\tfail_open\x18\n \x01(\x08\x42\x03\xe0\x41\x01\x12.\n\x08metadata\x18\x0b \x01(\x0b\x32\x17.google.protobuf.StructB\x03\xe0\x41\x01\x12\x1c\n\x0f\x66orward_headers\x18\x0c \x03(\tB\x03\xe0\x41\x01\x12\x1f\n\x12\x66orward_attributes\x18\r \x03(\tB\x03\xe0\x41\x01\x12\x45\n\x0bwire_format\x18\x0e \x01(\x0e\x32+.google.cloud.networkservices.v1.WireFormatB\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\x9f\x01\xea\x41\x9b\x01\n-networkservices.googleapis.com/AuthzExtension\x12Iprojects/{project}/locations/{location}/authzExtensions/{authz_extension}*\x0f\x61uthzExtensions2\x0e\x61uthzExtension\"\xc0\x01\n\x1aListAuthzExtensionsRequest\x12\x45\n\x06parent\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\x12-networkservices.googleapis.com/AuthzExtension\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x96\x01\n\x1bListAuthzExtensionsResponse\x12I\n\x10\x61uthz_extensions\x18\x01 \x03(\x0b\x32/.google.cloud.networkservices.v1.AuthzExtension\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"_\n\x18GetAuthzExtensionRequest\x12\x43\n\x04name\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-networkservices.googleapis.com/AuthzExtension\"\xf5\x01\n\x1b\x43reateAuthzExtensionRequest\x12\x45\n\x06parent\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\x12-networkservices.googleapis.com/AuthzExtension\x12\x1f\n\x12\x61uthz_extension_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12M\n\x0f\x61uthz_extension\x18\x03 \x01(\x0b\x32/.google.cloud.networkservices.v1.AuthzExtensionB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x04 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\xc3\x01\n\x1bUpdateAuthzExtensionRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12M\n\x0f\x61uthz_extension\x18\x02 \x01(\x0b\x32/.google.cloud.networkservices.v1.AuthzExtensionB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x03 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\x83\x01\n\x1b\x44\x65leteAuthzExtensionRequest\x12\x43\n\x04name\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-networkservices.googleapis.com/AuthzExtension\x12\x1f\n\nrequest_id\x18\x02 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01*\xa4\x01\n\tEventType\x12\x1a\n\x16\x45VENT_TYPE_UNSPECIFIED\x10\x00\x12\x13\n\x0fREQUEST_HEADERS\x10\x01\x12\x10\n\x0cREQUEST_BODY\x10\x02\x12\x14\n\x10RESPONSE_HEADERS\x10\x03\x12\x11\n\rRESPONSE_BODY\x10\x04\x12\x14\n\x10REQUEST_TRAILERS\x10\x05\x12\x15\n\x11RESPONSE_TRAILERS\x10\x06*h\n\x13LoadBalancingScheme\x12%\n!LOAD_BALANCING_SCHEME_UNSPECIFIED\x10\x00\x12\x14\n\x10INTERNAL_MANAGED\x10\x01\x12\x14\n\x10\x45XTERNAL_MANAGED\x10\x02*P\n\nWireFormat\x12\x1b\n\x17WIRE_FORMAT_UNSPECIFIED\x10\x00\x12\x11\n\rEXT_PROC_GRPC\x10\x01\x12\x12\n\x0e\x45XT_AUTHZ_GRPC\x10\x03*t\n\x0c\x42odySendMode\x12\x1e\n\x1a\x42ODY_SEND_MODE_UNSPECIFIED\x10\x00\x12\x1b\n\x17\x42ODY_SEND_MODE_STREAMED\x10\x01\x12\'\n#BODY_SEND_MODE_FULL_DUPLEX_STREAMED\x10\x02\x32\xf9\'\n\nDepService\x12\xe6\x01\n\x17ListLbTrafficExtensions\x12?.google.cloud.networkservices.v1.ListLbTrafficExtensionsRequest\x1a@.google.cloud.networkservices.v1.ListLbTrafficExtensionsResponse\"H\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x39\x12\x37/v1/{parent=projects/*/locations/*}/lbTrafficExtensions\x12\xd3\x01\n\x15GetLbTrafficExtension\x12=.google.cloud.networkservices.v1.GetLbTrafficExtensionRequest\x1a\x33.google.cloud.networkservices.v1.LbTrafficExtension\"F\xda\x41\x04name\x82\xd3\xe4\x93\x02\x39\x12\x37/v1/{name=projects/*/locations/*/lbTrafficExtensions/*}\x12\xb3\x02\n\x18\x43reateLbTrafficExtension\x12@.google.cloud.networkservices.v1.CreateLbTrafficExtensionRequest\x1a\x1d.google.longrunning.Operation\"\xb5\x01\xca\x41\'\n\x12LbTrafficExtension\x12\x11OperationMetadata\xda\x41\x33parent,lb_traffic_extension,lb_traffic_extension_id\x82\xd3\xe4\x93\x02O\"7/v1/{parent=projects/*/locations/*}/lbTrafficExtensions:\x14lb_traffic_extension\x12\xb5\x02\n\x18UpdateLbTrafficExtension\x12@.google.cloud.networkservices.v1.UpdateLbTrafficExtensionRequest\x1a\x1d.google.longrunning.Operation\"\xb7\x01\xca\x41\'\n\x12LbTrafficExtension\x12\x11OperationMetadata\xda\x41 lb_traffic_extension,update_mask\x82\xd3\xe4\x93\x02\x64\x32L/v1/{lb_traffic_extension.name=projects/*/locations/*/lbTrafficExtensions/*}:\x14lb_traffic_extension\x12\xf0\x01\n\x18\x44\x65leteLbTrafficExtension\x12@.google.cloud.networkservices.v1.DeleteLbTrafficExtensionRequest\x1a\x1d.google.longrunning.Operation\"s\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x39*7/v1/{name=projects/*/locations/*/lbTrafficExtensions/*}\x12\xde\x01\n\x15ListLbRouteExtensions\x12=.google.cloud.networkservices.v1.ListLbRouteExtensionsRequest\x1a>.google.cloud.networkservices.v1.ListLbRouteExtensionsResponse\"F\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x37\x12\x35/v1/{parent=projects/*/locations/*}/lbRouteExtensions\x12\xcb\x01\n\x13GetLbRouteExtension\x12;.google.cloud.networkservices.v1.GetLbRouteExtensionRequest\x1a\x31.google.cloud.networkservices.v1.LbRouteExtension\"D\xda\x41\x04name\x82\xd3\xe4\x93\x02\x37\x12\x35/v1/{name=projects/*/locations/*/lbRouteExtensions/*}\x12\xa5\x02\n\x16\x43reateLbRouteExtension\x12>.google.cloud.networkservices.v1.CreateLbRouteExtensionRequest\x1a\x1d.google.longrunning.Operation\"\xab\x01\xca\x41%\n\x10LbRouteExtension\x12\x11OperationMetadata\xda\x41/parent,lb_route_extension,lb_route_extension_id\x82\xd3\xe4\x93\x02K\"5/v1/{parent=projects/*/locations/*}/lbRouteExtensions:\x12lb_route_extension\x12\xa7\x02\n\x16UpdateLbRouteExtension\x12>.google.cloud.networkservices.v1.UpdateLbRouteExtensionRequest\x1a\x1d.google.longrunning.Operation\"\xad\x01\xca\x41%\n\x10LbRouteExtension\x12\x11OperationMetadata\xda\x41\x1elb_route_extension,update_mask\x82\xd3\xe4\x93\x02^2H/v1/{lb_route_extension.name=projects/*/locations/*/lbRouteExtensions/*}:\x12lb_route_extension\x12\xea\x01\n\x16\x44\x65leteLbRouteExtension\x12>.google.cloud.networkservices.v1.DeleteLbRouteExtensionRequest\x1a\x1d.google.longrunning.Operation\"q\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x37*5/v1/{name=projects/*/locations/*/lbRouteExtensions/*}\x12\xda\x01\n\x14ListLbEdgeExtensions\x12<.google.cloud.networkservices.v1.ListLbEdgeExtensionsRequest\x1a=.google.cloud.networkservices.v1.ListLbEdgeExtensionsResponse\"E\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x36\x12\x34/v1/{parent=projects/*/locations/*}/lbEdgeExtensions\x12\xc7\x01\n\x12GetLbEdgeExtension\x12:.google.cloud.networkservices.v1.GetLbEdgeExtensionRequest\x1a\x30.google.cloud.networkservices.v1.LbEdgeExtension\"C\xda\x41\x04name\x82\xd3\xe4\x93\x02\x36\x12\x34/v1/{name=projects/*/locations/*/lbEdgeExtensions/*}\x12\x9e\x02\n\x15\x43reateLbEdgeExtension\x12=.google.cloud.networkservices.v1.CreateLbEdgeExtensionRequest\x1a\x1d.google.longrunning.Operation\"\xa6\x01\xca\x41$\n\x0fLbEdgeExtension\x12\x11OperationMetadata\xda\x41-parent,lb_edge_extension,lb_edge_extension_id\x82\xd3\xe4\x93\x02I\"4/v1/{parent=projects/*/locations/*}/lbEdgeExtensions:\x11lb_edge_extension\x12\xa0\x02\n\x15UpdateLbEdgeExtension\x12=.google.cloud.networkservices.v1.UpdateLbEdgeExtensionRequest\x1a\x1d.google.longrunning.Operation\"\xa8\x01\xca\x41$\n\x0fLbEdgeExtension\x12\x11OperationMetadata\xda\x41\x1dlb_edge_extension,update_mask\x82\xd3\xe4\x93\x02[2F/v1/{lb_edge_extension.name=projects/*/locations/*/lbEdgeExtensions/*}:\x11lb_edge_extension\x12\xe7\x01\n\x15\x44\x65leteLbEdgeExtension\x12=.google.cloud.networkservices.v1.DeleteLbEdgeExtensionRequest\x1a\x1d.google.longrunning.Operation\"p\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x36*4/v1/{name=projects/*/locations/*/lbEdgeExtensions/*}\x12\xd6\x01\n\x13ListAuthzExtensions\x12;.google.cloud.networkservices.v1.ListAuthzExtensionsRequest\x1a<.google.cloud.networkservices.v1.ListAuthzExtensionsResponse\"D\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x35\x12\x33/v1/{parent=projects/*/locations/*}/authzExtensions\x12\xc3\x01\n\x11GetAuthzExtension\x12\x39.google.cloud.networkservices.v1.GetAuthzExtensionRequest\x1a/.google.cloud.networkservices.v1.AuthzExtension\"B\xda\x41\x04name\x82\xd3\xe4\x93\x02\x35\x12\x33/v1/{name=projects/*/locations/*/authzExtensions/*}\x12\x94\x02\n\x14\x43reateAuthzExtension\x12<.google.cloud.networkservices.v1.CreateAuthzExtensionRequest\x1a\x1d.google.longrunning.Operation\"\x9e\x01\xca\x41#\n\x0e\x41uthzExtension\x12\x11OperationMetadata\xda\x41)parent,authz_extension,authz_extension_id\x82\xd3\xe4\x93\x02\x46\"3/v1/{parent=projects/*/locations/*}/authzExtensions:\x0f\x61uthz_extension\x12\x96\x02\n\x14UpdateAuthzExtension\x12<.google.cloud.networkservices.v1.UpdateAuthzExtensionRequest\x1a\x1d.google.longrunning.Operation\"\xa0\x01\xca\x41#\n\x0e\x41uthzExtension\x12\x11OperationMetadata\xda\x41\x1b\x61uthz_extension,update_mask\x82\xd3\xe4\x93\x02V2C/v1/{authz_extension.name=projects/*/locations/*/authzExtensions/*}:\x0f\x61uthz_extension\x12\xe4\x01\n\x14\x44\x65leteAuthzExtension\x12<.google.cloud.networkservices.v1.DeleteAuthzExtensionRequest\x1a\x1d.google.longrunning.Operation\"o\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x35*3/v1/{name=projects/*/locations/*/authzExtensions/*}\x1aR\xca\x41\x1enetworkservices.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xe9\x01\n#com.google.cloud.networkservices.v1B\x08\x44\x65pProtoP\x01ZMcloud.google.com/go/networkservices/apiv1/networkservicespb;networkservicespb\xaa\x02\x1fGoogle.Cloud.NetworkServices.V1\xca\x02\x1fGoogle\\Cloud\\NetworkServices\\V1\xea\x02\"Google::Cloud::NetworkServices::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module NetworkServices - module V1 - ExtensionChain = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.ExtensionChain").msgclass - ExtensionChain::MatchCondition = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.ExtensionChain.MatchCondition").msgclass - ExtensionChain::Extension = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.ExtensionChain.Extension").msgclass - LbTrafficExtension = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.LbTrafficExtension").msgclass - ListLbTrafficExtensionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.ListLbTrafficExtensionsRequest").msgclass - ListLbTrafficExtensionsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.ListLbTrafficExtensionsResponse").msgclass - GetLbTrafficExtensionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.GetLbTrafficExtensionRequest").msgclass - CreateLbTrafficExtensionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.CreateLbTrafficExtensionRequest").msgclass - UpdateLbTrafficExtensionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.UpdateLbTrafficExtensionRequest").msgclass - DeleteLbTrafficExtensionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.DeleteLbTrafficExtensionRequest").msgclass - LbRouteExtension = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.LbRouteExtension").msgclass - ListLbRouteExtensionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.ListLbRouteExtensionsRequest").msgclass - ListLbRouteExtensionsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.ListLbRouteExtensionsResponse").msgclass - GetLbRouteExtensionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.GetLbRouteExtensionRequest").msgclass - CreateLbRouteExtensionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.CreateLbRouteExtensionRequest").msgclass - UpdateLbRouteExtensionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.UpdateLbRouteExtensionRequest").msgclass - DeleteLbRouteExtensionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.DeleteLbRouteExtensionRequest").msgclass - LbEdgeExtension = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.LbEdgeExtension").msgclass - ListLbEdgeExtensionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.ListLbEdgeExtensionsRequest").msgclass - ListLbEdgeExtensionsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.ListLbEdgeExtensionsResponse").msgclass - GetLbEdgeExtensionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.GetLbEdgeExtensionRequest").msgclass - CreateLbEdgeExtensionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.CreateLbEdgeExtensionRequest").msgclass - UpdateLbEdgeExtensionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.UpdateLbEdgeExtensionRequest").msgclass - DeleteLbEdgeExtensionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.DeleteLbEdgeExtensionRequest").msgclass - AuthzExtension = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.AuthzExtension").msgclass - ListAuthzExtensionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.ListAuthzExtensionsRequest").msgclass - ListAuthzExtensionsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.ListAuthzExtensionsResponse").msgclass - GetAuthzExtensionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.GetAuthzExtensionRequest").msgclass - CreateAuthzExtensionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.CreateAuthzExtensionRequest").msgclass - UpdateAuthzExtensionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.UpdateAuthzExtensionRequest").msgclass - DeleteAuthzExtensionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.DeleteAuthzExtensionRequest").msgclass - EventType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.EventType").enummodule - LoadBalancingScheme = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.LoadBalancingScheme").enummodule - WireFormat = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.WireFormat").enummodule - BodySendMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.BodySendMode").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/dep_services_pb.rb b/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/dep_services_pb.rb deleted file mode 100644 index 2a220e2e005d..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/dep_services_pb.rb +++ /dev/null @@ -1,86 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/cloud/networkservices/v1/dep.proto for package 'Google.Cloud.NetworkServices.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/networkservices/v1/dep_pb' - -module Google - module Cloud - module NetworkServices - module V1 - module DepService - # Service describing handlers for resources. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.cloud.networkservices.v1.DepService' - - # Lists `LbTrafficExtension` resources in a given project and location. - rpc :ListLbTrafficExtensions, ::Google::Cloud::NetworkServices::V1::ListLbTrafficExtensionsRequest, ::Google::Cloud::NetworkServices::V1::ListLbTrafficExtensionsResponse - # Gets details of the specified `LbTrafficExtension` resource. - rpc :GetLbTrafficExtension, ::Google::Cloud::NetworkServices::V1::GetLbTrafficExtensionRequest, ::Google::Cloud::NetworkServices::V1::LbTrafficExtension - # Creates a new `LbTrafficExtension` resource in a given project and - # location. - rpc :CreateLbTrafficExtension, ::Google::Cloud::NetworkServices::V1::CreateLbTrafficExtensionRequest, ::Google::Longrunning::Operation - # Updates the parameters of the specified `LbTrafficExtension` resource. - rpc :UpdateLbTrafficExtension, ::Google::Cloud::NetworkServices::V1::UpdateLbTrafficExtensionRequest, ::Google::Longrunning::Operation - # Deletes the specified `LbTrafficExtension` resource. - rpc :DeleteLbTrafficExtension, ::Google::Cloud::NetworkServices::V1::DeleteLbTrafficExtensionRequest, ::Google::Longrunning::Operation - # Lists `LbRouteExtension` resources in a given project and location. - rpc :ListLbRouteExtensions, ::Google::Cloud::NetworkServices::V1::ListLbRouteExtensionsRequest, ::Google::Cloud::NetworkServices::V1::ListLbRouteExtensionsResponse - # Gets details of the specified `LbRouteExtension` resource. - rpc :GetLbRouteExtension, ::Google::Cloud::NetworkServices::V1::GetLbRouteExtensionRequest, ::Google::Cloud::NetworkServices::V1::LbRouteExtension - # Creates a new `LbRouteExtension` resource in a given project and location. - rpc :CreateLbRouteExtension, ::Google::Cloud::NetworkServices::V1::CreateLbRouteExtensionRequest, ::Google::Longrunning::Operation - # Updates the parameters of the specified `LbRouteExtension` resource. - rpc :UpdateLbRouteExtension, ::Google::Cloud::NetworkServices::V1::UpdateLbRouteExtensionRequest, ::Google::Longrunning::Operation - # Deletes the specified `LbRouteExtension` resource. - rpc :DeleteLbRouteExtension, ::Google::Cloud::NetworkServices::V1::DeleteLbRouteExtensionRequest, ::Google::Longrunning::Operation - # Lists `LbEdgeExtension` resources in a given project and location. - rpc :ListLbEdgeExtensions, ::Google::Cloud::NetworkServices::V1::ListLbEdgeExtensionsRequest, ::Google::Cloud::NetworkServices::V1::ListLbEdgeExtensionsResponse - # Gets details of the specified `LbEdgeExtension` resource. - rpc :GetLbEdgeExtension, ::Google::Cloud::NetworkServices::V1::GetLbEdgeExtensionRequest, ::Google::Cloud::NetworkServices::V1::LbEdgeExtension - # Creates a new `LbEdgeExtension` resource in a given project and location. - rpc :CreateLbEdgeExtension, ::Google::Cloud::NetworkServices::V1::CreateLbEdgeExtensionRequest, ::Google::Longrunning::Operation - # Updates the parameters of the specified `LbEdgeExtension` resource. - rpc :UpdateLbEdgeExtension, ::Google::Cloud::NetworkServices::V1::UpdateLbEdgeExtensionRequest, ::Google::Longrunning::Operation - # Deletes the specified `LbEdgeExtension` resource. - rpc :DeleteLbEdgeExtension, ::Google::Cloud::NetworkServices::V1::DeleteLbEdgeExtensionRequest, ::Google::Longrunning::Operation - # Lists `AuthzExtension` resources in a given project and location. - rpc :ListAuthzExtensions, ::Google::Cloud::NetworkServices::V1::ListAuthzExtensionsRequest, ::Google::Cloud::NetworkServices::V1::ListAuthzExtensionsResponse - # Gets details of the specified `AuthzExtension` resource. - rpc :GetAuthzExtension, ::Google::Cloud::NetworkServices::V1::GetAuthzExtensionRequest, ::Google::Cloud::NetworkServices::V1::AuthzExtension - # Creates a new `AuthzExtension` resource in a given project - # and location. - rpc :CreateAuthzExtension, ::Google::Cloud::NetworkServices::V1::CreateAuthzExtensionRequest, ::Google::Longrunning::Operation - # Updates the parameters of the specified `AuthzExtension` - # resource. - rpc :UpdateAuthzExtension, ::Google::Cloud::NetworkServices::V1::UpdateAuthzExtensionRequest, ::Google::Longrunning::Operation - # Deletes the specified `AuthzExtension` resource. - rpc :DeleteAuthzExtension, ::Google::Cloud::NetworkServices::V1::DeleteAuthzExtensionRequest, ::Google::Longrunning::Operation - end - - Stub = Service.rpc_stub_class - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/endpoint_policy_pb.rb b/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/endpoint_policy_pb.rb deleted file mode 100644 index ce1896ec04f0..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/endpoint_policy_pb.rb +++ /dev/null @@ -1,34 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/networkservices/v1/endpoint_policy.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/cloud/networkservices/v1/common_pb' -require 'google/protobuf/field_mask_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n5google/cloud/networkservices/v1/endpoint_policy.proto\x12\x1fgoogle.cloud.networkservices.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a,google/cloud/networkservices/v1/common.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x8c\x08\n\x0e\x45ndpointPolicy\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12P\n\x06labels\x18\x04 \x03(\x0b\x32;.google.cloud.networkservices.v1.EndpointPolicy.LabelsEntryB\x03\xe0\x41\x01\x12U\n\x04type\x18\x05 \x01(\x0e\x32\x42.google.cloud.networkservices.v1.EndpointPolicy.EndpointPolicyTypeB\x03\xe0\x41\x02\x12X\n\x14\x61uthorization_policy\x18\x07 \x01(\tB:\xe0\x41\x01\xfa\x41\x34\n2networksecurity.googleapis.com/AuthorizationPolicy\x12O\n\x10\x65ndpoint_matcher\x18\t \x01(\x0b\x32\x30.google.cloud.networkservices.v1.EndpointMatcherB\x03\xe0\x41\x02\x12X\n\x15traffic_port_selector\x18\n \x01(\x0b\x32\x34.google.cloud.networkservices.v1.TrafficPortSelectorB\x03\xe0\x41\x01\x12\x18\n\x0b\x64\x65scription\x18\x0b \x01(\tB\x03\xe0\x41\x01\x12Q\n\x11server_tls_policy\x18\x0c \x01(\tB6\xe0\x41\x01\xfa\x41\x30\n.networksecurity.googleapis.com/ServerTlsPolicy\x12Q\n\x11\x63lient_tls_policy\x18\r \x01(\tB6\xe0\x41\x01\xfa\x41\x30\n.networksecurity.googleapis.com/ClientTlsPolicy\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"^\n\x12\x45ndpointPolicyType\x12$\n ENDPOINT_POLICY_TYPE_UNSPECIFIED\x10\x00\x12\x11\n\rSIDECAR_PROXY\x10\x01\x12\x0f\n\x0bGRPC_SERVER\x10\x02:~\xea\x41{\n-networkservices.googleapis.com/EndpointPolicy\x12Jprojects/{project}/locations/{location}/endpointPolicies/{endpoint_policy}\"\xb0\x01\n\x1bListEndpointPoliciesRequest\x12\x45\n\x06parent\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\x12-networkservices.googleapis.com/EndpointPolicy\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12#\n\x16return_partial_success\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"\x98\x01\n\x1cListEndpointPoliciesResponse\x12J\n\x11\x65ndpoint_policies\x18\x01 \x03(\x0b\x32/.google.cloud.networkservices.v1.EndpointPolicy\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"_\n\x18GetEndpointPolicyRequest\x12\x43\n\x04name\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-networkservices.googleapis.com/EndpointPolicy\"\xd4\x01\n\x1b\x43reateEndpointPolicyRequest\x12\x45\n\x06parent\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\x12-networkservices.googleapis.com/EndpointPolicy\x12\x1f\n\x12\x65ndpoint_policy_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12M\n\x0f\x65ndpoint_policy\x18\x03 \x01(\x0b\x32/.google.cloud.networkservices.v1.EndpointPolicyB\x03\xe0\x41\x02\"\xa2\x01\n\x1bUpdateEndpointPolicyRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x12M\n\x0f\x65ndpoint_policy\x18\x02 \x01(\x0b\x32/.google.cloud.networkservices.v1.EndpointPolicyB\x03\xe0\x41\x02\"b\n\x1b\x44\x65leteEndpointPolicyRequest\x12\x43\n\x04name\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-networkservices.googleapis.com/EndpointPolicyB\x86\x05\n#com.google.cloud.networkservices.v1B\x13\x45ndpointPolicyProtoP\x01ZMcloud.google.com/go/networkservices/apiv1/networkservicespb;networkservicespb\xaa\x02\x1fGoogle.Cloud.NetworkServices.V1\xca\x02\x1fGoogle\\Cloud\\NetworkServices\\V1\xea\x02\"Google::Cloud::NetworkServices::V1\xea\x41\x8a\x01\n2networksecurity.googleapis.com/AuthorizationPolicy\x12Tprojects/{project}/locations/{location}/authorizationPolicies/{authorization_policy}\xea\x41\x7f\n.networksecurity.googleapis.com/ServerTlsPolicy\x12Mprojects/{project}/locations/{location}/serverTlsPolicies/{server_tls_policy}\xea\x41\x7f\n.networksecurity.googleapis.com/ClientTlsPolicy\x12Mprojects/{project}/locations/{location}/clientTlsPolicies/{client_tls_policy}b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module NetworkServices - module V1 - EndpointPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.EndpointPolicy").msgclass - EndpointPolicy::EndpointPolicyType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.EndpointPolicy.EndpointPolicyType").enummodule - ListEndpointPoliciesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.ListEndpointPoliciesRequest").msgclass - ListEndpointPoliciesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.ListEndpointPoliciesResponse").msgclass - GetEndpointPolicyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.GetEndpointPolicyRequest").msgclass - CreateEndpointPolicyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.CreateEndpointPolicyRequest").msgclass - UpdateEndpointPolicyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.UpdateEndpointPolicyRequest").msgclass - DeleteEndpointPolicyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.DeleteEndpointPolicyRequest").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/extensibility_pb.rb b/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/extensibility_pb.rb deleted file mode 100644 index 45e4540b73bd..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/extensibility_pb.rb +++ /dev/null @@ -1,43 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/networkservices/v1/extensibility.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/field_mask_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n3google/cloud/networkservices/v1/extensibility.proto\x12\x1fgoogle.cloud.networkservices.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xfa\x0b\n\nWasmPlugin\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12L\n\x06labels\x18\x05 \x03(\x0b\x32\x37.google.cloud.networkservices.v1.WasmPlugin.LabelsEntryB\x03\xe0\x41\x01\x12\x1c\n\x0fmain_version_id\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12N\n\nlog_config\x18\t \x01(\x0b\x32\x35.google.cloud.networkservices.v1.WasmPlugin.LogConfigB\x03\xe0\x41\x01\x12P\n\x08versions\x18\n \x03(\x0b\x32\x39.google.cloud.networkservices.v1.WasmPlugin.VersionsEntryB\x03\xe0\x41\x01\x12H\n\x07used_by\x18\x0b \x03(\x0b\x32\x32.google.cloud.networkservices.v1.WasmPlugin.UsedByB\x03\xe0\x41\x03\x1a\xcb\x03\n\x0eVersionDetails\x12\x1c\n\x12plugin_config_data\x18\t \x01(\x0cH\x00\x12\x1b\n\x11plugin_config_uri\x18\n \x01(\tH\x00\x12\x34\n\x0b\x63reate_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12[\n\x06labels\x18\x04 \x03(\x0b\x32\x46.google.cloud.networkservices.v1.WasmPlugin.VersionDetails.LabelsEntryB\x03\xe0\x41\x01\x12\x16\n\timage_uri\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x19\n\x0cimage_digest\x18\x06 \x01(\tB\x03\xe0\x41\x03\x12!\n\x14plugin_config_digest\x18\x0b \x01(\tB\x03\xe0\x41\x03\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x16\n\x14plugin_config_source\x1a\x80\x02\n\tLogConfig\x12\x13\n\x06\x65nable\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01\x12\x18\n\x0bsample_rate\x18\x02 \x01(\x02\x42\x03\xe0\x41\x07\x12Z\n\rmin_log_level\x18\x03 \x01(\x0e\x32>.google.cloud.networkservices.v1.WasmPlugin.LogConfig.LogLevelB\x03\xe0\x41\x07\"h\n\x08LogLevel\x12\x19\n\x15LOG_LEVEL_UNSPECIFIED\x10\x00\x12\t\n\x05TRACE\x10\x01\x12\t\n\x05\x44\x45\x42UG\x10\x02\x12\x08\n\x04INFO\x10\x03\x12\x08\n\x04WARN\x10\x04\x12\t\n\x05\x45RROR\x10\x05\x12\x0c\n\x08\x43RITICAL\x10\x06\x1a\x1b\n\x06UsedBy\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1ak\n\rVersionsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12I\n\x05value\x18\x02 \x01(\x0b\x32:.google.cloud.networkservices.v1.WasmPlugin.VersionDetails:\x02\x38\x01:q\xea\x41n\n)networkservices.googleapis.com/WasmPlugin\x12\x41projects/{project}/locations/{location}/wasmPlugins/{wasm_plugin}\"\xf4\x04\n\x11WasmPluginVersion\x12\x1c\n\x12plugin_config_data\x18\x0c \x01(\x0cH\x00\x12\x1b\n\x11plugin_config_uri\x18\r \x01(\tH\x00\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x34\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12S\n\x06labels\x18\x06 \x03(\x0b\x32>.google.cloud.networkservices.v1.WasmPluginVersion.LabelsEntryB\x03\xe0\x41\x01\x12\x16\n\timage_uri\x18\x08 \x01(\tB\x03\xe0\x41\x01\x12\x19\n\x0cimage_digest\x18\t \x01(\tB\x03\xe0\x41\x03\x12!\n\x14plugin_config_digest\x18\x0e \x01(\tB\x03\xe0\x41\x03\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\x98\x01\xea\x41\x94\x01\n0networkservices.googleapis.com/WasmPluginVersion\x12`projects/{project}/locations/{location}/wasmPlugins/{wasm_plugin}/versions/{wasm_plugin_version}B\x16\n\x14plugin_config_source\"\x82\x01\n\x16ListWasmPluginsRequest\x12\x41\n\x06parent\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\x12)networkservices.googleapis.com/WasmPlugin\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"\x8a\x01\n\x17ListWasmPluginsResponse\x12\x41\n\x0cwasm_plugins\x18\x01 \x03(\x0b\x32+.google.cloud.networkservices.v1.WasmPlugin\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"\x96\x01\n\x14GetWasmPluginRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)networkservices.googleapis.com/WasmPlugin\x12=\n\x04view\x18\x02 \x01(\x0e\x32/.google.cloud.networkservices.v1.WasmPluginView\"\xc0\x01\n\x17\x43reateWasmPluginRequest\x12\x41\n\x06parent\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\x12)networkservices.googleapis.com/WasmPlugin\x12\x1b\n\x0ewasm_plugin_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x45\n\x0bwasm_plugin\x18\x03 \x01(\x0b\x32+.google.cloud.networkservices.v1.WasmPluginB\x03\xe0\x41\x02\"\x96\x01\n\x17UpdateWasmPluginRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x12\x45\n\x0bwasm_plugin\x18\x02 \x01(\x0b\x32+.google.cloud.networkservices.v1.WasmPluginB\x03\xe0\x41\x02\"Z\n\x17\x44\x65leteWasmPluginRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)networkservices.googleapis.com/WasmPlugin\"\x90\x01\n\x1dListWasmPluginVersionsRequest\x12H\n\x06parent\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\x12\x30networkservices.googleapis.com/WasmPluginVersion\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"\xa0\x01\n\x1eListWasmPluginVersionsResponse\x12P\n\x14wasm_plugin_versions\x18\x01 \x03(\x0b\x32\x32.google.cloud.networkservices.v1.WasmPluginVersion\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"e\n\x1bGetWasmPluginVersionRequest\x12\x46\n\x04name\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\n0networkservices.googleapis.com/WasmPluginVersion\"\xe5\x01\n\x1e\x43reateWasmPluginVersionRequest\x12H\n\x06parent\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\x12\x30networkservices.googleapis.com/WasmPluginVersion\x12#\n\x16wasm_plugin_version_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12T\n\x13wasm_plugin_version\x18\x03 \x01(\x0b\x32\x32.google.cloud.networkservices.v1.WasmPluginVersionB\x03\xe0\x41\x02\"h\n\x1e\x44\x65leteWasmPluginVersionRequest\x12\x46\n\x04name\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\n0networkservices.googleapis.com/WasmPluginVersion*i\n\x0eWasmPluginView\x12 \n\x1cWASM_PLUGIN_VIEW_UNSPECIFIED\x10\x00\x12\x1a\n\x16WASM_PLUGIN_VIEW_BASIC\x10\x01\x12\x19\n\x15WASM_PLUGIN_VIEW_FULL\x10\x02\x42\xf3\x01\n#com.google.cloud.networkservices.v1B\x12\x45xtensibilityProtoP\x01ZMcloud.google.com/go/networkservices/apiv1/networkservicespb;networkservicespb\xaa\x02\x1fGoogle.Cloud.NetworkServices.V1\xca\x02\x1fGoogle\\Cloud\\NetworkServices\\V1\xea\x02\"Google::Cloud::NetworkServices::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module NetworkServices - module V1 - WasmPlugin = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.WasmPlugin").msgclass - WasmPlugin::VersionDetails = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.WasmPlugin.VersionDetails").msgclass - WasmPlugin::LogConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.WasmPlugin.LogConfig").msgclass - WasmPlugin::LogConfig::LogLevel = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.WasmPlugin.LogConfig.LogLevel").enummodule - WasmPlugin::UsedBy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.WasmPlugin.UsedBy").msgclass - WasmPluginVersion = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.WasmPluginVersion").msgclass - ListWasmPluginsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.ListWasmPluginsRequest").msgclass - ListWasmPluginsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.ListWasmPluginsResponse").msgclass - GetWasmPluginRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.GetWasmPluginRequest").msgclass - CreateWasmPluginRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.CreateWasmPluginRequest").msgclass - UpdateWasmPluginRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.UpdateWasmPluginRequest").msgclass - DeleteWasmPluginRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.DeleteWasmPluginRequest").msgclass - ListWasmPluginVersionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.ListWasmPluginVersionsRequest").msgclass - ListWasmPluginVersionsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.ListWasmPluginVersionsResponse").msgclass - GetWasmPluginVersionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.GetWasmPluginVersionRequest").msgclass - CreateWasmPluginVersionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.CreateWasmPluginVersionRequest").msgclass - DeleteWasmPluginVersionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.DeleteWasmPluginVersionRequest").msgclass - WasmPluginView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.WasmPluginView").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/gateway_pb.rb b/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/gateway_pb.rb deleted file mode 100644 index 69ea84d4661a..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/gateway_pb.rb +++ /dev/null @@ -1,36 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/networkservices/v1/gateway.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/cloud/networkservices/v1/common_pb' -require 'google/protobuf/field_mask_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n-google/cloud/networkservices/v1/gateway.proto\x12\x1fgoogle.cloud.networkservices.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a,google/cloud/networkservices/v1/common.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xbe\x0b\n\x07Gateway\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x16\n\tself_link\x18\r \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12I\n\x06labels\x18\x04 \x03(\x0b\x32\x34.google.cloud.networkservices.v1.Gateway.LabelsEntryB\x03\xe0\x41\x01\x12\x18\n\x0b\x64\x65scription\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12@\n\x04type\x18\x06 \x01(\x0e\x32-.google.cloud.networkservices.v1.Gateway.TypeB\x03\xe0\x41\x05\x12\x39\n\taddresses\x18\x07 \x03(\tB&\xe0\x41\x01\xfa\x41 \n\x1e\x63ompute.googleapis.com/Address\x12\x12\n\x05ports\x18\x0b \x03(\x05\x42\x03\xe0\x41\x02\x12\x16\n\tall_ports\x18\" \x01(\x08\x42\x03\xe0\x41\x01\x12\x12\n\x05scope\x18\x08 \x01(\tB\x03\xe0\x41\x01\x12Q\n\x11server_tls_policy\x18\t \x01(\tB6\xe0\x41\x01\xfa\x41\x30\n.networksecurity.googleapis.com/ServerTlsPolicy\x12O\n\x10\x63\x65rtificate_urls\x18\x0e \x03(\tB5\xe0\x41\x01\xfa\x41/\n-certificatemanager.googleapis.com/Certificate\x12]\n\x17gateway_security_policy\x18\x12 \x01(\tB<\xe0\x41\x01\xfa\x41\x36\n4networksecurity.googleapis.com/GatewaySecurityPolicy\x12\x37\n\x07network\x18\x10 \x01(\tB&\xe0\x41\x01\xfa\x41 \n\x1e\x63ompute.googleapis.com/Network\x12=\n\nsubnetwork\x18\x11 \x01(\tB)\xe0\x41\x01\xfa\x41#\n!compute.googleapis.com/Subnetwork\x12K\n\nip_version\x18\x15 \x01(\x0e\x32\x32.google.cloud.networkservices.v1.Gateway.IpVersionB\x03\xe0\x41\x01\x12N\n\renvoy_headers\x18\x1c \x01(\x0e\x32-.google.cloud.networkservices.v1.EnvoyHeadersB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12O\n\x0crouting_mode\x18 \x01(\x0e\x32\x34.google.cloud.networkservices.v1.Gateway.RoutingModeB\x03\xe0\x41\x01\x12 \n\x13\x61llow_global_access\x18! \x01(\x08\x42\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"C\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\r\n\tOPEN_MESH\x10\x01\x12\x16\n\x12SECURE_WEB_GATEWAY\x10\x02\";\n\tIpVersion\x12\x1a\n\x16IP_VERSION_UNSPECIFIED\x10\x00\x12\x08\n\x04IPV4\x10\x01\x12\x08\n\x04IPV6\x10\x02\"C\n\x0bRoutingMode\x12\x19\n\x15\x45XPLICIT_ROUTING_MODE\x10\x00\x12\x19\n\x15NEXT_HOP_ROUTING_MODE\x10\x01:g\xea\x41\x64\n&networkservices.googleapis.com/Gateway\x12:projects/{project}/locations/{location}/gateways/{gateway}B\x10\n\x0e_envoy_headers\"|\n\x13ListGatewaysRequest\x12>\n\x06parent\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\x12&networkservices.googleapis.com/Gateway\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"\x80\x01\n\x14ListGatewaysResponse\x12:\n\x08gateways\x18\x01 \x03(\x0b\x32(.google.cloud.networkservices.v1.Gateway\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"Q\n\x11GetGatewayRequest\x12<\n\x04name\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\n&networkservices.googleapis.com/Gateway\"\xaf\x01\n\x14\x43reateGatewayRequest\x12>\n\x06parent\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\x12&networkservices.googleapis.com/Gateway\x12\x17\n\ngateway_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12>\n\x07gateway\x18\x03 \x01(\x0b\x32(.google.cloud.networkservices.v1.GatewayB\x03\xe0\x41\x02\"\x8c\x01\n\x14UpdateGatewayRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x12>\n\x07gateway\x18\x02 \x01(\x0b\x32(.google.cloud.networkservices.v1.GatewayB\x03\xe0\x41\x02\"T\n\x14\x44\x65leteGatewayRequest\x12<\n\x04name\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\n&networkservices.googleapis.com/GatewayB\x89\x06\n#com.google.cloud.networkservices.v1B\x0cGatewayProtoP\x01ZMcloud.google.com/go/networkservices/apiv1/networkservicespb;networkservicespb\xaa\x02\x1fGoogle.Cloud.NetworkServices.V1\xca\x02\x1fGoogle\\Cloud\\NetworkServices\\V1\xea\x02\"Google::Cloud::NetworkServices::V1\xea\x41\x91\x01\n4networksecurity.googleapis.com/GatewaySecurityPolicy\x12Yprojects/{project}/locations/{location}/gatewaySecurityPolicies/{gateway_security_policy}\xea\x41\x61\n!compute.googleapis.com/Subnetwork\x12\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(networkservices.googleapis.com/GrpcRoute\"\xbb\x01\n\x16\x43reateGrpcRouteRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\x12(networkservices.googleapis.com/GrpcRoute\x12\x1a\n\rgrpc_route_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x43\n\ngrpc_route\x18\x03 \x01(\x0b\x32*.google.cloud.networkservices.v1.GrpcRouteB\x03\xe0\x41\x02\"\x93\x01\n\x16UpdateGrpcRouteRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x12\x43\n\ngrpc_route\x18\x02 \x01(\x0b\x32*.google.cloud.networkservices.v1.GrpcRouteB\x03\xe0\x41\x02\"X\n\x16\x44\x65leteGrpcRouteRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(networkservices.googleapis.com/GrpcRouteB\xe4\x02\n#com.google.cloud.networkservices.v1B\x0eGrpcRouteProtoP\x01ZMcloud.google.com/go/networkservices/apiv1/networkservicespb;networkservicespb\xaa\x02\x1fGoogle.Cloud.NetworkServices.V1\xca\x02\x1fGoogle\\Cloud\\NetworkServices\\V1\xea\x02\"Google::Cloud::NetworkServices::V1\xea\x41r\n%compute.googleapis.com/BackendService\x12Iprojects/{project}/locations/{location}/backendServices/{backend_service}b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module NetworkServices - module V1 - GrpcRoute = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.GrpcRoute").msgclass - GrpcRoute::MethodMatch = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.GrpcRoute.MethodMatch").msgclass - GrpcRoute::MethodMatch::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.GrpcRoute.MethodMatch.Type").enummodule - GrpcRoute::HeaderMatch = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.GrpcRoute.HeaderMatch").msgclass - GrpcRoute::HeaderMatch::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.GrpcRoute.HeaderMatch.Type").enummodule - GrpcRoute::RouteMatch = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.GrpcRoute.RouteMatch").msgclass - GrpcRoute::Destination = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.GrpcRoute.Destination").msgclass - GrpcRoute::FaultInjectionPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.GrpcRoute.FaultInjectionPolicy").msgclass - GrpcRoute::FaultInjectionPolicy::Delay = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.GrpcRoute.FaultInjectionPolicy.Delay").msgclass - GrpcRoute::FaultInjectionPolicy::Abort = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.GrpcRoute.FaultInjectionPolicy.Abort").msgclass - GrpcRoute::StatefulSessionAffinityPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.GrpcRoute.StatefulSessionAffinityPolicy").msgclass - GrpcRoute::RetryPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.GrpcRoute.RetryPolicy").msgclass - GrpcRoute::RouteAction = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.GrpcRoute.RouteAction").msgclass - GrpcRoute::RouteRule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.GrpcRoute.RouteRule").msgclass - ListGrpcRoutesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.ListGrpcRoutesRequest").msgclass - ListGrpcRoutesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.ListGrpcRoutesResponse").msgclass - GetGrpcRouteRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.GetGrpcRouteRequest").msgclass - CreateGrpcRouteRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.CreateGrpcRouteRequest").msgclass - UpdateGrpcRouteRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.UpdateGrpcRouteRequest").msgclass - DeleteGrpcRouteRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.DeleteGrpcRouteRequest").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/http_route_pb.rb b/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/http_route_pb.rb deleted file mode 100644 index 2187729094d4..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/http_route_pb.rb +++ /dev/null @@ -1,53 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/networkservices/v1/http_route.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/field_info_pb' -require 'google/api/resource_pb' -require 'google/protobuf/duration_pb' -require 'google/protobuf/field_mask_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n0google/cloud/networkservices/v1/http_route.proto\x12\x1fgoogle.cloud.networkservices.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1bgoogle/api/field_info.proto\x1a\x19google/api/resource.proto\x1a\x1egoogle/protobuf/duration.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x8f$\n\tHttpRoute\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x16\n\tself_link\x18\x0b \x01(\tB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x34\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x16\n\thostnames\x18\x05 \x03(\tB\x03\xe0\x41\x02\x12;\n\x06meshes\x18\x08 \x03(\tB+\xe0\x41\x01\xfa\x41%\n#networkservices.googleapis.com/Mesh\x12@\n\x08gateways\x18\t \x03(\tB.\xe0\x41\x01\xfa\x41(\n&networkservices.googleapis.com/Gateway\x12K\n\x06labels\x18\n \x03(\x0b\x32\x36.google.cloud.networkservices.v1.HttpRoute.LabelsEntryB\x03\xe0\x41\x01\x12H\n\x05rules\x18\x06 \x03(\x0b\x32\x34.google.cloud.networkservices.v1.HttpRoute.RouteRuleB\x03\xe0\x41\x02\x1a\xbf\x02\n\x0bHeaderMatch\x12\x15\n\x0b\x65xact_match\x18\x02 \x01(\tH\x00\x12\x15\n\x0bregex_match\x18\x03 \x01(\tH\x00\x12\x16\n\x0cprefix_match\x18\x04 \x01(\tH\x00\x12\x17\n\rpresent_match\x18\x05 \x01(\x08H\x00\x12\x16\n\x0csuffix_match\x18\x06 \x01(\tH\x00\x12Z\n\x0brange_match\x18\x07 \x01(\x0b\x32\x43.google.cloud.networkservices.v1.HttpRoute.HeaderMatch.IntegerRangeH\x00\x12\x0e\n\x06header\x18\x01 \x01(\t\x12\x14\n\x0cinvert_match\x18\x08 \x01(\x08\x1a*\n\x0cIntegerRange\x12\r\n\x05start\x18\x01 \x01(\x05\x12\x0b\n\x03\x65nd\x18\x02 \x01(\x05\x42\x0b\n\tMatchType\x1a\x82\x01\n\x13QueryParameterMatch\x12\x15\n\x0b\x65xact_match\x18\x02 \x01(\tH\x00\x12\x15\n\x0bregex_match\x18\x03 \x01(\tH\x00\x12\x17\n\rpresent_match\x18\x04 \x01(\x08H\x00\x12\x17\n\x0fquery_parameter\x18\x01 \x01(\tB\x0b\n\tMatchType\x1a\x9b\x02\n\nRouteMatch\x12\x19\n\x0f\x66ull_path_match\x18\x01 \x01(\tH\x00\x12\x16\n\x0cprefix_match\x18\x02 \x01(\tH\x00\x12\x15\n\x0bregex_match\x18\x03 \x01(\tH\x00\x12\x13\n\x0bignore_case\x18\x04 \x01(\x08\x12G\n\x07headers\x18\x05 \x03(\x0b\x32\x36.google.cloud.networkservices.v1.HttpRoute.HeaderMatch\x12X\n\x10query_parameters\x18\x06 \x03(\x0b\x32>.google.cloud.networkservices.v1.HttpRoute.QueryParameterMatchB\x0b\n\tPathMatch\x1a\xa2\x02\n\x0b\x44\x65stination\x12@\n\x0cservice_name\x18\x01 \x01(\tB*\xfa\x41\'\n%compute.googleapis.com/BackendService\x12\x0e\n\x06weight\x18\x02 \x01(\x05\x12_\n\x17request_header_modifier\x18\x03 \x01(\x0b\x32\x39.google.cloud.networkservices.v1.HttpRoute.HeaderModifierB\x03\xe0\x41\x01\x12`\n\x18response_header_modifier\x18\x04 \x01(\x0b\x32\x39.google.cloud.networkservices.v1.HttpRoute.HeaderModifierB\x03\xe0\x41\x01\x1a\x86\x03\n\x08Redirect\x12\x15\n\rhost_redirect\x18\x01 \x01(\t\x12\x15\n\rpath_redirect\x18\x02 \x01(\t\x12\x16\n\x0eprefix_rewrite\x18\x03 \x01(\t\x12W\n\rresponse_code\x18\x04 \x01(\x0e\x32@.google.cloud.networkservices.v1.HttpRoute.Redirect.ResponseCode\x12\x16\n\x0ehttps_redirect\x18\x05 \x01(\x08\x12\x13\n\x0bstrip_query\x18\x06 \x01(\x08\x12\x15\n\rport_redirect\x18\x07 \x01(\x05\"\x96\x01\n\x0cResponseCode\x12\x1d\n\x19RESPONSE_CODE_UNSPECIFIED\x10\x00\x12\x1d\n\x19MOVED_PERMANENTLY_DEFAULT\x10\x01\x12\t\n\x05\x46OUND\x10\x02\x12\r\n\tSEE_OTHER\x10\x03\x12\x16\n\x12TEMPORARY_REDIRECT\x10\x04\x12\x16\n\x12PERMANENT_REDIRECT\x10\x05\x1a\xc1\x02\n\x14\x46\x61ultInjectionPolicy\x12T\n\x05\x64\x65lay\x18\x01 \x01(\x0b\x32\x45.google.cloud.networkservices.v1.HttpRoute.FaultInjectionPolicy.Delay\x12T\n\x05\x61\x62ort\x18\x02 \x01(\x0b\x32\x45.google.cloud.networkservices.v1.HttpRoute.FaultInjectionPolicy.Abort\x1aK\n\x05\x44\x65lay\x12.\n\x0b\x66ixed_delay\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x12\n\npercentage\x18\x02 \x01(\x05\x1a\x30\n\x05\x41\x62ort\x12\x13\n\x0bhttp_status\x18\x01 \x01(\x05\x12\x12\n\npercentage\x18\x02 \x01(\x05\x1aS\n\x1dStatefulSessionAffinityPolicy\x12\x32\n\ncookie_ttl\x18\x01 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x02\x1a\x9a\x02\n\x0eHeaderModifier\x12O\n\x03set\x18\x01 \x03(\x0b\x32\x42.google.cloud.networkservices.v1.HttpRoute.HeaderModifier.SetEntry\x12O\n\x03\x61\x64\x64\x18\x02 \x03(\x0b\x32\x42.google.cloud.networkservices.v1.HttpRoute.HeaderModifier.AddEntry\x12\x0e\n\x06remove\x18\x03 \x03(\t\x1a*\n\x08SetEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a*\n\x08\x41\x64\x64\x45ntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a?\n\nURLRewrite\x12\x1b\n\x13path_prefix_rewrite\x18\x01 \x01(\t\x12\x14\n\x0chost_rewrite\x18\x02 \x01(\t\x1ap\n\x0bRetryPolicy\x12\x18\n\x10retry_conditions\x18\x01 \x03(\t\x12\x13\n\x0bnum_retries\x18\x02 \x01(\x05\x12\x32\n\x0fper_try_timeout\x18\x03 \x01(\x0b\x32\x19.google.protobuf.Duration\x1a\x7f\n\x13RequestMirrorPolicy\x12K\n\x0b\x64\x65stination\x18\x01 \x01(\x0b\x32\x36.google.cloud.networkservices.v1.HttpRoute.Destination\x12\x1b\n\x0emirror_percent\x18\x02 \x01(\x02\x42\x03\xe0\x41\x01\x1a\xc5\x01\n\nCorsPolicy\x12\x15\n\rallow_origins\x18\x01 \x03(\t\x12\x1c\n\x14\x61llow_origin_regexes\x18\x02 \x03(\t\x12\x15\n\rallow_methods\x18\x03 \x03(\t\x12\x15\n\rallow_headers\x18\x04 \x03(\t\x12\x16\n\x0e\x65xpose_headers\x18\x05 \x03(\t\x12\x0f\n\x07max_age\x18\x06 \x01(\t\x12\x19\n\x11\x61llow_credentials\x18\x07 \x01(\x08\x12\x10\n\x08\x64isabled\x18\x08 \x01(\x08\x1al\n\x12HttpDirectResponse\x12\x1a\n\x0bstring_body\x18\x02 \x01(\tB\x03\xe0\x41\x01H\x00\x12\x19\n\nbytes_body\x18\x03 \x01(\x0c\x42\x03\xe0\x41\x01H\x00\x12\x13\n\x06status\x18\x01 \x01(\x05\x42\x03\xe0\x41\x02\x42\n\n\x08HttpBody\x1a\xb2\x08\n\x0bRouteAction\x12L\n\x0c\x64\x65stinations\x18\x01 \x03(\x0b\x32\x36.google.cloud.networkservices.v1.HttpRoute.Destination\x12\x45\n\x08redirect\x18\x02 \x01(\x0b\x32\x33.google.cloud.networkservices.v1.HttpRoute.Redirect\x12_\n\x16\x66\x61ult_injection_policy\x18\x04 \x01(\x0b\x32?.google.cloud.networkservices.v1.HttpRoute.FaultInjectionPolicy\x12Z\n\x17request_header_modifier\x18\x05 \x01(\x0b\x32\x39.google.cloud.networkservices.v1.HttpRoute.HeaderModifier\x12[\n\x18response_header_modifier\x18\x06 \x01(\x0b\x32\x39.google.cloud.networkservices.v1.HttpRoute.HeaderModifier\x12J\n\x0burl_rewrite\x18\x07 \x01(\x0b\x32\x35.google.cloud.networkservices.v1.HttpRoute.URLRewrite\x12*\n\x07timeout\x18\x08 \x01(\x0b\x32\x19.google.protobuf.Duration\x12L\n\x0cretry_policy\x18\t \x01(\x0b\x32\x36.google.cloud.networkservices.v1.HttpRoute.RetryPolicy\x12]\n\x15request_mirror_policy\x18\n \x01(\x0b\x32>.google.cloud.networkservices.v1.HttpRoute.RequestMirrorPolicy\x12J\n\x0b\x63ors_policy\x18\x0b \x01(\x0b\x32\x35.google.cloud.networkservices.v1.HttpRoute.CorsPolicy\x12p\n\x19stateful_session_affinity\x18\x0c \x01(\x0b\x32H.google.cloud.networkservices.v1.HttpRoute.StatefulSessionAffinityPolicyB\x03\xe0\x41\x01\x12[\n\x0f\x64irect_response\x18\r \x01(\x0b\x32=.google.cloud.networkservices.v1.HttpRoute.HttpDirectResponseB\x03\xe0\x41\x01\x12\x34\n\x0cidle_timeout\x18\x0e \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x01\x1a\x9b\x01\n\tRouteRule\x12\x46\n\x07matches\x18\x01 \x03(\x0b\x32\x35.google.cloud.networkservices.v1.HttpRoute.RouteMatch\x12\x46\n\x06\x61\x63tion\x18\x02 \x01(\x0b\x32\x36.google.cloud.networkservices.v1.HttpRoute.RouteAction\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:n\xea\x41k\n(networkservices.googleapis.com/HttpRoute\x12?projects/{project}/locations/{location}/httpRoutes/{http_route}\"\xba\x01\n\x15ListHttpRoutesRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\x12(networkservices.googleapis.com/HttpRoute\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12#\n\x16return_partial_success\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x87\x01\n\x16ListHttpRoutesResponse\x12?\n\x0bhttp_routes\x18\x01 \x03(\x0b\x32*.google.cloud.networkservices.v1.HttpRoute\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"U\n\x13GetHttpRouteRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(networkservices.googleapis.com/HttpRoute\"\xdc\x01\n\x16\x43reateHttpRouteRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\x12(networkservices.googleapis.com/HttpRoute\x12\x1a\n\rhttp_route_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x43\n\nhttp_route\x18\x03 \x01(\x0b\x32*.google.cloud.networkservices.v1.HttpRouteB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x04 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\x93\x01\n\x16UpdateHttpRouteRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x12\x43\n\nhttp_route\x18\x02 \x01(\x0b\x32*.google.cloud.networkservices.v1.HttpRouteB\x03\xe0\x41\x02\"X\n\x16\x44\x65leteHttpRouteRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(networkservices.googleapis.com/HttpRouteB\xef\x01\n#com.google.cloud.networkservices.v1B\x0eHttpRouteProtoP\x01ZMcloud.google.com/go/networkservices/apiv1/networkservicespb;networkservicespb\xaa\x02\x1fGoogle.Cloud.NetworkServices.V1\xca\x02\x1fGoogle\\Cloud\\NetworkServices\\V1\xea\x02\"Google::Cloud::NetworkServices::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module NetworkServices - module V1 - HttpRoute = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.HttpRoute").msgclass - HttpRoute::HeaderMatch = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.HttpRoute.HeaderMatch").msgclass - HttpRoute::HeaderMatch::IntegerRange = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.HttpRoute.HeaderMatch.IntegerRange").msgclass - HttpRoute::QueryParameterMatch = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.HttpRoute.QueryParameterMatch").msgclass - HttpRoute::RouteMatch = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.HttpRoute.RouteMatch").msgclass - HttpRoute::Destination = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.HttpRoute.Destination").msgclass - HttpRoute::Redirect = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.HttpRoute.Redirect").msgclass - HttpRoute::Redirect::ResponseCode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.HttpRoute.Redirect.ResponseCode").enummodule - HttpRoute::FaultInjectionPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.HttpRoute.FaultInjectionPolicy").msgclass - HttpRoute::FaultInjectionPolicy::Delay = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.HttpRoute.FaultInjectionPolicy.Delay").msgclass - HttpRoute::FaultInjectionPolicy::Abort = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.HttpRoute.FaultInjectionPolicy.Abort").msgclass - HttpRoute::StatefulSessionAffinityPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.HttpRoute.StatefulSessionAffinityPolicy").msgclass - HttpRoute::HeaderModifier = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.HttpRoute.HeaderModifier").msgclass - HttpRoute::URLRewrite = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.HttpRoute.URLRewrite").msgclass - HttpRoute::RetryPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.HttpRoute.RetryPolicy").msgclass - HttpRoute::RequestMirrorPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.HttpRoute.RequestMirrorPolicy").msgclass - HttpRoute::CorsPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.HttpRoute.CorsPolicy").msgclass - HttpRoute::HttpDirectResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.HttpRoute.HttpDirectResponse").msgclass - HttpRoute::RouteAction = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.HttpRoute.RouteAction").msgclass - HttpRoute::RouteRule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.HttpRoute.RouteRule").msgclass - ListHttpRoutesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.ListHttpRoutesRequest").msgclass - ListHttpRoutesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.ListHttpRoutesResponse").msgclass - GetHttpRouteRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.GetHttpRouteRequest").msgclass - CreateHttpRouteRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.CreateHttpRouteRequest").msgclass - UpdateHttpRouteRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.UpdateHttpRouteRequest").msgclass - DeleteHttpRouteRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.DeleteHttpRouteRequest").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/mesh_pb.rb b/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/mesh_pb.rb deleted file mode 100644 index 876e2212ea88..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/mesh_pb.rb +++ /dev/null @@ -1,33 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/networkservices/v1/mesh.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/cloud/networkservices/v1/common_pb' -require 'google/protobuf/field_mask_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n*google/cloud/networkservices/v1/mesh.proto\x12\x1fgoogle.cloud.networkservices.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a,google/cloud/networkservices/v1/common.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x9f\x04\n\x04Mesh\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x16\n\tself_link\x18\t \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x46\n\x06labels\x18\x04 \x03(\x0b\x32\x31.google.cloud.networkservices.v1.Mesh.LabelsEntryB\x03\xe0\x41\x01\x12\x18\n\x0b\x64\x65scription\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x1e\n\x11interception_port\x18\x08 \x01(\x05\x42\x03\xe0\x41\x01\x12N\n\renvoy_headers\x18\x10 \x01(\x0e\x32-.google.cloud.networkservices.v1.EnvoyHeadersB\x03\xe0\x41\x01H\x00\x88\x01\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:m\xea\x41j\n#networkservices.googleapis.com/Mesh\x12\x35projects/{project}/locations/{location}/meshes/{mesh}*\x06meshes2\x04meshB\x10\n\x0e_envoy_headers\"\x9c\x01\n\x11ListMeshesRequest\x12;\n\x06parent\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\x12#networkservices.googleapis.com/Mesh\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12#\n\x16return_partial_success\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"y\n\x12ListMeshesResponse\x12\x35\n\x06meshes\x18\x01 \x03(\x0b\x32%.google.cloud.networkservices.v1.Mesh\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"K\n\x0eGetMeshRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#networkservices.googleapis.com/Mesh\"\xa0\x01\n\x11\x43reateMeshRequest\x12;\n\x06parent\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\x12#networkservices.googleapis.com/Mesh\x12\x14\n\x07mesh_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x38\n\x04mesh\x18\x03 \x01(\x0b\x32%.google.cloud.networkservices.v1.MeshB\x03\xe0\x41\x02\"\x83\x01\n\x11UpdateMeshRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x12\x38\n\x04mesh\x18\x02 \x01(\x0b\x32%.google.cloud.networkservices.v1.MeshB\x03\xe0\x41\x02\"N\n\x11\x44\x65leteMeshRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#networkservices.googleapis.com/MeshB\xe4\x02\n#com.google.cloud.networkservices.v1B\tMeshProtoP\x01ZMcloud.google.com/go/networkservices/apiv1/networkservicespb;networkservicespb\xaa\x02\x1fGoogle.Cloud.NetworkServices.V1\xca\x02\x1fGoogle\\Cloud\\NetworkServices\\V1\xea\x02\"Google::Cloud::NetworkServices::V1\xea\x41w\n(compute.googleapis.com/ServiceAttachment\x12Kprojects/{project}/regions/{region}/serviceAttachments/{service_attachment}b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module NetworkServices - module V1 - Mesh = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.Mesh").msgclass - ListMeshesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.ListMeshesRequest").msgclass - ListMeshesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.ListMeshesResponse").msgclass - GetMeshRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.GetMeshRequest").msgclass - CreateMeshRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.CreateMeshRequest").msgclass - UpdateMeshRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.UpdateMeshRequest").msgclass - DeleteMeshRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.DeleteMeshRequest").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/network_services_pb.rb b/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/network_services_pb.rb deleted file mode 100644 index 83a16384a07d..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/network_services_pb.rb +++ /dev/null @@ -1,38 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/networkservices/v1/network_services.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/cloud/networkservices/v1/agent_gateway_pb' -require 'google/cloud/networkservices/v1/common_pb' -require 'google/cloud/networkservices/v1/endpoint_policy_pb' -require 'google/cloud/networkservices/v1/extensibility_pb' -require 'google/cloud/networkservices/v1/gateway_pb' -require 'google/cloud/networkservices/v1/grpc_route_pb' -require 'google/cloud/networkservices/v1/http_route_pb' -require 'google/cloud/networkservices/v1/mesh_pb' -require 'google/cloud/networkservices/v1/route_view_pb' -require 'google/cloud/networkservices/v1/service_binding_pb' -require 'google/cloud/networkservices/v1/service_lb_policy_pb' -require 'google/cloud/networkservices/v1/tcp_route_pb' -require 'google/cloud/networkservices/v1/tls_route_pb' -require 'google/longrunning/operations_pb' -require 'google/protobuf/empty_pb' - - -descriptor_data = "\n6google/cloud/networkservices/v1/network_services.proto\x12\x1fgoogle.cloud.networkservices.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x33google/cloud/networkservices/v1/agent_gateway.proto\x1a,google/cloud/networkservices/v1/common.proto\x1a\x35google/cloud/networkservices/v1/endpoint_policy.proto\x1a\x33google/cloud/networkservices/v1/extensibility.proto\x1a-google/cloud/networkservices/v1/gateway.proto\x1a\x30google/cloud/networkservices/v1/grpc_route.proto\x1a\x30google/cloud/networkservices/v1/http_route.proto\x1a*google/cloud/networkservices/v1/mesh.proto\x1a\x30google/cloud/networkservices/v1/route_view.proto\x1a\x35google/cloud/networkservices/v1/service_binding.proto\x1a\x37google/cloud/networkservices/v1/service_lb_policy.proto\x1a/google/cloud/networkservices/v1/tcp_route.proto\x1a/google/cloud/networkservices/v1/tls_route.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto2\xa7w\n\x0fNetworkServices\x12\xda\x01\n\x14ListEndpointPolicies\x12<.google.cloud.networkservices.v1.ListEndpointPoliciesRequest\x1a=.google.cloud.networkservices.v1.ListEndpointPoliciesResponse\"E\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x36\x12\x34/v1/{parent=projects/*/locations/*}/endpointPolicies\x12\xc4\x01\n\x11GetEndpointPolicy\x12\x39.google.cloud.networkservices.v1.GetEndpointPolicyRequest\x1a/.google.cloud.networkservices.v1.EndpointPolicy\"C\xda\x41\x04name\x82\xd3\xe4\x93\x02\x36\x12\x34/v1/{name=projects/*/locations/*/endpointPolicies/*}\x12\xb5\x02\n\x14\x43reateEndpointPolicy\x12<.google.cloud.networkservices.v1.CreateEndpointPolicyRequest\x1a\x1d.google.longrunning.Operation\"\xbf\x01\xca\x41\x43\n\x0e\x45ndpointPolicy\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41)parent,endpoint_policy,endpoint_policy_id\x82\xd3\xe4\x93\x02G\"4/v1/{parent=projects/*/locations/*}/endpointPolicies:\x0f\x65ndpoint_policy\x12\xb7\x02\n\x14UpdateEndpointPolicy\x12<.google.cloud.networkservices.v1.UpdateEndpointPolicyRequest\x1a\x1d.google.longrunning.Operation\"\xc1\x01\xca\x41\x43\n\x0e\x45ndpointPolicy\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x1b\x65ndpoint_policy,update_mask\x82\xd3\xe4\x93\x02W2D/v1/{endpoint_policy.name=projects/*/locations/*/endpointPolicies/*}:\x0f\x65ndpoint_policy\x12\x86\x02\n\x14\x44\x65leteEndpointPolicy\x12<.google.cloud.networkservices.v1.DeleteEndpointPolicyRequest\x1a\x1d.google.longrunning.Operation\"\x90\x01\xca\x41J\n\x15google.protobuf.Empty\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x36*4/v1/{name=projects/*/locations/*/endpointPolicies/*}\x12\xe6\x01\n\x16ListWasmPluginVersions\x12>.google.cloud.networkservices.v1.ListWasmPluginVersionsRequest\x1a?.google.cloud.networkservices.v1.ListWasmPluginVersionsResponse\"K\xda\x41\x06parent\x82\xd3\xe4\x93\x02<\x12:/v1/{parent=projects/*/locations/*/wasmPlugins/*}/versions\x12\xd3\x01\n\x14GetWasmPluginVersion\x12<.google.cloud.networkservices.v1.GetWasmPluginVersionRequest\x1a\x32.google.cloud.networkservices.v1.WasmPluginVersion\"I\xda\x41\x04name\x82\xd3\xe4\x93\x02<\x12:/v1/{name=projects/*/locations/*/wasmPlugins/*/versions/*}\x12\xd0\x02\n\x17\x43reateWasmPluginVersion\x12?.google.cloud.networkservices.v1.CreateWasmPluginVersionRequest\x1a\x1d.google.longrunning.Operation\"\xd4\x01\xca\x41\x46\n\x11WasmPluginVersion\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x31parent,wasm_plugin_version,wasm_plugin_version_id\x82\xd3\xe4\x93\x02Q\":/v1/{parent=projects/*/locations/*/wasmPlugins/*}/versions:\x13wasm_plugin_version\x12\x92\x02\n\x17\x44\x65leteWasmPluginVersion\x12?.google.cloud.networkservices.v1.DeleteWasmPluginVersionRequest\x1a\x1d.google.longrunning.Operation\"\x96\x01\xca\x41J\n\x15google.protobuf.Empty\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02<*:/v1/{name=projects/*/locations/*/wasmPlugins/*/versions/*}\x12\xc6\x01\n\x0fListWasmPlugins\x12\x37.google.cloud.networkservices.v1.ListWasmPluginsRequest\x1a\x38.google.cloud.networkservices.v1.ListWasmPluginsResponse\"@\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x31\x12//v1/{parent=projects/*/locations/*}/wasmPlugins\x12\xb3\x01\n\rGetWasmPlugin\x12\x35.google.cloud.networkservices.v1.GetWasmPluginRequest\x1a+.google.cloud.networkservices.v1.WasmPlugin\">\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31\x12//v1/{name=projects/*/locations/*/wasmPlugins/*}\x12\x98\x02\n\x10\x43reateWasmPlugin\x12\x38.google.cloud.networkservices.v1.CreateWasmPluginRequest\x1a\x1d.google.longrunning.Operation\"\xaa\x01\xca\x41?\n\nWasmPlugin\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41!parent,wasm_plugin,wasm_plugin_id\x82\xd3\xe4\x93\x02>\"//v1/{parent=projects/*/locations/*}/wasmPlugins:\x0bwasm_plugin\x12\x9a\x02\n\x10UpdateWasmPlugin\x12\x38.google.cloud.networkservices.v1.UpdateWasmPluginRequest\x1a\x1d.google.longrunning.Operation\"\xac\x01\xca\x41?\n\nWasmPlugin\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x17wasm_plugin,update_mask\x82\xd3\xe4\x93\x02J2;/v1/{wasm_plugin.name=projects/*/locations/*/wasmPlugins/*}:\x0bwasm_plugin\x12\xf9\x01\n\x10\x44\x65leteWasmPlugin\x12\x38.google.cloud.networkservices.v1.DeleteWasmPluginRequest\x1a\x1d.google.longrunning.Operation\"\x8b\x01\xca\x41J\n\x15google.protobuf.Empty\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31*//v1/{name=projects/*/locations/*/wasmPlugins/*}\x12\xba\x01\n\x0cListGateways\x12\x34.google.cloud.networkservices.v1.ListGatewaysRequest\x1a\x35.google.cloud.networkservices.v1.ListGatewaysResponse\"=\xda\x41\x06parent\x82\xd3\xe4\x93\x02.\x12,/v1/{parent=projects/*/locations/*}/gateways\x12\xa7\x01\n\nGetGateway\x12\x32.google.cloud.networkservices.v1.GetGatewayRequest\x1a(.google.cloud.networkservices.v1.Gateway\";\xda\x41\x04name\x82\xd3\xe4\x93\x02.\x12,/v1/{name=projects/*/locations/*/gateways/*}\x12\x80\x02\n\rCreateGateway\x12\x35.google.cloud.networkservices.v1.CreateGatewayRequest\x1a\x1d.google.longrunning.Operation\"\x98\x01\xca\x41<\n\x07Gateway\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x19parent,gateway,gateway_id\x82\xd3\xe4\x93\x02\x37\",/v1/{parent=projects/*/locations/*}/gateways:\x07gateway\x12\x82\x02\n\rUpdateGateway\x12\x35.google.cloud.networkservices.v1.UpdateGatewayRequest\x1a\x1d.google.longrunning.Operation\"\x9a\x01\xca\x41<\n\x07Gateway\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x13gateway,update_mask\x82\xd3\xe4\x93\x02?24/v1/{gateway.name=projects/*/locations/*/gateways/*}:\x07gateway\x12\xf0\x01\n\rDeleteGateway\x12\x35.google.cloud.networkservices.v1.DeleteGatewayRequest\x1a\x1d.google.longrunning.Operation\"\x88\x01\xca\x41J\n\x15google.protobuf.Empty\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02.*,/v1/{name=projects/*/locations/*/gateways/*}\x12\xc2\x01\n\x0eListGrpcRoutes\x12\x36.google.cloud.networkservices.v1.ListGrpcRoutesRequest\x1a\x37.google.cloud.networkservices.v1.ListGrpcRoutesResponse\"?\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x30\x12./v1/{parent=projects/*/locations/*}/grpcRoutes\x12\xaf\x01\n\x0cGetGrpcRoute\x12\x34.google.cloud.networkservices.v1.GetGrpcRouteRequest\x1a*.google.cloud.networkservices.v1.GrpcRoute\"=\xda\x41\x04name\x82\xd3\xe4\x93\x02\x30\x12./v1/{name=projects/*/locations/*/grpcRoutes/*}\x12\x91\x02\n\x0f\x43reateGrpcRoute\x12\x37.google.cloud.networkservices.v1.CreateGrpcRouteRequest\x1a\x1d.google.longrunning.Operation\"\xa5\x01\xca\x41>\n\tGrpcRoute\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x1fparent,grpc_route,grpc_route_id\x82\xd3\xe4\x93\x02<\"./v1/{parent=projects/*/locations/*}/grpcRoutes:\ngrpc_route\x12\x93\x02\n\x0fUpdateGrpcRoute\x12\x37.google.cloud.networkservices.v1.UpdateGrpcRouteRequest\x1a\x1d.google.longrunning.Operation\"\xa7\x01\xca\x41>\n\tGrpcRoute\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x16grpc_route,update_mask\x82\xd3\xe4\x93\x02G29/v1/{grpc_route.name=projects/*/locations/*/grpcRoutes/*}:\ngrpc_route\x12\xf6\x01\n\x0f\x44\x65leteGrpcRoute\x12\x37.google.cloud.networkservices.v1.DeleteGrpcRouteRequest\x1a\x1d.google.longrunning.Operation\"\x8a\x01\xca\x41J\n\x15google.protobuf.Empty\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x30*./v1/{name=projects/*/locations/*/grpcRoutes/*}\x12\xc2\x01\n\x0eListHttpRoutes\x12\x36.google.cloud.networkservices.v1.ListHttpRoutesRequest\x1a\x37.google.cloud.networkservices.v1.ListHttpRoutesResponse\"?\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x30\x12./v1/{parent=projects/*/locations/*}/httpRoutes\x12\xaf\x01\n\x0cGetHttpRoute\x12\x34.google.cloud.networkservices.v1.GetHttpRouteRequest\x1a*.google.cloud.networkservices.v1.HttpRoute\"=\xda\x41\x04name\x82\xd3\xe4\x93\x02\x30\x12./v1/{name=projects/*/locations/*/httpRoutes/*}\x12\x91\x02\n\x0f\x43reateHttpRoute\x12\x37.google.cloud.networkservices.v1.CreateHttpRouteRequest\x1a\x1d.google.longrunning.Operation\"\xa5\x01\xca\x41>\n\tHttpRoute\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x1fparent,http_route,http_route_id\x82\xd3\xe4\x93\x02<\"./v1/{parent=projects/*/locations/*}/httpRoutes:\nhttp_route\x12\x93\x02\n\x0fUpdateHttpRoute\x12\x37.google.cloud.networkservices.v1.UpdateHttpRouteRequest\x1a\x1d.google.longrunning.Operation\"\xa7\x01\xca\x41>\n\tHttpRoute\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x16http_route,update_mask\x82\xd3\xe4\x93\x02G29/v1/{http_route.name=projects/*/locations/*/httpRoutes/*}:\nhttp_route\x12\xf6\x01\n\x0f\x44\x65leteHttpRoute\x12\x37.google.cloud.networkservices.v1.DeleteHttpRouteRequest\x1a\x1d.google.longrunning.Operation\"\x8a\x01\xca\x41J\n\x15google.protobuf.Empty\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x30*./v1/{name=projects/*/locations/*/httpRoutes/*}\x12\xbe\x01\n\rListTcpRoutes\x12\x35.google.cloud.networkservices.v1.ListTcpRoutesRequest\x1a\x36.google.cloud.networkservices.v1.ListTcpRoutesResponse\">\xda\x41\x06parent\x82\xd3\xe4\x93\x02/\x12-/v1/{parent=projects/*/locations/*}/tcpRoutes\x12\xab\x01\n\x0bGetTcpRoute\x12\x33.google.cloud.networkservices.v1.GetTcpRouteRequest\x1a).google.cloud.networkservices.v1.TcpRoute\"<\xda\x41\x04name\x82\xd3\xe4\x93\x02/\x12-/v1/{name=projects/*/locations/*/tcpRoutes/*}\x12\x8a\x02\n\x0e\x43reateTcpRoute\x12\x36.google.cloud.networkservices.v1.CreateTcpRouteRequest\x1a\x1d.google.longrunning.Operation\"\xa0\x01\xca\x41=\n\x08TcpRoute\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x1dparent,tcp_route,tcp_route_id\x82\xd3\xe4\x93\x02:\"-/v1/{parent=projects/*/locations/*}/tcpRoutes:\ttcp_route\x12\x8c\x02\n\x0eUpdateTcpRoute\x12\x36.google.cloud.networkservices.v1.UpdateTcpRouteRequest\x1a\x1d.google.longrunning.Operation\"\xa2\x01\xca\x41=\n\x08TcpRoute\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x15tcp_route,update_mask\x82\xd3\xe4\x93\x02\x44\x32\x37/v1/{tcp_route.name=projects/*/locations/*/tcpRoutes/*}:\ttcp_route\x12\xf3\x01\n\x0e\x44\x65leteTcpRoute\x12\x36.google.cloud.networkservices.v1.DeleteTcpRouteRequest\x1a\x1d.google.longrunning.Operation\"\x89\x01\xca\x41J\n\x15google.protobuf.Empty\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02/*-/v1/{name=projects/*/locations/*/tcpRoutes/*}\x12\xbe\x01\n\rListTlsRoutes\x12\x35.google.cloud.networkservices.v1.ListTlsRoutesRequest\x1a\x36.google.cloud.networkservices.v1.ListTlsRoutesResponse\">\xda\x41\x06parent\x82\xd3\xe4\x93\x02/\x12-/v1/{parent=projects/*/locations/*}/tlsRoutes\x12\xab\x01\n\x0bGetTlsRoute\x12\x33.google.cloud.networkservices.v1.GetTlsRouteRequest\x1a).google.cloud.networkservices.v1.TlsRoute\"<\xda\x41\x04name\x82\xd3\xe4\x93\x02/\x12-/v1/{name=projects/*/locations/*/tlsRoutes/*}\x12\x8a\x02\n\x0e\x43reateTlsRoute\x12\x36.google.cloud.networkservices.v1.CreateTlsRouteRequest\x1a\x1d.google.longrunning.Operation\"\xa0\x01\xca\x41=\n\x08TlsRoute\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x1dparent,tls_route,tls_route_id\x82\xd3\xe4\x93\x02:\"-/v1/{parent=projects/*/locations/*}/tlsRoutes:\ttls_route\x12\x8c\x02\n\x0eUpdateTlsRoute\x12\x36.google.cloud.networkservices.v1.UpdateTlsRouteRequest\x1a\x1d.google.longrunning.Operation\"\xa2\x01\xca\x41=\n\x08TlsRoute\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x15tls_route,update_mask\x82\xd3\xe4\x93\x02\x44\x32\x37/v1/{tls_route.name=projects/*/locations/*/tlsRoutes/*}:\ttls_route\x12\xf3\x01\n\x0e\x44\x65leteTlsRoute\x12\x36.google.cloud.networkservices.v1.DeleteTlsRouteRequest\x1a\x1d.google.longrunning.Operation\"\x89\x01\xca\x41J\n\x15google.protobuf.Empty\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02/*-/v1/{name=projects/*/locations/*/tlsRoutes/*}\x12\xd6\x01\n\x13ListServiceBindings\x12;.google.cloud.networkservices.v1.ListServiceBindingsRequest\x1a<.google.cloud.networkservices.v1.ListServiceBindingsResponse\"D\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x35\x12\x33/v1/{parent=projects/*/locations/*}/serviceBindings\x12\xc3\x01\n\x11GetServiceBinding\x12\x39.google.cloud.networkservices.v1.GetServiceBindingRequest\x1a/.google.cloud.networkservices.v1.ServiceBinding\"B\xda\x41\x04name\x82\xd3\xe4\x93\x02\x35\x12\x33/v1/{name=projects/*/locations/*/serviceBindings/*}\x12\xb4\x02\n\x14\x43reateServiceBinding\x12<.google.cloud.networkservices.v1.CreateServiceBindingRequest\x1a\x1d.google.longrunning.Operation\"\xbe\x01\xca\x41\x43\n\x0eServiceBinding\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41)parent,service_binding,service_binding_id\x82\xd3\xe4\x93\x02\x46\"3/v1/{parent=projects/*/locations/*}/serviceBindings:\x0fservice_binding\x12\xb6\x02\n\x14UpdateServiceBinding\x12<.google.cloud.networkservices.v1.UpdateServiceBindingRequest\x1a\x1d.google.longrunning.Operation\"\xc0\x01\xca\x41\x43\n\x0eServiceBinding\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x1bservice_binding,update_mask\x82\xd3\xe4\x93\x02V2C/v1/{service_binding.name=projects/*/locations/*/serviceBindings/*}:\x0fservice_binding\x12\x85\x02\n\x14\x44\x65leteServiceBinding\x12<.google.cloud.networkservices.v1.DeleteServiceBindingRequest\x1a\x1d.google.longrunning.Operation\"\x8f\x01\xca\x41J\n\x15google.protobuf.Empty\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x35*3/v1/{name=projects/*/locations/*/serviceBindings/*}\x12\xb2\x01\n\nListMeshes\x12\x32.google.cloud.networkservices.v1.ListMeshesRequest\x1a\x33.google.cloud.networkservices.v1.ListMeshesResponse\";\xda\x41\x06parent\x82\xd3\xe4\x93\x02,\x12*/v1/{parent=projects/*/locations/*}/meshes\x12\x9c\x01\n\x07GetMesh\x12/.google.cloud.networkservices.v1.GetMeshRequest\x1a%.google.cloud.networkservices.v1.Mesh\"9\xda\x41\x04name\x82\xd3\xe4\x93\x02,\x12*/v1/{name=projects/*/locations/*/meshes/*}\x12\xec\x01\n\nCreateMesh\x12\x32.google.cloud.networkservices.v1.CreateMeshRequest\x1a\x1d.google.longrunning.Operation\"\x8a\x01\xca\x41\x39\n\x04Mesh\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x13parent,mesh,mesh_id\x82\xd3\xe4\x93\x02\x32\"*/v1/{parent=projects/*/locations/*}/meshes:\x04mesh\x12\xee\x01\n\nUpdateMesh\x12\x32.google.cloud.networkservices.v1.UpdateMeshRequest\x1a\x1d.google.longrunning.Operation\"\x8c\x01\xca\x41\x39\n\x04Mesh\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x10mesh,update_mask\x82\xd3\xe4\x93\x02\x37\x32//v1/{mesh.name=projects/*/locations/*/meshes/*}:\x04mesh\x12\xe8\x01\n\nDeleteMesh\x12\x32.google.cloud.networkservices.v1.DeleteMeshRequest\x1a\x1d.google.longrunning.Operation\"\x86\x01\xca\x41J\n\x15google.protobuf.Empty\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02,**/v1/{name=projects/*/locations/*/meshes/*}\x12\xde\x01\n\x15ListServiceLbPolicies\x12=.google.cloud.networkservices.v1.ListServiceLbPoliciesRequest\x1a>.google.cloud.networkservices.v1.ListServiceLbPoliciesResponse\"F\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x37\x12\x35/v1/{parent=projects/*/locations/*}/serviceLbPolicies\x12\xc8\x01\n\x12GetServiceLbPolicy\x12:.google.cloud.networkservices.v1.GetServiceLbPolicyRequest\x1a\x30.google.cloud.networkservices.v1.ServiceLbPolicy\"D\xda\x41\x04name\x82\xd3\xe4\x93\x02\x37\x12\x35/v1/{name=projects/*/locations/*/serviceLbPolicies/*}\x12\xbf\x02\n\x15\x43reateServiceLbPolicy\x12=.google.cloud.networkservices.v1.CreateServiceLbPolicyRequest\x1a\x1d.google.longrunning.Operation\"\xc7\x01\xca\x41\x44\n\x0fServiceLbPolicy\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41-parent,service_lb_policy,service_lb_policy_id\x82\xd3\xe4\x93\x02J\"5/v1/{parent=projects/*/locations/*}/serviceLbPolicies:\x11service_lb_policy\x12\xc1\x02\n\x15UpdateServiceLbPolicy\x12=.google.cloud.networkservices.v1.UpdateServiceLbPolicyRequest\x1a\x1d.google.longrunning.Operation\"\xc9\x01\xca\x41\x44\n\x0fServiceLbPolicy\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x1dservice_lb_policy,update_mask\x82\xd3\xe4\x93\x02\\2G/v1/{service_lb_policy.name=projects/*/locations/*/serviceLbPolicies/*}:\x11service_lb_policy\x12\x89\x02\n\x15\x44\x65leteServiceLbPolicy\x12=.google.cloud.networkservices.v1.DeleteServiceLbPolicyRequest\x1a\x1d.google.longrunning.Operation\"\x91\x01\xca\x41J\n\x15google.protobuf.Empty\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x37*5/v1/{name=projects/*/locations/*/serviceLbPolicies/*}\x12\xcf\x01\n\x13GetGatewayRouteView\x12;.google.cloud.networkservices.v1.GetGatewayRouteViewRequest\x1a\x31.google.cloud.networkservices.v1.GatewayRouteView\"H\xda\x41\x04name\x82\xd3\xe4\x93\x02;\x12\x39/v1/{name=projects/*/locations/*/gateways/*/routeViews/*}\x12\xc4\x01\n\x10GetMeshRouteView\x12\x38.google.cloud.networkservices.v1.GetMeshRouteViewRequest\x1a..google.cloud.networkservices.v1.MeshRouteView\"F\xda\x41\x04name\x82\xd3\xe4\x93\x02\x39\x12\x37/v1/{name=projects/*/locations/*/meshes/*/routeViews/*}\x12\xe2\x01\n\x15ListGatewayRouteViews\x12=.google.cloud.networkservices.v1.ListGatewayRouteViewsRequest\x1a>.google.cloud.networkservices.v1.ListGatewayRouteViewsResponse\"J\xda\x41\x06parent\x82\xd3\xe4\x93\x02;\x12\x39/v1/{parent=projects/*/locations/*/gateways/*}/routeViews\x12\xd7\x01\n\x12ListMeshRouteViews\x12:.google.cloud.networkservices.v1.ListMeshRouteViewsRequest\x1a;.google.cloud.networkservices.v1.ListMeshRouteViewsResponse\"H\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x39\x12\x37/v1/{parent=projects/*/locations/*/meshes/*}/routeViews\x12\xce\x01\n\x11ListAgentGateways\x12\x39.google.cloud.networkservices.v1.ListAgentGatewaysRequest\x1a:.google.cloud.networkservices.v1.ListAgentGatewaysResponse\"B\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x33\x12\x31/v1/{parent=projects/*/locations/*}/agentGateways\x12\xbb\x01\n\x0fGetAgentGateway\x12\x37.google.cloud.networkservices.v1.GetAgentGatewayRequest\x1a-.google.cloud.networkservices.v1.AgentGateway\"@\xda\x41\x04name\x82\xd3\xe4\x93\x02\x33\x12\x31/v1/{name=projects/*/locations/*/agentGateways/*}\x12\xa6\x02\n\x12\x43reateAgentGateway\x12:.google.cloud.networkservices.v1.CreateAgentGatewayRequest\x1a\x1d.google.longrunning.Operation\"\xb4\x01\xca\x41\x41\n\x0c\x41gentGateway\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41%parent,agent_gateway,agent_gateway_id\x82\xd3\xe4\x93\x02\x42\"1/v1/{parent=projects/*/locations/*}/agentGateways:\ragent_gateway\x12\xa8\x02\n\x12UpdateAgentGateway\x12:.google.cloud.networkservices.v1.UpdateAgentGatewayRequest\x1a\x1d.google.longrunning.Operation\"\xb6\x01\xca\x41\x41\n\x0c\x41gentGateway\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x19\x61gent_gateway,update_mask\x82\xd3\xe4\x93\x02P2?/v1/{agent_gateway.name=projects/*/locations/*/agentGateways/*}:\ragent_gateway\x12\xff\x01\n\x12\x44\x65leteAgentGateway\x12:.google.cloud.networkservices.v1.DeleteAgentGatewayRequest\x1a\x1d.google.longrunning.Operation\"\x8d\x01\xca\x41J\n\x15google.protobuf.Empty\x12\x31google.cloud.networkservices.v1.OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x33*1/v1/{name=projects/*/locations/*/agentGateways/*}\x1aR\xca\x41\x1enetworkservices.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xdf\x01\n#com.google.cloud.networkservices.v1P\x01ZMcloud.google.com/go/networkservices/apiv1/networkservicespb;networkservicespb\xaa\x02\x1fGoogle.Cloud.NetworkServices.V1\xca\x02\x1fGoogle\\Cloud\\NetworkServices\\V1\xea\x02\"Google::Cloud::NetworkServices::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module NetworkServices - module V1 - end - end - end -end diff --git a/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/network_services_services_pb.rb b/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/network_services_services_pb.rb deleted file mode 100644 index 5b97cc3d7a24..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/network_services_services_pb.rb +++ /dev/null @@ -1,173 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/cloud/networkservices/v1/network_services.proto for package 'Google.Cloud.NetworkServices.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/networkservices/v1/network_services_pb' - -module Google - module Cloud - module NetworkServices - module V1 - module NetworkServices - # Service describing handlers for resources. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.cloud.networkservices.v1.NetworkServices' - - # Lists EndpointPolicies in a given project and location. - rpc :ListEndpointPolicies, ::Google::Cloud::NetworkServices::V1::ListEndpointPoliciesRequest, ::Google::Cloud::NetworkServices::V1::ListEndpointPoliciesResponse - # Gets details of a single EndpointPolicy. - rpc :GetEndpointPolicy, ::Google::Cloud::NetworkServices::V1::GetEndpointPolicyRequest, ::Google::Cloud::NetworkServices::V1::EndpointPolicy - # Creates a new EndpointPolicy in a given project and location. - rpc :CreateEndpointPolicy, ::Google::Cloud::NetworkServices::V1::CreateEndpointPolicyRequest, ::Google::Longrunning::Operation - # Updates the parameters of a single EndpointPolicy. - rpc :UpdateEndpointPolicy, ::Google::Cloud::NetworkServices::V1::UpdateEndpointPolicyRequest, ::Google::Longrunning::Operation - # Deletes a single EndpointPolicy. - rpc :DeleteEndpointPolicy, ::Google::Cloud::NetworkServices::V1::DeleteEndpointPolicyRequest, ::Google::Longrunning::Operation - # Lists `WasmPluginVersion` resources in a given project and - # location. - rpc :ListWasmPluginVersions, ::Google::Cloud::NetworkServices::V1::ListWasmPluginVersionsRequest, ::Google::Cloud::NetworkServices::V1::ListWasmPluginVersionsResponse - # Gets details of the specified `WasmPluginVersion` resource. - rpc :GetWasmPluginVersion, ::Google::Cloud::NetworkServices::V1::GetWasmPluginVersionRequest, ::Google::Cloud::NetworkServices::V1::WasmPluginVersion - # Creates a new `WasmPluginVersion` resource in a given project - # and location. - rpc :CreateWasmPluginVersion, ::Google::Cloud::NetworkServices::V1::CreateWasmPluginVersionRequest, ::Google::Longrunning::Operation - # Deletes the specified `WasmPluginVersion` resource. - rpc :DeleteWasmPluginVersion, ::Google::Cloud::NetworkServices::V1::DeleteWasmPluginVersionRequest, ::Google::Longrunning::Operation - # Lists `WasmPlugin` resources in a given project and - # location. - rpc :ListWasmPlugins, ::Google::Cloud::NetworkServices::V1::ListWasmPluginsRequest, ::Google::Cloud::NetworkServices::V1::ListWasmPluginsResponse - # Gets details of the specified `WasmPlugin` resource. - rpc :GetWasmPlugin, ::Google::Cloud::NetworkServices::V1::GetWasmPluginRequest, ::Google::Cloud::NetworkServices::V1::WasmPlugin - # Creates a new `WasmPlugin` resource in a given project - # and location. - rpc :CreateWasmPlugin, ::Google::Cloud::NetworkServices::V1::CreateWasmPluginRequest, ::Google::Longrunning::Operation - # Updates the parameters of the specified `WasmPlugin` resource. - rpc :UpdateWasmPlugin, ::Google::Cloud::NetworkServices::V1::UpdateWasmPluginRequest, ::Google::Longrunning::Operation - # Deletes the specified `WasmPlugin` resource. - rpc :DeleteWasmPlugin, ::Google::Cloud::NetworkServices::V1::DeleteWasmPluginRequest, ::Google::Longrunning::Operation - # Lists Gateways in a given project and location. - rpc :ListGateways, ::Google::Cloud::NetworkServices::V1::ListGatewaysRequest, ::Google::Cloud::NetworkServices::V1::ListGatewaysResponse - # Gets details of a single Gateway. - rpc :GetGateway, ::Google::Cloud::NetworkServices::V1::GetGatewayRequest, ::Google::Cloud::NetworkServices::V1::Gateway - # Creates a new Gateway in a given project and location. - rpc :CreateGateway, ::Google::Cloud::NetworkServices::V1::CreateGatewayRequest, ::Google::Longrunning::Operation - # Updates the parameters of a single Gateway. - rpc :UpdateGateway, ::Google::Cloud::NetworkServices::V1::UpdateGatewayRequest, ::Google::Longrunning::Operation - # Deletes a single Gateway. - rpc :DeleteGateway, ::Google::Cloud::NetworkServices::V1::DeleteGatewayRequest, ::Google::Longrunning::Operation - # Lists GrpcRoutes in a given project and location. - rpc :ListGrpcRoutes, ::Google::Cloud::NetworkServices::V1::ListGrpcRoutesRequest, ::Google::Cloud::NetworkServices::V1::ListGrpcRoutesResponse - # Gets details of a single GrpcRoute. - rpc :GetGrpcRoute, ::Google::Cloud::NetworkServices::V1::GetGrpcRouteRequest, ::Google::Cloud::NetworkServices::V1::GrpcRoute - # Creates a new GrpcRoute in a given project and location. - rpc :CreateGrpcRoute, ::Google::Cloud::NetworkServices::V1::CreateGrpcRouteRequest, ::Google::Longrunning::Operation - # Updates the parameters of a single GrpcRoute. - rpc :UpdateGrpcRoute, ::Google::Cloud::NetworkServices::V1::UpdateGrpcRouteRequest, ::Google::Longrunning::Operation - # Deletes a single GrpcRoute. - rpc :DeleteGrpcRoute, ::Google::Cloud::NetworkServices::V1::DeleteGrpcRouteRequest, ::Google::Longrunning::Operation - # Lists HttpRoute in a given project and location. - rpc :ListHttpRoutes, ::Google::Cloud::NetworkServices::V1::ListHttpRoutesRequest, ::Google::Cloud::NetworkServices::V1::ListHttpRoutesResponse - # Gets details of a single HttpRoute. - rpc :GetHttpRoute, ::Google::Cloud::NetworkServices::V1::GetHttpRouteRequest, ::Google::Cloud::NetworkServices::V1::HttpRoute - # Creates a new HttpRoute in a given project and location. - rpc :CreateHttpRoute, ::Google::Cloud::NetworkServices::V1::CreateHttpRouteRequest, ::Google::Longrunning::Operation - # Updates the parameters of a single HttpRoute. - rpc :UpdateHttpRoute, ::Google::Cloud::NetworkServices::V1::UpdateHttpRouteRequest, ::Google::Longrunning::Operation - # Deletes a single HttpRoute. - rpc :DeleteHttpRoute, ::Google::Cloud::NetworkServices::V1::DeleteHttpRouteRequest, ::Google::Longrunning::Operation - # Lists TcpRoute in a given project and location. - rpc :ListTcpRoutes, ::Google::Cloud::NetworkServices::V1::ListTcpRoutesRequest, ::Google::Cloud::NetworkServices::V1::ListTcpRoutesResponse - # Gets details of a single TcpRoute. - rpc :GetTcpRoute, ::Google::Cloud::NetworkServices::V1::GetTcpRouteRequest, ::Google::Cloud::NetworkServices::V1::TcpRoute - # Creates a new TcpRoute in a given project and location. - rpc :CreateTcpRoute, ::Google::Cloud::NetworkServices::V1::CreateTcpRouteRequest, ::Google::Longrunning::Operation - # Updates the parameters of a single TcpRoute. - rpc :UpdateTcpRoute, ::Google::Cloud::NetworkServices::V1::UpdateTcpRouteRequest, ::Google::Longrunning::Operation - # Deletes a single TcpRoute. - rpc :DeleteTcpRoute, ::Google::Cloud::NetworkServices::V1::DeleteTcpRouteRequest, ::Google::Longrunning::Operation - # Lists TlsRoute in a given project and location. - rpc :ListTlsRoutes, ::Google::Cloud::NetworkServices::V1::ListTlsRoutesRequest, ::Google::Cloud::NetworkServices::V1::ListTlsRoutesResponse - # Gets details of a single TlsRoute. - rpc :GetTlsRoute, ::Google::Cloud::NetworkServices::V1::GetTlsRouteRequest, ::Google::Cloud::NetworkServices::V1::TlsRoute - # Creates a new TlsRoute in a given project and location. - rpc :CreateTlsRoute, ::Google::Cloud::NetworkServices::V1::CreateTlsRouteRequest, ::Google::Longrunning::Operation - # Updates the parameters of a single TlsRoute. - rpc :UpdateTlsRoute, ::Google::Cloud::NetworkServices::V1::UpdateTlsRouteRequest, ::Google::Longrunning::Operation - # Deletes a single TlsRoute. - rpc :DeleteTlsRoute, ::Google::Cloud::NetworkServices::V1::DeleteTlsRouteRequest, ::Google::Longrunning::Operation - # Lists ServiceBinding in a given project and location. - rpc :ListServiceBindings, ::Google::Cloud::NetworkServices::V1::ListServiceBindingsRequest, ::Google::Cloud::NetworkServices::V1::ListServiceBindingsResponse - # Gets details of a single ServiceBinding. - rpc :GetServiceBinding, ::Google::Cloud::NetworkServices::V1::GetServiceBindingRequest, ::Google::Cloud::NetworkServices::V1::ServiceBinding - # Creates a new ServiceBinding in a given project and location. - rpc :CreateServiceBinding, ::Google::Cloud::NetworkServices::V1::CreateServiceBindingRequest, ::Google::Longrunning::Operation - # Updates the parameters of a single ServiceBinding. - rpc :UpdateServiceBinding, ::Google::Cloud::NetworkServices::V1::UpdateServiceBindingRequest, ::Google::Longrunning::Operation - # Deletes a single ServiceBinding. - rpc :DeleteServiceBinding, ::Google::Cloud::NetworkServices::V1::DeleteServiceBindingRequest, ::Google::Longrunning::Operation - # Lists Meshes in a given project and location. - rpc :ListMeshes, ::Google::Cloud::NetworkServices::V1::ListMeshesRequest, ::Google::Cloud::NetworkServices::V1::ListMeshesResponse - # Gets details of a single Mesh. - rpc :GetMesh, ::Google::Cloud::NetworkServices::V1::GetMeshRequest, ::Google::Cloud::NetworkServices::V1::Mesh - # Creates a new Mesh in a given project and location. - rpc :CreateMesh, ::Google::Cloud::NetworkServices::V1::CreateMeshRequest, ::Google::Longrunning::Operation - # Updates the parameters of a single Mesh. - rpc :UpdateMesh, ::Google::Cloud::NetworkServices::V1::UpdateMeshRequest, ::Google::Longrunning::Operation - # Deletes a single Mesh. - rpc :DeleteMesh, ::Google::Cloud::NetworkServices::V1::DeleteMeshRequest, ::Google::Longrunning::Operation - # Lists ServiceLbPolicies in a given project and location. - rpc :ListServiceLbPolicies, ::Google::Cloud::NetworkServices::V1::ListServiceLbPoliciesRequest, ::Google::Cloud::NetworkServices::V1::ListServiceLbPoliciesResponse - # Gets details of a single ServiceLbPolicy. - rpc :GetServiceLbPolicy, ::Google::Cloud::NetworkServices::V1::GetServiceLbPolicyRequest, ::Google::Cloud::NetworkServices::V1::ServiceLbPolicy - # Creates a new ServiceLbPolicy in a given project and location. - rpc :CreateServiceLbPolicy, ::Google::Cloud::NetworkServices::V1::CreateServiceLbPolicyRequest, ::Google::Longrunning::Operation - # Updates the parameters of a single ServiceLbPolicy. - rpc :UpdateServiceLbPolicy, ::Google::Cloud::NetworkServices::V1::UpdateServiceLbPolicyRequest, ::Google::Longrunning::Operation - # Deletes a single ServiceLbPolicy. - rpc :DeleteServiceLbPolicy, ::Google::Cloud::NetworkServices::V1::DeleteServiceLbPolicyRequest, ::Google::Longrunning::Operation - # Get a single RouteView of a Gateway. - rpc :GetGatewayRouteView, ::Google::Cloud::NetworkServices::V1::GetGatewayRouteViewRequest, ::Google::Cloud::NetworkServices::V1::GatewayRouteView - # Get a single RouteView of a Mesh. - rpc :GetMeshRouteView, ::Google::Cloud::NetworkServices::V1::GetMeshRouteViewRequest, ::Google::Cloud::NetworkServices::V1::MeshRouteView - # Lists RouteViews - rpc :ListGatewayRouteViews, ::Google::Cloud::NetworkServices::V1::ListGatewayRouteViewsRequest, ::Google::Cloud::NetworkServices::V1::ListGatewayRouteViewsResponse - # Lists RouteViews - rpc :ListMeshRouteViews, ::Google::Cloud::NetworkServices::V1::ListMeshRouteViewsRequest, ::Google::Cloud::NetworkServices::V1::ListMeshRouteViewsResponse - # Lists AgentGateways in a given project and location. - rpc :ListAgentGateways, ::Google::Cloud::NetworkServices::V1::ListAgentGatewaysRequest, ::Google::Cloud::NetworkServices::V1::ListAgentGatewaysResponse - # Gets details of a single AgentGateway. - rpc :GetAgentGateway, ::Google::Cloud::NetworkServices::V1::GetAgentGatewayRequest, ::Google::Cloud::NetworkServices::V1::AgentGateway - # Creates a new AgentGateway in a given project and location. - rpc :CreateAgentGateway, ::Google::Cloud::NetworkServices::V1::CreateAgentGatewayRequest, ::Google::Longrunning::Operation - # Updates the parameters of a single AgentGateway. - rpc :UpdateAgentGateway, ::Google::Cloud::NetworkServices::V1::UpdateAgentGatewayRequest, ::Google::Longrunning::Operation - # Deletes a single AgentGateway. - rpc :DeleteAgentGateway, ::Google::Cloud::NetworkServices::V1::DeleteAgentGatewayRequest, ::Google::Longrunning::Operation - end - - Stub = Service.rpc_stub_class - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/route_view_pb.rb b/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/route_view_pb.rb deleted file mode 100644 index 24479529c303..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/route_view_pb.rb +++ /dev/null @@ -1,31 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/networkservices/v1/route_view.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' - - -descriptor_data = "\n0google/cloud/networkservices/v1/route_view.proto\x12\x1fgoogle.cloud.networkservices.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xc9\x02\n\x10GatewayRouteView\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x03\xe0\x41\x08\x12!\n\x14route_project_number\x18\x02 \x01(\x03\x42\x03\xe0\x41\x03\x12\x1b\n\x0eroute_location\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x17\n\nroute_type\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\x15\n\x08route_id\x18\x05 \x01(\tB\x03\xe0\x41\x03:\xae\x01\xea\x41\xaa\x01\n/networkservices.googleapis.com/GatewayRouteView\x12Rprojects/{project}/locations/{location}/gateways/{gateway}/routeViews/{route_view}*\x11gatewayRouteViews2\x10gatewayRouteView\"\xb8\x02\n\rMeshRouteView\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x03\xe0\x41\x08\x12!\n\x14route_project_number\x18\x02 \x01(\x03\x42\x03\xe0\x41\x03\x12\x1b\n\x0eroute_location\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x17\n\nroute_type\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\x15\n\x08route_id\x18\x05 \x01(\tB\x03\xe0\x41\x03:\xa0\x01\xea\x41\x9c\x01\n,networkservices.googleapis.com/MeshRouteView\x12Mprojects/{project}/locations/{location}/meshes/{mesh}/routeViews/{route_view}*\x0emeshRouteViews2\rmeshRouteView\"c\n\x1aGetGatewayRouteViewRequest\x12\x45\n\x04name\x18\x01 \x01(\tB7\xe0\x41\x02\xfa\x41\x31\n/networkservices.googleapis.com/GatewayRouteView\"]\n\x17GetMeshRouteViewRequest\x12\x42\n\x04name\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\n,networkservices.googleapis.com/MeshRouteView\"\x8e\x01\n\x1cListGatewayRouteViewsRequest\x12G\n\x06parent\x18\x01 \x01(\tB7\xe0\x41\x02\xfa\x41\x31\x12/networkservices.googleapis.com/GatewayRouteView\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"\x88\x01\n\x19ListMeshRouteViewsRequest\x12\x44\n\x06parent\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\x12,networkservices.googleapis.com/MeshRouteView\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"\x9d\x01\n\x1dListGatewayRouteViewsResponse\x12N\n\x13gateway_route_views\x18\x01 \x03(\x0b\x32\x31.google.cloud.networkservices.v1.GatewayRouteView\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"\x94\x01\n\x1aListMeshRouteViewsResponse\x12H\n\x10mesh_route_views\x18\x01 \x03(\x0b\x32..google.cloud.networkservices.v1.MeshRouteView\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\tB\xef\x01\n#com.google.cloud.networkservices.v1B\x0eRouteViewProtoP\x01ZMcloud.google.com/go/networkservices/apiv1/networkservicespb;networkservicespb\xaa\x02\x1fGoogle.Cloud.NetworkServices.V1\xca\x02\x1fGoogle\\Cloud\\NetworkServices\\V1\xea\x02\"Google::Cloud::NetworkServices::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module NetworkServices - module V1 - GatewayRouteView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.GatewayRouteView").msgclass - MeshRouteView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.MeshRouteView").msgclass - GetGatewayRouteViewRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.GetGatewayRouteViewRequest").msgclass - GetMeshRouteViewRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.GetMeshRouteViewRequest").msgclass - ListGatewayRouteViewsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.ListGatewayRouteViewsRequest").msgclass - ListMeshRouteViewsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.ListMeshRouteViewsRequest").msgclass - ListGatewayRouteViewsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.ListGatewayRouteViewsResponse").msgclass - ListMeshRouteViewsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.ListMeshRouteViewsResponse").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/service_binding_pb.rb b/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/service_binding_pb.rb deleted file mode 100644 index ee63ef59e8ca..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/service_binding_pb.rb +++ /dev/null @@ -1,33 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/networkservices/v1/service_binding.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/field_info_pb' -require 'google/api/resource_pb' -require 'google/protobuf/field_mask_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n5google/cloud/networkservices/v1/service_binding.proto\x12\x1fgoogle.cloud.networkservices.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1bgoogle/api/field_info.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x88\x04\n\x0eServiceBinding\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x18\n\x0b\x64\x65scription\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x34\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x42\n\x07service\x18\x05 \x01(\tB1\x18\x01\xe0\x41\x01\xfa\x41)\n\'servicedirectory.googleapis.com/Service\x12\x19\n\nservice_id\x18\x08 \x01(\tB\x05\x18\x01\xe0\x41\x03\x12P\n\x06labels\x18\x07 \x03(\x0b\x32;.google.cloud.networkservices.v1.ServiceBinding.LabelsEntryB\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:}\xea\x41z\n-networkservices.googleapis.com/ServiceBinding\x12Iprojects/{project}/locations/{location}/serviceBindings/{service_binding}\"\x8a\x01\n\x1aListServiceBindingsRequest\x12\x45\n\x06parent\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\x12-networkservices.googleapis.com/ServiceBinding\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"\x96\x01\n\x1bListServiceBindingsResponse\x12I\n\x10service_bindings\x18\x01 \x03(\x0b\x32/.google.cloud.networkservices.v1.ServiceBinding\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"_\n\x18GetServiceBindingRequest\x12\x43\n\x04name\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-networkservices.googleapis.com/ServiceBinding\"\xd4\x01\n\x1b\x43reateServiceBindingRequest\x12\x45\n\x06parent\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\x12-networkservices.googleapis.com/ServiceBinding\x12\x1f\n\x12service_binding_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12M\n\x0fservice_binding\x18\x03 \x01(\x0b\x32/.google.cloud.networkservices.v1.ServiceBindingB\x03\xe0\x41\x02\"\xa2\x01\n\x1bUpdateServiceBindingRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x12M\n\x0fservice_binding\x18\x02 \x01(\x0b\x32/.google.cloud.networkservices.v1.ServiceBindingB\x03\xe0\x41\x02\"b\n\x1b\x44\x65leteServiceBindingRequest\x12\x43\n\x04name\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-networkservices.googleapis.com/ServiceBindingB\xf3\x02\n#com.google.cloud.networkservices.v1B\x13ServiceBindingProtoP\x01ZMcloud.google.com/go/networkservices/apiv1/networkservicespb;networkservicespb\xaa\x02\x1fGoogle.Cloud.NetworkServices.V1\xca\x02\x1fGoogle\\Cloud\\NetworkServices\\V1\xea\x02\"Google::Cloud::NetworkServices::V1\xea\x41|\n\'servicedirectory.googleapis.com/Service\x12Qprojects/{project}/locations/{location}/namespaces/{namespace}/services/{service}b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module NetworkServices - module V1 - ServiceBinding = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.ServiceBinding").msgclass - ListServiceBindingsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.ListServiceBindingsRequest").msgclass - ListServiceBindingsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.ListServiceBindingsResponse").msgclass - GetServiceBindingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.GetServiceBindingRequest").msgclass - CreateServiceBindingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.CreateServiceBindingRequest").msgclass - UpdateServiceBindingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.UpdateServiceBindingRequest").msgclass - DeleteServiceBindingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.DeleteServiceBindingRequest").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/service_lb_policy_pb.rb b/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/service_lb_policy_pb.rb deleted file mode 100644 index c49e46670265..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/service_lb_policy_pb.rb +++ /dev/null @@ -1,38 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/networkservices/v1/service_lb_policy.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/field_mask_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n7google/cloud/networkservices/v1/service_lb_policy.proto\x12\x1fgoogle.cloud.networkservices.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xba\x0b\n\x0fServiceLbPolicy\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12Q\n\x06labels\x18\x04 \x03(\x0b\x32<.google.cloud.networkservices.v1.ServiceLbPolicy.LabelsEntryB\x03\xe0\x41\x01\x12\x18\n\x0b\x64\x65scription\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12n\n\x18load_balancing_algorithm\x18\x06 \x01(\x0e\x32G.google.cloud.networkservices.v1.ServiceLbPolicy.LoadBalancingAlgorithmB\x03\xe0\x41\x01\x12\x64\n\x13\x61uto_capacity_drain\x18\x08 \x01(\x0b\x32\x42.google.cloud.networkservices.v1.ServiceLbPolicy.AutoCapacityDrainB\x03\xe0\x41\x01\x12]\n\x0f\x66\x61ilover_config\x18\n \x01(\x0b\x32?.google.cloud.networkservices.v1.ServiceLbPolicy.FailoverConfigB\x03\xe0\x41\x01\x12_\n\x10isolation_config\x18\x0b \x01(\x0b\x32@.google.cloud.networkservices.v1.ServiceLbPolicy.IsolationConfigB\x03\xe0\x41\x01\x1a(\n\x11\x41utoCapacityDrain\x12\x13\n\x06\x65nable\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01\x1a\x38\n\x0e\x46\x61iloverConfig\x12&\n\x19\x66\x61ilover_health_threshold\x18\x01 \x01(\x05\x42\x03\xe0\x41\x01\x1a\xd9\x01\n\x0fIsolationConfig\x12i\n\x15isolation_granularity\x18\x01 \x01(\x0e\x32\x45.google.cloud.networkservices.v1.ServiceLbPolicy.IsolationGranularityB\x03\xe0\x41\x01\x12[\n\x0eisolation_mode\x18\x02 \x01(\x0e\x32>.google.cloud.networkservices.v1.ServiceLbPolicy.IsolationModeB\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x9b\x01\n\x16LoadBalancingAlgorithm\x12(\n$LOAD_BALANCING_ALGORITHM_UNSPECIFIED\x10\x00\x12\x12\n\x0eSPRAY_TO_WORLD\x10\x03\x12\x13\n\x0fSPRAY_TO_REGION\x10\x04\x12\x17\n\x13WATERFALL_BY_REGION\x10\x05\x12\x15\n\x11WATERFALL_BY_ZONE\x10\x06\"I\n\x14IsolationGranularity\x12%\n!ISOLATION_GRANULARITY_UNSPECIFIED\x10\x00\x12\n\n\x06REGION\x10\x01\"H\n\rIsolationMode\x12\x1e\n\x1aISOLATION_MODE_UNSPECIFIED\x10\x00\x12\x0b\n\x07NEAREST\x10\x01\x12\n\n\x06STRICT\x10\x02:\x82\x01\xea\x41\x7f\n.networkservices.googleapis.com/ServiceLbPolicy\x12Mprojects/{project}/locations/{location}/serviceLbPolicies/{service_lb_policy}\"\x8d\x01\n\x1cListServiceLbPoliciesRequest\x12\x46\n\x06parent\x18\x01 \x01(\tB6\xe0\x41\x02\xfa\x41\x30\x12.networkservices.googleapis.com/ServiceLbPolicy\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"\x9c\x01\n\x1dListServiceLbPoliciesResponse\x12M\n\x13service_lb_policies\x18\x01 \x03(\x0b\x32\x30.google.cloud.networkservices.v1.ServiceLbPolicy\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"a\n\x19GetServiceLbPolicyRequest\x12\x44\n\x04name\x18\x01 \x01(\tB6\xe0\x41\x02\xfa\x41\x30\n.networkservices.googleapis.com/ServiceLbPolicy\"\xdb\x01\n\x1c\x43reateServiceLbPolicyRequest\x12\x46\n\x06parent\x18\x01 \x01(\tB6\xe0\x41\x02\xfa\x41\x30\x12.networkservices.googleapis.com/ServiceLbPolicy\x12!\n\x14service_lb_policy_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12P\n\x11service_lb_policy\x18\x03 \x01(\x0b\x32\x30.google.cloud.networkservices.v1.ServiceLbPolicyB\x03\xe0\x41\x02\"\xa6\x01\n\x1cUpdateServiceLbPolicyRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x12P\n\x11service_lb_policy\x18\x02 \x01(\x0b\x32\x30.google.cloud.networkservices.v1.ServiceLbPolicyB\x03\xe0\x41\x02\"d\n\x1c\x44\x65leteServiceLbPolicyRequest\x12\x44\n\x04name\x18\x01 \x01(\tB6\xe0\x41\x02\xfa\x41\x30\n.networkservices.googleapis.com/ServiceLbPolicyB\xf5\x01\n#com.google.cloud.networkservices.v1B\x14ServiceLbPolicyProtoP\x01ZMcloud.google.com/go/networkservices/apiv1/networkservicespb;networkservicespb\xaa\x02\x1fGoogle.Cloud.NetworkServices.V1\xca\x02\x1fGoogle\\Cloud\\NetworkServices\\V1\xea\x02\"Google::Cloud::NetworkServices::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module NetworkServices - module V1 - ServiceLbPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.ServiceLbPolicy").msgclass - ServiceLbPolicy::AutoCapacityDrain = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.ServiceLbPolicy.AutoCapacityDrain").msgclass - ServiceLbPolicy::FailoverConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.ServiceLbPolicy.FailoverConfig").msgclass - ServiceLbPolicy::IsolationConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.ServiceLbPolicy.IsolationConfig").msgclass - ServiceLbPolicy::LoadBalancingAlgorithm = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.ServiceLbPolicy.LoadBalancingAlgorithm").enummodule - ServiceLbPolicy::IsolationGranularity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.ServiceLbPolicy.IsolationGranularity").enummodule - ServiceLbPolicy::IsolationMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.ServiceLbPolicy.IsolationMode").enummodule - ListServiceLbPoliciesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.ListServiceLbPoliciesRequest").msgclass - ListServiceLbPoliciesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.ListServiceLbPoliciesResponse").msgclass - GetServiceLbPolicyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.GetServiceLbPolicyRequest").msgclass - CreateServiceLbPolicyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.CreateServiceLbPolicyRequest").msgclass - UpdateServiceLbPolicyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.UpdateServiceLbPolicyRequest").msgclass - DeleteServiceLbPolicyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.DeleteServiceLbPolicyRequest").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/tcp_route_pb.rb b/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/tcp_route_pb.rb deleted file mode 100644 index 07d47a524db0..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/tcp_route_pb.rb +++ /dev/null @@ -1,37 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/networkservices/v1/tcp_route.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/duration_pb' -require 'google/protobuf/field_mask_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n/google/cloud/networkservices/v1/tcp_route.proto\x12\x1fgoogle.cloud.networkservices.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1egoogle/protobuf/duration.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xf6\x08\n\x08TcpRoute\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x16\n\tself_link\x18\x0b \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12G\n\x05rules\x18\x05 \x03(\x0b\x32\x33.google.cloud.networkservices.v1.TcpRoute.RouteRuleB\x03\xe0\x41\x02\x12;\n\x06meshes\x18\x08 \x03(\tB+\xe0\x41\x01\xfa\x41%\n#networkservices.googleapis.com/Mesh\x12@\n\x08gateways\x18\t \x03(\tB.\xe0\x41\x01\xfa\x41(\n&networkservices.googleapis.com/Gateway\x12J\n\x06labels\x18\n \x03(\x0b\x32\x35.google.cloud.networkservices.v1.TcpRoute.LabelsEntryB\x03\xe0\x41\x01\x1a\xa3\x01\n\tRouteRule\x12J\n\x07matches\x18\x01 \x03(\x0b\x32\x34.google.cloud.networkservices.v1.TcpRoute.RouteMatchB\x03\xe0\x41\x01\x12J\n\x06\x61\x63tion\x18\x02 \x01(\x0b\x32\x35.google.cloud.networkservices.v1.TcpRoute.RouteActionB\x03\xe0\x41\x02\x1a\x35\n\nRouteMatch\x12\x14\n\x07\x61\x64\x64ress\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x11\n\x04port\x18\x02 \x01(\tB\x03\xe0\x41\x02\x1a\xbd\x01\n\x0bRouteAction\x12U\n\x0c\x64\x65stinations\x18\x01 \x03(\x0b\x32:.google.cloud.networkservices.v1.TcpRoute.RouteDestinationB\x03\xe0\x41\x01\x12!\n\x14original_destination\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\x12\x34\n\x0cidle_timeout\x18\x05 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x01\x1al\n\x10RouteDestination\x12\x43\n\x0cservice_name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%compute.googleapis.com/BackendService\x12\x13\n\x06weight\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:k\xea\x41h\n\'networkservices.googleapis.com/TcpRoute\x12=projects/{project}/locations/{location}/tcpRoutes/{tcp_route}\"\xa3\x01\n\x14ListTcpRoutesRequest\x12?\n\x06parent\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\x12\'networkservices.googleapis.com/TcpRoute\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12#\n\x16return_partial_success\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"\x84\x01\n\x15ListTcpRoutesResponse\x12=\n\ntcp_routes\x18\x01 \x03(\x0b\x32).google.cloud.networkservices.v1.TcpRoute\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"S\n\x12GetTcpRouteRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'networkservices.googleapis.com/TcpRoute\"\xb6\x01\n\x15\x43reateTcpRouteRequest\x12?\n\x06parent\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\x12\'networkservices.googleapis.com/TcpRoute\x12\x19\n\x0ctcp_route_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x41\n\ttcp_route\x18\x03 \x01(\x0b\x32).google.cloud.networkservices.v1.TcpRouteB\x03\xe0\x41\x02\"\x90\x01\n\x15UpdateTcpRouteRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x12\x41\n\ttcp_route\x18\x02 \x01(\x0b\x32).google.cloud.networkservices.v1.TcpRouteB\x03\xe0\x41\x02\"V\n\x15\x44\x65leteTcpRouteRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'networkservices.googleapis.com/TcpRouteB\xee\x01\n#com.google.cloud.networkservices.v1B\rTcpRouteProtoP\x01ZMcloud.google.com/go/networkservices/apiv1/networkservicespb;networkservicespb\xaa\x02\x1fGoogle.Cloud.NetworkServices.V1\xca\x02\x1fGoogle\\Cloud\\NetworkServices\\V1\xea\x02\"Google::Cloud::NetworkServices::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module NetworkServices - module V1 - TcpRoute = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.TcpRoute").msgclass - TcpRoute::RouteRule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.TcpRoute.RouteRule").msgclass - TcpRoute::RouteMatch = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.TcpRoute.RouteMatch").msgclass - TcpRoute::RouteAction = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.TcpRoute.RouteAction").msgclass - TcpRoute::RouteDestination = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.TcpRoute.RouteDestination").msgclass - ListTcpRoutesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.ListTcpRoutesRequest").msgclass - ListTcpRoutesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.ListTcpRoutesResponse").msgclass - GetTcpRouteRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.GetTcpRouteRequest").msgclass - CreateTcpRouteRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.CreateTcpRouteRequest").msgclass - UpdateTcpRouteRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.UpdateTcpRouteRequest").msgclass - DeleteTcpRouteRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.DeleteTcpRouteRequest").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/tls_route_pb.rb b/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/tls_route_pb.rb deleted file mode 100644 index 3b1b6565b309..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/lib/google/cloud/networkservices/v1/tls_route_pb.rb +++ /dev/null @@ -1,37 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/networkservices/v1/tls_route.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/duration_pb' -require 'google/protobuf/field_mask_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n/google/cloud/networkservices/v1/tls_route.proto\x12\x1fgoogle.cloud.networkservices.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1egoogle/protobuf/duration.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x9b\t\n\x08TlsRoute\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x16\n\tself_link\x18\x08 \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12G\n\x05rules\x18\x05 \x03(\x0b\x32\x33.google.cloud.networkservices.v1.TlsRoute.RouteRuleB\x03\xe0\x41\x02\x12;\n\x06meshes\x18\x06 \x03(\tB+\xe0\x41\x01\xfa\x41%\n#networkservices.googleapis.com/Mesh\x12@\n\x08gateways\x18\x07 \x03(\tB.\xe0\x41\x01\xfa\x41(\n&networkservices.googleapis.com/Gateway\x12\x45\n\x0etarget_proxies\x18\r \x03(\tB-\xe0\x41\x01\xfa\x41\'\n%compute.googleapis.com/TargetTcpProxy\x12J\n\x06labels\x18\x0b \x03(\x0b\x32\x35.google.cloud.networkservices.v1.TlsRoute.LabelsEntryB\x03\xe0\x41\x01\x1a\xa3\x01\n\tRouteRule\x12J\n\x07matches\x18\x01 \x03(\x0b\x32\x34.google.cloud.networkservices.v1.TlsRoute.RouteMatchB\x03\xe0\x41\x02\x12J\n\x06\x61\x63tion\x18\x02 \x01(\x0b\x32\x35.google.cloud.networkservices.v1.TlsRoute.RouteActionB\x03\xe0\x41\x02\x1a\x36\n\nRouteMatch\x12\x15\n\x08sni_host\x18\x01 \x03(\tB\x03\xe0\x41\x01\x12\x11\n\x04\x61lpn\x18\x02 \x03(\tB\x03\xe0\x41\x01\x1a\x9a\x01\n\x0bRouteAction\x12U\n\x0c\x64\x65stinations\x18\x01 \x03(\x0b\x32:.google.cloud.networkservices.v1.TlsRoute.RouteDestinationB\x03\xe0\x41\x02\x12\x34\n\x0cidle_timeout\x18\x04 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x01\x1al\n\x10RouteDestination\x12\x43\n\x0cservice_name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%compute.googleapis.com/BackendService\x12\x13\n\x06weight\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:k\xea\x41h\n\'networkservices.googleapis.com/TlsRoute\x12=projects/{project}/locations/{location}/tlsRoutes/{tls_route}\"\xa3\x01\n\x14ListTlsRoutesRequest\x12?\n\x06parent\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\x12\'networkservices.googleapis.com/TlsRoute\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12#\n\x16return_partial_success\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"\x84\x01\n\x15ListTlsRoutesResponse\x12=\n\ntls_routes\x18\x01 \x03(\x0b\x32).google.cloud.networkservices.v1.TlsRoute\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"S\n\x12GetTlsRouteRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'networkservices.googleapis.com/TlsRoute\"\xb6\x01\n\x15\x43reateTlsRouteRequest\x12?\n\x06parent\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\x12\'networkservices.googleapis.com/TlsRoute\x12\x19\n\x0ctls_route_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x41\n\ttls_route\x18\x03 \x01(\x0b\x32).google.cloud.networkservices.v1.TlsRouteB\x03\xe0\x41\x02\"\x90\x01\n\x15UpdateTlsRouteRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x12\x41\n\ttls_route\x18\x02 \x01(\x0b\x32).google.cloud.networkservices.v1.TlsRouteB\x03\xe0\x41\x02\"V\n\x15\x44\x65leteTlsRouteRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'networkservices.googleapis.com/TlsRouteB\xe5\x02\n#com.google.cloud.networkservices.v1B\rTlsRouteProtoP\x01ZMcloud.google.com/go/networkservices/apiv1/networkservicespb;networkservicespb\xaa\x02\x1fGoogle.Cloud.NetworkServices.V1\xca\x02\x1fGoogle\\Cloud\\NetworkServices\\V1\xea\x02\"Google::Cloud::NetworkServices::V1\xea\x41t\n%compute.googleapis.com/TargetTcpProxy\x12Kprojects/{project}/locations/{location}/targetTcpProxies/{target_tcp_proxy}b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module NetworkServices - module V1 - TlsRoute = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.TlsRoute").msgclass - TlsRoute::RouteRule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.TlsRoute.RouteRule").msgclass - TlsRoute::RouteMatch = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.TlsRoute.RouteMatch").msgclass - TlsRoute::RouteAction = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.TlsRoute.RouteAction").msgclass - TlsRoute::RouteDestination = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.TlsRoute.RouteDestination").msgclass - ListTlsRoutesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.ListTlsRoutesRequest").msgclass - ListTlsRoutesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.ListTlsRoutesResponse").msgclass - GetTlsRouteRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.GetTlsRouteRequest").msgclass - CreateTlsRouteRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.CreateTlsRouteRequest").msgclass - UpdateTlsRouteRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.UpdateTlsRouteRequest").msgclass - DeleteTlsRouteRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.networkservices.v1.DeleteTlsRouteRequest").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-network_services-v1/proto_docs/README.md b/owl-bot-staging/google-cloud-network_services-v1/proto_docs/README.md deleted file mode 100644 index bede8b6f1ebd..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/proto_docs/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# Network Services 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_services-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/api/client.rb deleted file mode 100644 index 3ab0b096d445..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/api/client.rb +++ /dev/null @@ -1,593 +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. - # - # Note: This field should not be used in most cases. - 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: - # library_settings: - # 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. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Php. Clobbers the php_namespace option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.php.package_name" field - # in gapic.yaml. API teams should use the protobuf php_namespace option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # php_settings: - # library_package: Google\Cloud\PubSub\V1 - 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. - # - # Example: - # - # 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 - # @!attribute [rw] batching - # @return [::Google::Api::BatchingConfigProto] - # Batching configuration for an API method in client libraries. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.BatchCreateExample - # batching: - # element_count_threshold: 1000 - # request_byte_threshold: 100000000 - # delay_threshold_millis: 10 - 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. - # - # Note: This feature should not be used in most cases. - # @!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 - - # `BatchingConfigProto` defines the batching configuration for an API method. - # @!attribute [rw] thresholds - # @return [::Google::Api::BatchingSettingsProto] - # The thresholds which trigger a batched request to be sent. - # @!attribute [rw] batch_descriptor - # @return [::Google::Api::BatchingDescriptorProto] - # The request and response fields used in batching. - class BatchingConfigProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingSettingsProto` specifies a set of batching thresholds, each of - # which acts as a trigger to send a batch of messages as a request. At least - # one threshold must be positive nonzero. - # @!attribute [rw] element_count_threshold - # @return [::Integer] - # The number of elements of a field collected into a batch which, if - # exceeded, causes the batch to be sent. - # @!attribute [rw] request_byte_threshold - # @return [::Integer] - # The aggregated size of the batched field which, if exceeded, causes the - # batch to be sent. This size is computed by aggregating the sizes of the - # request field to be batched, not of the entire request message. - # @!attribute [rw] delay_threshold - # @return [::Google::Protobuf::Duration] - # The duration after which a batch should be sent, starting from the addition - # of the first message to that batch. - # @!attribute [rw] element_count_limit - # @return [::Integer] - # The maximum number of elements collected in a batch that could be accepted - # by server. - # @!attribute [rw] request_byte_limit - # @return [::Integer] - # The maximum size of the request that could be accepted by server. - # @!attribute [rw] flow_control_element_limit - # @return [::Integer] - # The maximum number of elements allowed by flow control. - # @!attribute [rw] flow_control_byte_limit - # @return [::Integer] - # The maximum size of data allowed by flow control. - # @!attribute [rw] flow_control_limit_exceeded_behavior - # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] - # The behavior to take when the flow control limit is exceeded. - class BatchingSettingsProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingDescriptorProto` specifies the fields of the request message to be - # used for batching, and, optionally, the fields of the response message to be - # used for demultiplexing. - # @!attribute [rw] batched_field - # @return [::String] - # The repeated field in the request message to be aggregated by batching. - # @!attribute [rw] discriminator_fields - # @return [::Array<::String>] - # A list of the fields in the request message. Two requests will be batched - # together only if the values of every field specified in - # `request_discriminator_fields` is equal between the two requests. - # @!attribute [rw] subresponse_field - # @return [::String] - # Optional. When present, indicates the field in the response message to be - # used to demultiplex the response into multiple response messages, in - # correspondence with the multiple request messages originally batched - # together. - class BatchingDescriptorProto - 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 - - # The behavior to take when the flow control limit is exceeded. - module FlowControlLimitExceededBehaviorProto - # Default behavior, system-defined. - UNSET_BEHAVIOR = 0 - - # Stop operation, raise error. - THROW_EXCEPTION = 1 - - # Pause operation until limit clears. - BLOCK = 2 - - # Continue operation, disregard limit. - IGNORE = 3 - end - end -end diff --git a/owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index 582be187d115..000000000000 --- a/owl-bot-staging/google-cloud-network_services-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_services-v1/proto_docs/google/api/field_info.rb b/owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/api/field_info.rb deleted file mode 100644 index 0f5acf0a5538..000000000000 --- a/owl-bot-staging/google-cloud-network_services-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_services-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 9392a413fb1b..000000000000 --- a/owl-bot-staging/google-cloud-network_services-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_services-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/api/resource.rb deleted file mode 100644 index 25dec4847ac1..000000000000 --- a/owl-bot-staging/google-cloud-network_services-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_services-v1/proto_docs/google/cloud/networkservices/v1/common.rb b/owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/common.rb deleted file mode 100644 index c0a547efdb7c..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/common.rb +++ /dev/null @@ -1,164 +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 NetworkServices - module V1 - # Represents the metadata of the long-running operation. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time the operation was created. - # @!attribute [r] end_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time the operation finished running. - # @!attribute [r] target - # @return [::String] - # Output only. Server-defined resource path for the target of the operation. - # @!attribute [r] verb - # @return [::String] - # Output only. Name of the verb executed by the operation. - # @!attribute [r] status_message - # @return [::String] - # Output only. Human-readable status of the operation, if any. - # @!attribute [r] requested_cancellation - # @return [::Boolean] - # Output only. Identifies whether the user has requested cancellation - # of the operation. Operations that have successfully been cancelled - # have [Operation.error][] value with a - # {::Google::Rpc::Status#code google.rpc.Status.code} of 1, corresponding to - # `Code.CANCELLED`. - # @!attribute [r] api_version - # @return [::String] - # Output only. API version used to start the operation. - class OperationMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Specification of a port-based selector. - # @!attribute [rw] ports - # @return [::Array<::String>] - # Optional. A list of ports. Can be port numbers or port range - # (example, [80-90] specifies all ports from 80 to 90, including - # 80 and 90) or named ports or * to specify all ports. If the - # list is empty, all ports are selected. - class TrafficPortSelector - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A definition of a matcher that selects endpoints to which the policies - # should be applied. - # @!attribute [rw] metadata_label_matcher - # @return [::Google::Cloud::NetworkServices::V1::EndpointMatcher::MetadataLabelMatcher] - # The matcher is based on node metadata presented by xDS clients. - class EndpointMatcher - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The matcher that is based on node metadata presented by xDS clients. - # @!attribute [rw] metadata_label_match_criteria - # @return [::Google::Cloud::NetworkServices::V1::EndpointMatcher::MetadataLabelMatcher::MetadataLabelMatchCriteria] - # Specifies how matching should be done. - # - # Supported values are: - # MATCH_ANY: At least one of the Labels specified in the - # matcher should match the metadata presented by xDS client. - # MATCH_ALL: The metadata presented by the xDS client should - # contain all of the labels specified here. - # - # The selection is determined based on the best match. For - # example, suppose there are three EndpointPolicy - # resources P1, P2 and P3 and if P1 has a the matcher as - # MATCH_ANY , P2 has MATCH_ALL , and P3 has - # MATCH_ALL . - # - # If a client with label connects, the config from P1 - # will be selected. - # - # If a client with label connects, the config from P2 - # will be selected. - # - # If a client with label connects, the config - # from P3 will be selected. - # - # If there is more than one best match, (for example, if a - # config P4 with selector exists and if a client with - # label connects), pick up the one with older creation time. - # @!attribute [rw] metadata_labels - # @return [::Array<::Google::Cloud::NetworkServices::V1::EndpointMatcher::MetadataLabelMatcher::MetadataLabels>] - # The list of label value pairs that must match labels in the - # provided metadata based on filterMatchCriteria This list can - # have at most 64 entries. The list can be empty if the match - # criteria is MATCH_ANY, to specify a wildcard match (i.e this - # matches any client). - class MetadataLabelMatcher - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Defines a name-pair value for a single label. - # @!attribute [rw] label_name - # @return [::String] - # Required. Label name presented as key in xDS Node Metadata. - # @!attribute [rw] label_value - # @return [::String] - # Required. Label value presented as value corresponding to the above - # key, in xDS Node Metadata. - class MetadataLabels - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Possible criteria values that define logic of how matching is made. - module MetadataLabelMatchCriteria - # Default value. Should not be used. - METADATA_LABEL_MATCH_CRITERIA_UNSPECIFIED = 0 - - # At least one of the Labels specified in the matcher should match the - # metadata presented by xDS client. - MATCH_ANY = 1 - - # The metadata presented by the xDS client should contain all of the - # labels specified here. - MATCH_ALL = 2 - end - end - end - - # EnvoyHeader configuration for Mesh and Gateway - module EnvoyHeaders - # Defaults to NONE. - ENVOY_HEADERS_UNSPECIFIED = 0 - - # Suppress envoy debug headers. - NONE = 1 - - # Envoy will insert default internal debug headers into upstream requests: - # x-envoy-attempt-count, - # x-envoy-is-timeout-retry, - # x-envoy-expected-rq-timeout-ms, - # x-envoy-original-path, - # x-envoy-upstream-stream-duration-ms - DEBUG_HEADERS = 2 - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/dep.rb b/owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/dep.rb deleted file mode 100644 index d1cda59da9ce..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/dep.rb +++ /dev/null @@ -1,1209 +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 NetworkServices - module V1 - # A single extension chain wrapper that contains the match conditions and - # extensions to execute. - # @!attribute [rw] name - # @return [::String] - # Required. The name for this extension chain. - # The name is logged as part of the HTTP request logs. - # The name must conform with RFC-1034, is restricted to lower-cased letters, - # numbers and hyphens, and can have a maximum length of 63 characters. - # Additionally, the first character must be a letter and the last a letter or - # a number. - # @!attribute [rw] match_condition - # @return [::Google::Cloud::NetworkServices::V1::ExtensionChain::MatchCondition] - # Required. Conditions under which this chain is invoked for a request. - # @!attribute [rw] extensions - # @return [::Array<::Google::Cloud::NetworkServices::V1::ExtensionChain::Extension>] - # Required. A set of extensions to execute for the matching request. - # At least one extension is required. - # Up to 3 extensions can be defined for each extension chain - # for `LbTrafficExtension` resource. - # `LbRouteExtension` and `LbEdgeExtension` chains are limited to 1 extension - # per extension chain. - class ExtensionChain - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Conditions under which this chain is invoked for a request. - # @!attribute [rw] cel_expression - # @return [::String] - # Required. A Common Expression Language (CEL) expression that is used to - # match requests for which the extension chain is executed. - # - # For more information, see [CEL matcher language - # reference](https://cloud.google.com/service-extensions/docs/cel-matcher-language-reference). - class MatchCondition - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A single extension in the chain to execute for the matching request. - # @!attribute [rw] name - # @return [::String] - # Optional. The name for this extension. - # The name is logged as part of the HTTP request logs. - # The name must conform with RFC-1034, is restricted to lower-cased - # letters, numbers and hyphens, and can have a maximum length of 63 - # characters. Additionally, the first character must be a letter and the - # last a letter or a number. - # - # This field is required except for AuthzExtension. - # @!attribute [rw] authority - # @return [::String] - # Optional. The `:authority` header in the gRPC request sent from Envoy - # to the extension service. - # Required for Callout extensions. - # - # This field is not supported for plugin extensions. Setting it results in - # a validation error. - # @!attribute [rw] service - # @return [::String] - # Required. The reference to the service that runs the extension. - # - # To configure a callout extension, `service` must be a fully-qualified - # reference - # to a [backend - # service](https://cloud.google.com/compute/docs/reference/rest/v1/backendServices) - # in the format: - # `https://www.googleapis.com/compute/v1/projects/{project}/regions/{region}/backendServices/{backendService}` - # or - # `https://www.googleapis.com/compute/v1/projects/{project}/global/backendServices/{backendService}`. - # - # To configure a plugin extension, `service` must be a reference - # to a [`WasmPlugin` - # resource](https://cloud.google.com/service-extensions/docs/reference/rest/v1beta1/projects.locations.wasmPlugins) - # in the format: - # `projects/{project}/locations/{location}/wasmPlugins/{plugin}` - # or - # `//networkservices.googleapis.com/projects/{project}/locations/{location}/wasmPlugins/{wasmPlugin}`. - # - # Plugin extensions are currently supported for the - # `LbTrafficExtension`, the `LbRouteExtension`, and the `LbEdgeExtension` - # resources. - # @!attribute [rw] supported_events - # @return [::Array<::Google::Cloud::NetworkServices::V1::EventType>] - # Optional. A set of events during request or response processing for which - # this extension is called. - # - # For the `LbTrafficExtension` resource, this field is required. - # - # For the `LbRouteExtension` resource, this field is optional. If - # unspecified, `REQUEST_HEADERS` event is assumed as supported. - # - # For the `LbEdgeExtension` resource, this field is required and must only - # contain `REQUEST_HEADERS` event. - # - # For the `AuthzExtension` resource, this field is optional. - # `REQUEST_HEADERS` is the only supported event. If unspecified, - # `REQUEST_HEADERS` event is assumed as supported. - # @!attribute [rw] timeout - # @return [::Google::Protobuf::Duration] - # Optional. Specifies the timeout for each individual message on the - # stream. The timeout must be between `10`-`10000` milliseconds. Required - # for callout extensions. - # - # This field is not supported for plugin extensions. Setting it results in - # a validation error. - # @!attribute [rw] fail_open - # @return [::Boolean] - # Optional. Determines how the proxy behaves if the call to the extension - # fails or times out. - # - # When set to `TRUE`, request or response processing continues without - # error. Any subsequent extensions in the extension chain are also - # executed. When set to `FALSE` or the default setting of `FALSE` is used, - # one of the following happens: - # - # * If response headers have not been delivered to the downstream client, - # a generic 500 error is returned to the client. The error response can be - # tailored by configuring a custom error response in the load balancer. - # - # * If response headers have been delivered, then the HTTP stream to the - # downstream client is reset. - # @!attribute [rw] forward_headers - # @return [::Array<::String>] - # Optional. List of the HTTP headers to forward to the extension - # (from the client or backend). If omitted, all headers are sent. - # Each element is a string indicating the header name. - # @!attribute [rw] forward_attributes - # @return [::Array<::String>] - # Optional. List of the Envoy attributes to forward to the extension - # server. The attributes provided here are included as part of the - # `ProcessingRequest.attributes` field (of type - # `map`), where the keys are the attribute - # names. Refer to the - # [documentation](https://cloud.google.com/service-extensions/docs/cel-matcher-language-reference#attributes) - # for the names of attributes that can be forwarded. If omitted, no - # attributes are sent. Each element is a string indicating the - # attribute name. - # @!attribute [rw] metadata - # @return [::Google::Protobuf::Struct] - # Optional. The metadata provided here is included as part of the - # `metadata_context` (of type `google.protobuf.Struct`) in the - # `ProcessingRequest` message sent to the extension server. - # - # For `AuthzExtension` resources, the metadata is available under the - # namespace `com.google.authz_extension.`. - # For other types of extensions, the metadata is available under the - # namespace - # `com.google....`. - # For example: - # `com.google.lb_traffic_extension.lbtrafficextension1.chain1.ext1`. - # - # The following variables are supported in the metadata: - # - # `{forwarding_rule_id}` - substituted with the forwarding rule's fully - # qualified resource name. - # - # This field must not be set for plugin extensions. Setting it results in - # a validation error. - # - # You can set metadata at either the resource level or the extension level. - # The extension level metadata is recommended because you can pass a - # different set of metadata through each extension to the backend. - # - # This field is subject to following limitations: - # - # * The total size of the metadata must be less than 1KiB. - # * The total number of keys in the metadata must be less than 16. - # * The length of each key must be less than 64 characters. - # * The length of each value must be less than 1024 characters. - # * All values must be strings. - # @!attribute [rw] request_body_send_mode - # @return [::Google::Cloud::NetworkServices::V1::BodySendMode] - # Optional. Configures the send mode for request body processing. - # - # The field can only be set if `supported_events` includes `REQUEST_BODY`. - # If `supported_events` includes `REQUEST_BODY`, - # but `request_body_send_mode` is unset, the default value `STREAMED` is - # used. - # - # When this field is set to `FULL_DUPLEX_STREAMED`, `supported_events` - # must include both `REQUEST_BODY` and `REQUEST_TRAILERS`. - # - # This field can be set only for `LbTrafficExtension` and - # `LbRouteExtension` resources, and only when the `service` field of the - # extension points to a `BackendService`. Only `FULL_DUPLEX_STREAMED` mode - # is supported for `LbRouteExtension` resources. - # @!attribute [rw] response_body_send_mode - # @return [::Google::Cloud::NetworkServices::V1::BodySendMode] - # Optional. Configures the send mode for response processing. If - # unspecified, the default value `STREAMED` is used. - # - # The field can only be set if `supported_events` includes `RESPONSE_BODY`. - # If `supported_events` includes `RESPONSE_BODY`, but - # `response_body_send_mode` is unset, the default value `STREAMED` is used. - # - # When this field is set to `FULL_DUPLEX_STREAMED`, `supported_events` - # must include both `RESPONSE_BODY` and `RESPONSE_TRAILERS`. - # - # This field can be set only for `LbTrafficExtension` resources, and only - # when the `service` field of the extension points to a `BackendService`. - # @!attribute [rw] observability_mode - # @return [::Boolean] - # Optional. When set to `true`, the calls to the extension backend are - # performed asynchronously, without pausing the processing of the ongoing - # request. In this mode, only `STREAMED` (default) body processing is - # supported. Responses, if any, are ignored. - # - # Supported by regional `LbTrafficExtension` and `LbRouteExtension` - # resources. - class Extension - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # `LbTrafficExtension` is a resource that lets the extension service modify the - # headers and payloads of both requests and responses without impacting the - # choice of backend services or any other security policies associated with the - # backend service. - # @!attribute [rw] name - # @return [::String] - # Required. Identifier. Name of the `LbTrafficExtension` resource in the - # following format: - # `projects/{project}/locations/{location}/lbTrafficExtensions/{lb_traffic_extension}`. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The timestamp when the resource was created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The timestamp when the resource was updated. - # @!attribute [rw] description - # @return [::String] - # Optional. A human-readable description of the resource. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. Set of labels associated with the `LbTrafficExtension` resource. - # - # The format must comply with [the requirements for - # labels](https://cloud.google.com/compute/docs/labeling-resources#requirements) - # for Google Cloud resources. - # @!attribute [rw] forwarding_rules - # @return [::Array<::String>] - # Optional. A list of references to the forwarding rules to which this - # service extension is attached. At least one forwarding rule is required. - # Only one `LbTrafficExtension` resource can be associated with a forwarding - # rule. - # @!attribute [rw] extension_chains - # @return [::Array<::Google::Cloud::NetworkServices::V1::ExtensionChain>] - # Required. A set of ordered extension chains that contain the match - # conditions and extensions to execute. Match conditions for each extension - # chain are evaluated in sequence for a given request. The first extension - # chain that has a condition that matches the request is executed. - # Any subsequent extension chains do not execute. - # Limited to 5 extension chains per resource. - # @!attribute [rw] load_balancing_scheme - # @return [::Google::Cloud::NetworkServices::V1::LoadBalancingScheme] - # Required. All backend services and forwarding rules referenced by this - # extension must share the same load balancing scheme. Supported values: - # `INTERNAL_MANAGED` and `EXTERNAL_MANAGED`. For more information, refer to - # [Backend services - # overview](https://cloud.google.com/load-balancing/docs/backend-service). - # @!attribute [rw] metadata - # @return [::Google::Protobuf::Struct] - # Optional. The metadata provided here is included as part of the - # `metadata_context` (of type `google.protobuf.Struct`) in the - # `ProcessingRequest` message sent to the extension server. - # - # The metadata applies to all extensions in all extensions chains in this - # resource. - # - # The metadata is available under the key - # `com.google.lb_traffic_extension.`. - # - # The following variables are supported in the metadata: - # - # `{forwarding_rule_id}` - substituted with the forwarding rule's fully - # qualified resource name. - # - # This field must not be set if at least one of the extension chains - # contains plugin extensions. Setting it results in a validation error. - # - # You can set metadata at either the resource level or the extension level. - # The extension level metadata is recommended because you can pass a - # different set of metadata through each extension to the backend. - class LbTrafficExtension - 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 - - # Message for requesting list of `LbTrafficExtension` resources. - # @!attribute [rw] parent - # @return [::String] - # Required. The project and location from which the `LbTrafficExtension` - # resources are listed. These values are specified in the following format: - # `projects/{project}/locations/{location}`. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. Requested page size. The server might return fewer items than - # requested. If unspecified, the server picks an appropriate default. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A token identifying a page of results that the server returns. - # @!attribute [rw] filter - # @return [::String] - # Optional. Filtering results. - # @!attribute [rw] order_by - # @return [::String] - # Optional. Hint about how to order the results. - class ListLbTrafficExtensionsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for response to listing `LbTrafficExtension` resources. - # @!attribute [rw] lb_traffic_extensions - # @return [::Array<::Google::Cloud::NetworkServices::V1::LbTrafficExtension>] - # The list of `LbTrafficExtension` resources. - # @!attribute [rw] next_page_token - # @return [::String] - # A token identifying a page of results that the server returns. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Locations that could not be reached. - class ListLbTrafficExtensionsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for getting a `LbTrafficExtension` resource. - # @!attribute [rw] name - # @return [::String] - # Required. A name of the `LbTrafficExtension` resource to get. Must be in - # the format - # `projects/{project}/locations/{location}/lbTrafficExtensions/{lb_traffic_extension}`. - class GetLbTrafficExtensionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for creating a `LbTrafficExtension` resource. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent resource of the `LbTrafficExtension` resource. Must be - # in the format `projects/{project}/locations/{location}`. - # @!attribute [rw] lb_traffic_extension_id - # @return [::String] - # Required. User-provided ID of the `LbTrafficExtension` resource to be - # created. - # @!attribute [rw] lb_traffic_extension - # @return [::Google::Cloud::NetworkServices::V1::LbTrafficExtension] - # Required. `LbTrafficExtension` resource to be created. - # @!attribute [rw] request_id - # @return [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server can ignore - # the request if it has already been completed. The server guarantees - # that for 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server ignores the second request This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - class CreateLbTrafficExtensionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for updating a `LbTrafficExtension` resource. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Optional. Used to specify the fields to be overwritten in the - # `LbTrafficExtension` resource by the update. - # The fields specified in the `update_mask` are relative to the resource, not - # the full request. A field is overwritten if it is in the mask. If the - # user does not specify a mask, then all fields are overwritten. - # @!attribute [rw] lb_traffic_extension - # @return [::Google::Cloud::NetworkServices::V1::LbTrafficExtension] - # Required. `LbTrafficExtension` resource being updated. - # @!attribute [rw] request_id - # @return [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server can ignore - # the request if it has already been completed. The server guarantees - # that for 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server ignores the second request This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - class UpdateLbTrafficExtensionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for deleting a `LbTrafficExtension` resource. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the `LbTrafficExtension` resource to delete. Must be - # in the format - # `projects/{project}/locations/{location}/lbTrafficExtensions/{lb_traffic_extension}`. - # @!attribute [rw] request_id - # @return [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server can ignore - # the request if it has already been completed. The server guarantees - # that for 60 minutes after the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server ignores the second request This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - class DeleteLbTrafficExtensionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `LbRouteExtension` is a resource that lets you control where traffic is - # routed to for a given request. - # @!attribute [rw] name - # @return [::String] - # Required. Identifier. Name of the `LbRouteExtension` resource in the - # following format: - # `projects/{project}/locations/{location}/lbRouteExtensions/{lb_route_extension}`. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The timestamp when the resource was created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The timestamp when the resource was updated. - # @!attribute [rw] description - # @return [::String] - # Optional. A human-readable description of the resource. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. Set of labels associated with the `LbRouteExtension` resource. - # - # The format must comply with [the requirements for - # labels](https://cloud.google.com/compute/docs/labeling-resources#requirements) - # for Google Cloud resources. - # @!attribute [rw] forwarding_rules - # @return [::Array<::String>] - # Required. A list of references to the forwarding rules to which this - # service extension is attached. At least one forwarding rule is required. - # Only one `LbRouteExtension` resource can be associated with a forwarding - # rule. - # @!attribute [rw] extension_chains - # @return [::Array<::Google::Cloud::NetworkServices::V1::ExtensionChain>] - # Required. A set of ordered extension chains that contain the match - # conditions and extensions to execute. Match conditions for each extension - # chain are evaluated in sequence for a given request. The first extension - # chain that has a condition that matches the request is executed. - # Any subsequent extension chains do not execute. - # Limited to 5 extension chains per resource. - # @!attribute [rw] load_balancing_scheme - # @return [::Google::Cloud::NetworkServices::V1::LoadBalancingScheme] - # Required. All backend services and forwarding rules referenced by this - # extension must share the same load balancing scheme. Supported values: - # `INTERNAL_MANAGED`, `EXTERNAL_MANAGED`. For more information, refer to - # [Backend services - # overview](https://cloud.google.com/load-balancing/docs/backend-service). - # @!attribute [rw] metadata - # @return [::Google::Protobuf::Struct] - # Optional. The metadata provided here is included as part of the - # `metadata_context` (of type `google.protobuf.Struct`) in the - # `ProcessingRequest` message sent to the extension server. - # - # The metadata applies to all extensions in all extensions chains in this - # resource. - # - # The metadata is available under the key - # `com.google.lb_route_extension.`. - # - # The following variables are supported in the metadata: - # - # `{forwarding_rule_id}` - substituted with the forwarding rule's fully - # qualified resource name. - # - # This field must not be set if at least one of the extension chains - # contains plugin extensions. Setting it results in a validation error. - # - # You can set metadata at either the resource level or the extension level. - # The extension level metadata is recommended because you can pass a - # different set of metadata through each extension to the backend. - class LbRouteExtension - 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 - - # Message for requesting list of `LbRouteExtension` resources. - # @!attribute [rw] parent - # @return [::String] - # Required. The project and location from which the `LbRouteExtension` - # resources are listed. These values are specified in the following format: - # `projects/{project}/locations/{location}`. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. Requested page size. The server might return fewer items than - # requested. If unspecified, the server picks an appropriate default. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A token identifying a page of results that the server returns. - # @!attribute [rw] filter - # @return [::String] - # Optional. Filtering results. - # @!attribute [rw] order_by - # @return [::String] - # Optional. Hint about how to order the results. - class ListLbRouteExtensionsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for response to listing `LbRouteExtension` resources. - # @!attribute [rw] lb_route_extensions - # @return [::Array<::Google::Cloud::NetworkServices::V1::LbRouteExtension>] - # The list of `LbRouteExtension` resources. - # @!attribute [rw] next_page_token - # @return [::String] - # A token identifying a page of results that the server returns. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Locations that could not be reached. - class ListLbRouteExtensionsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for getting a `LbRouteExtension` resource. - # @!attribute [rw] name - # @return [::String] - # Required. A name of the `LbRouteExtension` resource to get. Must be in the - # format - # `projects/{project}/locations/{location}/lbRouteExtensions/{lb_route_extension}`. - class GetLbRouteExtensionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for creating a `LbRouteExtension` resource. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent resource of the `LbRouteExtension` resource. Must be - # in the format `projects/{project}/locations/{location}`. - # @!attribute [rw] lb_route_extension_id - # @return [::String] - # Required. User-provided ID of the `LbRouteExtension` resource to be - # created. - # @!attribute [rw] lb_route_extension - # @return [::Google::Cloud::NetworkServices::V1::LbRouteExtension] - # Required. `LbRouteExtension` resource to be created. - # @!attribute [rw] request_id - # @return [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server can ignore - # the request if it has already been completed. The server guarantees - # that for 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server ignores the second request This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - class CreateLbRouteExtensionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for updating a `LbRouteExtension` resource. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Optional. Used to specify the fields to be overwritten in the - # `LbRouteExtension` resource by the update. - # The fields specified in the `update_mask` are relative to the resource, not - # the full request. A field is overwritten if it is in the mask. If the - # user does not specify a mask, then all fields are overwritten. - # @!attribute [rw] lb_route_extension - # @return [::Google::Cloud::NetworkServices::V1::LbRouteExtension] - # Required. `LbRouteExtension` resource being updated. - # @!attribute [rw] request_id - # @return [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server can ignore - # the request if it has already been completed. The server guarantees - # that for 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server ignores the second request This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - class UpdateLbRouteExtensionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for deleting a `LbRouteExtension` resource. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the `LbRouteExtension` resource to delete. Must be in - # the format - # `projects/{project}/locations/{location}/lbRouteExtensions/{lb_route_extension}`. - # @!attribute [rw] request_id - # @return [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server can ignore - # the request if it has already been completed. The server guarantees - # that for 60 minutes after the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server ignores the second request This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - class DeleteLbRouteExtensionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `LbEdgeExtension` is a resource that lets the extension service influence - # the selection of backend services and Cloud CDN cache keys by modifying - # request headers. - # @!attribute [rw] name - # @return [::String] - # Required. Identifier. Name of the `LbEdgeExtension` resource in the - # following format: - # `projects/{project}/locations/{location}/lbEdgeExtensions/{lb_edge_extension}`. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The timestamp when the resource was created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The timestamp when the resource was updated. - # @!attribute [rw] description - # @return [::String] - # Optional. A human-readable description of the resource. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. Set of labels associated with the `LbEdgeExtension` resource. - # - # The format must comply with [the requirements for - # labels](https://cloud.google.com/compute/docs/labeling-resources#requirements) - # for Google Cloud resources. - # @!attribute [rw] forwarding_rules - # @return [::Array<::String>] - # Required. A list of references to the forwarding rules to which this - # service extension is attached. At least one forwarding rule is required. - # Only one `LbEdgeExtension` resource can be associated with a forwarding - # rule. - # @!attribute [rw] extension_chains - # @return [::Array<::Google::Cloud::NetworkServices::V1::ExtensionChain>] - # Required. A set of ordered extension chains that contain the match - # conditions and extensions to execute. Match conditions for each extension - # chain are evaluated in sequence for a given request. The first extension - # chain that has a condition that matches the request is executed. - # Any subsequent extension chains do not execute. - # Limited to 5 extension chains per resource. - # @!attribute [rw] load_balancing_scheme - # @return [::Google::Cloud::NetworkServices::V1::LoadBalancingScheme] - # Required. All forwarding rules referenced by this extension must - # share the same load balancing scheme. - # Supported values: `EXTERNAL_MANAGED`. - class LbEdgeExtension - 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 - - # Message for requesting list of `LbEdgeExtension` resources. - # @!attribute [rw] parent - # @return [::String] - # Required. The project and location from which the `LbEdgeExtension` - # resources are listed. These values are specified in the following format: - # `projects/{project}/locations/{location}`. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. Requested page size. The server might return fewer items than - # requested. If unspecified, the server picks an appropriate default. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A token identifying a page of results that the server returns. - # @!attribute [rw] filter - # @return [::String] - # Optional. Filtering results. - # @!attribute [rw] order_by - # @return [::String] - # Optional. Hint about how to order the results. - class ListLbEdgeExtensionsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for response to listing `LbEdgeExtension` resources. - # @!attribute [rw] lb_edge_extensions - # @return [::Array<::Google::Cloud::NetworkServices::V1::LbEdgeExtension>] - # The list of `LbEdgeExtension` resources. - # @!attribute [rw] next_page_token - # @return [::String] - # A token identifying a page of results that the server returns. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Locations that could not be reached. - class ListLbEdgeExtensionsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for getting a `LbEdgeExtension` resource. - # @!attribute [rw] name - # @return [::String] - # Required. A name of the `LbEdgeExtension` resource to get. Must be in the - # format - # `projects/{project}/locations/{location}/lbEdgeExtensions/{lb_edge_extension}`. - class GetLbEdgeExtensionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for creating a `LbEdgeExtension` resource. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent resource of the `LbEdgeExtension` resource. Must be in - # the format `projects/{project}/locations/{location}`. - # @!attribute [rw] lb_edge_extension_id - # @return [::String] - # Required. User-provided ID of the `LbEdgeExtension` resource to be created. - # @!attribute [rw] lb_edge_extension - # @return [::Google::Cloud::NetworkServices::V1::LbEdgeExtension] - # Required. `LbEdgeExtension` resource to be created. - # @!attribute [rw] request_id - # @return [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server can ignore - # the request if it has already been completed. The server guarantees - # that for 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server ignores the second request This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - class CreateLbEdgeExtensionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for updating a `LbEdgeExtension` resource. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Optional. Used to specify the fields to be overwritten in the - # `LbEdgeExtension` resource by the update. - # The fields specified in the `update_mask` are relative to the resource, not - # the full request. A field is overwritten if it is in the mask. If the - # user does not specify a mask, then all fields are overwritten. - # @!attribute [rw] lb_edge_extension - # @return [::Google::Cloud::NetworkServices::V1::LbEdgeExtension] - # Required. `LbEdgeExtension` resource being updated. - # @!attribute [rw] request_id - # @return [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server can ignore - # the request if it has already been completed. The server guarantees - # that for 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server ignores the second request This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - class UpdateLbEdgeExtensionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for deleting a `LbEdgeExtension` resource. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the `LbEdgeExtension` resource to delete. Must be in - # the format - # `projects/{project}/locations/{location}/lbEdgeExtensions/{lb_edge_extension}`. - # @!attribute [rw] request_id - # @return [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server can ignore - # the request if it has already been completed. The server guarantees - # that for 60 minutes after the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server ignores the second request This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - class DeleteLbEdgeExtensionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `AuthzExtension` is a resource that allows traffic forwarding - # to a callout backend service to make an authorization decision. - # @!attribute [rw] name - # @return [::String] - # Required. Identifier. Name of the `AuthzExtension` resource in the - # following format: - # `projects/{project}/locations/{location}/authzExtensions/{authz_extension}`. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The timestamp when the resource was created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The timestamp when the resource was updated. - # @!attribute [rw] description - # @return [::String] - # Optional. A human-readable description of the resource. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. Set of labels associated with the `AuthzExtension` - # resource. - # - # The format must comply with [the requirements for - # labels](/compute/docs/labeling-resources#requirements) for Google Cloud - # resources. - # @!attribute [rw] load_balancing_scheme - # @return [::Google::Cloud::NetworkServices::V1::LoadBalancingScheme] - # Optional. All backend services and forwarding rules referenced by this - # extension must share the same load balancing scheme. Supported values: - # `INTERNAL_MANAGED`, `EXTERNAL_MANAGED`. Can be omitted for AuthzExtensions - # that do not reference a backend service. For more information, refer to - # [Backend services - # overview](https://cloud.google.com/load-balancing/docs/backend-service). - # @!attribute [rw] authority - # @return [::String] - # Optional. The `:authority` header in the gRPC request sent from Envoy to - # the extension service. It is required when the `service` field points to a - # backend service or a wasm plugin. - # @!attribute [rw] service - # @return [::String] - # Required. The reference to the service that runs the extension. - # - # To configure a callout extension, `service` must be a fully-qualified - # reference - # to a [backend - # service](https://cloud.google.com/compute/docs/reference/rest/v1/backendServices) - # in the format: - # `https://www.googleapis.com/compute/v1/projects/{project}/regions/{region}/backendServices/{backendService}` - # or - # `https://www.googleapis.com/compute/v1/projects/{project}/global/backendServices/{backendService}`. - # @!attribute [rw] timeout - # @return [::Google::Protobuf::Duration] - # Required. Specifies the timeout for each individual message on the stream. - # The timeout must be between 10-10000 milliseconds. - # @!attribute [rw] fail_open - # @return [::Boolean] - # Optional. Determines how the proxy behaves if the call to the extension - # fails or times out. - # - # When set to `TRUE`, request or response processing continues without - # error. Any subsequent extensions in the extension chain are also - # executed. When set to `FALSE` or the default setting of `FALSE` is used, - # one of the following happens: - # - # * If response headers have not been delivered to the downstream client, - # a generic 500 error is returned to the client. The error response can be - # tailored by configuring a custom error response in the load balancer. - # - # * If response headers have been delivered, then the HTTP stream to the - # downstream client is reset. - # @!attribute [rw] metadata - # @return [::Google::Protobuf::Struct] - # Optional. The metadata provided here is included as part of the - # `metadata_context` (of type `google.protobuf.Struct`) in the - # `ProcessingRequest` message sent to the extension - # server. The metadata is available under the namespace - # `com.google.authz_extension.`. - # The following variables are supported in the metadata Struct: - # - # `{forwarding_rule_id}` - substituted with the forwarding rule's fully - # qualified resource name. - # @!attribute [rw] forward_headers - # @return [::Array<::String>] - # Optional. List of the HTTP headers to forward to the extension - # (from the client). If omitted, all headers are sent. - # Each element is a string indicating the header name. - # @!attribute [rw] forward_attributes - # @return [::Array<::String>] - # Optional. List of the Envoy attributes to forward to the extension server. - # The attributes provided here are included as part of the - # `ProcessingRequest.attributes` field (of type - # `map`), where the keys are the attribute - # names. Refer to the - # [documentation](https://cloud.google.com/service-extensions/docs/cel-matcher-language-reference#attributes) - # for the names of attributes that can be forwarded. If omitted, no - # attributes are sent. Each element is a string indicating the - # attribute name. - # @!attribute [rw] wire_format - # @return [::Google::Cloud::NetworkServices::V1::WireFormat] - # Optional. The format of communication supported by the callout extension. - # This field is supported only for regional `AuthzExtension` resources. If - # not specified, the default value `EXT_PROC_GRPC` is used. Global - # `AuthzExtension` resources use the `EXT_PROC_GRPC` wire format. - class AuthzExtension - 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 - - # Message for requesting list of `AuthzExtension` resources. - # @!attribute [rw] parent - # @return [::String] - # Required. The project and location from which the `AuthzExtension` - # resources are listed. These values are specified in the following format: - # `projects/{project}/locations/{location}`. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. Requested page size. The server might return fewer items than - # requested. If unspecified, the server picks an appropriate default. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A token identifying a page of results that the server returns. - # @!attribute [rw] filter - # @return [::String] - # Optional. Filtering results. - # @!attribute [rw] order_by - # @return [::String] - # Optional. Hint about how to order the results. - class ListAuthzExtensionsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for response to listing `AuthzExtension` resources. - # @!attribute [rw] authz_extensions - # @return [::Array<::Google::Cloud::NetworkServices::V1::AuthzExtension>] - # The list of `AuthzExtension` resources. - # @!attribute [rw] next_page_token - # @return [::String] - # A token identifying a page of results that the server returns. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Locations that could not be reached. - class ListAuthzExtensionsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for getting a `AuthzExtension` resource. - # @!attribute [rw] name - # @return [::String] - # Required. A name of the `AuthzExtension` resource to get. Must be in - # the format - # `projects/{project}/locations/{location}/authzExtensions/{authz_extension}`. - class GetAuthzExtensionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for creating a `AuthzExtension` resource. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent resource of the `AuthzExtension` resource. Must - # be in the format `projects/{project}/locations/{location}`. - # @!attribute [rw] authz_extension_id - # @return [::String] - # Required. User-provided ID of the `AuthzExtension` resource to be - # created. - # @!attribute [rw] authz_extension - # @return [::Google::Cloud::NetworkServices::V1::AuthzExtension] - # Required. `AuthzExtension` resource to be created. - # @!attribute [rw] request_id - # @return [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server can ignore - # the request if it has already been completed. The server guarantees - # that for 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server ignores the second request This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - class CreateAuthzExtensionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for updating a `AuthzExtension` resource. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. Used to specify the fields to be overwritten in the - # `AuthzExtension` resource by the update. - # The fields specified in the `update_mask` are relative to the resource, not - # the full request. A field is overwritten if it is in the mask. If the - # user does not specify a mask, then all fields are overwritten. - # @!attribute [rw] authz_extension - # @return [::Google::Cloud::NetworkServices::V1::AuthzExtension] - # Required. `AuthzExtension` resource being updated. - # @!attribute [rw] request_id - # @return [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server can ignore - # the request if it has already been completed. The server guarantees - # that for 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server ignores the second request This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - class UpdateAuthzExtensionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for deleting a `AuthzExtension` resource. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the `AuthzExtension` resource to delete. Must - # be in the format - # `projects/{project}/locations/{location}/authzExtensions/{authz_extension}`. - # @!attribute [rw] request_id - # @return [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server can ignore - # the request if it has already been completed. The server guarantees - # that for 60 minutes after the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server ignores the second request This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - class DeleteAuthzExtensionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The part of the request or response for which the extension is called. - module EventType - # Unspecified value. Do not use. - EVENT_TYPE_UNSPECIFIED = 0 - - # If included in `supported_events`, - # the extension is called when the HTTP request headers arrive. - REQUEST_HEADERS = 1 - - # If included in `supported_events`, - # the extension is called when the HTTP request body arrives. - REQUEST_BODY = 2 - - # If included in `supported_events`, - # the extension is called when the HTTP response headers arrive. - RESPONSE_HEADERS = 3 - - # If included in `supported_events`, - # the extension is called when the HTTP response body arrives. - RESPONSE_BODY = 4 - - # If included in `supported_events`, - # the extension is called when the HTTP request trailers arrives. - REQUEST_TRAILERS = 5 - - # If included in `supported_events`, - # the extension is called when the HTTP response trailers arrives. - RESPONSE_TRAILERS = 6 - end - - # Load balancing schemes supported by the `LbTrafficExtension`, - # `LbRouteExtension`, and `LbEdgeExtension` resources. - # For more information, refer to [Backend services - # overview](https://cloud.google.com/load-balancing/docs/backend-service). - module LoadBalancingScheme - # Default value. Do not use. - LOAD_BALANCING_SCHEME_UNSPECIFIED = 0 - - # Signifies that this is used for Internal HTTP(S) Load Balancing. - INTERNAL_MANAGED = 1 - - # Signifies that this is used for External Managed HTTP(S) Load - # Balancing. - EXTERNAL_MANAGED = 2 - end - - # The format of communication supported by the extension. - module WireFormat - # Not specified. - WIRE_FORMAT_UNSPECIFIED = 0 - - # The extension service uses ext_proc gRPC API over a gRPC stream. This is - # the default value if the wire format is not specified. The backend service - # for the extension must use HTTP2 or H2C as the protocol. All - # `supported_events` for a client request are sent as part of the same - # gRPC stream. - EXT_PROC_GRPC = 1 - - # The extension service uses Envoy's `ext_authz` gRPC API. The backend - # service for the extension must use HTTP2 or H2C as the protocol. - # `EXT_AUTHZ_GRPC` is only supported for regional `AuthzExtension` resources. - EXT_AUTHZ_GRPC = 3 - end - - # The send mode for body processing. - module BodySendMode - # Default value. Do not use. - BODY_SEND_MODE_UNSPECIFIED = 0 - - # Calls to the extension are executed in the streamed mode. Subsequent - # chunks will be sent only after the previous chunks have been processed. - # - # The content of the body chunks is sent one way to the extension. Extension - # may send modified chunks back. - # - # This is the default value if the processing mode is not specified. - BODY_SEND_MODE_STREAMED = 1 - - # Calls are executed in the full duplex mode. Subsequent chunks will be sent - # for processing without waiting for the response for the previous chunk or - # for the response for `REQUEST_HEADERS` event. - # - # Extension can freely modify or chunk the body contents. If the extension - # doesn't send the body contents back, the next extension in the chain or the - # upstream will receive an empty body. - BODY_SEND_MODE_FULL_DUPLEX_STREAMED = 2 - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/endpoint_policy.rb b/owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/endpoint_policy.rb deleted file mode 100644 index b58fcb2f402a..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/endpoint_policy.rb +++ /dev/null @@ -1,205 +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 NetworkServices - module V1 - # EndpointPolicy is a resource that helps apply desired configuration - # on the endpoints that match specific criteria. - # For example, this resource can be used to apply "authentication config" - # an all endpoints that serve on port 8080. - # @!attribute [rw] name - # @return [::String] - # Identifier. Name of the EndpointPolicy resource. It matches pattern - # `projects/{project}/locations/*/endpointPolicies/{endpoint_policy}`. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The timestamp when the resource was created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The timestamp when the resource was updated. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. Set of label tags associated with the EndpointPolicy resource. - # @!attribute [rw] type - # @return [::Google::Cloud::NetworkServices::V1::EndpointPolicy::EndpointPolicyType] - # Required. The type of endpoint policy. This is primarily used to validate - # the configuration. - # @!attribute [rw] authorization_policy - # @return [::String] - # Optional. This field specifies the URL of AuthorizationPolicy resource that - # applies authorization policies to the inbound traffic at the - # matched endpoints. Refer to Authorization. If this field is not - # specified, authorization is disabled(no authz checks) for this - # endpoint. - # @!attribute [rw] endpoint_matcher - # @return [::Google::Cloud::NetworkServices::V1::EndpointMatcher] - # Required. A matcher that selects endpoints to which the policies should be - # applied. - # @!attribute [rw] traffic_port_selector - # @return [::Google::Cloud::NetworkServices::V1::TrafficPortSelector] - # Optional. Port selector for the (matched) endpoints. If no port selector is - # provided, the matched config is applied to all ports. - # @!attribute [rw] description - # @return [::String] - # Optional. A free-text description of the resource. Max length 1024 - # characters. - # @!attribute [rw] server_tls_policy - # @return [::String] - # Optional. A URL referring to ServerTlsPolicy resource. ServerTlsPolicy is - # used to determine the authentication policy to be applied to terminate the - # inbound traffic at the identified backends. If this field is not set, - # authentication is disabled(open) for this endpoint. - # @!attribute [rw] client_tls_policy - # @return [::String] - # Optional. A URL referring to a ClientTlsPolicy resource. ClientTlsPolicy - # can be set to specify the authentication for traffic from the proxy to the - # actual endpoints. More specifically, it is applied to the outgoing traffic - # from the proxy to the endpoint. This is typically used for sidecar model - # where the proxy identifies itself as endpoint to the control plane, with - # the connection between sidecar and endpoint requiring authentication. If - # this field is not set, authentication is disabled(open). Applicable only - # when EndpointPolicyType is SIDECAR_PROXY. - class EndpointPolicy - 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 - - # The type of endpoint policy. - module EndpointPolicyType - # Default value. Must not be used. - ENDPOINT_POLICY_TYPE_UNSPECIFIED = 0 - - # Represents a proxy deployed as a sidecar. - SIDECAR_PROXY = 1 - - # Represents a proxyless gRPC backend. - GRPC_SERVER = 2 - end - end - - # Request used with the ListEndpointPolicies method. - # @!attribute [rw] parent - # @return [::String] - # Required. The project and location from which the EndpointPolicies should - # be listed, specified in the format `projects/*/locations/*`. - # @!attribute [rw] page_size - # @return [::Integer] - # Maximum number of EndpointPolicies to return per call. - # @!attribute [rw] page_token - # @return [::String] - # The value returned by the last `ListEndpointPoliciesResponse` - # Indicates that this is a continuation of a prior - # `ListEndpointPolicies` call, and that the system should return the - # next page of data. - # @!attribute [rw] return_partial_success - # @return [::Boolean] - # Optional. If true, allow partial responses for multi-regional Aggregated - # List requests. Otherwise if one of the locations is down or unreachable, - # the Aggregated List request will fail. - class ListEndpointPoliciesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response returned by the ListEndpointPolicies method. - # @!attribute [rw] endpoint_policies - # @return [::Array<::Google::Cloud::NetworkServices::V1::EndpointPolicy>] - # List of EndpointPolicy resources. - # @!attribute [rw] next_page_token - # @return [::String] - # If there might be more results than those appearing in this response, then - # `next_page_token` is included. To get the next set of results, call this - # method again using the value of `next_page_token` as `page_token`. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Unreachable resources. Populated when the request opts into - # {::Google::Cloud::NetworkServices::V1::ListEndpointPoliciesRequest#return_partial_success return_partial_success} - # and reading across collections e.g. when - # attempting to list all resources across all supported locations. - class ListEndpointPoliciesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request used with the GetEndpointPolicy method. - # @!attribute [rw] name - # @return [::String] - # Required. A name of the EndpointPolicy to get. Must be in the format - # `projects/*/locations/*/endpointPolicies/*`. - class GetEndpointPolicyRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request used with the CreateEndpointPolicy method. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent resource of the EndpointPolicy. Must be in the - # format `projects/*/locations/*`. - # @!attribute [rw] endpoint_policy_id - # @return [::String] - # Required. Short name of the EndpointPolicy resource to be created. - # E.g. "CustomECS". - # @!attribute [rw] endpoint_policy - # @return [::Google::Cloud::NetworkServices::V1::EndpointPolicy] - # Required. EndpointPolicy resource to be created. - class CreateEndpointPolicyRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request used with the UpdateEndpointPolicy method. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Optional. Field mask is used to specify the fields to be overwritten in the - # EndpointPolicy resource by the update. - # The fields specified in the update_mask are relative to the resource, not - # the full request. A field will be overwritten if it is in the mask. If the - # user does not provide a mask then all fields will be overwritten. - # @!attribute [rw] endpoint_policy - # @return [::Google::Cloud::NetworkServices::V1::EndpointPolicy] - # Required. Updated EndpointPolicy resource. - class UpdateEndpointPolicyRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request used with the DeleteEndpointPolicy method. - # @!attribute [rw] name - # @return [::String] - # Required. A name of the EndpointPolicy to delete. Must be in the format - # `projects/*/locations/*/endpointPolicies/*`. - class DeleteEndpointPolicyRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/extensibility.rb b/owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/extensibility.rb deleted file mode 100644 index 28a43c60a318..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/extensibility.rb +++ /dev/null @@ -1,575 +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 NetworkServices - module V1 - # `WasmPlugin` is a resource representing a service executing - # a customer-provided Wasm module. - # @!attribute [rw] name - # @return [::String] - # Identifier. Name of the `WasmPlugin` resource in the following format: - # `projects/{project}/locations/{location}/wasmPlugins/{wasm_plugin}`. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The timestamp when the resource was created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The timestamp when the resource was updated. - # @!attribute [rw] description - # @return [::String] - # Optional. A human-readable description of the resource. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. Set of labels associated with the `WasmPlugin` resource. - # - # The format must comply with [the following - # requirements](/compute/docs/labeling-resources#requirements). - # @!attribute [rw] main_version_id - # @return [::String] - # Optional. The ID of the `WasmPluginVersion` resource that is the - # currently serving one. The version referred to must be a child of this - # `WasmPlugin` resource. - # @!attribute [rw] log_config - # @return [::Google::Cloud::NetworkServices::V1::WasmPlugin::LogConfig] - # Optional. Specifies the logging options for the activity performed by this - # plugin. If logging is enabled, plugin logs are exported to - # Cloud Logging. - # Note that the settings relate to the logs generated by using - # logging statements in your Wasm code. - # @!attribute [rw] versions - # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::NetworkServices::V1::WasmPlugin::VersionDetails}] - # Optional. All versions of this `WasmPlugin` resource in the key-value - # format. The key is the resource ID, and the value is the `VersionDetails` - # object. - # - # Lets you create or update a `WasmPlugin` resource and its versions in a - # single request. When the `main_version_id` field is not empty, it must - # point to one of the `VersionDetails` objects in the map. - # - # If provided in a `PATCH` request, the new versions replace the - # previous set. Any version omitted from the `versions` field is removed. - # Because the `WasmPluginVersion` resource is immutable, if a - # `WasmPluginVersion` resource with the same name already exists and differs, - # the request fails. - # - # Note: In a `GET` request, this field is populated only if the field - # `GetWasmPluginRequest.view` is set to `WASM_PLUGIN_VIEW_FULL`. - # @!attribute [r] used_by - # @return [::Array<::Google::Cloud::NetworkServices::V1::WasmPlugin::UsedBy>] - # Output only. List of all - # [extensions](https://cloud.google.com/service-extensions/docs/overview) - # that use this `WasmPlugin` resource. - class WasmPlugin - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Details of a `WasmPluginVersion` resource to be inlined in the - # `WasmPlugin` resource. - # @!attribute [rw] plugin_config_data - # @return [::String] - # Configuration for the plugin. - # The configuration is provided to the plugin at runtime through - # the `ON_CONFIGURE` callback. When a new - # `WasmPluginVersion` version is created, the digest of the - # contents is saved in the `plugin_config_digest` field. - # - # Note: The following fields are mutually exclusive: `plugin_config_data`, `plugin_config_uri`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] plugin_config_uri - # @return [::String] - # URI of the plugin configuration stored in the Artifact Registry. - # The configuration is provided to the plugin at runtime through - # the `ON_CONFIGURE` callback. - # - # The URI can refer to one of the following repository formats: - # - # * Container images: the `plugin_config_uri` must point to a container - # that contains a single file with the name `plugin.config`. - # When a new `WasmPluginVersion` resource is created, the digest of the - # image is saved in the `plugin_config_digest` field. - # When pulling a container image from Artifact Registry, the digest - # value is used instead of an image tag. - # - # * Generic artifacts: the `plugin_config_uri` must be in this format: - # `projects/{project}/locations/{location}/repositories/{repository}/ - # genericArtifacts/\\{package}:\\{version}`. - # The specified package and version must contain a file with the name - # `plugin.config`. When a new `WasmPluginVersion` resource is - # created, the checksum of the contents of the file is saved in the - # `plugin_config_digest` field. - # - # Note: The following fields are mutually exclusive: `plugin_config_uri`, `plugin_config_data`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The timestamp when the resource was created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The timestamp when the resource was updated. - # @!attribute [rw] description - # @return [::String] - # Optional. A human-readable description of the resource. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. Set of labels associated with the `WasmPluginVersion` - # resource. - # @!attribute [rw] image_uri - # @return [::String] - # Optional. URI of the image containing the Wasm module, stored in - # Artifact Registry. - # - # The URI can refer to one of the following repository formats: - # - # * Container images: the `image_uri` must point to a container that - # contains a single file with the name `plugin.wasm`. - # When a new `WasmPluginVersion` resource is created, the digest of the - # image is saved in the `image_digest` field. - # When pulling a container image from Artifact Registry, the digest value - # is used instead of an image tag. - # - # * Generic artifacts: the `image_uri` must be in this format: - # `projects/{project}/locations/{location}/repositories/{repository}/ - # genericArtifacts/\\{package}:\\{version}`. - # The specified package and version must contain a file with the name - # `plugin.wasm`. When a new `WasmPluginVersion` resource is created, the - # checksum of the contents of the file is saved in the `image_digest` - # field. - # @!attribute [r] image_digest - # @return [::String] - # Output only. This field holds the digest (usually checksum) value for the - # plugin image. The value is calculated based on the `image_uri` field. If - # the `image_uri` field refers to a container image, the digest value is - # obtained from the container image. If the `image_uri` field refers to - # a generic artifact, the digest value is calculated based on the - # contents of the file. - # @!attribute [r] plugin_config_digest - # @return [::String] - # Output only. This field holds the digest (usually checksum) value for the - # plugin configuration. The value is calculated based on the contents of - # `plugin_config_data` field or the image defined by the - # `plugin_config_uri` field. - class VersionDetails - 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 - - # Specifies the logging options for the activity performed by this - # plugin. If logging is enabled, plugin logs are exported to - # Cloud Logging. - # @!attribute [rw] enable - # @return [::Boolean] - # Optional. Specifies whether to enable logging for activity by this - # plugin. - # - # Defaults to `false`. - # @!attribute [rw] sample_rate - # @return [::Float] - # Non-empty default. Configures the sampling rate of activity logs, where - # `1.0` means all logged activity is reported and `0.0` means no activity - # is reported. A floating point value between `0.0` and `1.0` indicates - # that a percentage of log messages is stored. - # - # The default value when logging is enabled is `1.0`. The value of the - # field must be between `0` and `1` (inclusive). - # - # This field can be specified only if logging is enabled for this plugin. - # @!attribute [rw] min_log_level - # @return [::Google::Cloud::NetworkServices::V1::WasmPlugin::LogConfig::LogLevel] - # Non-empty default. Specifies the lowest level of the plugin logs that are - # exported to Cloud Logging. This setting relates to the logs generated by - # using logging statements in your Wasm code. - # - # This field is can be set only if logging is enabled for the plugin. - # - # If the field is not provided when logging is enabled, it is set to - # `INFO` by default. - class LogConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Possible values to specify the lowest level of logs to be exported to - # Cloud Logging. - module LogLevel - # Unspecified value. Defaults to `LogLevel.INFO`. - LOG_LEVEL_UNSPECIFIED = 0 - - # Report logs with TRACE level and above. - TRACE = 1 - - # Report logs with DEBUG level and above. - DEBUG = 2 - - # Report logs with INFO level and above. - INFO = 3 - - # Report logs with WARN level and above. - WARN = 4 - - # Report logs with ERROR level and above. - ERROR = 5 - - # Report logs with CRITICAL level only. - CRITICAL = 6 - end - end - - # Defines a resource that uses the `WasmPlugin` resource. - # @!attribute [r] name - # @return [::String] - # Output only. Full name of the resource - # https://google.aip.dev/122#full-resource-names, for example - # `//networkservices.googleapis.com/projects/{project}/locations/{location}/lbRouteExtensions/{extension}` - class UsedBy - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class LabelsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::Google::Cloud::NetworkServices::V1::WasmPlugin::VersionDetails] - class VersionsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # A single immutable version of a `WasmPlugin` resource. - # Defines the Wasm module used and optionally its runtime config. - # @!attribute [rw] plugin_config_data - # @return [::String] - # Configuration for the plugin. - # The configuration is provided to the plugin at runtime through - # the `ON_CONFIGURE` callback. When a new - # `WasmPluginVersion` resource is created, the digest of the - # contents is saved in the `plugin_config_digest` field. - # - # Note: The following fields are mutually exclusive: `plugin_config_data`, `plugin_config_uri`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] plugin_config_uri - # @return [::String] - # URI of the plugin configuration stored in the Artifact Registry. - # The configuration is provided to the plugin at runtime through - # the `ON_CONFIGURE` callback. - # - # The URI can refer to one of the following repository formats: - # - # * Container images: the `plugin_config_uri` must point to a container - # that contains a single file with the name `plugin.config`. - # When a new `WasmPluginVersion` resource is created, the digest of the - # image is saved in the `plugin_config_digest` field. - # When pulling a container image from Artifact Registry, the digest - # value is used instead of an image tag. - # - # * Generic artifacts: the `plugin_config_uri` must be in this format: - # `projects/{project}/locations/{location}/repositories/{repository}/ - # genericArtifacts/\\{package}:\\{version}`. - # The specified package and version must contain a file with the name - # `plugin.config`. When a new `WasmPluginVersion` resource is - # created, the checksum of the contents of the file is saved in the - # `plugin_config_digest` field. - # - # Note: The following fields are mutually exclusive: `plugin_config_uri`, `plugin_config_data`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] name - # @return [::String] - # Identifier. Name of the `WasmPluginVersion` resource in the following - # format: `projects/{project}/locations/{location}/wasmPlugins/{wasm_plugin}/ - # versions/\\{wasm_plugin_version}`. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The timestamp when the resource was created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The timestamp when the resource was updated. - # @!attribute [rw] description - # @return [::String] - # Optional. A human-readable description of the resource. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. Set of labels associated with the `WasmPluginVersion` - # resource. - # @!attribute [rw] image_uri - # @return [::String] - # Optional. URI of the image containing the Wasm module, stored in - # Artifact Registry. - # - # The URI can refer to one of the following repository formats: - # - # * Container images: the `image_uri` must point to a container that - # contains a single file with the name `plugin.wasm`. - # When a new `WasmPluginVersion` resource is created, the digest of the - # image is saved in the `image_digest` field. - # When pulling a container image from Artifact Registry, the digest value - # is used instead of an image tag. - # - # * Generic artifacts: the `image_uri` must be in this format: - # `projects/{project}/locations/{location}/repositories/{repository}/ - # genericArtifacts/\\{package}:\\{version}`. - # The specified package and version must contain a file with the name - # `plugin.wasm`. When a new `WasmPluginVersion` resource is created, the - # checksum of the contents of the file is saved in the `image_digest` - # field. - # @!attribute [r] image_digest - # @return [::String] - # Output only. This field holds the digest (usually checksum) value for the - # plugin image. The value is calculated based on the `image_uri` field. If - # the `image_uri` field refers to a container image, the digest value is - # obtained from the container image. If the `image_uri` field refers to - # a generic artifact, the digest value is calculated based on the - # contents of the file. - # @!attribute [r] plugin_config_digest - # @return [::String] - # Output only. This field holds the digest (usually checksum) value for the - # plugin configuration. The value is calculated based on the contents of - # `plugin_config_data` field or the image defined by the - # `plugin_config_uri` field. - class WasmPluginVersion - 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 - - # Request used with the `ListWasmPlugins` method. - # @!attribute [rw] parent - # @return [::String] - # Required. The project and location from which the `WasmPlugin` resources - # are listed, specified in the following format: - # `projects/{project}/locations/global`. - # @!attribute [rw] page_size - # @return [::Integer] - # Maximum number of `WasmPlugin` resources to return per call. - # If not specified, at most 50 `WasmPlugin` resources are returned. - # The maximum value is 1000; values above 1000 are coerced to 1000. - # @!attribute [rw] page_token - # @return [::String] - # The value returned by the last `ListWasmPluginsResponse` call. - # Indicates that this is a continuation of a prior - # `ListWasmPlugins` call, and that the - # next page of data is to be returned. - class ListWasmPluginsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response returned by the `ListWasmPlugins` method. - # @!attribute [rw] wasm_plugins - # @return [::Array<::Google::Cloud::NetworkServices::V1::WasmPlugin>] - # List of `WasmPlugin` resources. - # @!attribute [rw] next_page_token - # @return [::String] - # If there might be more results than those appearing in this response, then - # `next_page_token` is included. To get the next set of results, - # call this method again using the value of `next_page_token` as - # `page_token`. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Unreachable resources. Populated when the request attempts to list all - # resources across all supported locations, while some locations are - # temporarily unavailable. - class ListWasmPluginsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request used by the `GetWasmPlugin` method. - # @!attribute [rw] name - # @return [::String] - # Required. A name of the `WasmPlugin` resource to get. Must be in the - # format `projects/{project}/locations/global/wasmPlugins/{wasm_plugin}`. - # @!attribute [rw] view - # @return [::Google::Cloud::NetworkServices::V1::WasmPluginView] - # Determines how much data must be returned in the response. See - # [AIP-157](https://google.aip.dev/157). - class GetWasmPluginRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request used by the `CreateWasmPlugin` method. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent resource of the `WasmPlugin` resource. Must be in the - # format `projects/{project}/locations/global`. - # @!attribute [rw] wasm_plugin_id - # @return [::String] - # Required. User-provided ID of the `WasmPlugin` resource to be created. - # @!attribute [rw] wasm_plugin - # @return [::Google::Cloud::NetworkServices::V1::WasmPlugin] - # Required. `WasmPlugin` resource to be created. - class CreateWasmPluginRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request used by the `UpdateWasmPlugin` method. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Optional. Used to specify the fields to be overwritten in the - # `WasmPlugin` resource by the update. - # The fields specified in the `update_mask` field are relative to the - # resource, not the full request. - # An omitted `update_mask` field is treated as an implied `update_mask` - # field equivalent to all fields that are populated (that have a non-empty - # value). - # The `update_mask` field supports a special value `*`, which means that - # each field in the given `WasmPlugin` resource (including the empty ones) - # replaces the current value. - # @!attribute [rw] wasm_plugin - # @return [::Google::Cloud::NetworkServices::V1::WasmPlugin] - # Required. Updated `WasmPlugin` resource. - class UpdateWasmPluginRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request used by the `DeleteWasmPlugin` method. - # @!attribute [rw] name - # @return [::String] - # Required. A name of the `WasmPlugin` resource to delete. Must be in the - # format `projects/{project}/locations/global/wasmPlugins/{wasm_plugin}`. - class DeleteWasmPluginRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request used with the `ListWasmPluginVersions` method. - # @!attribute [rw] parent - # @return [::String] - # Required. The `WasmPlugin` resource whose `WasmPluginVersion`s - # are listed, specified in the following format: - # `projects/{project}/locations/global/wasmPlugins/{wasm_plugin}`. - # @!attribute [rw] page_size - # @return [::Integer] - # Maximum number of `WasmPluginVersion` resources to return per - # call. If not specified, at most 50 `WasmPluginVersion` resources are - # returned. The maximum value is 1000; values above 1000 are coerced to - # 1000. - # @!attribute [rw] page_token - # @return [::String] - # The value returned by the last `ListWasmPluginVersionsResponse` call. - # Indicates that this is a continuation of a prior - # `ListWasmPluginVersions` call, and that the - # next page of data is to be returned. - class ListWasmPluginVersionsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response returned by the `ListWasmPluginVersions` method. - # @!attribute [rw] wasm_plugin_versions - # @return [::Array<::Google::Cloud::NetworkServices::V1::WasmPluginVersion>] - # List of `WasmPluginVersion` resources. - # @!attribute [rw] next_page_token - # @return [::String] - # If there might be more results than those appearing in this response, then - # `next_page_token` is included. To get the next set of results, - # call this method again using the value of `next_page_token` as - # `page_token`. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Unreachable resources. Populated when the request attempts to list all - # resources across all supported locations, while some locations are - # temporarily unavailable. - class ListWasmPluginVersionsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request used by the `GetWasmPluginVersion` method. - # @!attribute [rw] name - # @return [::String] - # Required. A name of the `WasmPluginVersion` resource to get. Must be in - # the format - # `projects/{project}/locations/global/wasmPlugins/{wasm_plugin}/versions/{wasm_plugin_version}`. - class GetWasmPluginVersionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request used by the `CreateWasmPluginVersion` method. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent resource of the `WasmPluginVersion` resource. Must be - # in the format - # `projects/{project}/locations/global/wasmPlugins/{wasm_plugin}`. - # @!attribute [rw] wasm_plugin_version_id - # @return [::String] - # Required. User-provided ID of the `WasmPluginVersion` resource to be - # created. - # @!attribute [rw] wasm_plugin_version - # @return [::Google::Cloud::NetworkServices::V1::WasmPluginVersion] - # Required. `WasmPluginVersion` resource to be created. - class CreateWasmPluginVersionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request used by the `DeleteWasmPluginVersion` method. - # @!attribute [rw] name - # @return [::String] - # Required. A name of the `WasmPluginVersion` resource to delete. Must be in - # the format - # `projects/{project}/locations/global/wasmPlugins/{wasm_plugin}/versions/{wasm_plugin_version}`. - class DeleteWasmPluginVersionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Determines the information that should be returned by the server. - module WasmPluginView - # Unspecified value. Do not use. - WASM_PLUGIN_VIEW_UNSPECIFIED = 0 - - # If specified in the `GET` request for a `WasmPlugin` resource, the server's - # response includes just the `WasmPlugin` resource. - WASM_PLUGIN_VIEW_BASIC = 1 - - # If specified in the `GET` request for a `WasmPlugin` resource, the server's - # response includes the `WasmPlugin` resource with all its versions. - WASM_PLUGIN_VIEW_FULL = 2 - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/gateway.rb b/owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/gateway.rb deleted file mode 100644 index 5128a5599c3c..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/gateway.rb +++ /dev/null @@ -1,285 +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 NetworkServices - module V1 - # Gateway represents the configuration for a proxy, typically a load balancer. - # It captures the ip:port over which the services are exposed by the proxy, - # along with any policy configurations. Routes have reference to to Gateways to - # dictate how requests should be routed by this Gateway. - # @!attribute [rw] name - # @return [::String] - # Identifier. Name of the Gateway resource. It matches pattern - # `projects/*/locations/*/gateways/`. - # @!attribute [r] self_link - # @return [::String] - # Output only. Server-defined URL of this resource - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The timestamp when the resource was created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The timestamp when the resource was updated. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. Set of label tags associated with the Gateway resource. - # @!attribute [rw] description - # @return [::String] - # Optional. A free-text description of the resource. Max length 1024 - # characters. - # @!attribute [rw] type - # @return [::Google::Cloud::NetworkServices::V1::Gateway::Type] - # Immutable. The type of the customer managed gateway. - # This field is required. If unspecified, an error is returned. - # @!attribute [rw] addresses - # @return [::Array<::String>] - # Optional. Zero or one IPv4 or IPv6 address on which the Gateway will - # receive the traffic. When no address is provided, an IP from the subnetwork - # is allocated - # - # This field only applies to gateways of type 'SECURE_WEB_GATEWAY'. - # Gateways of type 'OPEN_MESH' listen on 0.0.0.0 for IPv4 and :: for IPv6. - # @!attribute [rw] ports - # @return [::Array<::Integer>] - # Required. One or more port numbers (1-65535), on which the Gateway will - # receive traffic. The proxy binds to the specified ports. - # Gateways of type 'SECURE_WEB_GATEWAY' are limited to 5 ports. - # Gateways of type 'OPEN_MESH' listen on 0.0.0.0 for IPv4 and :: for IPv6 and - # support multiple ports. - # @!attribute [rw] all_ports - # @return [::Boolean] - # Optional. If true, the Gateway will listen on all ports. This is mutually - # exclusive with the `ports` field. This field only applies to gateways of - # type 'SECURE_WEB_GATEWAY'. - # @!attribute [rw] scope - # @return [::String] - # Optional. Scope determines how configuration across multiple Gateway - # instances are merged. The configuration for multiple Gateway instances with - # the same scope will be merged as presented as a single configuration to the - # proxy/load balancer. - # - # Max length 64 characters. - # Scope should start with a letter and can only have letters, numbers, - # hyphens. - # @!attribute [rw] server_tls_policy - # @return [::String] - # Optional. A fully-qualified ServerTLSPolicy URL reference. Specifies how - # TLS traffic is terminated. If empty, TLS termination is disabled. - # @!attribute [rw] certificate_urls - # @return [::Array<::String>] - # Optional. A fully-qualified Certificates URL reference. The proxy presents - # a Certificate (selected based on SNI) when establishing a TLS connection. - # This feature only applies to gateways of type 'SECURE_WEB_GATEWAY'. - # @!attribute [rw] gateway_security_policy - # @return [::String] - # Optional. A fully-qualified GatewaySecurityPolicy URL reference. - # Defines how a server should apply security policy to inbound - # (VM to Proxy) initiated connections. - # - # For example: - # `projects/*/locations/*/gatewaySecurityPolicies/swg-policy`. - # - # This policy is specific to gateways of type 'SECURE_WEB_GATEWAY'. - # @!attribute [rw] network - # @return [::String] - # Optional. The relative resource name identifying the VPC network that is - # using this configuration. For example: - # `projects/*/global/networks/network-1`. - # - # Currently, this field is specific to gateways of type 'SECURE_WEB_GATEWAY'. - # @!attribute [rw] subnetwork - # @return [::String] - # Optional. The relative resource name identifying the subnetwork in which - # this SWG is allocated. For example: - # `projects/*/regions/us-central1/subnetworks/network-1` - # - # Currently, this field is specific to gateways of type 'SECURE_WEB_GATEWAY". - # @!attribute [rw] ip_version - # @return [::Google::Cloud::NetworkServices::V1::Gateway::IpVersion] - # Optional. The IP Version that will be used by this gateway. Valid options - # are IPV4 or IPV6. Default is IPV4. - # @!attribute [rw] envoy_headers - # @return [::Google::Cloud::NetworkServices::V1::EnvoyHeaders] - # Optional. Determines if envoy will insert internal debug headers into - # upstream requests. Other Envoy headers may still be injected. By default, - # envoy will not insert any debug headers. - # @!attribute [rw] routing_mode - # @return [::Google::Cloud::NetworkServices::V1::Gateway::RoutingMode] - # Optional. The routing mode of the Gateway. - # This field is configurable only for gateways of type SECURE_WEB_GATEWAY. - # This field is required for gateways of type SECURE_WEB_GATEWAY. - # @!attribute [rw] allow_global_access - # @return [::Boolean] - # Optional. If true, the gateway will allow traffic from clients outside of - # the region where the gateway is located. - # This field is configurable only for gateways of type SECURE_WEB_GATEWAY. - class Gateway - 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 - - # The type of the customer-managed gateway. - # Possible values are: - # * OPEN_MESH - # * SECURE_WEB_GATEWAY - module Type - # The type of the customer managed gateway is unspecified. - TYPE_UNSPECIFIED = 0 - - # The type of the customer managed gateway is TrafficDirector Open - # Mesh. - OPEN_MESH = 1 - - # The type of the customer managed gateway is SecureWebGateway (SWG). - SECURE_WEB_GATEWAY = 2 - end - - # The types of IP version for the gateway. - # Possible values are: - # * IPV4 - # * IPV6 - module IpVersion - # The type when IP version is not specified. Defaults to IPV4. - IP_VERSION_UNSPECIFIED = 0 - - # The type for IP version 4. - IPV4 = 1 - - # The type for IP version 6. - IPV6 = 2 - end - - # The routing mode of the Gateway, to determine how the Gateway routes - # traffic. Today, this field only applies to Gateways of type - # SECURE_WEB_GATEWAY. Possible values are: - # * EXPLICIT_ROUTING_MODE - # * NEXT_HOP_ROUTING_MODE - module RoutingMode - # The routing mode is explicit; clients are configured to send - # traffic through the gateway. This is the default routing mode. - EXPLICIT_ROUTING_MODE = 0 - - # The routing mode is next-hop. Clients are unaware of the gateway, - # and a route (advanced route or other route type) - # can be configured to direct traffic from client to gateway. - # The gateway then acts as a next-hop to the destination. - NEXT_HOP_ROUTING_MODE = 1 - end - end - - # Request used with the ListGateways method. - # @!attribute [rw] parent - # @return [::String] - # Required. The project and location from which the Gateways should be - # listed, specified in the format `projects/*/locations/*`. - # @!attribute [rw] page_size - # @return [::Integer] - # Maximum number of Gateways to return per call. - # @!attribute [rw] page_token - # @return [::String] - # The value returned by the last `ListGatewaysResponse` - # Indicates that this is a continuation of a prior `ListGateways` call, - # and that the system should return the next page of data. - class ListGatewaysRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response returned by the ListGateways method. - # @!attribute [rw] gateways - # @return [::Array<::Google::Cloud::NetworkServices::V1::Gateway>] - # List of Gateway resources. - # @!attribute [rw] next_page_token - # @return [::String] - # If there might be more results than those appearing in this response, then - # `next_page_token` is included. To get the next set of results, call this - # method again using the value of `next_page_token` as `page_token`. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Locations that could not be reached. - class ListGatewaysResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request used by the GetGateway method. - # @!attribute [rw] name - # @return [::String] - # Required. A name of the Gateway to get. Must be in the format - # `projects/*/locations/*/gateways/*`. - class GetGatewayRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request used by the CreateGateway method. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent resource of the Gateway. Must be in the - # format `projects/*/locations/*`. - # @!attribute [rw] gateway_id - # @return [::String] - # Required. Short name of the Gateway resource to be created. - # @!attribute [rw] gateway - # @return [::Google::Cloud::NetworkServices::V1::Gateway] - # Required. Gateway resource to be created. - class CreateGatewayRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request used by the UpdateGateway method. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Optional. Field mask is used to specify the fields to be overwritten in the - # Gateway resource by the update. - # The fields specified in the update_mask are relative to the resource, not - # the full request. A field will be overwritten if it is in the mask. If the - # user does not provide a mask then all fields will be overwritten. - # @!attribute [rw] gateway - # @return [::Google::Cloud::NetworkServices::V1::Gateway] - # Required. Updated Gateway resource. - class UpdateGatewayRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request used by the DeleteGateway method. - # @!attribute [rw] name - # @return [::String] - # Required. A name of the Gateway to delete. Must be in the format - # `projects/*/locations/*/gateways/*`. - class DeleteGatewayRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/grpc_route.rb b/owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/grpc_route.rb deleted file mode 100644 index a90b494733c7..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/grpc_route.rb +++ /dev/null @@ -1,474 +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 NetworkServices - module V1 - # GrpcRoute is the resource defining how gRPC traffic routed by a Mesh - # or Gateway resource is routed. - # @!attribute [rw] name - # @return [::String] - # Identifier. Name of the GrpcRoute resource. It matches pattern - # `projects/*/locations/*/grpcRoutes/` - # @!attribute [r] self_link - # @return [::String] - # Output only. Server-defined URL of this resource - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The timestamp when the resource was created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The timestamp when the resource was updated. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. Set of label tags associated with the GrpcRoute resource. - # @!attribute [rw] description - # @return [::String] - # Optional. A free-text description of the resource. Max length 1024 - # characters. - # @!attribute [rw] hostnames - # @return [::Array<::String>] - # Required. Service hostnames with an optional port for which this route - # describes traffic. - # - # Format: [:] - # - # Hostname is the fully qualified domain name of a network host. This matches - # the RFC 1123 definition of a hostname with 2 notable exceptions: - # - IPs are not allowed. - # - A hostname may be prefixed with a wildcard label (`*.`). The wildcard - # label must appear by itself as the first label. - # - # Hostname can be "precise" which is a domain name without the terminating - # dot of a network host (e.g. `foo.example.com`) or "wildcard", which is a - # domain name prefixed with a single wildcard label (e.g. `*.example.com`). - # - # Note that as per RFC1035 and RFC1123, a label must consist of lower case - # alphanumeric characters or '-', and must start and end with an alphanumeric - # character. No other punctuation is allowed. - # - # The routes associated with a Mesh or Gateway must have unique hostnames. If - # you attempt to attach multiple routes with conflicting hostnames, the - # configuration will be rejected. - # - # For example, while it is acceptable for routes for the hostnames - # `*.foo.bar.com` and `*.bar.com` to be associated with the same route, it is - # not possible to associate two routes both with `*.bar.com` or both with - # `bar.com`. - # - # If a port is specified, then gRPC clients must use the channel URI with the - # port to match this rule (i.e. "xds:///service:123"), otherwise they must - # supply the URI without a port (i.e. "xds:///service"). - # @!attribute [rw] meshes - # @return [::Array<::String>] - # Optional. Meshes defines a list of meshes this GrpcRoute is attached to, as - # one of the routing rules to route the requests served by the mesh. - # - # Each mesh reference should match the pattern: - # `projects/*/locations/*/meshes/` - # @!attribute [rw] gateways - # @return [::Array<::String>] - # Optional. Gateways defines a list of gateways this GrpcRoute is attached - # to, as one of the routing rules to route the requests served by the - # gateway. - # - # Each gateway reference should match the pattern: - # `projects/*/locations/*/gateways/` - # @!attribute [rw] rules - # @return [::Array<::Google::Cloud::NetworkServices::V1::GrpcRoute::RouteRule>] - # Required. A list of detailed rules defining how to route traffic. - # - # Within a single GrpcRoute, the GrpcRoute.RouteAction associated with the - # first matching GrpcRoute.RouteRule will be executed. At least one rule - # must be supplied. - class GrpcRoute - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Specifies a match against a method. - # @!attribute [rw] type - # @return [::Google::Cloud::NetworkServices::V1::GrpcRoute::MethodMatch::Type] - # Optional. Specifies how to match against the name. If not specified, a - # default value of "EXACT" is used. - # @!attribute [rw] grpc_service - # @return [::String] - # Required. Name of the service to match against. If unspecified, will - # match all services. - # @!attribute [rw] grpc_method - # @return [::String] - # Required. Name of the method to match against. If unspecified, will match - # all methods. - # @!attribute [rw] case_sensitive - # @return [::Boolean] - # Optional. Specifies that matches are case sensitive. The default value - # is true. case_sensitive must not be used with a type of - # REGULAR_EXPRESSION. - class MethodMatch - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The type of the match. - module Type - # Unspecified. - TYPE_UNSPECIFIED = 0 - - # Will only match the exact name provided. - EXACT = 1 - - # Will interpret grpc_method and grpc_service as regexes. RE2 syntax is - # supported. - REGULAR_EXPRESSION = 2 - end - end - - # A match against a collection of headers. - # @!attribute [rw] type - # @return [::Google::Cloud::NetworkServices::V1::GrpcRoute::HeaderMatch::Type] - # Optional. Specifies how to match against the value of the header. If not - # specified, a default value of EXACT is used. - # @!attribute [rw] key - # @return [::String] - # Required. The key of the header. - # @!attribute [rw] value - # @return [::String] - # Required. The value of the header. - class HeaderMatch - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The type of match. - module Type - # Unspecified. - TYPE_UNSPECIFIED = 0 - - # Will only match the exact value provided. - EXACT = 1 - - # Will match paths conforming to the prefix specified by value. RE2 - # syntax is supported. - REGULAR_EXPRESSION = 2 - end - end - - # Criteria for matching traffic. A RouteMatch will be considered to match - # when all supplied fields match. - # @!attribute [rw] method - # @return [::Google::Cloud::NetworkServices::V1::GrpcRoute::MethodMatch] - # Optional. A gRPC method to match against. If this field is empty or - # omitted, will match all methods. - # @!attribute [rw] headers - # @return [::Array<::Google::Cloud::NetworkServices::V1::GrpcRoute::HeaderMatch>] - # Optional. Specifies a collection of headers to match. - class RouteMatch - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The destination to which traffic will be routed. - # @!attribute [rw] service_name - # @return [::String] - # Required. The URL of a destination service to which to route traffic. - # Must refer to either a BackendService or ServiceDirectoryService. - # @!attribute [rw] weight - # @return [::Integer] - # Optional. Specifies the proportion of requests forwarded to the backend - # referenced by the serviceName field. This is computed as: - # - weight/Sum(weights in this destination list). - # For non-zero values, there may be some epsilon from the exact proportion - # defined here depending on the precision an implementation supports. - # - # If only one serviceName is specified and it has a weight greater than 0, - # 100% of the traffic is forwarded to that backend. - # - # If weights are specified for any one service name, they need to be - # specified for all of them. - # - # If weights are unspecified for all services, then, traffic is distributed - # in equal proportions to all of them. - class Destination - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The specification for fault injection introduced into traffic to test the - # resiliency of clients to destination service failure. As part of fault - # injection, when clients send requests to a destination, delays can be - # introduced on a percentage of requests before sending those requests to the - # destination service. Similarly requests from clients can be aborted by for - # a percentage of requests. - # @!attribute [rw] delay - # @return [::Google::Cloud::NetworkServices::V1::GrpcRoute::FaultInjectionPolicy::Delay] - # The specification for injecting delay to client requests. - # @!attribute [rw] abort - # @return [::Google::Cloud::NetworkServices::V1::GrpcRoute::FaultInjectionPolicy::Abort] - # The specification for aborting to client requests. - class FaultInjectionPolicy - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Specification of how client requests are delayed as part of fault - # injection before being sent to a destination. - # @!attribute [rw] fixed_delay - # @return [::Google::Protobuf::Duration] - # Specify a fixed delay before forwarding the request. - # @!attribute [rw] percentage - # @return [::Integer] - # The percentage of traffic on which delay will be injected. - # - # The value must be between [0, 100] - class Delay - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Specification of how client requests are aborted as part of fault - # injection before being sent to a destination. - # @!attribute [rw] http_status - # @return [::Integer] - # The HTTP status code used to abort the request. - # - # The value must be between 200 and 599 inclusive. - # @!attribute [rw] percentage - # @return [::Integer] - # The percentage of traffic which will be aborted. - # - # The value must be between [0, 100] - class Abort - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # The specification for cookie-based stateful session affinity where the - # date plane supplies a “session cookie” with the name "GSSA" which encodes - # a specific destination host and each request containing that cookie will - # be directed to that host as long as the destination host remains up and - # healthy. - # - # The gRPC proxyless mesh library or sidecar proxy will manage the session - # cookie but the client application code is responsible for copying the - # cookie from each RPC in the session to the next. - # @!attribute [rw] cookie_ttl - # @return [::Google::Protobuf::Duration] - # Required. The cookie TTL value for the Set-Cookie header generated by the - # data plane. The lifetime of the cookie may be set to a value from 0 to - # 86400 seconds (24 hours) inclusive. - # - # Set this to 0s to use a session cookie and disable cookie expiration. - class StatefulSessionAffinityPolicy - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The specifications for retries. - # Specifies one or more conditions for which this retry rule applies. Valid - # values are: - # @!attribute [rw] retry_conditions - # @return [::Array<::String>] - # - connect-failure: Router will retry on failures connecting to Backend - # Services, for example due to connection timeouts. - # - refused-stream: Router will retry if the backend service resets the - # stream - # with a REFUSED_STREAM error code. This reset type indicates that it is - # safe to retry. - # - cancelled: Router will retry if the gRPC status code in the response - # header - # is set to cancelled - # - deadline-exceeded: Router will retry if the gRPC status code in the - # response - # header is set to deadline-exceeded - # - resource-exhausted: Router will retry if the gRPC status code in the - # response header is set to resource-exhausted - # - unavailable: Router will retry if the gRPC status code in the response - # header is set to unavailable - # @!attribute [rw] num_retries - # @return [::Integer] - # Specifies the allowed number of retries. This number must be > 0. If not - # specified, default to 1. - class RetryPolicy - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Specifies how to route matched traffic. - # @!attribute [rw] destinations - # @return [::Array<::Google::Cloud::NetworkServices::V1::GrpcRoute::Destination>] - # Optional. The destination services to which traffic should be forwarded. - # If multiple destinations are specified, traffic will be split between - # Backend Service(s) according to the weight field of these destinations. - # @!attribute [rw] fault_injection_policy - # @return [::Google::Cloud::NetworkServices::V1::GrpcRoute::FaultInjectionPolicy] - # Optional. The specification for fault injection introduced into traffic - # to test the resiliency of clients to destination service failure. As part - # of fault injection, when clients send requests to a destination, delays - # can be introduced on a percentage of requests before sending those - # requests to the destination service. Similarly requests from clients can - # be aborted by for a percentage of requests. - # - # timeout and retry_policy will be ignored by clients that are configured - # with a fault_injection_policy - # @!attribute [rw] timeout - # @return [::Google::Protobuf::Duration] - # Optional. Specifies the timeout for selected route. Timeout is computed - # from the time the request has been fully processed (i.e. end of stream) - # up until the response has been completely processed. Timeout includes all - # retries. - # @!attribute [rw] retry_policy - # @return [::Google::Cloud::NetworkServices::V1::GrpcRoute::RetryPolicy] - # Optional. Specifies the retry policy associated with this route. - # @!attribute [rw] stateful_session_affinity - # @return [::Google::Cloud::NetworkServices::V1::GrpcRoute::StatefulSessionAffinityPolicy] - # Optional. Specifies cookie-based stateful session affinity. - # @!attribute [rw] idle_timeout - # @return [::Google::Protobuf::Duration] - # Optional. Specifies the idle timeout for the selected route. The idle - # timeout is defined as the period in which there are no bytes sent or - # received on either the upstream or downstream connection. If not set, the - # default idle timeout is 1 hour. If set to 0s, the timeout will be - # disabled. - class RouteAction - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Describes how to route traffic. - # @!attribute [rw] matches - # @return [::Array<::Google::Cloud::NetworkServices::V1::GrpcRoute::RouteMatch>] - # Optional. Matches define conditions used for matching the rule against - # incoming gRPC requests. Each match is independent, i.e. this rule will be - # matched if ANY one of the matches is satisfied. If no matches field is - # specified, this rule will unconditionally match traffic. - # @!attribute [rw] action - # @return [::Google::Cloud::NetworkServices::V1::GrpcRoute::RouteAction] - # Required. A detailed rule defining how to route traffic. This field is - # required. - class RouteRule - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class LabelsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Request used with the ListGrpcRoutes method. - # @!attribute [rw] parent - # @return [::String] - # Required. The project and location from which the GrpcRoutes should be - # listed, specified in the format `projects/*/locations/*`. - # @!attribute [rw] page_size - # @return [::Integer] - # Maximum number of GrpcRoutes to return per call. - # @!attribute [rw] page_token - # @return [::String] - # The value returned by the last `ListGrpcRoutesResponse` - # Indicates that this is a continuation of a prior `ListGrpcRoutes` call, - # and that the system should return the next page of data. - # @!attribute [rw] return_partial_success - # @return [::Boolean] - # Optional. If true, allow partial responses for multi-regional Aggregated - # List requests. Otherwise if one of the locations is down or unreachable, - # the Aggregated List request will fail. - class ListGrpcRoutesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response returned by the ListGrpcRoutes method. - # @!attribute [rw] grpc_routes - # @return [::Array<::Google::Cloud::NetworkServices::V1::GrpcRoute>] - # List of GrpcRoute resources. - # @!attribute [rw] next_page_token - # @return [::String] - # If there might be more results than those appearing in this response, then - # `next_page_token` is included. To get the next set of results, call this - # method again using the value of `next_page_token` as `page_token`. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Unreachable resources. Populated when the request opts into - # {::Google::Cloud::NetworkServices::V1::ListGrpcRoutesRequest#return_partial_success return_partial_success} - # and reading across collections e.g. when attempting to list all resources - # across all supported locations. - class ListGrpcRoutesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request used by the GetGrpcRoute method. - # @!attribute [rw] name - # @return [::String] - # Required. A name of the GrpcRoute to get. Must be in the format - # `projects/*/locations/*/grpcRoutes/*`. - class GetGrpcRouteRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request used by the CreateGrpcRoute method. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent resource of the GrpcRoute. Must be in the - # format `projects/*/locations/*`. - # @!attribute [rw] grpc_route_id - # @return [::String] - # Required. Short name of the GrpcRoute resource to be created. - # @!attribute [rw] grpc_route - # @return [::Google::Cloud::NetworkServices::V1::GrpcRoute] - # Required. GrpcRoute resource to be created. - class CreateGrpcRouteRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request used by the UpdateGrpcRoute method. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Optional. Field mask is used to specify the fields to be overwritten in the - # GrpcRoute resource by the update. - # The fields specified in the update_mask are relative to the resource, not - # the full request. A field will be overwritten if it is in the mask. If the - # user does not provide a mask then all fields will be overwritten. - # @!attribute [rw] grpc_route - # @return [::Google::Cloud::NetworkServices::V1::GrpcRoute] - # Required. Updated GrpcRoute resource. - class UpdateGrpcRouteRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request used by the DeleteGrpcRoute method. - # @!attribute [rw] name - # @return [::String] - # Required. A name of the GrpcRoute to delete. Must be in the format - # `projects/*/locations/*/grpcRoutes/*`. - class DeleteGrpcRouteRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/http_route.rb b/owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/http_route.rb deleted file mode 100644 index 9edca763e318..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/http_route.rb +++ /dev/null @@ -1,785 +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 NetworkServices - module V1 - # HttpRoute is the resource defining how HTTP traffic should be routed by a - # Mesh or Gateway resource. - # @!attribute [rw] name - # @return [::String] - # Identifier. Name of the HttpRoute resource. It matches pattern - # `projects/*/locations/*/httpRoutes/http_route_name>`. - # @!attribute [r] self_link - # @return [::String] - # Output only. Server-defined URL of this resource - # @!attribute [rw] description - # @return [::String] - # Optional. A free-text description of the resource. Max length 1024 - # characters. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The timestamp when the resource was created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The timestamp when the resource was updated. - # @!attribute [rw] hostnames - # @return [::Array<::String>] - # Required. Hostnames define a set of hosts that should match against the - # HTTP host header to select a HttpRoute to process the request. Hostname is - # the fully qualified domain name of a network host, as defined by RFC 1123 - # with the exception that: - # - IPs are not allowed. - # - A hostname may be prefixed with a wildcard label (`*.`). The wildcard - # label must appear by itself as the first label. - # - # Hostname can be "precise" which is a domain name without the terminating - # dot of a network host (e.g. `foo.example.com`) or "wildcard", which is a - # domain name prefixed with a single wildcard label (e.g. `*.example.com`). - # - # Note that as per RFC1035 and RFC1123, a label must consist of lower case - # alphanumeric characters or '-', and must start and end with an alphanumeric - # character. No other punctuation is allowed. - # - # The routes associated with a Mesh or Gateways must have unique hostnames. - # If you attempt to attach multiple routes with conflicting hostnames, - # the configuration will be rejected. - # - # For example, while it is acceptable for routes for the hostnames - # `*.foo.bar.com` and `*.bar.com` to be associated with the same Mesh (or - # Gateways under the same scope), it is not possible to associate two routes - # both with `*.bar.com` or both with `bar.com`. - # @!attribute [rw] meshes - # @return [::Array<::String>] - # Optional. Meshes defines a list of meshes this HttpRoute is attached to, as - # one of the routing rules to route the requests served by the mesh. - # - # Each mesh reference should match the pattern: - # `projects/*/locations/*/meshes/` - # - # The attached Mesh should be of a type SIDECAR - # @!attribute [rw] gateways - # @return [::Array<::String>] - # Optional. Gateways defines a list of gateways this HttpRoute is attached - # to, as one of the routing rules to route the requests served by the - # gateway. - # - # Each gateway reference should match the pattern: - # `projects/*/locations/*/gateways/` - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. Set of label tags associated with the HttpRoute resource. - # @!attribute [rw] rules - # @return [::Array<::Google::Cloud::NetworkServices::V1::HttpRoute::RouteRule>] - # Required. Rules that define how traffic is routed and handled. - # Rules will be matched sequentially based on the RouteMatch specified for - # the rule. - class HttpRoute - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Specifies how to select a route rule based on HTTP request headers. - # @!attribute [rw] exact_match - # @return [::String] - # The value of the header should match exactly the content of - # exact_match. - # - # Note: The following fields are mutually exclusive: `exact_match`, `regex_match`, `prefix_match`, `present_match`, `suffix_match`, `range_match`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] regex_match - # @return [::String] - # The value of the header must match the regular expression specified in - # regex_match. For regular expression grammar, please see: - # https://github.com/google/re2/wiki/Syntax - # - # Note: The following fields are mutually exclusive: `regex_match`, `exact_match`, `prefix_match`, `present_match`, `suffix_match`, `range_match`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] prefix_match - # @return [::String] - # The value of the header must start with the contents of prefix_match. - # - # Note: The following fields are mutually exclusive: `prefix_match`, `exact_match`, `regex_match`, `present_match`, `suffix_match`, `range_match`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] present_match - # @return [::Boolean] - # A header with header_name must exist. The match takes place whether or - # not the header has a value. - # - # Note: The following fields are mutually exclusive: `present_match`, `exact_match`, `regex_match`, `prefix_match`, `suffix_match`, `range_match`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] suffix_match - # @return [::String] - # The value of the header must end with the contents of suffix_match. - # - # Note: The following fields are mutually exclusive: `suffix_match`, `exact_match`, `regex_match`, `prefix_match`, `present_match`, `range_match`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] range_match - # @return [::Google::Cloud::NetworkServices::V1::HttpRoute::HeaderMatch::IntegerRange] - # If specified, the rule will match if the request header value is within - # the range. - # - # Note: The following fields are mutually exclusive: `range_match`, `exact_match`, `regex_match`, `prefix_match`, `present_match`, `suffix_match`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] header - # @return [::String] - # The name of the HTTP header to match against. - # @!attribute [rw] invert_match - # @return [::Boolean] - # If specified, the match result will be inverted before checking. Default - # value is set to false. - class HeaderMatch - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Represents an integer value range. - # @!attribute [rw] start - # @return [::Integer] - # Start of the range (inclusive) - # @!attribute [rw] end - # @return [::Integer] - # End of the range (exclusive) - class IntegerRange - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Specifications to match a query parameter in the request. - # @!attribute [rw] exact_match - # @return [::String] - # The value of the query parameter must exactly match the contents of - # exact_match. - # - # Only one of exact_match, regex_match, or present_match must be set. - # - # Note: The following fields are mutually exclusive: `exact_match`, `regex_match`, `present_match`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] regex_match - # @return [::String] - # The value of the query parameter must match the regular expression - # specified by regex_match. For regular expression grammar, please see - # https://github.com/google/re2/wiki/Syntax - # - # Only one of exact_match, regex_match, or present_match must be set. - # - # Note: The following fields are mutually exclusive: `regex_match`, `exact_match`, `present_match`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] present_match - # @return [::Boolean] - # Specifies that the QueryParameterMatcher matches if request contains - # query parameter, irrespective of whether the parameter has a value or - # not. - # - # Only one of exact_match, regex_match, or present_match must be set. - # - # Note: The following fields are mutually exclusive: `present_match`, `exact_match`, `regex_match`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] query_parameter - # @return [::String] - # The name of the query parameter to match. - class QueryParameterMatch - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # RouteMatch defines specifications used to match requests. If multiple match - # types are set, this RouteMatch will match if ALL type of matches are - # matched. - # @!attribute [rw] full_path_match - # @return [::String] - # The HTTP request path value should exactly match this value. - # - # Only one of full_path_match, prefix_match, or regex_match should be - # used. - # - # Note: The following fields are mutually exclusive: `full_path_match`, `prefix_match`, `regex_match`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] prefix_match - # @return [::String] - # The HTTP request path value must begin with specified prefix_match. - # prefix_match must begin with a /. - # - # Only one of full_path_match, prefix_match, or regex_match should be - # used. - # - # Note: The following fields are mutually exclusive: `prefix_match`, `full_path_match`, `regex_match`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] regex_match - # @return [::String] - # The HTTP request path value must satisfy the regular expression - # specified by regex_match after removing any query parameters and anchor - # supplied with the original URL. For regular expression grammar, please - # see https://github.com/google/re2/wiki/Syntax - # - # Only one of full_path_match, prefix_match, or regex_match should be - # used. - # - # Note: The following fields are mutually exclusive: `regex_match`, `full_path_match`, `prefix_match`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] ignore_case - # @return [::Boolean] - # Specifies if prefix_match and full_path_match matches are case sensitive. - # The default value is false. - # @!attribute [rw] headers - # @return [::Array<::Google::Cloud::NetworkServices::V1::HttpRoute::HeaderMatch>] - # Specifies a list of HTTP request headers to match against. ALL of the - # supplied headers must be matched. - # @!attribute [rw] query_parameters - # @return [::Array<::Google::Cloud::NetworkServices::V1::HttpRoute::QueryParameterMatch>] - # Specifies a list of query parameters to match against. ALL of the query - # parameters must be matched. - class RouteMatch - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Specifications of a destination to which the request should be routed to. - # @!attribute [rw] service_name - # @return [::String] - # The URL of a BackendService to route traffic to. - # @!attribute [rw] weight - # @return [::Integer] - # Specifies the proportion of requests forwarded to the backend referenced - # by the serviceName field. This is computed as: - # - weight/Sum(weights in this destination list). - # For non-zero values, there may be some epsilon from the exact proportion - # defined here depending on the precision an implementation supports. - # - # If only one serviceName is specified and it has a weight greater than 0, - # 100% of the traffic is forwarded to that backend. - # - # If weights are specified for any one service name, they need to be - # specified for all of them. - # - # If weights are unspecified for all services, then, traffic is distributed - # in equal proportions to all of them. - # @!attribute [rw] request_header_modifier - # @return [::Google::Cloud::NetworkServices::V1::HttpRoute::HeaderModifier] - # Optional. The specification for modifying the headers of a matching - # request prior to delivery of the request to the destination. If - # HeaderModifiers are set on both the Destination and the RouteAction, they - # will be merged. Conflicts between the two will not be resolved on the - # configuration. - # @!attribute [rw] response_header_modifier - # @return [::Google::Cloud::NetworkServices::V1::HttpRoute::HeaderModifier] - # Optional. The specification for modifying the headers of a response prior - # to sending the response back to the client. If HeaderModifiers are set on - # both the Destination and the RouteAction, they will be merged. Conflicts - # between the two will not be resolved on the configuration. - class Destination - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The specification for redirecting traffic. - # @!attribute [rw] host_redirect - # @return [::String] - # The host that will be used in the redirect response instead of the one - # that was supplied in the request. - # @!attribute [rw] path_redirect - # @return [::String] - # The path that will be used in the redirect response instead of the one - # that was supplied in the request. - # path_redirect can not be supplied together with prefix_redirect. Supply - # one alone or neither. If neither is supplied, the path of the original - # request will be used for the redirect. - # @!attribute [rw] prefix_rewrite - # @return [::String] - # Indicates that during redirection, the matched prefix (or path) should be - # swapped with this value. This option allows URLs be dynamically created - # based on the request. - # @!attribute [rw] response_code - # @return [::Google::Cloud::NetworkServices::V1::HttpRoute::Redirect::ResponseCode] - # The HTTP Status code to use for the redirect. - # @!attribute [rw] https_redirect - # @return [::Boolean] - # If set to true, the URL scheme in the redirected request is set to https. - # If set to false, the URL scheme of the redirected request will remain the - # same as that of the request. - # - # The default is set to false. - # @!attribute [rw] strip_query - # @return [::Boolean] - # if set to true, any accompanying query portion of the original URL is - # removed prior to redirecting the request. If set to false, the query - # portion of the original URL is retained. - # - # The default is set to false. - # @!attribute [rw] port_redirect - # @return [::Integer] - # The port that will be used in the redirected request instead of the one - # that was supplied in the request. - class Redirect - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Supported HTTP response code. - module ResponseCode - # Default value - RESPONSE_CODE_UNSPECIFIED = 0 - - # Corresponds to 301. - MOVED_PERMANENTLY_DEFAULT = 1 - - # Corresponds to 302. - FOUND = 2 - - # Corresponds to 303. - SEE_OTHER = 3 - - # Corresponds to 307. In this case, the request method will be retained. - TEMPORARY_REDIRECT = 4 - - # Corresponds to 308. In this case, the request method will be retained. - PERMANENT_REDIRECT = 5 - end - end - - # The specification for fault injection introduced into traffic to test the - # resiliency of clients to destination service failure. As part of fault - # injection, when clients send requests to a destination, delays can be - # introduced by client proxy on a percentage of requests before sending those - # requests to the destination service. Similarly requests can be aborted by - # client proxy for a percentage of requests. - # @!attribute [rw] delay - # @return [::Google::Cloud::NetworkServices::V1::HttpRoute::FaultInjectionPolicy::Delay] - # The specification for injecting delay to client requests. - # @!attribute [rw] abort - # @return [::Google::Cloud::NetworkServices::V1::HttpRoute::FaultInjectionPolicy::Abort] - # The specification for aborting to client requests. - class FaultInjectionPolicy - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Specification of how client requests are delayed as part of fault - # injection before being sent to a destination. - # @!attribute [rw] fixed_delay - # @return [::Google::Protobuf::Duration] - # Specify a fixed delay before forwarding the request. - # @!attribute [rw] percentage - # @return [::Integer] - # The percentage of traffic on which delay will be injected. - # - # The value must be between [0, 100] - class Delay - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Specification of how client requests are aborted as part of fault - # injection before being sent to a destination. - # @!attribute [rw] http_status - # @return [::Integer] - # The HTTP status code used to abort the request. - # - # The value must be between 200 and 599 inclusive. - # @!attribute [rw] percentage - # @return [::Integer] - # The percentage of traffic which will be aborted. - # - # The value must be between [0, 100] - class Abort - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # The specification for cookie-based stateful session affinity where the - # date plane supplies a “session cookie” with the name "GSSA" which encodes - # a specific destination host and each request containing that cookie will - # be directed to that host as long as the destination host remains up and - # healthy. - # - # The gRPC proxyless mesh library or sidecar proxy will manage the session - # cookie but the client application code is responsible for copying the - # cookie from each RPC in the session to the next. - # @!attribute [rw] cookie_ttl - # @return [::Google::Protobuf::Duration] - # Required. The cookie TTL value for the Set-Cookie header generated by - # the data plane. The lifetime of the cookie may be set to a value from 0 - # to 86400 seconds (24 hours) inclusive. - # - # Set this to 0s to use a session cookie and disable cookie expiration. - class StatefulSessionAffinityPolicy - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The specification for modifying HTTP header in HTTP request and HTTP - # response. - # @!attribute [rw] set - # @return [::Google::Protobuf::Map{::String => ::String}] - # Completely overwrite/replace the headers with given map where key is the - # name of the header, value is the value of the header. - # @!attribute [rw] add - # @return [::Google::Protobuf::Map{::String => ::String}] - # Add the headers with given map where key is the name of the header, value - # is the value of the header. - # @!attribute [rw] remove - # @return [::Array<::String>] - # Remove headers (matching by header names) specified in the list. - class HeaderModifier - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class SetEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class AddEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # The specification for modifying the URL of the request, prior to forwarding - # the request to the destination. - # @!attribute [rw] path_prefix_rewrite - # @return [::String] - # Prior to forwarding the request to the selected destination, the matching - # portion of the requests path is replaced by this value. - # @!attribute [rw] host_rewrite - # @return [::String] - # Prior to forwarding the request to the selected destination, the requests - # host header is replaced by this value. - class URLRewrite - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The specifications for retries. - # @!attribute [rw] retry_conditions - # @return [::Array<::String>] - # Specifies one or more conditions when this retry policy applies. Valid - # values are: - # 5xx: Proxy will attempt a retry if the destination service responds - # with any 5xx response code, of if the destination service does not - # respond at all, example: disconnect, reset, read timeout, connection - # failure and refused streams. - # - # gateway-error: Similar to 5xx, but only applies to response codes 502, - # 503, 504. - # - # reset: Proxy will attempt a retry if the destination service does not - # respond at all (disconnect/reset/read timeout) - # - # connect-failure: Proxy will retry on failures connecting to destination - # for example due to connection timeouts. - # - # retriable-4xx: Proxy will retry fro retriable 4xx response codes. - # Currently the only retriable error supported is 409. - # - # refused-stream: Proxy will retry if the destination resets the stream - # with a REFUSED_STREAM error code. This reset type indicates that it - # is safe to retry. - # @!attribute [rw] num_retries - # @return [::Integer] - # Specifies the allowed number of retries. This number must be > 0. If not - # specified, default to 1. - # @!attribute [rw] per_try_timeout - # @return [::Google::Protobuf::Duration] - # Specifies a non-zero timeout per retry attempt. - class RetryPolicy - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Specifies the policy on how requests are shadowed to a separate mirrored - # destination service. The proxy does not wait for responses from the - # shadow service. Prior to sending traffic to the shadow service, the - # host/authority header is suffixed with -shadow. - # Mirroring is currently not supported for Cloud Run destinations. - # @!attribute [rw] destination - # @return [::Google::Cloud::NetworkServices::V1::HttpRoute::Destination] - # The destination the requests will be mirrored to. The weight of the - # destination will be ignored. - # @!attribute [rw] mirror_percent - # @return [::Float] - # Optional. The percentage of requests to get mirrored to the desired - # destination. - class RequestMirrorPolicy - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The Specification for allowing client side cross-origin requests. - # @!attribute [rw] allow_origins - # @return [::Array<::String>] - # Specifies the list of origins that will be allowed to do CORS requests. - # An origin is allowed if it matches either an item in allow_origins or - # an item in allow_origin_regexes. - # @!attribute [rw] allow_origin_regexes - # @return [::Array<::String>] - # Specifies the regular expression patterns that match allowed origins. For - # regular expression grammar, please see - # https://github.com/google/re2/wiki/Syntax. - # @!attribute [rw] allow_methods - # @return [::Array<::String>] - # Specifies the content for Access-Control-Allow-Methods header. - # @!attribute [rw] allow_headers - # @return [::Array<::String>] - # Specifies the content for Access-Control-Allow-Headers header. - # @!attribute [rw] expose_headers - # @return [::Array<::String>] - # Specifies the content for Access-Control-Expose-Headers header. - # @!attribute [rw] max_age - # @return [::String] - # Specifies how long result of a preflight request can be cached in - # seconds. This translates to the Access-Control-Max-Age header. - # @!attribute [rw] allow_credentials - # @return [::Boolean] - # In response to a preflight request, setting this to true indicates that - # the actual request can include user credentials. This translates to the - # Access-Control-Allow-Credentials header. - # - # Default value is false. - # @!attribute [rw] disabled - # @return [::Boolean] - # If true, the CORS policy is disabled. The default value is false, which - # indicates that the CORS policy is in effect. - class CorsPolicy - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Static HTTP response object to be returned. - # @!attribute [rw] string_body - # @return [::String] - # Optional. Response body as a string. Maximum body length is 1024 - # characters. - # - # Note: The following fields are mutually exclusive: `string_body`, `bytes_body`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] bytes_body - # @return [::String] - # Optional. Response body as bytes. Maximum body size is 4096B. - # - # Note: The following fields are mutually exclusive: `bytes_body`, `string_body`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] status - # @return [::Integer] - # Required. Status to return as part of HTTP Response. Must be a positive - # integer. - class HttpDirectResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The specifications for routing traffic and applying associated policies. - # @!attribute [rw] destinations - # @return [::Array<::Google::Cloud::NetworkServices::V1::HttpRoute::Destination>] - # The destination to which traffic should be forwarded. - # @!attribute [rw] redirect - # @return [::Google::Cloud::NetworkServices::V1::HttpRoute::Redirect] - # If set, the request is directed as configured by this field. - # @!attribute [rw] fault_injection_policy - # @return [::Google::Cloud::NetworkServices::V1::HttpRoute::FaultInjectionPolicy] - # The specification for fault injection introduced into traffic to test the - # resiliency of clients to backend service failure. As part of fault - # injection, when clients send requests to a backend service, delays can be - # introduced on a percentage of requests before sending those requests to - # the backend service. Similarly requests from clients can be aborted for a - # percentage of requests. - # - # timeout and retry_policy will be ignored by clients that are configured - # with a fault_injection_policy - # @!attribute [rw] request_header_modifier - # @return [::Google::Cloud::NetworkServices::V1::HttpRoute::HeaderModifier] - # The specification for modifying the headers of a matching request prior - # to delivery of the request to the destination. If HeaderModifiers are set - # on both the Destination and the RouteAction, they will be merged. - # Conflicts between the two will not be resolved on the configuration. - # @!attribute [rw] response_header_modifier - # @return [::Google::Cloud::NetworkServices::V1::HttpRoute::HeaderModifier] - # The specification for modifying the headers of a response prior to - # sending the response back to the client. If HeaderModifiers are set - # on both the Destination and the RouteAction, they will be merged. - # Conflicts between the two will not be resolved on the configuration. - # @!attribute [rw] url_rewrite - # @return [::Google::Cloud::NetworkServices::V1::HttpRoute::URLRewrite] - # The specification for rewrite URL before forwarding requests to the - # destination. - # @!attribute [rw] timeout - # @return [::Google::Protobuf::Duration] - # Specifies the timeout for selected route. Timeout is computed from the - # time the request has been fully processed (i.e. end of stream) up until - # the response has been completely processed. Timeout includes all retries. - # @!attribute [rw] retry_policy - # @return [::Google::Cloud::NetworkServices::V1::HttpRoute::RetryPolicy] - # Specifies the retry policy associated with this route. - # @!attribute [rw] request_mirror_policy - # @return [::Google::Cloud::NetworkServices::V1::HttpRoute::RequestMirrorPolicy] - # Specifies the policy on how requests intended for the routes destination - # are shadowed to a separate mirrored destination. Proxy will not wait for - # the shadow destination to respond before returning the response. Prior to - # sending traffic to the shadow service, the host/authority header is - # suffixed with -shadow. - # @!attribute [rw] cors_policy - # @return [::Google::Cloud::NetworkServices::V1::HttpRoute::CorsPolicy] - # The specification for allowing client side cross-origin requests. - # @!attribute [rw] stateful_session_affinity - # @return [::Google::Cloud::NetworkServices::V1::HttpRoute::StatefulSessionAffinityPolicy] - # Optional. Specifies cookie-based stateful session affinity. - # @!attribute [rw] direct_response - # @return [::Google::Cloud::NetworkServices::V1::HttpRoute::HttpDirectResponse] - # Optional. Static HTTP Response object to be returned regardless of the - # request. - # @!attribute [rw] idle_timeout - # @return [::Google::Protobuf::Duration] - # Optional. Specifies the idle timeout for the selected route. The idle - # timeout is defined as the period in which there are no bytes sent or - # received on either the upstream or downstream connection. If not set, the - # default idle timeout is 1 hour. If set to 0s, the timeout will be - # disabled. - class RouteAction - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Specifies how to match traffic and how to route traffic when traffic is - # matched. - # @!attribute [rw] matches - # @return [::Array<::Google::Cloud::NetworkServices::V1::HttpRoute::RouteMatch>] - # A list of matches define conditions used for matching the rule against - # incoming HTTP requests. Each match is independent, i.e. this rule will be - # matched if ANY one of the matches is satisfied. - # - # If no matches field is specified, this rule will unconditionally match - # traffic. - # - # If a default rule is desired to be configured, add a rule with no matches - # specified to the end of the rules list. - # @!attribute [rw] action - # @return [::Google::Cloud::NetworkServices::V1::HttpRoute::RouteAction] - # The detailed rule defining how to route matched traffic. - class RouteRule - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class LabelsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Request used with the ListHttpRoutes method. - # @!attribute [rw] parent - # @return [::String] - # Required. The project and location from which the HttpRoutes should be - # listed, specified in the format `projects/*/locations/*`. - # @!attribute [rw] page_size - # @return [::Integer] - # Maximum number of HttpRoutes to return per call. - # @!attribute [rw] page_token - # @return [::String] - # The value returned by the last `ListHttpRoutesResponse` - # Indicates that this is a continuation of a prior `ListHttpRoutes` call, - # and that the system should return the next page of data. - # @!attribute [rw] return_partial_success - # @return [::Boolean] - # Optional. If true, allow partial responses for multi-regional Aggregated - # List requests. Otherwise if one of the locations is down or unreachable, - # the Aggregated List request will fail. - # @!attribute [rw] filter - # @return [::String] - # Optional. Filter expression to restrict the list. - class ListHttpRoutesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response returned by the ListHttpRoutes method. - # @!attribute [rw] http_routes - # @return [::Array<::Google::Cloud::NetworkServices::V1::HttpRoute>] - # List of HttpRoute resources. - # @!attribute [rw] next_page_token - # @return [::String] - # If there might be more results than those appearing in this response, then - # `next_page_token` is included. To get the next set of results, call this - # method again using the value of `next_page_token` as `page_token`. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Unreachable resources. Populated when the request opts into - # {::Google::Cloud::NetworkServices::V1::ListHttpRoutesRequest#return_partial_success return_partial_success} - # and reading across collections e.g. when attempting to list all resources - # across all supported locations. - class ListHttpRoutesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request used by the GetHttpRoute method. - # @!attribute [rw] name - # @return [::String] - # Required. A name of the HttpRoute to get. Must be in the format - # `projects/*/locations/*/httpRoutes/*`. - class GetHttpRouteRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request used by the HttpRoute method. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent resource of the HttpRoute. Must be in the - # format `projects/*/locations/*`. - # @!attribute [rw] http_route_id - # @return [::String] - # Required. Short name of the HttpRoute resource to be created. - # @!attribute [rw] http_route - # @return [::Google::Cloud::NetworkServices::V1::HttpRoute] - # Required. HttpRoute resource to be created. - # @!attribute [rw] request_id - # @return [::String] - # Optional. Idempotent request UUID. - class CreateHttpRouteRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request used by the UpdateHttpRoute method. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Optional. Field mask is used to specify the fields to be overwritten in the - # HttpRoute resource by the update. - # The fields specified in the update_mask are relative to the resource, not - # the full request. A field will be overwritten if it is in the mask. If the - # user does not provide a mask then all fields will be overwritten. - # @!attribute [rw] http_route - # @return [::Google::Cloud::NetworkServices::V1::HttpRoute] - # Required. Updated HttpRoute resource. - class UpdateHttpRouteRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request used by the DeleteHttpRoute method. - # @!attribute [rw] name - # @return [::String] - # Required. A name of the HttpRoute to delete. Must be in the format - # `projects/*/locations/*/httpRoutes/*`. - class DeleteHttpRouteRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/mesh.rb b/owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/mesh.rb deleted file mode 100644 index cab0f16c8a99..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/mesh.rb +++ /dev/null @@ -1,170 +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 NetworkServices - module V1 - # Mesh represents a logical configuration grouping for workload to workload - # communication within a service mesh. Routes that point to mesh dictate how - # requests are routed within this logical mesh boundary. - # @!attribute [rw] name - # @return [::String] - # Identifier. Name of the Mesh resource. It matches pattern - # `projects/*/locations/*/meshes/`. - # @!attribute [r] self_link - # @return [::String] - # Output only. Server-defined URL of this resource - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The timestamp when the resource was created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The timestamp when the resource was updated. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. Set of label tags associated with the Mesh resource. - # @!attribute [rw] description - # @return [::String] - # Optional. A free-text description of the resource. Max length 1024 - # characters. - # @!attribute [rw] interception_port - # @return [::Integer] - # Optional. If set to a valid TCP port (1-65535), instructs the SIDECAR proxy - # to listen on the specified port of localhost (127.0.0.1) address. The - # SIDECAR proxy will expect all traffic to be redirected to this port - # regardless of its actual ip:port destination. If unset, a port '15001' is - # used as the interception port. This is applicable only for sidecar proxy - # deployments. - # @!attribute [rw] envoy_headers - # @return [::Google::Cloud::NetworkServices::V1::EnvoyHeaders] - # Optional. Determines if envoy will insert internal debug headers into - # upstream requests. Other Envoy headers may still be injected. By default, - # envoy will not insert any debug headers. - class Mesh - 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 - - # Request used with the ListMeshes method. - # @!attribute [rw] parent - # @return [::String] - # Required. The project and location from which the Meshes should be - # listed, specified in the format `projects/*/locations/*`. - # @!attribute [rw] page_size - # @return [::Integer] - # Maximum number of Meshes to return per call. - # @!attribute [rw] page_token - # @return [::String] - # The value returned by the last `ListMeshesResponse` - # Indicates that this is a continuation of a prior `ListMeshes` call, - # and that the system should return the next page of data. - # @!attribute [rw] return_partial_success - # @return [::Boolean] - # Optional. If true, allow partial responses for multi-regional Aggregated - # List requests. Otherwise if one of the locations is down or unreachable, - # the Aggregated List request will fail. - class ListMeshesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response returned by the ListMeshes method. - # @!attribute [rw] meshes - # @return [::Array<::Google::Cloud::NetworkServices::V1::Mesh>] - # List of Mesh resources. - # @!attribute [rw] next_page_token - # @return [::String] - # If there might be more results than those appearing in this response, then - # `next_page_token` is included. To get the next set of results, call this - # method again using the value of `next_page_token` as `page_token`. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Unreachable resources. Populated when the request opts into - # `return_partial_success` and reading across collections e.g. when - # attempting to list all resources across all supported locations. - class ListMeshesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request used by the GetMesh method. - # @!attribute [rw] name - # @return [::String] - # Required. A name of the Mesh to get. Must be in the format - # `projects/*/locations/*/meshes/*`. - class GetMeshRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request used by the CreateMesh method. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent resource of the Mesh. Must be in the - # format `projects/*/locations/*`. - # @!attribute [rw] mesh_id - # @return [::String] - # Required. Short name of the Mesh resource to be created. - # @!attribute [rw] mesh - # @return [::Google::Cloud::NetworkServices::V1::Mesh] - # Required. Mesh resource to be created. - class CreateMeshRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request used by the UpdateMesh method. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Optional. Field mask is used to specify the fields to be overwritten in the - # Mesh resource by the update. - # The fields specified in the update_mask are relative to the resource, not - # the full request. A field will be overwritten if it is in the mask. If the - # user does not provide a mask then all fields will be overwritten. - # @!attribute [rw] mesh - # @return [::Google::Cloud::NetworkServices::V1::Mesh] - # Required. Updated Mesh resource. - class UpdateMeshRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request used by the DeleteMesh method. - # @!attribute [rw] name - # @return [::String] - # Required. A name of the Mesh to delete. Must be in the format - # `projects/*/locations/*/meshes/*`. - class DeleteMeshRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/route_view.rb b/owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/route_view.rb deleted file mode 100644 index 3d4ace187fbe..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/route_view.rb +++ /dev/null @@ -1,168 +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 NetworkServices - module V1 - # GatewayRouteView defines view-only resource for Routes to a Gateway - # @!attribute [r] name - # @return [::String] - # Output only. Identifier. Full path name of the GatewayRouteView resource. - # Format: - # projects/\\{project_number}/locations/\\{location}/gateways/\\{gateway}/routeViews/\\{route_view} - # @!attribute [r] route_project_number - # @return [::Integer] - # Output only. Project number where the route exists. - # @!attribute [r] route_location - # @return [::String] - # Output only. Location where the route exists. - # @!attribute [r] route_type - # @return [::String] - # Output only. Type of the route: HttpRoute,GrpcRoute,TcpRoute, or TlsRoute - # @!attribute [r] route_id - # @return [::String] - # Output only. The resource id for the route. - class GatewayRouteView - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # MeshRouteView defines view-only resource for Routes to a Mesh - # @!attribute [r] name - # @return [::String] - # Output only. Identifier. Full path name of the MeshRouteView resource. - # Format: - # projects/\\{project}/locations/\\{location}/meshes/\\{mesh}/routeViews/\\{route_view} - # @!attribute [r] route_project_number - # @return [::Integer] - # Output only. Project number where the route exists. - # @!attribute [r] route_location - # @return [::String] - # Output only. Location where the route exists. - # @!attribute [r] route_type - # @return [::String] - # Output only. Type of the route: HttpRoute,GrpcRoute,TcpRoute, or TlsRoute - # @!attribute [r] route_id - # @return [::String] - # Output only. The resource id for the route. - class MeshRouteView - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request used with the GetGatewayRouteView method. - # @!attribute [rw] name - # @return [::String] - # Required. Name of the GatewayRouteView resource. - # Formats: - # projects/\\{project}/locations/\\{location}/gateways/\\{gateway}/routeViews/\\{route_view} - class GetGatewayRouteViewRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request used with the GetMeshRouteView method. - # @!attribute [rw] name - # @return [::String] - # Required. Name of the MeshRouteView resource. - # Format: - # projects/\\{project}/locations/\\{location}/meshes/\\{mesh}/routeViews/\\{route_view} - class GetMeshRouteViewRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request used with the ListGatewayRouteViews method. - # @!attribute [rw] parent - # @return [::String] - # Required. The Gateway to which a Route is associated. - # Formats: - # projects/\\{project}/locations/\\{location}/gateways/\\{gateway} - # @!attribute [rw] page_size - # @return [::Integer] - # Maximum number of GatewayRouteViews to return per call. - # @!attribute [rw] page_token - # @return [::String] - # The value returned by the last `ListGatewayRouteViewsResponse` - # Indicates that this is a continuation of a prior `ListGatewayRouteViews` - # call, and that the system should return the next page of data. - class ListGatewayRouteViewsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request used with the ListMeshRouteViews method. - # @!attribute [rw] parent - # @return [::String] - # Required. The Mesh to which a Route is associated. - # Format: - # projects/\\{project}/locations/\\{location}/meshes/\\{mesh} - # @!attribute [rw] page_size - # @return [::Integer] - # Maximum number of MeshRouteViews to return per call. - # @!attribute [rw] page_token - # @return [::String] - # The value returned by the last `ListMeshRouteViewsResponse` - # Indicates that this is a continuation of a prior `ListMeshRouteViews` call, - # and that the system should return the next page of data. - class ListMeshRouteViewsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response returned by the ListGatewayRouteViews method. - # @!attribute [rw] gateway_route_views - # @return [::Array<::Google::Cloud::NetworkServices::V1::GatewayRouteView>] - # List of GatewayRouteView resources. - # @!attribute [rw] next_page_token - # @return [::String] - # A token, which can be sent as `page_token` to retrieve the next page. - # If this field is omitted, there are no subsequent pages. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Unreachable resources. Populated when the request attempts to list all - # resources across all supported locations, while some locations are - # temporarily unavailable. - class ListGatewayRouteViewsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response returned by the ListMeshRouteViews method. - # @!attribute [rw] mesh_route_views - # @return [::Array<::Google::Cloud::NetworkServices::V1::MeshRouteView>] - # List of MeshRouteView resources. - # @!attribute [rw] next_page_token - # @return [::String] - # A token, which can be sent as `page_token` to retrieve the next page. - # If this field is omitted, there are no subsequent pages. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Unreachable resources. Populated when the request attempts to list all - # resources across all supported locations, while some locations are - # temporarily unavailable. - class ListMeshRouteViewsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/service_binding.rb b/owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/service_binding.rb deleted file mode 100644 index 4ad24c25bac0..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/service_binding.rb +++ /dev/null @@ -1,168 +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 NetworkServices - module V1 - # ServiceBinding can be used to: - # - Bind a Service Directory Service to be used in a BackendService resource. - # This feature will be deprecated soon. - # - Bind a Private Service Connect producer service to be used in consumer - # Cloud Service Mesh or Application Load Balancers. - # - Bind a Cloud Run service to be used in consumer Cloud Service Mesh or - # Application Load Balancers. - # @!attribute [rw] name - # @return [::String] - # Identifier. Name of the ServiceBinding resource. It matches pattern - # `projects/*/locations/*/serviceBindings/`. - # @!attribute [rw] description - # @return [::String] - # Optional. A free-text description of the resource. Max length 1024 - # characters. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The timestamp when the resource was created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The timestamp when the resource was updated. - # @!attribute [rw] service - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::String] - # Optional. The full Service Directory Service name of the format - # `projects/*/locations/*/namespaces/*/services/*`. - # This field is for Service Directory integration which will be deprecated - # soon. - # @!attribute [r] service_id - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::String] - # Output only. The unique identifier of the Service Directory Service against - # which the ServiceBinding resource is validated. This is populated when the - # Service Binding resource is used in another resource (like Backend - # Service). This is of the UUID4 format. This field is for Service Directory - # integration which will be deprecated soon. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. Set of label tags associated with the ServiceBinding resource. - class ServiceBinding - 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 - - # Request used with the ListServiceBindings method. - # @!attribute [rw] parent - # @return [::String] - # Required. The project and location from which the ServiceBindings should be - # listed, specified in the format `projects/*/locations/*`. - # @!attribute [rw] page_size - # @return [::Integer] - # Maximum number of ServiceBindings to return per call. - # @!attribute [rw] page_token - # @return [::String] - # The value returned by the last `ListServiceBindingsResponse` - # Indicates that this is a continuation of a prior `ListRouters` call, - # and that the system should return the next page of data. - class ListServiceBindingsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response returned by the ListServiceBindings method. - # @!attribute [rw] service_bindings - # @return [::Array<::Google::Cloud::NetworkServices::V1::ServiceBinding>] - # List of ServiceBinding resources. - # @!attribute [rw] next_page_token - # @return [::String] - # If there might be more results than those appearing in this response, then - # `next_page_token` is included. To get the next set of results, call this - # method again using the value of `next_page_token` as `page_token`. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Unreachable resources. Populated when the request attempts to list all - # resources across all supported locations, while some locations are - # temporarily unavailable. - class ListServiceBindingsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request used by the GetServiceBinding method. - # @!attribute [rw] name - # @return [::String] - # Required. A name of the ServiceBinding to get. Must be in the format - # `projects/*/locations/*/serviceBindings/*`. - class GetServiceBindingRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request used by the ServiceBinding method. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent resource of the ServiceBinding. Must be in the - # format `projects/*/locations/*`. - # @!attribute [rw] service_binding_id - # @return [::String] - # Required. Short name of the ServiceBinding resource to be created. - # @!attribute [rw] service_binding - # @return [::Google::Cloud::NetworkServices::V1::ServiceBinding] - # Required. ServiceBinding resource to be created. - class CreateServiceBindingRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request used by the UpdateServiceBinding method. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Optional. Field mask is used to specify the fields to be overwritten in the - # ServiceBinding resource by the update. - # The fields specified in the update_mask are relative to the resource, not - # the full request. A field will be overwritten if it is in the mask. If the - # user does not provide a mask then all fields will be overwritten. - # @!attribute [rw] service_binding - # @return [::Google::Cloud::NetworkServices::V1::ServiceBinding] - # Required. Updated ServiceBinding resource. - class UpdateServiceBindingRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request used by the DeleteServiceBinding method. - # @!attribute [rw] name - # @return [::String] - # Required. A name of the ServiceBinding to delete. Must be in the format - # `projects/*/locations/*/serviceBindings/*`. - class DeleteServiceBindingRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/service_lb_policy.rb b/owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/service_lb_policy.rb deleted file mode 100644 index 75a47e365ab3..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/service_lb_policy.rb +++ /dev/null @@ -1,258 +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 NetworkServices - module V1 - # ServiceLbPolicy holds global load balancing and traffic distribution - # configuration that can be applied to a BackendService. - # @!attribute [rw] name - # @return [::String] - # Identifier. Name of the ServiceLbPolicy resource. It matches pattern - # `projects/{project}/locations/{location}/serviceLbPolicies/{service_lb_policy_name}`. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The timestamp when this resource was created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The timestamp when this resource was last updated. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. Set of label tags associated with the ServiceLbPolicy resource. - # @!attribute [rw] description - # @return [::String] - # Optional. A free-text description of the resource. Max length 1024 - # characters. - # @!attribute [rw] load_balancing_algorithm - # @return [::Google::Cloud::NetworkServices::V1::ServiceLbPolicy::LoadBalancingAlgorithm] - # Optional. The type of load balancing algorithm to be used. The default - # behavior is WATERFALL_BY_REGION. - # @!attribute [rw] auto_capacity_drain - # @return [::Google::Cloud::NetworkServices::V1::ServiceLbPolicy::AutoCapacityDrain] - # Optional. Configuration to automatically move traffic away for unhealthy - # IG/NEG for the associated Backend Service. - # @!attribute [rw] failover_config - # @return [::Google::Cloud::NetworkServices::V1::ServiceLbPolicy::FailoverConfig] - # Optional. Configuration related to health based failover. - # @!attribute [rw] isolation_config - # @return [::Google::Cloud::NetworkServices::V1::ServiceLbPolicy::IsolationConfig] - # Optional. Configuration to provide isolation support for the associated - # Backend Service. - class ServiceLbPolicy - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Option to specify if an unhealthy IG/NEG should be considered for global - # load balancing and traffic routing. - # @!attribute [rw] enable - # @return [::Boolean] - # Optional. If set to 'True', an unhealthy IG/NEG will be set as drained. - # - An IG/NEG is considered unhealthy if less than 25% of the - # instances/endpoints in the IG/NEG are healthy. - # - This option will never result in draining more than 50% of the - # configured IGs/NEGs for the Backend Service. - class AutoCapacityDrain - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Option to specify health based failover behavior. - # This is not related to Network load balancer FailoverPolicy. - # @!attribute [rw] failover_health_threshold - # @return [::Integer] - # Optional. The percentage threshold that a load balancer will begin to - # send traffic to failover backends. If the percentage of endpoints in a - # MIG/NEG is smaller than this value, traffic would be sent to failover - # backends if possible. This field should be set to a value between 1 - # and 99. The default value is 50 for Global external HTTP(S) load balancer - # (classic) and Proxyless service mesh, and 70 for others. - class FailoverConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Configuration to provide isolation support for the associated Backend - # Service. - # @!attribute [rw] isolation_granularity - # @return [::Google::Cloud::NetworkServices::V1::ServiceLbPolicy::IsolationGranularity] - # Optional. The isolation granularity of the load balancer. - # @!attribute [rw] isolation_mode - # @return [::Google::Cloud::NetworkServices::V1::ServiceLbPolicy::IsolationMode] - # Optional. The isolation mode of the load balancer. - class IsolationConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class LabelsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The global load balancing algorithm to be used. - module LoadBalancingAlgorithm - # The type of the loadbalancing algorithm is unspecified. - LOAD_BALANCING_ALGORITHM_UNSPECIFIED = 0 - - # Balance traffic across all backends across the world proportionally based - # on capacity. - SPRAY_TO_WORLD = 3 - - # Direct traffic to the nearest region with endpoints and capacity before - # spilling over to other regions and spread the traffic from each client to - # all the MIGs/NEGs in a region. - SPRAY_TO_REGION = 4 - - # Direct traffic to the nearest region with endpoints and capacity before - # spilling over to other regions. All MIGs/NEGs within a region are evenly - # loaded but each client might not spread the traffic to all the MIGs/NEGs - # in the region. - WATERFALL_BY_REGION = 5 - - # Attempt to keep traffic in a single zone closest to the client, before - # spilling over to other zones. - WATERFALL_BY_ZONE = 6 - end - - # The granularity of this isolation restriction. - module IsolationGranularity - # No isolation is configured for the backend service. Traffic can overflow - # based on the load balancing algorithm. - ISOLATION_GRANULARITY_UNSPECIFIED = 0 - - # Traffic for this service will be isolated at the cloud region level. - REGION = 1 - end - - # The mode of this isolation restriction, defining whether clients in a given - # region are allowed to reach out to another region. - module IsolationMode - # No isolation mode is configured for the backend service. - ISOLATION_MODE_UNSPECIFIED = 0 - - # Traffic will be sent to the nearest region. - NEAREST = 1 - - # Traffic will fail if no serving backends are available in the same region - # as the load balancer. - STRICT = 2 - end - end - - # Request used with the ListServiceLbPolicies method. - # @!attribute [rw] parent - # @return [::String] - # Required. The project and location from which the ServiceLbPolicies should - # be listed, specified in the format - # `projects/{project}/locations/{location}`. - # @!attribute [rw] page_size - # @return [::Integer] - # Maximum number of ServiceLbPolicies to return per call. - # @!attribute [rw] page_token - # @return [::String] - # The value returned by the last `ListServiceLbPoliciesResponse` - # Indicates that this is a continuation of a prior `ListRouters` call, - # and that the system should return the next page of data. - class ListServiceLbPoliciesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response returned by the ListServiceLbPolicies method. - # @!attribute [rw] service_lb_policies - # @return [::Array<::Google::Cloud::NetworkServices::V1::ServiceLbPolicy>] - # List of ServiceLbPolicy resources. - # @!attribute [rw] next_page_token - # @return [::String] - # If there might be more results than those appearing in this response, then - # `next_page_token` is included. To get the next set of results, call this - # method again using the value of `next_page_token` as `page_token`. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Unreachable resources. Populated when the request attempts to list all - # resources across all supported locations, while some locations are - # temporarily unavailable. - class ListServiceLbPoliciesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request used by the GetServiceLbPolicy method. - # @!attribute [rw] name - # @return [::String] - # Required. A name of the ServiceLbPolicy to get. Must be in the format - # `projects/{project}/locations/{location}/serviceLbPolicies/*`. - class GetServiceLbPolicyRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request used by the ServiceLbPolicy method. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent resource of the ServiceLbPolicy. Must be in the - # format `projects/{project}/locations/{location}`. - # @!attribute [rw] service_lb_policy_id - # @return [::String] - # Required. Short name of the ServiceLbPolicy resource to be created. - # E.g. for resource name - # `projects/{project}/locations/{location}/serviceLbPolicies/{service_lb_policy_name}`. - # the id is value of \\{service_lb_policy_name} - # @!attribute [rw] service_lb_policy - # @return [::Google::Cloud::NetworkServices::V1::ServiceLbPolicy] - # Required. ServiceLbPolicy resource to be created. - class CreateServiceLbPolicyRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request used by the UpdateServiceLbPolicy method. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Optional. Field mask is used to specify the fields to be overwritten in the - # ServiceLbPolicy resource by the update. - # The fields specified in the update_mask are relative to the resource, not - # the full request. A field will be overwritten if it is in the mask. If the - # user does not provide a mask then all fields will be overwritten. - # @!attribute [rw] service_lb_policy - # @return [::Google::Cloud::NetworkServices::V1::ServiceLbPolicy] - # Required. Updated ServiceLbPolicy resource. - class UpdateServiceLbPolicyRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request used by the DeleteServiceLbPolicy method. - # @!attribute [rw] name - # @return [::String] - # Required. A name of the ServiceLbPolicy to delete. Must be in the format - # `projects/{project}/locations/{location}/serviceLbPolicies/*`. - class DeleteServiceLbPolicyRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/tcp_route.rb b/owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/tcp_route.rb deleted file mode 100644 index 383484643d2d..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/tcp_route.rb +++ /dev/null @@ -1,263 +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 NetworkServices - module V1 - # TcpRoute is the resource defining how TCP traffic should be routed by a - # Mesh/Gateway resource. - # @!attribute [rw] name - # @return [::String] - # Identifier. Name of the TcpRoute resource. It matches pattern - # `projects/*/locations/*/tcpRoutes/tcp_route_name>`. - # @!attribute [r] self_link - # @return [::String] - # Output only. Server-defined URL of this resource - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The timestamp when the resource was created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The timestamp when the resource was updated. - # @!attribute [rw] description - # @return [::String] - # Optional. A free-text description of the resource. Max length 1024 - # characters. - # @!attribute [rw] rules - # @return [::Array<::Google::Cloud::NetworkServices::V1::TcpRoute::RouteRule>] - # Required. Rules that define how traffic is routed and handled. At least one - # RouteRule must be supplied. If there are multiple rules then the action - # taken will be the first rule to match. - # @!attribute [rw] meshes - # @return [::Array<::String>] - # Optional. Meshes defines a list of meshes this TcpRoute is attached to, as - # one of the routing rules to route the requests served by the mesh. - # - # Each mesh reference should match the pattern: - # `projects/*/locations/*/meshes/` - # - # The attached Mesh should be of a type SIDECAR - # @!attribute [rw] gateways - # @return [::Array<::String>] - # Optional. Gateways defines a list of gateways this TcpRoute is attached to, - # as one of the routing rules to route the requests served by the gateway. - # - # Each gateway reference should match the pattern: - # `projects/*/locations/*/gateways/` - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. Set of label tags associated with the TcpRoute resource. - class TcpRoute - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Specifies how to match traffic and how to route traffic when traffic is - # matched. - # @!attribute [rw] matches - # @return [::Array<::Google::Cloud::NetworkServices::V1::TcpRoute::RouteMatch>] - # Optional. RouteMatch defines the predicate used to match requests to a - # given action. Multiple match types are "OR"ed for evaluation. If no - # routeMatch field is specified, this rule will unconditionally match - # traffic. - # @!attribute [rw] action - # @return [::Google::Cloud::NetworkServices::V1::TcpRoute::RouteAction] - # Required. The detailed rule defining how to route matched traffic. - class RouteRule - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # RouteMatch defines the predicate used to match requests to a given action. - # Multiple match types are "OR"ed for evaluation. - # If no routeMatch field is specified, this rule will unconditionally match - # traffic. - # @!attribute [rw] address - # @return [::String] - # Required. Must be specified in the CIDR range format. A CIDR range - # consists of an IP Address and a prefix length to construct the subnet - # mask. By default, the prefix length is 32 (i.e. matches a single IP - # address). Only IPV4 addresses are supported. Examples: "10.0.0.1" - - # matches against this exact IP address. "10.0.0.0/8" - matches against any - # IP address within the 10.0.0.0 subnet and 255.255.255.0 mask. "0.0.0.0/0" - # - matches against any IP address'. - # @!attribute [rw] port - # @return [::String] - # Required. Specifies the destination port to match against. - class RouteMatch - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The specifications for routing traffic and applying associated policies. - # @!attribute [rw] destinations - # @return [::Array<::Google::Cloud::NetworkServices::V1::TcpRoute::RouteDestination>] - # Optional. The destination services to which traffic should be forwarded. - # At least one destination service is required. Only one of route - # destination or original destination can be set. - # @!attribute [rw] original_destination - # @return [::Boolean] - # Optional. If true, Router will use the destination IP and port of the - # original connection as the destination of the request. Default is false. - # Only one of route destinations or original destination can be set. - # @!attribute [rw] idle_timeout - # @return [::Google::Protobuf::Duration] - # Optional. Specifies the idle timeout for the selected route. The idle - # timeout is defined as the period in which there are no bytes sent or - # received on either the upstream or downstream connection. If not set, the - # default idle timeout is 30 seconds. If set to 0s, the timeout will be - # disabled. - class RouteAction - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Describe the destination for traffic to be routed to. - # @!attribute [rw] service_name - # @return [::String] - # Required. The URL of a BackendService to route traffic to. - # @!attribute [rw] weight - # @return [::Integer] - # Optional. Specifies the proportion of requests forwarded to the backend - # referenced by the serviceName field. This is computed as: - # - weight/Sum(weights in this destination list). - # For non-zero values, there may be some epsilon from the exact proportion - # defined here depending on the precision an implementation supports. - # - # If only one serviceName is specified and it has a weight greater than 0, - # 100% of the traffic is forwarded to that backend. - # - # If weights are specified for any one service name, they need to be - # specified for all of them. - # - # If weights are unspecified for all services, then, traffic is distributed - # in equal proportions to all of them. - class RouteDestination - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class LabelsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Request used with the ListTcpRoutes method. - # @!attribute [rw] parent - # @return [::String] - # Required. The project and location from which the TcpRoutes should be - # listed, specified in the format `projects/*/locations/*`. - # @!attribute [rw] page_size - # @return [::Integer] - # Maximum number of TcpRoutes to return per call. - # @!attribute [rw] page_token - # @return [::String] - # The value returned by the last `ListTcpRoutesResponse` - # Indicates that this is a continuation of a prior `ListTcpRoutes` call, - # and that the system should return the next page of data. - # @!attribute [rw] return_partial_success - # @return [::Boolean] - # Optional. If true, allow partial responses for multi-regional Aggregated - # List requests. Otherwise if one of the locations is down or unreachable, - # the Aggregated List request will fail. - class ListTcpRoutesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response returned by the ListTcpRoutes method. - # @!attribute [rw] tcp_routes - # @return [::Array<::Google::Cloud::NetworkServices::V1::TcpRoute>] - # List of TcpRoute resources. - # @!attribute [rw] next_page_token - # @return [::String] - # If there might be more results than those appearing in this response, then - # `next_page_token` is included. To get the next set of results, call this - # method again using the value of `next_page_token` as `page_token`. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Unreachable resources. Populated when the request opts into - # {::Google::Cloud::NetworkServices::V1::ListTcpRoutesRequest#return_partial_success return_partial_success} - # and reading across collections e.g. when attempting to list all resources - # across all supported locations. - class ListTcpRoutesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request used by the GetTcpRoute method. - # @!attribute [rw] name - # @return [::String] - # Required. A name of the TcpRoute to get. Must be in the format - # `projects/*/locations/*/tcpRoutes/*`. - class GetTcpRouteRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request used by the TcpRoute method. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent resource of the TcpRoute. Must be in the - # format `projects/*/locations/*`. - # @!attribute [rw] tcp_route_id - # @return [::String] - # Required. Short name of the TcpRoute resource to be created. - # @!attribute [rw] tcp_route - # @return [::Google::Cloud::NetworkServices::V1::TcpRoute] - # Required. TcpRoute resource to be created. - class CreateTcpRouteRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request used by the UpdateTcpRoute method. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Optional. Field mask is used to specify the fields to be overwritten in the - # TcpRoute resource by the update. - # The fields specified in the update_mask are relative to the resource, not - # the full request. A field will be overwritten if it is in the mask. If the - # user does not provide a mask then all fields will be overwritten. - # @!attribute [rw] tcp_route - # @return [::Google::Cloud::NetworkServices::V1::TcpRoute] - # Required. Updated TcpRoute resource. - class UpdateTcpRouteRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request used by the DeleteTcpRoute method. - # @!attribute [rw] name - # @return [::String] - # Required. A name of the TcpRoute to delete. Must be in the format - # `projects/*/locations/*/tcpRoutes/*`. - class DeleteTcpRouteRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/tls_route.rb b/owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/tls_route.rb deleted file mode 100644 index 9f64e59aba1f..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/cloud/networkservices/v1/tls_route.rb +++ /dev/null @@ -1,256 +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 NetworkServices - module V1 - # TlsRoute defines how traffic should be routed based on SNI and other matching - # L3 attributes. - # @!attribute [rw] name - # @return [::String] - # Identifier. Name of the TlsRoute resource. It matches pattern - # `projects/*/locations/*/tlsRoutes/tls_route_name>`. - # @!attribute [r] self_link - # @return [::String] - # Output only. Server-defined URL of this resource - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The timestamp when the resource was created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The timestamp when the resource was updated. - # @!attribute [rw] description - # @return [::String] - # Optional. A free-text description of the resource. Max length 1024 - # characters. - # @!attribute [rw] rules - # @return [::Array<::Google::Cloud::NetworkServices::V1::TlsRoute::RouteRule>] - # Required. Rules that define how traffic is routed and handled. At least one - # RouteRule must be supplied. If there are multiple rules then the action - # taken will be the first rule to match. - # @!attribute [rw] meshes - # @return [::Array<::String>] - # Optional. Meshes defines a list of meshes this TlsRoute is attached to, as - # one of the routing rules to route the requests served by the mesh. - # - # Each mesh reference should match the pattern: - # `projects/*/locations/*/meshes/` - # - # The attached Mesh should be of a type SIDECAR - # @!attribute [rw] gateways - # @return [::Array<::String>] - # Optional. Gateways defines a list of gateways this TlsRoute is attached to, - # as one of the routing rules to route the requests served by the gateway. - # - # Each gateway reference should match the pattern: - # `projects/*/locations/*/gateways/` - # @!attribute [rw] target_proxies - # @return [::Array<::String>] - # Optional. TargetProxies defines a list of TargetTcpProxies this TlsRoute is - # attached to, as one of the routing rules to route the requests served by - # the TargetTcpProxy. - # - # Each TargetTcpProxy reference should match the pattern: - # `projects/*/locations/*/targetTcpProxies/` - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. Set of label tags associated with the TlsRoute resource. - class TlsRoute - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Specifies how to match traffic and how to route traffic when traffic is - # matched. - # @!attribute [rw] matches - # @return [::Array<::Google::Cloud::NetworkServices::V1::TlsRoute::RouteMatch>] - # Required. RouteMatch defines the predicate used to match requests to a - # given action. Multiple match types are "OR"ed for evaluation. Atleast one - # RouteMatch must be supplied. - # @!attribute [rw] action - # @return [::Google::Cloud::NetworkServices::V1::TlsRoute::RouteAction] - # Required. The detailed rule defining how to route matched traffic. - class RouteRule - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # RouteMatch defines the predicate used to match requests to a given action. - # Multiple match types are "AND"ed for evaluation. - # @!attribute [rw] sni_host - # @return [::Array<::String>] - # Optional. SNI (server name indicator) to match against. - # SNI will be matched against all wildcard domains, i.e. `www.example.com` - # will be first matched against `www.example.com`, then `*.example.com`, - # then `*.com.` - # Partial wildcards are not supported, and values like *w.example.com are - # invalid. - # At least one of sni_host and alpn is required. - # Up to 100 sni hosts across all matches can be set. - # @!attribute [rw] alpn - # @return [::Array<::String>] - # Optional. ALPN (Application-Layer Protocol Negotiation) to match against. - # Examples: "http/1.1", "h2". - # At least one of sni_host and alpn is required. - # Up to 5 alpns across all matches can be set. - class RouteMatch - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The specifications for routing traffic and applying associated policies. - # @!attribute [rw] destinations - # @return [::Array<::Google::Cloud::NetworkServices::V1::TlsRoute::RouteDestination>] - # Required. The destination services to which traffic should be forwarded. - # At least one destination service is required. - # @!attribute [rw] idle_timeout - # @return [::Google::Protobuf::Duration] - # Optional. Specifies the idle timeout for the selected route. The idle - # timeout is defined as the period in which there are no bytes sent or - # received on either the upstream or downstream connection. If not set, the - # default idle timeout is 1 hour. If set to 0s, the timeout will be - # disabled. - class RouteAction - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Describe the destination for traffic to be routed to. - # @!attribute [rw] service_name - # @return [::String] - # Required. The URL of a BackendService to route traffic to. - # @!attribute [rw] weight - # @return [::Integer] - # Optional. Specifies the proportion of requests forwarded to the backend - # referenced by the service_name field. This is computed as: - # - weight/Sum(weights in destinations) - # Weights in all destinations does not need to sum up to 100. - class RouteDestination - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class LabelsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Request used with the ListTlsRoutes method. - # @!attribute [rw] parent - # @return [::String] - # Required. The project and location from which the TlsRoutes should be - # listed, specified in the format `projects/*/locations/*`. - # @!attribute [rw] page_size - # @return [::Integer] - # Maximum number of TlsRoutes to return per call. - # @!attribute [rw] page_token - # @return [::String] - # The value returned by the last `ListTlsRoutesResponse` - # Indicates that this is a continuation of a prior `ListTlsRoutes` call, - # and that the system should return the next page of data. - # @!attribute [rw] return_partial_success - # @return [::Boolean] - # Optional. If true, allow partial responses for multi-regional Aggregated - # List requests. Otherwise if one of the locations is down or unreachable, - # the Aggregated List request will fail. - class ListTlsRoutesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response returned by the ListTlsRoutes method. - # @!attribute [rw] tls_routes - # @return [::Array<::Google::Cloud::NetworkServices::V1::TlsRoute>] - # List of TlsRoute resources. - # @!attribute [rw] next_page_token - # @return [::String] - # If there might be more results than those appearing in this response, then - # `next_page_token` is included. To get the next set of results, call this - # method again using the value of `next_page_token` as `page_token`. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Unreachable resources. Populated when the request opts into - # {::Google::Cloud::NetworkServices::V1::ListTlsRoutesRequest#return_partial_success return_partial_success} - # and reading across collections e.g. when attempting to list all resources - # across all supported locations. - class ListTlsRoutesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request used by the GetTlsRoute method. - # @!attribute [rw] name - # @return [::String] - # Required. A name of the TlsRoute to get. Must be in the format - # `projects/*/locations/*/tlsRoutes/*`. - class GetTlsRouteRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request used by the TlsRoute method. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent resource of the TlsRoute. Must be in the - # format `projects/*/locations/*`. - # @!attribute [rw] tls_route_id - # @return [::String] - # Required. Short name of the TlsRoute resource to be created. - # @!attribute [rw] tls_route - # @return [::Google::Cloud::NetworkServices::V1::TlsRoute] - # Required. TlsRoute resource to be created. - class CreateTlsRouteRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request used by the UpdateTlsRoute method. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Optional. Field mask is used to specify the fields to be overwritten in the - # TlsRoute resource by the update. - # The fields specified in the update_mask are relative to the resource, not - # the full request. A field will be overwritten if it is in the mask. If the - # user does not provide a mask then all fields will be overwritten. - # @!attribute [rw] tls_route - # @return [::Google::Cloud::NetworkServices::V1::TlsRoute] - # Required. Updated TlsRoute resource. - class UpdateTlsRouteRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request used by the DeleteTlsRoute method. - # @!attribute [rw] name - # @return [::String] - # Required. A name of the TlsRoute to delete. Must be in the format - # `projects/*/locations/*/tlsRoutes/*`. - class DeleteTlsRouteRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/longrunning/operations.rb deleted file mode 100644 index 7a757f512165..000000000000 --- a/owl-bot-staging/google-cloud-network_services-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_services-v1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/protobuf/any.rb deleted file mode 100644 index 58691995f02e..000000000000 --- a/owl-bot-staging/google-cloud-network_services-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_services-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index ea59f1f91daf..000000000000 --- a/owl-bot-staging/google-cloud-network_services-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_services-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/protobuf/empty.rb deleted file mode 100644 index 83e4481834a6..000000000000 --- a/owl-bot-staging/google-cloud-network_services-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_services-v1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/protobuf/field_mask.rb deleted file mode 100644 index 7f3ffc78601a..000000000000 --- a/owl-bot-staging/google-cloud-network_services-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_services-v1/proto_docs/google/protobuf/struct.rb b/owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/protobuf/struct.rb deleted file mode 100644 index 39e1aca868d2..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/protobuf/struct.rb +++ /dev/null @@ -1,108 +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 - # `Struct` represents a structured data value, consisting of fields - # which map to dynamically typed values. In some languages, `Struct` - # might be supported by a native representation. For example, in - # scripting languages like JS a struct is represented as an - # object. The details of that representation are described together - # with the proto support for the language. - # - # The JSON representation for `Struct` is JSON object. - # @!attribute [rw] fields - # @return [::Google::Protobuf::Map{::String => ::Google::Protobuf::Value}] - # Unordered map of dynamically typed values. - class Struct - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::Google::Protobuf::Value] - class FieldsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # `Value` represents a dynamically typed value which can be either - # null, a number, a string, a boolean, a recursive struct value, or a - # list of values. A producer of value is expected to set one of these - # variants. Absence of any variant indicates an error. - # - # The JSON representation for `Value` is JSON value. - # @!attribute [rw] null_value - # @return [::Google::Protobuf::NullValue] - # Represents a null value. - # - # Note: The following fields are mutually exclusive: `null_value`, `number_value`, `string_value`, `bool_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] number_value - # @return [::Float] - # Represents a double value. - # - # Note: The following fields are mutually exclusive: `number_value`, `null_value`, `string_value`, `bool_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] string_value - # @return [::String] - # Represents a string value. - # - # Note: The following fields are mutually exclusive: `string_value`, `null_value`, `number_value`, `bool_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] bool_value - # @return [::Boolean] - # Represents a boolean value. - # - # Note: The following fields are mutually exclusive: `bool_value`, `null_value`, `number_value`, `string_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] struct_value - # @return [::Google::Protobuf::Struct] - # Represents a structured value. - # - # Note: The following fields are mutually exclusive: `struct_value`, `null_value`, `number_value`, `string_value`, `bool_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] list_value - # @return [::Google::Protobuf::ListValue] - # Represents a repeated `Value`. - # - # Note: The following fields are mutually exclusive: `list_value`, `null_value`, `number_value`, `string_value`, `bool_value`, `struct_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class Value - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `ListValue` is a wrapper around a repeated field of values. - # - # The JSON representation for `ListValue` is JSON array. - # @!attribute [rw] values - # @return [::Array<::Google::Protobuf::Value>] - # Repeated field of dynamically typed values. - class ListValue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `NullValue` is a singleton enumeration to represent the null value for the - # `Value` type union. - # - # The JSON representation for `NullValue` is JSON `null`. - module NullValue - # Null value. - NULL_VALUE = 0 - end - end -end diff --git a/owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/protobuf/timestamp.rb deleted file mode 100644 index 74352be9c58c..000000000000 --- a/owl-bot-staging/google-cloud-network_services-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_services-v1/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/rpc/status.rb deleted file mode 100644 index c1a1c07eb2db..000000000000 --- a/owl-bot-staging/google-cloud-network_services-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_services-v1/proto_docs/google/type/expr.rb b/owl-bot-staging/google-cloud-network_services-v1/proto_docs/google/type/expr.rb deleted file mode 100644 index 53e7733b6592..000000000000 --- a/owl-bot-staging/google-cloud-network_services-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_services-v1/snippets/Gemfile b/owl-bot-staging/google-cloud-network_services-v1/snippets/Gemfile deleted file mode 100644 index 56b13bcaff4e..000000000000 --- a/owl-bot-staging/google-cloud-network_services-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_services-v1", path: "../" -else - gem "google-cloud-network_services-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_services-v1/snippets/dep_service/create_authz_extension.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/create_authz_extension.rb deleted file mode 100644 index ede6b54e32bd..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/create_authz_extension.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 networkservices_v1_generated_DepService_CreateAuthzExtension_sync] -require "google/cloud/network_services/v1" - -## -# Snippet for the create_authz_extension call in the DepService 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::NetworkServices::V1::DepService::Client#create_authz_extension. -# -def create_authz_extension - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::NetworkServices::V1::DepService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::NetworkServices::V1::CreateAuthzExtensionRequest.new - - # Call the create_authz_extension method. - result = client.create_authz_extension 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 networkservices_v1_generated_DepService_CreateAuthzExtension_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/create_lb_edge_extension.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/create_lb_edge_extension.rb deleted file mode 100644 index 229240201ead..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/create_lb_edge_extension.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 networkservices_v1_generated_DepService_CreateLbEdgeExtension_sync] -require "google/cloud/network_services/v1" - -## -# Snippet for the create_lb_edge_extension call in the DepService 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::NetworkServices::V1::DepService::Client#create_lb_edge_extension. -# -def create_lb_edge_extension - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::NetworkServices::V1::DepService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::NetworkServices::V1::CreateLbEdgeExtensionRequest.new - - # Call the create_lb_edge_extension method. - result = client.create_lb_edge_extension 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 networkservices_v1_generated_DepService_CreateLbEdgeExtension_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/create_lb_route_extension.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/create_lb_route_extension.rb deleted file mode 100644 index cc8501fb195b..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/create_lb_route_extension.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 networkservices_v1_generated_DepService_CreateLbRouteExtension_sync] -require "google/cloud/network_services/v1" - -## -# Snippet for the create_lb_route_extension call in the DepService 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::NetworkServices::V1::DepService::Client#create_lb_route_extension. -# -def create_lb_route_extension - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::NetworkServices::V1::DepService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::NetworkServices::V1::CreateLbRouteExtensionRequest.new - - # Call the create_lb_route_extension method. - result = client.create_lb_route_extension 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 networkservices_v1_generated_DepService_CreateLbRouteExtension_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/create_lb_traffic_extension.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/create_lb_traffic_extension.rb deleted file mode 100644 index 1f741bbf7229..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/create_lb_traffic_extension.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 networkservices_v1_generated_DepService_CreateLbTrafficExtension_sync] -require "google/cloud/network_services/v1" - -## -# Snippet for the create_lb_traffic_extension call in the DepService 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::NetworkServices::V1::DepService::Client#create_lb_traffic_extension. -# -def create_lb_traffic_extension - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::NetworkServices::V1::DepService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::NetworkServices::V1::CreateLbTrafficExtensionRequest.new - - # Call the create_lb_traffic_extension method. - result = client.create_lb_traffic_extension 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 networkservices_v1_generated_DepService_CreateLbTrafficExtension_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/delete_authz_extension.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/delete_authz_extension.rb deleted file mode 100644 index 0b1f11e61fd6..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/delete_authz_extension.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 networkservices_v1_generated_DepService_DeleteAuthzExtension_sync] -require "google/cloud/network_services/v1" - -## -# Snippet for the delete_authz_extension call in the DepService 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::NetworkServices::V1::DepService::Client#delete_authz_extension. -# -def delete_authz_extension - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::NetworkServices::V1::DepService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::NetworkServices::V1::DeleteAuthzExtensionRequest.new - - # Call the delete_authz_extension method. - result = client.delete_authz_extension 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 networkservices_v1_generated_DepService_DeleteAuthzExtension_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/delete_lb_edge_extension.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/delete_lb_edge_extension.rb deleted file mode 100644 index 4a0ad5dac21f..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/delete_lb_edge_extension.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 networkservices_v1_generated_DepService_DeleteLbEdgeExtension_sync] -require "google/cloud/network_services/v1" - -## -# Snippet for the delete_lb_edge_extension call in the DepService 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::NetworkServices::V1::DepService::Client#delete_lb_edge_extension. -# -def delete_lb_edge_extension - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::NetworkServices::V1::DepService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::NetworkServices::V1::DeleteLbEdgeExtensionRequest.new - - # Call the delete_lb_edge_extension method. - result = client.delete_lb_edge_extension 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 networkservices_v1_generated_DepService_DeleteLbEdgeExtension_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/delete_lb_route_extension.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/delete_lb_route_extension.rb deleted file mode 100644 index 95814758b3eb..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/delete_lb_route_extension.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 networkservices_v1_generated_DepService_DeleteLbRouteExtension_sync] -require "google/cloud/network_services/v1" - -## -# Snippet for the delete_lb_route_extension call in the DepService 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::NetworkServices::V1::DepService::Client#delete_lb_route_extension. -# -def delete_lb_route_extension - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::NetworkServices::V1::DepService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::NetworkServices::V1::DeleteLbRouteExtensionRequest.new - - # Call the delete_lb_route_extension method. - result = client.delete_lb_route_extension 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 networkservices_v1_generated_DepService_DeleteLbRouteExtension_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/delete_lb_traffic_extension.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/delete_lb_traffic_extension.rb deleted file mode 100644 index 004d99d73688..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/delete_lb_traffic_extension.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 networkservices_v1_generated_DepService_DeleteLbTrafficExtension_sync] -require "google/cloud/network_services/v1" - -## -# Snippet for the delete_lb_traffic_extension call in the DepService 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::NetworkServices::V1::DepService::Client#delete_lb_traffic_extension. -# -def delete_lb_traffic_extension - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::NetworkServices::V1::DepService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::NetworkServices::V1::DeleteLbTrafficExtensionRequest.new - - # Call the delete_lb_traffic_extension method. - result = client.delete_lb_traffic_extension 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 networkservices_v1_generated_DepService_DeleteLbTrafficExtension_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/get_authz_extension.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/get_authz_extension.rb deleted file mode 100644 index d246d79b3311..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/get_authz_extension.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 networkservices_v1_generated_DepService_GetAuthzExtension_sync] -require "google/cloud/network_services/v1" - -## -# Snippet for the get_authz_extension call in the DepService 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::NetworkServices::V1::DepService::Client#get_authz_extension. -# -def get_authz_extension - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::NetworkServices::V1::DepService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::NetworkServices::V1::GetAuthzExtensionRequest.new - - # Call the get_authz_extension method. - result = client.get_authz_extension request - - # The returned object is of type Google::Cloud::NetworkServices::V1::AuthzExtension. - p result -end -# [END networkservices_v1_generated_DepService_GetAuthzExtension_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/get_lb_edge_extension.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/get_lb_edge_extension.rb deleted file mode 100644 index 60091d45e662..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/get_lb_edge_extension.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 networkservices_v1_generated_DepService_GetLbEdgeExtension_sync] -require "google/cloud/network_services/v1" - -## -# Snippet for the get_lb_edge_extension call in the DepService 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::NetworkServices::V1::DepService::Client#get_lb_edge_extension. -# -def get_lb_edge_extension - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::NetworkServices::V1::DepService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::NetworkServices::V1::GetLbEdgeExtensionRequest.new - - # Call the get_lb_edge_extension method. - result = client.get_lb_edge_extension request - - # The returned object is of type Google::Cloud::NetworkServices::V1::LbEdgeExtension. - p result -end -# [END networkservices_v1_generated_DepService_GetLbEdgeExtension_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/get_lb_route_extension.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/get_lb_route_extension.rb deleted file mode 100644 index 4fcdfe6bf8eb..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/get_lb_route_extension.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 networkservices_v1_generated_DepService_GetLbRouteExtension_sync] -require "google/cloud/network_services/v1" - -## -# Snippet for the get_lb_route_extension call in the DepService 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::NetworkServices::V1::DepService::Client#get_lb_route_extension. -# -def get_lb_route_extension - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::NetworkServices::V1::DepService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::NetworkServices::V1::GetLbRouteExtensionRequest.new - - # Call the get_lb_route_extension method. - result = client.get_lb_route_extension request - - # The returned object is of type Google::Cloud::NetworkServices::V1::LbRouteExtension. - p result -end -# [END networkservices_v1_generated_DepService_GetLbRouteExtension_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/get_lb_traffic_extension.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/get_lb_traffic_extension.rb deleted file mode 100644 index 063d531f3967..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/get_lb_traffic_extension.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 networkservices_v1_generated_DepService_GetLbTrafficExtension_sync] -require "google/cloud/network_services/v1" - -## -# Snippet for the get_lb_traffic_extension call in the DepService 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::NetworkServices::V1::DepService::Client#get_lb_traffic_extension. -# -def get_lb_traffic_extension - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::NetworkServices::V1::DepService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::NetworkServices::V1::GetLbTrafficExtensionRequest.new - - # Call the get_lb_traffic_extension method. - result = client.get_lb_traffic_extension request - - # The returned object is of type Google::Cloud::NetworkServices::V1::LbTrafficExtension. - p result -end -# [END networkservices_v1_generated_DepService_GetLbTrafficExtension_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/list_authz_extensions.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/list_authz_extensions.rb deleted file mode 100644 index 31c4082339c5..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/list_authz_extensions.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 networkservices_v1_generated_DepService_ListAuthzExtensions_sync] -require "google/cloud/network_services/v1" - -## -# Snippet for the list_authz_extensions call in the DepService 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::NetworkServices::V1::DepService::Client#list_authz_extensions. -# -def list_authz_extensions - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::NetworkServices::V1::DepService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::NetworkServices::V1::ListAuthzExtensionsRequest.new - - # Call the list_authz_extensions method. - result = client.list_authz_extensions 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::NetworkServices::V1::AuthzExtension. - p item - end -end -# [END networkservices_v1_generated_DepService_ListAuthzExtensions_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/list_lb_edge_extensions.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/list_lb_edge_extensions.rb deleted file mode 100644 index c113e6912d17..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/list_lb_edge_extensions.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 networkservices_v1_generated_DepService_ListLbEdgeExtensions_sync] -require "google/cloud/network_services/v1" - -## -# Snippet for the list_lb_edge_extensions call in the DepService 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::NetworkServices::V1::DepService::Client#list_lb_edge_extensions. -# -def list_lb_edge_extensions - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::NetworkServices::V1::DepService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::NetworkServices::V1::ListLbEdgeExtensionsRequest.new - - # Call the list_lb_edge_extensions method. - result = client.list_lb_edge_extensions 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::NetworkServices::V1::LbEdgeExtension. - p item - end -end -# [END networkservices_v1_generated_DepService_ListLbEdgeExtensions_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/list_lb_route_extensions.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/list_lb_route_extensions.rb deleted file mode 100644 index 4418090222fb..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/list_lb_route_extensions.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 networkservices_v1_generated_DepService_ListLbRouteExtensions_sync] -require "google/cloud/network_services/v1" - -## -# Snippet for the list_lb_route_extensions call in the DepService 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::NetworkServices::V1::DepService::Client#list_lb_route_extensions. -# -def list_lb_route_extensions - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::NetworkServices::V1::DepService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::NetworkServices::V1::ListLbRouteExtensionsRequest.new - - # Call the list_lb_route_extensions method. - result = client.list_lb_route_extensions 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::NetworkServices::V1::LbRouteExtension. - p item - end -end -# [END networkservices_v1_generated_DepService_ListLbRouteExtensions_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/list_lb_traffic_extensions.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/list_lb_traffic_extensions.rb deleted file mode 100644 index e6c8e91db343..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/list_lb_traffic_extensions.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 networkservices_v1_generated_DepService_ListLbTrafficExtensions_sync] -require "google/cloud/network_services/v1" - -## -# Snippet for the list_lb_traffic_extensions call in the DepService 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::NetworkServices::V1::DepService::Client#list_lb_traffic_extensions. -# -def list_lb_traffic_extensions - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::NetworkServices::V1::DepService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::NetworkServices::V1::ListLbTrafficExtensionsRequest.new - - # Call the list_lb_traffic_extensions method. - result = client.list_lb_traffic_extensions 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::NetworkServices::V1::LbTrafficExtension. - p item - end -end -# [END networkservices_v1_generated_DepService_ListLbTrafficExtensions_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/update_authz_extension.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/update_authz_extension.rb deleted file mode 100644 index 96bcf84a1a2c..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/update_authz_extension.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 networkservices_v1_generated_DepService_UpdateAuthzExtension_sync] -require "google/cloud/network_services/v1" - -## -# Snippet for the update_authz_extension call in the DepService 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::NetworkServices::V1::DepService::Client#update_authz_extension. -# -def update_authz_extension - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::NetworkServices::V1::DepService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::NetworkServices::V1::UpdateAuthzExtensionRequest.new - - # Call the update_authz_extension method. - result = client.update_authz_extension 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 networkservices_v1_generated_DepService_UpdateAuthzExtension_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/update_lb_edge_extension.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/update_lb_edge_extension.rb deleted file mode 100644 index 878e3dc88238..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/update_lb_edge_extension.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 networkservices_v1_generated_DepService_UpdateLbEdgeExtension_sync] -require "google/cloud/network_services/v1" - -## -# Snippet for the update_lb_edge_extension call in the DepService 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::NetworkServices::V1::DepService::Client#update_lb_edge_extension. -# -def update_lb_edge_extension - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::NetworkServices::V1::DepService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::NetworkServices::V1::UpdateLbEdgeExtensionRequest.new - - # Call the update_lb_edge_extension method. - result = client.update_lb_edge_extension 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 networkservices_v1_generated_DepService_UpdateLbEdgeExtension_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/update_lb_route_extension.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/update_lb_route_extension.rb deleted file mode 100644 index 66f3e36d1c56..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/update_lb_route_extension.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 networkservices_v1_generated_DepService_UpdateLbRouteExtension_sync] -require "google/cloud/network_services/v1" - -## -# Snippet for the update_lb_route_extension call in the DepService 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::NetworkServices::V1::DepService::Client#update_lb_route_extension. -# -def update_lb_route_extension - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::NetworkServices::V1::DepService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::NetworkServices::V1::UpdateLbRouteExtensionRequest.new - - # Call the update_lb_route_extension method. - result = client.update_lb_route_extension 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 networkservices_v1_generated_DepService_UpdateLbRouteExtension_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/update_lb_traffic_extension.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/update_lb_traffic_extension.rb deleted file mode 100644 index dbe882165d0d..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/snippets/dep_service/update_lb_traffic_extension.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 networkservices_v1_generated_DepService_UpdateLbTrafficExtension_sync] -require "google/cloud/network_services/v1" - -## -# Snippet for the update_lb_traffic_extension call in the DepService 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::NetworkServices::V1::DepService::Client#update_lb_traffic_extension. -# -def update_lb_traffic_extension - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::NetworkServices::V1::DepService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::NetworkServices::V1::UpdateLbTrafficExtensionRequest.new - - # Call the update_lb_traffic_extension method. - result = client.update_lb_traffic_extension 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 networkservices_v1_generated_DepService_UpdateLbTrafficExtension_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/create_endpoint_policy.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/create_endpoint_policy.rb deleted file mode 100644 index 11c7e0b7efa1..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/create_endpoint_policy.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 networkservices_v1_generated_NetworkServices_CreateEndpointPolicy_sync] -require "google/cloud/network_services/v1" - -## -# Snippet for the create_endpoint_policy call in the NetworkServices 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::NetworkServices::V1::NetworkServices::Client#create_endpoint_policy. -# -def create_endpoint_policy - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::NetworkServices::V1::CreateEndpointPolicyRequest.new - - # Call the create_endpoint_policy method. - result = client.create_endpoint_policy 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 networkservices_v1_generated_NetworkServices_CreateEndpointPolicy_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/create_gateway.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/create_gateway.rb deleted file mode 100644 index 8a0a08655678..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/create_gateway.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 networkservices_v1_generated_NetworkServices_CreateGateway_sync] -require "google/cloud/network_services/v1" - -## -# Snippet for the create_gateway call in the NetworkServices 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::NetworkServices::V1::NetworkServices::Client#create_gateway. -# -def create_gateway - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::NetworkServices::V1::CreateGatewayRequest.new - - # Call the create_gateway method. - result = client.create_gateway 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 networkservices_v1_generated_NetworkServices_CreateGateway_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/create_grpc_route.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/create_grpc_route.rb deleted file mode 100644 index 3146e4ba9b8c..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/create_grpc_route.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 networkservices_v1_generated_NetworkServices_CreateGrpcRoute_sync] -require "google/cloud/network_services/v1" - -## -# Snippet for the create_grpc_route call in the NetworkServices 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::NetworkServices::V1::NetworkServices::Client#create_grpc_route. -# -def create_grpc_route - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::NetworkServices::V1::CreateGrpcRouteRequest.new - - # Call the create_grpc_route method. - result = client.create_grpc_route 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 networkservices_v1_generated_NetworkServices_CreateGrpcRoute_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/create_http_route.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/create_http_route.rb deleted file mode 100644 index 9fc0c35ff06d..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/create_http_route.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 networkservices_v1_generated_NetworkServices_CreateHttpRoute_sync] -require "google/cloud/network_services/v1" - -## -# Snippet for the create_http_route call in the NetworkServices 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::NetworkServices::V1::NetworkServices::Client#create_http_route. -# -def create_http_route - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::NetworkServices::V1::CreateHttpRouteRequest.new - - # Call the create_http_route method. - result = client.create_http_route 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 networkservices_v1_generated_NetworkServices_CreateHttpRoute_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/create_mesh.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/create_mesh.rb deleted file mode 100644 index 5bb14f520eee..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/create_mesh.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 networkservices_v1_generated_NetworkServices_CreateMesh_sync] -require "google/cloud/network_services/v1" - -## -# Snippet for the create_mesh call in the NetworkServices 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::NetworkServices::V1::NetworkServices::Client#create_mesh. -# -def create_mesh - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::NetworkServices::V1::CreateMeshRequest.new - - # Call the create_mesh method. - result = client.create_mesh 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 networkservices_v1_generated_NetworkServices_CreateMesh_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/create_service_binding.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/create_service_binding.rb deleted file mode 100644 index 68b065cc78e0..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/create_service_binding.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 networkservices_v1_generated_NetworkServices_CreateServiceBinding_sync] -require "google/cloud/network_services/v1" - -## -# Snippet for the create_service_binding call in the NetworkServices 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::NetworkServices::V1::NetworkServices::Client#create_service_binding. -# -def create_service_binding - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::NetworkServices::V1::CreateServiceBindingRequest.new - - # Call the create_service_binding method. - result = client.create_service_binding 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 networkservices_v1_generated_NetworkServices_CreateServiceBinding_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/create_service_lb_policy.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/create_service_lb_policy.rb deleted file mode 100644 index 4df14c802f11..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/create_service_lb_policy.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 networkservices_v1_generated_NetworkServices_CreateServiceLbPolicy_sync] -require "google/cloud/network_services/v1" - -## -# Snippet for the create_service_lb_policy call in the NetworkServices 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::NetworkServices::V1::NetworkServices::Client#create_service_lb_policy. -# -def create_service_lb_policy - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::NetworkServices::V1::CreateServiceLbPolicyRequest.new - - # Call the create_service_lb_policy method. - result = client.create_service_lb_policy 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 networkservices_v1_generated_NetworkServices_CreateServiceLbPolicy_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/create_tcp_route.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/create_tcp_route.rb deleted file mode 100644 index 7713488f79cf..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/create_tcp_route.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 networkservices_v1_generated_NetworkServices_CreateTcpRoute_sync] -require "google/cloud/network_services/v1" - -## -# Snippet for the create_tcp_route call in the NetworkServices 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::NetworkServices::V1::NetworkServices::Client#create_tcp_route. -# -def create_tcp_route - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::NetworkServices::V1::CreateTcpRouteRequest.new - - # Call the create_tcp_route method. - result = client.create_tcp_route 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 networkservices_v1_generated_NetworkServices_CreateTcpRoute_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/create_tls_route.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/create_tls_route.rb deleted file mode 100644 index f87a51f8a71f..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/create_tls_route.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 networkservices_v1_generated_NetworkServices_CreateTlsRoute_sync] -require "google/cloud/network_services/v1" - -## -# Snippet for the create_tls_route call in the NetworkServices 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::NetworkServices::V1::NetworkServices::Client#create_tls_route. -# -def create_tls_route - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::NetworkServices::V1::CreateTlsRouteRequest.new - - # Call the create_tls_route method. - result = client.create_tls_route 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 networkservices_v1_generated_NetworkServices_CreateTlsRoute_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/create_wasm_plugin.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/create_wasm_plugin.rb deleted file mode 100644 index d7a64706e774..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/create_wasm_plugin.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 networkservices_v1_generated_NetworkServices_CreateWasmPlugin_sync] -require "google/cloud/network_services/v1" - -## -# Snippet for the create_wasm_plugin call in the NetworkServices 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::NetworkServices::V1::NetworkServices::Client#create_wasm_plugin. -# -def create_wasm_plugin - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::NetworkServices::V1::CreateWasmPluginRequest.new - - # Call the create_wasm_plugin method. - result = client.create_wasm_plugin 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 networkservices_v1_generated_NetworkServices_CreateWasmPlugin_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/create_wasm_plugin_version.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/create_wasm_plugin_version.rb deleted file mode 100644 index 48f30519111e..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/create_wasm_plugin_version.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 networkservices_v1_generated_NetworkServices_CreateWasmPluginVersion_sync] -require "google/cloud/network_services/v1" - -## -# Snippet for the create_wasm_plugin_version call in the NetworkServices 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::NetworkServices::V1::NetworkServices::Client#create_wasm_plugin_version. -# -def create_wasm_plugin_version - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::NetworkServices::V1::CreateWasmPluginVersionRequest.new - - # Call the create_wasm_plugin_version method. - result = client.create_wasm_plugin_version 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 networkservices_v1_generated_NetworkServices_CreateWasmPluginVersion_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/delete_endpoint_policy.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/delete_endpoint_policy.rb deleted file mode 100644 index da61e98011fe..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/delete_endpoint_policy.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 networkservices_v1_generated_NetworkServices_DeleteEndpointPolicy_sync] -require "google/cloud/network_services/v1" - -## -# Snippet for the delete_endpoint_policy call in the NetworkServices 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::NetworkServices::V1::NetworkServices::Client#delete_endpoint_policy. -# -def delete_endpoint_policy - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::NetworkServices::V1::DeleteEndpointPolicyRequest.new - - # Call the delete_endpoint_policy method. - result = client.delete_endpoint_policy 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 networkservices_v1_generated_NetworkServices_DeleteEndpointPolicy_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/delete_gateway.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/delete_gateway.rb deleted file mode 100644 index 191cd7e538aa..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/delete_gateway.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 networkservices_v1_generated_NetworkServices_DeleteGateway_sync] -require "google/cloud/network_services/v1" - -## -# Snippet for the delete_gateway call in the NetworkServices 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::NetworkServices::V1::NetworkServices::Client#delete_gateway. -# -def delete_gateway - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::NetworkServices::V1::DeleteGatewayRequest.new - - # Call the delete_gateway method. - result = client.delete_gateway 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 networkservices_v1_generated_NetworkServices_DeleteGateway_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/delete_grpc_route.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/delete_grpc_route.rb deleted file mode 100644 index 362fca28ee28..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/delete_grpc_route.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 networkservices_v1_generated_NetworkServices_DeleteGrpcRoute_sync] -require "google/cloud/network_services/v1" - -## -# Snippet for the delete_grpc_route call in the NetworkServices 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::NetworkServices::V1::NetworkServices::Client#delete_grpc_route. -# -def delete_grpc_route - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::NetworkServices::V1::DeleteGrpcRouteRequest.new - - # Call the delete_grpc_route method. - result = client.delete_grpc_route 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 networkservices_v1_generated_NetworkServices_DeleteGrpcRoute_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/delete_http_route.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/delete_http_route.rb deleted file mode 100644 index fb9b4d0a4357..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/delete_http_route.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 networkservices_v1_generated_NetworkServices_DeleteHttpRoute_sync] -require "google/cloud/network_services/v1" - -## -# Snippet for the delete_http_route call in the NetworkServices 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::NetworkServices::V1::NetworkServices::Client#delete_http_route. -# -def delete_http_route - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::NetworkServices::V1::DeleteHttpRouteRequest.new - - # Call the delete_http_route method. - result = client.delete_http_route 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 networkservices_v1_generated_NetworkServices_DeleteHttpRoute_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/delete_mesh.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/delete_mesh.rb deleted file mode 100644 index 38679aa8ee37..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/delete_mesh.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 networkservices_v1_generated_NetworkServices_DeleteMesh_sync] -require "google/cloud/network_services/v1" - -## -# Snippet for the delete_mesh call in the NetworkServices 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::NetworkServices::V1::NetworkServices::Client#delete_mesh. -# -def delete_mesh - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::NetworkServices::V1::DeleteMeshRequest.new - - # Call the delete_mesh method. - result = client.delete_mesh 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 networkservices_v1_generated_NetworkServices_DeleteMesh_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/delete_service_binding.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/delete_service_binding.rb deleted file mode 100644 index a53e8f9bb080..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/delete_service_binding.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 networkservices_v1_generated_NetworkServices_DeleteServiceBinding_sync] -require "google/cloud/network_services/v1" - -## -# Snippet for the delete_service_binding call in the NetworkServices 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::NetworkServices::V1::NetworkServices::Client#delete_service_binding. -# -def delete_service_binding - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::NetworkServices::V1::DeleteServiceBindingRequest.new - - # Call the delete_service_binding method. - result = client.delete_service_binding 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 networkservices_v1_generated_NetworkServices_DeleteServiceBinding_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/delete_service_lb_policy.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/delete_service_lb_policy.rb deleted file mode 100644 index 8d8eba182511..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/delete_service_lb_policy.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 networkservices_v1_generated_NetworkServices_DeleteServiceLbPolicy_sync] -require "google/cloud/network_services/v1" - -## -# Snippet for the delete_service_lb_policy call in the NetworkServices 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::NetworkServices::V1::NetworkServices::Client#delete_service_lb_policy. -# -def delete_service_lb_policy - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::NetworkServices::V1::DeleteServiceLbPolicyRequest.new - - # Call the delete_service_lb_policy method. - result = client.delete_service_lb_policy 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 networkservices_v1_generated_NetworkServices_DeleteServiceLbPolicy_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/delete_tcp_route.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/delete_tcp_route.rb deleted file mode 100644 index 23c4fea7bfe0..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/delete_tcp_route.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 networkservices_v1_generated_NetworkServices_DeleteTcpRoute_sync] -require "google/cloud/network_services/v1" - -## -# Snippet for the delete_tcp_route call in the NetworkServices 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::NetworkServices::V1::NetworkServices::Client#delete_tcp_route. -# -def delete_tcp_route - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::NetworkServices::V1::DeleteTcpRouteRequest.new - - # Call the delete_tcp_route method. - result = client.delete_tcp_route 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 networkservices_v1_generated_NetworkServices_DeleteTcpRoute_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/delete_tls_route.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/delete_tls_route.rb deleted file mode 100644 index e000e54ca758..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/delete_tls_route.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 networkservices_v1_generated_NetworkServices_DeleteTlsRoute_sync] -require "google/cloud/network_services/v1" - -## -# Snippet for the delete_tls_route call in the NetworkServices 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::NetworkServices::V1::NetworkServices::Client#delete_tls_route. -# -def delete_tls_route - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::NetworkServices::V1::DeleteTlsRouteRequest.new - - # Call the delete_tls_route method. - result = client.delete_tls_route 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 networkservices_v1_generated_NetworkServices_DeleteTlsRoute_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/delete_wasm_plugin.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/delete_wasm_plugin.rb deleted file mode 100644 index 7ff12d0c8530..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/delete_wasm_plugin.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 networkservices_v1_generated_NetworkServices_DeleteWasmPlugin_sync] -require "google/cloud/network_services/v1" - -## -# Snippet for the delete_wasm_plugin call in the NetworkServices 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::NetworkServices::V1::NetworkServices::Client#delete_wasm_plugin. -# -def delete_wasm_plugin - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::NetworkServices::V1::DeleteWasmPluginRequest.new - - # Call the delete_wasm_plugin method. - result = client.delete_wasm_plugin 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 networkservices_v1_generated_NetworkServices_DeleteWasmPlugin_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/delete_wasm_plugin_version.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/delete_wasm_plugin_version.rb deleted file mode 100644 index 8663d52decd6..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/delete_wasm_plugin_version.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 networkservices_v1_generated_NetworkServices_DeleteWasmPluginVersion_sync] -require "google/cloud/network_services/v1" - -## -# Snippet for the delete_wasm_plugin_version call in the NetworkServices 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::NetworkServices::V1::NetworkServices::Client#delete_wasm_plugin_version. -# -def delete_wasm_plugin_version - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::NetworkServices::V1::DeleteWasmPluginVersionRequest.new - - # Call the delete_wasm_plugin_version method. - result = client.delete_wasm_plugin_version 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 networkservices_v1_generated_NetworkServices_DeleteWasmPluginVersion_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/get_endpoint_policy.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/get_endpoint_policy.rb deleted file mode 100644 index 7bf7310ba421..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/get_endpoint_policy.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 networkservices_v1_generated_NetworkServices_GetEndpointPolicy_sync] -require "google/cloud/network_services/v1" - -## -# Snippet for the get_endpoint_policy call in the NetworkServices 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::NetworkServices::V1::NetworkServices::Client#get_endpoint_policy. -# -def get_endpoint_policy - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::NetworkServices::V1::GetEndpointPolicyRequest.new - - # Call the get_endpoint_policy method. - result = client.get_endpoint_policy request - - # The returned object is of type Google::Cloud::NetworkServices::V1::EndpointPolicy. - p result -end -# [END networkservices_v1_generated_NetworkServices_GetEndpointPolicy_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/get_gateway.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/get_gateway.rb deleted file mode 100644 index cd9c3803c27a..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/get_gateway.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 networkservices_v1_generated_NetworkServices_GetGateway_sync] -require "google/cloud/network_services/v1" - -## -# Snippet for the get_gateway call in the NetworkServices 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::NetworkServices::V1::NetworkServices::Client#get_gateway. -# -def get_gateway - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::NetworkServices::V1::GetGatewayRequest.new - - # Call the get_gateway method. - result = client.get_gateway request - - # The returned object is of type Google::Cloud::NetworkServices::V1::Gateway. - p result -end -# [END networkservices_v1_generated_NetworkServices_GetGateway_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/get_gateway_route_view.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/get_gateway_route_view.rb deleted file mode 100644 index acdfafc06d24..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/get_gateway_route_view.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 networkservices_v1_generated_NetworkServices_GetGatewayRouteView_sync] -require "google/cloud/network_services/v1" - -## -# Snippet for the get_gateway_route_view call in the NetworkServices 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::NetworkServices::V1::NetworkServices::Client#get_gateway_route_view. -# -def get_gateway_route_view - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::NetworkServices::V1::GetGatewayRouteViewRequest.new - - # Call the get_gateway_route_view method. - result = client.get_gateway_route_view request - - # The returned object is of type Google::Cloud::NetworkServices::V1::GatewayRouteView. - p result -end -# [END networkservices_v1_generated_NetworkServices_GetGatewayRouteView_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/get_grpc_route.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/get_grpc_route.rb deleted file mode 100644 index c89829583747..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/get_grpc_route.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 networkservices_v1_generated_NetworkServices_GetGrpcRoute_sync] -require "google/cloud/network_services/v1" - -## -# Snippet for the get_grpc_route call in the NetworkServices 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::NetworkServices::V1::NetworkServices::Client#get_grpc_route. -# -def get_grpc_route - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::NetworkServices::V1::GetGrpcRouteRequest.new - - # Call the get_grpc_route method. - result = client.get_grpc_route request - - # The returned object is of type Google::Cloud::NetworkServices::V1::GrpcRoute. - p result -end -# [END networkservices_v1_generated_NetworkServices_GetGrpcRoute_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/get_http_route.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/get_http_route.rb deleted file mode 100644 index 5fae23632eba..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/get_http_route.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 networkservices_v1_generated_NetworkServices_GetHttpRoute_sync] -require "google/cloud/network_services/v1" - -## -# Snippet for the get_http_route call in the NetworkServices 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::NetworkServices::V1::NetworkServices::Client#get_http_route. -# -def get_http_route - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::NetworkServices::V1::GetHttpRouteRequest.new - - # Call the get_http_route method. - result = client.get_http_route request - - # The returned object is of type Google::Cloud::NetworkServices::V1::HttpRoute. - p result -end -# [END networkservices_v1_generated_NetworkServices_GetHttpRoute_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/get_mesh.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/get_mesh.rb deleted file mode 100644 index 4c03bbdea364..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/get_mesh.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 networkservices_v1_generated_NetworkServices_GetMesh_sync] -require "google/cloud/network_services/v1" - -## -# Snippet for the get_mesh call in the NetworkServices 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::NetworkServices::V1::NetworkServices::Client#get_mesh. -# -def get_mesh - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::NetworkServices::V1::GetMeshRequest.new - - # Call the get_mesh method. - result = client.get_mesh request - - # The returned object is of type Google::Cloud::NetworkServices::V1::Mesh. - p result -end -# [END networkservices_v1_generated_NetworkServices_GetMesh_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/get_mesh_route_view.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/get_mesh_route_view.rb deleted file mode 100644 index 94b12e51dd9a..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/get_mesh_route_view.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 networkservices_v1_generated_NetworkServices_GetMeshRouteView_sync] -require "google/cloud/network_services/v1" - -## -# Snippet for the get_mesh_route_view call in the NetworkServices 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::NetworkServices::V1::NetworkServices::Client#get_mesh_route_view. -# -def get_mesh_route_view - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::NetworkServices::V1::GetMeshRouteViewRequest.new - - # Call the get_mesh_route_view method. - result = client.get_mesh_route_view request - - # The returned object is of type Google::Cloud::NetworkServices::V1::MeshRouteView. - p result -end -# [END networkservices_v1_generated_NetworkServices_GetMeshRouteView_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/get_service_binding.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/get_service_binding.rb deleted file mode 100644 index c53b311074b6..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/get_service_binding.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 networkservices_v1_generated_NetworkServices_GetServiceBinding_sync] -require "google/cloud/network_services/v1" - -## -# Snippet for the get_service_binding call in the NetworkServices 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::NetworkServices::V1::NetworkServices::Client#get_service_binding. -# -def get_service_binding - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::NetworkServices::V1::GetServiceBindingRequest.new - - # Call the get_service_binding method. - result = client.get_service_binding request - - # The returned object is of type Google::Cloud::NetworkServices::V1::ServiceBinding. - p result -end -# [END networkservices_v1_generated_NetworkServices_GetServiceBinding_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/get_service_lb_policy.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/get_service_lb_policy.rb deleted file mode 100644 index 177cbae5a00e..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/get_service_lb_policy.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 networkservices_v1_generated_NetworkServices_GetServiceLbPolicy_sync] -require "google/cloud/network_services/v1" - -## -# Snippet for the get_service_lb_policy call in the NetworkServices 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::NetworkServices::V1::NetworkServices::Client#get_service_lb_policy. -# -def get_service_lb_policy - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::NetworkServices::V1::GetServiceLbPolicyRequest.new - - # Call the get_service_lb_policy method. - result = client.get_service_lb_policy request - - # The returned object is of type Google::Cloud::NetworkServices::V1::ServiceLbPolicy. - p result -end -# [END networkservices_v1_generated_NetworkServices_GetServiceLbPolicy_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/get_tcp_route.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/get_tcp_route.rb deleted file mode 100644 index 752be5a27b33..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/get_tcp_route.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 networkservices_v1_generated_NetworkServices_GetTcpRoute_sync] -require "google/cloud/network_services/v1" - -## -# Snippet for the get_tcp_route call in the NetworkServices 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::NetworkServices::V1::NetworkServices::Client#get_tcp_route. -# -def get_tcp_route - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::NetworkServices::V1::GetTcpRouteRequest.new - - # Call the get_tcp_route method. - result = client.get_tcp_route request - - # The returned object is of type Google::Cloud::NetworkServices::V1::TcpRoute. - p result -end -# [END networkservices_v1_generated_NetworkServices_GetTcpRoute_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/get_tls_route.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/get_tls_route.rb deleted file mode 100644 index 0d58a8669da1..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/get_tls_route.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 networkservices_v1_generated_NetworkServices_GetTlsRoute_sync] -require "google/cloud/network_services/v1" - -## -# Snippet for the get_tls_route call in the NetworkServices 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::NetworkServices::V1::NetworkServices::Client#get_tls_route. -# -def get_tls_route - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::NetworkServices::V1::GetTlsRouteRequest.new - - # Call the get_tls_route method. - result = client.get_tls_route request - - # The returned object is of type Google::Cloud::NetworkServices::V1::TlsRoute. - p result -end -# [END networkservices_v1_generated_NetworkServices_GetTlsRoute_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/get_wasm_plugin.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/get_wasm_plugin.rb deleted file mode 100644 index 71e2764be6c7..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/get_wasm_plugin.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 networkservices_v1_generated_NetworkServices_GetWasmPlugin_sync] -require "google/cloud/network_services/v1" - -## -# Snippet for the get_wasm_plugin call in the NetworkServices 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::NetworkServices::V1::NetworkServices::Client#get_wasm_plugin. -# -def get_wasm_plugin - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::NetworkServices::V1::GetWasmPluginRequest.new - - # Call the get_wasm_plugin method. - result = client.get_wasm_plugin request - - # The returned object is of type Google::Cloud::NetworkServices::V1::WasmPlugin. - p result -end -# [END networkservices_v1_generated_NetworkServices_GetWasmPlugin_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/get_wasm_plugin_version.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/get_wasm_plugin_version.rb deleted file mode 100644 index d3b8cbb231dd..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/get_wasm_plugin_version.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 networkservices_v1_generated_NetworkServices_GetWasmPluginVersion_sync] -require "google/cloud/network_services/v1" - -## -# Snippet for the get_wasm_plugin_version call in the NetworkServices 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::NetworkServices::V1::NetworkServices::Client#get_wasm_plugin_version. -# -def get_wasm_plugin_version - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::NetworkServices::V1::GetWasmPluginVersionRequest.new - - # Call the get_wasm_plugin_version method. - result = client.get_wasm_plugin_version request - - # The returned object is of type Google::Cloud::NetworkServices::V1::WasmPluginVersion. - p result -end -# [END networkservices_v1_generated_NetworkServices_GetWasmPluginVersion_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/list_endpoint_policies.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/list_endpoint_policies.rb deleted file mode 100644 index 80f363ddf94e..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/list_endpoint_policies.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 networkservices_v1_generated_NetworkServices_ListEndpointPolicies_sync] -require "google/cloud/network_services/v1" - -## -# Snippet for the list_endpoint_policies call in the NetworkServices 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::NetworkServices::V1::NetworkServices::Client#list_endpoint_policies. -# -def list_endpoint_policies - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::NetworkServices::V1::ListEndpointPoliciesRequest.new - - # Call the list_endpoint_policies method. - result = client.list_endpoint_policies 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::NetworkServices::V1::EndpointPolicy. - p item - end -end -# [END networkservices_v1_generated_NetworkServices_ListEndpointPolicies_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/list_gateway_route_views.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/list_gateway_route_views.rb deleted file mode 100644 index bf70b18fd3e1..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/list_gateway_route_views.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 networkservices_v1_generated_NetworkServices_ListGatewayRouteViews_sync] -require "google/cloud/network_services/v1" - -## -# Snippet for the list_gateway_route_views call in the NetworkServices 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::NetworkServices::V1::NetworkServices::Client#list_gateway_route_views. -# -def list_gateway_route_views - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::NetworkServices::V1::ListGatewayRouteViewsRequest.new - - # Call the list_gateway_route_views method. - result = client.list_gateway_route_views 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::NetworkServices::V1::GatewayRouteView. - p item - end -end -# [END networkservices_v1_generated_NetworkServices_ListGatewayRouteViews_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/list_gateways.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/list_gateways.rb deleted file mode 100644 index b76c468e6040..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/list_gateways.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 networkservices_v1_generated_NetworkServices_ListGateways_sync] -require "google/cloud/network_services/v1" - -## -# Snippet for the list_gateways call in the NetworkServices 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::NetworkServices::V1::NetworkServices::Client#list_gateways. -# -def list_gateways - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::NetworkServices::V1::ListGatewaysRequest.new - - # Call the list_gateways method. - result = client.list_gateways 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::NetworkServices::V1::Gateway. - p item - end -end -# [END networkservices_v1_generated_NetworkServices_ListGateways_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/list_grpc_routes.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/list_grpc_routes.rb deleted file mode 100644 index e05e41499496..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/list_grpc_routes.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 networkservices_v1_generated_NetworkServices_ListGrpcRoutes_sync] -require "google/cloud/network_services/v1" - -## -# Snippet for the list_grpc_routes call in the NetworkServices 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::NetworkServices::V1::NetworkServices::Client#list_grpc_routes. -# -def list_grpc_routes - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::NetworkServices::V1::ListGrpcRoutesRequest.new - - # Call the list_grpc_routes method. - result = client.list_grpc_routes 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::NetworkServices::V1::GrpcRoute. - p item - end -end -# [END networkservices_v1_generated_NetworkServices_ListGrpcRoutes_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/list_http_routes.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/list_http_routes.rb deleted file mode 100644 index 906f35e99306..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/list_http_routes.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 networkservices_v1_generated_NetworkServices_ListHttpRoutes_sync] -require "google/cloud/network_services/v1" - -## -# Snippet for the list_http_routes call in the NetworkServices 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::NetworkServices::V1::NetworkServices::Client#list_http_routes. -# -def list_http_routes - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::NetworkServices::V1::ListHttpRoutesRequest.new - - # Call the list_http_routes method. - result = client.list_http_routes 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::NetworkServices::V1::HttpRoute. - p item - end -end -# [END networkservices_v1_generated_NetworkServices_ListHttpRoutes_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/list_mesh_route_views.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/list_mesh_route_views.rb deleted file mode 100644 index db2969a594b5..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/list_mesh_route_views.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 networkservices_v1_generated_NetworkServices_ListMeshRouteViews_sync] -require "google/cloud/network_services/v1" - -## -# Snippet for the list_mesh_route_views call in the NetworkServices 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::NetworkServices::V1::NetworkServices::Client#list_mesh_route_views. -# -def list_mesh_route_views - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::NetworkServices::V1::ListMeshRouteViewsRequest.new - - # Call the list_mesh_route_views method. - result = client.list_mesh_route_views 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::NetworkServices::V1::MeshRouteView. - p item - end -end -# [END networkservices_v1_generated_NetworkServices_ListMeshRouteViews_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/list_meshes.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/list_meshes.rb deleted file mode 100644 index 9328e9df834b..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/list_meshes.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 networkservices_v1_generated_NetworkServices_ListMeshes_sync] -require "google/cloud/network_services/v1" - -## -# Snippet for the list_meshes call in the NetworkServices 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::NetworkServices::V1::NetworkServices::Client#list_meshes. -# -def list_meshes - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::NetworkServices::V1::ListMeshesRequest.new - - # Call the list_meshes method. - result = client.list_meshes 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::NetworkServices::V1::Mesh. - p item - end -end -# [END networkservices_v1_generated_NetworkServices_ListMeshes_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/list_service_bindings.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/list_service_bindings.rb deleted file mode 100644 index be1be326d51a..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/list_service_bindings.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 networkservices_v1_generated_NetworkServices_ListServiceBindings_sync] -require "google/cloud/network_services/v1" - -## -# Snippet for the list_service_bindings call in the NetworkServices 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::NetworkServices::V1::NetworkServices::Client#list_service_bindings. -# -def list_service_bindings - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::NetworkServices::V1::ListServiceBindingsRequest.new - - # Call the list_service_bindings method. - result = client.list_service_bindings 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::NetworkServices::V1::ServiceBinding. - p item - end -end -# [END networkservices_v1_generated_NetworkServices_ListServiceBindings_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/list_service_lb_policies.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/list_service_lb_policies.rb deleted file mode 100644 index d964f2a5d0df..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/list_service_lb_policies.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 networkservices_v1_generated_NetworkServices_ListServiceLbPolicies_sync] -require "google/cloud/network_services/v1" - -## -# Snippet for the list_service_lb_policies call in the NetworkServices 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::NetworkServices::V1::NetworkServices::Client#list_service_lb_policies. -# -def list_service_lb_policies - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::NetworkServices::V1::ListServiceLbPoliciesRequest.new - - # Call the list_service_lb_policies method. - result = client.list_service_lb_policies 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::NetworkServices::V1::ServiceLbPolicy. - p item - end -end -# [END networkservices_v1_generated_NetworkServices_ListServiceLbPolicies_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/list_tcp_routes.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/list_tcp_routes.rb deleted file mode 100644 index e521f13c50c7..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/list_tcp_routes.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 networkservices_v1_generated_NetworkServices_ListTcpRoutes_sync] -require "google/cloud/network_services/v1" - -## -# Snippet for the list_tcp_routes call in the NetworkServices 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::NetworkServices::V1::NetworkServices::Client#list_tcp_routes. -# -def list_tcp_routes - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::NetworkServices::V1::ListTcpRoutesRequest.new - - # Call the list_tcp_routes method. - result = client.list_tcp_routes 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::NetworkServices::V1::TcpRoute. - p item - end -end -# [END networkservices_v1_generated_NetworkServices_ListTcpRoutes_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/list_tls_routes.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/list_tls_routes.rb deleted file mode 100644 index 8ac101b92cba..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/list_tls_routes.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 networkservices_v1_generated_NetworkServices_ListTlsRoutes_sync] -require "google/cloud/network_services/v1" - -## -# Snippet for the list_tls_routes call in the NetworkServices 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::NetworkServices::V1::NetworkServices::Client#list_tls_routes. -# -def list_tls_routes - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::NetworkServices::V1::ListTlsRoutesRequest.new - - # Call the list_tls_routes method. - result = client.list_tls_routes 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::NetworkServices::V1::TlsRoute. - p item - end -end -# [END networkservices_v1_generated_NetworkServices_ListTlsRoutes_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/list_wasm_plugin_versions.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/list_wasm_plugin_versions.rb deleted file mode 100644 index 10c3321d69b7..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/list_wasm_plugin_versions.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 networkservices_v1_generated_NetworkServices_ListWasmPluginVersions_sync] -require "google/cloud/network_services/v1" - -## -# Snippet for the list_wasm_plugin_versions call in the NetworkServices 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::NetworkServices::V1::NetworkServices::Client#list_wasm_plugin_versions. -# -def list_wasm_plugin_versions - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::NetworkServices::V1::ListWasmPluginVersionsRequest.new - - # Call the list_wasm_plugin_versions method. - result = client.list_wasm_plugin_versions 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::NetworkServices::V1::WasmPluginVersion. - p item - end -end -# [END networkservices_v1_generated_NetworkServices_ListWasmPluginVersions_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/list_wasm_plugins.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/list_wasm_plugins.rb deleted file mode 100644 index 4cf013595d0f..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/list_wasm_plugins.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 networkservices_v1_generated_NetworkServices_ListWasmPlugins_sync] -require "google/cloud/network_services/v1" - -## -# Snippet for the list_wasm_plugins call in the NetworkServices 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::NetworkServices::V1::NetworkServices::Client#list_wasm_plugins. -# -def list_wasm_plugins - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::NetworkServices::V1::ListWasmPluginsRequest.new - - # Call the list_wasm_plugins method. - result = client.list_wasm_plugins 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::NetworkServices::V1::WasmPlugin. - p item - end -end -# [END networkservices_v1_generated_NetworkServices_ListWasmPlugins_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/update_endpoint_policy.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/update_endpoint_policy.rb deleted file mode 100644 index c636c6774100..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/update_endpoint_policy.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 networkservices_v1_generated_NetworkServices_UpdateEndpointPolicy_sync] -require "google/cloud/network_services/v1" - -## -# Snippet for the update_endpoint_policy call in the NetworkServices 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::NetworkServices::V1::NetworkServices::Client#update_endpoint_policy. -# -def update_endpoint_policy - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::NetworkServices::V1::UpdateEndpointPolicyRequest.new - - # Call the update_endpoint_policy method. - result = client.update_endpoint_policy 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 networkservices_v1_generated_NetworkServices_UpdateEndpointPolicy_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/update_gateway.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/update_gateway.rb deleted file mode 100644 index 27ca3e6e8207..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/update_gateway.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 networkservices_v1_generated_NetworkServices_UpdateGateway_sync] -require "google/cloud/network_services/v1" - -## -# Snippet for the update_gateway call in the NetworkServices 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::NetworkServices::V1::NetworkServices::Client#update_gateway. -# -def update_gateway - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::NetworkServices::V1::UpdateGatewayRequest.new - - # Call the update_gateway method. - result = client.update_gateway 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 networkservices_v1_generated_NetworkServices_UpdateGateway_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/update_grpc_route.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/update_grpc_route.rb deleted file mode 100644 index 76a9d3fcbd6b..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/update_grpc_route.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 networkservices_v1_generated_NetworkServices_UpdateGrpcRoute_sync] -require "google/cloud/network_services/v1" - -## -# Snippet for the update_grpc_route call in the NetworkServices 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::NetworkServices::V1::NetworkServices::Client#update_grpc_route. -# -def update_grpc_route - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::NetworkServices::V1::UpdateGrpcRouteRequest.new - - # Call the update_grpc_route method. - result = client.update_grpc_route 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 networkservices_v1_generated_NetworkServices_UpdateGrpcRoute_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/update_http_route.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/update_http_route.rb deleted file mode 100644 index 76ed37a09560..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/update_http_route.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 networkservices_v1_generated_NetworkServices_UpdateHttpRoute_sync] -require "google/cloud/network_services/v1" - -## -# Snippet for the update_http_route call in the NetworkServices 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::NetworkServices::V1::NetworkServices::Client#update_http_route. -# -def update_http_route - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::NetworkServices::V1::UpdateHttpRouteRequest.new - - # Call the update_http_route method. - result = client.update_http_route 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 networkservices_v1_generated_NetworkServices_UpdateHttpRoute_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/update_mesh.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/update_mesh.rb deleted file mode 100644 index 0ce24a587521..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/update_mesh.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 networkservices_v1_generated_NetworkServices_UpdateMesh_sync] -require "google/cloud/network_services/v1" - -## -# Snippet for the update_mesh call in the NetworkServices 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::NetworkServices::V1::NetworkServices::Client#update_mesh. -# -def update_mesh - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::NetworkServices::V1::UpdateMeshRequest.new - - # Call the update_mesh method. - result = client.update_mesh 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 networkservices_v1_generated_NetworkServices_UpdateMesh_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/update_service_binding.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/update_service_binding.rb deleted file mode 100644 index c3402c83f387..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/update_service_binding.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 networkservices_v1_generated_NetworkServices_UpdateServiceBinding_sync] -require "google/cloud/network_services/v1" - -## -# Snippet for the update_service_binding call in the NetworkServices 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::NetworkServices::V1::NetworkServices::Client#update_service_binding. -# -def update_service_binding - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::NetworkServices::V1::UpdateServiceBindingRequest.new - - # Call the update_service_binding method. - result = client.update_service_binding 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 networkservices_v1_generated_NetworkServices_UpdateServiceBinding_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/update_service_lb_policy.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/update_service_lb_policy.rb deleted file mode 100644 index e6bb846f0396..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/update_service_lb_policy.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 networkservices_v1_generated_NetworkServices_UpdateServiceLbPolicy_sync] -require "google/cloud/network_services/v1" - -## -# Snippet for the update_service_lb_policy call in the NetworkServices 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::NetworkServices::V1::NetworkServices::Client#update_service_lb_policy. -# -def update_service_lb_policy - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::NetworkServices::V1::UpdateServiceLbPolicyRequest.new - - # Call the update_service_lb_policy method. - result = client.update_service_lb_policy 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 networkservices_v1_generated_NetworkServices_UpdateServiceLbPolicy_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/update_tcp_route.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/update_tcp_route.rb deleted file mode 100644 index 318dc7fefbbb..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/update_tcp_route.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 networkservices_v1_generated_NetworkServices_UpdateTcpRoute_sync] -require "google/cloud/network_services/v1" - -## -# Snippet for the update_tcp_route call in the NetworkServices 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::NetworkServices::V1::NetworkServices::Client#update_tcp_route. -# -def update_tcp_route - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::NetworkServices::V1::UpdateTcpRouteRequest.new - - # Call the update_tcp_route method. - result = client.update_tcp_route 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 networkservices_v1_generated_NetworkServices_UpdateTcpRoute_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/update_tls_route.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/update_tls_route.rb deleted file mode 100644 index 3277355fabb3..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/update_tls_route.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 networkservices_v1_generated_NetworkServices_UpdateTlsRoute_sync] -require "google/cloud/network_services/v1" - -## -# Snippet for the update_tls_route call in the NetworkServices 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::NetworkServices::V1::NetworkServices::Client#update_tls_route. -# -def update_tls_route - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::NetworkServices::V1::UpdateTlsRouteRequest.new - - # Call the update_tls_route method. - result = client.update_tls_route 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 networkservices_v1_generated_NetworkServices_UpdateTlsRoute_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/update_wasm_plugin.rb b/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/update_wasm_plugin.rb deleted file mode 100644 index f8f374a19789..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/snippets/network_services/update_wasm_plugin.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 networkservices_v1_generated_NetworkServices_UpdateWasmPlugin_sync] -require "google/cloud/network_services/v1" - -## -# Snippet for the update_wasm_plugin call in the NetworkServices 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::NetworkServices::V1::NetworkServices::Client#update_wasm_plugin. -# -def update_wasm_plugin - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::NetworkServices::V1::NetworkServices::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::NetworkServices::V1::UpdateWasmPluginRequest.new - - # Call the update_wasm_plugin method. - result = client.update_wasm_plugin 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 networkservices_v1_generated_NetworkServices_UpdateWasmPlugin_sync] diff --git a/owl-bot-staging/google-cloud-network_services-v1/snippets/snippet_metadata_google.cloud.networkservices.v1.json b/owl-bot-staging/google-cloud-network_services-v1/snippets/snippet_metadata_google.cloud.networkservices.v1.json deleted file mode 100644 index f6cee93bb4b4..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/snippets/snippet_metadata_google.cloud.networkservices.v1.json +++ /dev/null @@ -1,3335 +0,0 @@ -{ - "client_library": { - "name": "google-cloud-network_services-v1", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "google.cloud.networkservices.v1", - "version": "v1" - } - ] - }, - "snippets": [ - { - "region_tag": "networkservices_v1_generated_DepService_ListLbTrafficExtensions_sync", - "title": "Snippet for the list_lb_traffic_extensions call in the DepService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::DepService::Client#list_lb_traffic_extensions.", - "file": "dep_service/list_lb_traffic_extensions.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_lb_traffic_extensions", - "full_name": "::Google::Cloud::NetworkServices::V1::DepService::Client#list_lb_traffic_extensions", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::NetworkServices::V1::ListLbTrafficExtensionsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::NetworkServices::V1::ListLbTrafficExtensionsResponse", - "client": { - "short_name": "DepService::Client", - "full_name": "::Google::Cloud::NetworkServices::V1::DepService::Client" - }, - "method": { - "short_name": "ListLbTrafficExtensions", - "full_name": "google.cloud.networkservices.v1.DepService.ListLbTrafficExtensions", - "service": { - "short_name": "DepService", - "full_name": "google.cloud.networkservices.v1.DepService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "networkservices_v1_generated_DepService_GetLbTrafficExtension_sync", - "title": "Snippet for the get_lb_traffic_extension call in the DepService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::DepService::Client#get_lb_traffic_extension.", - "file": "dep_service/get_lb_traffic_extension.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_lb_traffic_extension", - "full_name": "::Google::Cloud::NetworkServices::V1::DepService::Client#get_lb_traffic_extension", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::NetworkServices::V1::GetLbTrafficExtensionRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::NetworkServices::V1::LbTrafficExtension", - "client": { - "short_name": "DepService::Client", - "full_name": "::Google::Cloud::NetworkServices::V1::DepService::Client" - }, - "method": { - "short_name": "GetLbTrafficExtension", - "full_name": "google.cloud.networkservices.v1.DepService.GetLbTrafficExtension", - "service": { - "short_name": "DepService", - "full_name": "google.cloud.networkservices.v1.DepService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "networkservices_v1_generated_DepService_CreateLbTrafficExtension_sync", - "title": "Snippet for the create_lb_traffic_extension call in the DepService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::DepService::Client#create_lb_traffic_extension.", - "file": "dep_service/create_lb_traffic_extension.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_lb_traffic_extension", - "full_name": "::Google::Cloud::NetworkServices::V1::DepService::Client#create_lb_traffic_extension", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::NetworkServices::V1::CreateLbTrafficExtensionRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "DepService::Client", - "full_name": "::Google::Cloud::NetworkServices::V1::DepService::Client" - }, - "method": { - "short_name": "CreateLbTrafficExtension", - "full_name": "google.cloud.networkservices.v1.DepService.CreateLbTrafficExtension", - "service": { - "short_name": "DepService", - "full_name": "google.cloud.networkservices.v1.DepService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "networkservices_v1_generated_DepService_UpdateLbTrafficExtension_sync", - "title": "Snippet for the update_lb_traffic_extension call in the DepService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::DepService::Client#update_lb_traffic_extension.", - "file": "dep_service/update_lb_traffic_extension.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_lb_traffic_extension", - "full_name": "::Google::Cloud::NetworkServices::V1::DepService::Client#update_lb_traffic_extension", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::NetworkServices::V1::UpdateLbTrafficExtensionRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "DepService::Client", - "full_name": "::Google::Cloud::NetworkServices::V1::DepService::Client" - }, - "method": { - "short_name": "UpdateLbTrafficExtension", - "full_name": "google.cloud.networkservices.v1.DepService.UpdateLbTrafficExtension", - "service": { - "short_name": "DepService", - "full_name": "google.cloud.networkservices.v1.DepService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "networkservices_v1_generated_DepService_DeleteLbTrafficExtension_sync", - "title": "Snippet for the delete_lb_traffic_extension call in the DepService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::DepService::Client#delete_lb_traffic_extension.", - "file": "dep_service/delete_lb_traffic_extension.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_lb_traffic_extension", - "full_name": "::Google::Cloud::NetworkServices::V1::DepService::Client#delete_lb_traffic_extension", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::NetworkServices::V1::DeleteLbTrafficExtensionRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "DepService::Client", - "full_name": "::Google::Cloud::NetworkServices::V1::DepService::Client" - }, - "method": { - "short_name": "DeleteLbTrafficExtension", - "full_name": "google.cloud.networkservices.v1.DepService.DeleteLbTrafficExtension", - "service": { - "short_name": "DepService", - "full_name": "google.cloud.networkservices.v1.DepService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "networkservices_v1_generated_DepService_ListLbRouteExtensions_sync", - "title": "Snippet for the list_lb_route_extensions call in the DepService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::DepService::Client#list_lb_route_extensions.", - "file": "dep_service/list_lb_route_extensions.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_lb_route_extensions", - "full_name": "::Google::Cloud::NetworkServices::V1::DepService::Client#list_lb_route_extensions", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::NetworkServices::V1::ListLbRouteExtensionsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::NetworkServices::V1::ListLbRouteExtensionsResponse", - "client": { - "short_name": "DepService::Client", - "full_name": "::Google::Cloud::NetworkServices::V1::DepService::Client" - }, - "method": { - "short_name": "ListLbRouteExtensions", - "full_name": "google.cloud.networkservices.v1.DepService.ListLbRouteExtensions", - "service": { - "short_name": "DepService", - "full_name": "google.cloud.networkservices.v1.DepService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "networkservices_v1_generated_DepService_GetLbRouteExtension_sync", - "title": "Snippet for the get_lb_route_extension call in the DepService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::DepService::Client#get_lb_route_extension.", - "file": "dep_service/get_lb_route_extension.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_lb_route_extension", - "full_name": "::Google::Cloud::NetworkServices::V1::DepService::Client#get_lb_route_extension", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::NetworkServices::V1::GetLbRouteExtensionRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::NetworkServices::V1::LbRouteExtension", - "client": { - "short_name": "DepService::Client", - "full_name": "::Google::Cloud::NetworkServices::V1::DepService::Client" - }, - "method": { - "short_name": "GetLbRouteExtension", - "full_name": "google.cloud.networkservices.v1.DepService.GetLbRouteExtension", - "service": { - "short_name": "DepService", - "full_name": "google.cloud.networkservices.v1.DepService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "networkservices_v1_generated_DepService_CreateLbRouteExtension_sync", - "title": "Snippet for the create_lb_route_extension call in the DepService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::DepService::Client#create_lb_route_extension.", - "file": "dep_service/create_lb_route_extension.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_lb_route_extension", - "full_name": "::Google::Cloud::NetworkServices::V1::DepService::Client#create_lb_route_extension", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::NetworkServices::V1::CreateLbRouteExtensionRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "DepService::Client", - "full_name": "::Google::Cloud::NetworkServices::V1::DepService::Client" - }, - "method": { - "short_name": "CreateLbRouteExtension", - "full_name": "google.cloud.networkservices.v1.DepService.CreateLbRouteExtension", - "service": { - "short_name": "DepService", - "full_name": "google.cloud.networkservices.v1.DepService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "networkservices_v1_generated_DepService_UpdateLbRouteExtension_sync", - "title": "Snippet for the update_lb_route_extension call in the DepService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::DepService::Client#update_lb_route_extension.", - "file": "dep_service/update_lb_route_extension.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_lb_route_extension", - "full_name": "::Google::Cloud::NetworkServices::V1::DepService::Client#update_lb_route_extension", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::NetworkServices::V1::UpdateLbRouteExtensionRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "DepService::Client", - "full_name": "::Google::Cloud::NetworkServices::V1::DepService::Client" - }, - "method": { - "short_name": "UpdateLbRouteExtension", - "full_name": "google.cloud.networkservices.v1.DepService.UpdateLbRouteExtension", - "service": { - "short_name": "DepService", - "full_name": "google.cloud.networkservices.v1.DepService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "networkservices_v1_generated_DepService_DeleteLbRouteExtension_sync", - "title": "Snippet for the delete_lb_route_extension call in the DepService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::DepService::Client#delete_lb_route_extension.", - "file": "dep_service/delete_lb_route_extension.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_lb_route_extension", - "full_name": "::Google::Cloud::NetworkServices::V1::DepService::Client#delete_lb_route_extension", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::NetworkServices::V1::DeleteLbRouteExtensionRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "DepService::Client", - "full_name": "::Google::Cloud::NetworkServices::V1::DepService::Client" - }, - "method": { - "short_name": "DeleteLbRouteExtension", - "full_name": "google.cloud.networkservices.v1.DepService.DeleteLbRouteExtension", - "service": { - "short_name": "DepService", - "full_name": "google.cloud.networkservices.v1.DepService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "networkservices_v1_generated_DepService_ListLbEdgeExtensions_sync", - "title": "Snippet for the list_lb_edge_extensions call in the DepService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::DepService::Client#list_lb_edge_extensions.", - "file": "dep_service/list_lb_edge_extensions.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_lb_edge_extensions", - "full_name": "::Google::Cloud::NetworkServices::V1::DepService::Client#list_lb_edge_extensions", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::NetworkServices::V1::ListLbEdgeExtensionsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::NetworkServices::V1::ListLbEdgeExtensionsResponse", - "client": { - "short_name": "DepService::Client", - "full_name": "::Google::Cloud::NetworkServices::V1::DepService::Client" - }, - "method": { - "short_name": "ListLbEdgeExtensions", - "full_name": "google.cloud.networkservices.v1.DepService.ListLbEdgeExtensions", - "service": { - "short_name": "DepService", - "full_name": "google.cloud.networkservices.v1.DepService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "networkservices_v1_generated_DepService_GetLbEdgeExtension_sync", - "title": "Snippet for the get_lb_edge_extension call in the DepService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::DepService::Client#get_lb_edge_extension.", - "file": "dep_service/get_lb_edge_extension.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_lb_edge_extension", - "full_name": "::Google::Cloud::NetworkServices::V1::DepService::Client#get_lb_edge_extension", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::NetworkServices::V1::GetLbEdgeExtensionRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::NetworkServices::V1::LbEdgeExtension", - "client": { - "short_name": "DepService::Client", - "full_name": "::Google::Cloud::NetworkServices::V1::DepService::Client" - }, - "method": { - "short_name": "GetLbEdgeExtension", - "full_name": "google.cloud.networkservices.v1.DepService.GetLbEdgeExtension", - "service": { - "short_name": "DepService", - "full_name": "google.cloud.networkservices.v1.DepService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "networkservices_v1_generated_DepService_CreateLbEdgeExtension_sync", - "title": "Snippet for the create_lb_edge_extension call in the DepService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::DepService::Client#create_lb_edge_extension.", - "file": "dep_service/create_lb_edge_extension.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_lb_edge_extension", - "full_name": "::Google::Cloud::NetworkServices::V1::DepService::Client#create_lb_edge_extension", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::NetworkServices::V1::CreateLbEdgeExtensionRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "DepService::Client", - "full_name": "::Google::Cloud::NetworkServices::V1::DepService::Client" - }, - "method": { - "short_name": "CreateLbEdgeExtension", - "full_name": "google.cloud.networkservices.v1.DepService.CreateLbEdgeExtension", - "service": { - "short_name": "DepService", - "full_name": "google.cloud.networkservices.v1.DepService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "networkservices_v1_generated_DepService_UpdateLbEdgeExtension_sync", - "title": "Snippet for the update_lb_edge_extension call in the DepService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::DepService::Client#update_lb_edge_extension.", - "file": "dep_service/update_lb_edge_extension.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_lb_edge_extension", - "full_name": "::Google::Cloud::NetworkServices::V1::DepService::Client#update_lb_edge_extension", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::NetworkServices::V1::UpdateLbEdgeExtensionRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "DepService::Client", - "full_name": "::Google::Cloud::NetworkServices::V1::DepService::Client" - }, - "method": { - "short_name": "UpdateLbEdgeExtension", - "full_name": "google.cloud.networkservices.v1.DepService.UpdateLbEdgeExtension", - "service": { - "short_name": "DepService", - "full_name": "google.cloud.networkservices.v1.DepService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "networkservices_v1_generated_DepService_DeleteLbEdgeExtension_sync", - "title": "Snippet for the delete_lb_edge_extension call in the DepService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::DepService::Client#delete_lb_edge_extension.", - "file": "dep_service/delete_lb_edge_extension.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_lb_edge_extension", - "full_name": "::Google::Cloud::NetworkServices::V1::DepService::Client#delete_lb_edge_extension", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::NetworkServices::V1::DeleteLbEdgeExtensionRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "DepService::Client", - "full_name": "::Google::Cloud::NetworkServices::V1::DepService::Client" - }, - "method": { - "short_name": "DeleteLbEdgeExtension", - "full_name": "google.cloud.networkservices.v1.DepService.DeleteLbEdgeExtension", - "service": { - "short_name": "DepService", - "full_name": "google.cloud.networkservices.v1.DepService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "networkservices_v1_generated_DepService_ListAuthzExtensions_sync", - "title": "Snippet for the list_authz_extensions call in the DepService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::DepService::Client#list_authz_extensions.", - "file": "dep_service/list_authz_extensions.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_authz_extensions", - "full_name": "::Google::Cloud::NetworkServices::V1::DepService::Client#list_authz_extensions", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::NetworkServices::V1::ListAuthzExtensionsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::NetworkServices::V1::ListAuthzExtensionsResponse", - "client": { - "short_name": "DepService::Client", - "full_name": "::Google::Cloud::NetworkServices::V1::DepService::Client" - }, - "method": { - "short_name": "ListAuthzExtensions", - "full_name": "google.cloud.networkservices.v1.DepService.ListAuthzExtensions", - "service": { - "short_name": "DepService", - "full_name": "google.cloud.networkservices.v1.DepService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "networkservices_v1_generated_DepService_GetAuthzExtension_sync", - "title": "Snippet for the get_authz_extension call in the DepService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::DepService::Client#get_authz_extension.", - "file": "dep_service/get_authz_extension.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_authz_extension", - "full_name": "::Google::Cloud::NetworkServices::V1::DepService::Client#get_authz_extension", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::NetworkServices::V1::GetAuthzExtensionRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::NetworkServices::V1::AuthzExtension", - "client": { - "short_name": "DepService::Client", - "full_name": "::Google::Cloud::NetworkServices::V1::DepService::Client" - }, - "method": { - "short_name": "GetAuthzExtension", - "full_name": "google.cloud.networkservices.v1.DepService.GetAuthzExtension", - "service": { - "short_name": "DepService", - "full_name": "google.cloud.networkservices.v1.DepService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "networkservices_v1_generated_DepService_CreateAuthzExtension_sync", - "title": "Snippet for the create_authz_extension call in the DepService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::DepService::Client#create_authz_extension.", - "file": "dep_service/create_authz_extension.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_authz_extension", - "full_name": "::Google::Cloud::NetworkServices::V1::DepService::Client#create_authz_extension", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::NetworkServices::V1::CreateAuthzExtensionRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "DepService::Client", - "full_name": "::Google::Cloud::NetworkServices::V1::DepService::Client" - }, - "method": { - "short_name": "CreateAuthzExtension", - "full_name": "google.cloud.networkservices.v1.DepService.CreateAuthzExtension", - "service": { - "short_name": "DepService", - "full_name": "google.cloud.networkservices.v1.DepService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "networkservices_v1_generated_DepService_UpdateAuthzExtension_sync", - "title": "Snippet for the update_authz_extension call in the DepService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::DepService::Client#update_authz_extension.", - "file": "dep_service/update_authz_extension.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_authz_extension", - "full_name": "::Google::Cloud::NetworkServices::V1::DepService::Client#update_authz_extension", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::NetworkServices::V1::UpdateAuthzExtensionRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "DepService::Client", - "full_name": "::Google::Cloud::NetworkServices::V1::DepService::Client" - }, - "method": { - "short_name": "UpdateAuthzExtension", - "full_name": "google.cloud.networkservices.v1.DepService.UpdateAuthzExtension", - "service": { - "short_name": "DepService", - "full_name": "google.cloud.networkservices.v1.DepService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "networkservices_v1_generated_DepService_DeleteAuthzExtension_sync", - "title": "Snippet for the delete_authz_extension call in the DepService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::DepService::Client#delete_authz_extension.", - "file": "dep_service/delete_authz_extension.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_authz_extension", - "full_name": "::Google::Cloud::NetworkServices::V1::DepService::Client#delete_authz_extension", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::NetworkServices::V1::DeleteAuthzExtensionRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "DepService::Client", - "full_name": "::Google::Cloud::NetworkServices::V1::DepService::Client" - }, - "method": { - "short_name": "DeleteAuthzExtension", - "full_name": "google.cloud.networkservices.v1.DepService.DeleteAuthzExtension", - "service": { - "short_name": "DepService", - "full_name": "google.cloud.networkservices.v1.DepService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "networkservices_v1_generated_NetworkServices_ListEndpointPolicies_sync", - "title": "Snippet for the list_endpoint_policies call in the NetworkServices service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#list_endpoint_policies.", - "file": "network_services/list_endpoint_policies.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_endpoint_policies", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#list_endpoint_policies", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::NetworkServices::V1::ListEndpointPoliciesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::NetworkServices::V1::ListEndpointPoliciesResponse", - "client": { - "short_name": "NetworkServices::Client", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" - }, - "method": { - "short_name": "ListEndpointPolicies", - "full_name": "google.cloud.networkservices.v1.NetworkServices.ListEndpointPolicies", - "service": { - "short_name": "NetworkServices", - "full_name": "google.cloud.networkservices.v1.NetworkServices" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "networkservices_v1_generated_NetworkServices_GetEndpointPolicy_sync", - "title": "Snippet for the get_endpoint_policy call in the NetworkServices service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#get_endpoint_policy.", - "file": "network_services/get_endpoint_policy.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_endpoint_policy", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#get_endpoint_policy", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::NetworkServices::V1::GetEndpointPolicyRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::NetworkServices::V1::EndpointPolicy", - "client": { - "short_name": "NetworkServices::Client", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" - }, - "method": { - "short_name": "GetEndpointPolicy", - "full_name": "google.cloud.networkservices.v1.NetworkServices.GetEndpointPolicy", - "service": { - "short_name": "NetworkServices", - "full_name": "google.cloud.networkservices.v1.NetworkServices" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "networkservices_v1_generated_NetworkServices_CreateEndpointPolicy_sync", - "title": "Snippet for the create_endpoint_policy call in the NetworkServices service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#create_endpoint_policy.", - "file": "network_services/create_endpoint_policy.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_endpoint_policy", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#create_endpoint_policy", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::NetworkServices::V1::CreateEndpointPolicyRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "NetworkServices::Client", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" - }, - "method": { - "short_name": "CreateEndpointPolicy", - "full_name": "google.cloud.networkservices.v1.NetworkServices.CreateEndpointPolicy", - "service": { - "short_name": "NetworkServices", - "full_name": "google.cloud.networkservices.v1.NetworkServices" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "networkservices_v1_generated_NetworkServices_UpdateEndpointPolicy_sync", - "title": "Snippet for the update_endpoint_policy call in the NetworkServices service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#update_endpoint_policy.", - "file": "network_services/update_endpoint_policy.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_endpoint_policy", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#update_endpoint_policy", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::NetworkServices::V1::UpdateEndpointPolicyRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "NetworkServices::Client", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" - }, - "method": { - "short_name": "UpdateEndpointPolicy", - "full_name": "google.cloud.networkservices.v1.NetworkServices.UpdateEndpointPolicy", - "service": { - "short_name": "NetworkServices", - "full_name": "google.cloud.networkservices.v1.NetworkServices" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "networkservices_v1_generated_NetworkServices_DeleteEndpointPolicy_sync", - "title": "Snippet for the delete_endpoint_policy call in the NetworkServices service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#delete_endpoint_policy.", - "file": "network_services/delete_endpoint_policy.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_endpoint_policy", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#delete_endpoint_policy", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::NetworkServices::V1::DeleteEndpointPolicyRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "NetworkServices::Client", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" - }, - "method": { - "short_name": "DeleteEndpointPolicy", - "full_name": "google.cloud.networkservices.v1.NetworkServices.DeleteEndpointPolicy", - "service": { - "short_name": "NetworkServices", - "full_name": "google.cloud.networkservices.v1.NetworkServices" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "networkservices_v1_generated_NetworkServices_ListWasmPluginVersions_sync", - "title": "Snippet for the list_wasm_plugin_versions call in the NetworkServices service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#list_wasm_plugin_versions.", - "file": "network_services/list_wasm_plugin_versions.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_wasm_plugin_versions", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#list_wasm_plugin_versions", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::NetworkServices::V1::ListWasmPluginVersionsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::NetworkServices::V1::ListWasmPluginVersionsResponse", - "client": { - "short_name": "NetworkServices::Client", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" - }, - "method": { - "short_name": "ListWasmPluginVersions", - "full_name": "google.cloud.networkservices.v1.NetworkServices.ListWasmPluginVersions", - "service": { - "short_name": "NetworkServices", - "full_name": "google.cloud.networkservices.v1.NetworkServices" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "networkservices_v1_generated_NetworkServices_GetWasmPluginVersion_sync", - "title": "Snippet for the get_wasm_plugin_version call in the NetworkServices service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#get_wasm_plugin_version.", - "file": "network_services/get_wasm_plugin_version.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_wasm_plugin_version", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#get_wasm_plugin_version", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::NetworkServices::V1::GetWasmPluginVersionRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::NetworkServices::V1::WasmPluginVersion", - "client": { - "short_name": "NetworkServices::Client", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" - }, - "method": { - "short_name": "GetWasmPluginVersion", - "full_name": "google.cloud.networkservices.v1.NetworkServices.GetWasmPluginVersion", - "service": { - "short_name": "NetworkServices", - "full_name": "google.cloud.networkservices.v1.NetworkServices" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "networkservices_v1_generated_NetworkServices_CreateWasmPluginVersion_sync", - "title": "Snippet for the create_wasm_plugin_version call in the NetworkServices service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#create_wasm_plugin_version.", - "file": "network_services/create_wasm_plugin_version.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_wasm_plugin_version", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#create_wasm_plugin_version", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::NetworkServices::V1::CreateWasmPluginVersionRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "NetworkServices::Client", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" - }, - "method": { - "short_name": "CreateWasmPluginVersion", - "full_name": "google.cloud.networkservices.v1.NetworkServices.CreateWasmPluginVersion", - "service": { - "short_name": "NetworkServices", - "full_name": "google.cloud.networkservices.v1.NetworkServices" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "networkservices_v1_generated_NetworkServices_DeleteWasmPluginVersion_sync", - "title": "Snippet for the delete_wasm_plugin_version call in the NetworkServices service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#delete_wasm_plugin_version.", - "file": "network_services/delete_wasm_plugin_version.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_wasm_plugin_version", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#delete_wasm_plugin_version", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::NetworkServices::V1::DeleteWasmPluginVersionRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "NetworkServices::Client", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" - }, - "method": { - "short_name": "DeleteWasmPluginVersion", - "full_name": "google.cloud.networkservices.v1.NetworkServices.DeleteWasmPluginVersion", - "service": { - "short_name": "NetworkServices", - "full_name": "google.cloud.networkservices.v1.NetworkServices" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "networkservices_v1_generated_NetworkServices_ListWasmPlugins_sync", - "title": "Snippet for the list_wasm_plugins call in the NetworkServices service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#list_wasm_plugins.", - "file": "network_services/list_wasm_plugins.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_wasm_plugins", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#list_wasm_plugins", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::NetworkServices::V1::ListWasmPluginsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::NetworkServices::V1::ListWasmPluginsResponse", - "client": { - "short_name": "NetworkServices::Client", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" - }, - "method": { - "short_name": "ListWasmPlugins", - "full_name": "google.cloud.networkservices.v1.NetworkServices.ListWasmPlugins", - "service": { - "short_name": "NetworkServices", - "full_name": "google.cloud.networkservices.v1.NetworkServices" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "networkservices_v1_generated_NetworkServices_GetWasmPlugin_sync", - "title": "Snippet for the get_wasm_plugin call in the NetworkServices service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#get_wasm_plugin.", - "file": "network_services/get_wasm_plugin.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_wasm_plugin", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#get_wasm_plugin", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::NetworkServices::V1::GetWasmPluginRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::NetworkServices::V1::WasmPlugin", - "client": { - "short_name": "NetworkServices::Client", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" - }, - "method": { - "short_name": "GetWasmPlugin", - "full_name": "google.cloud.networkservices.v1.NetworkServices.GetWasmPlugin", - "service": { - "short_name": "NetworkServices", - "full_name": "google.cloud.networkservices.v1.NetworkServices" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "networkservices_v1_generated_NetworkServices_CreateWasmPlugin_sync", - "title": "Snippet for the create_wasm_plugin call in the NetworkServices service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#create_wasm_plugin.", - "file": "network_services/create_wasm_plugin.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_wasm_plugin", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#create_wasm_plugin", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::NetworkServices::V1::CreateWasmPluginRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "NetworkServices::Client", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" - }, - "method": { - "short_name": "CreateWasmPlugin", - "full_name": "google.cloud.networkservices.v1.NetworkServices.CreateWasmPlugin", - "service": { - "short_name": "NetworkServices", - "full_name": "google.cloud.networkservices.v1.NetworkServices" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "networkservices_v1_generated_NetworkServices_UpdateWasmPlugin_sync", - "title": "Snippet for the update_wasm_plugin call in the NetworkServices service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#update_wasm_plugin.", - "file": "network_services/update_wasm_plugin.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_wasm_plugin", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#update_wasm_plugin", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::NetworkServices::V1::UpdateWasmPluginRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "NetworkServices::Client", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" - }, - "method": { - "short_name": "UpdateWasmPlugin", - "full_name": "google.cloud.networkservices.v1.NetworkServices.UpdateWasmPlugin", - "service": { - "short_name": "NetworkServices", - "full_name": "google.cloud.networkservices.v1.NetworkServices" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "networkservices_v1_generated_NetworkServices_DeleteWasmPlugin_sync", - "title": "Snippet for the delete_wasm_plugin call in the NetworkServices service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#delete_wasm_plugin.", - "file": "network_services/delete_wasm_plugin.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_wasm_plugin", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#delete_wasm_plugin", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::NetworkServices::V1::DeleteWasmPluginRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "NetworkServices::Client", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" - }, - "method": { - "short_name": "DeleteWasmPlugin", - "full_name": "google.cloud.networkservices.v1.NetworkServices.DeleteWasmPlugin", - "service": { - "short_name": "NetworkServices", - "full_name": "google.cloud.networkservices.v1.NetworkServices" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "networkservices_v1_generated_NetworkServices_ListGateways_sync", - "title": "Snippet for the list_gateways call in the NetworkServices service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#list_gateways.", - "file": "network_services/list_gateways.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_gateways", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#list_gateways", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::NetworkServices::V1::ListGatewaysRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::NetworkServices::V1::ListGatewaysResponse", - "client": { - "short_name": "NetworkServices::Client", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" - }, - "method": { - "short_name": "ListGateways", - "full_name": "google.cloud.networkservices.v1.NetworkServices.ListGateways", - "service": { - "short_name": "NetworkServices", - "full_name": "google.cloud.networkservices.v1.NetworkServices" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "networkservices_v1_generated_NetworkServices_GetGateway_sync", - "title": "Snippet for the get_gateway call in the NetworkServices service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#get_gateway.", - "file": "network_services/get_gateway.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_gateway", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#get_gateway", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::NetworkServices::V1::GetGatewayRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::NetworkServices::V1::Gateway", - "client": { - "short_name": "NetworkServices::Client", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" - }, - "method": { - "short_name": "GetGateway", - "full_name": "google.cloud.networkservices.v1.NetworkServices.GetGateway", - "service": { - "short_name": "NetworkServices", - "full_name": "google.cloud.networkservices.v1.NetworkServices" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "networkservices_v1_generated_NetworkServices_CreateGateway_sync", - "title": "Snippet for the create_gateway call in the NetworkServices service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#create_gateway.", - "file": "network_services/create_gateway.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_gateway", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#create_gateway", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::NetworkServices::V1::CreateGatewayRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "NetworkServices::Client", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" - }, - "method": { - "short_name": "CreateGateway", - "full_name": "google.cloud.networkservices.v1.NetworkServices.CreateGateway", - "service": { - "short_name": "NetworkServices", - "full_name": "google.cloud.networkservices.v1.NetworkServices" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "networkservices_v1_generated_NetworkServices_UpdateGateway_sync", - "title": "Snippet for the update_gateway call in the NetworkServices service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#update_gateway.", - "file": "network_services/update_gateway.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_gateway", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#update_gateway", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::NetworkServices::V1::UpdateGatewayRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "NetworkServices::Client", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" - }, - "method": { - "short_name": "UpdateGateway", - "full_name": "google.cloud.networkservices.v1.NetworkServices.UpdateGateway", - "service": { - "short_name": "NetworkServices", - "full_name": "google.cloud.networkservices.v1.NetworkServices" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "networkservices_v1_generated_NetworkServices_DeleteGateway_sync", - "title": "Snippet for the delete_gateway call in the NetworkServices service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#delete_gateway.", - "file": "network_services/delete_gateway.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_gateway", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#delete_gateway", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::NetworkServices::V1::DeleteGatewayRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "NetworkServices::Client", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" - }, - "method": { - "short_name": "DeleteGateway", - "full_name": "google.cloud.networkservices.v1.NetworkServices.DeleteGateway", - "service": { - "short_name": "NetworkServices", - "full_name": "google.cloud.networkservices.v1.NetworkServices" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "networkservices_v1_generated_NetworkServices_ListGrpcRoutes_sync", - "title": "Snippet for the list_grpc_routes call in the NetworkServices service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#list_grpc_routes.", - "file": "network_services/list_grpc_routes.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_grpc_routes", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#list_grpc_routes", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::NetworkServices::V1::ListGrpcRoutesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::NetworkServices::V1::ListGrpcRoutesResponse", - "client": { - "short_name": "NetworkServices::Client", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" - }, - "method": { - "short_name": "ListGrpcRoutes", - "full_name": "google.cloud.networkservices.v1.NetworkServices.ListGrpcRoutes", - "service": { - "short_name": "NetworkServices", - "full_name": "google.cloud.networkservices.v1.NetworkServices" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "networkservices_v1_generated_NetworkServices_GetGrpcRoute_sync", - "title": "Snippet for the get_grpc_route call in the NetworkServices service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#get_grpc_route.", - "file": "network_services/get_grpc_route.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_grpc_route", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#get_grpc_route", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::NetworkServices::V1::GetGrpcRouteRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::NetworkServices::V1::GrpcRoute", - "client": { - "short_name": "NetworkServices::Client", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" - }, - "method": { - "short_name": "GetGrpcRoute", - "full_name": "google.cloud.networkservices.v1.NetworkServices.GetGrpcRoute", - "service": { - "short_name": "NetworkServices", - "full_name": "google.cloud.networkservices.v1.NetworkServices" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "networkservices_v1_generated_NetworkServices_CreateGrpcRoute_sync", - "title": "Snippet for the create_grpc_route call in the NetworkServices service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#create_grpc_route.", - "file": "network_services/create_grpc_route.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_grpc_route", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#create_grpc_route", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::NetworkServices::V1::CreateGrpcRouteRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "NetworkServices::Client", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" - }, - "method": { - "short_name": "CreateGrpcRoute", - "full_name": "google.cloud.networkservices.v1.NetworkServices.CreateGrpcRoute", - "service": { - "short_name": "NetworkServices", - "full_name": "google.cloud.networkservices.v1.NetworkServices" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "networkservices_v1_generated_NetworkServices_UpdateGrpcRoute_sync", - "title": "Snippet for the update_grpc_route call in the NetworkServices service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#update_grpc_route.", - "file": "network_services/update_grpc_route.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_grpc_route", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#update_grpc_route", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::NetworkServices::V1::UpdateGrpcRouteRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "NetworkServices::Client", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" - }, - "method": { - "short_name": "UpdateGrpcRoute", - "full_name": "google.cloud.networkservices.v1.NetworkServices.UpdateGrpcRoute", - "service": { - "short_name": "NetworkServices", - "full_name": "google.cloud.networkservices.v1.NetworkServices" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "networkservices_v1_generated_NetworkServices_DeleteGrpcRoute_sync", - "title": "Snippet for the delete_grpc_route call in the NetworkServices service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#delete_grpc_route.", - "file": "network_services/delete_grpc_route.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_grpc_route", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#delete_grpc_route", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::NetworkServices::V1::DeleteGrpcRouteRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "NetworkServices::Client", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" - }, - "method": { - "short_name": "DeleteGrpcRoute", - "full_name": "google.cloud.networkservices.v1.NetworkServices.DeleteGrpcRoute", - "service": { - "short_name": "NetworkServices", - "full_name": "google.cloud.networkservices.v1.NetworkServices" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "networkservices_v1_generated_NetworkServices_ListHttpRoutes_sync", - "title": "Snippet for the list_http_routes call in the NetworkServices service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#list_http_routes.", - "file": "network_services/list_http_routes.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_http_routes", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#list_http_routes", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::NetworkServices::V1::ListHttpRoutesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::NetworkServices::V1::ListHttpRoutesResponse", - "client": { - "short_name": "NetworkServices::Client", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" - }, - "method": { - "short_name": "ListHttpRoutes", - "full_name": "google.cloud.networkservices.v1.NetworkServices.ListHttpRoutes", - "service": { - "short_name": "NetworkServices", - "full_name": "google.cloud.networkservices.v1.NetworkServices" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "networkservices_v1_generated_NetworkServices_GetHttpRoute_sync", - "title": "Snippet for the get_http_route call in the NetworkServices service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#get_http_route.", - "file": "network_services/get_http_route.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_http_route", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#get_http_route", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::NetworkServices::V1::GetHttpRouteRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::NetworkServices::V1::HttpRoute", - "client": { - "short_name": "NetworkServices::Client", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" - }, - "method": { - "short_name": "GetHttpRoute", - "full_name": "google.cloud.networkservices.v1.NetworkServices.GetHttpRoute", - "service": { - "short_name": "NetworkServices", - "full_name": "google.cloud.networkservices.v1.NetworkServices" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "networkservices_v1_generated_NetworkServices_CreateHttpRoute_sync", - "title": "Snippet for the create_http_route call in the NetworkServices service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#create_http_route.", - "file": "network_services/create_http_route.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_http_route", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#create_http_route", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::NetworkServices::V1::CreateHttpRouteRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "NetworkServices::Client", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" - }, - "method": { - "short_name": "CreateHttpRoute", - "full_name": "google.cloud.networkservices.v1.NetworkServices.CreateHttpRoute", - "service": { - "short_name": "NetworkServices", - "full_name": "google.cloud.networkservices.v1.NetworkServices" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "networkservices_v1_generated_NetworkServices_UpdateHttpRoute_sync", - "title": "Snippet for the update_http_route call in the NetworkServices service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#update_http_route.", - "file": "network_services/update_http_route.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_http_route", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#update_http_route", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::NetworkServices::V1::UpdateHttpRouteRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "NetworkServices::Client", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" - }, - "method": { - "short_name": "UpdateHttpRoute", - "full_name": "google.cloud.networkservices.v1.NetworkServices.UpdateHttpRoute", - "service": { - "short_name": "NetworkServices", - "full_name": "google.cloud.networkservices.v1.NetworkServices" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "networkservices_v1_generated_NetworkServices_DeleteHttpRoute_sync", - "title": "Snippet for the delete_http_route call in the NetworkServices service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#delete_http_route.", - "file": "network_services/delete_http_route.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_http_route", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#delete_http_route", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::NetworkServices::V1::DeleteHttpRouteRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "NetworkServices::Client", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" - }, - "method": { - "short_name": "DeleteHttpRoute", - "full_name": "google.cloud.networkservices.v1.NetworkServices.DeleteHttpRoute", - "service": { - "short_name": "NetworkServices", - "full_name": "google.cloud.networkservices.v1.NetworkServices" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "networkservices_v1_generated_NetworkServices_ListTcpRoutes_sync", - "title": "Snippet for the list_tcp_routes call in the NetworkServices service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#list_tcp_routes.", - "file": "network_services/list_tcp_routes.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_tcp_routes", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#list_tcp_routes", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::NetworkServices::V1::ListTcpRoutesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::NetworkServices::V1::ListTcpRoutesResponse", - "client": { - "short_name": "NetworkServices::Client", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" - }, - "method": { - "short_name": "ListTcpRoutes", - "full_name": "google.cloud.networkservices.v1.NetworkServices.ListTcpRoutes", - "service": { - "short_name": "NetworkServices", - "full_name": "google.cloud.networkservices.v1.NetworkServices" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "networkservices_v1_generated_NetworkServices_GetTcpRoute_sync", - "title": "Snippet for the get_tcp_route call in the NetworkServices service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#get_tcp_route.", - "file": "network_services/get_tcp_route.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_tcp_route", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#get_tcp_route", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::NetworkServices::V1::GetTcpRouteRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::NetworkServices::V1::TcpRoute", - "client": { - "short_name": "NetworkServices::Client", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" - }, - "method": { - "short_name": "GetTcpRoute", - "full_name": "google.cloud.networkservices.v1.NetworkServices.GetTcpRoute", - "service": { - "short_name": "NetworkServices", - "full_name": "google.cloud.networkservices.v1.NetworkServices" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "networkservices_v1_generated_NetworkServices_CreateTcpRoute_sync", - "title": "Snippet for the create_tcp_route call in the NetworkServices service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#create_tcp_route.", - "file": "network_services/create_tcp_route.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_tcp_route", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#create_tcp_route", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::NetworkServices::V1::CreateTcpRouteRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "NetworkServices::Client", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" - }, - "method": { - "short_name": "CreateTcpRoute", - "full_name": "google.cloud.networkservices.v1.NetworkServices.CreateTcpRoute", - "service": { - "short_name": "NetworkServices", - "full_name": "google.cloud.networkservices.v1.NetworkServices" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "networkservices_v1_generated_NetworkServices_UpdateTcpRoute_sync", - "title": "Snippet for the update_tcp_route call in the NetworkServices service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#update_tcp_route.", - "file": "network_services/update_tcp_route.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_tcp_route", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#update_tcp_route", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::NetworkServices::V1::UpdateTcpRouteRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "NetworkServices::Client", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" - }, - "method": { - "short_name": "UpdateTcpRoute", - "full_name": "google.cloud.networkservices.v1.NetworkServices.UpdateTcpRoute", - "service": { - "short_name": "NetworkServices", - "full_name": "google.cloud.networkservices.v1.NetworkServices" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "networkservices_v1_generated_NetworkServices_DeleteTcpRoute_sync", - "title": "Snippet for the delete_tcp_route call in the NetworkServices service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#delete_tcp_route.", - "file": "network_services/delete_tcp_route.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_tcp_route", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#delete_tcp_route", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::NetworkServices::V1::DeleteTcpRouteRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "NetworkServices::Client", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" - }, - "method": { - "short_name": "DeleteTcpRoute", - "full_name": "google.cloud.networkservices.v1.NetworkServices.DeleteTcpRoute", - "service": { - "short_name": "NetworkServices", - "full_name": "google.cloud.networkservices.v1.NetworkServices" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "networkservices_v1_generated_NetworkServices_ListTlsRoutes_sync", - "title": "Snippet for the list_tls_routes call in the NetworkServices service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#list_tls_routes.", - "file": "network_services/list_tls_routes.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_tls_routes", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#list_tls_routes", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::NetworkServices::V1::ListTlsRoutesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::NetworkServices::V1::ListTlsRoutesResponse", - "client": { - "short_name": "NetworkServices::Client", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" - }, - "method": { - "short_name": "ListTlsRoutes", - "full_name": "google.cloud.networkservices.v1.NetworkServices.ListTlsRoutes", - "service": { - "short_name": "NetworkServices", - "full_name": "google.cloud.networkservices.v1.NetworkServices" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "networkservices_v1_generated_NetworkServices_GetTlsRoute_sync", - "title": "Snippet for the get_tls_route call in the NetworkServices service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#get_tls_route.", - "file": "network_services/get_tls_route.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_tls_route", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#get_tls_route", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::NetworkServices::V1::GetTlsRouteRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::NetworkServices::V1::TlsRoute", - "client": { - "short_name": "NetworkServices::Client", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" - }, - "method": { - "short_name": "GetTlsRoute", - "full_name": "google.cloud.networkservices.v1.NetworkServices.GetTlsRoute", - "service": { - "short_name": "NetworkServices", - "full_name": "google.cloud.networkservices.v1.NetworkServices" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "networkservices_v1_generated_NetworkServices_CreateTlsRoute_sync", - "title": "Snippet for the create_tls_route call in the NetworkServices service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#create_tls_route.", - "file": "network_services/create_tls_route.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_tls_route", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#create_tls_route", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::NetworkServices::V1::CreateTlsRouteRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "NetworkServices::Client", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" - }, - "method": { - "short_name": "CreateTlsRoute", - "full_name": "google.cloud.networkservices.v1.NetworkServices.CreateTlsRoute", - "service": { - "short_name": "NetworkServices", - "full_name": "google.cloud.networkservices.v1.NetworkServices" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "networkservices_v1_generated_NetworkServices_UpdateTlsRoute_sync", - "title": "Snippet for the update_tls_route call in the NetworkServices service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#update_tls_route.", - "file": "network_services/update_tls_route.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_tls_route", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#update_tls_route", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::NetworkServices::V1::UpdateTlsRouteRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "NetworkServices::Client", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" - }, - "method": { - "short_name": "UpdateTlsRoute", - "full_name": "google.cloud.networkservices.v1.NetworkServices.UpdateTlsRoute", - "service": { - "short_name": "NetworkServices", - "full_name": "google.cloud.networkservices.v1.NetworkServices" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "networkservices_v1_generated_NetworkServices_DeleteTlsRoute_sync", - "title": "Snippet for the delete_tls_route call in the NetworkServices service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#delete_tls_route.", - "file": "network_services/delete_tls_route.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_tls_route", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#delete_tls_route", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::NetworkServices::V1::DeleteTlsRouteRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "NetworkServices::Client", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" - }, - "method": { - "short_name": "DeleteTlsRoute", - "full_name": "google.cloud.networkservices.v1.NetworkServices.DeleteTlsRoute", - "service": { - "short_name": "NetworkServices", - "full_name": "google.cloud.networkservices.v1.NetworkServices" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "networkservices_v1_generated_NetworkServices_ListServiceBindings_sync", - "title": "Snippet for the list_service_bindings call in the NetworkServices service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#list_service_bindings.", - "file": "network_services/list_service_bindings.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_service_bindings", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#list_service_bindings", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::NetworkServices::V1::ListServiceBindingsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::NetworkServices::V1::ListServiceBindingsResponse", - "client": { - "short_name": "NetworkServices::Client", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" - }, - "method": { - "short_name": "ListServiceBindings", - "full_name": "google.cloud.networkservices.v1.NetworkServices.ListServiceBindings", - "service": { - "short_name": "NetworkServices", - "full_name": "google.cloud.networkservices.v1.NetworkServices" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "networkservices_v1_generated_NetworkServices_GetServiceBinding_sync", - "title": "Snippet for the get_service_binding call in the NetworkServices service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#get_service_binding.", - "file": "network_services/get_service_binding.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_service_binding", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#get_service_binding", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::NetworkServices::V1::GetServiceBindingRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::NetworkServices::V1::ServiceBinding", - "client": { - "short_name": "NetworkServices::Client", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" - }, - "method": { - "short_name": "GetServiceBinding", - "full_name": "google.cloud.networkservices.v1.NetworkServices.GetServiceBinding", - "service": { - "short_name": "NetworkServices", - "full_name": "google.cloud.networkservices.v1.NetworkServices" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "networkservices_v1_generated_NetworkServices_CreateServiceBinding_sync", - "title": "Snippet for the create_service_binding call in the NetworkServices service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#create_service_binding.", - "file": "network_services/create_service_binding.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_service_binding", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#create_service_binding", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::NetworkServices::V1::CreateServiceBindingRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "NetworkServices::Client", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" - }, - "method": { - "short_name": "CreateServiceBinding", - "full_name": "google.cloud.networkservices.v1.NetworkServices.CreateServiceBinding", - "service": { - "short_name": "NetworkServices", - "full_name": "google.cloud.networkservices.v1.NetworkServices" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "networkservices_v1_generated_NetworkServices_UpdateServiceBinding_sync", - "title": "Snippet for the update_service_binding call in the NetworkServices service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#update_service_binding.", - "file": "network_services/update_service_binding.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_service_binding", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#update_service_binding", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::NetworkServices::V1::UpdateServiceBindingRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "NetworkServices::Client", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" - }, - "method": { - "short_name": "UpdateServiceBinding", - "full_name": "google.cloud.networkservices.v1.NetworkServices.UpdateServiceBinding", - "service": { - "short_name": "NetworkServices", - "full_name": "google.cloud.networkservices.v1.NetworkServices" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "networkservices_v1_generated_NetworkServices_DeleteServiceBinding_sync", - "title": "Snippet for the delete_service_binding call in the NetworkServices service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#delete_service_binding.", - "file": "network_services/delete_service_binding.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_service_binding", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#delete_service_binding", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::NetworkServices::V1::DeleteServiceBindingRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "NetworkServices::Client", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" - }, - "method": { - "short_name": "DeleteServiceBinding", - "full_name": "google.cloud.networkservices.v1.NetworkServices.DeleteServiceBinding", - "service": { - "short_name": "NetworkServices", - "full_name": "google.cloud.networkservices.v1.NetworkServices" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "networkservices_v1_generated_NetworkServices_ListMeshes_sync", - "title": "Snippet for the list_meshes call in the NetworkServices service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#list_meshes.", - "file": "network_services/list_meshes.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_meshes", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#list_meshes", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::NetworkServices::V1::ListMeshesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::NetworkServices::V1::ListMeshesResponse", - "client": { - "short_name": "NetworkServices::Client", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" - }, - "method": { - "short_name": "ListMeshes", - "full_name": "google.cloud.networkservices.v1.NetworkServices.ListMeshes", - "service": { - "short_name": "NetworkServices", - "full_name": "google.cloud.networkservices.v1.NetworkServices" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "networkservices_v1_generated_NetworkServices_GetMesh_sync", - "title": "Snippet for the get_mesh call in the NetworkServices service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#get_mesh.", - "file": "network_services/get_mesh.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_mesh", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#get_mesh", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::NetworkServices::V1::GetMeshRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::NetworkServices::V1::Mesh", - "client": { - "short_name": "NetworkServices::Client", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" - }, - "method": { - "short_name": "GetMesh", - "full_name": "google.cloud.networkservices.v1.NetworkServices.GetMesh", - "service": { - "short_name": "NetworkServices", - "full_name": "google.cloud.networkservices.v1.NetworkServices" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "networkservices_v1_generated_NetworkServices_CreateMesh_sync", - "title": "Snippet for the create_mesh call in the NetworkServices service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#create_mesh.", - "file": "network_services/create_mesh.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_mesh", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#create_mesh", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::NetworkServices::V1::CreateMeshRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "NetworkServices::Client", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" - }, - "method": { - "short_name": "CreateMesh", - "full_name": "google.cloud.networkservices.v1.NetworkServices.CreateMesh", - "service": { - "short_name": "NetworkServices", - "full_name": "google.cloud.networkservices.v1.NetworkServices" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "networkservices_v1_generated_NetworkServices_UpdateMesh_sync", - "title": "Snippet for the update_mesh call in the NetworkServices service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#update_mesh.", - "file": "network_services/update_mesh.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_mesh", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#update_mesh", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::NetworkServices::V1::UpdateMeshRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "NetworkServices::Client", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" - }, - "method": { - "short_name": "UpdateMesh", - "full_name": "google.cloud.networkservices.v1.NetworkServices.UpdateMesh", - "service": { - "short_name": "NetworkServices", - "full_name": "google.cloud.networkservices.v1.NetworkServices" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "networkservices_v1_generated_NetworkServices_DeleteMesh_sync", - "title": "Snippet for the delete_mesh call in the NetworkServices service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#delete_mesh.", - "file": "network_services/delete_mesh.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_mesh", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#delete_mesh", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::NetworkServices::V1::DeleteMeshRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "NetworkServices::Client", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" - }, - "method": { - "short_name": "DeleteMesh", - "full_name": "google.cloud.networkservices.v1.NetworkServices.DeleteMesh", - "service": { - "short_name": "NetworkServices", - "full_name": "google.cloud.networkservices.v1.NetworkServices" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "networkservices_v1_generated_NetworkServices_ListServiceLbPolicies_sync", - "title": "Snippet for the list_service_lb_policies call in the NetworkServices service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#list_service_lb_policies.", - "file": "network_services/list_service_lb_policies.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_service_lb_policies", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#list_service_lb_policies", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::NetworkServices::V1::ListServiceLbPoliciesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::NetworkServices::V1::ListServiceLbPoliciesResponse", - "client": { - "short_name": "NetworkServices::Client", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" - }, - "method": { - "short_name": "ListServiceLbPolicies", - "full_name": "google.cloud.networkservices.v1.NetworkServices.ListServiceLbPolicies", - "service": { - "short_name": "NetworkServices", - "full_name": "google.cloud.networkservices.v1.NetworkServices" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "networkservices_v1_generated_NetworkServices_GetServiceLbPolicy_sync", - "title": "Snippet for the get_service_lb_policy call in the NetworkServices service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#get_service_lb_policy.", - "file": "network_services/get_service_lb_policy.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_service_lb_policy", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#get_service_lb_policy", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::NetworkServices::V1::GetServiceLbPolicyRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::NetworkServices::V1::ServiceLbPolicy", - "client": { - "short_name": "NetworkServices::Client", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" - }, - "method": { - "short_name": "GetServiceLbPolicy", - "full_name": "google.cloud.networkservices.v1.NetworkServices.GetServiceLbPolicy", - "service": { - "short_name": "NetworkServices", - "full_name": "google.cloud.networkservices.v1.NetworkServices" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "networkservices_v1_generated_NetworkServices_CreateServiceLbPolicy_sync", - "title": "Snippet for the create_service_lb_policy call in the NetworkServices service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#create_service_lb_policy.", - "file": "network_services/create_service_lb_policy.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_service_lb_policy", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#create_service_lb_policy", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::NetworkServices::V1::CreateServiceLbPolicyRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "NetworkServices::Client", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" - }, - "method": { - "short_name": "CreateServiceLbPolicy", - "full_name": "google.cloud.networkservices.v1.NetworkServices.CreateServiceLbPolicy", - "service": { - "short_name": "NetworkServices", - "full_name": "google.cloud.networkservices.v1.NetworkServices" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "networkservices_v1_generated_NetworkServices_UpdateServiceLbPolicy_sync", - "title": "Snippet for the update_service_lb_policy call in the NetworkServices service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#update_service_lb_policy.", - "file": "network_services/update_service_lb_policy.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_service_lb_policy", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#update_service_lb_policy", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::NetworkServices::V1::UpdateServiceLbPolicyRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "NetworkServices::Client", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" - }, - "method": { - "short_name": "UpdateServiceLbPolicy", - "full_name": "google.cloud.networkservices.v1.NetworkServices.UpdateServiceLbPolicy", - "service": { - "short_name": "NetworkServices", - "full_name": "google.cloud.networkservices.v1.NetworkServices" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "networkservices_v1_generated_NetworkServices_DeleteServiceLbPolicy_sync", - "title": "Snippet for the delete_service_lb_policy call in the NetworkServices service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#delete_service_lb_policy.", - "file": "network_services/delete_service_lb_policy.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_service_lb_policy", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#delete_service_lb_policy", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::NetworkServices::V1::DeleteServiceLbPolicyRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "NetworkServices::Client", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" - }, - "method": { - "short_name": "DeleteServiceLbPolicy", - "full_name": "google.cloud.networkservices.v1.NetworkServices.DeleteServiceLbPolicy", - "service": { - "short_name": "NetworkServices", - "full_name": "google.cloud.networkservices.v1.NetworkServices" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "networkservices_v1_generated_NetworkServices_GetGatewayRouteView_sync", - "title": "Snippet for the get_gateway_route_view call in the NetworkServices service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#get_gateway_route_view.", - "file": "network_services/get_gateway_route_view.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_gateway_route_view", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#get_gateway_route_view", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::NetworkServices::V1::GetGatewayRouteViewRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::NetworkServices::V1::GatewayRouteView", - "client": { - "short_name": "NetworkServices::Client", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" - }, - "method": { - "short_name": "GetGatewayRouteView", - "full_name": "google.cloud.networkservices.v1.NetworkServices.GetGatewayRouteView", - "service": { - "short_name": "NetworkServices", - "full_name": "google.cloud.networkservices.v1.NetworkServices" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "networkservices_v1_generated_NetworkServices_GetMeshRouteView_sync", - "title": "Snippet for the get_mesh_route_view call in the NetworkServices service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#get_mesh_route_view.", - "file": "network_services/get_mesh_route_view.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_mesh_route_view", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#get_mesh_route_view", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::NetworkServices::V1::GetMeshRouteViewRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::NetworkServices::V1::MeshRouteView", - "client": { - "short_name": "NetworkServices::Client", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" - }, - "method": { - "short_name": "GetMeshRouteView", - "full_name": "google.cloud.networkservices.v1.NetworkServices.GetMeshRouteView", - "service": { - "short_name": "NetworkServices", - "full_name": "google.cloud.networkservices.v1.NetworkServices" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "networkservices_v1_generated_NetworkServices_ListGatewayRouteViews_sync", - "title": "Snippet for the list_gateway_route_views call in the NetworkServices service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#list_gateway_route_views.", - "file": "network_services/list_gateway_route_views.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_gateway_route_views", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#list_gateway_route_views", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::NetworkServices::V1::ListGatewayRouteViewsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::NetworkServices::V1::ListGatewayRouteViewsResponse", - "client": { - "short_name": "NetworkServices::Client", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" - }, - "method": { - "short_name": "ListGatewayRouteViews", - "full_name": "google.cloud.networkservices.v1.NetworkServices.ListGatewayRouteViews", - "service": { - "short_name": "NetworkServices", - "full_name": "google.cloud.networkservices.v1.NetworkServices" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "networkservices_v1_generated_NetworkServices_ListMeshRouteViews_sync", - "title": "Snippet for the list_mesh_route_views call in the NetworkServices service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#list_mesh_route_views.", - "file": "network_services/list_mesh_route_views.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_mesh_route_views", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#list_mesh_route_views", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::NetworkServices::V1::ListMeshRouteViewsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::NetworkServices::V1::ListMeshRouteViewsResponse", - "client": { - "short_name": "NetworkServices::Client", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" - }, - "method": { - "short_name": "ListMeshRouteViews", - "full_name": "google.cloud.networkservices.v1.NetworkServices.ListMeshRouteViews", - "service": { - "short_name": "NetworkServices", - "full_name": "google.cloud.networkservices.v1.NetworkServices" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "networkservices_v1_generated_NetworkServices_ListAgentGateways_sync", - "title": "Snippet for the list_agent_gateways call in the NetworkServices service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#list_agent_gateways.", - "file": "network_services/list_agent_gateways.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_agent_gateways", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#list_agent_gateways", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::NetworkServices::V1::ListAgentGatewaysRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::NetworkServices::V1::ListAgentGatewaysResponse", - "client": { - "short_name": "NetworkServices::Client", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" - }, - "method": { - "short_name": "ListAgentGateways", - "full_name": "google.cloud.networkservices.v1.NetworkServices.ListAgentGateways", - "service": { - "short_name": "NetworkServices", - "full_name": "google.cloud.networkservices.v1.NetworkServices" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "networkservices_v1_generated_NetworkServices_GetAgentGateway_sync", - "title": "Snippet for the get_agent_gateway call in the NetworkServices service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#get_agent_gateway.", - "file": "network_services/get_agent_gateway.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_agent_gateway", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#get_agent_gateway", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::NetworkServices::V1::GetAgentGatewayRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::NetworkServices::V1::AgentGateway", - "client": { - "short_name": "NetworkServices::Client", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" - }, - "method": { - "short_name": "GetAgentGateway", - "full_name": "google.cloud.networkservices.v1.NetworkServices.GetAgentGateway", - "service": { - "short_name": "NetworkServices", - "full_name": "google.cloud.networkservices.v1.NetworkServices" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "networkservices_v1_generated_NetworkServices_CreateAgentGateway_sync", - "title": "Snippet for the create_agent_gateway call in the NetworkServices service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#create_agent_gateway.", - "file": "network_services/create_agent_gateway.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_agent_gateway", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#create_agent_gateway", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::NetworkServices::V1::CreateAgentGatewayRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "NetworkServices::Client", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" - }, - "method": { - "short_name": "CreateAgentGateway", - "full_name": "google.cloud.networkservices.v1.NetworkServices.CreateAgentGateway", - "service": { - "short_name": "NetworkServices", - "full_name": "google.cloud.networkservices.v1.NetworkServices" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "networkservices_v1_generated_NetworkServices_UpdateAgentGateway_sync", - "title": "Snippet for the update_agent_gateway call in the NetworkServices service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#update_agent_gateway.", - "file": "network_services/update_agent_gateway.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_agent_gateway", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#update_agent_gateway", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::NetworkServices::V1::UpdateAgentGatewayRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "NetworkServices::Client", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" - }, - "method": { - "short_name": "UpdateAgentGateway", - "full_name": "google.cloud.networkservices.v1.NetworkServices.UpdateAgentGateway", - "service": { - "short_name": "NetworkServices", - "full_name": "google.cloud.networkservices.v1.NetworkServices" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "networkservices_v1_generated_NetworkServices_DeleteAgentGateway_sync", - "title": "Snippet for the delete_agent_gateway call in the NetworkServices service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::NetworkServices::V1::NetworkServices::Client#delete_agent_gateway.", - "file": "network_services/delete_agent_gateway.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_agent_gateway", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client#delete_agent_gateway", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::NetworkServices::V1::DeleteAgentGatewayRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "NetworkServices::Client", - "full_name": "::Google::Cloud::NetworkServices::V1::NetworkServices::Client" - }, - "method": { - "short_name": "DeleteAgentGateway", - "full_name": "google.cloud.networkservices.v1.NetworkServices.DeleteAgentGateway", - "service": { - "short_name": "NetworkServices", - "full_name": "google.cloud.networkservices.v1.NetworkServices" - } - } - }, - "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_services-v1/test/google/cloud/network_services/v1/dep_service_operations_test.rb b/owl-bot-staging/google-cloud-network_services-v1/test/google/cloud/network_services/v1/dep_service_operations_test.rb deleted file mode 100644 index f1aaa10889bb..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/test/google/cloud/network_services/v1/dep_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/networkservices/v1/dep_pb" -require "google/cloud/networkservices/v1/dep_services_pb" -require "google/cloud/network_services/v1/dep_service" - -class ::Google::Cloud::NetworkServices::V1::DepService::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 - c = ::Google::Cloud::NetworkServices::V1::DepService::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.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 - c.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 - c.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 - c.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 - c.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 - c = ::Google::Cloud::NetworkServices::V1::DepService::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.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 - c.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 - c.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 - c.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 - c.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 - c = ::Google::Cloud::NetworkServices::V1::DepService::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_operation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.delete_operation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.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 - c.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 - c.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 - c = ::Google::Cloud::NetworkServices::V1::DepService::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.cancel_operation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.cancel_operation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.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 - c.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 - c.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 - c = ::Google::Cloud::NetworkServices::V1::DepService::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.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 - c.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 - c.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 - c.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 - c.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::NetworkServices::V1::DepService::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::NetworkServices::V1::DepService::Operations::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-network_services-v1/test/google/cloud/network_services/v1/dep_service_paths_test.rb b/owl-bot-staging/google-cloud-network_services-v1/test/google/cloud/network_services/v1/dep_service_paths_test.rb deleted file mode 100644 index b6507d7a4dde..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/test/google/cloud/network_services/v1/dep_service_paths_test.rb +++ /dev/null @@ -1,103 +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_services/v1/dep_service" - -class ::Google::Cloud::NetworkServices::V1::DepService::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_authz_extension_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::NetworkServices::V1::DepService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.authz_extension_path project: "value0", location: "value1", authz_extension: "value2" - assert_equal "projects/value0/locations/value1/authzExtensions/value2", path - end - end - - def test_lb_edge_extension_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::NetworkServices::V1::DepService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.lb_edge_extension_path project: "value0", location: "value1", lb_edge_extension: "value2" - assert_equal "projects/value0/locations/value1/lbEdgeExtensions/value2", path - end - end - - def test_lb_route_extension_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::NetworkServices::V1::DepService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.lb_route_extension_path project: "value0", location: "value1", lb_route_extension: "value2" - assert_equal "projects/value0/locations/value1/lbRouteExtensions/value2", path - end - end - - def test_lb_traffic_extension_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::NetworkServices::V1::DepService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.lb_traffic_extension_path project: "value0", location: "value1", lb_traffic_extension: "value2" - assert_equal "projects/value0/locations/value1/lbTrafficExtensions/value2", path - end - end - - def test_location_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::NetworkServices::V1::DepService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.location_path project: "value0", location: "value1" - assert_equal "projects/value0/locations/value1", path - end - end -end diff --git a/owl-bot-staging/google-cloud-network_services-v1/test/google/cloud/network_services/v1/dep_service_rest_test.rb b/owl-bot-staging/google-cloud-network_services-v1/test/google/cloud/network_services/v1/dep_service_rest_test.rb deleted file mode 100644 index 27a8ff9ba8ea..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/test/google/cloud/network_services/v1/dep_service_rest_test.rb +++ /dev/null @@ -1,1219 +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/networkservices/v1/dep_pb" -require "google/cloud/network_services/v1/dep_service/rest" - - -class ::Google::Cloud::NetworkServices::V1::DepService::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_lb_traffic_extensions - # Create test objects. - client_result = ::Google::Cloud::NetworkServices::V1::ListLbTrafficExtensionsResponse.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_lb_traffic_extensions_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::NetworkServices::V1::DepService::Rest::ServiceStub.stub :transcode_list_lb_traffic_extensions_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_lb_traffic_extensions_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::DepService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_lb_traffic_extensions({ 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 - c.list_lb_traffic_extensions 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 - c.list_lb_traffic_extensions ::Google::Cloud::NetworkServices::V1::ListLbTrafficExtensionsRequest.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 - c.list_lb_traffic_extensions({ 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 - c.list_lb_traffic_extensions(::Google::Cloud::NetworkServices::V1::ListLbTrafficExtensionsRequest.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_lb_traffic_extensions_client_stub.call_count - end - end - end - - def test_get_lb_traffic_extension - # Create test objects. - client_result = ::Google::Cloud::NetworkServices::V1::LbTrafficExtension.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_lb_traffic_extension_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::NetworkServices::V1::DepService::Rest::ServiceStub.stub :transcode_get_lb_traffic_extension_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_lb_traffic_extension_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::DepService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_lb_traffic_extension({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_lb_traffic_extension name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_lb_traffic_extension ::Google::Cloud::NetworkServices::V1::GetLbTrafficExtensionRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_lb_traffic_extension({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_lb_traffic_extension(::Google::Cloud::NetworkServices::V1::GetLbTrafficExtensionRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_lb_traffic_extension_client_stub.call_count - end - end - end - - def test_create_lb_traffic_extension - # 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" - lb_traffic_extension_id = "hello world" - lb_traffic_extension = {} - request_id = "hello world" - - create_lb_traffic_extension_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::NetworkServices::V1::DepService::Rest::ServiceStub.stub :transcode_create_lb_traffic_extension_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_lb_traffic_extension_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::DepService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.create_lb_traffic_extension({ parent: parent, lb_traffic_extension_id: lb_traffic_extension_id, lb_traffic_extension: lb_traffic_extension, request_id: request_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.create_lb_traffic_extension parent: parent, lb_traffic_extension_id: lb_traffic_extension_id, lb_traffic_extension: lb_traffic_extension, request_id: request_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.create_lb_traffic_extension ::Google::Cloud::NetworkServices::V1::CreateLbTrafficExtensionRequest.new(parent: parent, lb_traffic_extension_id: lb_traffic_extension_id, lb_traffic_extension: lb_traffic_extension, request_id: request_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.create_lb_traffic_extension({ parent: parent, lb_traffic_extension_id: lb_traffic_extension_id, lb_traffic_extension: lb_traffic_extension, request_id: request_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.create_lb_traffic_extension(::Google::Cloud::NetworkServices::V1::CreateLbTrafficExtensionRequest.new(parent: parent, lb_traffic_extension_id: lb_traffic_extension_id, lb_traffic_extension: lb_traffic_extension, request_id: request_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_lb_traffic_extension_client_stub.call_count - end - end - end - - def test_update_lb_traffic_extension - # 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 = {} - lb_traffic_extension = {} - request_id = "hello world" - - update_lb_traffic_extension_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::NetworkServices::V1::DepService::Rest::ServiceStub.stub :transcode_update_lb_traffic_extension_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_lb_traffic_extension_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::DepService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_lb_traffic_extension({ update_mask: update_mask, lb_traffic_extension: lb_traffic_extension, request_id: request_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_lb_traffic_extension update_mask: update_mask, lb_traffic_extension: lb_traffic_extension, request_id: request_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_lb_traffic_extension ::Google::Cloud::NetworkServices::V1::UpdateLbTrafficExtensionRequest.new(update_mask: update_mask, lb_traffic_extension: lb_traffic_extension, request_id: request_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_lb_traffic_extension({ update_mask: update_mask, lb_traffic_extension: lb_traffic_extension, request_id: request_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_lb_traffic_extension(::Google::Cloud::NetworkServices::V1::UpdateLbTrafficExtensionRequest.new(update_mask: update_mask, lb_traffic_extension: lb_traffic_extension, request_id: request_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_lb_traffic_extension_client_stub.call_count - end - end - end - - def test_delete_lb_traffic_extension - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - request_id = "hello world" - - delete_lb_traffic_extension_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::NetworkServices::V1::DepService::Rest::ServiceStub.stub :transcode_delete_lb_traffic_extension_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_lb_traffic_extension_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::DepService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_lb_traffic_extension({ name: name, request_id: request_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_lb_traffic_extension name: name, request_id: request_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.delete_lb_traffic_extension ::Google::Cloud::NetworkServices::V1::DeleteLbTrafficExtensionRequest.new(name: name, request_id: request_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.delete_lb_traffic_extension({ name: name, request_id: request_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.delete_lb_traffic_extension(::Google::Cloud::NetworkServices::V1::DeleteLbTrafficExtensionRequest.new(name: name, request_id: request_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_lb_traffic_extension_client_stub.call_count - end - end - end - - def test_list_lb_route_extensions - # Create test objects. - client_result = ::Google::Cloud::NetworkServices::V1::ListLbRouteExtensionsResponse.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_lb_route_extensions_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::NetworkServices::V1::DepService::Rest::ServiceStub.stub :transcode_list_lb_route_extensions_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_lb_route_extensions_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::DepService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_lb_route_extensions({ 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 - c.list_lb_route_extensions 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 - c.list_lb_route_extensions ::Google::Cloud::NetworkServices::V1::ListLbRouteExtensionsRequest.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 - c.list_lb_route_extensions({ 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 - c.list_lb_route_extensions(::Google::Cloud::NetworkServices::V1::ListLbRouteExtensionsRequest.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_lb_route_extensions_client_stub.call_count - end - end - end - - def test_get_lb_route_extension - # Create test objects. - client_result = ::Google::Cloud::NetworkServices::V1::LbRouteExtension.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_lb_route_extension_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::NetworkServices::V1::DepService::Rest::ServiceStub.stub :transcode_get_lb_route_extension_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_lb_route_extension_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::DepService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_lb_route_extension({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_lb_route_extension name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_lb_route_extension ::Google::Cloud::NetworkServices::V1::GetLbRouteExtensionRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_lb_route_extension({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_lb_route_extension(::Google::Cloud::NetworkServices::V1::GetLbRouteExtensionRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_lb_route_extension_client_stub.call_count - end - end - end - - def test_create_lb_route_extension - # 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" - lb_route_extension_id = "hello world" - lb_route_extension = {} - request_id = "hello world" - - create_lb_route_extension_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::NetworkServices::V1::DepService::Rest::ServiceStub.stub :transcode_create_lb_route_extension_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_lb_route_extension_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::DepService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.create_lb_route_extension({ parent: parent, lb_route_extension_id: lb_route_extension_id, lb_route_extension: lb_route_extension, request_id: request_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.create_lb_route_extension parent: parent, lb_route_extension_id: lb_route_extension_id, lb_route_extension: lb_route_extension, request_id: request_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.create_lb_route_extension ::Google::Cloud::NetworkServices::V1::CreateLbRouteExtensionRequest.new(parent: parent, lb_route_extension_id: lb_route_extension_id, lb_route_extension: lb_route_extension, request_id: request_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.create_lb_route_extension({ parent: parent, lb_route_extension_id: lb_route_extension_id, lb_route_extension: lb_route_extension, request_id: request_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.create_lb_route_extension(::Google::Cloud::NetworkServices::V1::CreateLbRouteExtensionRequest.new(parent: parent, lb_route_extension_id: lb_route_extension_id, lb_route_extension: lb_route_extension, request_id: request_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_lb_route_extension_client_stub.call_count - end - end - end - - def test_update_lb_route_extension - # 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 = {} - lb_route_extension = {} - request_id = "hello world" - - update_lb_route_extension_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::NetworkServices::V1::DepService::Rest::ServiceStub.stub :transcode_update_lb_route_extension_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_lb_route_extension_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::DepService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_lb_route_extension({ update_mask: update_mask, lb_route_extension: lb_route_extension, request_id: request_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_lb_route_extension update_mask: update_mask, lb_route_extension: lb_route_extension, request_id: request_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_lb_route_extension ::Google::Cloud::NetworkServices::V1::UpdateLbRouteExtensionRequest.new(update_mask: update_mask, lb_route_extension: lb_route_extension, request_id: request_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_lb_route_extension({ update_mask: update_mask, lb_route_extension: lb_route_extension, request_id: request_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_lb_route_extension(::Google::Cloud::NetworkServices::V1::UpdateLbRouteExtensionRequest.new(update_mask: update_mask, lb_route_extension: lb_route_extension, request_id: request_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_lb_route_extension_client_stub.call_count - end - end - end - - def test_delete_lb_route_extension - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - request_id = "hello world" - - delete_lb_route_extension_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::NetworkServices::V1::DepService::Rest::ServiceStub.stub :transcode_delete_lb_route_extension_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_lb_route_extension_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::DepService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_lb_route_extension({ name: name, request_id: request_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_lb_route_extension name: name, request_id: request_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.delete_lb_route_extension ::Google::Cloud::NetworkServices::V1::DeleteLbRouteExtensionRequest.new(name: name, request_id: request_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.delete_lb_route_extension({ name: name, request_id: request_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.delete_lb_route_extension(::Google::Cloud::NetworkServices::V1::DeleteLbRouteExtensionRequest.new(name: name, request_id: request_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_lb_route_extension_client_stub.call_count - end - end - end - - def test_list_lb_edge_extensions - # Create test objects. - client_result = ::Google::Cloud::NetworkServices::V1::ListLbEdgeExtensionsResponse.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_lb_edge_extensions_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::NetworkServices::V1::DepService::Rest::ServiceStub.stub :transcode_list_lb_edge_extensions_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_lb_edge_extensions_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::DepService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_lb_edge_extensions({ 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 - c.list_lb_edge_extensions 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 - c.list_lb_edge_extensions ::Google::Cloud::NetworkServices::V1::ListLbEdgeExtensionsRequest.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 - c.list_lb_edge_extensions({ 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 - c.list_lb_edge_extensions(::Google::Cloud::NetworkServices::V1::ListLbEdgeExtensionsRequest.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_lb_edge_extensions_client_stub.call_count - end - end - end - - def test_get_lb_edge_extension - # Create test objects. - client_result = ::Google::Cloud::NetworkServices::V1::LbEdgeExtension.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_lb_edge_extension_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::NetworkServices::V1::DepService::Rest::ServiceStub.stub :transcode_get_lb_edge_extension_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_lb_edge_extension_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::DepService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_lb_edge_extension({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_lb_edge_extension name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_lb_edge_extension ::Google::Cloud::NetworkServices::V1::GetLbEdgeExtensionRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_lb_edge_extension({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_lb_edge_extension(::Google::Cloud::NetworkServices::V1::GetLbEdgeExtensionRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_lb_edge_extension_client_stub.call_count - end - end - end - - def test_create_lb_edge_extension - # 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" - lb_edge_extension_id = "hello world" - lb_edge_extension = {} - request_id = "hello world" - - create_lb_edge_extension_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::NetworkServices::V1::DepService::Rest::ServiceStub.stub :transcode_create_lb_edge_extension_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_lb_edge_extension_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::DepService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.create_lb_edge_extension({ parent: parent, lb_edge_extension_id: lb_edge_extension_id, lb_edge_extension: lb_edge_extension, request_id: request_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.create_lb_edge_extension parent: parent, lb_edge_extension_id: lb_edge_extension_id, lb_edge_extension: lb_edge_extension, request_id: request_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.create_lb_edge_extension ::Google::Cloud::NetworkServices::V1::CreateLbEdgeExtensionRequest.new(parent: parent, lb_edge_extension_id: lb_edge_extension_id, lb_edge_extension: lb_edge_extension, request_id: request_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.create_lb_edge_extension({ parent: parent, lb_edge_extension_id: lb_edge_extension_id, lb_edge_extension: lb_edge_extension, request_id: request_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.create_lb_edge_extension(::Google::Cloud::NetworkServices::V1::CreateLbEdgeExtensionRequest.new(parent: parent, lb_edge_extension_id: lb_edge_extension_id, lb_edge_extension: lb_edge_extension, request_id: request_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_lb_edge_extension_client_stub.call_count - end - end - end - - def test_update_lb_edge_extension - # 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 = {} - lb_edge_extension = {} - request_id = "hello world" - - update_lb_edge_extension_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::NetworkServices::V1::DepService::Rest::ServiceStub.stub :transcode_update_lb_edge_extension_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_lb_edge_extension_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::DepService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_lb_edge_extension({ update_mask: update_mask, lb_edge_extension: lb_edge_extension, request_id: request_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_lb_edge_extension update_mask: update_mask, lb_edge_extension: lb_edge_extension, request_id: request_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_lb_edge_extension ::Google::Cloud::NetworkServices::V1::UpdateLbEdgeExtensionRequest.new(update_mask: update_mask, lb_edge_extension: lb_edge_extension, request_id: request_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_lb_edge_extension({ update_mask: update_mask, lb_edge_extension: lb_edge_extension, request_id: request_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_lb_edge_extension(::Google::Cloud::NetworkServices::V1::UpdateLbEdgeExtensionRequest.new(update_mask: update_mask, lb_edge_extension: lb_edge_extension, request_id: request_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_lb_edge_extension_client_stub.call_count - end - end - end - - def test_delete_lb_edge_extension - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - request_id = "hello world" - - delete_lb_edge_extension_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::NetworkServices::V1::DepService::Rest::ServiceStub.stub :transcode_delete_lb_edge_extension_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_lb_edge_extension_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::DepService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_lb_edge_extension({ name: name, request_id: request_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_lb_edge_extension name: name, request_id: request_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.delete_lb_edge_extension ::Google::Cloud::NetworkServices::V1::DeleteLbEdgeExtensionRequest.new(name: name, request_id: request_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.delete_lb_edge_extension({ name: name, request_id: request_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.delete_lb_edge_extension(::Google::Cloud::NetworkServices::V1::DeleteLbEdgeExtensionRequest.new(name: name, request_id: request_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_lb_edge_extension_client_stub.call_count - end - end - end - - def test_list_authz_extensions - # Create test objects. - client_result = ::Google::Cloud::NetworkServices::V1::ListAuthzExtensionsResponse.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_authz_extensions_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::NetworkServices::V1::DepService::Rest::ServiceStub.stub :transcode_list_authz_extensions_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_authz_extensions_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::DepService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_authz_extensions({ 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 - c.list_authz_extensions 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 - c.list_authz_extensions ::Google::Cloud::NetworkServices::V1::ListAuthzExtensionsRequest.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 - c.list_authz_extensions({ 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 - c.list_authz_extensions(::Google::Cloud::NetworkServices::V1::ListAuthzExtensionsRequest.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_authz_extensions_client_stub.call_count - end - end - end - - def test_get_authz_extension - # Create test objects. - client_result = ::Google::Cloud::NetworkServices::V1::AuthzExtension.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_authz_extension_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::NetworkServices::V1::DepService::Rest::ServiceStub.stub :transcode_get_authz_extension_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_authz_extension_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::DepService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_authz_extension({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_authz_extension name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_authz_extension ::Google::Cloud::NetworkServices::V1::GetAuthzExtensionRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_authz_extension({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_authz_extension(::Google::Cloud::NetworkServices::V1::GetAuthzExtensionRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_authz_extension_client_stub.call_count - end - end - end - - def test_create_authz_extension - # 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" - authz_extension_id = "hello world" - authz_extension = {} - request_id = "hello world" - - create_authz_extension_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::NetworkServices::V1::DepService::Rest::ServiceStub.stub :transcode_create_authz_extension_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_authz_extension_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::DepService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.create_authz_extension({ parent: parent, authz_extension_id: authz_extension_id, authz_extension: authz_extension, request_id: request_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.create_authz_extension parent: parent, authz_extension_id: authz_extension_id, authz_extension: authz_extension, request_id: request_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.create_authz_extension ::Google::Cloud::NetworkServices::V1::CreateAuthzExtensionRequest.new(parent: parent, authz_extension_id: authz_extension_id, authz_extension: authz_extension, request_id: request_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.create_authz_extension({ parent: parent, authz_extension_id: authz_extension_id, authz_extension: authz_extension, request_id: request_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.create_authz_extension(::Google::Cloud::NetworkServices::V1::CreateAuthzExtensionRequest.new(parent: parent, authz_extension_id: authz_extension_id, authz_extension: authz_extension, request_id: request_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_authz_extension_client_stub.call_count - end - end - end - - def test_update_authz_extension - # 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 = {} - authz_extension = {} - request_id = "hello world" - - update_authz_extension_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::NetworkServices::V1::DepService::Rest::ServiceStub.stub :transcode_update_authz_extension_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_authz_extension_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::DepService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_authz_extension({ update_mask: update_mask, authz_extension: authz_extension, request_id: request_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_authz_extension update_mask: update_mask, authz_extension: authz_extension, request_id: request_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_authz_extension ::Google::Cloud::NetworkServices::V1::UpdateAuthzExtensionRequest.new(update_mask: update_mask, authz_extension: authz_extension, request_id: request_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_authz_extension({ update_mask: update_mask, authz_extension: authz_extension, request_id: request_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_authz_extension(::Google::Cloud::NetworkServices::V1::UpdateAuthzExtensionRequest.new(update_mask: update_mask, authz_extension: authz_extension, request_id: request_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_authz_extension_client_stub.call_count - end - end - end - - def test_delete_authz_extension - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - request_id = "hello world" - - delete_authz_extension_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::NetworkServices::V1::DepService::Rest::ServiceStub.stub :transcode_delete_authz_extension_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_authz_extension_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::DepService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_authz_extension({ name: name, request_id: request_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_authz_extension name: name, request_id: request_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.delete_authz_extension ::Google::Cloud::NetworkServices::V1::DeleteAuthzExtensionRequest.new(name: name, request_id: request_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.delete_authz_extension({ name: name, request_id: request_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.delete_authz_extension(::Google::Cloud::NetworkServices::V1::DeleteAuthzExtensionRequest.new(name: name, request_id: request_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_authz_extension_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::NetworkServices::V1::DepService::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::NetworkServices::V1::DepService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-network_services-v1/test/google/cloud/network_services/v1/dep_service_test.rb b/owl-bot-staging/google-cloud-network_services-v1/test/google/cloud/network_services/v1/dep_service_test.rb deleted file mode 100644 index ad6741a96c49..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/test/google/cloud/network_services/v1/dep_service_test.rb +++ /dev/null @@ -1,1438 +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/networkservices/v1/dep_pb" -require "google/cloud/network_services/v1/dep_service" - -class ::Google::Cloud::NetworkServices::V1::DepService::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_lb_traffic_extensions - # Create GRPC objects. - grpc_response = ::Google::Cloud::NetworkServices::V1::ListLbTrafficExtensionsResponse.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_lb_traffic_extensions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_lb_traffic_extensions, name - assert_kind_of ::Google::Cloud::NetworkServices::V1::ListLbTrafficExtensionsRequest, 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_lb_traffic_extensions_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::DepService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_lb_traffic_extensions({ 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 - c.list_lb_traffic_extensions 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 - c.list_lb_traffic_extensions ::Google::Cloud::NetworkServices::V1::ListLbTrafficExtensionsRequest.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 - c.list_lb_traffic_extensions({ 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 - c.list_lb_traffic_extensions(::Google::Cloud::NetworkServices::V1::ListLbTrafficExtensionsRequest.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_lb_traffic_extensions_client_stub.call_rpc_count - end - end - - def test_get_lb_traffic_extension - # Create GRPC objects. - grpc_response = ::Google::Cloud::NetworkServices::V1::LbTrafficExtension.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_lb_traffic_extension_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_lb_traffic_extension, name - assert_kind_of ::Google::Cloud::NetworkServices::V1::GetLbTrafficExtensionRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_lb_traffic_extension_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::DepService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_lb_traffic_extension({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_lb_traffic_extension name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_lb_traffic_extension ::Google::Cloud::NetworkServices::V1::GetLbTrafficExtensionRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_lb_traffic_extension({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_lb_traffic_extension(::Google::Cloud::NetworkServices::V1::GetLbTrafficExtensionRequest.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_lb_traffic_extension_client_stub.call_rpc_count - end - end - - def test_create_lb_traffic_extension - # 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" - lb_traffic_extension_id = "hello world" - lb_traffic_extension = {} - request_id = "hello world" - - create_lb_traffic_extension_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_lb_traffic_extension, name - assert_kind_of ::Google::Cloud::NetworkServices::V1::CreateLbTrafficExtensionRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["lb_traffic_extension_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::NetworkServices::V1::LbTrafficExtension), request["lb_traffic_extension"] - assert_equal "hello world", request["request_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_lb_traffic_extension_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::DepService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.create_lb_traffic_extension({ parent: parent, lb_traffic_extension_id: lb_traffic_extension_id, lb_traffic_extension: lb_traffic_extension, request_id: request_id }) 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 - c.create_lb_traffic_extension parent: parent, lb_traffic_extension_id: lb_traffic_extension_id, lb_traffic_extension: lb_traffic_extension, request_id: request_id 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 - c.create_lb_traffic_extension ::Google::Cloud::NetworkServices::V1::CreateLbTrafficExtensionRequest.new(parent: parent, lb_traffic_extension_id: lb_traffic_extension_id, lb_traffic_extension: lb_traffic_extension, request_id: request_id) 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 - c.create_lb_traffic_extension({ parent: parent, lb_traffic_extension_id: lb_traffic_extension_id, lb_traffic_extension: lb_traffic_extension, request_id: request_id }, 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 - c.create_lb_traffic_extension(::Google::Cloud::NetworkServices::V1::CreateLbTrafficExtensionRequest.new(parent: parent, lb_traffic_extension_id: lb_traffic_extension_id, lb_traffic_extension: lb_traffic_extension, request_id: request_id), 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_lb_traffic_extension_client_stub.call_rpc_count - end - end - - def test_update_lb_traffic_extension - # 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 = {} - lb_traffic_extension = {} - request_id = "hello world" - - update_lb_traffic_extension_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_lb_traffic_extension, name - assert_kind_of ::Google::Cloud::NetworkServices::V1::UpdateLbTrafficExtensionRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::NetworkServices::V1::LbTrafficExtension), request["lb_traffic_extension"] - assert_equal "hello world", request["request_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_lb_traffic_extension_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::DepService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_lb_traffic_extension({ update_mask: update_mask, lb_traffic_extension: lb_traffic_extension, request_id: request_id }) 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 - c.update_lb_traffic_extension update_mask: update_mask, lb_traffic_extension: lb_traffic_extension, request_id: request_id 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 - c.update_lb_traffic_extension ::Google::Cloud::NetworkServices::V1::UpdateLbTrafficExtensionRequest.new(update_mask: update_mask, lb_traffic_extension: lb_traffic_extension, request_id: request_id) 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 - c.update_lb_traffic_extension({ update_mask: update_mask, lb_traffic_extension: lb_traffic_extension, request_id: request_id }, 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 - c.update_lb_traffic_extension(::Google::Cloud::NetworkServices::V1::UpdateLbTrafficExtensionRequest.new(update_mask: update_mask, lb_traffic_extension: lb_traffic_extension, request_id: request_id), 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_lb_traffic_extension_client_stub.call_rpc_count - end - end - - def test_delete_lb_traffic_extension - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - request_id = "hello world" - - delete_lb_traffic_extension_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_lb_traffic_extension, name - assert_kind_of ::Google::Cloud::NetworkServices::V1::DeleteLbTrafficExtensionRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["request_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_lb_traffic_extension_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::DepService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_lb_traffic_extension({ name: name, request_id: request_id }) 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 - c.delete_lb_traffic_extension name: name, request_id: request_id 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 - c.delete_lb_traffic_extension ::Google::Cloud::NetworkServices::V1::DeleteLbTrafficExtensionRequest.new(name: name, request_id: request_id) 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 - c.delete_lb_traffic_extension({ name: name, request_id: request_id }, 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 - c.delete_lb_traffic_extension(::Google::Cloud::NetworkServices::V1::DeleteLbTrafficExtensionRequest.new(name: name, request_id: request_id), 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_lb_traffic_extension_client_stub.call_rpc_count - end - end - - def test_list_lb_route_extensions - # Create GRPC objects. - grpc_response = ::Google::Cloud::NetworkServices::V1::ListLbRouteExtensionsResponse.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_lb_route_extensions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_lb_route_extensions, name - assert_kind_of ::Google::Cloud::NetworkServices::V1::ListLbRouteExtensionsRequest, 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_lb_route_extensions_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::DepService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_lb_route_extensions({ 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 - c.list_lb_route_extensions 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 - c.list_lb_route_extensions ::Google::Cloud::NetworkServices::V1::ListLbRouteExtensionsRequest.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 - c.list_lb_route_extensions({ 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 - c.list_lb_route_extensions(::Google::Cloud::NetworkServices::V1::ListLbRouteExtensionsRequest.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_lb_route_extensions_client_stub.call_rpc_count - end - end - - def test_get_lb_route_extension - # Create GRPC objects. - grpc_response = ::Google::Cloud::NetworkServices::V1::LbRouteExtension.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_lb_route_extension_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_lb_route_extension, name - assert_kind_of ::Google::Cloud::NetworkServices::V1::GetLbRouteExtensionRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_lb_route_extension_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::DepService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_lb_route_extension({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_lb_route_extension name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_lb_route_extension ::Google::Cloud::NetworkServices::V1::GetLbRouteExtensionRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_lb_route_extension({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_lb_route_extension(::Google::Cloud::NetworkServices::V1::GetLbRouteExtensionRequest.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_lb_route_extension_client_stub.call_rpc_count - end - end - - def test_create_lb_route_extension - # 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" - lb_route_extension_id = "hello world" - lb_route_extension = {} - request_id = "hello world" - - create_lb_route_extension_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_lb_route_extension, name - assert_kind_of ::Google::Cloud::NetworkServices::V1::CreateLbRouteExtensionRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["lb_route_extension_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::NetworkServices::V1::LbRouteExtension), request["lb_route_extension"] - assert_equal "hello world", request["request_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_lb_route_extension_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::DepService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.create_lb_route_extension({ parent: parent, lb_route_extension_id: lb_route_extension_id, lb_route_extension: lb_route_extension, request_id: request_id }) 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 - c.create_lb_route_extension parent: parent, lb_route_extension_id: lb_route_extension_id, lb_route_extension: lb_route_extension, request_id: request_id 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 - c.create_lb_route_extension ::Google::Cloud::NetworkServices::V1::CreateLbRouteExtensionRequest.new(parent: parent, lb_route_extension_id: lb_route_extension_id, lb_route_extension: lb_route_extension, request_id: request_id) 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 - c.create_lb_route_extension({ parent: parent, lb_route_extension_id: lb_route_extension_id, lb_route_extension: lb_route_extension, request_id: request_id }, 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 - c.create_lb_route_extension(::Google::Cloud::NetworkServices::V1::CreateLbRouteExtensionRequest.new(parent: parent, lb_route_extension_id: lb_route_extension_id, lb_route_extension: lb_route_extension, request_id: request_id), 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_lb_route_extension_client_stub.call_rpc_count - end - end - - def test_update_lb_route_extension - # 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 = {} - lb_route_extension = {} - request_id = "hello world" - - update_lb_route_extension_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_lb_route_extension, name - assert_kind_of ::Google::Cloud::NetworkServices::V1::UpdateLbRouteExtensionRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::NetworkServices::V1::LbRouteExtension), request["lb_route_extension"] - assert_equal "hello world", request["request_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_lb_route_extension_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::DepService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_lb_route_extension({ update_mask: update_mask, lb_route_extension: lb_route_extension, request_id: request_id }) 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 - c.update_lb_route_extension update_mask: update_mask, lb_route_extension: lb_route_extension, request_id: request_id 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 - c.update_lb_route_extension ::Google::Cloud::NetworkServices::V1::UpdateLbRouteExtensionRequest.new(update_mask: update_mask, lb_route_extension: lb_route_extension, request_id: request_id) 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 - c.update_lb_route_extension({ update_mask: update_mask, lb_route_extension: lb_route_extension, request_id: request_id }, 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 - c.update_lb_route_extension(::Google::Cloud::NetworkServices::V1::UpdateLbRouteExtensionRequest.new(update_mask: update_mask, lb_route_extension: lb_route_extension, request_id: request_id), 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_lb_route_extension_client_stub.call_rpc_count - end - end - - def test_delete_lb_route_extension - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - request_id = "hello world" - - delete_lb_route_extension_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_lb_route_extension, name - assert_kind_of ::Google::Cloud::NetworkServices::V1::DeleteLbRouteExtensionRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["request_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_lb_route_extension_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::DepService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_lb_route_extension({ name: name, request_id: request_id }) 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 - c.delete_lb_route_extension name: name, request_id: request_id 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 - c.delete_lb_route_extension ::Google::Cloud::NetworkServices::V1::DeleteLbRouteExtensionRequest.new(name: name, request_id: request_id) 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 - c.delete_lb_route_extension({ name: name, request_id: request_id }, 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 - c.delete_lb_route_extension(::Google::Cloud::NetworkServices::V1::DeleteLbRouteExtensionRequest.new(name: name, request_id: request_id), 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_lb_route_extension_client_stub.call_rpc_count - end - end - - def test_list_lb_edge_extensions - # Create GRPC objects. - grpc_response = ::Google::Cloud::NetworkServices::V1::ListLbEdgeExtensionsResponse.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_lb_edge_extensions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_lb_edge_extensions, name - assert_kind_of ::Google::Cloud::NetworkServices::V1::ListLbEdgeExtensionsRequest, 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_lb_edge_extensions_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::DepService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_lb_edge_extensions({ 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 - c.list_lb_edge_extensions 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 - c.list_lb_edge_extensions ::Google::Cloud::NetworkServices::V1::ListLbEdgeExtensionsRequest.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 - c.list_lb_edge_extensions({ 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 - c.list_lb_edge_extensions(::Google::Cloud::NetworkServices::V1::ListLbEdgeExtensionsRequest.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_lb_edge_extensions_client_stub.call_rpc_count - end - end - - def test_get_lb_edge_extension - # Create GRPC objects. - grpc_response = ::Google::Cloud::NetworkServices::V1::LbEdgeExtension.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_lb_edge_extension_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_lb_edge_extension, name - assert_kind_of ::Google::Cloud::NetworkServices::V1::GetLbEdgeExtensionRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_lb_edge_extension_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::DepService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_lb_edge_extension({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_lb_edge_extension name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_lb_edge_extension ::Google::Cloud::NetworkServices::V1::GetLbEdgeExtensionRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_lb_edge_extension({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_lb_edge_extension(::Google::Cloud::NetworkServices::V1::GetLbEdgeExtensionRequest.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_lb_edge_extension_client_stub.call_rpc_count - end - end - - def test_create_lb_edge_extension - # 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" - lb_edge_extension_id = "hello world" - lb_edge_extension = {} - request_id = "hello world" - - create_lb_edge_extension_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_lb_edge_extension, name - assert_kind_of ::Google::Cloud::NetworkServices::V1::CreateLbEdgeExtensionRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["lb_edge_extension_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::NetworkServices::V1::LbEdgeExtension), request["lb_edge_extension"] - assert_equal "hello world", request["request_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_lb_edge_extension_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::DepService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.create_lb_edge_extension({ parent: parent, lb_edge_extension_id: lb_edge_extension_id, lb_edge_extension: lb_edge_extension, request_id: request_id }) 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 - c.create_lb_edge_extension parent: parent, lb_edge_extension_id: lb_edge_extension_id, lb_edge_extension: lb_edge_extension, request_id: request_id 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 - c.create_lb_edge_extension ::Google::Cloud::NetworkServices::V1::CreateLbEdgeExtensionRequest.new(parent: parent, lb_edge_extension_id: lb_edge_extension_id, lb_edge_extension: lb_edge_extension, request_id: request_id) 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 - c.create_lb_edge_extension({ parent: parent, lb_edge_extension_id: lb_edge_extension_id, lb_edge_extension: lb_edge_extension, request_id: request_id }, 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 - c.create_lb_edge_extension(::Google::Cloud::NetworkServices::V1::CreateLbEdgeExtensionRequest.new(parent: parent, lb_edge_extension_id: lb_edge_extension_id, lb_edge_extension: lb_edge_extension, request_id: request_id), 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_lb_edge_extension_client_stub.call_rpc_count - end - end - - def test_update_lb_edge_extension - # 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 = {} - lb_edge_extension = {} - request_id = "hello world" - - update_lb_edge_extension_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_lb_edge_extension, name - assert_kind_of ::Google::Cloud::NetworkServices::V1::UpdateLbEdgeExtensionRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::NetworkServices::V1::LbEdgeExtension), request["lb_edge_extension"] - assert_equal "hello world", request["request_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_lb_edge_extension_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::DepService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_lb_edge_extension({ update_mask: update_mask, lb_edge_extension: lb_edge_extension, request_id: request_id }) 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 - c.update_lb_edge_extension update_mask: update_mask, lb_edge_extension: lb_edge_extension, request_id: request_id 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 - c.update_lb_edge_extension ::Google::Cloud::NetworkServices::V1::UpdateLbEdgeExtensionRequest.new(update_mask: update_mask, lb_edge_extension: lb_edge_extension, request_id: request_id) 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 - c.update_lb_edge_extension({ update_mask: update_mask, lb_edge_extension: lb_edge_extension, request_id: request_id }, 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 - c.update_lb_edge_extension(::Google::Cloud::NetworkServices::V1::UpdateLbEdgeExtensionRequest.new(update_mask: update_mask, lb_edge_extension: lb_edge_extension, request_id: request_id), 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_lb_edge_extension_client_stub.call_rpc_count - end - end - - def test_delete_lb_edge_extension - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - request_id = "hello world" - - delete_lb_edge_extension_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_lb_edge_extension, name - assert_kind_of ::Google::Cloud::NetworkServices::V1::DeleteLbEdgeExtensionRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["request_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_lb_edge_extension_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::DepService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_lb_edge_extension({ name: name, request_id: request_id }) 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 - c.delete_lb_edge_extension name: name, request_id: request_id 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 - c.delete_lb_edge_extension ::Google::Cloud::NetworkServices::V1::DeleteLbEdgeExtensionRequest.new(name: name, request_id: request_id) 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 - c.delete_lb_edge_extension({ name: name, request_id: request_id }, 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 - c.delete_lb_edge_extension(::Google::Cloud::NetworkServices::V1::DeleteLbEdgeExtensionRequest.new(name: name, request_id: request_id), 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_lb_edge_extension_client_stub.call_rpc_count - end - end - - def test_list_authz_extensions - # Create GRPC objects. - grpc_response = ::Google::Cloud::NetworkServices::V1::ListAuthzExtensionsResponse.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_authz_extensions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_authz_extensions, name - assert_kind_of ::Google::Cloud::NetworkServices::V1::ListAuthzExtensionsRequest, 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_authz_extensions_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::DepService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_authz_extensions({ 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 - c.list_authz_extensions 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 - c.list_authz_extensions ::Google::Cloud::NetworkServices::V1::ListAuthzExtensionsRequest.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 - c.list_authz_extensions({ 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 - c.list_authz_extensions(::Google::Cloud::NetworkServices::V1::ListAuthzExtensionsRequest.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_authz_extensions_client_stub.call_rpc_count - end - end - - def test_get_authz_extension - # Create GRPC objects. - grpc_response = ::Google::Cloud::NetworkServices::V1::AuthzExtension.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_authz_extension_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_authz_extension, name - assert_kind_of ::Google::Cloud::NetworkServices::V1::GetAuthzExtensionRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_authz_extension_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::DepService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_authz_extension({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_authz_extension name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_authz_extension ::Google::Cloud::NetworkServices::V1::GetAuthzExtensionRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_authz_extension({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_authz_extension(::Google::Cloud::NetworkServices::V1::GetAuthzExtensionRequest.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_authz_extension_client_stub.call_rpc_count - end - end - - def test_create_authz_extension - # 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" - authz_extension_id = "hello world" - authz_extension = {} - request_id = "hello world" - - create_authz_extension_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_authz_extension, name - assert_kind_of ::Google::Cloud::NetworkServices::V1::CreateAuthzExtensionRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["authz_extension_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::NetworkServices::V1::AuthzExtension), request["authz_extension"] - assert_equal "hello world", request["request_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_authz_extension_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::DepService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.create_authz_extension({ parent: parent, authz_extension_id: authz_extension_id, authz_extension: authz_extension, request_id: request_id }) 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 - c.create_authz_extension parent: parent, authz_extension_id: authz_extension_id, authz_extension: authz_extension, request_id: request_id 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 - c.create_authz_extension ::Google::Cloud::NetworkServices::V1::CreateAuthzExtensionRequest.new(parent: parent, authz_extension_id: authz_extension_id, authz_extension: authz_extension, request_id: request_id) 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 - c.create_authz_extension({ parent: parent, authz_extension_id: authz_extension_id, authz_extension: authz_extension, request_id: request_id }, 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 - c.create_authz_extension(::Google::Cloud::NetworkServices::V1::CreateAuthzExtensionRequest.new(parent: parent, authz_extension_id: authz_extension_id, authz_extension: authz_extension, request_id: request_id), 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_authz_extension_client_stub.call_rpc_count - end - end - - def test_update_authz_extension - # 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 = {} - authz_extension = {} - request_id = "hello world" - - update_authz_extension_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_authz_extension, name - assert_kind_of ::Google::Cloud::NetworkServices::V1::UpdateAuthzExtensionRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::NetworkServices::V1::AuthzExtension), request["authz_extension"] - assert_equal "hello world", request["request_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_authz_extension_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::DepService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_authz_extension({ update_mask: update_mask, authz_extension: authz_extension, request_id: request_id }) 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 - c.update_authz_extension update_mask: update_mask, authz_extension: authz_extension, request_id: request_id 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 - c.update_authz_extension ::Google::Cloud::NetworkServices::V1::UpdateAuthzExtensionRequest.new(update_mask: update_mask, authz_extension: authz_extension, request_id: request_id) 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 - c.update_authz_extension({ update_mask: update_mask, authz_extension: authz_extension, request_id: request_id }, 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 - c.update_authz_extension(::Google::Cloud::NetworkServices::V1::UpdateAuthzExtensionRequest.new(update_mask: update_mask, authz_extension: authz_extension, request_id: request_id), 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_authz_extension_client_stub.call_rpc_count - end - end - - def test_delete_authz_extension - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - request_id = "hello world" - - delete_authz_extension_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_authz_extension, name - assert_kind_of ::Google::Cloud::NetworkServices::V1::DeleteAuthzExtensionRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["request_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_authz_extension_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::DepService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_authz_extension({ name: name, request_id: request_id }) 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 - c.delete_authz_extension name: name, request_id: request_id 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 - c.delete_authz_extension ::Google::Cloud::NetworkServices::V1::DeleteAuthzExtensionRequest.new(name: name, request_id: request_id) 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 - c.delete_authz_extension({ name: name, request_id: request_id }, 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 - c.delete_authz_extension(::Google::Cloud::NetworkServices::V1::DeleteAuthzExtensionRequest.new(name: name, request_id: request_id), 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_authz_extension_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::NetworkServices::V1::DepService::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::NetworkServices::V1::DepService::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::NetworkServices::V1::DepService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::NetworkServices::V1::DepService::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::NetworkServices::V1::DepService::Client.new do |config| - config.credentials = grpc_channel - end - end - - assert_kind_of ::Google::Cloud::NetworkServices::V1::DepService::Operations, client.operations_client - end -end diff --git a/owl-bot-staging/google-cloud-network_services-v1/test/google/cloud/network_services/v1/network_services_operations_test.rb b/owl-bot-staging/google-cloud-network_services-v1/test/google/cloud/network_services/v1/network_services_operations_test.rb deleted file mode 100644 index ae79f6f84a18..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/test/google/cloud/network_services/v1/network_services_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/networkservices/v1/network_services_pb" -require "google/cloud/networkservices/v1/network_services_services_pb" -require "google/cloud/network_services/v1/network_services" - -class ::Google::Cloud::NetworkServices::V1::NetworkServices::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 - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.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 - c.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 - c.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 - c.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 - c.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 - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.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 - c.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 - c.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 - c.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 - c.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 - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_operation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.delete_operation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.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 - c.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 - c.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 - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.cancel_operation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.cancel_operation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.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 - c.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 - c.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 - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.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 - c.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 - c.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 - c.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 - c.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::NetworkServices::V1::NetworkServices::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::NetworkServices::V1::NetworkServices::Operations::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-network_services-v1/test/google/cloud/network_services/v1/network_services_paths_test.rb b/owl-bot-staging/google-cloud-network_services-v1/test/google/cloud/network_services/v1/network_services_paths_test.rb deleted file mode 100644 index fa877883b8aa..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/test/google/cloud/network_services/v1/network_services_paths_test.rb +++ /dev/null @@ -1,355 +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_services/v1/network_services" - -class ::Google::Cloud::NetworkServices::V1::NetworkServices::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_address_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.address_path project: "value0", region: "value1", address: "value2" - assert_equal "projects/value0/regions/value1/addresses/value2", path - end - end - - def test_agent_gateway_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.agent_gateway_path project: "value0", location: "value1", agent_gateway: "value2" - assert_equal "projects/value0/locations/value1/agentGateways/value2", path - end - end - - def test_authorization_policy_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.authorization_policy_path project: "value0", location: "value1", authorization_policy: "value2" - assert_equal "projects/value0/locations/value1/authorizationPolicies/value2", path - end - end - - def test_backend_service_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.backend_service_path project: "value0", location: "value1", backend_service: "value2" - assert_equal "projects/value0/locations/value1/backendServices/value2", path - end - end - - def test_certificate_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.certificate_path project: "value0", location: "value1", certificate: "value2" - assert_equal "projects/value0/locations/value1/certificates/value2", path - end - end - - def test_client_tls_policy_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.client_tls_policy_path project: "value0", location: "value1", client_tls_policy: "value2" - assert_equal "projects/value0/locations/value1/clientTlsPolicies/value2", path - end - end - - def test_endpoint_policy_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.endpoint_policy_path project: "value0", location: "value1", endpoint_policy: "value2" - assert_equal "projects/value0/locations/value1/endpointPolicies/value2", path - end - end - - def test_gateway_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.gateway_path project: "value0", location: "value1", gateway: "value2" - assert_equal "projects/value0/locations/value1/gateways/value2", path - end - end - - def test_gateway_route_view_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.gateway_route_view_path project: "value0", location: "value1", gateway: "value2", route_view: "value3" - assert_equal "projects/value0/locations/value1/gateways/value2/routeViews/value3", path - end - end - - def test_gateway_security_policy_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.gateway_security_policy_path project: "value0", location: "value1", gateway_security_policy: "value2" - assert_equal "projects/value0/locations/value1/gatewaySecurityPolicies/value2", path - end - end - - def test_grpc_route_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.grpc_route_path project: "value0", location: "value1", grpc_route: "value2" - assert_equal "projects/value0/locations/value1/grpcRoutes/value2", path - end - end - - def test_http_route_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.http_route_path project: "value0", location: "value1", http_route: "value2" - assert_equal "projects/value0/locations/value1/httpRoutes/value2", path - end - end - - def test_location_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::NetworkServices::V1::NetworkServices::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_mesh_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.mesh_path project: "value0", location: "value1", mesh: "value2" - assert_equal "projects/value0/locations/value1/meshes/value2", path - end - end - - def test_mesh_route_view_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.mesh_route_view_path project: "value0", location: "value1", mesh: "value2", route_view: "value3" - assert_equal "projects/value0/locations/value1/meshes/value2/routeViews/value3", path - end - end - - def test_network_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.network_path project: "value0", network: "value1" - assert_equal "projects/value0/global/networks/value1", path - end - end - - def test_server_tls_policy_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.server_tls_policy_path project: "value0", location: "value1", server_tls_policy: "value2" - assert_equal "projects/value0/locations/value1/serverTlsPolicies/value2", path - end - end - - def test_service_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.service_path project: "value0", location: "value1", namespace: "value2", service: "value3" - assert_equal "projects/value0/locations/value1/namespaces/value2/services/value3", path - end - end - - def test_service_binding_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.service_binding_path project: "value0", location: "value1", service_binding: "value2" - assert_equal "projects/value0/locations/value1/serviceBindings/value2", path - end - end - - def test_service_lb_policy_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.service_lb_policy_path project: "value0", location: "value1", service_lb_policy: "value2" - assert_equal "projects/value0/locations/value1/serviceLbPolicies/value2", path - end - end - - def test_subnetwork_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.subnetwork_path project: "value0", region: "value1", subnetwork: "value2" - assert_equal "projects/value0/regions/value1/subnetworks/value2", path - end - end - - def test_target_tcp_proxy_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.target_tcp_proxy_path project: "value0", location: "value1", target_tcp_proxy: "value2" - assert_equal "projects/value0/locations/value1/targetTcpProxies/value2", path - end - end - - def test_tcp_route_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.tcp_route_path project: "value0", location: "value1", tcp_route: "value2" - assert_equal "projects/value0/locations/value1/tcpRoutes/value2", path - end - end - - def test_tls_route_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.tls_route_path project: "value0", location: "value1", tls_route: "value2" - assert_equal "projects/value0/locations/value1/tlsRoutes/value2", path - end - end - - def test_wasm_plugin_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.wasm_plugin_path project: "value0", location: "value1", wasm_plugin: "value2" - assert_equal "projects/value0/locations/value1/wasmPlugins/value2", path - end - end - - def test_wasm_plugin_version_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.wasm_plugin_version_path project: "value0", location: "value1", wasm_plugin: "value2", wasm_plugin_version: "value3" - assert_equal "projects/value0/locations/value1/wasmPlugins/value2/versions/value3", path - end - end -end diff --git a/owl-bot-staging/google-cloud-network_services-v1/test/google/cloud/network_services/v1/network_services_rest_test.rb b/owl-bot-staging/google-cloud-network_services-v1/test/google/cloud/network_services/v1/network_services_rest_test.rb deleted file mode 100644 index d40dfc844722..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/test/google/cloud/network_services/v1/network_services_rest_test.rb +++ /dev/null @@ -1,3575 +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/networkservices/v1/network_services_pb" -require "google/cloud/network_services/v1/network_services/rest" - - -class ::Google::Cloud::NetworkServices::V1::NetworkServices::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_endpoint_policies - # Create test objects. - client_result = ::Google::Cloud::NetworkServices::V1::ListEndpointPoliciesResponse.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" - return_partial_success = true - - list_endpoint_policies_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_list_endpoint_policies_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_endpoint_policies_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_endpoint_policies({ parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_endpoint_policies parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_endpoint_policies ::Google::Cloud::NetworkServices::V1::ListEndpointPoliciesRequest.new(parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_endpoint_policies({ parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_endpoint_policies(::Google::Cloud::NetworkServices::V1::ListEndpointPoliciesRequest.new(parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_endpoint_policies_client_stub.call_count - end - end - end - - def test_get_endpoint_policy - # Create test objects. - client_result = ::Google::Cloud::NetworkServices::V1::EndpointPolicy.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_endpoint_policy_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_get_endpoint_policy_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_endpoint_policy_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_endpoint_policy({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_endpoint_policy name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_endpoint_policy ::Google::Cloud::NetworkServices::V1::GetEndpointPolicyRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_endpoint_policy({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_endpoint_policy(::Google::Cloud::NetworkServices::V1::GetEndpointPolicyRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_endpoint_policy_client_stub.call_count - end - end - end - - def test_create_endpoint_policy - # 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" - endpoint_policy_id = "hello world" - endpoint_policy = {} - - create_endpoint_policy_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_create_endpoint_policy_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_endpoint_policy_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.create_endpoint_policy({ parent: parent, endpoint_policy_id: endpoint_policy_id, endpoint_policy: endpoint_policy }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.create_endpoint_policy parent: parent, endpoint_policy_id: endpoint_policy_id, endpoint_policy: endpoint_policy do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.create_endpoint_policy ::Google::Cloud::NetworkServices::V1::CreateEndpointPolicyRequest.new(parent: parent, endpoint_policy_id: endpoint_policy_id, endpoint_policy: endpoint_policy) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.create_endpoint_policy({ parent: parent, endpoint_policy_id: endpoint_policy_id, endpoint_policy: endpoint_policy }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.create_endpoint_policy(::Google::Cloud::NetworkServices::V1::CreateEndpointPolicyRequest.new(parent: parent, endpoint_policy_id: endpoint_policy_id, endpoint_policy: endpoint_policy), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_endpoint_policy_client_stub.call_count - end - end - end - - def test_update_endpoint_policy - # 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 = {} - endpoint_policy = {} - - update_endpoint_policy_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_update_endpoint_policy_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_endpoint_policy_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_endpoint_policy({ update_mask: update_mask, endpoint_policy: endpoint_policy }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_endpoint_policy update_mask: update_mask, endpoint_policy: endpoint_policy do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_endpoint_policy ::Google::Cloud::NetworkServices::V1::UpdateEndpointPolicyRequest.new(update_mask: update_mask, endpoint_policy: endpoint_policy) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_endpoint_policy({ update_mask: update_mask, endpoint_policy: endpoint_policy }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_endpoint_policy(::Google::Cloud::NetworkServices::V1::UpdateEndpointPolicyRequest.new(update_mask: update_mask, endpoint_policy: endpoint_policy), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_endpoint_policy_client_stub.call_count - end - end - end - - def test_delete_endpoint_policy - # 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_endpoint_policy_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_delete_endpoint_policy_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_endpoint_policy_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_endpoint_policy({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_endpoint_policy name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.delete_endpoint_policy ::Google::Cloud::NetworkServices::V1::DeleteEndpointPolicyRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.delete_endpoint_policy({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.delete_endpoint_policy(::Google::Cloud::NetworkServices::V1::DeleteEndpointPolicyRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_endpoint_policy_client_stub.call_count - end - end - end - - def test_list_wasm_plugin_versions - # Create test objects. - client_result = ::Google::Cloud::NetworkServices::V1::ListWasmPluginVersionsResponse.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" - - list_wasm_plugin_versions_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_list_wasm_plugin_versions_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_wasm_plugin_versions_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_wasm_plugin_versions({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_wasm_plugin_versions parent: parent, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_wasm_plugin_versions ::Google::Cloud::NetworkServices::V1::ListWasmPluginVersionsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_wasm_plugin_versions({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_wasm_plugin_versions(::Google::Cloud::NetworkServices::V1::ListWasmPluginVersionsRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_wasm_plugin_versions_client_stub.call_count - end - end - end - - def test_get_wasm_plugin_version - # Create test objects. - client_result = ::Google::Cloud::NetworkServices::V1::WasmPluginVersion.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_wasm_plugin_version_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_get_wasm_plugin_version_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_wasm_plugin_version_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_wasm_plugin_version({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_wasm_plugin_version name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_wasm_plugin_version ::Google::Cloud::NetworkServices::V1::GetWasmPluginVersionRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_wasm_plugin_version({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_wasm_plugin_version(::Google::Cloud::NetworkServices::V1::GetWasmPluginVersionRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_wasm_plugin_version_client_stub.call_count - end - end - end - - def test_create_wasm_plugin_version - # 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" - wasm_plugin_version_id = "hello world" - wasm_plugin_version = {} - - create_wasm_plugin_version_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_create_wasm_plugin_version_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_wasm_plugin_version_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.create_wasm_plugin_version({ parent: parent, wasm_plugin_version_id: wasm_plugin_version_id, wasm_plugin_version: wasm_plugin_version }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.create_wasm_plugin_version parent: parent, wasm_plugin_version_id: wasm_plugin_version_id, wasm_plugin_version: wasm_plugin_version do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.create_wasm_plugin_version ::Google::Cloud::NetworkServices::V1::CreateWasmPluginVersionRequest.new(parent: parent, wasm_plugin_version_id: wasm_plugin_version_id, wasm_plugin_version: wasm_plugin_version) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.create_wasm_plugin_version({ parent: parent, wasm_plugin_version_id: wasm_plugin_version_id, wasm_plugin_version: wasm_plugin_version }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.create_wasm_plugin_version(::Google::Cloud::NetworkServices::V1::CreateWasmPluginVersionRequest.new(parent: parent, wasm_plugin_version_id: wasm_plugin_version_id, wasm_plugin_version: wasm_plugin_version), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_wasm_plugin_version_client_stub.call_count - end - end - end - - def test_delete_wasm_plugin_version - # 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_wasm_plugin_version_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_delete_wasm_plugin_version_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_wasm_plugin_version_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_wasm_plugin_version({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_wasm_plugin_version name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.delete_wasm_plugin_version ::Google::Cloud::NetworkServices::V1::DeleteWasmPluginVersionRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.delete_wasm_plugin_version({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.delete_wasm_plugin_version(::Google::Cloud::NetworkServices::V1::DeleteWasmPluginVersionRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_wasm_plugin_version_client_stub.call_count - end - end - end - - def test_list_wasm_plugins - # Create test objects. - client_result = ::Google::Cloud::NetworkServices::V1::ListWasmPluginsResponse.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" - - list_wasm_plugins_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_list_wasm_plugins_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_wasm_plugins_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_wasm_plugins({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_wasm_plugins parent: parent, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_wasm_plugins ::Google::Cloud::NetworkServices::V1::ListWasmPluginsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_wasm_plugins({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_wasm_plugins(::Google::Cloud::NetworkServices::V1::ListWasmPluginsRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_wasm_plugins_client_stub.call_count - end - end - end - - def test_get_wasm_plugin - # Create test objects. - client_result = ::Google::Cloud::NetworkServices::V1::WasmPlugin.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - view = :WASM_PLUGIN_VIEW_UNSPECIFIED - - get_wasm_plugin_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_get_wasm_plugin_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_wasm_plugin_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_wasm_plugin({ name: name, view: view }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_wasm_plugin name: name, view: view do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_wasm_plugin ::Google::Cloud::NetworkServices::V1::GetWasmPluginRequest.new(name: name, view: view) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_wasm_plugin({ name: name, view: view }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_wasm_plugin(::Google::Cloud::NetworkServices::V1::GetWasmPluginRequest.new(name: name, view: view), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_wasm_plugin_client_stub.call_count - end - end - end - - def test_create_wasm_plugin - # 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" - wasm_plugin_id = "hello world" - wasm_plugin = {} - - create_wasm_plugin_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_create_wasm_plugin_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_wasm_plugin_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.create_wasm_plugin({ parent: parent, wasm_plugin_id: wasm_plugin_id, wasm_plugin: wasm_plugin }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.create_wasm_plugin parent: parent, wasm_plugin_id: wasm_plugin_id, wasm_plugin: wasm_plugin do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.create_wasm_plugin ::Google::Cloud::NetworkServices::V1::CreateWasmPluginRequest.new(parent: parent, wasm_plugin_id: wasm_plugin_id, wasm_plugin: wasm_plugin) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.create_wasm_plugin({ parent: parent, wasm_plugin_id: wasm_plugin_id, wasm_plugin: wasm_plugin }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.create_wasm_plugin(::Google::Cloud::NetworkServices::V1::CreateWasmPluginRequest.new(parent: parent, wasm_plugin_id: wasm_plugin_id, wasm_plugin: wasm_plugin), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_wasm_plugin_client_stub.call_count - end - end - end - - def test_update_wasm_plugin - # 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 = {} - wasm_plugin = {} - - update_wasm_plugin_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_update_wasm_plugin_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_wasm_plugin_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_wasm_plugin({ update_mask: update_mask, wasm_plugin: wasm_plugin }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_wasm_plugin update_mask: update_mask, wasm_plugin: wasm_plugin do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_wasm_plugin ::Google::Cloud::NetworkServices::V1::UpdateWasmPluginRequest.new(update_mask: update_mask, wasm_plugin: wasm_plugin) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_wasm_plugin({ update_mask: update_mask, wasm_plugin: wasm_plugin }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_wasm_plugin(::Google::Cloud::NetworkServices::V1::UpdateWasmPluginRequest.new(update_mask: update_mask, wasm_plugin: wasm_plugin), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_wasm_plugin_client_stub.call_count - end - end - end - - def test_delete_wasm_plugin - # 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_wasm_plugin_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_delete_wasm_plugin_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_wasm_plugin_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_wasm_plugin({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_wasm_plugin name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.delete_wasm_plugin ::Google::Cloud::NetworkServices::V1::DeleteWasmPluginRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.delete_wasm_plugin({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.delete_wasm_plugin(::Google::Cloud::NetworkServices::V1::DeleteWasmPluginRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_wasm_plugin_client_stub.call_count - end - end - end - - def test_list_gateways - # Create test objects. - client_result = ::Google::Cloud::NetworkServices::V1::ListGatewaysResponse.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" - - list_gateways_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_list_gateways_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_gateways_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_gateways({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_gateways parent: parent, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_gateways ::Google::Cloud::NetworkServices::V1::ListGatewaysRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_gateways({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_gateways(::Google::Cloud::NetworkServices::V1::ListGatewaysRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_gateways_client_stub.call_count - end - end - end - - def test_get_gateway - # Create test objects. - client_result = ::Google::Cloud::NetworkServices::V1::Gateway.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_gateway_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_get_gateway_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_gateway_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_gateway({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_gateway name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_gateway ::Google::Cloud::NetworkServices::V1::GetGatewayRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_gateway({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_gateway(::Google::Cloud::NetworkServices::V1::GetGatewayRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_gateway_client_stub.call_count - end - end - end - - def test_create_gateway - # 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" - gateway_id = "hello world" - gateway = {} - - create_gateway_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_create_gateway_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_gateway_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.create_gateway({ parent: parent, gateway_id: gateway_id, gateway: gateway }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.create_gateway parent: parent, gateway_id: gateway_id, gateway: gateway do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.create_gateway ::Google::Cloud::NetworkServices::V1::CreateGatewayRequest.new(parent: parent, gateway_id: gateway_id, gateway: gateway) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.create_gateway({ parent: parent, gateway_id: gateway_id, gateway: gateway }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.create_gateway(::Google::Cloud::NetworkServices::V1::CreateGatewayRequest.new(parent: parent, gateway_id: gateway_id, gateway: gateway), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_gateway_client_stub.call_count - end - end - end - - def test_update_gateway - # 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 = {} - gateway = {} - - update_gateway_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_update_gateway_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_gateway_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_gateway({ update_mask: update_mask, gateway: gateway }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_gateway update_mask: update_mask, gateway: gateway do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_gateway ::Google::Cloud::NetworkServices::V1::UpdateGatewayRequest.new(update_mask: update_mask, gateway: gateway) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_gateway({ update_mask: update_mask, gateway: gateway }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_gateway(::Google::Cloud::NetworkServices::V1::UpdateGatewayRequest.new(update_mask: update_mask, gateway: gateway), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_gateway_client_stub.call_count - end - end - end - - def test_delete_gateway - # 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_gateway_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_delete_gateway_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_gateway_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_gateway({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_gateway name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.delete_gateway ::Google::Cloud::NetworkServices::V1::DeleteGatewayRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.delete_gateway({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.delete_gateway(::Google::Cloud::NetworkServices::V1::DeleteGatewayRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_gateway_client_stub.call_count - end - end - end - - def test_list_grpc_routes - # Create test objects. - client_result = ::Google::Cloud::NetworkServices::V1::ListGrpcRoutesResponse.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" - return_partial_success = true - - list_grpc_routes_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_list_grpc_routes_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_grpc_routes_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_grpc_routes({ parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_grpc_routes parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_grpc_routes ::Google::Cloud::NetworkServices::V1::ListGrpcRoutesRequest.new(parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_grpc_routes({ parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_grpc_routes(::Google::Cloud::NetworkServices::V1::ListGrpcRoutesRequest.new(parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_grpc_routes_client_stub.call_count - end - end - end - - def test_get_grpc_route - # Create test objects. - client_result = ::Google::Cloud::NetworkServices::V1::GrpcRoute.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_grpc_route_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_get_grpc_route_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_grpc_route_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_grpc_route({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_grpc_route name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_grpc_route ::Google::Cloud::NetworkServices::V1::GetGrpcRouteRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_grpc_route({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_grpc_route(::Google::Cloud::NetworkServices::V1::GetGrpcRouteRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_grpc_route_client_stub.call_count - end - end - end - - def test_create_grpc_route - # 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" - grpc_route_id = "hello world" - grpc_route = {} - - create_grpc_route_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_create_grpc_route_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_grpc_route_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.create_grpc_route({ parent: parent, grpc_route_id: grpc_route_id, grpc_route: grpc_route }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.create_grpc_route parent: parent, grpc_route_id: grpc_route_id, grpc_route: grpc_route do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.create_grpc_route ::Google::Cloud::NetworkServices::V1::CreateGrpcRouteRequest.new(parent: parent, grpc_route_id: grpc_route_id, grpc_route: grpc_route) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.create_grpc_route({ parent: parent, grpc_route_id: grpc_route_id, grpc_route: grpc_route }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.create_grpc_route(::Google::Cloud::NetworkServices::V1::CreateGrpcRouteRequest.new(parent: parent, grpc_route_id: grpc_route_id, grpc_route: grpc_route), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_grpc_route_client_stub.call_count - end - end - end - - def test_update_grpc_route - # 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 = {} - grpc_route = {} - - update_grpc_route_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_update_grpc_route_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_grpc_route_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_grpc_route({ update_mask: update_mask, grpc_route: grpc_route }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_grpc_route update_mask: update_mask, grpc_route: grpc_route do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_grpc_route ::Google::Cloud::NetworkServices::V1::UpdateGrpcRouteRequest.new(update_mask: update_mask, grpc_route: grpc_route) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_grpc_route({ update_mask: update_mask, grpc_route: grpc_route }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_grpc_route(::Google::Cloud::NetworkServices::V1::UpdateGrpcRouteRequest.new(update_mask: update_mask, grpc_route: grpc_route), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_grpc_route_client_stub.call_count - end - end - end - - def test_delete_grpc_route - # 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_grpc_route_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_delete_grpc_route_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_grpc_route_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_grpc_route({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_grpc_route name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.delete_grpc_route ::Google::Cloud::NetworkServices::V1::DeleteGrpcRouteRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.delete_grpc_route({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.delete_grpc_route(::Google::Cloud::NetworkServices::V1::DeleteGrpcRouteRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_grpc_route_client_stub.call_count - end - end - end - - def test_list_http_routes - # Create test objects. - client_result = ::Google::Cloud::NetworkServices::V1::ListHttpRoutesResponse.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" - return_partial_success = true - filter = "hello world" - - list_http_routes_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_list_http_routes_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_http_routes_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_http_routes({ parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success, filter: filter }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_http_routes parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success, filter: filter do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_http_routes ::Google::Cloud::NetworkServices::V1::ListHttpRoutesRequest.new(parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success, filter: filter) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_http_routes({ parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success, filter: filter }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_http_routes(::Google::Cloud::NetworkServices::V1::ListHttpRoutesRequest.new(parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success, filter: filter), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_http_routes_client_stub.call_count - end - end - end - - def test_get_http_route - # Create test objects. - client_result = ::Google::Cloud::NetworkServices::V1::HttpRoute.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_http_route_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_get_http_route_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_http_route_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_http_route({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_http_route name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_http_route ::Google::Cloud::NetworkServices::V1::GetHttpRouteRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_http_route({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_http_route(::Google::Cloud::NetworkServices::V1::GetHttpRouteRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_http_route_client_stub.call_count - end - end - end - - def test_create_http_route - # 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" - http_route_id = "hello world" - http_route = {} - request_id = "hello world" - - create_http_route_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_create_http_route_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_http_route_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.create_http_route({ parent: parent, http_route_id: http_route_id, http_route: http_route, request_id: request_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.create_http_route parent: parent, http_route_id: http_route_id, http_route: http_route, request_id: request_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.create_http_route ::Google::Cloud::NetworkServices::V1::CreateHttpRouteRequest.new(parent: parent, http_route_id: http_route_id, http_route: http_route, request_id: request_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.create_http_route({ parent: parent, http_route_id: http_route_id, http_route: http_route, request_id: request_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.create_http_route(::Google::Cloud::NetworkServices::V1::CreateHttpRouteRequest.new(parent: parent, http_route_id: http_route_id, http_route: http_route, request_id: request_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_http_route_client_stub.call_count - end - end - end - - def test_update_http_route - # 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 = {} - http_route = {} - - update_http_route_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_update_http_route_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_http_route_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_http_route({ update_mask: update_mask, http_route: http_route }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_http_route update_mask: update_mask, http_route: http_route do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_http_route ::Google::Cloud::NetworkServices::V1::UpdateHttpRouteRequest.new(update_mask: update_mask, http_route: http_route) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_http_route({ update_mask: update_mask, http_route: http_route }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_http_route(::Google::Cloud::NetworkServices::V1::UpdateHttpRouteRequest.new(update_mask: update_mask, http_route: http_route), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_http_route_client_stub.call_count - end - end - end - - def test_delete_http_route - # 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_http_route_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_delete_http_route_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_http_route_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_http_route({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_http_route name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.delete_http_route ::Google::Cloud::NetworkServices::V1::DeleteHttpRouteRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.delete_http_route({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.delete_http_route(::Google::Cloud::NetworkServices::V1::DeleteHttpRouteRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_http_route_client_stub.call_count - end - end - end - - def test_list_tcp_routes - # Create test objects. - client_result = ::Google::Cloud::NetworkServices::V1::ListTcpRoutesResponse.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" - return_partial_success = true - - list_tcp_routes_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_list_tcp_routes_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_tcp_routes_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_tcp_routes({ parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_tcp_routes parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_tcp_routes ::Google::Cloud::NetworkServices::V1::ListTcpRoutesRequest.new(parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_tcp_routes({ parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_tcp_routes(::Google::Cloud::NetworkServices::V1::ListTcpRoutesRequest.new(parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_tcp_routes_client_stub.call_count - end - end - end - - def test_get_tcp_route - # Create test objects. - client_result = ::Google::Cloud::NetworkServices::V1::TcpRoute.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_tcp_route_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_get_tcp_route_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_tcp_route_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_tcp_route({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_tcp_route name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_tcp_route ::Google::Cloud::NetworkServices::V1::GetTcpRouteRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_tcp_route({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_tcp_route(::Google::Cloud::NetworkServices::V1::GetTcpRouteRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_tcp_route_client_stub.call_count - end - end - end - - def test_create_tcp_route - # 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" - tcp_route_id = "hello world" - tcp_route = {} - - create_tcp_route_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_create_tcp_route_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_tcp_route_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.create_tcp_route({ parent: parent, tcp_route_id: tcp_route_id, tcp_route: tcp_route }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.create_tcp_route parent: parent, tcp_route_id: tcp_route_id, tcp_route: tcp_route do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.create_tcp_route ::Google::Cloud::NetworkServices::V1::CreateTcpRouteRequest.new(parent: parent, tcp_route_id: tcp_route_id, tcp_route: tcp_route) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.create_tcp_route({ parent: parent, tcp_route_id: tcp_route_id, tcp_route: tcp_route }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.create_tcp_route(::Google::Cloud::NetworkServices::V1::CreateTcpRouteRequest.new(parent: parent, tcp_route_id: tcp_route_id, tcp_route: tcp_route), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_tcp_route_client_stub.call_count - end - end - end - - def test_update_tcp_route - # 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 = {} - tcp_route = {} - - update_tcp_route_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_update_tcp_route_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_tcp_route_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_tcp_route({ update_mask: update_mask, tcp_route: tcp_route }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_tcp_route update_mask: update_mask, tcp_route: tcp_route do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_tcp_route ::Google::Cloud::NetworkServices::V1::UpdateTcpRouteRequest.new(update_mask: update_mask, tcp_route: tcp_route) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_tcp_route({ update_mask: update_mask, tcp_route: tcp_route }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_tcp_route(::Google::Cloud::NetworkServices::V1::UpdateTcpRouteRequest.new(update_mask: update_mask, tcp_route: tcp_route), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_tcp_route_client_stub.call_count - end - end - end - - def test_delete_tcp_route - # 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_tcp_route_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_delete_tcp_route_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_tcp_route_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_tcp_route({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_tcp_route name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.delete_tcp_route ::Google::Cloud::NetworkServices::V1::DeleteTcpRouteRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.delete_tcp_route({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.delete_tcp_route(::Google::Cloud::NetworkServices::V1::DeleteTcpRouteRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_tcp_route_client_stub.call_count - end - end - end - - def test_list_tls_routes - # Create test objects. - client_result = ::Google::Cloud::NetworkServices::V1::ListTlsRoutesResponse.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" - return_partial_success = true - - list_tls_routes_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_list_tls_routes_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_tls_routes_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_tls_routes({ parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_tls_routes parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_tls_routes ::Google::Cloud::NetworkServices::V1::ListTlsRoutesRequest.new(parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_tls_routes({ parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_tls_routes(::Google::Cloud::NetworkServices::V1::ListTlsRoutesRequest.new(parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_tls_routes_client_stub.call_count - end - end - end - - def test_get_tls_route - # Create test objects. - client_result = ::Google::Cloud::NetworkServices::V1::TlsRoute.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_tls_route_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_get_tls_route_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_tls_route_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_tls_route({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_tls_route name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_tls_route ::Google::Cloud::NetworkServices::V1::GetTlsRouteRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_tls_route({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_tls_route(::Google::Cloud::NetworkServices::V1::GetTlsRouteRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_tls_route_client_stub.call_count - end - end - end - - def test_create_tls_route - # 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" - tls_route_id = "hello world" - tls_route = {} - - create_tls_route_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_create_tls_route_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_tls_route_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.create_tls_route({ parent: parent, tls_route_id: tls_route_id, tls_route: tls_route }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.create_tls_route parent: parent, tls_route_id: tls_route_id, tls_route: tls_route do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.create_tls_route ::Google::Cloud::NetworkServices::V1::CreateTlsRouteRequest.new(parent: parent, tls_route_id: tls_route_id, tls_route: tls_route) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.create_tls_route({ parent: parent, tls_route_id: tls_route_id, tls_route: tls_route }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.create_tls_route(::Google::Cloud::NetworkServices::V1::CreateTlsRouteRequest.new(parent: parent, tls_route_id: tls_route_id, tls_route: tls_route), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_tls_route_client_stub.call_count - end - end - end - - def test_update_tls_route - # 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 = {} - tls_route = {} - - update_tls_route_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_update_tls_route_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_tls_route_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_tls_route({ update_mask: update_mask, tls_route: tls_route }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_tls_route update_mask: update_mask, tls_route: tls_route do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_tls_route ::Google::Cloud::NetworkServices::V1::UpdateTlsRouteRequest.new(update_mask: update_mask, tls_route: tls_route) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_tls_route({ update_mask: update_mask, tls_route: tls_route }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_tls_route(::Google::Cloud::NetworkServices::V1::UpdateTlsRouteRequest.new(update_mask: update_mask, tls_route: tls_route), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_tls_route_client_stub.call_count - end - end - end - - def test_delete_tls_route - # 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_tls_route_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_delete_tls_route_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_tls_route_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_tls_route({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_tls_route name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.delete_tls_route ::Google::Cloud::NetworkServices::V1::DeleteTlsRouteRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.delete_tls_route({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.delete_tls_route(::Google::Cloud::NetworkServices::V1::DeleteTlsRouteRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_tls_route_client_stub.call_count - end - end - end - - def test_list_service_bindings - # Create test objects. - client_result = ::Google::Cloud::NetworkServices::V1::ListServiceBindingsResponse.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" - - list_service_bindings_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_list_service_bindings_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_service_bindings_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_service_bindings({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_service_bindings parent: parent, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_service_bindings ::Google::Cloud::NetworkServices::V1::ListServiceBindingsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_service_bindings({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_service_bindings(::Google::Cloud::NetworkServices::V1::ListServiceBindingsRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_service_bindings_client_stub.call_count - end - end - end - - def test_get_service_binding - # Create test objects. - client_result = ::Google::Cloud::NetworkServices::V1::ServiceBinding.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_service_binding_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_get_service_binding_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_service_binding_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_service_binding({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_service_binding name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_service_binding ::Google::Cloud::NetworkServices::V1::GetServiceBindingRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_service_binding({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_service_binding(::Google::Cloud::NetworkServices::V1::GetServiceBindingRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_service_binding_client_stub.call_count - end - end - end - - def test_create_service_binding - # 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" - service_binding_id = "hello world" - service_binding = {} - - create_service_binding_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_create_service_binding_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_service_binding_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.create_service_binding({ parent: parent, service_binding_id: service_binding_id, service_binding: service_binding }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.create_service_binding parent: parent, service_binding_id: service_binding_id, service_binding: service_binding do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.create_service_binding ::Google::Cloud::NetworkServices::V1::CreateServiceBindingRequest.new(parent: parent, service_binding_id: service_binding_id, service_binding: service_binding) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.create_service_binding({ parent: parent, service_binding_id: service_binding_id, service_binding: service_binding }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.create_service_binding(::Google::Cloud::NetworkServices::V1::CreateServiceBindingRequest.new(parent: parent, service_binding_id: service_binding_id, service_binding: service_binding), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_service_binding_client_stub.call_count - end - end - end - - def test_update_service_binding - # 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 = {} - service_binding = {} - - update_service_binding_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_update_service_binding_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_service_binding_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_service_binding({ update_mask: update_mask, service_binding: service_binding }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_service_binding update_mask: update_mask, service_binding: service_binding do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_service_binding ::Google::Cloud::NetworkServices::V1::UpdateServiceBindingRequest.new(update_mask: update_mask, service_binding: service_binding) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_service_binding({ update_mask: update_mask, service_binding: service_binding }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_service_binding(::Google::Cloud::NetworkServices::V1::UpdateServiceBindingRequest.new(update_mask: update_mask, service_binding: service_binding), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_service_binding_client_stub.call_count - end - end - end - - def test_delete_service_binding - # 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_service_binding_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_delete_service_binding_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_service_binding_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_service_binding({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_service_binding name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.delete_service_binding ::Google::Cloud::NetworkServices::V1::DeleteServiceBindingRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.delete_service_binding({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.delete_service_binding(::Google::Cloud::NetworkServices::V1::DeleteServiceBindingRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_service_binding_client_stub.call_count - end - end - end - - def test_list_meshes - # Create test objects. - client_result = ::Google::Cloud::NetworkServices::V1::ListMeshesResponse.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" - return_partial_success = true - - list_meshes_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_list_meshes_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_meshes_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_meshes({ parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_meshes parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_meshes ::Google::Cloud::NetworkServices::V1::ListMeshesRequest.new(parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_meshes({ parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_meshes(::Google::Cloud::NetworkServices::V1::ListMeshesRequest.new(parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_meshes_client_stub.call_count - end - end - end - - def test_get_mesh - # Create test objects. - client_result = ::Google::Cloud::NetworkServices::V1::Mesh.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_mesh_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_get_mesh_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_mesh_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_mesh({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_mesh name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_mesh ::Google::Cloud::NetworkServices::V1::GetMeshRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_mesh({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_mesh(::Google::Cloud::NetworkServices::V1::GetMeshRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_mesh_client_stub.call_count - end - end - end - - def test_create_mesh - # 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" - mesh_id = "hello world" - mesh = {} - - create_mesh_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_create_mesh_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_mesh_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.create_mesh({ parent: parent, mesh_id: mesh_id, mesh: mesh }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.create_mesh parent: parent, mesh_id: mesh_id, mesh: mesh do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.create_mesh ::Google::Cloud::NetworkServices::V1::CreateMeshRequest.new(parent: parent, mesh_id: mesh_id, mesh: mesh) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.create_mesh({ parent: parent, mesh_id: mesh_id, mesh: mesh }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.create_mesh(::Google::Cloud::NetworkServices::V1::CreateMeshRequest.new(parent: parent, mesh_id: mesh_id, mesh: mesh), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_mesh_client_stub.call_count - end - end - end - - def test_update_mesh - # 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 = {} - mesh = {} - - update_mesh_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_update_mesh_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_mesh_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_mesh({ update_mask: update_mask, mesh: mesh }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_mesh update_mask: update_mask, mesh: mesh do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_mesh ::Google::Cloud::NetworkServices::V1::UpdateMeshRequest.new(update_mask: update_mask, mesh: mesh) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_mesh({ update_mask: update_mask, mesh: mesh }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_mesh(::Google::Cloud::NetworkServices::V1::UpdateMeshRequest.new(update_mask: update_mask, mesh: mesh), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_mesh_client_stub.call_count - end - end - end - - def test_delete_mesh - # 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_mesh_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_delete_mesh_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_mesh_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_mesh({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_mesh name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.delete_mesh ::Google::Cloud::NetworkServices::V1::DeleteMeshRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.delete_mesh({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.delete_mesh(::Google::Cloud::NetworkServices::V1::DeleteMeshRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_mesh_client_stub.call_count - end - end - end - - def test_list_service_lb_policies - # Create test objects. - client_result = ::Google::Cloud::NetworkServices::V1::ListServiceLbPoliciesResponse.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" - - list_service_lb_policies_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_list_service_lb_policies_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_service_lb_policies_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_service_lb_policies({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_service_lb_policies parent: parent, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_service_lb_policies ::Google::Cloud::NetworkServices::V1::ListServiceLbPoliciesRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_service_lb_policies({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_service_lb_policies(::Google::Cloud::NetworkServices::V1::ListServiceLbPoliciesRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_service_lb_policies_client_stub.call_count - end - end - end - - def test_get_service_lb_policy - # Create test objects. - client_result = ::Google::Cloud::NetworkServices::V1::ServiceLbPolicy.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_service_lb_policy_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_get_service_lb_policy_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_service_lb_policy_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_service_lb_policy({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_service_lb_policy name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_service_lb_policy ::Google::Cloud::NetworkServices::V1::GetServiceLbPolicyRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_service_lb_policy({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_service_lb_policy(::Google::Cloud::NetworkServices::V1::GetServiceLbPolicyRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_service_lb_policy_client_stub.call_count - end - end - end - - def test_create_service_lb_policy - # 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" - service_lb_policy_id = "hello world" - service_lb_policy = {} - - create_service_lb_policy_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_create_service_lb_policy_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_service_lb_policy_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.create_service_lb_policy({ parent: parent, service_lb_policy_id: service_lb_policy_id, service_lb_policy: service_lb_policy }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.create_service_lb_policy parent: parent, service_lb_policy_id: service_lb_policy_id, service_lb_policy: service_lb_policy do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.create_service_lb_policy ::Google::Cloud::NetworkServices::V1::CreateServiceLbPolicyRequest.new(parent: parent, service_lb_policy_id: service_lb_policy_id, service_lb_policy: service_lb_policy) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.create_service_lb_policy({ parent: parent, service_lb_policy_id: service_lb_policy_id, service_lb_policy: service_lb_policy }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.create_service_lb_policy(::Google::Cloud::NetworkServices::V1::CreateServiceLbPolicyRequest.new(parent: parent, service_lb_policy_id: service_lb_policy_id, service_lb_policy: service_lb_policy), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_service_lb_policy_client_stub.call_count - end - end - end - - def test_update_service_lb_policy - # 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 = {} - service_lb_policy = {} - - update_service_lb_policy_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_update_service_lb_policy_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_service_lb_policy_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_service_lb_policy({ update_mask: update_mask, service_lb_policy: service_lb_policy }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_service_lb_policy update_mask: update_mask, service_lb_policy: service_lb_policy do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_service_lb_policy ::Google::Cloud::NetworkServices::V1::UpdateServiceLbPolicyRequest.new(update_mask: update_mask, service_lb_policy: service_lb_policy) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_service_lb_policy({ update_mask: update_mask, service_lb_policy: service_lb_policy }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_service_lb_policy(::Google::Cloud::NetworkServices::V1::UpdateServiceLbPolicyRequest.new(update_mask: update_mask, service_lb_policy: service_lb_policy), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_service_lb_policy_client_stub.call_count - end - end - end - - def test_delete_service_lb_policy - # 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_service_lb_policy_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_delete_service_lb_policy_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_service_lb_policy_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_service_lb_policy({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_service_lb_policy name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.delete_service_lb_policy ::Google::Cloud::NetworkServices::V1::DeleteServiceLbPolicyRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.delete_service_lb_policy({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.delete_service_lb_policy(::Google::Cloud::NetworkServices::V1::DeleteServiceLbPolicyRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_service_lb_policy_client_stub.call_count - end - end - end - - def test_get_gateway_route_view - # Create test objects. - client_result = ::Google::Cloud::NetworkServices::V1::GatewayRouteView.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_gateway_route_view_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_get_gateway_route_view_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_gateway_route_view_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_gateway_route_view({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_gateway_route_view name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_gateway_route_view ::Google::Cloud::NetworkServices::V1::GetGatewayRouteViewRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_gateway_route_view({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_gateway_route_view(::Google::Cloud::NetworkServices::V1::GetGatewayRouteViewRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_gateway_route_view_client_stub.call_count - end - end - end - - def test_get_mesh_route_view - # Create test objects. - client_result = ::Google::Cloud::NetworkServices::V1::MeshRouteView.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_mesh_route_view_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_get_mesh_route_view_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_mesh_route_view_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_mesh_route_view({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_mesh_route_view name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_mesh_route_view ::Google::Cloud::NetworkServices::V1::GetMeshRouteViewRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_mesh_route_view({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_mesh_route_view(::Google::Cloud::NetworkServices::V1::GetMeshRouteViewRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_mesh_route_view_client_stub.call_count - end - end - end - - def test_list_gateway_route_views - # Create test objects. - client_result = ::Google::Cloud::NetworkServices::V1::ListGatewayRouteViewsResponse.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" - - list_gateway_route_views_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_list_gateway_route_views_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_gateway_route_views_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_gateway_route_views({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_gateway_route_views parent: parent, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_gateway_route_views ::Google::Cloud::NetworkServices::V1::ListGatewayRouteViewsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_gateway_route_views({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_gateway_route_views(::Google::Cloud::NetworkServices::V1::ListGatewayRouteViewsRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_gateway_route_views_client_stub.call_count - end - end - end - - def test_list_mesh_route_views - # Create test objects. - client_result = ::Google::Cloud::NetworkServices::V1::ListMeshRouteViewsResponse.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" - - list_mesh_route_views_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_list_mesh_route_views_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_mesh_route_views_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_mesh_route_views({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_mesh_route_views parent: parent, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_mesh_route_views ::Google::Cloud::NetworkServices::V1::ListMeshRouteViewsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_mesh_route_views({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_mesh_route_views(::Google::Cloud::NetworkServices::V1::ListMeshRouteViewsRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_mesh_route_views_client_stub.call_count - end - end - end - - def test_list_agent_gateways - # Create test objects. - client_result = ::Google::Cloud::NetworkServices::V1::ListAgentGatewaysResponse.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" - return_partial_success = true - - list_agent_gateways_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_list_agent_gateways_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_agent_gateways_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_agent_gateways({ parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_agent_gateways parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_agent_gateways ::Google::Cloud::NetworkServices::V1::ListAgentGatewaysRequest.new(parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_agent_gateways({ parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_agent_gateways(::Google::Cloud::NetworkServices::V1::ListAgentGatewaysRequest.new(parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_agent_gateways_client_stub.call_count - end - end - end - - def test_get_agent_gateway - # Create test objects. - client_result = ::Google::Cloud::NetworkServices::V1::AgentGateway.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_agent_gateway_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_get_agent_gateway_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_agent_gateway_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_agent_gateway({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_agent_gateway name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_agent_gateway ::Google::Cloud::NetworkServices::V1::GetAgentGatewayRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_agent_gateway({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_agent_gateway(::Google::Cloud::NetworkServices::V1::GetAgentGatewayRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_agent_gateway_client_stub.call_count - end - end - end - - def test_create_agent_gateway - # 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" - agent_gateway_id = "hello world" - agent_gateway = {} - - create_agent_gateway_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_create_agent_gateway_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_agent_gateway_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.create_agent_gateway({ parent: parent, agent_gateway_id: agent_gateway_id, agent_gateway: agent_gateway }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.create_agent_gateway parent: parent, agent_gateway_id: agent_gateway_id, agent_gateway: agent_gateway do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.create_agent_gateway ::Google::Cloud::NetworkServices::V1::CreateAgentGatewayRequest.new(parent: parent, agent_gateway_id: agent_gateway_id, agent_gateway: agent_gateway) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.create_agent_gateway({ parent: parent, agent_gateway_id: agent_gateway_id, agent_gateway: agent_gateway }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.create_agent_gateway(::Google::Cloud::NetworkServices::V1::CreateAgentGatewayRequest.new(parent: parent, agent_gateway_id: agent_gateway_id, agent_gateway: agent_gateway), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_agent_gateway_client_stub.call_count - end - end - end - - def test_update_agent_gateway - # 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 = {} - agent_gateway = {} - - update_agent_gateway_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_update_agent_gateway_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_agent_gateway_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_agent_gateway({ update_mask: update_mask, agent_gateway: agent_gateway }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_agent_gateway update_mask: update_mask, agent_gateway: agent_gateway do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_agent_gateway ::Google::Cloud::NetworkServices::V1::UpdateAgentGatewayRequest.new(update_mask: update_mask, agent_gateway: agent_gateway) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_agent_gateway({ update_mask: update_mask, agent_gateway: agent_gateway }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_agent_gateway(::Google::Cloud::NetworkServices::V1::UpdateAgentGatewayRequest.new(update_mask: update_mask, agent_gateway: agent_gateway), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_agent_gateway_client_stub.call_count - end - end - end - - def test_delete_agent_gateway - # 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" - etag = "hello world" - - delete_agent_gateway_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::NetworkServices::V1::NetworkServices::Rest::ServiceStub.stub :transcode_delete_agent_gateway_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_agent_gateway_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_agent_gateway({ name: name, etag: etag }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_agent_gateway name: name, etag: etag do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.delete_agent_gateway ::Google::Cloud::NetworkServices::V1::DeleteAgentGatewayRequest.new(name: name, etag: etag) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.delete_agent_gateway({ name: name, etag: etag }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.delete_agent_gateway(::Google::Cloud::NetworkServices::V1::DeleteAgentGatewayRequest.new(name: name, etag: etag), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_agent_gateway_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::NetworkServices::V1::NetworkServices::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::NetworkServices::V1::NetworkServices::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-network_services-v1/test/google/cloud/network_services/v1/network_services_test.rb b/owl-bot-staging/google-cloud-network_services-v1/test/google/cloud/network_services/v1/network_services_test.rb deleted file mode 100644 index fdcf703cac35..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/test/google/cloud/network_services/v1/network_services_test.rb +++ /dev/null @@ -1,4165 +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/networkservices/v1/network_services_pb" -require "google/cloud/network_services/v1/network_services" - -class ::Google::Cloud::NetworkServices::V1::NetworkServices::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_endpoint_policies - # Create GRPC objects. - grpc_response = ::Google::Cloud::NetworkServices::V1::ListEndpointPoliciesResponse.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" - return_partial_success = true - - list_endpoint_policies_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_endpoint_policies, name - assert_kind_of ::Google::Cloud::NetworkServices::V1::ListEndpointPoliciesRequest, request - assert_equal "hello world", request["parent"] - 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_endpoint_policies_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_endpoint_policies({ parent: parent, 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 - c.list_endpoint_policies parent: parent, 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 - c.list_endpoint_policies ::Google::Cloud::NetworkServices::V1::ListEndpointPoliciesRequest.new(parent: parent, 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 - c.list_endpoint_policies({ parent: parent, 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 - c.list_endpoint_policies(::Google::Cloud::NetworkServices::V1::ListEndpointPoliciesRequest.new(parent: parent, 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_endpoint_policies_client_stub.call_rpc_count - end - end - - def test_get_endpoint_policy - # Create GRPC objects. - grpc_response = ::Google::Cloud::NetworkServices::V1::EndpointPolicy.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_endpoint_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_endpoint_policy, name - assert_kind_of ::Google::Cloud::NetworkServices::V1::GetEndpointPolicyRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_endpoint_policy_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_endpoint_policy({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_endpoint_policy name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_endpoint_policy ::Google::Cloud::NetworkServices::V1::GetEndpointPolicyRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_endpoint_policy({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_endpoint_policy(::Google::Cloud::NetworkServices::V1::GetEndpointPolicyRequest.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_endpoint_policy_client_stub.call_rpc_count - end - end - - def test_create_endpoint_policy - # 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" - endpoint_policy_id = "hello world" - endpoint_policy = {} - - create_endpoint_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_endpoint_policy, name - assert_kind_of ::Google::Cloud::NetworkServices::V1::CreateEndpointPolicyRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["endpoint_policy_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::NetworkServices::V1::EndpointPolicy), request["endpoint_policy"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_endpoint_policy_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.create_endpoint_policy({ parent: parent, endpoint_policy_id: endpoint_policy_id, endpoint_policy: endpoint_policy }) 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 - c.create_endpoint_policy parent: parent, endpoint_policy_id: endpoint_policy_id, endpoint_policy: endpoint_policy 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 - c.create_endpoint_policy ::Google::Cloud::NetworkServices::V1::CreateEndpointPolicyRequest.new(parent: parent, endpoint_policy_id: endpoint_policy_id, endpoint_policy: endpoint_policy) 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 - c.create_endpoint_policy({ parent: parent, endpoint_policy_id: endpoint_policy_id, endpoint_policy: endpoint_policy }, 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 - c.create_endpoint_policy(::Google::Cloud::NetworkServices::V1::CreateEndpointPolicyRequest.new(parent: parent, endpoint_policy_id: endpoint_policy_id, endpoint_policy: endpoint_policy), 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_endpoint_policy_client_stub.call_rpc_count - end - end - - def test_update_endpoint_policy - # 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 = {} - endpoint_policy = {} - - update_endpoint_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_endpoint_policy, name - assert_kind_of ::Google::Cloud::NetworkServices::V1::UpdateEndpointPolicyRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::NetworkServices::V1::EndpointPolicy), request["endpoint_policy"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_endpoint_policy_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_endpoint_policy({ update_mask: update_mask, endpoint_policy: endpoint_policy }) 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 - c.update_endpoint_policy update_mask: update_mask, endpoint_policy: endpoint_policy 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 - c.update_endpoint_policy ::Google::Cloud::NetworkServices::V1::UpdateEndpointPolicyRequest.new(update_mask: update_mask, endpoint_policy: endpoint_policy) 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 - c.update_endpoint_policy({ update_mask: update_mask, endpoint_policy: endpoint_policy }, 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 - c.update_endpoint_policy(::Google::Cloud::NetworkServices::V1::UpdateEndpointPolicyRequest.new(update_mask: update_mask, endpoint_policy: endpoint_policy), 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_endpoint_policy_client_stub.call_rpc_count - end - end - - def test_delete_endpoint_policy - # 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_endpoint_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_endpoint_policy, name - assert_kind_of ::Google::Cloud::NetworkServices::V1::DeleteEndpointPolicyRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_endpoint_policy_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_endpoint_policy({ 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 - c.delete_endpoint_policy 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 - c.delete_endpoint_policy ::Google::Cloud::NetworkServices::V1::DeleteEndpointPolicyRequest.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 - c.delete_endpoint_policy({ 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 - c.delete_endpoint_policy(::Google::Cloud::NetworkServices::V1::DeleteEndpointPolicyRequest.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_endpoint_policy_client_stub.call_rpc_count - end - end - - def test_list_wasm_plugin_versions - # Create GRPC objects. - grpc_response = ::Google::Cloud::NetworkServices::V1::ListWasmPluginVersionsResponse.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" - - list_wasm_plugin_versions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_wasm_plugin_versions, name - assert_kind_of ::Google::Cloud::NetworkServices::V1::ListWasmPluginVersionsRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_wasm_plugin_versions_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_wasm_plugin_versions({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_wasm_plugin_versions parent: parent, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_wasm_plugin_versions ::Google::Cloud::NetworkServices::V1::ListWasmPluginVersionsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_wasm_plugin_versions({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_wasm_plugin_versions(::Google::Cloud::NetworkServices::V1::ListWasmPluginVersionsRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_wasm_plugin_versions_client_stub.call_rpc_count - end - end - - def test_get_wasm_plugin_version - # Create GRPC objects. - grpc_response = ::Google::Cloud::NetworkServices::V1::WasmPluginVersion.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_wasm_plugin_version_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_wasm_plugin_version, name - assert_kind_of ::Google::Cloud::NetworkServices::V1::GetWasmPluginVersionRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_wasm_plugin_version_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_wasm_plugin_version({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_wasm_plugin_version name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_wasm_plugin_version ::Google::Cloud::NetworkServices::V1::GetWasmPluginVersionRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_wasm_plugin_version({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_wasm_plugin_version(::Google::Cloud::NetworkServices::V1::GetWasmPluginVersionRequest.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_wasm_plugin_version_client_stub.call_rpc_count - end - end - - def test_create_wasm_plugin_version - # 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" - wasm_plugin_version_id = "hello world" - wasm_plugin_version = {} - - create_wasm_plugin_version_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_wasm_plugin_version, name - assert_kind_of ::Google::Cloud::NetworkServices::V1::CreateWasmPluginVersionRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["wasm_plugin_version_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::NetworkServices::V1::WasmPluginVersion), request["wasm_plugin_version"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_wasm_plugin_version_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.create_wasm_plugin_version({ parent: parent, wasm_plugin_version_id: wasm_plugin_version_id, wasm_plugin_version: wasm_plugin_version }) 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 - c.create_wasm_plugin_version parent: parent, wasm_plugin_version_id: wasm_plugin_version_id, wasm_plugin_version: wasm_plugin_version 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 - c.create_wasm_plugin_version ::Google::Cloud::NetworkServices::V1::CreateWasmPluginVersionRequest.new(parent: parent, wasm_plugin_version_id: wasm_plugin_version_id, wasm_plugin_version: wasm_plugin_version) 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 - c.create_wasm_plugin_version({ parent: parent, wasm_plugin_version_id: wasm_plugin_version_id, wasm_plugin_version: wasm_plugin_version }, 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 - c.create_wasm_plugin_version(::Google::Cloud::NetworkServices::V1::CreateWasmPluginVersionRequest.new(parent: parent, wasm_plugin_version_id: wasm_plugin_version_id, wasm_plugin_version: wasm_plugin_version), 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_wasm_plugin_version_client_stub.call_rpc_count - end - end - - def test_delete_wasm_plugin_version - # 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_wasm_plugin_version_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_wasm_plugin_version, name - assert_kind_of ::Google::Cloud::NetworkServices::V1::DeleteWasmPluginVersionRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_wasm_plugin_version_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_wasm_plugin_version({ 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 - c.delete_wasm_plugin_version 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 - c.delete_wasm_plugin_version ::Google::Cloud::NetworkServices::V1::DeleteWasmPluginVersionRequest.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 - c.delete_wasm_plugin_version({ 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 - c.delete_wasm_plugin_version(::Google::Cloud::NetworkServices::V1::DeleteWasmPluginVersionRequest.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_wasm_plugin_version_client_stub.call_rpc_count - end - end - - def test_list_wasm_plugins - # Create GRPC objects. - grpc_response = ::Google::Cloud::NetworkServices::V1::ListWasmPluginsResponse.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" - - list_wasm_plugins_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_wasm_plugins, name - assert_kind_of ::Google::Cloud::NetworkServices::V1::ListWasmPluginsRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_wasm_plugins_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_wasm_plugins({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_wasm_plugins parent: parent, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_wasm_plugins ::Google::Cloud::NetworkServices::V1::ListWasmPluginsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_wasm_plugins({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_wasm_plugins(::Google::Cloud::NetworkServices::V1::ListWasmPluginsRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_wasm_plugins_client_stub.call_rpc_count - end - end - - def test_get_wasm_plugin - # Create GRPC objects. - grpc_response = ::Google::Cloud::NetworkServices::V1::WasmPlugin.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" - view = :WASM_PLUGIN_VIEW_UNSPECIFIED - - get_wasm_plugin_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_wasm_plugin, name - assert_kind_of ::Google::Cloud::NetworkServices::V1::GetWasmPluginRequest, request - assert_equal "hello world", request["name"] - assert_equal :WASM_PLUGIN_VIEW_UNSPECIFIED, request["view"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_wasm_plugin_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_wasm_plugin({ name: name, view: view }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_wasm_plugin name: name, view: view do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_wasm_plugin ::Google::Cloud::NetworkServices::V1::GetWasmPluginRequest.new(name: name, view: view) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_wasm_plugin({ name: name, view: view }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_wasm_plugin(::Google::Cloud::NetworkServices::V1::GetWasmPluginRequest.new(name: name, view: view), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_wasm_plugin_client_stub.call_rpc_count - end - end - - def test_create_wasm_plugin - # 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" - wasm_plugin_id = "hello world" - wasm_plugin = {} - - create_wasm_plugin_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_wasm_plugin, name - assert_kind_of ::Google::Cloud::NetworkServices::V1::CreateWasmPluginRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["wasm_plugin_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::NetworkServices::V1::WasmPlugin), request["wasm_plugin"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_wasm_plugin_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.create_wasm_plugin({ parent: parent, wasm_plugin_id: wasm_plugin_id, wasm_plugin: wasm_plugin }) 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 - c.create_wasm_plugin parent: parent, wasm_plugin_id: wasm_plugin_id, wasm_plugin: wasm_plugin 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 - c.create_wasm_plugin ::Google::Cloud::NetworkServices::V1::CreateWasmPluginRequest.new(parent: parent, wasm_plugin_id: wasm_plugin_id, wasm_plugin: wasm_plugin) 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 - c.create_wasm_plugin({ parent: parent, wasm_plugin_id: wasm_plugin_id, wasm_plugin: wasm_plugin }, 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 - c.create_wasm_plugin(::Google::Cloud::NetworkServices::V1::CreateWasmPluginRequest.new(parent: parent, wasm_plugin_id: wasm_plugin_id, wasm_plugin: wasm_plugin), 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_wasm_plugin_client_stub.call_rpc_count - end - end - - def test_update_wasm_plugin - # 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 = {} - wasm_plugin = {} - - update_wasm_plugin_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_wasm_plugin, name - assert_kind_of ::Google::Cloud::NetworkServices::V1::UpdateWasmPluginRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::NetworkServices::V1::WasmPlugin), request["wasm_plugin"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_wasm_plugin_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_wasm_plugin({ update_mask: update_mask, wasm_plugin: wasm_plugin }) 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 - c.update_wasm_plugin update_mask: update_mask, wasm_plugin: wasm_plugin 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 - c.update_wasm_plugin ::Google::Cloud::NetworkServices::V1::UpdateWasmPluginRequest.new(update_mask: update_mask, wasm_plugin: wasm_plugin) 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 - c.update_wasm_plugin({ update_mask: update_mask, wasm_plugin: wasm_plugin }, 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 - c.update_wasm_plugin(::Google::Cloud::NetworkServices::V1::UpdateWasmPluginRequest.new(update_mask: update_mask, wasm_plugin: wasm_plugin), 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_wasm_plugin_client_stub.call_rpc_count - end - end - - def test_delete_wasm_plugin - # 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_wasm_plugin_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_wasm_plugin, name - assert_kind_of ::Google::Cloud::NetworkServices::V1::DeleteWasmPluginRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_wasm_plugin_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_wasm_plugin({ 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 - c.delete_wasm_plugin 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 - c.delete_wasm_plugin ::Google::Cloud::NetworkServices::V1::DeleteWasmPluginRequest.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 - c.delete_wasm_plugin({ 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 - c.delete_wasm_plugin(::Google::Cloud::NetworkServices::V1::DeleteWasmPluginRequest.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_wasm_plugin_client_stub.call_rpc_count - end - end - - def test_list_gateways - # Create GRPC objects. - grpc_response = ::Google::Cloud::NetworkServices::V1::ListGatewaysResponse.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" - - list_gateways_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_gateways, name - assert_kind_of ::Google::Cloud::NetworkServices::V1::ListGatewaysRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_gateways_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_gateways({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_gateways parent: parent, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_gateways ::Google::Cloud::NetworkServices::V1::ListGatewaysRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_gateways({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_gateways(::Google::Cloud::NetworkServices::V1::ListGatewaysRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_gateways_client_stub.call_rpc_count - end - end - - def test_get_gateway - # Create GRPC objects. - grpc_response = ::Google::Cloud::NetworkServices::V1::Gateway.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_gateway_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_gateway, name - assert_kind_of ::Google::Cloud::NetworkServices::V1::GetGatewayRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_gateway_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_gateway({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_gateway name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_gateway ::Google::Cloud::NetworkServices::V1::GetGatewayRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_gateway({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_gateway(::Google::Cloud::NetworkServices::V1::GetGatewayRequest.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_gateway_client_stub.call_rpc_count - end - end - - def test_create_gateway - # 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" - gateway_id = "hello world" - gateway = {} - - create_gateway_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_gateway, name - assert_kind_of ::Google::Cloud::NetworkServices::V1::CreateGatewayRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["gateway_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::NetworkServices::V1::Gateway), request["gateway"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_gateway_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.create_gateway({ parent: parent, gateway_id: gateway_id, gateway: gateway }) 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 - c.create_gateway parent: parent, gateway_id: gateway_id, gateway: gateway 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 - c.create_gateway ::Google::Cloud::NetworkServices::V1::CreateGatewayRequest.new(parent: parent, gateway_id: gateway_id, gateway: gateway) 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 - c.create_gateway({ parent: parent, gateway_id: gateway_id, gateway: gateway }, 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 - c.create_gateway(::Google::Cloud::NetworkServices::V1::CreateGatewayRequest.new(parent: parent, gateway_id: gateway_id, gateway: gateway), 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_gateway_client_stub.call_rpc_count - end - end - - def test_update_gateway - # 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 = {} - gateway = {} - - update_gateway_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_gateway, name - assert_kind_of ::Google::Cloud::NetworkServices::V1::UpdateGatewayRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::NetworkServices::V1::Gateway), request["gateway"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_gateway_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_gateway({ update_mask: update_mask, gateway: gateway }) 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 - c.update_gateway update_mask: update_mask, gateway: gateway 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 - c.update_gateway ::Google::Cloud::NetworkServices::V1::UpdateGatewayRequest.new(update_mask: update_mask, gateway: gateway) 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 - c.update_gateway({ update_mask: update_mask, gateway: gateway }, 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 - c.update_gateway(::Google::Cloud::NetworkServices::V1::UpdateGatewayRequest.new(update_mask: update_mask, gateway: gateway), 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_gateway_client_stub.call_rpc_count - end - end - - def test_delete_gateway - # 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_gateway_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_gateway, name - assert_kind_of ::Google::Cloud::NetworkServices::V1::DeleteGatewayRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_gateway_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_gateway({ 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 - c.delete_gateway 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 - c.delete_gateway ::Google::Cloud::NetworkServices::V1::DeleteGatewayRequest.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 - c.delete_gateway({ 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 - c.delete_gateway(::Google::Cloud::NetworkServices::V1::DeleteGatewayRequest.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_gateway_client_stub.call_rpc_count - end - end - - def test_list_grpc_routes - # Create GRPC objects. - grpc_response = ::Google::Cloud::NetworkServices::V1::ListGrpcRoutesResponse.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" - return_partial_success = true - - list_grpc_routes_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_grpc_routes, name - assert_kind_of ::Google::Cloud::NetworkServices::V1::ListGrpcRoutesRequest, request - assert_equal "hello world", request["parent"] - 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_grpc_routes_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_grpc_routes({ parent: parent, 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 - c.list_grpc_routes parent: parent, 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 - c.list_grpc_routes ::Google::Cloud::NetworkServices::V1::ListGrpcRoutesRequest.new(parent: parent, 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 - c.list_grpc_routes({ parent: parent, 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 - c.list_grpc_routes(::Google::Cloud::NetworkServices::V1::ListGrpcRoutesRequest.new(parent: parent, 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_grpc_routes_client_stub.call_rpc_count - end - end - - def test_get_grpc_route - # Create GRPC objects. - grpc_response = ::Google::Cloud::NetworkServices::V1::GrpcRoute.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_grpc_route_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_grpc_route, name - assert_kind_of ::Google::Cloud::NetworkServices::V1::GetGrpcRouteRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_grpc_route_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_grpc_route({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_grpc_route name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_grpc_route ::Google::Cloud::NetworkServices::V1::GetGrpcRouteRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_grpc_route({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_grpc_route(::Google::Cloud::NetworkServices::V1::GetGrpcRouteRequest.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_grpc_route_client_stub.call_rpc_count - end - end - - def test_create_grpc_route - # 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" - grpc_route_id = "hello world" - grpc_route = {} - - create_grpc_route_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_grpc_route, name - assert_kind_of ::Google::Cloud::NetworkServices::V1::CreateGrpcRouteRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["grpc_route_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::NetworkServices::V1::GrpcRoute), request["grpc_route"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_grpc_route_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.create_grpc_route({ parent: parent, grpc_route_id: grpc_route_id, grpc_route: grpc_route }) 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 - c.create_grpc_route parent: parent, grpc_route_id: grpc_route_id, grpc_route: grpc_route 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 - c.create_grpc_route ::Google::Cloud::NetworkServices::V1::CreateGrpcRouteRequest.new(parent: parent, grpc_route_id: grpc_route_id, grpc_route: grpc_route) 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 - c.create_grpc_route({ parent: parent, grpc_route_id: grpc_route_id, grpc_route: grpc_route }, 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 - c.create_grpc_route(::Google::Cloud::NetworkServices::V1::CreateGrpcRouteRequest.new(parent: parent, grpc_route_id: grpc_route_id, grpc_route: grpc_route), 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_grpc_route_client_stub.call_rpc_count - end - end - - def test_update_grpc_route - # 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 = {} - grpc_route = {} - - update_grpc_route_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_grpc_route, name - assert_kind_of ::Google::Cloud::NetworkServices::V1::UpdateGrpcRouteRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::NetworkServices::V1::GrpcRoute), request["grpc_route"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_grpc_route_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_grpc_route({ update_mask: update_mask, grpc_route: grpc_route }) 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 - c.update_grpc_route update_mask: update_mask, grpc_route: grpc_route 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 - c.update_grpc_route ::Google::Cloud::NetworkServices::V1::UpdateGrpcRouteRequest.new(update_mask: update_mask, grpc_route: grpc_route) 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 - c.update_grpc_route({ update_mask: update_mask, grpc_route: grpc_route }, 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 - c.update_grpc_route(::Google::Cloud::NetworkServices::V1::UpdateGrpcRouteRequest.new(update_mask: update_mask, grpc_route: grpc_route), 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_grpc_route_client_stub.call_rpc_count - end - end - - def test_delete_grpc_route - # 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_grpc_route_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_grpc_route, name - assert_kind_of ::Google::Cloud::NetworkServices::V1::DeleteGrpcRouteRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_grpc_route_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_grpc_route({ 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 - c.delete_grpc_route 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 - c.delete_grpc_route ::Google::Cloud::NetworkServices::V1::DeleteGrpcRouteRequest.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 - c.delete_grpc_route({ 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 - c.delete_grpc_route(::Google::Cloud::NetworkServices::V1::DeleteGrpcRouteRequest.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_grpc_route_client_stub.call_rpc_count - end - end - - def test_list_http_routes - # Create GRPC objects. - grpc_response = ::Google::Cloud::NetworkServices::V1::ListHttpRoutesResponse.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" - return_partial_success = true - filter = "hello world" - - list_http_routes_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_http_routes, name - assert_kind_of ::Google::Cloud::NetworkServices::V1::ListHttpRoutesRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal true, request["return_partial_success"] - assert_equal "hello world", request["filter"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_http_routes_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_http_routes({ parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success, 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 - c.list_http_routes parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success, 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 - c.list_http_routes ::Google::Cloud::NetworkServices::V1::ListHttpRoutesRequest.new(parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success, 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 - c.list_http_routes({ parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success, 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 - c.list_http_routes(::Google::Cloud::NetworkServices::V1::ListHttpRoutesRequest.new(parent: parent, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success, filter: filter), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_http_routes_client_stub.call_rpc_count - end - end - - def test_get_http_route - # Create GRPC objects. - grpc_response = ::Google::Cloud::NetworkServices::V1::HttpRoute.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_http_route_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_http_route, name - assert_kind_of ::Google::Cloud::NetworkServices::V1::GetHttpRouteRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_http_route_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_http_route({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_http_route name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_http_route ::Google::Cloud::NetworkServices::V1::GetHttpRouteRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_http_route({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_http_route(::Google::Cloud::NetworkServices::V1::GetHttpRouteRequest.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_http_route_client_stub.call_rpc_count - end - end - - def test_create_http_route - # 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" - http_route_id = "hello world" - http_route = {} - request_id = "hello world" - - create_http_route_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_http_route, name - assert_kind_of ::Google::Cloud::NetworkServices::V1::CreateHttpRouteRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["http_route_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::NetworkServices::V1::HttpRoute), request["http_route"] - assert_equal "hello world", request["request_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_http_route_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.create_http_route({ parent: parent, http_route_id: http_route_id, http_route: http_route, request_id: request_id }) 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 - c.create_http_route parent: parent, http_route_id: http_route_id, http_route: http_route, request_id: request_id 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 - c.create_http_route ::Google::Cloud::NetworkServices::V1::CreateHttpRouteRequest.new(parent: parent, http_route_id: http_route_id, http_route: http_route, request_id: request_id) 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 - c.create_http_route({ parent: parent, http_route_id: http_route_id, http_route: http_route, request_id: request_id }, 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 - c.create_http_route(::Google::Cloud::NetworkServices::V1::CreateHttpRouteRequest.new(parent: parent, http_route_id: http_route_id, http_route: http_route, request_id: request_id), 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_http_route_client_stub.call_rpc_count - end - end - - def test_update_http_route - # 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 = {} - http_route = {} - - update_http_route_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_http_route, name - assert_kind_of ::Google::Cloud::NetworkServices::V1::UpdateHttpRouteRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::NetworkServices::V1::HttpRoute), request["http_route"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_http_route_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_http_route({ update_mask: update_mask, http_route: http_route }) 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 - c.update_http_route update_mask: update_mask, http_route: http_route 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 - c.update_http_route ::Google::Cloud::NetworkServices::V1::UpdateHttpRouteRequest.new(update_mask: update_mask, http_route: http_route) 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 - c.update_http_route({ update_mask: update_mask, http_route: http_route }, 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 - c.update_http_route(::Google::Cloud::NetworkServices::V1::UpdateHttpRouteRequest.new(update_mask: update_mask, http_route: http_route), 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_http_route_client_stub.call_rpc_count - end - end - - def test_delete_http_route - # 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_http_route_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_http_route, name - assert_kind_of ::Google::Cloud::NetworkServices::V1::DeleteHttpRouteRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_http_route_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_http_route({ 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 - c.delete_http_route 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 - c.delete_http_route ::Google::Cloud::NetworkServices::V1::DeleteHttpRouteRequest.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 - c.delete_http_route({ 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 - c.delete_http_route(::Google::Cloud::NetworkServices::V1::DeleteHttpRouteRequest.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_http_route_client_stub.call_rpc_count - end - end - - def test_list_tcp_routes - # Create GRPC objects. - grpc_response = ::Google::Cloud::NetworkServices::V1::ListTcpRoutesResponse.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" - return_partial_success = true - - list_tcp_routes_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_tcp_routes, name - assert_kind_of ::Google::Cloud::NetworkServices::V1::ListTcpRoutesRequest, request - assert_equal "hello world", request["parent"] - 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_tcp_routes_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_tcp_routes({ parent: parent, 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 - c.list_tcp_routes parent: parent, 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 - c.list_tcp_routes ::Google::Cloud::NetworkServices::V1::ListTcpRoutesRequest.new(parent: parent, 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 - c.list_tcp_routes({ parent: parent, 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 - c.list_tcp_routes(::Google::Cloud::NetworkServices::V1::ListTcpRoutesRequest.new(parent: parent, 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_tcp_routes_client_stub.call_rpc_count - end - end - - def test_get_tcp_route - # Create GRPC objects. - grpc_response = ::Google::Cloud::NetworkServices::V1::TcpRoute.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_tcp_route_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_tcp_route, name - assert_kind_of ::Google::Cloud::NetworkServices::V1::GetTcpRouteRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_tcp_route_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_tcp_route({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_tcp_route name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_tcp_route ::Google::Cloud::NetworkServices::V1::GetTcpRouteRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_tcp_route({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_tcp_route(::Google::Cloud::NetworkServices::V1::GetTcpRouteRequest.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_tcp_route_client_stub.call_rpc_count - end - end - - def test_create_tcp_route - # 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" - tcp_route_id = "hello world" - tcp_route = {} - - create_tcp_route_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_tcp_route, name - assert_kind_of ::Google::Cloud::NetworkServices::V1::CreateTcpRouteRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["tcp_route_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::NetworkServices::V1::TcpRoute), request["tcp_route"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_tcp_route_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.create_tcp_route({ parent: parent, tcp_route_id: tcp_route_id, tcp_route: tcp_route }) 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 - c.create_tcp_route parent: parent, tcp_route_id: tcp_route_id, tcp_route: tcp_route 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 - c.create_tcp_route ::Google::Cloud::NetworkServices::V1::CreateTcpRouteRequest.new(parent: parent, tcp_route_id: tcp_route_id, tcp_route: tcp_route) 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 - c.create_tcp_route({ parent: parent, tcp_route_id: tcp_route_id, tcp_route: tcp_route }, 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 - c.create_tcp_route(::Google::Cloud::NetworkServices::V1::CreateTcpRouteRequest.new(parent: parent, tcp_route_id: tcp_route_id, tcp_route: tcp_route), 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_tcp_route_client_stub.call_rpc_count - end - end - - def test_update_tcp_route - # 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 = {} - tcp_route = {} - - update_tcp_route_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_tcp_route, name - assert_kind_of ::Google::Cloud::NetworkServices::V1::UpdateTcpRouteRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::NetworkServices::V1::TcpRoute), request["tcp_route"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_tcp_route_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_tcp_route({ update_mask: update_mask, tcp_route: tcp_route }) 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 - c.update_tcp_route update_mask: update_mask, tcp_route: tcp_route 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 - c.update_tcp_route ::Google::Cloud::NetworkServices::V1::UpdateTcpRouteRequest.new(update_mask: update_mask, tcp_route: tcp_route) 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 - c.update_tcp_route({ update_mask: update_mask, tcp_route: tcp_route }, 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 - c.update_tcp_route(::Google::Cloud::NetworkServices::V1::UpdateTcpRouteRequest.new(update_mask: update_mask, tcp_route: tcp_route), 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_tcp_route_client_stub.call_rpc_count - end - end - - def test_delete_tcp_route - # 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_tcp_route_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_tcp_route, name - assert_kind_of ::Google::Cloud::NetworkServices::V1::DeleteTcpRouteRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_tcp_route_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_tcp_route({ 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 - c.delete_tcp_route 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 - c.delete_tcp_route ::Google::Cloud::NetworkServices::V1::DeleteTcpRouteRequest.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 - c.delete_tcp_route({ 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 - c.delete_tcp_route(::Google::Cloud::NetworkServices::V1::DeleteTcpRouteRequest.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_tcp_route_client_stub.call_rpc_count - end - end - - def test_list_tls_routes - # Create GRPC objects. - grpc_response = ::Google::Cloud::NetworkServices::V1::ListTlsRoutesResponse.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" - return_partial_success = true - - list_tls_routes_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_tls_routes, name - assert_kind_of ::Google::Cloud::NetworkServices::V1::ListTlsRoutesRequest, request - assert_equal "hello world", request["parent"] - 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_tls_routes_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_tls_routes({ parent: parent, 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 - c.list_tls_routes parent: parent, 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 - c.list_tls_routes ::Google::Cloud::NetworkServices::V1::ListTlsRoutesRequest.new(parent: parent, 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 - c.list_tls_routes({ parent: parent, 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 - c.list_tls_routes(::Google::Cloud::NetworkServices::V1::ListTlsRoutesRequest.new(parent: parent, 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_tls_routes_client_stub.call_rpc_count - end - end - - def test_get_tls_route - # Create GRPC objects. - grpc_response = ::Google::Cloud::NetworkServices::V1::TlsRoute.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_tls_route_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_tls_route, name - assert_kind_of ::Google::Cloud::NetworkServices::V1::GetTlsRouteRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_tls_route_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_tls_route({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_tls_route name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_tls_route ::Google::Cloud::NetworkServices::V1::GetTlsRouteRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_tls_route({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_tls_route(::Google::Cloud::NetworkServices::V1::GetTlsRouteRequest.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_tls_route_client_stub.call_rpc_count - end - end - - def test_create_tls_route - # 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" - tls_route_id = "hello world" - tls_route = {} - - create_tls_route_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_tls_route, name - assert_kind_of ::Google::Cloud::NetworkServices::V1::CreateTlsRouteRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["tls_route_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::NetworkServices::V1::TlsRoute), request["tls_route"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_tls_route_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.create_tls_route({ parent: parent, tls_route_id: tls_route_id, tls_route: tls_route }) 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 - c.create_tls_route parent: parent, tls_route_id: tls_route_id, tls_route: tls_route 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 - c.create_tls_route ::Google::Cloud::NetworkServices::V1::CreateTlsRouteRequest.new(parent: parent, tls_route_id: tls_route_id, tls_route: tls_route) 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 - c.create_tls_route({ parent: parent, tls_route_id: tls_route_id, tls_route: tls_route }, 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 - c.create_tls_route(::Google::Cloud::NetworkServices::V1::CreateTlsRouteRequest.new(parent: parent, tls_route_id: tls_route_id, tls_route: tls_route), 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_tls_route_client_stub.call_rpc_count - end - end - - def test_update_tls_route - # 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 = {} - tls_route = {} - - update_tls_route_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_tls_route, name - assert_kind_of ::Google::Cloud::NetworkServices::V1::UpdateTlsRouteRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::NetworkServices::V1::TlsRoute), request["tls_route"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_tls_route_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_tls_route({ update_mask: update_mask, tls_route: tls_route }) 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 - c.update_tls_route update_mask: update_mask, tls_route: tls_route 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 - c.update_tls_route ::Google::Cloud::NetworkServices::V1::UpdateTlsRouteRequest.new(update_mask: update_mask, tls_route: tls_route) 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 - c.update_tls_route({ update_mask: update_mask, tls_route: tls_route }, 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 - c.update_tls_route(::Google::Cloud::NetworkServices::V1::UpdateTlsRouteRequest.new(update_mask: update_mask, tls_route: tls_route), 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_tls_route_client_stub.call_rpc_count - end - end - - def test_delete_tls_route - # 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_tls_route_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_tls_route, name - assert_kind_of ::Google::Cloud::NetworkServices::V1::DeleteTlsRouteRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_tls_route_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_tls_route({ 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 - c.delete_tls_route 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 - c.delete_tls_route ::Google::Cloud::NetworkServices::V1::DeleteTlsRouteRequest.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 - c.delete_tls_route({ 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 - c.delete_tls_route(::Google::Cloud::NetworkServices::V1::DeleteTlsRouteRequest.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_tls_route_client_stub.call_rpc_count - end - end - - def test_list_service_bindings - # Create GRPC objects. - grpc_response = ::Google::Cloud::NetworkServices::V1::ListServiceBindingsResponse.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" - - list_service_bindings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_service_bindings, name - assert_kind_of ::Google::Cloud::NetworkServices::V1::ListServiceBindingsRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_service_bindings_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_service_bindings({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_service_bindings parent: parent, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_service_bindings ::Google::Cloud::NetworkServices::V1::ListServiceBindingsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_service_bindings({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_service_bindings(::Google::Cloud::NetworkServices::V1::ListServiceBindingsRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_service_bindings_client_stub.call_rpc_count - end - end - - def test_get_service_binding - # Create GRPC objects. - grpc_response = ::Google::Cloud::NetworkServices::V1::ServiceBinding.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_service_binding_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_service_binding, name - assert_kind_of ::Google::Cloud::NetworkServices::V1::GetServiceBindingRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_service_binding_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_service_binding({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_service_binding name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_service_binding ::Google::Cloud::NetworkServices::V1::GetServiceBindingRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_service_binding({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_service_binding(::Google::Cloud::NetworkServices::V1::GetServiceBindingRequest.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_service_binding_client_stub.call_rpc_count - end - end - - def test_create_service_binding - # 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" - service_binding_id = "hello world" - service_binding = {} - - create_service_binding_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_service_binding, name - assert_kind_of ::Google::Cloud::NetworkServices::V1::CreateServiceBindingRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["service_binding_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::NetworkServices::V1::ServiceBinding), request["service_binding"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_service_binding_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.create_service_binding({ parent: parent, service_binding_id: service_binding_id, service_binding: service_binding }) 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 - c.create_service_binding parent: parent, service_binding_id: service_binding_id, service_binding: service_binding 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 - c.create_service_binding ::Google::Cloud::NetworkServices::V1::CreateServiceBindingRequest.new(parent: parent, service_binding_id: service_binding_id, service_binding: service_binding) 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 - c.create_service_binding({ parent: parent, service_binding_id: service_binding_id, service_binding: service_binding }, 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 - c.create_service_binding(::Google::Cloud::NetworkServices::V1::CreateServiceBindingRequest.new(parent: parent, service_binding_id: service_binding_id, service_binding: service_binding), 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_service_binding_client_stub.call_rpc_count - end - end - - def test_update_service_binding - # 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 = {} - service_binding = {} - - update_service_binding_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_service_binding, name - assert_kind_of ::Google::Cloud::NetworkServices::V1::UpdateServiceBindingRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::NetworkServices::V1::ServiceBinding), request["service_binding"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_service_binding_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_service_binding({ update_mask: update_mask, service_binding: service_binding }) 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 - c.update_service_binding update_mask: update_mask, service_binding: service_binding 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 - c.update_service_binding ::Google::Cloud::NetworkServices::V1::UpdateServiceBindingRequest.new(update_mask: update_mask, service_binding: service_binding) 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 - c.update_service_binding({ update_mask: update_mask, service_binding: service_binding }, 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 - c.update_service_binding(::Google::Cloud::NetworkServices::V1::UpdateServiceBindingRequest.new(update_mask: update_mask, service_binding: service_binding), 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_service_binding_client_stub.call_rpc_count - end - end - - def test_delete_service_binding - # 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_service_binding_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_service_binding, name - assert_kind_of ::Google::Cloud::NetworkServices::V1::DeleteServiceBindingRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_service_binding_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_service_binding({ 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 - c.delete_service_binding 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 - c.delete_service_binding ::Google::Cloud::NetworkServices::V1::DeleteServiceBindingRequest.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 - c.delete_service_binding({ 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 - c.delete_service_binding(::Google::Cloud::NetworkServices::V1::DeleteServiceBindingRequest.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_service_binding_client_stub.call_rpc_count - end - end - - def test_list_meshes - # Create GRPC objects. - grpc_response = ::Google::Cloud::NetworkServices::V1::ListMeshesResponse.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" - return_partial_success = true - - list_meshes_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_meshes, name - assert_kind_of ::Google::Cloud::NetworkServices::V1::ListMeshesRequest, request - assert_equal "hello world", request["parent"] - 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_meshes_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_meshes({ parent: parent, 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 - c.list_meshes parent: parent, 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 - c.list_meshes ::Google::Cloud::NetworkServices::V1::ListMeshesRequest.new(parent: parent, 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 - c.list_meshes({ parent: parent, 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 - c.list_meshes(::Google::Cloud::NetworkServices::V1::ListMeshesRequest.new(parent: parent, 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_meshes_client_stub.call_rpc_count - end - end - - def test_get_mesh - # Create GRPC objects. - grpc_response = ::Google::Cloud::NetworkServices::V1::Mesh.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_mesh_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_mesh, name - assert_kind_of ::Google::Cloud::NetworkServices::V1::GetMeshRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_mesh_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_mesh({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_mesh name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_mesh ::Google::Cloud::NetworkServices::V1::GetMeshRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_mesh({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_mesh(::Google::Cloud::NetworkServices::V1::GetMeshRequest.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_mesh_client_stub.call_rpc_count - end - end - - def test_create_mesh - # 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" - mesh_id = "hello world" - mesh = {} - - create_mesh_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_mesh, name - assert_kind_of ::Google::Cloud::NetworkServices::V1::CreateMeshRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["mesh_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::NetworkServices::V1::Mesh), request["mesh"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_mesh_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.create_mesh({ parent: parent, mesh_id: mesh_id, mesh: mesh }) 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 - c.create_mesh parent: parent, mesh_id: mesh_id, mesh: mesh 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 - c.create_mesh ::Google::Cloud::NetworkServices::V1::CreateMeshRequest.new(parent: parent, mesh_id: mesh_id, mesh: mesh) 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 - c.create_mesh({ parent: parent, mesh_id: mesh_id, mesh: mesh }, 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 - c.create_mesh(::Google::Cloud::NetworkServices::V1::CreateMeshRequest.new(parent: parent, mesh_id: mesh_id, mesh: mesh), 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_mesh_client_stub.call_rpc_count - end - end - - def test_update_mesh - # 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 = {} - mesh = {} - - update_mesh_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_mesh, name - assert_kind_of ::Google::Cloud::NetworkServices::V1::UpdateMeshRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::NetworkServices::V1::Mesh), request["mesh"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_mesh_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_mesh({ update_mask: update_mask, mesh: mesh }) 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 - c.update_mesh update_mask: update_mask, mesh: mesh 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 - c.update_mesh ::Google::Cloud::NetworkServices::V1::UpdateMeshRequest.new(update_mask: update_mask, mesh: mesh) 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 - c.update_mesh({ update_mask: update_mask, mesh: mesh }, 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 - c.update_mesh(::Google::Cloud::NetworkServices::V1::UpdateMeshRequest.new(update_mask: update_mask, mesh: mesh), 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_mesh_client_stub.call_rpc_count - end - end - - def test_delete_mesh - # 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_mesh_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_mesh, name - assert_kind_of ::Google::Cloud::NetworkServices::V1::DeleteMeshRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_mesh_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_mesh({ 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 - c.delete_mesh 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 - c.delete_mesh ::Google::Cloud::NetworkServices::V1::DeleteMeshRequest.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 - c.delete_mesh({ 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 - c.delete_mesh(::Google::Cloud::NetworkServices::V1::DeleteMeshRequest.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_mesh_client_stub.call_rpc_count - end - end - - def test_list_service_lb_policies - # Create GRPC objects. - grpc_response = ::Google::Cloud::NetworkServices::V1::ListServiceLbPoliciesResponse.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" - - list_service_lb_policies_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_service_lb_policies, name - assert_kind_of ::Google::Cloud::NetworkServices::V1::ListServiceLbPoliciesRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_service_lb_policies_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_service_lb_policies({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_service_lb_policies parent: parent, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_service_lb_policies ::Google::Cloud::NetworkServices::V1::ListServiceLbPoliciesRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_service_lb_policies({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_service_lb_policies(::Google::Cloud::NetworkServices::V1::ListServiceLbPoliciesRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_service_lb_policies_client_stub.call_rpc_count - end - end - - def test_get_service_lb_policy - # Create GRPC objects. - grpc_response = ::Google::Cloud::NetworkServices::V1::ServiceLbPolicy.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_service_lb_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_service_lb_policy, name - assert_kind_of ::Google::Cloud::NetworkServices::V1::GetServiceLbPolicyRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_service_lb_policy_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_service_lb_policy({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_service_lb_policy name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_service_lb_policy ::Google::Cloud::NetworkServices::V1::GetServiceLbPolicyRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_service_lb_policy({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_service_lb_policy(::Google::Cloud::NetworkServices::V1::GetServiceLbPolicyRequest.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_service_lb_policy_client_stub.call_rpc_count - end - end - - def test_create_service_lb_policy - # 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" - service_lb_policy_id = "hello world" - service_lb_policy = {} - - create_service_lb_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_service_lb_policy, name - assert_kind_of ::Google::Cloud::NetworkServices::V1::CreateServiceLbPolicyRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["service_lb_policy_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::NetworkServices::V1::ServiceLbPolicy), request["service_lb_policy"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_service_lb_policy_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.create_service_lb_policy({ parent: parent, service_lb_policy_id: service_lb_policy_id, service_lb_policy: service_lb_policy }) 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 - c.create_service_lb_policy parent: parent, service_lb_policy_id: service_lb_policy_id, service_lb_policy: service_lb_policy 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 - c.create_service_lb_policy ::Google::Cloud::NetworkServices::V1::CreateServiceLbPolicyRequest.new(parent: parent, service_lb_policy_id: service_lb_policy_id, service_lb_policy: service_lb_policy) 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 - c.create_service_lb_policy({ parent: parent, service_lb_policy_id: service_lb_policy_id, service_lb_policy: service_lb_policy }, 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 - c.create_service_lb_policy(::Google::Cloud::NetworkServices::V1::CreateServiceLbPolicyRequest.new(parent: parent, service_lb_policy_id: service_lb_policy_id, service_lb_policy: service_lb_policy), 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_service_lb_policy_client_stub.call_rpc_count - end - end - - def test_update_service_lb_policy - # 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 = {} - service_lb_policy = {} - - update_service_lb_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_service_lb_policy, name - assert_kind_of ::Google::Cloud::NetworkServices::V1::UpdateServiceLbPolicyRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::NetworkServices::V1::ServiceLbPolicy), request["service_lb_policy"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_service_lb_policy_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_service_lb_policy({ update_mask: update_mask, service_lb_policy: service_lb_policy }) 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 - c.update_service_lb_policy update_mask: update_mask, service_lb_policy: service_lb_policy 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 - c.update_service_lb_policy ::Google::Cloud::NetworkServices::V1::UpdateServiceLbPolicyRequest.new(update_mask: update_mask, service_lb_policy: service_lb_policy) 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 - c.update_service_lb_policy({ update_mask: update_mask, service_lb_policy: service_lb_policy }, 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 - c.update_service_lb_policy(::Google::Cloud::NetworkServices::V1::UpdateServiceLbPolicyRequest.new(update_mask: update_mask, service_lb_policy: service_lb_policy), 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_service_lb_policy_client_stub.call_rpc_count - end - end - - def test_delete_service_lb_policy - # 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_service_lb_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_service_lb_policy, name - assert_kind_of ::Google::Cloud::NetworkServices::V1::DeleteServiceLbPolicyRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_service_lb_policy_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_service_lb_policy({ 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 - c.delete_service_lb_policy 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 - c.delete_service_lb_policy ::Google::Cloud::NetworkServices::V1::DeleteServiceLbPolicyRequest.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 - c.delete_service_lb_policy({ 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 - c.delete_service_lb_policy(::Google::Cloud::NetworkServices::V1::DeleteServiceLbPolicyRequest.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_service_lb_policy_client_stub.call_rpc_count - end - end - - def test_get_gateway_route_view - # Create GRPC objects. - grpc_response = ::Google::Cloud::NetworkServices::V1::GatewayRouteView.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_gateway_route_view_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_gateway_route_view, name - assert_kind_of ::Google::Cloud::NetworkServices::V1::GetGatewayRouteViewRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_gateway_route_view_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_gateway_route_view({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_gateway_route_view name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_gateway_route_view ::Google::Cloud::NetworkServices::V1::GetGatewayRouteViewRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_gateway_route_view({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_gateway_route_view(::Google::Cloud::NetworkServices::V1::GetGatewayRouteViewRequest.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_gateway_route_view_client_stub.call_rpc_count - end - end - - def test_get_mesh_route_view - # Create GRPC objects. - grpc_response = ::Google::Cloud::NetworkServices::V1::MeshRouteView.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_mesh_route_view_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_mesh_route_view, name - assert_kind_of ::Google::Cloud::NetworkServices::V1::GetMeshRouteViewRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_mesh_route_view_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_mesh_route_view({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_mesh_route_view name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_mesh_route_view ::Google::Cloud::NetworkServices::V1::GetMeshRouteViewRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_mesh_route_view({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_mesh_route_view(::Google::Cloud::NetworkServices::V1::GetMeshRouteViewRequest.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_mesh_route_view_client_stub.call_rpc_count - end - end - - def test_list_gateway_route_views - # Create GRPC objects. - grpc_response = ::Google::Cloud::NetworkServices::V1::ListGatewayRouteViewsResponse.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" - - list_gateway_route_views_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_gateway_route_views, name - assert_kind_of ::Google::Cloud::NetworkServices::V1::ListGatewayRouteViewsRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_gateway_route_views_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_gateway_route_views({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_gateway_route_views parent: parent, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_gateway_route_views ::Google::Cloud::NetworkServices::V1::ListGatewayRouteViewsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_gateway_route_views({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_gateway_route_views(::Google::Cloud::NetworkServices::V1::ListGatewayRouteViewsRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_gateway_route_views_client_stub.call_rpc_count - end - end - - def test_list_mesh_route_views - # Create GRPC objects. - grpc_response = ::Google::Cloud::NetworkServices::V1::ListMeshRouteViewsResponse.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" - - list_mesh_route_views_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_mesh_route_views, name - assert_kind_of ::Google::Cloud::NetworkServices::V1::ListMeshRouteViewsRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_mesh_route_views_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_mesh_route_views({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_mesh_route_views parent: parent, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_mesh_route_views ::Google::Cloud::NetworkServices::V1::ListMeshRouteViewsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_mesh_route_views({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_mesh_route_views(::Google::Cloud::NetworkServices::V1::ListMeshRouteViewsRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_mesh_route_views_client_stub.call_rpc_count - end - end - - def test_list_agent_gateways - # Create GRPC objects. - grpc_response = ::Google::Cloud::NetworkServices::V1::ListAgentGatewaysResponse.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" - return_partial_success = true - - list_agent_gateways_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_agent_gateways, name - assert_kind_of ::Google::Cloud::NetworkServices::V1::ListAgentGatewaysRequest, request - assert_equal "hello world", request["parent"] - 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_agent_gateways_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_agent_gateways({ parent: parent, 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 - c.list_agent_gateways parent: parent, 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 - c.list_agent_gateways ::Google::Cloud::NetworkServices::V1::ListAgentGatewaysRequest.new(parent: parent, 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 - c.list_agent_gateways({ parent: parent, 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 - c.list_agent_gateways(::Google::Cloud::NetworkServices::V1::ListAgentGatewaysRequest.new(parent: parent, 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_agent_gateways_client_stub.call_rpc_count - end - end - - def test_get_agent_gateway - # Create GRPC objects. - grpc_response = ::Google::Cloud::NetworkServices::V1::AgentGateway.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_agent_gateway_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_agent_gateway, name - assert_kind_of ::Google::Cloud::NetworkServices::V1::GetAgentGatewayRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_agent_gateway_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_agent_gateway({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_agent_gateway name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_agent_gateway ::Google::Cloud::NetworkServices::V1::GetAgentGatewayRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_agent_gateway({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_agent_gateway(::Google::Cloud::NetworkServices::V1::GetAgentGatewayRequest.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_agent_gateway_client_stub.call_rpc_count - end - end - - def test_create_agent_gateway - # 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" - agent_gateway_id = "hello world" - agent_gateway = {} - - create_agent_gateway_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_agent_gateway, name - assert_kind_of ::Google::Cloud::NetworkServices::V1::CreateAgentGatewayRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["agent_gateway_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::NetworkServices::V1::AgentGateway), request["agent_gateway"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_agent_gateway_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.create_agent_gateway({ parent: parent, agent_gateway_id: agent_gateway_id, agent_gateway: agent_gateway }) 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 - c.create_agent_gateway parent: parent, agent_gateway_id: agent_gateway_id, agent_gateway: agent_gateway 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 - c.create_agent_gateway ::Google::Cloud::NetworkServices::V1::CreateAgentGatewayRequest.new(parent: parent, agent_gateway_id: agent_gateway_id, agent_gateway: agent_gateway) 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 - c.create_agent_gateway({ parent: parent, agent_gateway_id: agent_gateway_id, agent_gateway: agent_gateway }, 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 - c.create_agent_gateway(::Google::Cloud::NetworkServices::V1::CreateAgentGatewayRequest.new(parent: parent, agent_gateway_id: agent_gateway_id, agent_gateway: agent_gateway), 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_agent_gateway_client_stub.call_rpc_count - end - end - - def test_update_agent_gateway - # 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 = {} - agent_gateway = {} - - update_agent_gateway_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_agent_gateway, name - assert_kind_of ::Google::Cloud::NetworkServices::V1::UpdateAgentGatewayRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::NetworkServices::V1::AgentGateway), request["agent_gateway"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_agent_gateway_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_agent_gateway({ update_mask: update_mask, agent_gateway: agent_gateway }) 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 - c.update_agent_gateway update_mask: update_mask, agent_gateway: agent_gateway 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 - c.update_agent_gateway ::Google::Cloud::NetworkServices::V1::UpdateAgentGatewayRequest.new(update_mask: update_mask, agent_gateway: agent_gateway) 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 - c.update_agent_gateway({ update_mask: update_mask, agent_gateway: agent_gateway }, 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 - c.update_agent_gateway(::Google::Cloud::NetworkServices::V1::UpdateAgentGatewayRequest.new(update_mask: update_mask, agent_gateway: agent_gateway), 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_agent_gateway_client_stub.call_rpc_count - end - end - - def test_delete_agent_gateway - # 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" - etag = "hello world" - - delete_agent_gateway_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_agent_gateway, name - assert_kind_of ::Google::Cloud::NetworkServices::V1::DeleteAgentGatewayRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["etag"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_agent_gateway_client_stub do - # Create client - c = ::Google::Cloud::NetworkServices::V1::NetworkServices::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_agent_gateway({ name: name, etag: etag }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.delete_agent_gateway name: name, etag: etag do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.delete_agent_gateway ::Google::Cloud::NetworkServices::V1::DeleteAgentGatewayRequest.new(name: name, etag: etag) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.delete_agent_gateway({ name: name, etag: etag }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.delete_agent_gateway(::Google::Cloud::NetworkServices::V1::DeleteAgentGatewayRequest.new(name: name, etag: etag), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_agent_gateway_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::NetworkServices::V1::NetworkServices::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::NetworkServices::V1::NetworkServices::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::NetworkServices::V1::NetworkServices::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::NetworkServices::V1::NetworkServices::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::NetworkServices::V1::NetworkServices::Client.new do |config| - config.credentials = grpc_channel - end - end - - assert_kind_of ::Google::Cloud::NetworkServices::V1::NetworkServices::Operations, client.operations_client - end -end diff --git a/owl-bot-staging/google-cloud-network_services-v1/test/helper.rb b/owl-bot-staging/google-cloud-network_services-v1/test/helper.rb deleted file mode 100644 index 672b337030e7..000000000000 --- a/owl-bot-staging/google-cloud-network_services-v1/test/helper.rb +++ /dev/null @@ -1,26 +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/mock" -require "minitest/rg" - -require "grpc" - -require "ostruct"