// This file is @generated by prost-build.
/// Represents the metadata of the long-running operation.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct OperationMetadata {
    /// Output only. The time the operation was created.
    #[prost(message, optional, tag = "1")]
    pub create_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Output only. The time the operation finished running.
    #[prost(message, optional, tag = "2")]
    pub end_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Output only. Server-defined resource path for the target of the operation.
    #[prost(string, tag = "3")]
    pub target: ::prost::alloc::string::String,
    /// Output only. Name of the verb executed by the operation.
    #[prost(string, tag = "4")]
    pub verb: ::prost::alloc::string::String,
    /// Output only. Human-readable status of the operation, if any.
    #[prost(string, tag = "5")]
    pub status_message: ::prost::alloc::string::String,
    /// 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`.
    #[prost(bool, tag = "6")]
    pub requested_cancellation: bool,
    /// Output only. API version used to start the operation.
    #[prost(string, tag = "7")]
    pub api_version: ::prost::alloc::string::String,
}
/// Specification of a port-based selector.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct TrafficPortSelector {
    /// 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.
    #[prost(string, repeated, tag = "1")]
    pub ports: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
/// A definition of a matcher that selects endpoints to which the policies
/// should be applied.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct EndpointMatcher {
    /// Specifies type of the matcher used for this endpoint matcher.
    #[prost(oneof = "endpoint_matcher::MatcherType", tags = "1")]
    pub matcher_type: ::core::option::Option<endpoint_matcher::MatcherType>,
}
/// Nested message and enum types in `EndpointMatcher`.
pub mod endpoint_matcher {
    /// The matcher that is based on node metadata presented by xDS clients.
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct MetadataLabelMatcher {
        /// 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 \<A:1, B:1>, P2 has MATCH_ALL \<A:1,B:1>, and P3 has
        /// MATCH_ALL \<A:1,B:1,C:1>.
        ///
        /// If a client with label \<A:1> connects, the config from P1
        /// will be selected.
        ///
        /// If a client with label \<A:1,B:1> connects, the config from P2
        /// will be selected.
        ///
        /// If a client with label \<A:1,B:1,C:1> connects, the config
        /// from P3 will be selected.
        ///
        /// If there is more than one best match, (for example, if a
        /// config P4 with selector \<A:1,D:1> exists and if a client with
        /// label \<A:1,B:1,D:1> connects), pick up the one with older creation time.
        #[prost(
            enumeration = "metadata_label_matcher::MetadataLabelMatchCriteria",
            tag = "1"
        )]
        pub metadata_label_match_criteria: i32,
        /// 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).
        #[prost(message, repeated, tag = "2")]
        pub metadata_labels: ::prost::alloc::vec::Vec<
            metadata_label_matcher::MetadataLabels,
        >,
    }
    /// Nested message and enum types in `MetadataLabelMatcher`.
    pub mod metadata_label_matcher {
        /// Defines a name-pair value for a single label.
        #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
        pub struct MetadataLabels {
            /// Required. Label name presented as key in xDS Node Metadata.
            #[prost(string, tag = "1")]
            pub label_name: ::prost::alloc::string::String,
            /// Required. Label value presented as value corresponding to the above
            /// key, in xDS Node Metadata.
            #[prost(string, tag = "2")]
            pub label_value: ::prost::alloc::string::String,
        }
        /// Possible criteria values that define logic of how matching is made.
        #[derive(
            Clone,
            Copy,
            Debug,
            PartialEq,
            Eq,
            Hash,
            PartialOrd,
            Ord,
            ::prost::Enumeration
        )]
        #[repr(i32)]
        pub enum MetadataLabelMatchCriteria {
            /// Default value. Should not be used.
            Unspecified = 0,
            /// At least one of the Labels specified in the matcher should match the
            /// metadata presented by xDS client.
            MatchAny = 1,
            /// The metadata presented by the xDS client should contain all of the
            /// labels specified here.
            MatchAll = 2,
        }
        impl MetadataLabelMatchCriteria {
            /// String value of the enum field names used in the ProtoBuf definition.
            ///
            /// The values are not transformed in any way and thus are considered stable
            /// (if the ProtoBuf definition does not change) and safe for programmatic use.
            pub fn as_str_name(&self) -> &'static str {
                match self {
                    Self::Unspecified => "METADATA_LABEL_MATCH_CRITERIA_UNSPECIFIED",
                    Self::MatchAny => "MATCH_ANY",
                    Self::MatchAll => "MATCH_ALL",
                }
            }
            /// Creates an enum from field names used in the ProtoBuf definition.
            pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
                match value {
                    "METADATA_LABEL_MATCH_CRITERIA_UNSPECIFIED" => {
                        Some(Self::Unspecified)
                    }
                    "MATCH_ANY" => Some(Self::MatchAny),
                    "MATCH_ALL" => Some(Self::MatchAll),
                    _ => None,
                }
            }
        }
    }
    /// Specifies type of the matcher used for this endpoint matcher.
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum MatcherType {
        /// The matcher is based on node metadata presented by xDS clients.
        #[prost(message, tag = "1")]
        MetadataLabelMatcher(MetadataLabelMatcher),
    }
}
/// EnvoyHeader configuration for Mesh and Gateway
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum EnvoyHeaders {
    /// Defaults to NONE.
    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
    DebugHeaders = 2,
}
impl EnvoyHeaders {
    /// String value of the enum field names used in the ProtoBuf definition.
    ///
    /// The values are not transformed in any way and thus are considered stable
    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
    pub fn as_str_name(&self) -> &'static str {
        match self {
            Self::Unspecified => "ENVOY_HEADERS_UNSPECIFIED",
            Self::None => "NONE",
            Self::DebugHeaders => "DEBUG_HEADERS",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "ENVOY_HEADERS_UNSPECIFIED" => Some(Self::Unspecified),
            "NONE" => Some(Self::None),
            "DEBUG_HEADERS" => Some(Self::DebugHeaders),
            _ => None,
        }
    }
}
/// A single extension chain wrapper that contains the match conditions and
/// extensions to execute.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ExtensionChain {
    /// 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.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// Required. Conditions under which this chain is invoked for a request.
    #[prost(message, optional, tag = "2")]
    pub match_condition: ::core::option::Option<extension_chain::MatchCondition>,
    /// 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.
    #[prost(message, repeated, tag = "3")]
    pub extensions: ::prost::alloc::vec::Vec<extension_chain::Extension>,
}
/// Nested message and enum types in `ExtensionChain`.
pub mod extension_chain {
    /// Conditions under which this chain is invoked for a request.
    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
    pub struct MatchCondition {
        /// 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>).
        #[prost(string, tag = "1")]
        pub cel_expression: ::prost::alloc::string::String,
    }
    /// A single extension in the chain to execute for the matching request.
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct Extension {
        /// 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
        /// 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.
        #[prost(string, tag = "1")]
        pub name: ::prost::alloc::string::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.
        #[prost(string, tag = "2")]
        pub authority: ::prost::alloc::string::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.
        #[prost(string, tag = "3")]
        pub service: ::prost::alloc::string::String,
        /// 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.
        #[prost(enumeration = "super::EventType", repeated, packed = "false", tag = "4")]
        pub supported_events: ::prost::alloc::vec::Vec<i32>,
        /// 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.
        #[prost(message, optional, tag = "5")]
        pub timeout: ::core::option::Option<::prost_types::Duration>,
        /// 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.
        #[prost(bool, tag = "6")]
        pub fail_open: bool,
        /// 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.
        #[prost(string, repeated, tag = "7")]
        pub forward_headers: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
        /// 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.<extension_type>.<resource_name>.<extension_chain_name>.<extension_name>`.
        /// 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.
        #[prost(message, optional, tag = "9")]
        pub metadata: ::core::option::Option<::prost_types::Struct>,
    }
}
/// `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.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct LbTrafficExtension {
    /// Required. Identifier. Name of the `LbTrafficExtension` resource in the
    /// following format:
    /// `projects/{project}/locations/{location}/lbTrafficExtensions/{lb_traffic_extension}`.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// Output only. The timestamp when the resource was created.
    #[prost(message, optional, tag = "2")]
    pub create_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Output only. The timestamp when the resource was updated.
    #[prost(message, optional, tag = "3")]
    pub update_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Optional. A human-readable description of the resource.
    #[prost(string, tag = "9")]
    pub description: ::prost::alloc::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.
    #[prost(map = "string, string", tag = "4")]
    pub labels: ::std::collections::HashMap<
        ::prost::alloc::string::String,
        ::prost::alloc::string::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.
    #[prost(string, repeated, tag = "5")]
    pub forwarding_rules: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    /// 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.
    #[prost(message, repeated, tag = "7")]
    pub extension_chains: ::prost::alloc::vec::Vec<ExtensionChain>,
    /// 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>).
    #[prost(enumeration = "LoadBalancingScheme", tag = "8")]
    pub load_balancing_scheme: i32,
    /// 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.<resource_name>`.
    ///
    /// 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.
    #[prost(message, optional, tag = "10")]
    pub metadata: ::core::option::Option<::prost_types::Struct>,
}
/// Message for requesting list of `LbTrafficExtension` resources.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ListLbTrafficExtensionsRequest {
    /// Required. The project and location from which the `LbTrafficExtension`
    /// resources are listed. These values are specified in the following format:
    /// `projects/{project}/locations/{location}`.
    #[prost(string, tag = "1")]
    pub parent: ::prost::alloc::string::String,
    /// Optional. Requested page size. The server might return fewer items than
    /// requested. If unspecified, the server picks an appropriate default.
    #[prost(int32, tag = "2")]
    pub page_size: i32,
    /// Optional. A token identifying a page of results that the server returns.
    #[prost(string, tag = "3")]
    pub page_token: ::prost::alloc::string::String,
    /// Optional. Filtering results.
    #[prost(string, tag = "4")]
    pub filter: ::prost::alloc::string::String,
    /// Optional. Hint about how to order the results.
    #[prost(string, tag = "5")]
    pub order_by: ::prost::alloc::string::String,
}
/// Message for response to listing `LbTrafficExtension` resources.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListLbTrafficExtensionsResponse {
    /// The list of `LbTrafficExtension` resources.
    #[prost(message, repeated, tag = "1")]
    pub lb_traffic_extensions: ::prost::alloc::vec::Vec<LbTrafficExtension>,
    /// A token identifying a page of results that the server returns.
    #[prost(string, tag = "2")]
    pub next_page_token: ::prost::alloc::string::String,
    /// Locations that could not be reached.
    #[prost(string, repeated, tag = "3")]
    pub unreachable: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
/// Message for getting a `LbTrafficExtension` resource.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GetLbTrafficExtensionRequest {
    /// Required. A name of the `LbTrafficExtension` resource to get. Must be in
    /// the format
    /// `projects/{project}/locations/{location}/lbTrafficExtensions/{lb_traffic_extension}`.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
}
/// Message for creating a `LbTrafficExtension` resource.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateLbTrafficExtensionRequest {
    /// Required. The parent resource of the `LbTrafficExtension` resource. Must be
    /// in the format `projects/{project}/locations/{location}`.
    #[prost(string, tag = "1")]
    pub parent: ::prost::alloc::string::String,
    /// Required. User-provided ID of the `LbTrafficExtension` resource to be
    /// created.
    #[prost(string, tag = "2")]
    pub lb_traffic_extension_id: ::prost::alloc::string::String,
    /// Required. `LbTrafficExtension` resource to be created.
    #[prost(message, optional, tag = "3")]
    pub lb_traffic_extension: ::core::option::Option<LbTrafficExtension>,
    /// 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).
    #[prost(string, tag = "4")]
    pub request_id: ::prost::alloc::string::String,
}
/// Message for updating a `LbTrafficExtension` resource.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateLbTrafficExtensionRequest {
    /// 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.
    #[prost(message, optional, tag = "1")]
    pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
    /// Required. `LbTrafficExtension` resource being updated.
    #[prost(message, optional, tag = "2")]
    pub lb_traffic_extension: ::core::option::Option<LbTrafficExtension>,
    /// 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).
    #[prost(string, tag = "3")]
    pub request_id: ::prost::alloc::string::String,
}
/// Message for deleting a `LbTrafficExtension` resource.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct DeleteLbTrafficExtensionRequest {
    /// Required. The name of the `LbTrafficExtension` resource to delete. Must be
    /// in the format
    /// `projects/{project}/locations/{location}/lbTrafficExtensions/{lb_traffic_extension}`.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::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).
    #[prost(string, tag = "2")]
    pub request_id: ::prost::alloc::string::String,
}
/// `LbRouteExtension` is a resource that lets you control where traffic is
/// routed to for a given request.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct LbRouteExtension {
    /// Required. Identifier. Name of the `LbRouteExtension` resource in the
    /// following format:
    /// `projects/{project}/locations/{location}/lbRouteExtensions/{lb_route_extension}`.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// Output only. The timestamp when the resource was created.
    #[prost(message, optional, tag = "2")]
    pub create_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Output only. The timestamp when the resource was updated.
    #[prost(message, optional, tag = "3")]
    pub update_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Optional. A human-readable description of the resource.
    #[prost(string, tag = "9")]
    pub description: ::prost::alloc::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.
    #[prost(map = "string, string", tag = "4")]
    pub labels: ::std::collections::HashMap<
        ::prost::alloc::string::String,
        ::prost::alloc::string::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.
    #[prost(string, repeated, tag = "5")]
    pub forwarding_rules: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    /// 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.
    #[prost(message, repeated, tag = "7")]
    pub extension_chains: ::prost::alloc::vec::Vec<ExtensionChain>,
    /// 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>).
    #[prost(enumeration = "LoadBalancingScheme", tag = "8")]
    pub load_balancing_scheme: i32,
    /// 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.<resource_name>`.
    ///
    /// 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.
    #[prost(message, optional, tag = "10")]
    pub metadata: ::core::option::Option<::prost_types::Struct>,
}
/// Message for requesting list of `LbRouteExtension` resources.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ListLbRouteExtensionsRequest {
    /// Required. The project and location from which the `LbRouteExtension`
    /// resources are listed. These values are specified in the following format:
    /// `projects/{project}/locations/{location}`.
    #[prost(string, tag = "1")]
    pub parent: ::prost::alloc::string::String,
    /// Optional. Requested page size. The server might return fewer items than
    /// requested. If unspecified, the server picks an appropriate default.
    #[prost(int32, tag = "2")]
    pub page_size: i32,
    /// Optional. A token identifying a page of results that the server returns.
    #[prost(string, tag = "3")]
    pub page_token: ::prost::alloc::string::String,
    /// Optional. Filtering results.
    #[prost(string, tag = "4")]
    pub filter: ::prost::alloc::string::String,
    /// Optional. Hint about how to order the results.
    #[prost(string, tag = "5")]
    pub order_by: ::prost::alloc::string::String,
}
/// Message for response to listing `LbRouteExtension` resources.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListLbRouteExtensionsResponse {
    /// The list of `LbRouteExtension` resources.
    #[prost(message, repeated, tag = "1")]
    pub lb_route_extensions: ::prost::alloc::vec::Vec<LbRouteExtension>,
    /// A token identifying a page of results that the server returns.
    #[prost(string, tag = "2")]
    pub next_page_token: ::prost::alloc::string::String,
    /// Locations that could not be reached.
    #[prost(string, repeated, tag = "3")]
    pub unreachable: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
/// Message for getting a `LbRouteExtension` resource.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GetLbRouteExtensionRequest {
    /// Required. A name of the `LbRouteExtension` resource to get. Must be in the
    /// format
    /// `projects/{project}/locations/{location}/lbRouteExtensions/{lb_route_extension}`.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
}
/// Message for creating a `LbRouteExtension` resource.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateLbRouteExtensionRequest {
    /// Required. The parent resource of the `LbRouteExtension` resource. Must be
    /// in the format `projects/{project}/locations/{location}`.
    #[prost(string, tag = "1")]
    pub parent: ::prost::alloc::string::String,
    /// Required. User-provided ID of the `LbRouteExtension` resource to be
    /// created.
    #[prost(string, tag = "2")]
    pub lb_route_extension_id: ::prost::alloc::string::String,
    /// Required. `LbRouteExtension` resource to be created.
    #[prost(message, optional, tag = "3")]
    pub lb_route_extension: ::core::option::Option<LbRouteExtension>,
    /// 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).
    #[prost(string, tag = "4")]
    pub request_id: ::prost::alloc::string::String,
}
/// Message for updating a `LbRouteExtension` resource.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateLbRouteExtensionRequest {
    /// 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.
    #[prost(message, optional, tag = "1")]
    pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
    /// Required. `LbRouteExtension` resource being updated.
    #[prost(message, optional, tag = "2")]
    pub lb_route_extension: ::core::option::Option<LbRouteExtension>,
    /// 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).
    #[prost(string, tag = "3")]
    pub request_id: ::prost::alloc::string::String,
}
/// Message for deleting a `LbRouteExtension` resource.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct DeleteLbRouteExtensionRequest {
    /// Required. The name of the `LbRouteExtension` resource to delete. Must be in
    /// the format
    /// `projects/{project}/locations/{location}/lbRouteExtensions/{lb_route_extension}`.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::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).
    #[prost(string, tag = "2")]
    pub request_id: ::prost::alloc::string::String,
}
/// `AuthzExtension` is a resource that allows traffic forwarding
/// to a callout backend service to make an authorization decision.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AuthzExtension {
    /// Required. Identifier. Name of the `AuthzExtension` resource in the
    /// following format:
    /// `projects/{project}/locations/{location}/authzExtensions/{authz_extension}`.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// Output only. The timestamp when the resource was created.
    #[prost(message, optional, tag = "2")]
    pub create_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Output only. The timestamp when the resource was updated.
    #[prost(message, optional, tag = "3")]
    pub update_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Optional. A human-readable description of the resource.
    #[prost(string, tag = "4")]
    pub description: ::prost::alloc::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.
    #[prost(map = "string, string", tag = "5")]
    pub labels: ::std::collections::HashMap<
        ::prost::alloc::string::String,
        ::prost::alloc::string::String,
    >,
    /// 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>).
    #[prost(enumeration = "LoadBalancingScheme", tag = "6")]
    pub load_balancing_scheme: i32,
    /// Required. The `:authority` header in the gRPC request sent from Envoy
    /// to the extension service.
    #[prost(string, tag = "7")]
    pub authority: ::prost::alloc::string::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}`.>
    #[prost(string, tag = "8")]
    pub service: ::prost::alloc::string::String,
    /// Required. Specifies the timeout for each individual message on the stream.
    /// The timeout must be between 10-10000 milliseconds.
    #[prost(message, optional, tag = "9")]
    pub timeout: ::core::option::Option<::prost_types::Duration>,
    /// 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.
    #[prost(bool, tag = "10")]
    pub fail_open: bool,
    /// 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.<resource_name>`.
    /// The following variables are supported in the metadata Struct:
    ///
    /// `{forwarding_rule_id}` - substituted with the forwarding rule's fully
    /// qualified resource name.
    #[prost(message, optional, tag = "11")]
    pub metadata: ::core::option::Option<::prost_types::Struct>,
    /// 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.
    #[prost(string, repeated, tag = "12")]
    pub forward_headers: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    /// Optional. The format of communication supported by the callout extension.
    /// If not specified, the default value `EXT_PROC_GRPC` is used.
    #[prost(enumeration = "WireFormat", tag = "14")]
    pub wire_format: i32,
}
/// Message for requesting list of `AuthzExtension` resources.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ListAuthzExtensionsRequest {
    /// Required. The project and location from which the `AuthzExtension`
    /// resources are listed. These values are specified in the following format:
    /// `projects/{project}/locations/{location}`.
    #[prost(string, tag = "1")]
    pub parent: ::prost::alloc::string::String,
    /// Optional. Requested page size. The server might return fewer items than
    /// requested. If unspecified, the server picks an appropriate default.
    #[prost(int32, tag = "2")]
    pub page_size: i32,
    /// Optional. A token identifying a page of results that the server returns.
    #[prost(string, tag = "3")]
    pub page_token: ::prost::alloc::string::String,
    /// Optional. Filtering results.
    #[prost(string, tag = "4")]
    pub filter: ::prost::alloc::string::String,
    /// Optional. Hint about how to order the results.
    #[prost(string, tag = "5")]
    pub order_by: ::prost::alloc::string::String,
}
/// Message for response to listing `AuthzExtension` resources.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListAuthzExtensionsResponse {
    /// The list of `AuthzExtension` resources.
    #[prost(message, repeated, tag = "1")]
    pub authz_extensions: ::prost::alloc::vec::Vec<AuthzExtension>,
    /// A token identifying a page of results that the server returns.
    #[prost(string, tag = "2")]
    pub next_page_token: ::prost::alloc::string::String,
    /// Locations that could not be reached.
    #[prost(string, repeated, tag = "3")]
    pub unreachable: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
/// Message for getting a `AuthzExtension` resource.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GetAuthzExtensionRequest {
    /// Required. A name of the `AuthzExtension` resource to get. Must be in
    /// the format
    /// `projects/{project}/locations/{location}/authzExtensions/{authz_extension}`.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
}
/// Message for creating a `AuthzExtension` resource.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateAuthzExtensionRequest {
    /// Required. The parent resource of the `AuthzExtension` resource. Must
    /// be in the format `projects/{project}/locations/{location}`.
    #[prost(string, tag = "1")]
    pub parent: ::prost::alloc::string::String,
    /// Required. User-provided ID of the `AuthzExtension` resource to be
    /// created.
    #[prost(string, tag = "2")]
    pub authz_extension_id: ::prost::alloc::string::String,
    /// Required. `AuthzExtension` resource to be created.
    #[prost(message, optional, tag = "3")]
    pub authz_extension: ::core::option::Option<AuthzExtension>,
    /// 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).
    #[prost(string, tag = "4")]
    pub request_id: ::prost::alloc::string::String,
}
/// Message for updating a `AuthzExtension` resource.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateAuthzExtensionRequest {
    /// 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.
    #[prost(message, optional, tag = "1")]
    pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
    /// Required. `AuthzExtension` resource being updated.
    #[prost(message, optional, tag = "2")]
    pub authz_extension: ::core::option::Option<AuthzExtension>,
    /// 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).
    #[prost(string, tag = "3")]
    pub request_id: ::prost::alloc::string::String,
}
/// Message for deleting a `AuthzExtension` resource.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct DeleteAuthzExtensionRequest {
    /// Required. The name of the `AuthzExtension` resource to delete. Must
    /// be in the format
    /// `projects/{project}/locations/{location}/authzExtensions/{authz_extension}`.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::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).
    #[prost(string, tag = "2")]
    pub request_id: ::prost::alloc::string::String,
}
/// The part of the request or response for which the extension is called.
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum EventType {
    /// Unspecified value. Do not use.
    Unspecified = 0,
    /// If included in `supported_events`,
    /// the extension is called when the HTTP request headers arrive.
    RequestHeaders = 1,
    /// If included in `supported_events`,
    /// the extension is called when the HTTP request body arrives.
    RequestBody = 2,
    /// If included in `supported_events`,
    /// the extension is called when the HTTP response headers arrive.
    ResponseHeaders = 3,
    /// If included in `supported_events`,
    /// the extension is called when the HTTP response body arrives.
    ResponseBody = 4,
    /// If included in `supported_events`,
    /// the extension is called when the HTTP request trailers arrives.
    RequestTrailers = 5,
    /// If included in `supported_events`,
    /// the extension is called when the HTTP response trailers arrives.
    ResponseTrailers = 6,
}
impl EventType {
    /// String value of the enum field names used in the ProtoBuf definition.
    ///
    /// The values are not transformed in any way and thus are considered stable
    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
    pub fn as_str_name(&self) -> &'static str {
        match self {
            Self::Unspecified => "EVENT_TYPE_UNSPECIFIED",
            Self::RequestHeaders => "REQUEST_HEADERS",
            Self::RequestBody => "REQUEST_BODY",
            Self::ResponseHeaders => "RESPONSE_HEADERS",
            Self::ResponseBody => "RESPONSE_BODY",
            Self::RequestTrailers => "REQUEST_TRAILERS",
            Self::ResponseTrailers => "RESPONSE_TRAILERS",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "EVENT_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
            "REQUEST_HEADERS" => Some(Self::RequestHeaders),
            "REQUEST_BODY" => Some(Self::RequestBody),
            "RESPONSE_HEADERS" => Some(Self::ResponseHeaders),
            "RESPONSE_BODY" => Some(Self::ResponseBody),
            "REQUEST_TRAILERS" => Some(Self::RequestTrailers),
            "RESPONSE_TRAILERS" => Some(Self::ResponseTrailers),
            _ => None,
        }
    }
}
/// 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>).
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum LoadBalancingScheme {
    /// Default value. Do not use.
    Unspecified = 0,
    /// Signifies that this is used for Internal HTTP(S) Load Balancing.
    InternalManaged = 1,
    /// Signifies that this is used for External Managed HTTP(S) Load
    /// Balancing.
    ExternalManaged = 2,
}
impl LoadBalancingScheme {
    /// String value of the enum field names used in the ProtoBuf definition.
    ///
    /// The values are not transformed in any way and thus are considered stable
    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
    pub fn as_str_name(&self) -> &'static str {
        match self {
            Self::Unspecified => "LOAD_BALANCING_SCHEME_UNSPECIFIED",
            Self::InternalManaged => "INTERNAL_MANAGED",
            Self::ExternalManaged => "EXTERNAL_MANAGED",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "LOAD_BALANCING_SCHEME_UNSPECIFIED" => Some(Self::Unspecified),
            "INTERNAL_MANAGED" => Some(Self::InternalManaged),
            "EXTERNAL_MANAGED" => Some(Self::ExternalManaged),
            _ => None,
        }
    }
}
/// The format of communication supported by the extension.
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum WireFormat {
    /// Not specified.
    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.
    ExtProcGrpc = 1,
}
impl WireFormat {
    /// String value of the enum field names used in the ProtoBuf definition.
    ///
    /// The values are not transformed in any way and thus are considered stable
    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
    pub fn as_str_name(&self) -> &'static str {
        match self {
            Self::Unspecified => "WIRE_FORMAT_UNSPECIFIED",
            Self::ExtProcGrpc => "EXT_PROC_GRPC",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "WIRE_FORMAT_UNSPECIFIED" => Some(Self::Unspecified),
            "EXT_PROC_GRPC" => Some(Self::ExtProcGrpc),
            _ => None,
        }
    }
}
/// Generated client implementations.
pub mod dep_service_client {
    #![allow(
        unused_variables,
        dead_code,
        missing_docs,
        clippy::wildcard_imports,
        clippy::let_unit_value,
    )]
    use tonic::codegen::*;
    use tonic::codegen::http::Uri;
    /// Service describing handlers for resources.
    #[derive(Debug, Clone)]
    pub struct DepServiceClient<T> {
        inner: tonic::client::Grpc<T>,
    }
    impl DepServiceClient<tonic::transport::Channel> {
        /// Attempt to create a new client by connecting to a given endpoint.
        pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
        where
            D: TryInto<tonic::transport::Endpoint>,
            D::Error: Into<StdError>,
        {
            let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
            Ok(Self::new(conn))
        }
    }
    impl<T> DepServiceClient<T>
    where
        T: tonic::client::GrpcService<tonic::body::Body>,
        T::Error: Into<StdError>,
        T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
        <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
    {
        pub fn new(inner: T) -> Self {
            let inner = tonic::client::Grpc::new(inner);
            Self { inner }
        }
        pub fn with_origin(inner: T, origin: Uri) -> Self {
            let inner = tonic::client::Grpc::with_origin(inner, origin);
            Self { inner }
        }
        pub fn with_interceptor<F>(
            inner: T,
            interceptor: F,
        ) -> DepServiceClient<InterceptedService<T, F>>
        where
            F: tonic::service::Interceptor,
            T::ResponseBody: Default,
            T: tonic::codegen::Service<
                http::Request<tonic::body::Body>,
                Response = http::Response<
                    <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
                >,
            >,
            <T as tonic::codegen::Service<
                http::Request<tonic::body::Body>,
            >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
        {
            DepServiceClient::new(InterceptedService::new(inner, interceptor))
        }
        /// Compress requests with the given encoding.
        ///
        /// This requires the server to support it otherwise it might respond with an
        /// error.
        #[must_use]
        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
            self.inner = self.inner.send_compressed(encoding);
            self
        }
        /// Enable decompressing responses.
        #[must_use]
        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
            self.inner = self.inner.accept_compressed(encoding);
            self
        }
        /// Limits the maximum size of a decoded message.
        ///
        /// Default: `4MB`
        #[must_use]
        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
            self.inner = self.inner.max_decoding_message_size(limit);
            self
        }
        /// Limits the maximum size of an encoded message.
        ///
        /// Default: `usize::MAX`
        #[must_use]
        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
            self.inner = self.inner.max_encoding_message_size(limit);
            self
        }
        /// Lists `LbTrafficExtension` resources in a given project and location.
        pub async fn list_lb_traffic_extensions(
            &mut self,
            request: impl tonic::IntoRequest<super::ListLbTrafficExtensionsRequest>,
        ) -> std::result::Result<
            tonic::Response<super::ListLbTrafficExtensionsResponse>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic_prost::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.cloud.networkservices.v1.DepService/ListLbTrafficExtensions",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.networkservices.v1.DepService",
                        "ListLbTrafficExtensions",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Gets details of the specified `LbTrafficExtension` resource.
        pub async fn get_lb_traffic_extension(
            &mut self,
            request: impl tonic::IntoRequest<super::GetLbTrafficExtensionRequest>,
        ) -> std::result::Result<
            tonic::Response<super::LbTrafficExtension>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic_prost::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.cloud.networkservices.v1.DepService/GetLbTrafficExtension",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.networkservices.v1.DepService",
                        "GetLbTrafficExtension",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Creates a new `LbTrafficExtension` resource in a given project and
        /// location.
        pub async fn create_lb_traffic_extension(
            &mut self,
            request: impl tonic::IntoRequest<super::CreateLbTrafficExtensionRequest>,
        ) -> std::result::Result<
            tonic::Response<super::super::super::super::longrunning::Operation>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic_prost::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.cloud.networkservices.v1.DepService/CreateLbTrafficExtension",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.networkservices.v1.DepService",
                        "CreateLbTrafficExtension",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Updates the parameters of the specified `LbTrafficExtension` resource.
        pub async fn update_lb_traffic_extension(
            &mut self,
            request: impl tonic::IntoRequest<super::UpdateLbTrafficExtensionRequest>,
        ) -> std::result::Result<
            tonic::Response<super::super::super::super::longrunning::Operation>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic_prost::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.cloud.networkservices.v1.DepService/UpdateLbTrafficExtension",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.networkservices.v1.DepService",
                        "UpdateLbTrafficExtension",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Deletes the specified `LbTrafficExtension` resource.
        pub async fn delete_lb_traffic_extension(
            &mut self,
            request: impl tonic::IntoRequest<super::DeleteLbTrafficExtensionRequest>,
        ) -> std::result::Result<
            tonic::Response<super::super::super::super::longrunning::Operation>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic_prost::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.cloud.networkservices.v1.DepService/DeleteLbTrafficExtension",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.networkservices.v1.DepService",
                        "DeleteLbTrafficExtension",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Lists `LbRouteExtension` resources in a given project and location.
        pub async fn list_lb_route_extensions(
            &mut self,
            request: impl tonic::IntoRequest<super::ListLbRouteExtensionsRequest>,
        ) -> std::result::Result<
            tonic::Response<super::ListLbRouteExtensionsResponse>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic_prost::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.cloud.networkservices.v1.DepService/ListLbRouteExtensions",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.networkservices.v1.DepService",
                        "ListLbRouteExtensions",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Gets details of the specified `LbRouteExtension` resource.
        pub async fn get_lb_route_extension(
            &mut self,
            request: impl tonic::IntoRequest<super::GetLbRouteExtensionRequest>,
        ) -> std::result::Result<
            tonic::Response<super::LbRouteExtension>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic_prost::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.cloud.networkservices.v1.DepService/GetLbRouteExtension",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.networkservices.v1.DepService",
                        "GetLbRouteExtension",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Creates a new `LbRouteExtension` resource in a given project and location.
        pub async fn create_lb_route_extension(
            &mut self,
            request: impl tonic::IntoRequest<super::CreateLbRouteExtensionRequest>,
        ) -> std::result::Result<
            tonic::Response<super::super::super::super::longrunning::Operation>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic_prost::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.cloud.networkservices.v1.DepService/CreateLbRouteExtension",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.networkservices.v1.DepService",
                        "CreateLbRouteExtension",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Updates the parameters of the specified `LbRouteExtension` resource.
        pub async fn update_lb_route_extension(
            &mut self,
            request: impl tonic::IntoRequest<super::UpdateLbRouteExtensionRequest>,
        ) -> std::result::Result<
            tonic::Response<super::super::super::super::longrunning::Operation>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic_prost::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.cloud.networkservices.v1.DepService/UpdateLbRouteExtension",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.networkservices.v1.DepService",
                        "UpdateLbRouteExtension",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Deletes the specified `LbRouteExtension` resource.
        pub async fn delete_lb_route_extension(
            &mut self,
            request: impl tonic::IntoRequest<super::DeleteLbRouteExtensionRequest>,
        ) -> std::result::Result<
            tonic::Response<super::super::super::super::longrunning::Operation>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic_prost::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.cloud.networkservices.v1.DepService/DeleteLbRouteExtension",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.networkservices.v1.DepService",
                        "DeleteLbRouteExtension",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Lists `AuthzExtension` resources in a given project and location.
        pub async fn list_authz_extensions(
            &mut self,
            request: impl tonic::IntoRequest<super::ListAuthzExtensionsRequest>,
        ) -> std::result::Result<
            tonic::Response<super::ListAuthzExtensionsResponse>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic_prost::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.cloud.networkservices.v1.DepService/ListAuthzExtensions",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.networkservices.v1.DepService",
                        "ListAuthzExtensions",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Gets details of the specified `AuthzExtension` resource.
        pub async fn get_authz_extension(
            &mut self,
            request: impl tonic::IntoRequest<super::GetAuthzExtensionRequest>,
        ) -> std::result::Result<tonic::Response<super::AuthzExtension>, tonic::Status> {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic_prost::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.cloud.networkservices.v1.DepService/GetAuthzExtension",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.networkservices.v1.DepService",
                        "GetAuthzExtension",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Creates a new `AuthzExtension` resource in a given project
        /// and location.
        pub async fn create_authz_extension(
            &mut self,
            request: impl tonic::IntoRequest<super::CreateAuthzExtensionRequest>,
        ) -> std::result::Result<
            tonic::Response<super::super::super::super::longrunning::Operation>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic_prost::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.cloud.networkservices.v1.DepService/CreateAuthzExtension",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.networkservices.v1.DepService",
                        "CreateAuthzExtension",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Updates the parameters of the specified `AuthzExtension`
        /// resource.
        pub async fn update_authz_extension(
            &mut self,
            request: impl tonic::IntoRequest<super::UpdateAuthzExtensionRequest>,
        ) -> std::result::Result<
            tonic::Response<super::super::super::super::longrunning::Operation>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic_prost::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.cloud.networkservices.v1.DepService/UpdateAuthzExtension",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.networkservices.v1.DepService",
                        "UpdateAuthzExtension",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Deletes the specified `AuthzExtension` resource.
        pub async fn delete_authz_extension(
            &mut self,
            request: impl tonic::IntoRequest<super::DeleteAuthzExtensionRequest>,
        ) -> std::result::Result<
            tonic::Response<super::super::super::super::longrunning::Operation>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic_prost::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.cloud.networkservices.v1.DepService/DeleteAuthzExtension",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.networkservices.v1.DepService",
                        "DeleteAuthzExtension",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
    }
}
/// 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.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct EndpointPolicy {
    /// Identifier. Name of the EndpointPolicy resource. It matches pattern
    /// `projects/{project}/locations/global/endpointPolicies/{endpoint_policy}`.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// Output only. The timestamp when the resource was created.
    #[prost(message, optional, tag = "2")]
    pub create_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Output only. The timestamp when the resource was updated.
    #[prost(message, optional, tag = "3")]
    pub update_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Optional. Set of label tags associated with the EndpointPolicy resource.
    #[prost(map = "string, string", tag = "4")]
    pub labels: ::std::collections::HashMap<
        ::prost::alloc::string::String,
        ::prost::alloc::string::String,
    >,
    /// Required. The type of endpoint policy. This is primarily used to validate
    /// the configuration.
    #[prost(enumeration = "endpoint_policy::EndpointPolicyType", tag = "5")]
    pub r#type: i32,
    /// 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.
    #[prost(string, tag = "7")]
    pub authorization_policy: ::prost::alloc::string::String,
    /// Required. A matcher that selects endpoints to which the policies should be
    /// applied.
    #[prost(message, optional, tag = "9")]
    pub endpoint_matcher: ::core::option::Option<EndpointMatcher>,
    /// Optional. Port selector for the (matched) endpoints. If no port selector is
    /// provided, the matched config is applied to all ports.
    #[prost(message, optional, tag = "10")]
    pub traffic_port_selector: ::core::option::Option<TrafficPortSelector>,
    /// Optional. A free-text description of the resource. Max length 1024
    /// characters.
    #[prost(string, tag = "11")]
    pub description: ::prost::alloc::string::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.
    #[prost(string, tag = "12")]
    pub server_tls_policy: ::prost::alloc::string::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.
    #[prost(string, tag = "13")]
    pub client_tls_policy: ::prost::alloc::string::String,
}
/// Nested message and enum types in `EndpointPolicy`.
pub mod endpoint_policy {
    /// The type of endpoint policy.
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum EndpointPolicyType {
        /// Default value. Must not be used.
        Unspecified = 0,
        /// Represents a proxy deployed as a sidecar.
        SidecarProxy = 1,
        /// Represents a proxyless gRPC backend.
        GrpcServer = 2,
    }
    impl EndpointPolicyType {
        /// String value of the enum field names used in the ProtoBuf definition.
        ///
        /// The values are not transformed in any way and thus are considered stable
        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
        pub fn as_str_name(&self) -> &'static str {
            match self {
                Self::Unspecified => "ENDPOINT_POLICY_TYPE_UNSPECIFIED",
                Self::SidecarProxy => "SIDECAR_PROXY",
                Self::GrpcServer => "GRPC_SERVER",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "ENDPOINT_POLICY_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
                "SIDECAR_PROXY" => Some(Self::SidecarProxy),
                "GRPC_SERVER" => Some(Self::GrpcServer),
                _ => None,
            }
        }
    }
}
/// Request used with the ListEndpointPolicies method.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ListEndpointPoliciesRequest {
    /// Required. The project and location from which the EndpointPolicies should
    /// be listed, specified in the format `projects/*/locations/global`.
    #[prost(string, tag = "1")]
    pub parent: ::prost::alloc::string::String,
    /// Maximum number of EndpointPolicies to return per call.
    #[prost(int32, tag = "2")]
    pub page_size: i32,
    /// 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.
    #[prost(string, tag = "3")]
    pub page_token: ::prost::alloc::string::String,
    /// 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.
    #[prost(bool, tag = "4")]
    pub return_partial_success: bool,
}
/// Response returned by the ListEndpointPolicies method.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListEndpointPoliciesResponse {
    /// List of EndpointPolicy resources.
    #[prost(message, repeated, tag = "1")]
    pub endpoint_policies: ::prost::alloc::vec::Vec<EndpointPolicy>,
    /// 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`.
    #[prost(string, tag = "2")]
    pub next_page_token: ::prost::alloc::string::String,
    /// Unreachable resources. Populated when the request opts into
    /// \[return_partial_success\]\[google.cloud.networkservices.v1.ListEndpointPoliciesRequest.return_partial_success\]
    /// and reading across collections e.g. when
    /// attempting to list all resources across all supported locations.
    #[prost(string, repeated, tag = "3")]
    pub unreachable: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
/// Request used with the GetEndpointPolicy method.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GetEndpointPolicyRequest {
    /// Required. A name of the EndpointPolicy to get. Must be in the format
    /// `projects/*/locations/global/endpointPolicies/*`.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
}
/// Request used with the CreateEndpointPolicy method.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateEndpointPolicyRequest {
    /// Required. The parent resource of the EndpointPolicy. Must be in the
    /// format `projects/*/locations/global`.
    #[prost(string, tag = "1")]
    pub parent: ::prost::alloc::string::String,
    /// Required. Short name of the EndpointPolicy resource to be created.
    /// E.g. "CustomECS".
    #[prost(string, tag = "2")]
    pub endpoint_policy_id: ::prost::alloc::string::String,
    /// Required. EndpointPolicy resource to be created.
    #[prost(message, optional, tag = "3")]
    pub endpoint_policy: ::core::option::Option<EndpointPolicy>,
}
/// Request used with the UpdateEndpointPolicy method.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateEndpointPolicyRequest {
    /// 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.
    #[prost(message, optional, tag = "1")]
    pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
    /// Required. Updated EndpointPolicy resource.
    #[prost(message, optional, tag = "2")]
    pub endpoint_policy: ::core::option::Option<EndpointPolicy>,
}
/// Request used with the DeleteEndpointPolicy method.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct DeleteEndpointPolicyRequest {
    /// Required. A name of the EndpointPolicy to delete. Must be in the format
    /// `projects/*/locations/global/endpointPolicies/*`.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
}
/// `WasmPlugin` is a resource representing a service executing
/// a customer-provided Wasm module.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct WasmPlugin {
    /// Identifier. Name of the `WasmPlugin` resource in the following format:
    /// `projects/{project}/locations/{location}/wasmPlugins/{wasm_plugin}`.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// Output only. The timestamp when the resource was created.
    #[prost(message, optional, tag = "2")]
    pub create_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Output only. The timestamp when the resource was updated.
    #[prost(message, optional, tag = "3")]
    pub update_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Optional. A human-readable description of the resource.
    #[prost(string, tag = "4")]
    pub description: ::prost::alloc::string::String,
    /// Optional. Set of labels associated with the `WasmPlugin` resource.
    ///
    /// The format must comply with [the following
    /// requirements](/compute/docs/labeling-resources#requirements).
    #[prost(map = "string, string", tag = "5")]
    pub labels: ::std::collections::HashMap<
        ::prost::alloc::string::String,
        ::prost::alloc::string::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.
    #[prost(string, tag = "6")]
    pub main_version_id: ::prost::alloc::string::String,
    /// 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.
    #[prost(message, optional, tag = "9")]
    pub log_config: ::core::option::Option<wasm_plugin::LogConfig>,
    /// 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`.
    #[prost(map = "string, message", tag = "10")]
    pub versions: ::std::collections::HashMap<
        ::prost::alloc::string::String,
        wasm_plugin::VersionDetails,
    >,
    /// Output only. List of all
    /// [extensions](<https://cloud.google.com/service-extensions/docs/overview>)
    /// that use this `WasmPlugin` resource.
    #[prost(message, repeated, tag = "11")]
    pub used_by: ::prost::alloc::vec::Vec<wasm_plugin::UsedBy>,
}
/// Nested message and enum types in `WasmPlugin`.
pub mod wasm_plugin {
    /// Details of a `WasmPluginVersion` resource to be inlined in the
    /// `WasmPlugin` resource.
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct VersionDetails {
        /// Output only. The timestamp when the resource was created.
        #[prost(message, optional, tag = "1")]
        pub create_time: ::core::option::Option<::prost_types::Timestamp>,
        /// Output only. The timestamp when the resource was updated.
        #[prost(message, optional, tag = "2")]
        pub update_time: ::core::option::Option<::prost_types::Timestamp>,
        /// Optional. A human-readable description of the resource.
        #[prost(string, tag = "3")]
        pub description: ::prost::alloc::string::String,
        /// Optional. Set of labels associated with the `WasmPluginVersion`
        /// resource.
        #[prost(map = "string, string", tag = "4")]
        pub labels: ::std::collections::HashMap<
            ::prost::alloc::string::String,
            ::prost::alloc::string::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.
        #[prost(string, tag = "5")]
        pub image_uri: ::prost::alloc::string::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.
        #[prost(string, tag = "6")]
        pub image_digest: ::prost::alloc::string::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_uri` field.
        #[prost(string, tag = "11")]
        pub plugin_config_digest: ::prost::alloc::string::String,
        #[prost(oneof = "version_details::PluginConfigSource", tags = "9, 10")]
        pub plugin_config_source: ::core::option::Option<
            version_details::PluginConfigSource,
        >,
    }
    /// Nested message and enum types in `VersionDetails`.
    pub mod version_details {
        #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
        pub enum PluginConfigSource {
            /// 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.
            #[prost(bytes, tag = "9")]
            PluginConfigData(::prost::alloc::vec::Vec<u8>),
            /// 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.
            #[prost(string, tag = "10")]
            PluginConfigUri(::prost::alloc::string::String),
        }
    }
    /// Specifies the logging options for the activity performed by this
    /// plugin. If logging is enabled, plugin logs are exported to
    /// Cloud Logging.
    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
    pub struct LogConfig {
        /// Optional. Specifies whether to enable logging for activity by this
        /// plugin.
        ///
        /// Defaults to `false`.
        #[prost(bool, tag = "1")]
        pub enable: bool,
        /// 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.
        #[prost(float, tag = "2")]
        pub sample_rate: f32,
        /// 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.
        ///
        /// 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.
        #[prost(enumeration = "log_config::LogLevel", tag = "3")]
        pub min_log_level: i32,
    }
    /// Nested message and enum types in `LogConfig`.
    pub mod log_config {
        /// Possible values to specify the lowest level of logs to be exported to
        /// Cloud Logging.
        #[derive(
            Clone,
            Copy,
            Debug,
            PartialEq,
            Eq,
            Hash,
            PartialOrd,
            Ord,
            ::prost::Enumeration
        )]
        #[repr(i32)]
        pub enum LogLevel {
            /// Unspecified value. Defaults to `LogLevel.INFO`.
            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,
        }
        impl LogLevel {
            /// String value of the enum field names used in the ProtoBuf definition.
            ///
            /// The values are not transformed in any way and thus are considered stable
            /// (if the ProtoBuf definition does not change) and safe for programmatic use.
            pub fn as_str_name(&self) -> &'static str {
                match self {
                    Self::Unspecified => "LOG_LEVEL_UNSPECIFIED",
                    Self::Trace => "TRACE",
                    Self::Debug => "DEBUG",
                    Self::Info => "INFO",
                    Self::Warn => "WARN",
                    Self::Error => "ERROR",
                    Self::Critical => "CRITICAL",
                }
            }
            /// Creates an enum from field names used in the ProtoBuf definition.
            pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
                match value {
                    "LOG_LEVEL_UNSPECIFIED" => Some(Self::Unspecified),
                    "TRACE" => Some(Self::Trace),
                    "DEBUG" => Some(Self::Debug),
                    "INFO" => Some(Self::Info),
                    "WARN" => Some(Self::Warn),
                    "ERROR" => Some(Self::Error),
                    "CRITICAL" => Some(Self::Critical),
                    _ => None,
                }
            }
        }
    }
    /// Defines a resource that uses the `WasmPlugin` resource.
    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
    pub struct UsedBy {
        /// 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}`
        #[prost(string, tag = "1")]
        pub name: ::prost::alloc::string::String,
    }
}
/// A single immutable version of a `WasmPlugin` resource.
/// Defines the Wasm module used and optionally its runtime config.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct WasmPluginVersion {
    /// Identifier. Name of the `WasmPluginVersion` resource in the following
    /// format: `projects/{project}/locations/{location}/wasmPlugins/{wasm_plugin}/  versions/{wasm_plugin_version}`.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// Output only. The timestamp when the resource was created.
    #[prost(message, optional, tag = "3")]
    pub create_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Output only. The timestamp when the resource was updated.
    #[prost(message, optional, tag = "4")]
    pub update_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Optional. A human-readable description of the resource.
    #[prost(string, tag = "5")]
    pub description: ::prost::alloc::string::String,
    /// Optional. Set of labels associated with the `WasmPluginVersion`
    /// resource.
    #[prost(map = "string, string", tag = "6")]
    pub labels: ::std::collections::HashMap<
        ::prost::alloc::string::String,
        ::prost::alloc::string::String,
    >,
    /// Optional. URI of the container image containing the plugin, stored in the
    /// 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.
    #[prost(string, tag = "8")]
    pub image_uri: ::prost::alloc::string::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.
    #[prost(string, tag = "9")]
    pub image_digest: ::prost::alloc::string::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.
    #[prost(string, tag = "14")]
    pub plugin_config_digest: ::prost::alloc::string::String,
    #[prost(oneof = "wasm_plugin_version::PluginConfigSource", tags = "12, 13")]
    pub plugin_config_source: ::core::option::Option<
        wasm_plugin_version::PluginConfigSource,
    >,
}
/// Nested message and enum types in `WasmPluginVersion`.
pub mod wasm_plugin_version {
    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
    pub enum PluginConfigSource {
        /// 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.
        #[prost(bytes, tag = "12")]
        PluginConfigData(::prost::alloc::vec::Vec<u8>),
        /// 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.
        #[prost(string, tag = "13")]
        PluginConfigUri(::prost::alloc::string::String),
    }
}
/// Request used with the `ListWasmPlugins` method.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ListWasmPluginsRequest {
    /// Required. The project and location from which the `WasmPlugin` resources
    /// are listed, specified in the following format:
    /// `projects/{project}/locations/global`.
    #[prost(string, tag = "1")]
    pub parent: ::prost::alloc::string::String,
    /// 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.
    #[prost(int32, tag = "2")]
    pub page_size: i32,
    /// 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.
    #[prost(string, tag = "3")]
    pub page_token: ::prost::alloc::string::String,
}
/// Response returned by the `ListWasmPlugins` method.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListWasmPluginsResponse {
    /// List of `WasmPlugin` resources.
    #[prost(message, repeated, tag = "1")]
    pub wasm_plugins: ::prost::alloc::vec::Vec<WasmPlugin>,
    /// 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`.
    #[prost(string, tag = "2")]
    pub next_page_token: ::prost::alloc::string::String,
    /// Unreachable resources. Populated when the request attempts to list all
    /// resources across all supported locations, while some locations are
    /// temporarily unavailable.
    #[prost(string, repeated, tag = "3")]
    pub unreachable: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
/// Request used by the `GetWasmPlugin` method.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GetWasmPluginRequest {
    /// Required. A name of the `WasmPlugin` resource to get. Must be in the
    /// format `projects/{project}/locations/global/wasmPlugins/{wasm_plugin}`.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// Determines how much data must be returned in the response. See
    /// [AIP-157](<https://google.aip.dev/157>).
    #[prost(enumeration = "WasmPluginView", tag = "2")]
    pub view: i32,
}
/// Request used by the `CreateWasmPlugin` method.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateWasmPluginRequest {
    /// Required. The parent resource of the `WasmPlugin` resource. Must be in the
    /// format `projects/{project}/locations/global`.
    #[prost(string, tag = "1")]
    pub parent: ::prost::alloc::string::String,
    /// Required. User-provided ID of the `WasmPlugin` resource to be created.
    #[prost(string, tag = "2")]
    pub wasm_plugin_id: ::prost::alloc::string::String,
    /// Required. `WasmPlugin` resource to be created.
    #[prost(message, optional, tag = "3")]
    pub wasm_plugin: ::core::option::Option<WasmPlugin>,
}
/// Request used by the `UpdateWasmPlugin` method.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateWasmPluginRequest {
    /// 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.
    #[prost(message, optional, tag = "1")]
    pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
    /// Required. Updated `WasmPlugin` resource.
    #[prost(message, optional, tag = "2")]
    pub wasm_plugin: ::core::option::Option<WasmPlugin>,
}
/// Request used by the `DeleteWasmPlugin` method.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct DeleteWasmPluginRequest {
    /// Required. A name of the `WasmPlugin` resource to delete. Must be in the
    /// format `projects/{project}/locations/global/wasmPlugins/{wasm_plugin}`.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
}
/// Request used with the `ListWasmPluginVersions` method.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ListWasmPluginVersionsRequest {
    /// Required. The `WasmPlugin` resource whose `WasmPluginVersion`s
    /// are listed, specified in the following format:
    /// `projects/{project}/locations/global/wasmPlugins/{wasm_plugin}`.
    #[prost(string, tag = "1")]
    pub parent: ::prost::alloc::string::String,
    /// 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.
    #[prost(int32, tag = "2")]
    pub page_size: i32,
    /// 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.
    #[prost(string, tag = "3")]
    pub page_token: ::prost::alloc::string::String,
}
/// Response returned by the `ListWasmPluginVersions` method.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListWasmPluginVersionsResponse {
    /// List of `WasmPluginVersion` resources.
    #[prost(message, repeated, tag = "1")]
    pub wasm_plugin_versions: ::prost::alloc::vec::Vec<WasmPluginVersion>,
    /// 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`.
    #[prost(string, tag = "2")]
    pub next_page_token: ::prost::alloc::string::String,
    /// Unreachable resources. Populated when the request attempts to list all
    /// resources across all supported locations, while some locations are
    /// temporarily unavailable.
    #[prost(string, repeated, tag = "3")]
    pub unreachable: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
/// Request used by the `GetWasmPluginVersion` method.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GetWasmPluginVersionRequest {
    /// 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}`.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
}
/// Request used by the `CreateWasmPluginVersion` method.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateWasmPluginVersionRequest {
    /// Required. The parent resource of the `WasmPluginVersion` resource. Must be
    /// in the format
    /// `projects/{project}/locations/global/wasmPlugins/{wasm_plugin}`.
    #[prost(string, tag = "1")]
    pub parent: ::prost::alloc::string::String,
    /// Required. User-provided ID of the `WasmPluginVersion` resource to be
    /// created.
    #[prost(string, tag = "2")]
    pub wasm_plugin_version_id: ::prost::alloc::string::String,
    /// Required. `WasmPluginVersion` resource to be created.
    #[prost(message, optional, tag = "3")]
    pub wasm_plugin_version: ::core::option::Option<WasmPluginVersion>,
}
/// Request used by the `DeleteWasmPluginVersion` method.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct DeleteWasmPluginVersionRequest {
    /// 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}`.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
}
/// Determines the information that should be returned by the server.
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum WasmPluginView {
    /// Unspecified value. Do not use.
    Unspecified = 0,
    /// If specified in the `GET` request for a `WasmPlugin` resource, the server's
    /// response includes just the `WasmPlugin` resource.
    Basic = 1,
    /// If specified in the `GET` request for a `WasmPlugin` resource, the server's
    /// response includes the `WasmPlugin` resource with all its versions.
    Full = 2,
}
impl WasmPluginView {
    /// String value of the enum field names used in the ProtoBuf definition.
    ///
    /// The values are not transformed in any way and thus are considered stable
    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
    pub fn as_str_name(&self) -> &'static str {
        match self {
            Self::Unspecified => "WASM_PLUGIN_VIEW_UNSPECIFIED",
            Self::Basic => "WASM_PLUGIN_VIEW_BASIC",
            Self::Full => "WASM_PLUGIN_VIEW_FULL",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "WASM_PLUGIN_VIEW_UNSPECIFIED" => Some(Self::Unspecified),
            "WASM_PLUGIN_VIEW_BASIC" => Some(Self::Basic),
            "WASM_PLUGIN_VIEW_FULL" => Some(Self::Full),
            _ => None,
        }
    }
}
/// 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.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Gateway {
    /// Identifier. Name of the Gateway resource. It matches pattern
    /// `projects/*/locations/*/gateways/<gateway_name>`.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// Output only. Server-defined URL of this resource
    #[prost(string, tag = "13")]
    pub self_link: ::prost::alloc::string::String,
    /// Output only. The timestamp when the resource was created.
    #[prost(message, optional, tag = "2")]
    pub create_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Output only. The timestamp when the resource was updated.
    #[prost(message, optional, tag = "3")]
    pub update_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Optional. Set of label tags associated with the Gateway resource.
    #[prost(map = "string, string", tag = "4")]
    pub labels: ::std::collections::HashMap<
        ::prost::alloc::string::String,
        ::prost::alloc::string::String,
    >,
    /// Optional. A free-text description of the resource. Max length 1024
    /// characters.
    #[prost(string, tag = "5")]
    pub description: ::prost::alloc::string::String,
    /// Immutable. The type of the customer managed gateway.
    /// This field is required. If unspecified, an error is returned.
    #[prost(enumeration = "gateway::Type", tag = "6")]
    pub r#type: i32,
    /// 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.
    #[prost(string, repeated, tag = "7")]
    pub addresses: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    /// 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 'OPEN_MESH' listen on 0.0.0.0 for IPv4 and :: for IPv6 and
    /// support multiple ports.
    #[prost(int32, repeated, packed = "false", tag = "11")]
    pub ports: ::prost::alloc::vec::Vec<i32>,
    /// 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.
    #[prost(string, tag = "8")]
    pub scope: ::prost::alloc::string::String,
    /// Optional. A fully-qualified ServerTLSPolicy URL reference. Specifies how
    /// TLS traffic is terminated. If empty, TLS termination is disabled.
    #[prost(string, tag = "9")]
    pub server_tls_policy: ::prost::alloc::string::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'.
    #[prost(string, repeated, tag = "14")]
    pub certificate_urls: ::prost::alloc::vec::Vec<::prost::alloc::string::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'.
    #[prost(string, tag = "18")]
    pub gateway_security_policy: ::prost::alloc::string::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'.
    #[prost(string, tag = "16")]
    pub network: ::prost::alloc::string::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".
    #[prost(string, tag = "17")]
    pub subnetwork: ::prost::alloc::string::String,
    /// Optional. The IP Version that will be used by this gateway. Valid options
    /// are IPV4 or IPV6. Default is IPV4.
    #[prost(enumeration = "gateway::IpVersion", tag = "21")]
    pub ip_version: i32,
    /// 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.
    #[prost(enumeration = "EnvoyHeaders", optional, tag = "28")]
    pub envoy_headers: ::core::option::Option<i32>,
    /// 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.
    #[prost(enumeration = "gateway::RoutingMode", tag = "32")]
    pub routing_mode: i32,
}
/// Nested message and enum types in `Gateway`.
pub mod gateway {
    /// The type of the customer-managed gateway.
    /// Possible values are:
    ///
    /// * OPEN_MESH
    /// * SECURE_WEB_GATEWAY
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum Type {
        /// The type of the customer managed gateway is unspecified.
        Unspecified = 0,
        /// The type of the customer managed gateway is TrafficDirector Open
        /// Mesh.
        OpenMesh = 1,
        /// The type of the customer managed gateway is SecureWebGateway (SWG).
        SecureWebGateway = 2,
    }
    impl Type {
        /// String value of the enum field names used in the ProtoBuf definition.
        ///
        /// The values are not transformed in any way and thus are considered stable
        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
        pub fn as_str_name(&self) -> &'static str {
            match self {
                Self::Unspecified => "TYPE_UNSPECIFIED",
                Self::OpenMesh => "OPEN_MESH",
                Self::SecureWebGateway => "SECURE_WEB_GATEWAY",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "TYPE_UNSPECIFIED" => Some(Self::Unspecified),
                "OPEN_MESH" => Some(Self::OpenMesh),
                "SECURE_WEB_GATEWAY" => Some(Self::SecureWebGateway),
                _ => None,
            }
        }
    }
    /// The types of IP version for the gateway.
    /// Possible values are:
    ///
    /// * IPV4
    /// * IPV6
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum IpVersion {
        /// The type when IP version is not specified. Defaults to IPV4.
        Unspecified = 0,
        /// The type for IP version 4.
        Ipv4 = 1,
        /// The type for IP version 6.
        Ipv6 = 2,
    }
    impl IpVersion {
        /// String value of the enum field names used in the ProtoBuf definition.
        ///
        /// The values are not transformed in any way and thus are considered stable
        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
        pub fn as_str_name(&self) -> &'static str {
            match self {
                Self::Unspecified => "IP_VERSION_UNSPECIFIED",
                Self::Ipv4 => "IPV4",
                Self::Ipv6 => "IPV6",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "IP_VERSION_UNSPECIFIED" => Some(Self::Unspecified),
                "IPV4" => Some(Self::Ipv4),
                "IPV6" => Some(Self::Ipv6),
                _ => None,
            }
        }
    }
    /// 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
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum RoutingMode {
        /// The routing mode is explicit; clients are configured to send
        /// traffic through the gateway. This is the default routing mode.
        ExplicitRoutingMode = 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.
        NextHopRoutingMode = 1,
    }
    impl RoutingMode {
        /// String value of the enum field names used in the ProtoBuf definition.
        ///
        /// The values are not transformed in any way and thus are considered stable
        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
        pub fn as_str_name(&self) -> &'static str {
            match self {
                Self::ExplicitRoutingMode => "EXPLICIT_ROUTING_MODE",
                Self::NextHopRoutingMode => "NEXT_HOP_ROUTING_MODE",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "EXPLICIT_ROUTING_MODE" => Some(Self::ExplicitRoutingMode),
                "NEXT_HOP_ROUTING_MODE" => Some(Self::NextHopRoutingMode),
                _ => None,
            }
        }
    }
}
/// Request used with the ListGateways method.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ListGatewaysRequest {
    /// Required. The project and location from which the Gateways should be
    /// listed, specified in the format `projects/*/locations/*`.
    #[prost(string, tag = "1")]
    pub parent: ::prost::alloc::string::String,
    /// Maximum number of Gateways to return per call.
    #[prost(int32, tag = "2")]
    pub page_size: i32,
    /// 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.
    #[prost(string, tag = "3")]
    pub page_token: ::prost::alloc::string::String,
}
/// Response returned by the ListGateways method.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListGatewaysResponse {
    /// List of Gateway resources.
    #[prost(message, repeated, tag = "1")]
    pub gateways: ::prost::alloc::vec::Vec<Gateway>,
    /// 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`.
    #[prost(string, tag = "2")]
    pub next_page_token: ::prost::alloc::string::String,
    /// Locations that could not be reached.
    #[prost(string, repeated, tag = "3")]
    pub unreachable: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
/// Request used by the GetGateway method.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GetGatewayRequest {
    /// Required. A name of the Gateway to get. Must be in the format
    /// `projects/*/locations/*/gateways/*`.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
}
/// Request used by the CreateGateway method.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateGatewayRequest {
    /// Required. The parent resource of the Gateway. Must be in the
    /// format `projects/*/locations/*`.
    #[prost(string, tag = "1")]
    pub parent: ::prost::alloc::string::String,
    /// Required. Short name of the Gateway resource to be created.
    #[prost(string, tag = "2")]
    pub gateway_id: ::prost::alloc::string::String,
    /// Required. Gateway resource to be created.
    #[prost(message, optional, tag = "3")]
    pub gateway: ::core::option::Option<Gateway>,
}
/// Request used by the UpdateGateway method.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateGatewayRequest {
    /// 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.
    #[prost(message, optional, tag = "1")]
    pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
    /// Required. Updated Gateway resource.
    #[prost(message, optional, tag = "2")]
    pub gateway: ::core::option::Option<Gateway>,
}
/// Request used by the DeleteGateway method.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct DeleteGatewayRequest {
    /// Required. A name of the Gateway to delete. Must be in the format
    /// `projects/*/locations/*/gateways/*`.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
}
/// GrpcRoute is the resource defining how gRPC traffic routed by a Mesh
/// or Gateway resource is routed.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GrpcRoute {
    /// Identifier. Name of the GrpcRoute resource. It matches pattern
    /// `projects/*/locations/global/grpcRoutes/<grpc_route_name>`
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// Output only. Server-defined URL of this resource
    #[prost(string, tag = "12")]
    pub self_link: ::prost::alloc::string::String,
    /// Output only. The timestamp when the resource was created.
    #[prost(message, optional, tag = "2")]
    pub create_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Output only. The timestamp when the resource was updated.
    #[prost(message, optional, tag = "3")]
    pub update_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Optional. Set of label tags associated with the GrpcRoute resource.
    #[prost(map = "string, string", tag = "4")]
    pub labels: ::std::collections::HashMap<
        ::prost::alloc::string::String,
        ::prost::alloc::string::String,
    >,
    /// Optional. A free-text description of the resource. Max length 1024
    /// characters.
    #[prost(string, tag = "5")]
    pub description: ::prost::alloc::string::String,
    /// Required. Service hostnames with an optional port for which this route
    /// describes traffic.
    ///
    /// Format: <hostname>\[:<port>\]
    ///
    /// 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").
    #[prost(string, repeated, tag = "6")]
    pub hostnames: ::prost::alloc::vec::Vec<::prost::alloc::string::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/global/meshes/<mesh_name>`
    #[prost(string, repeated, tag = "9")]
    pub meshes: ::prost::alloc::vec::Vec<::prost::alloc::string::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/global/gateways/<gateway_name>`
    #[prost(string, repeated, tag = "10")]
    pub gateways: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    /// 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.
    #[prost(message, repeated, tag = "7")]
    pub rules: ::prost::alloc::vec::Vec<grpc_route::RouteRule>,
}
/// Nested message and enum types in `GrpcRoute`.
pub mod grpc_route {
    /// Specifies a match against a method.
    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
    pub struct MethodMatch {
        /// Optional. Specifies how to match against the name. If not specified, a
        /// default value of "EXACT" is used.
        #[prost(enumeration = "method_match::Type", tag = "1")]
        pub r#type: i32,
        /// Required. Name of the service to match against. If unspecified, will
        /// match all services.
        #[prost(string, tag = "2")]
        pub grpc_service: ::prost::alloc::string::String,
        /// Required. Name of the method to match against. If unspecified, will match
        /// all methods.
        #[prost(string, tag = "3")]
        pub grpc_method: ::prost::alloc::string::String,
        /// Optional. Specifies that matches are case sensitive.  The default value
        /// is true. case_sensitive must not be used with a type of
        /// REGULAR_EXPRESSION.
        #[prost(bool, optional, tag = "4")]
        pub case_sensitive: ::core::option::Option<bool>,
    }
    /// Nested message and enum types in `MethodMatch`.
    pub mod method_match {
        /// The type of the match.
        #[derive(
            Clone,
            Copy,
            Debug,
            PartialEq,
            Eq,
            Hash,
            PartialOrd,
            Ord,
            ::prost::Enumeration
        )]
        #[repr(i32)]
        pub enum Type {
            /// Unspecified.
            Unspecified = 0,
            /// Will only match the exact name provided.
            Exact = 1,
            /// Will interpret grpc_method and grpc_service as regexes. RE2 syntax is
            /// supported.
            RegularExpression = 2,
        }
        impl Type {
            /// String value of the enum field names used in the ProtoBuf definition.
            ///
            /// The values are not transformed in any way and thus are considered stable
            /// (if the ProtoBuf definition does not change) and safe for programmatic use.
            pub fn as_str_name(&self) -> &'static str {
                match self {
                    Self::Unspecified => "TYPE_UNSPECIFIED",
                    Self::Exact => "EXACT",
                    Self::RegularExpression => "REGULAR_EXPRESSION",
                }
            }
            /// Creates an enum from field names used in the ProtoBuf definition.
            pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
                match value {
                    "TYPE_UNSPECIFIED" => Some(Self::Unspecified),
                    "EXACT" => Some(Self::Exact),
                    "REGULAR_EXPRESSION" => Some(Self::RegularExpression),
                    _ => None,
                }
            }
        }
    }
    /// A match against a collection of headers.
    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
    pub struct HeaderMatch {
        /// Optional. Specifies how to match against the value of the header. If not
        /// specified, a default value of EXACT is used.
        #[prost(enumeration = "header_match::Type", tag = "1")]
        pub r#type: i32,
        /// Required. The key of the header.
        #[prost(string, tag = "2")]
        pub key: ::prost::alloc::string::String,
        /// Required. The value of the header.
        #[prost(string, tag = "3")]
        pub value: ::prost::alloc::string::String,
    }
    /// Nested message and enum types in `HeaderMatch`.
    pub mod header_match {
        /// The type of match.
        #[derive(
            Clone,
            Copy,
            Debug,
            PartialEq,
            Eq,
            Hash,
            PartialOrd,
            Ord,
            ::prost::Enumeration
        )]
        #[repr(i32)]
        pub enum Type {
            /// Unspecified.
            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.
            RegularExpression = 2,
        }
        impl Type {
            /// String value of the enum field names used in the ProtoBuf definition.
            ///
            /// The values are not transformed in any way and thus are considered stable
            /// (if the ProtoBuf definition does not change) and safe for programmatic use.
            pub fn as_str_name(&self) -> &'static str {
                match self {
                    Self::Unspecified => "TYPE_UNSPECIFIED",
                    Self::Exact => "EXACT",
                    Self::RegularExpression => "REGULAR_EXPRESSION",
                }
            }
            /// Creates an enum from field names used in the ProtoBuf definition.
            pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
                match value {
                    "TYPE_UNSPECIFIED" => Some(Self::Unspecified),
                    "EXACT" => Some(Self::Exact),
                    "REGULAR_EXPRESSION" => Some(Self::RegularExpression),
                    _ => None,
                }
            }
        }
    }
    /// Criteria for matching traffic. A RouteMatch will be considered to match
    /// when all supplied fields match.
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct RouteMatch {
        /// Optional. A gRPC method to match against. If this field is empty or
        /// omitted, will match all methods.
        #[prost(message, optional, tag = "1")]
        pub method: ::core::option::Option<MethodMatch>,
        /// Optional. Specifies a collection of headers to match.
        #[prost(message, repeated, tag = "2")]
        pub headers: ::prost::alloc::vec::Vec<HeaderMatch>,
    }
    /// The destination to which traffic will be routed.
    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
    pub struct Destination {
        /// 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.
        #[prost(int32, optional, tag = "2")]
        pub weight: ::core::option::Option<i32>,
        /// Specifies the kind of destination to which traffic will be routed.
        #[prost(oneof = "destination::DestinationType", tags = "1")]
        pub destination_type: ::core::option::Option<destination::DestinationType>,
    }
    /// Nested message and enum types in `Destination`.
    pub mod destination {
        /// Specifies the kind of destination to which traffic will be routed.
        #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
        pub enum DestinationType {
            /// Required. The URL of a destination service to which to route traffic.
            /// Must refer to either a BackendService or ServiceDirectoryService.
            #[prost(string, tag = "1")]
            ServiceName(::prost::alloc::string::String),
        }
    }
    /// 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.
    #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
    pub struct FaultInjectionPolicy {
        /// The specification for injecting delay to client requests.
        #[prost(message, optional, tag = "1")]
        pub delay: ::core::option::Option<fault_injection_policy::Delay>,
        /// The specification for aborting to client requests.
        #[prost(message, optional, tag = "2")]
        pub abort: ::core::option::Option<fault_injection_policy::Abort>,
    }
    /// Nested message and enum types in `FaultInjectionPolicy`.
    pub mod fault_injection_policy {
        /// Specification of how client requests are delayed as part of fault
        /// injection before being sent to a destination.
        #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
        pub struct Delay {
            /// Specify a fixed delay before forwarding the request.
            #[prost(message, optional, tag = "1")]
            pub fixed_delay: ::core::option::Option<::prost_types::Duration>,
            /// The percentage of traffic on which delay will be injected.
            ///
            /// The value must be between \[0, 100\]
            #[prost(int32, optional, tag = "2")]
            pub percentage: ::core::option::Option<i32>,
        }
        /// Specification of how client requests are aborted as part of fault
        /// injection before being sent to a destination.
        #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
        pub struct Abort {
            /// The HTTP status code used to abort the request.
            ///
            /// The value must be between 200 and 599 inclusive.
            #[prost(int32, optional, tag = "1")]
            pub http_status: ::core::option::Option<i32>,
            /// The percentage of traffic which will be aborted.
            ///
            /// The value must be between \[0, 100\]
            #[prost(int32, optional, tag = "2")]
            pub percentage: ::core::option::Option<i32>,
        }
    }
    /// 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.
    #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
    pub struct StatefulSessionAffinityPolicy {
        /// 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.
        #[prost(message, optional, tag = "1")]
        pub cookie_ttl: ::core::option::Option<::prost_types::Duration>,
    }
    /// The specifications for retries.
    /// Specifies one or more conditions for which this retry rule applies. Valid
    /// values are:
    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
    pub struct RetryPolicy {
        /// * 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
        #[prost(string, repeated, tag = "1")]
        pub retry_conditions: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
        /// Specifies the allowed number of retries. This number must be > 0. If not
        /// specified, default to 1.
        #[prost(uint32, tag = "2")]
        pub num_retries: u32,
    }
    /// Specifies how to route matched traffic.
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct RouteAction {
        /// 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.
        #[prost(message, repeated, tag = "1")]
        pub destinations: ::prost::alloc::vec::Vec<Destination>,
        /// 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
        #[prost(message, optional, tag = "3")]
        pub fault_injection_policy: ::core::option::Option<FaultInjectionPolicy>,
        /// 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.
        #[prost(message, optional, tag = "7")]
        pub timeout: ::core::option::Option<::prost_types::Duration>,
        /// Optional. Specifies the retry policy associated with this route.
        #[prost(message, optional, tag = "8")]
        pub retry_policy: ::core::option::Option<RetryPolicy>,
        /// Optional. Specifies cookie-based stateful session affinity.
        #[prost(message, optional, tag = "11")]
        pub stateful_session_affinity: ::core::option::Option<
            StatefulSessionAffinityPolicy,
        >,
        /// 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.
        #[prost(message, optional, tag = "12")]
        pub idle_timeout: ::core::option::Option<::prost_types::Duration>,
    }
    /// Describes how to route traffic.
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct RouteRule {
        /// 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.
        #[prost(message, repeated, tag = "1")]
        pub matches: ::prost::alloc::vec::Vec<RouteMatch>,
        /// Required. A detailed rule defining how to route traffic. This field is
        /// required.
        #[prost(message, optional, tag = "2")]
        pub action: ::core::option::Option<RouteAction>,
    }
}
/// Request used with the ListGrpcRoutes method.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ListGrpcRoutesRequest {
    /// Required. The project and location from which the GrpcRoutes should be
    /// listed, specified in the format `projects/*/locations/global`.
    #[prost(string, tag = "1")]
    pub parent: ::prost::alloc::string::String,
    /// Maximum number of GrpcRoutes to return per call.
    #[prost(int32, tag = "2")]
    pub page_size: i32,
    /// 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.
    #[prost(string, tag = "3")]
    pub page_token: ::prost::alloc::string::String,
    /// 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.
    #[prost(bool, tag = "4")]
    pub return_partial_success: bool,
}
/// Response returned by the ListGrpcRoutes method.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListGrpcRoutesResponse {
    /// List of GrpcRoute resources.
    #[prost(message, repeated, tag = "1")]
    pub grpc_routes: ::prost::alloc::vec::Vec<GrpcRoute>,
    /// 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`.
    #[prost(string, tag = "2")]
    pub next_page_token: ::prost::alloc::string::String,
    /// Unreachable resources. Populated when the request opts into
    /// \[return_partial_success\]\[google.cloud.networkservices.v1.ListGrpcRoutesRequest.return_partial_success\]
    /// and reading across collections e.g. when attempting to list all resources
    /// across all supported locations.
    #[prost(string, repeated, tag = "3")]
    pub unreachable: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
/// Request used by the GetGrpcRoute method.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GetGrpcRouteRequest {
    /// Required. A name of the GrpcRoute to get. Must be in the format
    /// `projects/*/locations/global/grpcRoutes/*`.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
}
/// Request used by the CreateGrpcRoute method.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateGrpcRouteRequest {
    /// Required. The parent resource of the GrpcRoute. Must be in the
    /// format `projects/*/locations/global`.
    #[prost(string, tag = "1")]
    pub parent: ::prost::alloc::string::String,
    /// Required. Short name of the GrpcRoute resource to be created.
    #[prost(string, tag = "2")]
    pub grpc_route_id: ::prost::alloc::string::String,
    /// Required. GrpcRoute resource to be created.
    #[prost(message, optional, tag = "3")]
    pub grpc_route: ::core::option::Option<GrpcRoute>,
}
/// Request used by the UpdateGrpcRoute method.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateGrpcRouteRequest {
    /// 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.
    #[prost(message, optional, tag = "1")]
    pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
    /// Required. Updated GrpcRoute resource.
    #[prost(message, optional, tag = "2")]
    pub grpc_route: ::core::option::Option<GrpcRoute>,
}
/// Request used by the DeleteGrpcRoute method.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct DeleteGrpcRouteRequest {
    /// Required. A name of the GrpcRoute to delete. Must be in the format
    /// `projects/*/locations/global/grpcRoutes/*`.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
}
/// HttpRoute is the resource defining how HTTP traffic should be routed by a
/// Mesh or Gateway resource.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct HttpRoute {
    /// Identifier. Name of the HttpRoute resource. It matches pattern
    /// `projects/*/locations/global/httpRoutes/http_route_name>`.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// Output only. Server-defined URL of this resource
    #[prost(string, tag = "11")]
    pub self_link: ::prost::alloc::string::String,
    /// Optional. A free-text description of the resource. Max length 1024
    /// characters.
    #[prost(string, tag = "2")]
    pub description: ::prost::alloc::string::String,
    /// Output only. The timestamp when the resource was created.
    #[prost(message, optional, tag = "3")]
    pub create_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Output only. The timestamp when the resource was updated.
    #[prost(message, optional, tag = "4")]
    pub update_time: ::core::option::Option<::prost_types::Timestamp>,
    /// 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`.
    #[prost(string, repeated, tag = "5")]
    pub hostnames: ::prost::alloc::vec::Vec<::prost::alloc::string::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/global/meshes/<mesh_name>`
    ///
    /// The attached Mesh should be of a type SIDECAR
    #[prost(string, repeated, tag = "8")]
    pub meshes: ::prost::alloc::vec::Vec<::prost::alloc::string::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/global/gateways/<gateway_name>`
    #[prost(string, repeated, tag = "9")]
    pub gateways: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    /// Optional. Set of label tags associated with the HttpRoute resource.
    #[prost(map = "string, string", tag = "10")]
    pub labels: ::std::collections::HashMap<
        ::prost::alloc::string::String,
        ::prost::alloc::string::String,
    >,
    /// Required. Rules that define how traffic is routed and handled.
    /// Rules will be matched sequentially based on the RouteMatch specified for
    /// the rule.
    #[prost(message, repeated, tag = "6")]
    pub rules: ::prost::alloc::vec::Vec<http_route::RouteRule>,
}
/// Nested message and enum types in `HttpRoute`.
pub mod http_route {
    /// Specifies how to select a route rule based on HTTP request headers.
    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
    pub struct HeaderMatch {
        /// The name of the HTTP header to match against.
        #[prost(string, tag = "1")]
        pub header: ::prost::alloc::string::String,
        /// If specified, the match result will be inverted before checking. Default
        /// value is set to false.
        #[prost(bool, tag = "8")]
        pub invert_match: bool,
        #[prost(oneof = "header_match::MatchType", tags = "2, 3, 4, 5, 6, 7")]
        pub match_type: ::core::option::Option<header_match::MatchType>,
    }
    /// Nested message and enum types in `HeaderMatch`.
    pub mod header_match {
        /// Represents an integer value range.
        #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
        pub struct IntegerRange {
            /// Start of the range (inclusive)
            #[prost(int32, tag = "1")]
            pub start: i32,
            /// End of the range (exclusive)
            #[prost(int32, tag = "2")]
            pub end: i32,
        }
        #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
        pub enum MatchType {
            /// The value of the header should match exactly the content of
            /// exact_match.
            #[prost(string, tag = "2")]
            ExactMatch(::prost::alloc::string::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>
            #[prost(string, tag = "3")]
            RegexMatch(::prost::alloc::string::String),
            /// The value of the header must start with the contents of prefix_match.
            #[prost(string, tag = "4")]
            PrefixMatch(::prost::alloc::string::String),
            /// A header with header_name must exist. The match takes place whether or
            /// not the header has a value.
            #[prost(bool, tag = "5")]
            PresentMatch(bool),
            /// The value of the header must end with the contents of suffix_match.
            #[prost(string, tag = "6")]
            SuffixMatch(::prost::alloc::string::String),
            /// If specified, the rule will match if the request header value is within
            /// the range.
            #[prost(message, tag = "7")]
            RangeMatch(IntegerRange),
        }
    }
    /// Specifications to match a query parameter in the request.
    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
    pub struct QueryParameterMatch {
        /// The name of the query parameter to match.
        #[prost(string, tag = "1")]
        pub query_parameter: ::prost::alloc::string::String,
        #[prost(oneof = "query_parameter_match::MatchType", tags = "2, 3, 4")]
        pub match_type: ::core::option::Option<query_parameter_match::MatchType>,
    }
    /// Nested message and enum types in `QueryParameterMatch`.
    pub mod query_parameter_match {
        #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
        pub enum MatchType {
            /// 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.
            #[prost(string, tag = "2")]
            ExactMatch(::prost::alloc::string::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.
            #[prost(string, tag = "3")]
            RegexMatch(::prost::alloc::string::String),
            /// 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.
            #[prost(bool, tag = "4")]
            PresentMatch(bool),
        }
    }
    /// RouteMatch defines specifications used to match requests. If multiple match
    /// types are set, this RouteMatch will match if ALL type of matches are
    /// matched.
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct RouteMatch {
        /// Specifies if prefix_match and full_path_match matches are case sensitive.
        /// The default value is false.
        #[prost(bool, tag = "4")]
        pub ignore_case: bool,
        /// Specifies a list of HTTP request headers to match against. ALL of the
        /// supplied headers must be matched.
        #[prost(message, repeated, tag = "5")]
        pub headers: ::prost::alloc::vec::Vec<HeaderMatch>,
        /// Specifies a list of query parameters to match against. ALL of the query
        /// parameters must be matched.
        #[prost(message, repeated, tag = "6")]
        pub query_parameters: ::prost::alloc::vec::Vec<QueryParameterMatch>,
        #[prost(oneof = "route_match::PathMatch", tags = "1, 2, 3")]
        pub path_match: ::core::option::Option<route_match::PathMatch>,
    }
    /// Nested message and enum types in `RouteMatch`.
    pub mod route_match {
        #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
        pub enum PathMatch {
            /// The HTTP request path value should exactly match this value.
            ///
            /// Only one of full_path_match, prefix_match, or regex_match should be
            /// used.
            #[prost(string, tag = "1")]
            FullPathMatch(::prost::alloc::string::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.
            #[prost(string, tag = "2")]
            PrefixMatch(::prost::alloc::string::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.
            #[prost(string, tag = "3")]
            RegexMatch(::prost::alloc::string::String),
        }
    }
    /// Specifications of a destination to which the request should be routed to.
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct Destination {
        /// The URL of a BackendService to route traffic to.
        #[prost(string, tag = "1")]
        pub service_name: ::prost::alloc::string::String,
        /// 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.
        #[prost(int32, tag = "2")]
        pub weight: i32,
        /// 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.
        #[prost(message, optional, tag = "3")]
        pub request_header_modifier: ::core::option::Option<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.
        #[prost(message, optional, tag = "4")]
        pub response_header_modifier: ::core::option::Option<HeaderModifier>,
    }
    /// The specification for redirecting traffic.
    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
    pub struct Redirect {
        /// The host that will be used in the redirect response instead of the one
        /// that was supplied in the request.
        #[prost(string, tag = "1")]
        pub host_redirect: ::prost::alloc::string::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.
        #[prost(string, tag = "2")]
        pub path_redirect: ::prost::alloc::string::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.
        #[prost(string, tag = "3")]
        pub prefix_rewrite: ::prost::alloc::string::String,
        /// The HTTP Status code to use for the redirect.
        #[prost(enumeration = "redirect::ResponseCode", tag = "4")]
        pub response_code: i32,
        /// 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.
        #[prost(bool, tag = "5")]
        pub https_redirect: bool,
        /// 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.
        #[prost(bool, tag = "6")]
        pub strip_query: bool,
        /// The port that will be used in the redirected request instead of the one
        /// that was supplied in the request.
        #[prost(int32, tag = "7")]
        pub port_redirect: i32,
    }
    /// Nested message and enum types in `Redirect`.
    pub mod redirect {
        /// Supported HTTP response code.
        #[derive(
            Clone,
            Copy,
            Debug,
            PartialEq,
            Eq,
            Hash,
            PartialOrd,
            Ord,
            ::prost::Enumeration
        )]
        #[repr(i32)]
        pub enum ResponseCode {
            /// Default value
            Unspecified = 0,
            /// Corresponds to 301.
            MovedPermanentlyDefault = 1,
            /// Corresponds to 302.
            Found = 2,
            /// Corresponds to 303.
            SeeOther = 3,
            /// Corresponds to 307. In this case, the request method will be retained.
            TemporaryRedirect = 4,
            /// Corresponds to 308. In this case, the request method will be retained.
            PermanentRedirect = 5,
        }
        impl ResponseCode {
            /// String value of the enum field names used in the ProtoBuf definition.
            ///
            /// The values are not transformed in any way and thus are considered stable
            /// (if the ProtoBuf definition does not change) and safe for programmatic use.
            pub fn as_str_name(&self) -> &'static str {
                match self {
                    Self::Unspecified => "RESPONSE_CODE_UNSPECIFIED",
                    Self::MovedPermanentlyDefault => "MOVED_PERMANENTLY_DEFAULT",
                    Self::Found => "FOUND",
                    Self::SeeOther => "SEE_OTHER",
                    Self::TemporaryRedirect => "TEMPORARY_REDIRECT",
                    Self::PermanentRedirect => "PERMANENT_REDIRECT",
                }
            }
            /// Creates an enum from field names used in the ProtoBuf definition.
            pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
                match value {
                    "RESPONSE_CODE_UNSPECIFIED" => Some(Self::Unspecified),
                    "MOVED_PERMANENTLY_DEFAULT" => Some(Self::MovedPermanentlyDefault),
                    "FOUND" => Some(Self::Found),
                    "SEE_OTHER" => Some(Self::SeeOther),
                    "TEMPORARY_REDIRECT" => Some(Self::TemporaryRedirect),
                    "PERMANENT_REDIRECT" => Some(Self::PermanentRedirect),
                    _ => None,
                }
            }
        }
    }
    /// 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.
    #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
    pub struct FaultInjectionPolicy {
        /// The specification for injecting delay to client requests.
        #[prost(message, optional, tag = "1")]
        pub delay: ::core::option::Option<fault_injection_policy::Delay>,
        /// The specification for aborting to client requests.
        #[prost(message, optional, tag = "2")]
        pub abort: ::core::option::Option<fault_injection_policy::Abort>,
    }
    /// Nested message and enum types in `FaultInjectionPolicy`.
    pub mod fault_injection_policy {
        /// Specification of how client requests are delayed as part of fault
        /// injection before being sent to a destination.
        #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
        pub struct Delay {
            /// Specify a fixed delay before forwarding the request.
            #[prost(message, optional, tag = "1")]
            pub fixed_delay: ::core::option::Option<::prost_types::Duration>,
            /// The percentage of traffic on which delay will be injected.
            ///
            /// The value must be between \[0, 100\]
            #[prost(int32, tag = "2")]
            pub percentage: i32,
        }
        /// Specification of how client requests are aborted as part of fault
        /// injection before being sent to a destination.
        #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
        pub struct Abort {
            /// The HTTP status code used to abort the request.
            ///
            /// The value must be between 200 and 599 inclusive.
            #[prost(int32, tag = "1")]
            pub http_status: i32,
            /// The percentage of traffic which will be aborted.
            ///
            /// The value must be between \[0, 100\]
            #[prost(int32, tag = "2")]
            pub percentage: i32,
        }
    }
    /// 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.
    #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
    pub struct StatefulSessionAffinityPolicy {
        /// 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.
        #[prost(message, optional, tag = "1")]
        pub cookie_ttl: ::core::option::Option<::prost_types::Duration>,
    }
    /// The specification for modifying HTTP header in HTTP request and HTTP
    /// response.
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct HeaderModifier {
        /// Completely overwrite/replace the headers with given map where key is the
        /// name of the header, value is the value of the header.
        #[prost(map = "string, string", tag = "1")]
        pub set: ::std::collections::HashMap<
            ::prost::alloc::string::String,
            ::prost::alloc::string::String,
        >,
        /// Add the headers with given map where key is the name of the header, value
        /// is the value of the header.
        #[prost(map = "string, string", tag = "2")]
        pub add: ::std::collections::HashMap<
            ::prost::alloc::string::String,
            ::prost::alloc::string::String,
        >,
        /// Remove headers (matching by header names) specified in the list.
        #[prost(string, repeated, tag = "3")]
        pub remove: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    }
    /// The specification for modifying the URL of the request, prior to forwarding
    /// the request to the destination.
    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
    pub struct UrlRewrite {
        /// Prior to forwarding the request to the selected destination, the matching
        /// portion of the requests path is replaced by this value.
        #[prost(string, tag = "1")]
        pub path_prefix_rewrite: ::prost::alloc::string::String,
        /// Prior to forwarding the request to the selected destination, the requests
        /// host header is replaced by this value.
        #[prost(string, tag = "2")]
        pub host_rewrite: ::prost::alloc::string::String,
    }
    /// The specifications for retries.
    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
    pub struct RetryPolicy {
        /// 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.
        #[prost(string, repeated, tag = "1")]
        pub retry_conditions: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
        /// Specifies the allowed number of retries. This number must be > 0. If not
        /// specified, default to 1.
        #[prost(int32, tag = "2")]
        pub num_retries: i32,
        /// Specifies a non-zero timeout per retry attempt.
        #[prost(message, optional, tag = "3")]
        pub per_try_timeout: ::core::option::Option<::prost_types::Duration>,
    }
    /// 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.
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct RequestMirrorPolicy {
        /// The destination the requests will be mirrored to. The weight of the
        /// destination will be ignored.
        #[prost(message, optional, tag = "1")]
        pub destination: ::core::option::Option<Destination>,
        /// Optional. The percentage of requests to get mirrored to the desired
        /// destination.
        #[prost(float, tag = "2")]
        pub mirror_percent: f32,
    }
    /// The Specification for allowing client side cross-origin requests.
    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
    pub struct CorsPolicy {
        /// 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.
        #[prost(string, repeated, tag = "1")]
        pub allow_origins: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
        /// Specifies the regular expression patterns that match allowed origins. For
        /// regular expression grammar, please see
        /// <https://github.com/google/re2/wiki/Syntax.>
        #[prost(string, repeated, tag = "2")]
        pub allow_origin_regexes: ::prost::alloc::vec::Vec<
            ::prost::alloc::string::String,
        >,
        /// Specifies the content for Access-Control-Allow-Methods header.
        #[prost(string, repeated, tag = "3")]
        pub allow_methods: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
        /// Specifies the content for Access-Control-Allow-Headers header.
        #[prost(string, repeated, tag = "4")]
        pub allow_headers: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
        /// Specifies the content for Access-Control-Expose-Headers header.
        #[prost(string, repeated, tag = "5")]
        pub expose_headers: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
        /// Specifies how long result of a preflight request can be cached in
        /// seconds. This translates to the Access-Control-Max-Age header.
        #[prost(string, tag = "6")]
        pub max_age: ::prost::alloc::string::String,
        /// 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.
        #[prost(bool, tag = "7")]
        pub allow_credentials: bool,
        /// If true, the CORS policy is disabled. The default value is false, which
        /// indicates that the CORS policy is in effect.
        #[prost(bool, tag = "8")]
        pub disabled: bool,
    }
    /// Static HTTP response object to be returned.
    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
    pub struct HttpDirectResponse {
        /// Required. Status to return as part of HTTP Response. Must be a positive
        /// integer.
        #[prost(int32, tag = "1")]
        pub status: i32,
        /// Body to return as part of HTTP Response.
        #[prost(oneof = "http_direct_response::HttpBody", tags = "2, 3")]
        pub http_body: ::core::option::Option<http_direct_response::HttpBody>,
    }
    /// Nested message and enum types in `HttpDirectResponse`.
    pub mod http_direct_response {
        /// Body to return as part of HTTP Response.
        #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
        pub enum HttpBody {
            /// Optional. Response body as a string. Maximum body length is 1024
            /// characters.
            #[prost(string, tag = "2")]
            StringBody(::prost::alloc::string::String),
            /// Optional. Response body as bytes. Maximum body size is 4096B.
            #[prost(bytes, tag = "3")]
            BytesBody(::prost::alloc::vec::Vec<u8>),
        }
    }
    /// The specifications for routing traffic and applying associated policies.
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct RouteAction {
        /// The destination to which traffic should be forwarded.
        #[prost(message, repeated, tag = "1")]
        pub destinations: ::prost::alloc::vec::Vec<Destination>,
        /// If set, the request is directed as configured by this field.
        #[prost(message, optional, tag = "2")]
        pub redirect: ::core::option::Option<Redirect>,
        /// 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
        #[prost(message, optional, tag = "4")]
        pub fault_injection_policy: ::core::option::Option<FaultInjectionPolicy>,
        /// 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.
        #[prost(message, optional, tag = "5")]
        pub request_header_modifier: ::core::option::Option<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.
        #[prost(message, optional, tag = "6")]
        pub response_header_modifier: ::core::option::Option<HeaderModifier>,
        /// The specification for rewrite URL before forwarding requests to the
        /// destination.
        #[prost(message, optional, tag = "7")]
        pub url_rewrite: ::core::option::Option<UrlRewrite>,
        /// 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.
        #[prost(message, optional, tag = "8")]
        pub timeout: ::core::option::Option<::prost_types::Duration>,
        /// Specifies the retry policy associated with this route.
        #[prost(message, optional, tag = "9")]
        pub retry_policy: ::core::option::Option<RetryPolicy>,
        /// 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.
        #[prost(message, optional, tag = "10")]
        pub request_mirror_policy: ::core::option::Option<RequestMirrorPolicy>,
        /// The specification for allowing client side cross-origin requests.
        #[prost(message, optional, tag = "11")]
        pub cors_policy: ::core::option::Option<CorsPolicy>,
        /// Optional. Specifies cookie-based stateful session affinity.
        #[prost(message, optional, tag = "12")]
        pub stateful_session_affinity: ::core::option::Option<
            StatefulSessionAffinityPolicy,
        >,
        /// Optional. Static HTTP Response object to be returned regardless of the
        /// request.
        #[prost(message, optional, tag = "13")]
        pub direct_response: ::core::option::Option<HttpDirectResponse>,
        /// 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.
        #[prost(message, optional, tag = "14")]
        pub idle_timeout: ::core::option::Option<::prost_types::Duration>,
    }
    /// Specifies how to match traffic and how to route traffic when traffic is
    /// matched.
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct RouteRule {
        /// 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.
        #[prost(message, repeated, tag = "1")]
        pub matches: ::prost::alloc::vec::Vec<RouteMatch>,
        /// The detailed rule defining how to route matched traffic.
        #[prost(message, optional, tag = "2")]
        pub action: ::core::option::Option<RouteAction>,
    }
}
/// Request used with the ListHttpRoutes method.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ListHttpRoutesRequest {
    /// Required. The project and location from which the HttpRoutes should be
    /// listed, specified in the format `projects/*/locations/global`.
    #[prost(string, tag = "1")]
    pub parent: ::prost::alloc::string::String,
    /// Maximum number of HttpRoutes to return per call.
    #[prost(int32, tag = "2")]
    pub page_size: i32,
    /// 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.
    #[prost(string, tag = "3")]
    pub page_token: ::prost::alloc::string::String,
    /// 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.
    #[prost(bool, tag = "4")]
    pub return_partial_success: bool,
}
/// Response returned by the ListHttpRoutes method.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListHttpRoutesResponse {
    /// List of HttpRoute resources.
    #[prost(message, repeated, tag = "1")]
    pub http_routes: ::prost::alloc::vec::Vec<HttpRoute>,
    /// 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`.
    #[prost(string, tag = "2")]
    pub next_page_token: ::prost::alloc::string::String,
    /// Unreachable resources. Populated when the request opts into
    /// \[return_partial_success\]\[google.cloud.networkservices.v1.ListHttpRoutesRequest.return_partial_success\]
    /// and reading across collections e.g. when attempting to list all resources
    /// across all supported locations.
    #[prost(string, repeated, tag = "3")]
    pub unreachable: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
/// Request used by the GetHttpRoute method.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GetHttpRouteRequest {
    /// Required. A name of the HttpRoute to get. Must be in the format
    /// `projects/*/locations/global/httpRoutes/*`.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
}
/// Request used by the HttpRoute method.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateHttpRouteRequest {
    /// Required. The parent resource of the HttpRoute. Must be in the
    /// format `projects/*/locations/global`.
    #[prost(string, tag = "1")]
    pub parent: ::prost::alloc::string::String,
    /// Required. Short name of the HttpRoute resource to be created.
    #[prost(string, tag = "2")]
    pub http_route_id: ::prost::alloc::string::String,
    /// Required. HttpRoute resource to be created.
    #[prost(message, optional, tag = "3")]
    pub http_route: ::core::option::Option<HttpRoute>,
}
/// Request used by the UpdateHttpRoute method.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateHttpRouteRequest {
    /// 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.
    #[prost(message, optional, tag = "1")]
    pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
    /// Required. Updated HttpRoute resource.
    #[prost(message, optional, tag = "2")]
    pub http_route: ::core::option::Option<HttpRoute>,
}
/// Request used by the DeleteHttpRoute method.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct DeleteHttpRouteRequest {
    /// Required. A name of the HttpRoute to delete. Must be in the format
    /// `projects/*/locations/global/httpRoutes/*`.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
}
/// 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.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Mesh {
    /// Identifier. Name of the Mesh resource. It matches pattern
    /// `projects/*/locations/global/meshes/<mesh_name>`.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// Output only. Server-defined URL of this resource
    #[prost(string, tag = "9")]
    pub self_link: ::prost::alloc::string::String,
    /// Output only. The timestamp when the resource was created.
    #[prost(message, optional, tag = "2")]
    pub create_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Output only. The timestamp when the resource was updated.
    #[prost(message, optional, tag = "3")]
    pub update_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Optional. Set of label tags associated with the Mesh resource.
    #[prost(map = "string, string", tag = "4")]
    pub labels: ::std::collections::HashMap<
        ::prost::alloc::string::String,
        ::prost::alloc::string::String,
    >,
    /// Optional. A free-text description of the resource. Max length 1024
    /// characters.
    #[prost(string, tag = "5")]
    pub description: ::prost::alloc::string::String,
    /// 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.
    #[prost(int32, tag = "8")]
    pub interception_port: i32,
    /// 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.
    #[prost(enumeration = "EnvoyHeaders", optional, tag = "16")]
    pub envoy_headers: ::core::option::Option<i32>,
}
/// Request used with the ListMeshes method.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ListMeshesRequest {
    /// Required. The project and location from which the Meshes should be
    /// listed, specified in the format `projects/*/locations/global`.
    #[prost(string, tag = "1")]
    pub parent: ::prost::alloc::string::String,
    /// Maximum number of Meshes to return per call.
    #[prost(int32, tag = "2")]
    pub page_size: i32,
    /// 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.
    #[prost(string, tag = "3")]
    pub page_token: ::prost::alloc::string::String,
    /// 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.
    #[prost(bool, tag = "4")]
    pub return_partial_success: bool,
}
/// Response returned by the ListMeshes method.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListMeshesResponse {
    /// List of Mesh resources.
    #[prost(message, repeated, tag = "1")]
    pub meshes: ::prost::alloc::vec::Vec<Mesh>,
    /// 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`.
    #[prost(string, tag = "2")]
    pub next_page_token: ::prost::alloc::string::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.
    #[prost(string, repeated, tag = "3")]
    pub unreachable: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
/// Request used by the GetMesh method.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GetMeshRequest {
    /// Required. A name of the Mesh to get. Must be in the format
    /// `projects/*/locations/global/meshes/*`.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
}
/// Request used by the CreateMesh method.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateMeshRequest {
    /// Required. The parent resource of the Mesh. Must be in the
    /// format `projects/*/locations/global`.
    #[prost(string, tag = "1")]
    pub parent: ::prost::alloc::string::String,
    /// Required. Short name of the Mesh resource to be created.
    #[prost(string, tag = "2")]
    pub mesh_id: ::prost::alloc::string::String,
    /// Required. Mesh resource to be created.
    #[prost(message, optional, tag = "3")]
    pub mesh: ::core::option::Option<Mesh>,
}
/// Request used by the UpdateMesh method.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateMeshRequest {
    /// 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.
    #[prost(message, optional, tag = "1")]
    pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
    /// Required. Updated Mesh resource.
    #[prost(message, optional, tag = "2")]
    pub mesh: ::core::option::Option<Mesh>,
}
/// Request used by the DeleteMesh method.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct DeleteMeshRequest {
    /// Required. A name of the Mesh to delete. Must be in the format
    /// `projects/*/locations/global/meshes/*`.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
}
/// GatewayRouteView defines view-only resource for Routes to a Gateway
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GatewayRouteView {
    /// Output only. Identifier. Full path name of the GatewayRouteView resource.
    /// Format:
    /// projects/{project_number}/locations/{location}/gateways/{gateway}/routeViews/{route_view}
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// Output only. Project number where the route exists.
    #[prost(int64, tag = "2")]
    pub route_project_number: i64,
    /// Output only. Location where the route exists.
    #[prost(string, tag = "3")]
    pub route_location: ::prost::alloc::string::String,
    /// Output only. Type of the route: HttpRoute,GrpcRoute,TcpRoute, or TlsRoute
    #[prost(string, tag = "4")]
    pub route_type: ::prost::alloc::string::String,
    /// Output only. The resource id for the route.
    #[prost(string, tag = "5")]
    pub route_id: ::prost::alloc::string::String,
}
/// MeshRouteView defines view-only resource for Routes to a Mesh
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct MeshRouteView {
    /// Output only. Identifier. Full path name of the MeshRouteView resource.
    /// Format:
    /// projects/{project}/locations/{location}/meshes/{mesh}/routeViews/{route_view}
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// Output only. Project number where the route exists.
    #[prost(int64, tag = "2")]
    pub route_project_number: i64,
    /// Output only. Location where the route exists.
    #[prost(string, tag = "3")]
    pub route_location: ::prost::alloc::string::String,
    /// Output only. Type of the route: HttpRoute,GrpcRoute,TcpRoute, or TlsRoute
    #[prost(string, tag = "4")]
    pub route_type: ::prost::alloc::string::String,
    /// Output only. The resource id for the route.
    #[prost(string, tag = "5")]
    pub route_id: ::prost::alloc::string::String,
}
/// Request used with the GetGatewayRouteView method.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GetGatewayRouteViewRequest {
    /// Required. Name of the GatewayRouteView resource.
    /// Formats:
    /// projects/{project}/locations/{location}/gateways/{gateway}/routeViews/{route_view}
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
}
/// Request used with the GetMeshRouteView method.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GetMeshRouteViewRequest {
    /// Required. Name of the MeshRouteView resource.
    /// Format:
    /// projects/{project}/locations/{location}/meshes/{mesh}/routeViews/{route_view}
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
}
/// Request used with the ListGatewayRouteViews method.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ListGatewayRouteViewsRequest {
    /// Required. The Gateway to which a Route is associated.
    /// Formats:
    /// projects/{project}/locations/{location}/gateways/{gateway}
    #[prost(string, tag = "1")]
    pub parent: ::prost::alloc::string::String,
    /// Maximum number of GatewayRouteViews to return per call.
    #[prost(int32, tag = "2")]
    pub page_size: i32,
    /// 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.
    #[prost(string, tag = "3")]
    pub page_token: ::prost::alloc::string::String,
}
/// Request used with the ListMeshRouteViews method.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ListMeshRouteViewsRequest {
    /// Required. The Mesh to which a Route is associated.
    /// Format:
    /// projects/{project}/locations/{location}/meshes/{mesh}
    #[prost(string, tag = "1")]
    pub parent: ::prost::alloc::string::String,
    /// Maximum number of MeshRouteViews to return per call.
    #[prost(int32, tag = "2")]
    pub page_size: i32,
    /// 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.
    #[prost(string, tag = "3")]
    pub page_token: ::prost::alloc::string::String,
}
/// Response returned by the ListGatewayRouteViews method.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListGatewayRouteViewsResponse {
    /// List of GatewayRouteView resources.
    #[prost(message, repeated, tag = "1")]
    pub gateway_route_views: ::prost::alloc::vec::Vec<GatewayRouteView>,
    /// A token, which can be sent as `page_token` to retrieve the next page.
    /// If this field is omitted, there are no subsequent pages.
    #[prost(string, tag = "2")]
    pub next_page_token: ::prost::alloc::string::String,
    /// Unreachable resources. Populated when the request attempts to list all
    /// resources across all supported locations, while some locations are
    /// temporarily unavailable.
    #[prost(string, repeated, tag = "3")]
    pub unreachable: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
/// Response returned by the ListMeshRouteViews method.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListMeshRouteViewsResponse {
    /// List of MeshRouteView resources.
    #[prost(message, repeated, tag = "1")]
    pub mesh_route_views: ::prost::alloc::vec::Vec<MeshRouteView>,
    /// A token, which can be sent as `page_token` to retrieve the next page.
    /// If this field is omitted, there are no subsequent pages.
    #[prost(string, tag = "2")]
    pub next_page_token: ::prost::alloc::string::String,
    /// Unreachable resources. Populated when the request attempts to list all
    /// resources across all supported locations, while some locations are
    /// temporarily unavailable.
    #[prost(string, repeated, tag = "3")]
    pub unreachable: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
/// 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.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ServiceBinding {
    /// Identifier. Name of the ServiceBinding resource. It matches pattern
    /// `projects/*/locations/*/serviceBindings/<service_binding_name>`.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// Optional. A free-text description of the resource. Max length 1024
    /// characters.
    #[prost(string, tag = "2")]
    pub description: ::prost::alloc::string::String,
    /// Output only. The timestamp when the resource was created.
    #[prost(message, optional, tag = "3")]
    pub create_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Output only. The timestamp when the resource was updated.
    #[prost(message, optional, tag = "4")]
    pub update_time: ::core::option::Option<::prost_types::Timestamp>,
    /// 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.
    #[deprecated]
    #[prost(string, tag = "5")]
    pub service: ::prost::alloc::string::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.
    #[deprecated]
    #[prost(string, tag = "8")]
    pub service_id: ::prost::alloc::string::String,
    /// Optional. Set of label tags associated with the ServiceBinding resource.
    #[prost(map = "string, string", tag = "7")]
    pub labels: ::std::collections::HashMap<
        ::prost::alloc::string::String,
        ::prost::alloc::string::String,
    >,
}
/// Request used with the ListServiceBindings method.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ListServiceBindingsRequest {
    /// Required. The project and location from which the ServiceBindings should be
    /// listed, specified in the format `projects/*/locations/*`.
    #[prost(string, tag = "1")]
    pub parent: ::prost::alloc::string::String,
    /// Maximum number of ServiceBindings to return per call.
    #[prost(int32, tag = "2")]
    pub page_size: i32,
    /// 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.
    #[prost(string, tag = "3")]
    pub page_token: ::prost::alloc::string::String,
}
/// Response returned by the ListServiceBindings method.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListServiceBindingsResponse {
    /// List of ServiceBinding resources.
    #[prost(message, repeated, tag = "1")]
    pub service_bindings: ::prost::alloc::vec::Vec<ServiceBinding>,
    /// 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`.
    #[prost(string, tag = "2")]
    pub next_page_token: ::prost::alloc::string::String,
    /// Unreachable resources. Populated when the request attempts to list all
    /// resources across all supported locations, while some locations are
    /// temporarily unavailable.
    #[prost(string, repeated, tag = "3")]
    pub unreachable: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
/// Request used by the GetServiceBinding method.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GetServiceBindingRequest {
    /// Required. A name of the ServiceBinding to get. Must be in the format
    /// `projects/*/locations/*/serviceBindings/*`.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
}
/// Request used by the ServiceBinding method.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateServiceBindingRequest {
    /// Required. The parent resource of the ServiceBinding. Must be in the
    /// format `projects/*/locations/*`.
    #[prost(string, tag = "1")]
    pub parent: ::prost::alloc::string::String,
    /// Required. Short name of the ServiceBinding resource to be created.
    #[prost(string, tag = "2")]
    pub service_binding_id: ::prost::alloc::string::String,
    /// Required. ServiceBinding resource to be created.
    #[prost(message, optional, tag = "3")]
    pub service_binding: ::core::option::Option<ServiceBinding>,
}
/// Request used by the UpdateServiceBinding method.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateServiceBindingRequest {
    /// 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.
    #[prost(message, optional, tag = "1")]
    pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
    /// Required. Updated ServiceBinding resource.
    #[prost(message, optional, tag = "2")]
    pub service_binding: ::core::option::Option<ServiceBinding>,
}
/// Request used by the DeleteServiceBinding method.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct DeleteServiceBindingRequest {
    /// Required. A name of the ServiceBinding to delete. Must be in the format
    /// `projects/*/locations/*/serviceBindings/*`.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
}
/// ServiceLbPolicy holds global load balancing and traffic distribution
/// configuration that can be applied to a BackendService.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ServiceLbPolicy {
    /// Identifier. Name of the ServiceLbPolicy resource. It matches pattern
    /// `projects/{project}/locations/{location}/serviceLbPolicies/{service_lb_policy_name}`.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// Output only. The timestamp when this resource was created.
    #[prost(message, optional, tag = "2")]
    pub create_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Output only. The timestamp when this resource was last updated.
    #[prost(message, optional, tag = "3")]
    pub update_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Optional. Set of label tags associated with the ServiceLbPolicy resource.
    #[prost(map = "string, string", tag = "4")]
    pub labels: ::std::collections::HashMap<
        ::prost::alloc::string::String,
        ::prost::alloc::string::String,
    >,
    /// Optional. A free-text description of the resource. Max length 1024
    /// characters.
    #[prost(string, tag = "5")]
    pub description: ::prost::alloc::string::String,
    /// Optional. The type of load balancing algorithm to be used. The default
    /// behavior is WATERFALL_BY_REGION.
    #[prost(enumeration = "service_lb_policy::LoadBalancingAlgorithm", tag = "6")]
    pub load_balancing_algorithm: i32,
    /// Optional. Configuration to automatically move traffic away for unhealthy
    /// IG/NEG for the associated Backend Service.
    #[prost(message, optional, tag = "8")]
    pub auto_capacity_drain: ::core::option::Option<
        service_lb_policy::AutoCapacityDrain,
    >,
    /// Optional. Configuration related to health based failover.
    #[prost(message, optional, tag = "10")]
    pub failover_config: ::core::option::Option<service_lb_policy::FailoverConfig>,
    /// Optional. Configuration to provide isolation support for the associated
    /// Backend Service.
    #[prost(message, optional, tag = "11")]
    pub isolation_config: ::core::option::Option<service_lb_policy::IsolationConfig>,
}
/// Nested message and enum types in `ServiceLbPolicy`.
pub mod service_lb_policy {
    /// Option to specify if an unhealthy IG/NEG should be considered for global
    /// load balancing and traffic routing.
    #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
    pub struct AutoCapacityDrain {
        /// 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.
        #[prost(bool, tag = "1")]
        pub enable: bool,
    }
    /// Option to specify health based failover behavior.
    /// This is not related to Network load balancer FailoverPolicy.
    #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
    pub struct FailoverConfig {
        /// 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.
        #[prost(int32, tag = "1")]
        pub failover_health_threshold: i32,
    }
    /// Configuration to provide isolation support for the associated Backend
    /// Service.
    #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
    pub struct IsolationConfig {
        /// Optional. The isolation granularity of the load balancer.
        #[prost(enumeration = "IsolationGranularity", tag = "1")]
        pub isolation_granularity: i32,
        /// Optional. The isolation mode of the load balancer.
        #[prost(enumeration = "IsolationMode", tag = "2")]
        pub isolation_mode: i32,
    }
    /// The global load balancing algorithm to be used.
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum LoadBalancingAlgorithm {
        /// The type of the loadbalancing algorithm is unspecified.
        Unspecified = 0,
        /// Balance traffic across all backends across the world proportionally based
        /// on capacity.
        SprayToWorld = 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.
        SprayToRegion = 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.
        WaterfallByRegion = 5,
        /// Attempt to keep traffic in a single zone closest to the client, before
        /// spilling over to other zones.
        WaterfallByZone = 6,
    }
    impl LoadBalancingAlgorithm {
        /// String value of the enum field names used in the ProtoBuf definition.
        ///
        /// The values are not transformed in any way and thus are considered stable
        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
        pub fn as_str_name(&self) -> &'static str {
            match self {
                Self::Unspecified => "LOAD_BALANCING_ALGORITHM_UNSPECIFIED",
                Self::SprayToWorld => "SPRAY_TO_WORLD",
                Self::SprayToRegion => "SPRAY_TO_REGION",
                Self::WaterfallByRegion => "WATERFALL_BY_REGION",
                Self::WaterfallByZone => "WATERFALL_BY_ZONE",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "LOAD_BALANCING_ALGORITHM_UNSPECIFIED" => Some(Self::Unspecified),
                "SPRAY_TO_WORLD" => Some(Self::SprayToWorld),
                "SPRAY_TO_REGION" => Some(Self::SprayToRegion),
                "WATERFALL_BY_REGION" => Some(Self::WaterfallByRegion),
                "WATERFALL_BY_ZONE" => Some(Self::WaterfallByZone),
                _ => None,
            }
        }
    }
    /// The granularity of this isolation restriction.
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum IsolationGranularity {
        /// No isolation is configured for the backend service. Traffic can overflow
        /// based on the load balancing algorithm.
        Unspecified = 0,
        /// Traffic for this service will be isolated at the cloud region level.
        Region = 1,
    }
    impl IsolationGranularity {
        /// String value of the enum field names used in the ProtoBuf definition.
        ///
        /// The values are not transformed in any way and thus are considered stable
        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
        pub fn as_str_name(&self) -> &'static str {
            match self {
                Self::Unspecified => "ISOLATION_GRANULARITY_UNSPECIFIED",
                Self::Region => "REGION",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "ISOLATION_GRANULARITY_UNSPECIFIED" => Some(Self::Unspecified),
                "REGION" => Some(Self::Region),
                _ => None,
            }
        }
    }
    /// The mode of this isolation restriction, defining whether clients in a given
    /// region are allowed to reach out to another region.
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum IsolationMode {
        /// No isolation mode is configured for the backend service.
        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,
    }
    impl IsolationMode {
        /// String value of the enum field names used in the ProtoBuf definition.
        ///
        /// The values are not transformed in any way and thus are considered stable
        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
        pub fn as_str_name(&self) -> &'static str {
            match self {
                Self::Unspecified => "ISOLATION_MODE_UNSPECIFIED",
                Self::Nearest => "NEAREST",
                Self::Strict => "STRICT",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "ISOLATION_MODE_UNSPECIFIED" => Some(Self::Unspecified),
                "NEAREST" => Some(Self::Nearest),
                "STRICT" => Some(Self::Strict),
                _ => None,
            }
        }
    }
}
/// Request used with the ListServiceLbPolicies method.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ListServiceLbPoliciesRequest {
    /// Required. The project and location from which the ServiceLbPolicies should
    /// be listed, specified in the format
    /// `projects/{project}/locations/{location}`.
    #[prost(string, tag = "1")]
    pub parent: ::prost::alloc::string::String,
    /// Maximum number of ServiceLbPolicies to return per call.
    #[prost(int32, tag = "2")]
    pub page_size: i32,
    /// 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.
    #[prost(string, tag = "3")]
    pub page_token: ::prost::alloc::string::String,
}
/// Response returned by the ListServiceLbPolicies method.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListServiceLbPoliciesResponse {
    /// List of ServiceLbPolicy resources.
    #[prost(message, repeated, tag = "1")]
    pub service_lb_policies: ::prost::alloc::vec::Vec<ServiceLbPolicy>,
    /// 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`.
    #[prost(string, tag = "2")]
    pub next_page_token: ::prost::alloc::string::String,
    /// Unreachable resources. Populated when the request attempts to list all
    /// resources across all supported locations, while some locations are
    /// temporarily unavailable.
    #[prost(string, repeated, tag = "3")]
    pub unreachable: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
/// Request used by the GetServiceLbPolicy method.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GetServiceLbPolicyRequest {
    /// Required. A name of the ServiceLbPolicy to get. Must be in the format
    /// `projects/{project}/locations/{location}/serviceLbPolicies/*`.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
}
/// Request used by the ServiceLbPolicy method.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateServiceLbPolicyRequest {
    /// Required. The parent resource of the ServiceLbPolicy. Must be in the
    /// format `projects/{project}/locations/{location}`.
    #[prost(string, tag = "1")]
    pub parent: ::prost::alloc::string::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}
    #[prost(string, tag = "2")]
    pub service_lb_policy_id: ::prost::alloc::string::String,
    /// Required. ServiceLbPolicy resource to be created.
    #[prost(message, optional, tag = "3")]
    pub service_lb_policy: ::core::option::Option<ServiceLbPolicy>,
}
/// Request used by the UpdateServiceLbPolicy method.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateServiceLbPolicyRequest {
    /// 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.
    #[prost(message, optional, tag = "1")]
    pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
    /// Required. Updated ServiceLbPolicy resource.
    #[prost(message, optional, tag = "2")]
    pub service_lb_policy: ::core::option::Option<ServiceLbPolicy>,
}
/// Request used by the DeleteServiceLbPolicy method.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct DeleteServiceLbPolicyRequest {
    /// Required. A name of the ServiceLbPolicy to delete. Must be in the format
    /// `projects/{project}/locations/{location}/serviceLbPolicies/*`.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
}
/// TcpRoute is the resource defining how TCP traffic should be routed by a
/// Mesh/Gateway resource.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TcpRoute {
    /// Identifier. Name of the TcpRoute resource. It matches pattern
    /// `projects/*/locations/global/tcpRoutes/tcp_route_name>`.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// Output only. Server-defined URL of this resource
    #[prost(string, tag = "11")]
    pub self_link: ::prost::alloc::string::String,
    /// Output only. The timestamp when the resource was created.
    #[prost(message, optional, tag = "2")]
    pub create_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Output only. The timestamp when the resource was updated.
    #[prost(message, optional, tag = "3")]
    pub update_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Optional. A free-text description of the resource. Max length 1024
    /// characters.
    #[prost(string, tag = "4")]
    pub description: ::prost::alloc::string::String,
    /// 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.
    #[prost(message, repeated, tag = "5")]
    pub rules: ::prost::alloc::vec::Vec<tcp_route::RouteRule>,
    /// 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/global/meshes/<mesh_name>`
    ///
    /// The attached Mesh should be of a type SIDECAR
    #[prost(string, repeated, tag = "8")]
    pub meshes: ::prost::alloc::vec::Vec<::prost::alloc::string::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/global/gateways/<gateway_name>`
    #[prost(string, repeated, tag = "9")]
    pub gateways: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    /// Optional. Set of label tags associated with the TcpRoute resource.
    #[prost(map = "string, string", tag = "10")]
    pub labels: ::std::collections::HashMap<
        ::prost::alloc::string::String,
        ::prost::alloc::string::String,
    >,
}
/// Nested message and enum types in `TcpRoute`.
pub mod tcp_route {
    /// Specifies how to match traffic and how to route traffic when traffic is
    /// matched.
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct RouteRule {
        /// 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.
        #[prost(message, repeated, tag = "1")]
        pub matches: ::prost::alloc::vec::Vec<RouteMatch>,
        /// Required. The detailed rule defining how to route matched traffic.
        #[prost(message, optional, tag = "2")]
        pub action: ::core::option::Option<RouteAction>,
    }
    /// 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.
    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
    pub struct RouteMatch {
        /// 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'.
        #[prost(string, tag = "1")]
        pub address: ::prost::alloc::string::String,
        /// Required. Specifies the destination port to match against.
        #[prost(string, tag = "2")]
        pub port: ::prost::alloc::string::String,
    }
    /// The specifications for routing traffic and applying associated policies.
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct RouteAction {
        /// 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.
        #[prost(message, repeated, tag = "1")]
        pub destinations: ::prost::alloc::vec::Vec<RouteDestination>,
        /// 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.
        #[prost(bool, tag = "3")]
        pub original_destination: bool,
        /// 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.
        #[prost(message, optional, tag = "5")]
        pub idle_timeout: ::core::option::Option<::prost_types::Duration>,
    }
    /// Describe the destination for traffic to be routed to.
    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
    pub struct RouteDestination {
        /// Required. The URL of a BackendService to route traffic to.
        #[prost(string, tag = "1")]
        pub service_name: ::prost::alloc::string::String,
        /// 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.
        #[prost(int32, tag = "2")]
        pub weight: i32,
    }
}
/// Request used with the ListTcpRoutes method.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ListTcpRoutesRequest {
    /// Required. The project and location from which the TcpRoutes should be
    /// listed, specified in the format `projects/*/locations/global`.
    #[prost(string, tag = "1")]
    pub parent: ::prost::alloc::string::String,
    /// Maximum number of TcpRoutes to return per call.
    #[prost(int32, tag = "2")]
    pub page_size: i32,
    /// 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.
    #[prost(string, tag = "3")]
    pub page_token: ::prost::alloc::string::String,
    /// 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.
    #[prost(bool, tag = "4")]
    pub return_partial_success: bool,
}
/// Response returned by the ListTcpRoutes method.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListTcpRoutesResponse {
    /// List of TcpRoute resources.
    #[prost(message, repeated, tag = "1")]
    pub tcp_routes: ::prost::alloc::vec::Vec<TcpRoute>,
    /// 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`.
    #[prost(string, tag = "2")]
    pub next_page_token: ::prost::alloc::string::String,
    /// Unreachable resources. Populated when the request opts into
    /// \[return_partial_success\]\[google.cloud.networkservices.v1.ListTcpRoutesRequest.return_partial_success\]
    /// and reading across collections e.g. when attempting to list all resources
    /// across all supported locations.
    #[prost(string, repeated, tag = "3")]
    pub unreachable: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
/// Request used by the GetTcpRoute method.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GetTcpRouteRequest {
    /// Required. A name of the TcpRoute to get. Must be in the format
    /// `projects/*/locations/global/tcpRoutes/*`.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
}
/// Request used by the TcpRoute method.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateTcpRouteRequest {
    /// Required. The parent resource of the TcpRoute. Must be in the
    /// format `projects/*/locations/global`.
    #[prost(string, tag = "1")]
    pub parent: ::prost::alloc::string::String,
    /// Required. Short name of the TcpRoute resource to be created.
    #[prost(string, tag = "2")]
    pub tcp_route_id: ::prost::alloc::string::String,
    /// Required. TcpRoute resource to be created.
    #[prost(message, optional, tag = "3")]
    pub tcp_route: ::core::option::Option<TcpRoute>,
}
/// Request used by the UpdateTcpRoute method.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateTcpRouteRequest {
    /// 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.
    #[prost(message, optional, tag = "1")]
    pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
    /// Required. Updated TcpRoute resource.
    #[prost(message, optional, tag = "2")]
    pub tcp_route: ::core::option::Option<TcpRoute>,
}
/// Request used by the DeleteTcpRoute method.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct DeleteTcpRouteRequest {
    /// Required. A name of the TcpRoute to delete. Must be in the format
    /// `projects/*/locations/global/tcpRoutes/*`.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
}
/// TlsRoute defines how traffic should be routed based on SNI and other matching
/// L3 attributes.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TlsRoute {
    /// Identifier. Name of the TlsRoute resource. It matches pattern
    /// `projects/*/locations/global/tlsRoutes/tls_route_name>`.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// Output only. Server-defined URL of this resource
    #[prost(string, tag = "8")]
    pub self_link: ::prost::alloc::string::String,
    /// Output only. The timestamp when the resource was created.
    #[prost(message, optional, tag = "2")]
    pub create_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Output only. The timestamp when the resource was updated.
    #[prost(message, optional, tag = "3")]
    pub update_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Optional. A free-text description of the resource. Max length 1024
    /// characters.
    #[prost(string, tag = "4")]
    pub description: ::prost::alloc::string::String,
    /// 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.
    #[prost(message, repeated, tag = "5")]
    pub rules: ::prost::alloc::vec::Vec<tls_route::RouteRule>,
    /// 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/global/meshes/<mesh_name>`
    ///
    /// The attached Mesh should be of a type SIDECAR
    #[prost(string, repeated, tag = "6")]
    pub meshes: ::prost::alloc::vec::Vec<::prost::alloc::string::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/global/gateways/<gateway_name>`
    #[prost(string, repeated, tag = "7")]
    pub gateways: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    /// Optional. Set of label tags associated with the TlsRoute resource.
    #[prost(map = "string, string", tag = "11")]
    pub labels: ::std::collections::HashMap<
        ::prost::alloc::string::String,
        ::prost::alloc::string::String,
    >,
}
/// Nested message and enum types in `TlsRoute`.
pub mod tls_route {
    /// Specifies how to match traffic and how to route traffic when traffic is
    /// matched.
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct RouteRule {
        /// 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.
        #[prost(message, repeated, tag = "1")]
        pub matches: ::prost::alloc::vec::Vec<RouteMatch>,
        /// Required. The detailed rule defining how to route matched traffic.
        #[prost(message, optional, tag = "2")]
        pub action: ::core::option::Option<RouteAction>,
    }
    /// RouteMatch defines the predicate used to match requests to a given action.
    /// Multiple match types are "AND"ed for evaluation.
    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
    pub struct RouteMatch {
        /// 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.
        #[prost(string, repeated, tag = "1")]
        pub sni_host: ::prost::alloc::vec::Vec<::prost::alloc::string::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.
        #[prost(string, repeated, tag = "2")]
        pub alpn: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    }
    /// The specifications for routing traffic and applying associated policies.
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct RouteAction {
        /// Required. The destination services to which traffic should be forwarded.
        /// At least one destination service is required.
        #[prost(message, repeated, tag = "1")]
        pub destinations: ::prost::alloc::vec::Vec<RouteDestination>,
        /// 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.
        #[prost(message, optional, tag = "4")]
        pub idle_timeout: ::core::option::Option<::prost_types::Duration>,
    }
    /// Describe the destination for traffic to be routed to.
    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
    pub struct RouteDestination {
        /// Required. The URL of a BackendService to route traffic to.
        #[prost(string, tag = "1")]
        pub service_name: ::prost::alloc::string::String,
        /// 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.
        #[prost(int32, tag = "2")]
        pub weight: i32,
    }
}
/// Request used with the ListTlsRoutes method.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ListTlsRoutesRequest {
    /// Required. The project and location from which the TlsRoutes should be
    /// listed, specified in the format `projects/*/locations/global`.
    #[prost(string, tag = "1")]
    pub parent: ::prost::alloc::string::String,
    /// Maximum number of TlsRoutes to return per call.
    #[prost(int32, tag = "2")]
    pub page_size: i32,
    /// 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.
    #[prost(string, tag = "3")]
    pub page_token: ::prost::alloc::string::String,
    /// 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.
    #[prost(bool, tag = "4")]
    pub return_partial_success: bool,
}
/// Response returned by the ListTlsRoutes method.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListTlsRoutesResponse {
    /// List of TlsRoute resources.
    #[prost(message, repeated, tag = "1")]
    pub tls_routes: ::prost::alloc::vec::Vec<TlsRoute>,
    /// 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`.
    #[prost(string, tag = "2")]
    pub next_page_token: ::prost::alloc::string::String,
    /// Unreachable resources. Populated when the request opts into
    /// \[return_partial_success\]\[google.cloud.networkservices.v1.ListTlsRoutesRequest.return_partial_success\]
    /// and reading across collections e.g. when attempting to list all resources
    /// across all supported locations.
    #[prost(string, repeated, tag = "3")]
    pub unreachable: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
/// Request used by the GetTlsRoute method.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GetTlsRouteRequest {
    /// Required. A name of the TlsRoute to get. Must be in the format
    /// `projects/*/locations/global/tlsRoutes/*`.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
}
/// Request used by the TlsRoute method.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateTlsRouteRequest {
    /// Required. The parent resource of the TlsRoute. Must be in the
    /// format `projects/*/locations/global`.
    #[prost(string, tag = "1")]
    pub parent: ::prost::alloc::string::String,
    /// Required. Short name of the TlsRoute resource to be created.
    #[prost(string, tag = "2")]
    pub tls_route_id: ::prost::alloc::string::String,
    /// Required. TlsRoute resource to be created.
    #[prost(message, optional, tag = "3")]
    pub tls_route: ::core::option::Option<TlsRoute>,
}
/// Request used by the UpdateTlsRoute method.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateTlsRouteRequest {
    /// 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.
    #[prost(message, optional, tag = "1")]
    pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
    /// Required. Updated TlsRoute resource.
    #[prost(message, optional, tag = "2")]
    pub tls_route: ::core::option::Option<TlsRoute>,
}
/// Request used by the DeleteTlsRoute method.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct DeleteTlsRouteRequest {
    /// Required. A name of the TlsRoute to delete. Must be in the format
    /// `projects/*/locations/global/tlsRoutes/*`.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
}
/// Generated client implementations.
pub mod network_services_client {
    #![allow(
        unused_variables,
        dead_code,
        missing_docs,
        clippy::wildcard_imports,
        clippy::let_unit_value,
    )]
    use tonic::codegen::*;
    use tonic::codegen::http::Uri;
    /// Service describing handlers for resources.
    #[derive(Debug, Clone)]
    pub struct NetworkServicesClient<T> {
        inner: tonic::client::Grpc<T>,
    }
    impl NetworkServicesClient<tonic::transport::Channel> {
        /// Attempt to create a new client by connecting to a given endpoint.
        pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
        where
            D: TryInto<tonic::transport::Endpoint>,
            D::Error: Into<StdError>,
        {
            let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
            Ok(Self::new(conn))
        }
    }
    impl<T> NetworkServicesClient<T>
    where
        T: tonic::client::GrpcService<tonic::body::Body>,
        T::Error: Into<StdError>,
        T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
        <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
    {
        pub fn new(inner: T) -> Self {
            let inner = tonic::client::Grpc::new(inner);
            Self { inner }
        }
        pub fn with_origin(inner: T, origin: Uri) -> Self {
            let inner = tonic::client::Grpc::with_origin(inner, origin);
            Self { inner }
        }
        pub fn with_interceptor<F>(
            inner: T,
            interceptor: F,
        ) -> NetworkServicesClient<InterceptedService<T, F>>
        where
            F: tonic::service::Interceptor,
            T::ResponseBody: Default,
            T: tonic::codegen::Service<
                http::Request<tonic::body::Body>,
                Response = http::Response<
                    <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
                >,
            >,
            <T as tonic::codegen::Service<
                http::Request<tonic::body::Body>,
            >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
        {
            NetworkServicesClient::new(InterceptedService::new(inner, interceptor))
        }
        /// Compress requests with the given encoding.
        ///
        /// This requires the server to support it otherwise it might respond with an
        /// error.
        #[must_use]
        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
            self.inner = self.inner.send_compressed(encoding);
            self
        }
        /// Enable decompressing responses.
        #[must_use]
        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
            self.inner = self.inner.accept_compressed(encoding);
            self
        }
        /// Limits the maximum size of a decoded message.
        ///
        /// Default: `4MB`
        #[must_use]
        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
            self.inner = self.inner.max_decoding_message_size(limit);
            self
        }
        /// Limits the maximum size of an encoded message.
        ///
        /// Default: `usize::MAX`
        #[must_use]
        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
            self.inner = self.inner.max_encoding_message_size(limit);
            self
        }
        /// Lists EndpointPolicies in a given project and location.
        pub async fn list_endpoint_policies(
            &mut self,
            request: impl tonic::IntoRequest<super::ListEndpointPoliciesRequest>,
        ) -> std::result::Result<
            tonic::Response<super::ListEndpointPoliciesResponse>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic_prost::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.cloud.networkservices.v1.NetworkServices/ListEndpointPolicies",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.networkservices.v1.NetworkServices",
                        "ListEndpointPolicies",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Gets details of a single EndpointPolicy.
        pub async fn get_endpoint_policy(
            &mut self,
            request: impl tonic::IntoRequest<super::GetEndpointPolicyRequest>,
        ) -> std::result::Result<tonic::Response<super::EndpointPolicy>, tonic::Status> {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic_prost::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.cloud.networkservices.v1.NetworkServices/GetEndpointPolicy",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.networkservices.v1.NetworkServices",
                        "GetEndpointPolicy",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Creates a new EndpointPolicy in a given project and location.
        pub async fn create_endpoint_policy(
            &mut self,
            request: impl tonic::IntoRequest<super::CreateEndpointPolicyRequest>,
        ) -> std::result::Result<
            tonic::Response<super::super::super::super::longrunning::Operation>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic_prost::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.cloud.networkservices.v1.NetworkServices/CreateEndpointPolicy",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.networkservices.v1.NetworkServices",
                        "CreateEndpointPolicy",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Updates the parameters of a single EndpointPolicy.
        pub async fn update_endpoint_policy(
            &mut self,
            request: impl tonic::IntoRequest<super::UpdateEndpointPolicyRequest>,
        ) -> std::result::Result<
            tonic::Response<super::super::super::super::longrunning::Operation>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic_prost::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.cloud.networkservices.v1.NetworkServices/UpdateEndpointPolicy",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.networkservices.v1.NetworkServices",
                        "UpdateEndpointPolicy",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Deletes a single EndpointPolicy.
        pub async fn delete_endpoint_policy(
            &mut self,
            request: impl tonic::IntoRequest<super::DeleteEndpointPolicyRequest>,
        ) -> std::result::Result<
            tonic::Response<super::super::super::super::longrunning::Operation>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic_prost::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.cloud.networkservices.v1.NetworkServices/DeleteEndpointPolicy",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.networkservices.v1.NetworkServices",
                        "DeleteEndpointPolicy",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Lists `WasmPluginVersion` resources in a given project and
        /// location.
        pub async fn list_wasm_plugin_versions(
            &mut self,
            request: impl tonic::IntoRequest<super::ListWasmPluginVersionsRequest>,
        ) -> std::result::Result<
            tonic::Response<super::ListWasmPluginVersionsResponse>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic_prost::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.cloud.networkservices.v1.NetworkServices/ListWasmPluginVersions",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.networkservices.v1.NetworkServices",
                        "ListWasmPluginVersions",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Gets details of the specified `WasmPluginVersion` resource.
        pub async fn get_wasm_plugin_version(
            &mut self,
            request: impl tonic::IntoRequest<super::GetWasmPluginVersionRequest>,
        ) -> std::result::Result<
            tonic::Response<super::WasmPluginVersion>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic_prost::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.cloud.networkservices.v1.NetworkServices/GetWasmPluginVersion",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.networkservices.v1.NetworkServices",
                        "GetWasmPluginVersion",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Creates a new `WasmPluginVersion` resource in a given project
        /// and location.
        pub async fn create_wasm_plugin_version(
            &mut self,
            request: impl tonic::IntoRequest<super::CreateWasmPluginVersionRequest>,
        ) -> std::result::Result<
            tonic::Response<super::super::super::super::longrunning::Operation>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic_prost::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.cloud.networkservices.v1.NetworkServices/CreateWasmPluginVersion",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.networkservices.v1.NetworkServices",
                        "CreateWasmPluginVersion",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Deletes the specified `WasmPluginVersion` resource.
        pub async fn delete_wasm_plugin_version(
            &mut self,
            request: impl tonic::IntoRequest<super::DeleteWasmPluginVersionRequest>,
        ) -> std::result::Result<
            tonic::Response<super::super::super::super::longrunning::Operation>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic_prost::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.cloud.networkservices.v1.NetworkServices/DeleteWasmPluginVersion",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.networkservices.v1.NetworkServices",
                        "DeleteWasmPluginVersion",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Lists `WasmPlugin` resources in a given project and
        /// location.
        pub async fn list_wasm_plugins(
            &mut self,
            request: impl tonic::IntoRequest<super::ListWasmPluginsRequest>,
        ) -> std::result::Result<
            tonic::Response<super::ListWasmPluginsResponse>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic_prost::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.cloud.networkservices.v1.NetworkServices/ListWasmPlugins",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.networkservices.v1.NetworkServices",
                        "ListWasmPlugins",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Gets details of the specified `WasmPlugin` resource.
        pub async fn get_wasm_plugin(
            &mut self,
            request: impl tonic::IntoRequest<super::GetWasmPluginRequest>,
        ) -> std::result::Result<tonic::Response<super::WasmPlugin>, tonic::Status> {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic_prost::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.cloud.networkservices.v1.NetworkServices/GetWasmPlugin",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.networkservices.v1.NetworkServices",
                        "GetWasmPlugin",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Creates a new `WasmPlugin` resource in a given project
        /// and location.
        pub async fn create_wasm_plugin(
            &mut self,
            request: impl tonic::IntoRequest<super::CreateWasmPluginRequest>,
        ) -> std::result::Result<
            tonic::Response<super::super::super::super::longrunning::Operation>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic_prost::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.cloud.networkservices.v1.NetworkServices/CreateWasmPlugin",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.networkservices.v1.NetworkServices",
                        "CreateWasmPlugin",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Updates the parameters of the specified `WasmPlugin` resource.
        pub async fn update_wasm_plugin(
            &mut self,
            request: impl tonic::IntoRequest<super::UpdateWasmPluginRequest>,
        ) -> std::result::Result<
            tonic::Response<super::super::super::super::longrunning::Operation>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic_prost::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.cloud.networkservices.v1.NetworkServices/UpdateWasmPlugin",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.networkservices.v1.NetworkServices",
                        "UpdateWasmPlugin",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Deletes the specified `WasmPlugin` resource.
        pub async fn delete_wasm_plugin(
            &mut self,
            request: impl tonic::IntoRequest<super::DeleteWasmPluginRequest>,
        ) -> std::result::Result<
            tonic::Response<super::super::super::super::longrunning::Operation>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic_prost::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.cloud.networkservices.v1.NetworkServices/DeleteWasmPlugin",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.networkservices.v1.NetworkServices",
                        "DeleteWasmPlugin",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Lists Gateways in a given project and location.
        pub async fn list_gateways(
            &mut self,
            request: impl tonic::IntoRequest<super::ListGatewaysRequest>,
        ) -> std::result::Result<
            tonic::Response<super::ListGatewaysResponse>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic_prost::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.cloud.networkservices.v1.NetworkServices/ListGateways",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.networkservices.v1.NetworkServices",
                        "ListGateways",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Gets details of a single Gateway.
        pub async fn get_gateway(
            &mut self,
            request: impl tonic::IntoRequest<super::GetGatewayRequest>,
        ) -> std::result::Result<tonic::Response<super::Gateway>, tonic::Status> {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic_prost::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.cloud.networkservices.v1.NetworkServices/GetGateway",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.networkservices.v1.NetworkServices",
                        "GetGateway",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Creates a new Gateway in a given project and location.
        pub async fn create_gateway(
            &mut self,
            request: impl tonic::IntoRequest<super::CreateGatewayRequest>,
        ) -> std::result::Result<
            tonic::Response<super::super::super::super::longrunning::Operation>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic_prost::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.cloud.networkservices.v1.NetworkServices/CreateGateway",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.networkservices.v1.NetworkServices",
                        "CreateGateway",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Updates the parameters of a single Gateway.
        pub async fn update_gateway(
            &mut self,
            request: impl tonic::IntoRequest<super::UpdateGatewayRequest>,
        ) -> std::result::Result<
            tonic::Response<super::super::super::super::longrunning::Operation>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic_prost::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.cloud.networkservices.v1.NetworkServices/UpdateGateway",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.networkservices.v1.NetworkServices",
                        "UpdateGateway",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Deletes a single Gateway.
        pub async fn delete_gateway(
            &mut self,
            request: impl tonic::IntoRequest<super::DeleteGatewayRequest>,
        ) -> std::result::Result<
            tonic::Response<super::super::super::super::longrunning::Operation>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic_prost::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.cloud.networkservices.v1.NetworkServices/DeleteGateway",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.networkservices.v1.NetworkServices",
                        "DeleteGateway",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Lists GrpcRoutes in a given project and location.
        pub async fn list_grpc_routes(
            &mut self,
            request: impl tonic::IntoRequest<super::ListGrpcRoutesRequest>,
        ) -> std::result::Result<
            tonic::Response<super::ListGrpcRoutesResponse>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic_prost::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.cloud.networkservices.v1.NetworkServices/ListGrpcRoutes",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.networkservices.v1.NetworkServices",
                        "ListGrpcRoutes",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Gets details of a single GrpcRoute.
        pub async fn get_grpc_route(
            &mut self,
            request: impl tonic::IntoRequest<super::GetGrpcRouteRequest>,
        ) -> std::result::Result<tonic::Response<super::GrpcRoute>, tonic::Status> {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic_prost::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.cloud.networkservices.v1.NetworkServices/GetGrpcRoute",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.networkservices.v1.NetworkServices",
                        "GetGrpcRoute",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Creates a new GrpcRoute in a given project and location.
        pub async fn create_grpc_route(
            &mut self,
            request: impl tonic::IntoRequest<super::CreateGrpcRouteRequest>,
        ) -> std::result::Result<
            tonic::Response<super::super::super::super::longrunning::Operation>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic_prost::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.cloud.networkservices.v1.NetworkServices/CreateGrpcRoute",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.networkservices.v1.NetworkServices",
                        "CreateGrpcRoute",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Updates the parameters of a single GrpcRoute.
        pub async fn update_grpc_route(
            &mut self,
            request: impl tonic::IntoRequest<super::UpdateGrpcRouteRequest>,
        ) -> std::result::Result<
            tonic::Response<super::super::super::super::longrunning::Operation>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic_prost::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.cloud.networkservices.v1.NetworkServices/UpdateGrpcRoute",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.networkservices.v1.NetworkServices",
                        "UpdateGrpcRoute",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Deletes a single GrpcRoute.
        pub async fn delete_grpc_route(
            &mut self,
            request: impl tonic::IntoRequest<super::DeleteGrpcRouteRequest>,
        ) -> std::result::Result<
            tonic::Response<super::super::super::super::longrunning::Operation>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic_prost::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.cloud.networkservices.v1.NetworkServices/DeleteGrpcRoute",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.networkservices.v1.NetworkServices",
                        "DeleteGrpcRoute",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Lists HttpRoute in a given project and location.
        pub async fn list_http_routes(
            &mut self,
            request: impl tonic::IntoRequest<super::ListHttpRoutesRequest>,
        ) -> std::result::Result<
            tonic::Response<super::ListHttpRoutesResponse>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic_prost::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.cloud.networkservices.v1.NetworkServices/ListHttpRoutes",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.networkservices.v1.NetworkServices",
                        "ListHttpRoutes",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Gets details of a single HttpRoute.
        pub async fn get_http_route(
            &mut self,
            request: impl tonic::IntoRequest<super::GetHttpRouteRequest>,
        ) -> std::result::Result<tonic::Response<super::HttpRoute>, tonic::Status> {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic_prost::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.cloud.networkservices.v1.NetworkServices/GetHttpRoute",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.networkservices.v1.NetworkServices",
                        "GetHttpRoute",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Creates a new HttpRoute in a given project and location.
        pub async fn create_http_route(
            &mut self,
            request: impl tonic::IntoRequest<super::CreateHttpRouteRequest>,
        ) -> std::result::Result<
            tonic::Response<super::super::super::super::longrunning::Operation>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic_prost::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.cloud.networkservices.v1.NetworkServices/CreateHttpRoute",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.networkservices.v1.NetworkServices",
                        "CreateHttpRoute",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Updates the parameters of a single HttpRoute.
        pub async fn update_http_route(
            &mut self,
            request: impl tonic::IntoRequest<super::UpdateHttpRouteRequest>,
        ) -> std::result::Result<
            tonic::Response<super::super::super::super::longrunning::Operation>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic_prost::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.cloud.networkservices.v1.NetworkServices/UpdateHttpRoute",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.networkservices.v1.NetworkServices",
                        "UpdateHttpRoute",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Deletes a single HttpRoute.
        pub async fn delete_http_route(
            &mut self,
            request: impl tonic::IntoRequest<super::DeleteHttpRouteRequest>,
        ) -> std::result::Result<
            tonic::Response<super::super::super::super::longrunning::Operation>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic_prost::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.cloud.networkservices.v1.NetworkServices/DeleteHttpRoute",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.networkservices.v1.NetworkServices",
                        "DeleteHttpRoute",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Lists TcpRoute in a given project and location.
        pub async fn list_tcp_routes(
            &mut self,
            request: impl tonic::IntoRequest<super::ListTcpRoutesRequest>,
        ) -> std::result::Result<
            tonic::Response<super::ListTcpRoutesResponse>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic_prost::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.cloud.networkservices.v1.NetworkServices/ListTcpRoutes",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.networkservices.v1.NetworkServices",
                        "ListTcpRoutes",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Gets details of a single TcpRoute.
        pub async fn get_tcp_route(
            &mut self,
            request: impl tonic::IntoRequest<super::GetTcpRouteRequest>,
        ) -> std::result::Result<tonic::Response<super::TcpRoute>, tonic::Status> {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic_prost::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.cloud.networkservices.v1.NetworkServices/GetTcpRoute",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.networkservices.v1.NetworkServices",
                        "GetTcpRoute",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Creates a new TcpRoute in a given project and location.
        pub async fn create_tcp_route(
            &mut self,
            request: impl tonic::IntoRequest<super::CreateTcpRouteRequest>,
        ) -> std::result::Result<
            tonic::Response<super::super::super::super::longrunning::Operation>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic_prost::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.cloud.networkservices.v1.NetworkServices/CreateTcpRoute",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.networkservices.v1.NetworkServices",
                        "CreateTcpRoute",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Updates the parameters of a single TcpRoute.
        pub async fn update_tcp_route(
            &mut self,
            request: impl tonic::IntoRequest<super::UpdateTcpRouteRequest>,
        ) -> std::result::Result<
            tonic::Response<super::super::super::super::longrunning::Operation>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic_prost::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.cloud.networkservices.v1.NetworkServices/UpdateTcpRoute",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.networkservices.v1.NetworkServices",
                        "UpdateTcpRoute",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Deletes a single TcpRoute.
        pub async fn delete_tcp_route(
            &mut self,
            request: impl tonic::IntoRequest<super::DeleteTcpRouteRequest>,
        ) -> std::result::Result<
            tonic::Response<super::super::super::super::longrunning::Operation>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic_prost::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.cloud.networkservices.v1.NetworkServices/DeleteTcpRoute",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.networkservices.v1.NetworkServices",
                        "DeleteTcpRoute",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Lists TlsRoute in a given project and location.
        pub async fn list_tls_routes(
            &mut self,
            request: impl tonic::IntoRequest<super::ListTlsRoutesRequest>,
        ) -> std::result::Result<
            tonic::Response<super::ListTlsRoutesResponse>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic_prost::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.cloud.networkservices.v1.NetworkServices/ListTlsRoutes",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.networkservices.v1.NetworkServices",
                        "ListTlsRoutes",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Gets details of a single TlsRoute.
        pub async fn get_tls_route(
            &mut self,
            request: impl tonic::IntoRequest<super::GetTlsRouteRequest>,
        ) -> std::result::Result<tonic::Response<super::TlsRoute>, tonic::Status> {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic_prost::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.cloud.networkservices.v1.NetworkServices/GetTlsRoute",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.networkservices.v1.NetworkServices",
                        "GetTlsRoute",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Creates a new TlsRoute in a given project and location.
        pub async fn create_tls_route(
            &mut self,
            request: impl tonic::IntoRequest<super::CreateTlsRouteRequest>,
        ) -> std::result::Result<
            tonic::Response<super::super::super::super::longrunning::Operation>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic_prost::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.cloud.networkservices.v1.NetworkServices/CreateTlsRoute",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.networkservices.v1.NetworkServices",
                        "CreateTlsRoute",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Updates the parameters of a single TlsRoute.
        pub async fn update_tls_route(
            &mut self,
            request: impl tonic::IntoRequest<super::UpdateTlsRouteRequest>,
        ) -> std::result::Result<
            tonic::Response<super::super::super::super::longrunning::Operation>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic_prost::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.cloud.networkservices.v1.NetworkServices/UpdateTlsRoute",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.networkservices.v1.NetworkServices",
                        "UpdateTlsRoute",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Deletes a single TlsRoute.
        pub async fn delete_tls_route(
            &mut self,
            request: impl tonic::IntoRequest<super::DeleteTlsRouteRequest>,
        ) -> std::result::Result<
            tonic::Response<super::super::super::super::longrunning::Operation>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic_prost::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.cloud.networkservices.v1.NetworkServices/DeleteTlsRoute",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.networkservices.v1.NetworkServices",
                        "DeleteTlsRoute",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Lists ServiceBinding in a given project and location.
        pub async fn list_service_bindings(
            &mut self,
            request: impl tonic::IntoRequest<super::ListServiceBindingsRequest>,
        ) -> std::result::Result<
            tonic::Response<super::ListServiceBindingsResponse>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic_prost::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.cloud.networkservices.v1.NetworkServices/ListServiceBindings",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.networkservices.v1.NetworkServices",
                        "ListServiceBindings",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Gets details of a single ServiceBinding.
        pub async fn get_service_binding(
            &mut self,
            request: impl tonic::IntoRequest<super::GetServiceBindingRequest>,
        ) -> std::result::Result<tonic::Response<super::ServiceBinding>, tonic::Status> {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic_prost::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.cloud.networkservices.v1.NetworkServices/GetServiceBinding",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.networkservices.v1.NetworkServices",
                        "GetServiceBinding",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Creates a new ServiceBinding in a given project and location.
        pub async fn create_service_binding(
            &mut self,
            request: impl tonic::IntoRequest<super::CreateServiceBindingRequest>,
        ) -> std::result::Result<
            tonic::Response<super::super::super::super::longrunning::Operation>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic_prost::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.cloud.networkservices.v1.NetworkServices/CreateServiceBinding",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.networkservices.v1.NetworkServices",
                        "CreateServiceBinding",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Updates the parameters of a single ServiceBinding.
        pub async fn update_service_binding(
            &mut self,
            request: impl tonic::IntoRequest<super::UpdateServiceBindingRequest>,
        ) -> std::result::Result<
            tonic::Response<super::super::super::super::longrunning::Operation>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic_prost::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.cloud.networkservices.v1.NetworkServices/UpdateServiceBinding",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.networkservices.v1.NetworkServices",
                        "UpdateServiceBinding",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Deletes a single ServiceBinding.
        pub async fn delete_service_binding(
            &mut self,
            request: impl tonic::IntoRequest<super::DeleteServiceBindingRequest>,
        ) -> std::result::Result<
            tonic::Response<super::super::super::super::longrunning::Operation>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic_prost::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.cloud.networkservices.v1.NetworkServices/DeleteServiceBinding",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.networkservices.v1.NetworkServices",
                        "DeleteServiceBinding",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Lists Meshes in a given project and location.
        pub async fn list_meshes(
            &mut self,
            request: impl tonic::IntoRequest<super::ListMeshesRequest>,
        ) -> std::result::Result<
            tonic::Response<super::ListMeshesResponse>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic_prost::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.cloud.networkservices.v1.NetworkServices/ListMeshes",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.networkservices.v1.NetworkServices",
                        "ListMeshes",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Gets details of a single Mesh.
        pub async fn get_mesh(
            &mut self,
            request: impl tonic::IntoRequest<super::GetMeshRequest>,
        ) -> std::result::Result<tonic::Response<super::Mesh>, tonic::Status> {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic_prost::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.cloud.networkservices.v1.NetworkServices/GetMesh",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.networkservices.v1.NetworkServices",
                        "GetMesh",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Creates a new Mesh in a given project and location.
        pub async fn create_mesh(
            &mut self,
            request: impl tonic::IntoRequest<super::CreateMeshRequest>,
        ) -> std::result::Result<
            tonic::Response<super::super::super::super::longrunning::Operation>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic_prost::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.cloud.networkservices.v1.NetworkServices/CreateMesh",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.networkservices.v1.NetworkServices",
                        "CreateMesh",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Updates the parameters of a single Mesh.
        pub async fn update_mesh(
            &mut self,
            request: impl tonic::IntoRequest<super::UpdateMeshRequest>,
        ) -> std::result::Result<
            tonic::Response<super::super::super::super::longrunning::Operation>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic_prost::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.cloud.networkservices.v1.NetworkServices/UpdateMesh",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.networkservices.v1.NetworkServices",
                        "UpdateMesh",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Deletes a single Mesh.
        pub async fn delete_mesh(
            &mut self,
            request: impl tonic::IntoRequest<super::DeleteMeshRequest>,
        ) -> std::result::Result<
            tonic::Response<super::super::super::super::longrunning::Operation>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic_prost::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.cloud.networkservices.v1.NetworkServices/DeleteMesh",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.networkservices.v1.NetworkServices",
                        "DeleteMesh",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Lists ServiceLbPolicies in a given project and location.
        pub async fn list_service_lb_policies(
            &mut self,
            request: impl tonic::IntoRequest<super::ListServiceLbPoliciesRequest>,
        ) -> std::result::Result<
            tonic::Response<super::ListServiceLbPoliciesResponse>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic_prost::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.cloud.networkservices.v1.NetworkServices/ListServiceLbPolicies",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.networkservices.v1.NetworkServices",
                        "ListServiceLbPolicies",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Gets details of a single ServiceLbPolicy.
        pub async fn get_service_lb_policy(
            &mut self,
            request: impl tonic::IntoRequest<super::GetServiceLbPolicyRequest>,
        ) -> std::result::Result<
            tonic::Response<super::ServiceLbPolicy>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic_prost::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.cloud.networkservices.v1.NetworkServices/GetServiceLbPolicy",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.networkservices.v1.NetworkServices",
                        "GetServiceLbPolicy",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Creates a new ServiceLbPolicy in a given project and location.
        pub async fn create_service_lb_policy(
            &mut self,
            request: impl tonic::IntoRequest<super::CreateServiceLbPolicyRequest>,
        ) -> std::result::Result<
            tonic::Response<super::super::super::super::longrunning::Operation>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic_prost::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.cloud.networkservices.v1.NetworkServices/CreateServiceLbPolicy",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.networkservices.v1.NetworkServices",
                        "CreateServiceLbPolicy",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Updates the parameters of a single ServiceLbPolicy.
        pub async fn update_service_lb_policy(
            &mut self,
            request: impl tonic::IntoRequest<super::UpdateServiceLbPolicyRequest>,
        ) -> std::result::Result<
            tonic::Response<super::super::super::super::longrunning::Operation>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic_prost::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.cloud.networkservices.v1.NetworkServices/UpdateServiceLbPolicy",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.networkservices.v1.NetworkServices",
                        "UpdateServiceLbPolicy",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Deletes a single ServiceLbPolicy.
        pub async fn delete_service_lb_policy(
            &mut self,
            request: impl tonic::IntoRequest<super::DeleteServiceLbPolicyRequest>,
        ) -> std::result::Result<
            tonic::Response<super::super::super::super::longrunning::Operation>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic_prost::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.cloud.networkservices.v1.NetworkServices/DeleteServiceLbPolicy",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.networkservices.v1.NetworkServices",
                        "DeleteServiceLbPolicy",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Get a single RouteView of a Gateway.
        pub async fn get_gateway_route_view(
            &mut self,
            request: impl tonic::IntoRequest<super::GetGatewayRouteViewRequest>,
        ) -> std::result::Result<
            tonic::Response<super::GatewayRouteView>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic_prost::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.cloud.networkservices.v1.NetworkServices/GetGatewayRouteView",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.networkservices.v1.NetworkServices",
                        "GetGatewayRouteView",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Get a single RouteView of a Mesh.
        pub async fn get_mesh_route_view(
            &mut self,
            request: impl tonic::IntoRequest<super::GetMeshRouteViewRequest>,
        ) -> std::result::Result<tonic::Response<super::MeshRouteView>, tonic::Status> {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic_prost::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.cloud.networkservices.v1.NetworkServices/GetMeshRouteView",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.networkservices.v1.NetworkServices",
                        "GetMeshRouteView",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Lists RouteViews
        pub async fn list_gateway_route_views(
            &mut self,
            request: impl tonic::IntoRequest<super::ListGatewayRouteViewsRequest>,
        ) -> std::result::Result<
            tonic::Response<super::ListGatewayRouteViewsResponse>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic_prost::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.cloud.networkservices.v1.NetworkServices/ListGatewayRouteViews",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.networkservices.v1.NetworkServices",
                        "ListGatewayRouteViews",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Lists RouteViews
        pub async fn list_mesh_route_views(
            &mut self,
            request: impl tonic::IntoRequest<super::ListMeshRouteViewsRequest>,
        ) -> std::result::Result<
            tonic::Response<super::ListMeshRouteViewsResponse>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic_prost::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.cloud.networkservices.v1.NetworkServices/ListMeshRouteViews",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.networkservices.v1.NetworkServices",
                        "ListMeshRouteViews",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
    }
}
