From fe20507f2a5a17da501cd3bcd4dfbc7675fb5a3f Mon Sep 17 00:00:00 2001 From: Google APIs Date: Fri, 15 Mar 2024 08:25:22 -0700 Subject: [PATCH] feat: add additional values to the `EventType` enum fix!: `EventType` enum moved to the top level docs: A comment for enum `LoadBalancingScheme` is changed docs: A comment for field `cel_expression` in message `.google.cloud.networkservices.v1beta1.ExtensionChain` is changed docs: A comment for field `authority` in message `.google.cloud.networkservices.v1beta1.ExtensionChain` is changed docs: A comment for field `timeout` in message `.google.cloud.networkservices.v1beta1.ExtensionChain` is changed docs: A comment for field `labels` in message `.google.cloud.networkservices.v1beta1.LbTrafficExtension` is changed docs: A comment for field `labels` in message `.google.cloud.networkservices.v1beta1.LbRouteExtension` is changed BREAKING CHANGE: EventType enum moved to the top level PiperOrigin-RevId: 616136877 --- .../cloud/networkservices/v1beta1/BUILD.bazel | 14 +++- .../cloud/networkservices/v1beta1/dep.proto | 79 ++++++++++--------- 2 files changed, 54 insertions(+), 39 deletions(-) diff --git a/google/cloud/networkservices/v1beta1/BUILD.bazel b/google/cloud/networkservices/v1beta1/BUILD.bazel index a8f6b63e3b092..3e6fe98f75377 100644 --- a/google/cloud/networkservices/v1beta1/BUILD.bazel +++ b/google/cloud/networkservices/v1beta1/BUILD.bazel @@ -9,14 +9,17 @@ # * extra_protoc_file_parameters # The complete list of preserved parameters can be found in the source code. +# buildifier: disable=load-on-top + # This is an API workspace, having public visibility by default makes perfect sense. package(default_visibility = ["//visibility:public"]) ############################################################################## # Common ############################################################################## -load("@rules_proto//proto:defs.bzl", "proto_library") +# buildifier: disable=same-origin-load load("@com_google_googleapis_imports//:imports.bzl", "proto_library_with_info") +load("@rules_proto//proto:defs.bzl", "proto_library") proto_library( name = "networkservices_proto", @@ -51,6 +54,7 @@ proto_library_with_info( ############################################################################## # Java ############################################################################## +# buildifier: disable=same-origin-load load( "@com_google_googleapis_imports//:imports.bzl", "java_gapic_assembly_gradle_pkg", @@ -115,6 +119,7 @@ java_gapic_assembly_gradle_pkg( ############################################################################## # Go ############################################################################## +# buildifier: disable=same-origin-load load( "@com_google_googleapis_imports//:imports.bzl", "go_gapic_assembly_pkg", @@ -167,6 +172,7 @@ go_gapic_assembly_pkg( ############################################################################## # Python ############################################################################## +# buildifier: disable=same-origin-load load( "@com_google_googleapis_imports//:imports.bzl", "py_gapic_assembly_pkg", @@ -206,6 +212,7 @@ py_gapic_assembly_pkg( ############################################################################## # PHP ############################################################################## +# buildifier: disable=same-origin-load load( "@com_google_googleapis_imports//:imports.bzl", "php_gapic_assembly_pkg", @@ -243,6 +250,7 @@ php_gapic_assembly_pkg( ############################################################################## # Node.js ############################################################################## +# buildifier: disable=same-origin-load load( "@com_google_googleapis_imports//:imports.bzl", "nodejs_gapic_assembly_pkg", @@ -273,6 +281,7 @@ nodejs_gapic_assembly_pkg( ############################################################################## # Ruby ############################################################################## +# buildifier: disable=same-origin-load load( "@com_google_googleapis_imports//:imports.bzl", "ruby_cloud_gapic_library", @@ -319,6 +328,7 @@ ruby_gapic_assembly_pkg( ############################################################################## # C# ############################################################################## +# buildifier: disable=same-origin-load load( "@com_google_googleapis_imports//:imports.bzl", "csharp_gapic_assembly_pkg", @@ -329,7 +339,6 @@ load( csharp_proto_library( name = "networkservices_csharp_proto", - extra_opts = [], deps = [":networkservices_proto"], ) @@ -366,6 +375,7 @@ csharp_gapic_assembly_pkg( ############################################################################## # C++ ############################################################################## +# buildifier: disable=same-origin-load load( "@com_google_googleapis_imports//:imports.bzl", "cc_grpc_library", diff --git a/google/cloud/networkservices/v1beta1/dep.proto b/google/cloud/networkservices/v1beta1/dep.proto index 9f67a76e505bb..96a6857b35550 100644 --- a/google/cloud/networkservices/v1beta1/dep.proto +++ b/google/cloud/networkservices/v1beta1/dep.proto @@ -164,9 +164,38 @@ service DepService { } } +// The part of the request or response for which the extension is called. +enum 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; +} + // Load balancing schemes supported by the `LbTrafficExtension` resource and -// `LbRouteExtension` resource. The valid values are `INTERNAL_MANAGED` and -// `EXTERNAL_MANAGED`. +// `LbRouteExtension` resource. // For more information, refer to [Choosing a load // balancer](https://cloud.google.com/load-balancing/docs/backend-service). enum LoadBalancingScheme { @@ -189,39 +218,13 @@ message ExtensionChain { // 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](/service-extensions/docs/cel-matcher-language-reference). + // For more information, see [CEL matcher language + // reference](https://cloud.google.com/service-extensions/docs/cel-matcher-language-reference). string cel_expression = 1 [(google.api.field_behavior) = REQUIRED]; } // A single extension in the chain to execute for the matching request. message Extension { - // The part of the request or response for which this extension - // is called. - // The valid values are: - // `REQUEST_HEADERS`, `REQUEST_BODY`, `RESPONSE_HEADERS`, `RESPONSE_BODY`. - enum 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; - } - // Required. 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 @@ -232,6 +235,7 @@ message ExtensionChain { // Optional. The `:authority` header in the gRPC request sent from Envoy // to the extension service. + // Required for Callout extensions. string authority = 2 [(google.api.field_behavior) = OPTIONAL]; // Required. The reference to the service that runs the extension. @@ -255,10 +259,11 @@ message ExtensionChain { repeated EventType supported_events = 4 [(google.api.field_behavior) = OPTIONAL]; - // Required. Specifies the timeout for each individual message on the - // stream. The timeout must be between 10-1000 milliseconds. + // Optional. Specifies the timeout for each individual message on the + // stream. The timeout must be between 10-1000 milliseconds. Required for + // Callout extensions. google.protobuf.Duration timeout = 5 - [(google.api.field_behavior) = REQUIRED]; + [(google.api.field_behavior) = OPTIONAL]; // Optional. Determines how the proxy behaves if the call to the extension // fails or times out. @@ -335,8 +340,8 @@ message LbTrafficExtension { // Optional. Set of labels associated with the `LbTrafficExtension` resource. // // The format must comply with [the requirements for - // labels](/compute/docs/labeling-resources#requirements) for Google Cloud - // resources. + // labels](https://cloud.google.com/compute/docs/labeling-resources#requirements) + // for Google Cloud resources. map labels = 4 [(google.api.field_behavior) = OPTIONAL]; // Required. A list of references to the forwarding rules to which this @@ -547,8 +552,8 @@ message LbRouteExtension { // Optional. Set of labels associated with the `LbRouteExtension` resource. // // The format must comply with [the requirements for - // labels](/compute/docs/labeling-resources#requirements) for Google Cloud - // resources. + // labels](https://cloud.google.com/compute/docs/labeling-resources#requirements) + // for Google Cloud resources. map labels = 4 [(google.api.field_behavior) = OPTIONAL]; // Required. A list of references to the forwarding rules to which this