// 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 been cancelled successfully
    /// have
    /// \[google.longrunning.Operation.error\]\[google.longrunning.Operation.error\]
    /// value with a \[google.rpc.Status.code\]\[google.rpc.Status.code\] of 1,
    /// corresponding to `Code.CANCELLED`.
    #[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,
}
/// The ServiceConnectionMap resource.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ServiceConnectionMap {
    /// Immutable. The name of a ServiceConnectionMap.
    /// Format:
    /// projects/{project}/locations/{location}/serviceConnectionMaps/{service_connection_map}
    /// See: <https://google.aip.dev/122#fields-representing-resource-names>
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// Output only. Time when the ServiceConnectionMap was created.
    #[prost(message, optional, tag = "2")]
    pub create_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Output only. Time when the ServiceConnectionMap was updated.
    #[prost(message, optional, tag = "3")]
    pub update_time: ::core::option::Option<::prost_types::Timestamp>,
    /// User-defined labels.
    #[prost(map = "string, string", tag = "4")]
    pub labels: ::std::collections::HashMap<
        ::prost::alloc::string::String,
        ::prost::alloc::string::String,
    >,
    /// A description of this resource.
    #[prost(string, tag = "5")]
    pub description: ::prost::alloc::string::String,
    /// The service class identifier this ServiceConnectionMap is for.
    /// The user of ServiceConnectionMap create API needs to have
    /// networkconnecitivty.serviceclasses.use iam permission for the service
    /// class.
    #[prost(string, tag = "7")]
    pub service_class: ::prost::alloc::string::String,
    /// Output only. The service class uri this ServiceConnectionMap is for.
    #[prost(string, tag = "12")]
    pub service_class_uri: ::prost::alloc::string::String,
    /// Output only. The infrastructure used for connections between
    /// consumers/producers.
    #[prost(enumeration = "Infrastructure", tag = "8")]
    pub infrastructure: i32,
    /// The PSC configurations on producer side.
    #[prost(message, repeated, tag = "9")]
    pub producer_psc_configs: ::prost::alloc::vec::Vec<
        service_connection_map::ProducerPscConfig,
    >,
    /// The PSC configurations on consumer side.
    #[prost(message, repeated, tag = "10")]
    pub consumer_psc_configs: ::prost::alloc::vec::Vec<
        service_connection_map::ConsumerPscConfig,
    >,
    /// Output only. PSC connection details on consumer side.
    #[prost(message, repeated, tag = "11")]
    pub consumer_psc_connections: ::prost::alloc::vec::Vec<
        service_connection_map::ConsumerPscConnection,
    >,
    /// The token provided by the consumer. This token authenticates that the
    /// consumer can create a connection within the specified project and network.
    #[prost(string, tag = "13")]
    pub token: ::prost::alloc::string::String,
    /// Optional. The etag is computed by the server, and may be sent on update and
    /// delete requests to ensure the client has an up-to-date value before
    /// proceeding.
    #[prost(string, optional, tag = "14")]
    pub etag: ::core::option::Option<::prost::alloc::string::String>,
}
/// Nested message and enum types in `ServiceConnectionMap`.
pub mod service_connection_map {
    /// The PSC configurations on producer side.
    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
    pub struct ProducerPscConfig {
        /// The resource path of a service attachment.
        /// Example:
        /// projects/{projectNumOrId}/regions/{region}/serviceAttachments/{resourceId}.
        #[prost(string, tag = "1")]
        pub service_attachment_uri: ::prost::alloc::string::String,
    }
    /// Allow the producer to specify which consumers can connect to it.
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct ConsumerPscConfig {
        /// The consumer project where PSC connections are allowed to be created in.
        #[prost(string, tag = "1")]
        pub project: ::prost::alloc::string::String,
        /// The resource path of the consumer network where PSC connections are
        /// allowed to be created in. Note, this network does not need be in the
        /// ConsumerPscConfig.project in the case of SharedVPC.
        /// Example:
        /// projects/{projectNumOrId}/global/networks/{networkId}.
        #[prost(string, tag = "2")]
        pub network: ::prost::alloc::string::String,
        /// This is used in PSC consumer ForwardingRule to control whether the PSC
        /// endpoint can be accessed from another region.
        #[prost(bool, tag = "3")]
        pub disable_global_access: bool,
        /// Output only. Overall state of PSC Connections management for this
        /// consumer psc config.
        #[prost(enumeration = "consumer_psc_config::State", tag = "4")]
        pub state: i32,
        /// Immutable. Deprecated. Use producer_instance_metadata instead.
        /// An immutable identifier for the producer instance.
        #[deprecated]
        #[prost(string, tag = "5")]
        pub producer_instance_id: ::prost::alloc::string::String,
        /// Output only. A map to store mapping between customer vip and target
        /// service attachment. Only service attachment with producer specified ip
        /// addresses are stored here.
        #[prost(map = "string, string", tag = "6")]
        pub service_attachment_ip_address_map: ::std::collections::HashMap<
            ::prost::alloc::string::String,
            ::prost::alloc::string::String,
        >,
        /// Required. The project ID or project number of the consumer project. This
        /// project is the one that the consumer uses to interact with the producer
        /// instance. From the perspective of a consumer who's created a producer
        /// instance, this is the project of the producer instance. Format:
        /// 'projects/\<project_id_or_number>' Eg. 'projects/consumer-project' or
        /// 'projects/1234'
        #[prost(string, tag = "7")]
        pub consumer_instance_project: ::prost::alloc::string::String,
        /// Immutable. An immutable map for the producer instance metadata.
        #[prost(map = "string, string", tag = "8")]
        pub producer_instance_metadata: ::std::collections::HashMap<
            ::prost::alloc::string::String,
            ::prost::alloc::string::String,
        >,
        /// The requested IP version for the PSC connection.
        #[prost(enumeration = "super::IpVersion", optional, tag = "9")]
        pub ip_version: ::core::option::Option<i32>,
    }
    /// Nested message and enum types in `ConsumerPscConfig`.
    pub mod consumer_psc_config {
        /// PSC Consumer Config State.
        #[derive(
            Clone,
            Copy,
            Debug,
            PartialEq,
            Eq,
            Hash,
            PartialOrd,
            Ord,
            ::prost::Enumeration
        )]
        #[repr(i32)]
        pub enum State {
            /// Default state, when Connection Map is created initially.
            Unspecified = 0,
            /// Set when policy and map configuration is valid,
            /// and their matching can lead to allowing creation of PSC Connections
            /// subject to other constraints like connections limit.
            Valid = 1,
            /// No Service Connection Policy found for this network and Service
            /// Class
            ConnectionPolicyMissing = 2,
            /// Service Connection Policy limit reached for this network and Service
            /// Class
            PolicyLimitReached = 3,
            /// The consumer instance project is not in
            /// AllowedGoogleProducersResourceHierarchyLevels of the matching
            /// ServiceConnectionPolicy.
            ConsumerInstanceProjectNotAllowlisted = 4,
        }
        impl State {
            /// 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 => "STATE_UNSPECIFIED",
                    Self::Valid => "VALID",
                    Self::ConnectionPolicyMissing => "CONNECTION_POLICY_MISSING",
                    Self::PolicyLimitReached => "POLICY_LIMIT_REACHED",
                    Self::ConsumerInstanceProjectNotAllowlisted => {
                        "CONSUMER_INSTANCE_PROJECT_NOT_ALLOWLISTED"
                    }
                }
            }
            /// Creates an enum from field names used in the ProtoBuf definition.
            pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
                match value {
                    "STATE_UNSPECIFIED" => Some(Self::Unspecified),
                    "VALID" => Some(Self::Valid),
                    "CONNECTION_POLICY_MISSING" => Some(Self::ConnectionPolicyMissing),
                    "POLICY_LIMIT_REACHED" => Some(Self::PolicyLimitReached),
                    "CONSUMER_INSTANCE_PROJECT_NOT_ALLOWLISTED" => {
                        Some(Self::ConsumerInstanceProjectNotAllowlisted)
                    }
                    _ => None,
                }
            }
        }
    }
    /// PSC connection details on consumer side.
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct ConsumerPscConnection {
        /// The URI of a service attachment which is the target of the PSC
        /// connection.
        #[prost(string, tag = "1")]
        pub service_attachment_uri: ::prost::alloc::string::String,
        /// The state of the PSC connection.
        #[prost(enumeration = "consumer_psc_connection::State", tag = "2")]
        pub state: i32,
        /// The consumer project whose PSC forwarding rule is connected to the
        /// service attachments in this service connection map.
        #[prost(string, tag = "3")]
        pub project: ::prost::alloc::string::String,
        /// The consumer network whose PSC forwarding rule is connected to the
        /// service attachments in this service connection map.
        /// Note that the network could be on a different project (shared VPC).
        #[prost(string, tag = "4")]
        pub network: ::prost::alloc::string::String,
        /// The PSC connection id of the PSC forwarding rule connected
        /// to the service attachments in this service connection map.
        #[prost(string, tag = "5")]
        pub psc_connection_id: ::prost::alloc::string::String,
        /// The IP literal allocated on the consumer network for the PSC forwarding
        /// rule that is created to connect to the producer service attachment in
        /// this service connection map.
        #[prost(string, tag = "6")]
        pub ip: ::prost::alloc::string::String,
        /// The error type indicates whether the error is consumer facing, producer
        /// facing or system internal.
        #[deprecated]
        #[prost(enumeration = "super::ConnectionErrorType", tag = "7")]
        pub error_type: i32,
        /// The most recent error during operating this connection.
        #[deprecated]
        #[prost(message, optional, tag = "8")]
        pub error: ::core::option::Option<super::super::super::super::rpc::Status>,
        /// The last Compute Engine operation to setup PSC connection.
        #[prost(string, tag = "9")]
        pub gce_operation: ::prost::alloc::string::String,
        /// The URI of the consumer forwarding rule created.
        /// Example:
        /// projects/{projectNumOrId}/regions/us-east1/networks/{resourceId}.
        #[prost(string, tag = "10")]
        pub forwarding_rule: ::prost::alloc::string::String,
        /// Output only. The error info for the latest error during operating this
        /// connection.
        #[prost(message, optional, tag = "11")]
        pub error_info: ::core::option::Option<
            super::super::super::super::rpc::ErrorInfo,
        >,
        /// Output only. The URI of the selected subnetwork selected to allocate IP
        /// address for this connection.
        #[prost(string, tag = "12")]
        pub selected_subnetwork: ::prost::alloc::string::String,
        /// Immutable. Deprecated. Use producer_instance_metadata instead.
        /// An immutable identifier for the producer instance.
        #[deprecated]
        #[prost(string, tag = "13")]
        pub producer_instance_id: ::prost::alloc::string::String,
        /// Immutable. An immutable map for the producer instance metadata.
        #[prost(map = "string, string", tag = "14")]
        pub producer_instance_metadata: ::std::collections::HashMap<
            ::prost::alloc::string::String,
            ::prost::alloc::string::String,
        >,
        /// The requested IP version for the PSC connection.
        #[prost(enumeration = "super::IpVersion", optional, tag = "15")]
        pub ip_version: ::core::option::Option<i32>,
    }
    /// Nested message and enum types in `ConsumerPscConnection`.
    pub mod consumer_psc_connection {
        /// The state of the PSC connection.
        /// We reserve the right to add more states without notice in the future.
        /// Users should not use exhaustive switch statements on this enum.
        /// See <https://google.aip.dev/216.>
        #[derive(
            Clone,
            Copy,
            Debug,
            PartialEq,
            Eq,
            Hash,
            PartialOrd,
            Ord,
            ::prost::Enumeration
        )]
        #[repr(i32)]
        pub enum State {
            /// An invalid state as the default case.
            Unspecified = 0,
            /// The connection has been created successfully. However, for the
            /// up-to-date connection status, please use the service attachment's
            /// "ConnectedEndpoint.status" as the source of truth.
            Active = 1,
            /// The connection is not functional since some resources on the connection
            /// fail to be created.
            Failed = 2,
            /// The connection is being created.
            Creating = 3,
            /// The connection is being deleted.
            Deleting = 4,
            /// The connection is being repaired to complete creation.
            CreateRepairing = 5,
            /// The connection is being repaired to complete deletion.
            DeleteRepairing = 6,
        }
        impl State {
            /// 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 => "STATE_UNSPECIFIED",
                    Self::Active => "ACTIVE",
                    Self::Failed => "FAILED",
                    Self::Creating => "CREATING",
                    Self::Deleting => "DELETING",
                    Self::CreateRepairing => "CREATE_REPAIRING",
                    Self::DeleteRepairing => "DELETE_REPAIRING",
                }
            }
            /// Creates an enum from field names used in the ProtoBuf definition.
            pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
                match value {
                    "STATE_UNSPECIFIED" => Some(Self::Unspecified),
                    "ACTIVE" => Some(Self::Active),
                    "FAILED" => Some(Self::Failed),
                    "CREATING" => Some(Self::Creating),
                    "DELETING" => Some(Self::Deleting),
                    "CREATE_REPAIRING" => Some(Self::CreateRepairing),
                    "DELETE_REPAIRING" => Some(Self::DeleteRepairing),
                    _ => None,
                }
            }
        }
    }
}
/// Request for ListServiceConnectionMaps.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ListServiceConnectionMapsRequest {
    /// Required. The parent resource's name. ex. projects/123/locations/us-east1
    #[prost(string, tag = "1")]
    pub parent: ::prost::alloc::string::String,
    /// The maximum number of results per page that should be returned.
    #[prost(int32, tag = "2")]
    pub page_size: i32,
    /// The page token.
    #[prost(string, tag = "3")]
    pub page_token: ::prost::alloc::string::String,
    /// A filter expression that filters the results listed in the response.
    #[prost(string, tag = "4")]
    pub filter: ::prost::alloc::string::String,
    /// Sort the results by a certain order.
    #[prost(string, tag = "5")]
    pub order_by: ::prost::alloc::string::String,
}
/// Response for ListServiceConnectionMaps.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListServiceConnectionMapsResponse {
    /// ServiceConnectionMaps to be returned.
    #[prost(message, repeated, tag = "1")]
    pub service_connection_maps: ::prost::alloc::vec::Vec<ServiceConnectionMap>,
    /// The next pagination token in the List response. It should be used as
    /// page_token for the following request. An empty value means no more result.
    #[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 for GetServiceConnectionMap.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GetServiceConnectionMapRequest {
    /// Required. Name of the ServiceConnectionMap to get.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
}
/// Request for CreateServiceConnectionMap.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateServiceConnectionMapRequest {
    /// Required. The parent resource's name of the ServiceConnectionMap. ex.
    /// projects/123/locations/us-east1
    #[prost(string, tag = "1")]
    pub parent: ::prost::alloc::string::String,
    /// Optional. Resource ID
    /// (i.e. 'foo' in '\[...\]/projects/p/locations/l/serviceConnectionMaps/foo')
    /// See <https://google.aip.dev/122#resource-id-segments>
    /// Unique per location.
    /// If one is not provided, one will be generated.
    #[prost(string, tag = "2")]
    pub service_connection_map_id: ::prost::alloc::string::String,
    /// Required. Initial values for a new ServiceConnectionMaps
    #[prost(message, optional, tag = "3")]
    pub service_connection_map: ::core::option::Option<ServiceConnectionMap>,
    /// Optional. An optional request ID to identify requests. Specify a unique
    /// request ID so that if you must retry your request, the server will know to
    /// ignore the request if it has already been completed. The server will
    /// guarantee that for at least 60 minutes since the first request.
    ///
    /// For example, consider a situation where you make an initial request and
    /// the request times out. If you make the request again with the same request
    /// ID, the server can check if original operation with the same request ID
    /// was received, and if so, will ignore the second request. This prevents
    /// clients from accidentally creating duplicate commitments.
    ///
    /// The request ID must be a valid UUID with the exception that zero UUID is
    /// not supported (00000000-0000-0000-0000-000000000000).
    #[prost(string, tag = "4")]
    pub request_id: ::prost::alloc::string::String,
}
/// Request for UpdateServiceConnectionMap.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateServiceConnectionMapRequest {
    /// Optional. Field mask is used to specify the fields to be overwritten in the
    /// ServiceConnectionMap 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. New values to be patched into the resource.
    #[prost(message, optional, tag = "2")]
    pub service_connection_map: ::core::option::Option<ServiceConnectionMap>,
    /// Optional. An optional request ID to identify requests. Specify a unique
    /// request ID so that if you must retry your request, the server will know to
    /// ignore the request if it has already been completed. The server will
    /// guarantee that for at least 60 minutes since the first request.
    ///
    /// For example, consider a situation where you make an initial request and
    /// the request times out. If you make the request again with the same request
    /// ID, the server can check if original operation with the same request ID
    /// was received, and if so, will ignore the second request. This prevents
    /// clients from accidentally creating duplicate commitments.
    ///
    /// The request ID must be a valid UUID with the exception that zero UUID is
    /// not supported (00000000-0000-0000-0000-000000000000).
    #[prost(string, tag = "3")]
    pub request_id: ::prost::alloc::string::String,
}
/// Request for DeleteServiceConnectionMap.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct DeleteServiceConnectionMapRequest {
    /// Required. The name of the ServiceConnectionMap to delete.
    #[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 will know to
    /// ignore the request if it has already been completed. The server will
    /// guarantee that for at least 60 minutes after the first request.
    ///
    /// For example, consider a situation where you make an initial request and
    /// the request times out. If you make the request again with the same request
    /// ID, the server can check if original operation with the same request ID
    /// was received, and if so, will ignore the second request. This prevents
    /// clients from accidentally creating duplicate commitments.
    ///
    /// The request ID must be a valid UUID with the exception that zero UUID is
    /// not supported (00000000-0000-0000-0000-000000000000).
    #[prost(string, tag = "2")]
    pub request_id: ::prost::alloc::string::String,
    /// Optional. The etag is computed by the server, and may be sent on update and
    /// delete requests to ensure the client has an up-to-date value before
    /// proceeding.
    #[prost(string, optional, tag = "3")]
    pub etag: ::core::option::Option<::prost::alloc::string::String>,
}
/// The ServiceConnectionPolicy resource.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ServiceConnectionPolicy {
    /// Immutable. The name of a ServiceConnectionPolicy.
    /// Format:
    /// projects/{project}/locations/{location}/serviceConnectionPolicies/{service_connection_policy}
    /// See: <https://google.aip.dev/122#fields-representing-resource-names>
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// Output only. Time when the ServiceConnectionPolicy was created.
    #[prost(message, optional, tag = "2")]
    pub create_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Output only. Time when the ServiceConnectionPolicy was updated.
    #[prost(message, optional, tag = "3")]
    pub update_time: ::core::option::Option<::prost_types::Timestamp>,
    /// User-defined labels.
    #[prost(map = "string, string", tag = "4")]
    pub labels: ::std::collections::HashMap<
        ::prost::alloc::string::String,
        ::prost::alloc::string::String,
    >,
    /// A description of this resource.
    #[prost(string, tag = "5")]
    pub description: ::prost::alloc::string::String,
    /// The resource path of the consumer network.
    /// Example:
    ///
    /// * projects/{projectNumOrId}/global/networks/{resourceId}.
    #[prost(string, tag = "6")]
    pub network: ::prost::alloc::string::String,
    /// The service class identifier for which this ServiceConnectionPolicy is for.
    /// The service class identifier is a unique, symbolic representation of a
    /// ServiceClass. It is provided by the Service Producer. Google services have
    /// a prefix of gcp or google-cloud. For example, gcp-memorystore-redis or
    /// google-cloud-sql. 3rd party services do not. For example,
    /// test-service-a3dfcx.
    #[prost(string, tag = "7")]
    pub service_class: ::prost::alloc::string::String,
    /// Output only. The type of underlying resources used to create the
    /// connection.
    #[prost(enumeration = "Infrastructure", tag = "8")]
    pub infrastructure: i32,
    /// Configuration used for Private Service Connect connections. Used when
    /// Infrastructure is PSC.
    #[prost(message, optional, tag = "9")]
    pub psc_config: ::core::option::Option<service_connection_policy::PscConfig>,
    /// Output only. \[Output only\] Information about each Private Service Connect
    /// connection.
    #[prost(message, repeated, tag = "10")]
    pub psc_connections: ::prost::alloc::vec::Vec<
        service_connection_policy::PscConnection,
    >,
    /// Optional. The etag is computed by the server, and may be sent on update and
    /// delete requests to ensure the client has an up-to-date value before
    /// proceeding.
    #[prost(string, optional, tag = "11")]
    pub etag: ::core::option::Option<::prost::alloc::string::String>,
}
/// Nested message and enum types in `ServiceConnectionPolicy`.
pub mod service_connection_policy {
    /// Configuration used for Private Service Connect connections. Used when
    /// Infrastructure is PSC.
    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
    pub struct PscConfig {
        /// The resource paths of subnetworks to use for IP address management.
        /// Example:
        /// projects/{projectNumOrId}/regions/{region}/subnetworks/{resourceId}.
        #[prost(string, repeated, tag = "1")]
        pub subnetworks: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
        /// Optional. Max number of PSC connections for this policy.
        #[prost(int64, optional, tag = "2")]
        pub limit: ::core::option::Option<i64>,
        /// Required. ProducerInstanceLocation is used to specify which authorization
        /// mechanism to use to determine which projects the Producer instance can be
        /// within.
        #[prost(enumeration = "psc_config::ProducerInstanceLocation", tag = "3")]
        pub producer_instance_location: i32,
        /// Optional. List of Projects, Folders, or Organizations from where the
        /// Producer instance can be within. For example, a network administrator can
        /// provide both 'organizations/foo' and 'projects/bar' as
        /// allowed_google_producers_resource_hierarchy_levels. This allowlists this
        /// network to connect with any Producer instance within the 'foo'
        /// organization or the 'bar' project. By default,
        /// allowed_google_producers_resource_hierarchy_level is empty. The format
        /// for each allowed_google_producers_resource_hierarchy_level is <resource
        /// type>/<id> where <resource type> is one of 'projects', 'folders', or
        /// 'organizations' and <id> is either the ID or the number of the resource
        /// type. Format for each allowed_google_producers_resource_hierarchy_level
        /// value: 'projects/\<project_id_or_number>' or 'folders/\<folder_id>' or
        /// 'organizations/\<organization_id>'
        /// Eg. \[projects/my-project-id, projects/567, folders/891,
        /// organizations/123\]
        #[prost(string, repeated, tag = "4")]
        pub allowed_google_producers_resource_hierarchy_level: ::prost::alloc::vec::Vec<
            ::prost::alloc::string::String,
        >,
    }
    /// Nested message and enum types in `PscConfig`.
    pub mod psc_config {
        /// ProducerInstanceLocation is used to specify which authorization mechanism
        /// to use to determine which projects the Producer instance can be within.
        #[derive(
            Clone,
            Copy,
            Debug,
            PartialEq,
            Eq,
            Hash,
            PartialOrd,
            Ord,
            ::prost::Enumeration
        )]
        #[repr(i32)]
        pub enum ProducerInstanceLocation {
            /// Producer instance location is not specified. When this option is
            /// chosen, then the PSC connections created by this
            /// ServiceConnectionPolicy must be within the same project as the Producer
            /// instance. This is the default ProducerInstanceLocation value.
            /// To allow for PSC connections from this network to other networks, use
            /// the CUSTOM_RESOURCE_HIERARCHY_LEVELS option.
            Unspecified = 0,
            /// Producer instance must be within one of the values provided in
            /// allowed_google_producers_resource_hierarchy_level.
            CustomResourceHierarchyLevels = 1,
        }
        impl ProducerInstanceLocation {
            /// 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 => "PRODUCER_INSTANCE_LOCATION_UNSPECIFIED",
                    Self::CustomResourceHierarchyLevels => {
                        "CUSTOM_RESOURCE_HIERARCHY_LEVELS"
                    }
                }
            }
            /// Creates an enum from field names used in the ProtoBuf definition.
            pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
                match value {
                    "PRODUCER_INSTANCE_LOCATION_UNSPECIFIED" => Some(Self::Unspecified),
                    "CUSTOM_RESOURCE_HIERARCHY_LEVELS" => {
                        Some(Self::CustomResourceHierarchyLevels)
                    }
                    _ => None,
                }
            }
        }
    }
    /// Information about a specific Private Service Connect connection.
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct PscConnection {
        /// State of the PSC Connection
        #[prost(enumeration = "State", tag = "1")]
        pub state: i32,
        /// The resource reference of the PSC Forwarding Rule within the consumer
        /// VPC.
        #[prost(string, tag = "2")]
        pub consumer_forwarding_rule: ::prost::alloc::string::String,
        /// The resource reference of the consumer address.
        #[prost(string, tag = "3")]
        pub consumer_address: ::prost::alloc::string::String,
        /// The error type indicates whether the error is consumer facing, producer
        /// facing or system internal.
        #[deprecated]
        #[prost(enumeration = "super::ConnectionErrorType", tag = "4")]
        pub error_type: i32,
        /// The most recent error during operating this connection.
        /// Deprecated, please use error_info instead.
        #[deprecated]
        #[prost(message, optional, tag = "5")]
        pub error: ::core::option::Option<super::super::super::super::rpc::Status>,
        /// The last Compute Engine operation to setup PSC connection.
        #[prost(string, tag = "6")]
        pub gce_operation: ::prost::alloc::string::String,
        /// The project where the PSC connection is created.
        #[prost(string, tag = "7")]
        pub consumer_target_project: ::prost::alloc::string::String,
        /// The PSC connection id of the PSC forwarding rule.
        #[prost(string, tag = "8")]
        pub psc_connection_id: ::prost::alloc::string::String,
        /// Output only. The error info for the latest error during operating this
        /// connection.
        #[prost(message, optional, tag = "9")]
        pub error_info: ::core::option::Option<
            super::super::super::super::rpc::ErrorInfo,
        >,
        /// Output only. The URI of the subnetwork selected to allocate IP address
        /// for this connection.
        #[prost(string, tag = "10")]
        pub selected_subnetwork: ::prost::alloc::string::String,
        /// Immutable. Deprecated. Use producer_instance_metadata instead.
        /// An immutable identifier for the producer instance.
        #[deprecated]
        #[prost(string, tag = "11")]
        pub producer_instance_id: ::prost::alloc::string::String,
        /// Immutable. An immutable map for the producer instance metadata.
        #[prost(map = "string, string", tag = "12")]
        pub producer_instance_metadata: ::std::collections::HashMap<
            ::prost::alloc::string::String,
            ::prost::alloc::string::String,
        >,
        /// Output only. \[Output only\] The service class associated with this PSC
        /// Connection. The value is derived from the SCPolicy and matches the
        /// service class name provided by the customer.
        #[prost(string, tag = "13")]
        pub service_class: ::prost::alloc::string::String,
        /// The requested IP version for the PSC connection.
        #[prost(enumeration = "super::IpVersion", optional, tag = "14")]
        pub ip_version: ::core::option::Option<i32>,
    }
    /// The state of the PSC connection.
    /// We reserve the right to add more states without notice in the future.
    /// Users should not use exhaustive switch statements on this enum.
    /// See <https://google.aip.dev/216.>
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum State {
        /// An invalid state as the default case.
        Unspecified = 0,
        /// The connection has been created successfully. However, for the
        /// up-to-date connection status, please use the created forwarding rule's
        /// "PscConnectionStatus" as the source of truth.
        Active = 1,
        /// The connection is not functional since some resources on the connection
        /// fail to be created.
        Failed = 2,
        /// The connection is being created.
        Creating = 3,
        /// The connection is being deleted.
        Deleting = 4,
        /// The connection is being repaired to complete creation.
        CreateRepairing = 5,
        /// The connection is being repaired to complete deletion.
        DeleteRepairing = 6,
    }
    impl State {
        /// 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 => "STATE_UNSPECIFIED",
                Self::Active => "ACTIVE",
                Self::Failed => "FAILED",
                Self::Creating => "CREATING",
                Self::Deleting => "DELETING",
                Self::CreateRepairing => "CREATE_REPAIRING",
                Self::DeleteRepairing => "DELETE_REPAIRING",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "STATE_UNSPECIFIED" => Some(Self::Unspecified),
                "ACTIVE" => Some(Self::Active),
                "FAILED" => Some(Self::Failed),
                "CREATING" => Some(Self::Creating),
                "DELETING" => Some(Self::Deleting),
                "CREATE_REPAIRING" => Some(Self::CreateRepairing),
                "DELETE_REPAIRING" => Some(Self::DeleteRepairing),
                _ => None,
            }
        }
    }
}
/// Request for ListServiceConnectionPolicies.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ListServiceConnectionPoliciesRequest {
    /// Required. The parent resource's name. ex. projects/123/locations/us-east1
    #[prost(string, tag = "1")]
    pub parent: ::prost::alloc::string::String,
    /// The maximum number of results per page that should be returned.
    #[prost(int32, tag = "2")]
    pub page_size: i32,
    /// The page token.
    #[prost(string, tag = "3")]
    pub page_token: ::prost::alloc::string::String,
    /// A filter expression that filters the results listed in the response.
    #[prost(string, tag = "4")]
    pub filter: ::prost::alloc::string::String,
    /// Sort the results by a certain order.
    #[prost(string, tag = "5")]
    pub order_by: ::prost::alloc::string::String,
}
/// Response for ListServiceConnectionPolicies.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListServiceConnectionPoliciesResponse {
    /// ServiceConnectionPolicies to be returned.
    #[prost(message, repeated, tag = "1")]
    pub service_connection_policies: ::prost::alloc::vec::Vec<ServiceConnectionPolicy>,
    /// The next pagination token in the List response. It should be used as
    /// page_token for the following request. An empty value means no more result.
    #[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 for GetServiceConnectionPolicy.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GetServiceConnectionPolicyRequest {
    /// Required. Name of the ServiceConnectionPolicy to get.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
}
/// Request for CreateServiceConnectionPolicy.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateServiceConnectionPolicyRequest {
    /// Required. The parent resource's name of the ServiceConnectionPolicy. ex.
    /// projects/123/locations/us-east1
    #[prost(string, tag = "1")]
    pub parent: ::prost::alloc::string::String,
    /// Optional. Resource ID
    /// (i.e. 'foo' in
    /// '\[...\]/projects/p/locations/l/serviceConnectionPolicies/foo') See
    /// <https://google.aip.dev/122#resource-id-segments> Unique per location.
    #[prost(string, tag = "2")]
    pub service_connection_policy_id: ::prost::alloc::string::String,
    /// Required. Initial values for a new ServiceConnectionPolicies
    #[prost(message, optional, tag = "3")]
    pub service_connection_policy: ::core::option::Option<ServiceConnectionPolicy>,
    /// Optional. An optional request ID to identify requests. Specify a unique
    /// request ID so that if you must retry your request, the server will know to
    /// ignore the request if it has already been completed. The server will
    /// guarantee that for at least 60 minutes since the first request.
    ///
    /// For example, consider a situation where you make an initial request and
    /// the request times out. If you make the request again with the same request
    /// ID, the server can check if original operation with the same request ID
    /// was received, and if so, will ignore the second request. This prevents
    /// clients from accidentally creating duplicate commitments.
    ///
    /// The request ID must be a valid UUID with the exception that zero UUID is
    /// not supported (00000000-0000-0000-0000-000000000000).
    #[prost(string, tag = "4")]
    pub request_id: ::prost::alloc::string::String,
}
/// Request for UpdateServiceConnectionPolicy.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateServiceConnectionPolicyRequest {
    /// Optional. Field mask is used to specify the fields to be overwritten in the
    /// ServiceConnectionPolicy 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. New values to be patched into the resource.
    #[prost(message, optional, tag = "2")]
    pub service_connection_policy: ::core::option::Option<ServiceConnectionPolicy>,
    /// Optional. An optional request ID to identify requests. Specify a unique
    /// request ID so that if you must retry your request, the server will know to
    /// ignore the request if it has already been completed. The server will
    /// guarantee that for at least 60 minutes since the first request.
    ///
    /// For example, consider a situation where you make an initial request and
    /// the request times out. If you make the request again with the same request
    /// ID, the server can check if original operation with the same request ID
    /// was received, and if so, will ignore the second request. This prevents
    /// clients from accidentally creating duplicate commitments.
    ///
    /// The request ID must be a valid UUID with the exception that zero UUID is
    /// not supported (00000000-0000-0000-0000-000000000000).
    #[prost(string, tag = "3")]
    pub request_id: ::prost::alloc::string::String,
}
/// Request for DeleteServiceConnectionPolicy.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct DeleteServiceConnectionPolicyRequest {
    /// Required. The name of the ServiceConnectionPolicy to delete.
    #[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 will know to
    /// ignore the request if it has already been completed. The server will
    /// guarantee that for at least 60 minutes after the first request.
    ///
    /// For example, consider a situation where you make an initial request and
    /// the request times out. If you make the request again with the same request
    /// ID, the server can check if original operation with the same request ID
    /// was received, and if so, will ignore the second request. This prevents
    /// clients from accidentally creating duplicate commitments.
    ///
    /// The request ID must be a valid UUID with the exception that zero UUID is
    /// not supported (00000000-0000-0000-0000-000000000000).
    #[prost(string, tag = "2")]
    pub request_id: ::prost::alloc::string::String,
    /// Optional. The etag is computed by the server, and may be sent on update and
    /// delete requests to ensure the client has an up-to-date value before
    /// proceeding.
    #[prost(string, optional, tag = "3")]
    pub etag: ::core::option::Option<::prost::alloc::string::String>,
}
/// The ServiceClass resource.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ServiceClass {
    /// Immutable. The name of a ServiceClass resource.
    /// Format:
    /// projects/{project}/locations/{location}/serviceClasses/{service_class}
    /// See: <https://google.aip.dev/122#fields-representing-resource-names>
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// Output only. The generated service class name. Use this name to refer to
    /// the Service class in Service Connection Maps and Service Connection
    /// Policies.
    #[prost(string, tag = "7")]
    pub service_class: ::prost::alloc::string::String,
    /// Output only. Time when the ServiceClass was created.
    #[prost(message, optional, tag = "2")]
    pub create_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Output only. Time when the ServiceClass was updated.
    #[prost(message, optional, tag = "3")]
    pub update_time: ::core::option::Option<::prost_types::Timestamp>,
    /// User-defined labels.
    #[prost(map = "string, string", tag = "4")]
    pub labels: ::std::collections::HashMap<
        ::prost::alloc::string::String,
        ::prost::alloc::string::String,
    >,
    /// A description of this resource.
    #[prost(string, tag = "5")]
    pub description: ::prost::alloc::string::String,
    /// Optional. The etag is computed by the server, and may be sent on update and
    /// delete requests to ensure the client has an up-to-date value before
    /// proceeding.
    #[prost(string, optional, tag = "8")]
    pub etag: ::core::option::Option<::prost::alloc::string::String>,
}
/// Request for ListServiceClasses.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ListServiceClassesRequest {
    /// Required. The parent resource's name. ex. projects/123/locations/us-east1
    #[prost(string, tag = "1")]
    pub parent: ::prost::alloc::string::String,
    /// The maximum number of results per page that should be returned.
    #[prost(int32, tag = "2")]
    pub page_size: i32,
    /// The page token.
    #[prost(string, tag = "3")]
    pub page_token: ::prost::alloc::string::String,
    /// A filter expression that filters the results listed in the response.
    #[prost(string, tag = "4")]
    pub filter: ::prost::alloc::string::String,
    /// Sort the results by a certain order.
    #[prost(string, tag = "5")]
    pub order_by: ::prost::alloc::string::String,
}
/// Response for ListServiceClasses.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListServiceClassesResponse {
    /// ServiceClasses to be returned.
    #[prost(message, repeated, tag = "1")]
    pub service_classes: ::prost::alloc::vec::Vec<ServiceClass>,
    /// The next pagination token in the List response. It should be used as
    /// page_token for the following request. An empty value means no more result.
    #[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 for GetServiceClass.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GetServiceClassRequest {
    /// Required. Name of the ServiceClass to get.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
}
/// Request for UpdateServiceClass.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateServiceClassRequest {
    /// Optional. Field mask is used to specify the fields to be overwritten in the
    /// ServiceClass 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. New values to be patched into the resource.
    #[prost(message, optional, tag = "2")]
    pub service_class: ::core::option::Option<ServiceClass>,
    /// Optional. An optional request ID to identify requests. Specify a unique
    /// request ID so that if you must retry your request, the server will know to
    /// ignore the request if it has already been completed. The server will
    /// guarantee that for at least 60 minutes since the first request.
    ///
    /// For example, consider a situation where you make an initial request and
    /// the request times out. If you make the request again with the same request
    /// ID, the server can check if original operation with the same request ID
    /// was received, and if so, will ignore the second request. This prevents
    /// clients from accidentally creating duplicate commitments.
    ///
    /// The request ID must be a valid UUID with the exception that zero UUID is
    /// not supported (00000000-0000-0000-0000-000000000000).
    #[prost(string, tag = "3")]
    pub request_id: ::prost::alloc::string::String,
}
/// Request for DeleteServiceClass.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct DeleteServiceClassRequest {
    /// Required. The name of the ServiceClass to delete.
    #[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 will know to
    /// ignore the request if it has already been completed. The server will
    /// guarantee that for at least 60 minutes after the first request.
    ///
    /// For example, consider a situation where you make an initial request and
    /// the request times out. If you make the request again with the same request
    /// ID, the server can check if original operation with the same request ID
    /// was received, and if so, will ignore the second request. This prevents
    /// clients from accidentally creating duplicate commitments.
    ///
    /// The request ID must be a valid UUID with the exception that zero UUID is
    /// not supported (00000000-0000-0000-0000-000000000000).
    #[prost(string, tag = "2")]
    pub request_id: ::prost::alloc::string::String,
    /// Optional. The etag is computed by the server, and may be sent on update and
    /// delete requests to ensure the client has an up-to-date value before
    /// proceeding.
    #[prost(string, optional, tag = "3")]
    pub etag: ::core::option::Option<::prost::alloc::string::String>,
}
/// The ServiceConnectionToken resource.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ServiceConnectionToken {
    /// Immutable. The name of a ServiceConnectionToken.
    /// Format:
    /// projects/{project}/locations/{location}/ServiceConnectionTokens/{service_connection_token}
    /// See: <https://google.aip.dev/122#fields-representing-resource-names>
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// Output only. Time when the ServiceConnectionToken was created.
    #[prost(message, optional, tag = "2")]
    pub create_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Output only. Time when the ServiceConnectionToken was updated.
    #[prost(message, optional, tag = "3")]
    pub update_time: ::core::option::Option<::prost_types::Timestamp>,
    /// User-defined labels.
    #[prost(map = "string, string", tag = "4")]
    pub labels: ::std::collections::HashMap<
        ::prost::alloc::string::String,
        ::prost::alloc::string::String,
    >,
    /// A description of this resource.
    #[prost(string, tag = "5")]
    pub description: ::prost::alloc::string::String,
    /// The resource path of the network associated with this token.
    /// Example:
    /// projects/{projectNumOrId}/global/networks/{resourceId}.
    #[prost(string, tag = "6")]
    pub network: ::prost::alloc::string::String,
    /// Output only. The token generated by Automation.
    #[prost(string, tag = "7")]
    pub token: ::prost::alloc::string::String,
    /// Output only. The time to which this token is valid.
    #[prost(message, optional, tag = "8")]
    pub expire_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Optional. The etag is computed by the server, and may be sent on update and
    /// delete requests to ensure the client has an up-to-date value before
    /// proceeding.
    #[prost(string, optional, tag = "9")]
    pub etag: ::core::option::Option<::prost::alloc::string::String>,
}
/// Request for ListServiceConnectionTokens.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ListServiceConnectionTokensRequest {
    /// Required. The parent resource's name. ex. projects/123/locations/us-east1
    #[prost(string, tag = "1")]
    pub parent: ::prost::alloc::string::String,
    /// The maximum number of results per page that should be returned.
    #[prost(int32, tag = "2")]
    pub page_size: i32,
    /// The page token.
    #[prost(string, tag = "3")]
    pub page_token: ::prost::alloc::string::String,
    /// A filter expression that filters the results listed in the response.
    #[prost(string, tag = "4")]
    pub filter: ::prost::alloc::string::String,
    /// Sort the results by a certain order.
    #[prost(string, tag = "5")]
    pub order_by: ::prost::alloc::string::String,
}
/// Response for ListServiceConnectionTokens.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListServiceConnectionTokensResponse {
    /// ServiceConnectionTokens to be returned.
    #[prost(message, repeated, tag = "1")]
    pub service_connection_tokens: ::prost::alloc::vec::Vec<ServiceConnectionToken>,
    /// The next pagination token in the List response. It should be used as
    /// page_token for the following request. An empty value means no more result.
    #[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 for GetServiceConnectionToken.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GetServiceConnectionTokenRequest {
    /// Required. Name of the ServiceConnectionToken to get.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
}
/// Request for CreateServiceConnectionToken.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateServiceConnectionTokenRequest {
    /// Required. The parent resource's name of the ServiceConnectionToken. ex.
    /// projects/123/locations/us-east1
    #[prost(string, tag = "1")]
    pub parent: ::prost::alloc::string::String,
    /// Optional. Resource ID
    /// (i.e. 'foo' in '\[...\]/projects/p/locations/l/ServiceConnectionTokens/foo')
    /// See <https://google.aip.dev/122#resource-id-segments>
    /// Unique per location.
    /// If one is not provided, one will be generated.
    #[prost(string, tag = "2")]
    pub service_connection_token_id: ::prost::alloc::string::String,
    /// Required. Initial values for a new ServiceConnectionTokens
    #[prost(message, optional, tag = "3")]
    pub service_connection_token: ::core::option::Option<ServiceConnectionToken>,
    /// Optional. An optional request ID to identify requests. Specify a unique
    /// request ID so that if you must retry your request, the server will know to
    /// ignore the request if it has already been completed. The server will
    /// guarantee that for at least 60 minutes since the first request.
    ///
    /// For example, consider a situation where you make an initial request and
    /// the request times out. If you make the request again with the same request
    /// ID, the server can check if original operation with the same request ID
    /// was received, and if so, will ignore the second request. This prevents
    /// clients from accidentally creating duplicate commitments.
    ///
    /// The request ID must be a valid UUID with the exception that zero UUID is
    /// not supported (00000000-0000-0000-0000-000000000000).
    #[prost(string, tag = "4")]
    pub request_id: ::prost::alloc::string::String,
}
/// Request for DeleteServiceConnectionToken.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct DeleteServiceConnectionTokenRequest {
    /// Required. The name of the ServiceConnectionToken to delete.
    #[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 will know to
    /// ignore the request if it has already been completed. The server will
    /// guarantee that for at least 60 minutes after the first request.
    ///
    /// For example, consider a situation where you make an initial request and
    /// the request times out. If you make the request again with the same request
    /// ID, the server can check if original operation with the same request ID
    /// was received, and if so, will ignore the second request. This prevents
    /// clients from accidentally creating duplicate commitments.
    ///
    /// The request ID must be a valid UUID with the exception that zero UUID is
    /// not supported (00000000-0000-0000-0000-000000000000).
    #[prost(string, tag = "2")]
    pub request_id: ::prost::alloc::string::String,
    /// Optional. The etag is computed by the server, and may be sent on update and
    /// delete requests to ensure the client has an up-to-date value before
    /// proceeding.
    #[prost(string, optional, tag = "3")]
    pub etag: ::core::option::Option<::prost::alloc::string::String>,
}
/// The infrastructure used for connections between consumers/producers.
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum Infrastructure {
    /// An invalid infrastructure as the default case.
    Unspecified = 0,
    /// Private Service Connect is used for connections.
    Psc = 1,
}
impl Infrastructure {
    /// 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 => "INFRASTRUCTURE_UNSPECIFIED",
            Self::Psc => "PSC",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "INFRASTRUCTURE_UNSPECIFIED" => Some(Self::Unspecified),
            "PSC" => Some(Self::Psc),
            _ => None,
        }
    }
}
/// The error type indicates whether a connection error is consumer facing,
/// producer facing or system internal.
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum ConnectionErrorType {
    /// An invalid error type as the default case.
    Unspecified = 0,
    /// The error is due to Service Automation system internal.
    ErrorInternal = 1,
    /// The error is due to the setup on consumer side.
    ErrorConsumerSide = 2,
    /// The error is due to the setup on producer side.
    ErrorProducerSide = 3,
}
impl ConnectionErrorType {
    /// 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 => "CONNECTION_ERROR_TYPE_UNSPECIFIED",
            Self::ErrorInternal => "ERROR_INTERNAL",
            Self::ErrorConsumerSide => "ERROR_CONSUMER_SIDE",
            Self::ErrorProducerSide => "ERROR_PRODUCER_SIDE",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "CONNECTION_ERROR_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
            "ERROR_INTERNAL" => Some(Self::ErrorInternal),
            "ERROR_CONSUMER_SIDE" => Some(Self::ErrorConsumerSide),
            "ERROR_PRODUCER_SIDE" => Some(Self::ErrorProducerSide),
            _ => None,
        }
    }
}
/// The requested IP version for the PSC connection.
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum IpVersion {
    /// Default value. We will use IPv4 or IPv6 depending on the IP version of
    /// first available subnetwork.
    Unspecified = 0,
    /// Will use IPv4 only.
    Ipv4 = 1,
    /// Will use IPv6 only.
    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,
        }
    }
}
/// Generated client implementations.
pub mod cross_network_automation_service_client {
    #![allow(
        unused_variables,
        dead_code,
        missing_docs,
        clippy::wildcard_imports,
        clippy::let_unit_value,
    )]
    use tonic::codegen::*;
    use tonic::codegen::http::Uri;
    /// The service for CrossNetworkAutomation resources.
    #[derive(Debug, Clone)]
    pub struct CrossNetworkAutomationServiceClient<T> {
        inner: tonic::client::Grpc<T>,
    }
    impl CrossNetworkAutomationServiceClient<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> CrossNetworkAutomationServiceClient<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,
        ) -> CrossNetworkAutomationServiceClient<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,
        {
            CrossNetworkAutomationServiceClient::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 ServiceConnectionMaps in a given project and location.
        pub async fn list_service_connection_maps(
            &mut self,
            request: impl tonic::IntoRequest<super::ListServiceConnectionMapsRequest>,
        ) -> std::result::Result<
            tonic::Response<super::ListServiceConnectionMapsResponse>,
            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.networkconnectivity.v1.CrossNetworkAutomationService/ListServiceConnectionMaps",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.networkconnectivity.v1.CrossNetworkAutomationService",
                        "ListServiceConnectionMaps",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Gets details of a single ServiceConnectionMap.
        pub async fn get_service_connection_map(
            &mut self,
            request: impl tonic::IntoRequest<super::GetServiceConnectionMapRequest>,
        ) -> std::result::Result<
            tonic::Response<super::ServiceConnectionMap>,
            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.networkconnectivity.v1.CrossNetworkAutomationService/GetServiceConnectionMap",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.networkconnectivity.v1.CrossNetworkAutomationService",
                        "GetServiceConnectionMap",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Creates a new ServiceConnectionMap in a given project and location.
        pub async fn create_service_connection_map(
            &mut self,
            request: impl tonic::IntoRequest<super::CreateServiceConnectionMapRequest>,
        ) -> 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.networkconnectivity.v1.CrossNetworkAutomationService/CreateServiceConnectionMap",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.networkconnectivity.v1.CrossNetworkAutomationService",
                        "CreateServiceConnectionMap",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Updates the parameters of a single ServiceConnectionMap.
        pub async fn update_service_connection_map(
            &mut self,
            request: impl tonic::IntoRequest<super::UpdateServiceConnectionMapRequest>,
        ) -> 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.networkconnectivity.v1.CrossNetworkAutomationService/UpdateServiceConnectionMap",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.networkconnectivity.v1.CrossNetworkAutomationService",
                        "UpdateServiceConnectionMap",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Deletes a single ServiceConnectionMap.
        pub async fn delete_service_connection_map(
            &mut self,
            request: impl tonic::IntoRequest<super::DeleteServiceConnectionMapRequest>,
        ) -> 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.networkconnectivity.v1.CrossNetworkAutomationService/DeleteServiceConnectionMap",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.networkconnectivity.v1.CrossNetworkAutomationService",
                        "DeleteServiceConnectionMap",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Lists ServiceConnectionPolicies in a given project and location.
        pub async fn list_service_connection_policies(
            &mut self,
            request: impl tonic::IntoRequest<super::ListServiceConnectionPoliciesRequest>,
        ) -> std::result::Result<
            tonic::Response<super::ListServiceConnectionPoliciesResponse>,
            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.networkconnectivity.v1.CrossNetworkAutomationService/ListServiceConnectionPolicies",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.networkconnectivity.v1.CrossNetworkAutomationService",
                        "ListServiceConnectionPolicies",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Gets details of a single ServiceConnectionPolicy.
        pub async fn get_service_connection_policy(
            &mut self,
            request: impl tonic::IntoRequest<super::GetServiceConnectionPolicyRequest>,
        ) -> std::result::Result<
            tonic::Response<super::ServiceConnectionPolicy>,
            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.networkconnectivity.v1.CrossNetworkAutomationService/GetServiceConnectionPolicy",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.networkconnectivity.v1.CrossNetworkAutomationService",
                        "GetServiceConnectionPolicy",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Creates a new ServiceConnectionPolicy in a given project and location.
        pub async fn create_service_connection_policy(
            &mut self,
            request: impl tonic::IntoRequest<super::CreateServiceConnectionPolicyRequest>,
        ) -> 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.networkconnectivity.v1.CrossNetworkAutomationService/CreateServiceConnectionPolicy",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.networkconnectivity.v1.CrossNetworkAutomationService",
                        "CreateServiceConnectionPolicy",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Updates the parameters of a single ServiceConnectionPolicy.
        pub async fn update_service_connection_policy(
            &mut self,
            request: impl tonic::IntoRequest<super::UpdateServiceConnectionPolicyRequest>,
        ) -> 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.networkconnectivity.v1.CrossNetworkAutomationService/UpdateServiceConnectionPolicy",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.networkconnectivity.v1.CrossNetworkAutomationService",
                        "UpdateServiceConnectionPolicy",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Deletes a single ServiceConnectionPolicy.
        pub async fn delete_service_connection_policy(
            &mut self,
            request: impl tonic::IntoRequest<super::DeleteServiceConnectionPolicyRequest>,
        ) -> 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.networkconnectivity.v1.CrossNetworkAutomationService/DeleteServiceConnectionPolicy",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.networkconnectivity.v1.CrossNetworkAutomationService",
                        "DeleteServiceConnectionPolicy",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Lists ServiceClasses in a given project and location.
        pub async fn list_service_classes(
            &mut self,
            request: impl tonic::IntoRequest<super::ListServiceClassesRequest>,
        ) -> std::result::Result<
            tonic::Response<super::ListServiceClassesResponse>,
            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.networkconnectivity.v1.CrossNetworkAutomationService/ListServiceClasses",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.networkconnectivity.v1.CrossNetworkAutomationService",
                        "ListServiceClasses",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Gets details of a single ServiceClass.
        pub async fn get_service_class(
            &mut self,
            request: impl tonic::IntoRequest<super::GetServiceClassRequest>,
        ) -> std::result::Result<tonic::Response<super::ServiceClass>, 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.networkconnectivity.v1.CrossNetworkAutomationService/GetServiceClass",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.networkconnectivity.v1.CrossNetworkAutomationService",
                        "GetServiceClass",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Updates the parameters of a single ServiceClass.
        pub async fn update_service_class(
            &mut self,
            request: impl tonic::IntoRequest<super::UpdateServiceClassRequest>,
        ) -> 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.networkconnectivity.v1.CrossNetworkAutomationService/UpdateServiceClass",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.networkconnectivity.v1.CrossNetworkAutomationService",
                        "UpdateServiceClass",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Deletes a single ServiceClass.
        pub async fn delete_service_class(
            &mut self,
            request: impl tonic::IntoRequest<super::DeleteServiceClassRequest>,
        ) -> 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.networkconnectivity.v1.CrossNetworkAutomationService/DeleteServiceClass",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.networkconnectivity.v1.CrossNetworkAutomationService",
                        "DeleteServiceClass",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Gets details of a single ServiceConnectionToken.
        pub async fn get_service_connection_token(
            &mut self,
            request: impl tonic::IntoRequest<super::GetServiceConnectionTokenRequest>,
        ) -> std::result::Result<
            tonic::Response<super::ServiceConnectionToken>,
            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.networkconnectivity.v1.CrossNetworkAutomationService/GetServiceConnectionToken",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.networkconnectivity.v1.CrossNetworkAutomationService",
                        "GetServiceConnectionToken",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Lists ServiceConnectionTokens in a given project and location.
        pub async fn list_service_connection_tokens(
            &mut self,
            request: impl tonic::IntoRequest<super::ListServiceConnectionTokensRequest>,
        ) -> std::result::Result<
            tonic::Response<super::ListServiceConnectionTokensResponse>,
            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.networkconnectivity.v1.CrossNetworkAutomationService/ListServiceConnectionTokens",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.networkconnectivity.v1.CrossNetworkAutomationService",
                        "ListServiceConnectionTokens",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Creates a new ServiceConnectionToken in a given project and location.
        pub async fn create_service_connection_token(
            &mut self,
            request: impl tonic::IntoRequest<super::CreateServiceConnectionTokenRequest>,
        ) -> 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.networkconnectivity.v1.CrossNetworkAutomationService/CreateServiceConnectionToken",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.networkconnectivity.v1.CrossNetworkAutomationService",
                        "CreateServiceConnectionToken",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Deletes a single ServiceConnectionToken.
        pub async fn delete_service_connection_token(
            &mut self,
            request: impl tonic::IntoRequest<super::DeleteServiceConnectionTokenRequest>,
        ) -> 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.networkconnectivity.v1.CrossNetworkAutomationService/DeleteServiceConnectionToken",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.networkconnectivity.v1.CrossNetworkAutomationService",
                        "DeleteServiceConnectionToken",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
    }
}
/// The `MulticloudDataTransferConfig` resource. It lists the services that you
/// configure for Data Transfer Essentials billing and metering.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MulticloudDataTransferConfig {
    /// Identifier. The name of the `MulticloudDataTransferConfig` resource.
    /// Format:
    /// `projects/{project}/locations/{location}/multicloudDataTransferConfigs/{multicloud_data_transfer_config}`.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// Output only. Time when the `MulticloudDataTransferConfig` resource was
    /// created.
    #[prost(message, optional, tag = "2")]
    pub create_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Output only. Time when the `MulticloudDataTransferConfig` resource was
    /// updated.
    #[prost(message, optional, tag = "3")]
    pub update_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Optional. User-defined labels.
    #[prost(map = "string, string", tag = "4")]
    pub labels: ::std::collections::HashMap<
        ::prost::alloc::string::String,
        ::prost::alloc::string::String,
    >,
    /// The etag is computed by the server, and might be sent with update and
    /// delete requests so that the client has an up-to-date value before
    /// proceeding.
    #[prost(string, tag = "5")]
    pub etag: ::prost::alloc::string::String,
    /// Optional. A description of this resource.
    #[prost(string, tag = "6")]
    pub description: ::prost::alloc::string::String,
    /// Output only. The number of `Destination` resources configured for the
    /// `MulticloudDataTransferConfig` resource.
    #[prost(int32, tag = "7")]
    pub destinations_count: i32,
    /// Output only. The number of `Destination` resources in use with the
    /// `MulticloudDataTransferConfig` resource.
    #[prost(int32, tag = "8")]
    pub destinations_active_count: i32,
    /// Optional. Maps services to their current or planned states. Service names
    /// are keys, and the associated values describe the state of the service. If a
    /// state change is expected, the value is either `ADDING` or `DELETING`,
    /// depending on the actions taken.
    ///
    /// Sample output:
    /// "services": {
    /// "big-query": {
    /// "states": \[
    /// {
    /// "effectiveTime": "2024-12-12T08:00:00Z"
    /// "state": "ADDING",
    /// },
    /// \]
    /// },
    /// "cloud-storage": {
    /// "states": \[
    /// {
    /// "state": "ACTIVE",
    /// }
    /// \]
    /// }
    /// }
    #[prost(map = "string, message", tag = "9")]
    pub services: ::std::collections::HashMap<
        ::prost::alloc::string::String,
        StateTimeline,
    >,
    /// Output only. The Google-generated unique ID for the
    /// `MulticloudDataTransferConfig` resource. This value is unique across all
    /// `MulticloudDataTransferConfig` resources. If a resource is deleted and
    /// another with the same name is created, the new resource is assigned a
    /// different and unique ID.
    #[prost(string, tag = "10")]
    pub uid: ::prost::alloc::string::String,
}
/// Request message to list `MulticloudDataTransferConfig` resources.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ListMulticloudDataTransferConfigsRequest {
    /// Required. The name of the parent resource.
    #[prost(string, tag = "1")]
    pub parent: ::prost::alloc::string::String,
    /// Optional. The maximum number of results listed per page.
    #[prost(int32, tag = "2")]
    pub page_size: i32,
    /// Optional. The page token.
    #[prost(string, tag = "3")]
    pub page_token: ::prost::alloc::string::String,
    /// Optional. An expression that filters the results listed in the response.
    #[prost(string, tag = "4")]
    pub filter: ::prost::alloc::string::String,
    /// Optional. The sort order of the results.
    #[prost(string, tag = "5")]
    pub order_by: ::prost::alloc::string::String,
    /// Optional. If `true`, allows partial responses for multi-regional aggregated
    /// list requests.
    #[prost(bool, tag = "6")]
    pub return_partial_success: bool,
}
/// Response message to list `MulticloudDataTransferConfig` resources.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListMulticloudDataTransferConfigsResponse {
    /// The list of `MulticloudDataTransferConfig` resources to be listed.
    #[prost(message, repeated, tag = "1")]
    pub multicloud_data_transfer_configs: ::prost::alloc::vec::Vec<
        MulticloudDataTransferConfig,
    >,
    /// The next 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 message to get the details of a `MulticloudDataTransferConfig`
/// resource.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GetMulticloudDataTransferConfigRequest {
    /// Required. The name of the `MulticloudDataTransferConfig` resource to get.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
}
/// Request message to create a `MulticloudDataTransferConfig` resource.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateMulticloudDataTransferConfigRequest {
    /// Required. The name of the parent resource.
    #[prost(string, tag = "1")]
    pub parent: ::prost::alloc::string::String,
    /// Required. The ID to use for the `MulticloudDataTransferConfig` resource,
    /// which becomes the final component of the `MulticloudDataTransferConfig`
    /// resource name.
    #[prost(string, tag = "2")]
    pub multicloud_data_transfer_config_id: ::prost::alloc::string::String,
    /// Required. The `MulticloudDataTransferConfig` resource to create.
    #[prost(message, optional, tag = "3")]
    pub multicloud_data_transfer_config: ::core::option::Option<
        MulticloudDataTransferConfig,
    >,
    /// Optional. A 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 waits
    /// for at least 60 minutes since the first request.
    ///
    /// For example, consider a situation where you make an initial request and
    /// the request times out. If you make the request again with the same request
    /// ID, the server can check if original operation with the same request ID
    /// was received, and if so, can ignore the second request. This prevents
    /// clients from accidentally creating duplicate `MulticloudDataTransferConfig`
    /// resources.
    ///
    /// The request ID must be a valid UUID with the exception that zero UUID
    /// (00000000-0000-0000-0000-000000000000) isn't supported.
    #[prost(string, tag = "4")]
    pub request_id: ::prost::alloc::string::String,
}
/// Request message to update a `MulticloudDataTransferConfig` resource.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateMulticloudDataTransferConfigRequest {
    /// Optional. `FieldMask` is used to specify the fields in the
    /// `MulticloudDataTransferConfig` resource to be overwritten by the update.
    /// The fields specified in `update_mask` are relative to the resource, not
    /// the full request. A field is overwritten if it is in the mask. If you
    /// don't specify a mask, all fields are overwritten.
    #[prost(message, optional, tag = "1")]
    pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
    /// Required. The `MulticloudDataTransferConfig` resource to update.
    #[prost(message, optional, tag = "2")]
    pub multicloud_data_transfer_config: ::core::option::Option<
        MulticloudDataTransferConfig,
    >,
    /// Optional. A 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 waits
    /// for at least 60 minutes since the first request.
    ///
    /// For example, consider a situation where you make an initial request and
    /// the request times out. If you make the request again with the same request
    /// ID, the server can check if original operation with the same request ID
    /// was received, and if so, can ignore the second request. This prevents
    /// clients from accidentally creating duplicate `MulticloudDataTransferConfig`
    /// resources.
    ///
    /// The request ID must be a valid UUID with the exception that zero UUID
    /// (00000000-0000-0000-0000-000000000000) isn't supported.
    #[prost(string, tag = "3")]
    pub request_id: ::prost::alloc::string::String,
}
/// Request message to delete a `MulticloudDataTransferConfig` resource.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct DeleteMulticloudDataTransferConfigRequest {
    /// Required. The name of the `MulticloudDataTransferConfig` resource to
    /// delete.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// Optional. A 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 waits
    /// for at least 60 minutes since the first request.
    ///
    /// For example, consider a situation where you make an initial request and
    /// the request times out. If you make the request again with the same request
    /// ID, the server can check if original operation with the same request ID
    /// was received, and if so, can ignore the second request. This prevents
    /// clients from accidentally creating duplicate `MulticloudDataTransferConfig`
    /// resources.
    ///
    /// The request ID must be a valid UUID with the exception that zero UUID
    /// (00000000-0000-0000-0000-000000000000) isn't supported.
    #[prost(string, tag = "2")]
    pub request_id: ::prost::alloc::string::String,
    /// Optional. The etag is computed by the server, and might be sent with update
    /// and delete requests so that the client has an up-to-date value before
    /// proceeding.
    #[prost(string, tag = "3")]
    pub etag: ::prost::alloc::string::String,
}
/// The `Destination` resource. It specifies the IP prefix and the associated
/// autonomous system numbers (ASN) that you want to include in a
/// `MulticloudDataTransferConfig` resource.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Destination {
    /// Identifier. The name of the `Destination` resource.
    /// Format:
    /// `projects/{project}/locations/{location}/multicloudDataTransferConfigs/{multicloud_data_transfer_config}/destinations/{destination}`.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// Output only. Time when the `Destination` resource was created.
    #[prost(message, optional, tag = "2")]
    pub create_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Output only. Time when the `Destination` resource was updated.
    #[prost(message, optional, tag = "3")]
    pub update_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Optional. User-defined labels.
    #[prost(map = "string, string", tag = "4")]
    pub labels: ::std::collections::HashMap<
        ::prost::alloc::string::String,
        ::prost::alloc::string::String,
    >,
    /// The etag is computed by the server, and might be sent with update and
    /// delete requests so that the client has an up-to-date value before
    /// proceeding.
    #[prost(string, tag = "5")]
    pub etag: ::prost::alloc::string::String,
    /// Optional. A description of this resource.
    #[prost(string, tag = "6")]
    pub description: ::prost::alloc::string::String,
    /// Required. Immutable. The IP prefix that represents your workload on another
    /// CSP.
    #[prost(string, tag = "7")]
    pub ip_prefix: ::prost::alloc::string::String,
    /// Required. Unordered list. The list of `DestinationEndpoint` resources
    /// configured for the IP prefix.
    #[prost(message, repeated, tag = "8")]
    pub endpoints: ::prost::alloc::vec::Vec<destination::DestinationEndpoint>,
    /// Output only. The timeline of the expected `Destination` states or the
    /// current rest state. If a state change is expected, the value is `ADDING`,
    /// `DELETING` or `SUSPENDING`, depending on the action specified.
    ///
    /// Example:
    /// "state_timeline": {
    /// "states": \[
    /// {
    /// // The time when the `Destination` resource will be activated.
    /// "effectiveTime": "2024-12-01T08:00:00Z",
    /// "state": "ADDING"
    /// },
    /// {
    /// // The time when the `Destination` resource will be suspended.
    /// "effectiveTime": "2024-12-01T20:00:00Z",
    /// "state": "SUSPENDING"
    /// }
    /// \]
    /// }
    #[prost(message, optional, tag = "9")]
    pub state_timeline: ::core::option::Option<StateTimeline>,
    /// Output only. The Google-generated unique ID for the `Destination` resource.
    /// This value is unique across all `Destination` resources.
    /// If a resource is deleted and another with the same name is
    /// created, the new resource is assigned a different and unique ID.
    #[prost(string, tag = "10")]
    pub uid: ::prost::alloc::string::String,
}
/// Nested message and enum types in `Destination`.
pub mod destination {
    /// The metadata for a `DestinationEndpoint` resource.
    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
    pub struct DestinationEndpoint {
        /// Required. The ASN of the remote IP prefix.
        #[prost(int64, tag = "1")]
        pub asn: i64,
        /// Required. The CSP of the remote IP prefix.
        #[prost(string, tag = "2")]
        pub csp: ::prost::alloc::string::String,
        /// Output only. The state of the `DestinationEndpoint` resource.
        #[prost(enumeration = "destination_endpoint::State", tag = "3")]
        pub state: i32,
        /// Output only. Time when the `DestinationEndpoint` resource was updated.
        #[prost(message, optional, tag = "4")]
        pub update_time: ::core::option::Option<::prost_types::Timestamp>,
    }
    /// Nested message and enum types in `DestinationEndpoint`.
    pub mod destination_endpoint {
        /// The state of the `DestinationEndpoint` resource.
        #[derive(
            Clone,
            Copy,
            Debug,
            PartialEq,
            Eq,
            Hash,
            PartialOrd,
            Ord,
            ::prost::Enumeration
        )]
        #[repr(i32)]
        pub enum State {
            /// An invalid state, which is the default case.
            Unspecified = 0,
            /// The `DestinationEndpoint` resource is valid.
            Valid = 1,
            /// The `DestinationEndpoint` resource is invalid.
            Invalid = 2,
        }
        impl State {
            /// 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 => "STATE_UNSPECIFIED",
                    Self::Valid => "VALID",
                    Self::Invalid => "INVALID",
                }
            }
            /// Creates an enum from field names used in the ProtoBuf definition.
            pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
                match value {
                    "STATE_UNSPECIFIED" => Some(Self::Unspecified),
                    "VALID" => Some(Self::Valid),
                    "INVALID" => Some(Self::Invalid),
                    _ => None,
                }
            }
        }
    }
}
/// Request message to list `Destination` resources.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ListDestinationsRequest {
    /// Required. The name of the parent resource.
    #[prost(string, tag = "1")]
    pub parent: ::prost::alloc::string::String,
    /// Optional. The maximum number of results listed per page.
    #[prost(int32, tag = "2")]
    pub page_size: i32,
    /// Optional. The page token.
    #[prost(string, tag = "3")]
    pub page_token: ::prost::alloc::string::String,
    /// Optional. An expression that filters the results listed in the response.
    #[prost(string, tag = "4")]
    pub filter: ::prost::alloc::string::String,
    /// Optional. The sort order of the results.
    #[prost(string, tag = "5")]
    pub order_by: ::prost::alloc::string::String,
    /// Optional. If `true`, allow partial responses for multi-regional aggregated
    /// list requests.
    #[prost(bool, tag = "6")]
    pub return_partial_success: bool,
}
/// Response message to list `Destination` resources.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListDestinationsResponse {
    /// The list of `Destination` resources to be listed.
    #[prost(message, repeated, tag = "1")]
    pub destinations: ::prost::alloc::vec::Vec<Destination>,
    /// The next 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 message to get the details of a `Destination` resource.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GetDestinationRequest {
    /// Required. The name of the `Destination` resource to get.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
}
/// Request message to create a `Destination` resource.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateDestinationRequest {
    /// Required. The name of the parent resource.
    #[prost(string, tag = "1")]
    pub parent: ::prost::alloc::string::String,
    /// Required. The ID to use for the `Destination` resource, which becomes the
    /// final component of the `Destination` resource name.
    #[prost(string, tag = "2")]
    pub destination_id: ::prost::alloc::string::String,
    /// Required. The `Destination` resource to create.
    #[prost(message, optional, tag = "3")]
    pub destination: ::core::option::Option<Destination>,
    /// Optional. A 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 waits
    /// for at least 60 minutes since the first request.
    ///
    /// For example, consider a situation where you make an initial request and
    /// the request times out. If you make the request again with the same request
    /// ID, the server can check if original operation with the same request ID
    /// was received, and if so, can ignore the second request. This prevents
    /// clients from accidentally creating duplicate `Destination`
    /// resources.
    ///
    /// The request ID must be a valid UUID with the exception that zero UUID
    /// (00000000-0000-0000-0000-000000000000) isn't supported.
    #[prost(string, tag = "4")]
    pub request_id: ::prost::alloc::string::String,
}
/// Request message to update a `Destination` resource.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateDestinationRequest {
    /// Optional. `FieldMask is used to specify the fields to be overwritten in the  `Destination`resource by the update.  The fields specified in`update_mask\` are relative to the resource, not
    /// the full request. A field is overwritten if it is in the mask. If you
    /// don't specify a mask, all fields are overwritten.
    #[prost(message, optional, tag = "1")]
    pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
    /// Required. The `Destination` resource to update.
    #[prost(message, optional, tag = "2")]
    pub destination: ::core::option::Option<Destination>,
    /// Optional. A 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 waits
    /// for at least 60 minutes since the first request.
    ///
    /// For example, consider a situation where you make an initial request and
    /// the request times out. If you make the request again with the same request
    /// ID, the server can check if original operation with the same request ID
    /// was received, and if so, can ignore the second request.
    ///
    /// The request ID must be a valid UUID with the exception that zero UUID
    /// (00000000-0000-0000-0000-000000000000) isn't supported.
    #[prost(string, tag = "3")]
    pub request_id: ::prost::alloc::string::String,
}
/// Request message to delete a `Destination` resource.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct DeleteDestinationRequest {
    /// Required. The name of the `Destination` resource to delete.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// Optional. A 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 waits
    /// for at least 60 minutes since the first request.
    ///
    /// For example, consider a situation where you make an initial request and
    /// the request times out. If you make the request again with the same request
    /// ID, the server can check if original operation with the same request ID
    /// was received, and if so, can ignore the second request.
    ///
    /// The request ID must be a valid UUID with the exception that zero UUID
    /// (00000000-0000-0000-0000-000000000000) isn't supported.
    #[prost(string, tag = "2")]
    pub request_id: ::prost::alloc::string::String,
    /// Optional. The etag is computed by the server, and might be sent with update
    /// and delete requests so that the client has an up-to-date value before
    /// proceeding.
    #[prost(string, tag = "3")]
    pub etag: ::prost::alloc::string::String,
}
/// The timeline of the pending states for a resource.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StateTimeline {
    /// Output only. The state and activation time details of the resource state.
    #[prost(message, repeated, tag = "1")]
    pub states: ::prost::alloc::vec::Vec<state_timeline::StateMetadata>,
}
/// Nested message and enum types in `StateTimeline`.
pub mod state_timeline {
    /// The state and activation time details of the resource state.
    #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
    pub struct StateMetadata {
        /// Output only. The state of the resource.
        #[prost(enumeration = "state_metadata::State", tag = "1")]
        pub state: i32,
        /// Output only. Accompanies only the transient states, which include
        /// `ADDING`, `DELETING`, and `SUSPENDING`, to denote the time until which
        /// the transient state of the resource will be effective. For instance, if
        /// the state is `ADDING`, this field shows the time when the resource state
        /// transitions to `ACTIVE`.
        #[prost(message, optional, tag = "2")]
        pub effective_time: ::core::option::Option<::prost_types::Timestamp>,
    }
    /// Nested message and enum types in `StateMetadata`.
    pub mod state_metadata {
        /// The state of the resource.
        #[derive(
            Clone,
            Copy,
            Debug,
            PartialEq,
            Eq,
            Hash,
            PartialOrd,
            Ord,
            ::prost::Enumeration
        )]
        #[repr(i32)]
        pub enum State {
            /// An invalid state, which is the default case.
            Unspecified = 0,
            /// The resource is being added.
            Adding = 1,
            /// The resource is in use.
            Active = 2,
            /// The resource is being deleted.
            Deleting = 3,
            /// The resource is being suspended.
            Suspending = 4,
            /// The resource is suspended and not in use.
            Suspended = 5,
        }
        impl State {
            /// 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 => "STATE_UNSPECIFIED",
                    Self::Adding => "ADDING",
                    Self::Active => "ACTIVE",
                    Self::Deleting => "DELETING",
                    Self::Suspending => "SUSPENDING",
                    Self::Suspended => "SUSPENDED",
                }
            }
            /// Creates an enum from field names used in the ProtoBuf definition.
            pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
                match value {
                    "STATE_UNSPECIFIED" => Some(Self::Unspecified),
                    "ADDING" => Some(Self::Adding),
                    "ACTIVE" => Some(Self::Active),
                    "DELETING" => Some(Self::Deleting),
                    "SUSPENDING" => Some(Self::Suspending),
                    "SUSPENDED" => Some(Self::Suspended),
                    _ => None,
                }
            }
        }
    }
}
/// A service in your project in a region that is eligible for Data Transfer
/// Essentials configuration.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MulticloudDataTransferSupportedService {
    /// Identifier. The name of the service.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// Output only. The network service tier or regional endpoint supported for
    /// the service.
    #[prost(message, repeated, tag = "2")]
    pub service_configs: ::prost::alloc::vec::Vec<ServiceConfig>,
}
/// Specifies eligibility information for the service.
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ServiceConfig {
    /// Output only. The eligibility criteria for the service.
    #[prost(enumeration = "service_config::EligibilityCriteria", tag = "1")]
    pub eligibility_criteria: i32,
    /// Output only. The end time for eligibility criteria support. If not
    /// specified, no planned end time is set.
    #[prost(message, optional, tag = "2")]
    pub support_end_time: ::core::option::Option<::prost_types::Timestamp>,
}
/// Nested message and enum types in `ServiceConfig`.
pub mod service_config {
    /// The eligibility information for the service.
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum EligibilityCriteria {
        /// The service is not eligible for Data Transfer Essentials configuration.
        /// This is the default case.
        Unspecified = 0,
        /// The service is eligible for Data Transfer Essentials configuration only
        /// for Premium Tier.
        NetworkServiceTierPremiumOnly = 1,
        /// The service is eligible for Data Transfer Essentials configuration only
        /// for Standard Tier.
        NetworkServiceTierStandardOnly = 2,
        /// The service is eligible for Data Transfer Essentials configuration only
        /// for the regional endpoint.
        RequestEndpointRegionalEndpointOnly = 3,
    }
    impl EligibilityCriteria {
        /// 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 => "ELIGIBILITY_CRITERIA_UNSPECIFIED",
                Self::NetworkServiceTierPremiumOnly => {
                    "NETWORK_SERVICE_TIER_PREMIUM_ONLY"
                }
                Self::NetworkServiceTierStandardOnly => {
                    "NETWORK_SERVICE_TIER_STANDARD_ONLY"
                }
                Self::RequestEndpointRegionalEndpointOnly => {
                    "REQUEST_ENDPOINT_REGIONAL_ENDPOINT_ONLY"
                }
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "ELIGIBILITY_CRITERIA_UNSPECIFIED" => Some(Self::Unspecified),
                "NETWORK_SERVICE_TIER_PREMIUM_ONLY" => {
                    Some(Self::NetworkServiceTierPremiumOnly)
                }
                "NETWORK_SERVICE_TIER_STANDARD_ONLY" => {
                    Some(Self::NetworkServiceTierStandardOnly)
                }
                "REQUEST_ENDPOINT_REGIONAL_ENDPOINT_ONLY" => {
                    Some(Self::RequestEndpointRegionalEndpointOnly)
                }
                _ => None,
            }
        }
    }
}
/// Request message to check if a service in your project in a region is
/// eligible for Data Transfer Essentials configuration.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GetMulticloudDataTransferSupportedServiceRequest {
    /// Required. The name of the service.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
}
/// Request message to list the services in your project that are eligible for
/// Data Transfer Essentials configuration.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ListMulticloudDataTransferSupportedServicesRequest {
    /// Required. The name of the parent resource.
    #[prost(string, tag = "1")]
    pub parent: ::prost::alloc::string::String,
    /// Optional. The maximum number of results listed per page.
    #[prost(int32, tag = "2")]
    pub page_size: i32,
    /// Optional. The page token.
    #[prost(string, tag = "3")]
    pub page_token: ::prost::alloc::string::String,
}
/// Response message to list the services in your project in regions that are
/// eligible for Data Transfer Essentials configuration.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListMulticloudDataTransferSupportedServicesResponse {
    /// The list of supported services.
    #[prost(message, repeated, tag = "1")]
    pub multicloud_data_transfer_supported_services: ::prost::alloc::vec::Vec<
        MulticloudDataTransferSupportedService,
    >,
    /// The next page token.
    #[prost(string, tag = "2")]
    pub next_page_token: ::prost::alloc::string::String,
}
/// Generated client implementations.
pub mod data_transfer_service_client {
    #![allow(
        unused_variables,
        dead_code,
        missing_docs,
        clippy::wildcard_imports,
        clippy::let_unit_value,
    )]
    use tonic::codegen::*;
    use tonic::codegen::http::Uri;
    /// DataTransferService is the service for the Data Transfer API.
    #[derive(Debug, Clone)]
    pub struct DataTransferServiceClient<T> {
        inner: tonic::client::Grpc<T>,
    }
    impl DataTransferServiceClient<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> DataTransferServiceClient<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,
        ) -> DataTransferServiceClient<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,
        {
            DataTransferServiceClient::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 the `MulticloudDataTransferConfig` resources in a specified project
        /// and location.
        pub async fn list_multicloud_data_transfer_configs(
            &mut self,
            request: impl tonic::IntoRequest<
                super::ListMulticloudDataTransferConfigsRequest,
            >,
        ) -> std::result::Result<
            tonic::Response<super::ListMulticloudDataTransferConfigsResponse>,
            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.networkconnectivity.v1.DataTransferService/ListMulticloudDataTransferConfigs",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.networkconnectivity.v1.DataTransferService",
                        "ListMulticloudDataTransferConfigs",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Gets the details of a `MulticloudDataTransferConfig` resource.
        pub async fn get_multicloud_data_transfer_config(
            &mut self,
            request: impl tonic::IntoRequest<
                super::GetMulticloudDataTransferConfigRequest,
            >,
        ) -> std::result::Result<
            tonic::Response<super::MulticloudDataTransferConfig>,
            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.networkconnectivity.v1.DataTransferService/GetMulticloudDataTransferConfig",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.networkconnectivity.v1.DataTransferService",
                        "GetMulticloudDataTransferConfig",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Creates a `MulticloudDataTransferConfig` resource in a specified project
        /// and location.
        pub async fn create_multicloud_data_transfer_config(
            &mut self,
            request: impl tonic::IntoRequest<
                super::CreateMulticloudDataTransferConfigRequest,
            >,
        ) -> 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.networkconnectivity.v1.DataTransferService/CreateMulticloudDataTransferConfig",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.networkconnectivity.v1.DataTransferService",
                        "CreateMulticloudDataTransferConfig",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Updates a `MulticloudDataTransferConfig` resource in a specified project
        /// and location.
        pub async fn update_multicloud_data_transfer_config(
            &mut self,
            request: impl tonic::IntoRequest<
                super::UpdateMulticloudDataTransferConfigRequest,
            >,
        ) -> 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.networkconnectivity.v1.DataTransferService/UpdateMulticloudDataTransferConfig",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.networkconnectivity.v1.DataTransferService",
                        "UpdateMulticloudDataTransferConfig",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Deletes a `MulticloudDataTransferConfig` resource.
        pub async fn delete_multicloud_data_transfer_config(
            &mut self,
            request: impl tonic::IntoRequest<
                super::DeleteMulticloudDataTransferConfigRequest,
            >,
        ) -> 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.networkconnectivity.v1.DataTransferService/DeleteMulticloudDataTransferConfig",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.networkconnectivity.v1.DataTransferService",
                        "DeleteMulticloudDataTransferConfig",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Lists the `Destination` resources in a specified project and location.
        pub async fn list_destinations(
            &mut self,
            request: impl tonic::IntoRequest<super::ListDestinationsRequest>,
        ) -> std::result::Result<
            tonic::Response<super::ListDestinationsResponse>,
            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.networkconnectivity.v1.DataTransferService/ListDestinations",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.networkconnectivity.v1.DataTransferService",
                        "ListDestinations",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Gets the details of a `Destination` resource.
        pub async fn get_destination(
            &mut self,
            request: impl tonic::IntoRequest<super::GetDestinationRequest>,
        ) -> std::result::Result<tonic::Response<super::Destination>, 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.networkconnectivity.v1.DataTransferService/GetDestination",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.networkconnectivity.v1.DataTransferService",
                        "GetDestination",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Creates a `Destination` resource in a specified project and location.
        pub async fn create_destination(
            &mut self,
            request: impl tonic::IntoRequest<super::CreateDestinationRequest>,
        ) -> 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.networkconnectivity.v1.DataTransferService/CreateDestination",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.networkconnectivity.v1.DataTransferService",
                        "CreateDestination",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Updates a `Destination` resource in a specified project and location.
        pub async fn update_destination(
            &mut self,
            request: impl tonic::IntoRequest<super::UpdateDestinationRequest>,
        ) -> 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.networkconnectivity.v1.DataTransferService/UpdateDestination",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.networkconnectivity.v1.DataTransferService",
                        "UpdateDestination",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Deletes a `Destination` resource.
        pub async fn delete_destination(
            &mut self,
            request: impl tonic::IntoRequest<super::DeleteDestinationRequest>,
        ) -> 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.networkconnectivity.v1.DataTransferService/DeleteDestination",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.networkconnectivity.v1.DataTransferService",
                        "DeleteDestination",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Gets the details of a service that is supported for Data Transfer
        /// Essentials.
        pub async fn get_multicloud_data_transfer_supported_service(
            &mut self,
            request: impl tonic::IntoRequest<
                super::GetMulticloudDataTransferSupportedServiceRequest,
            >,
        ) -> std::result::Result<
            tonic::Response<super::MulticloudDataTransferSupportedService>,
            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.networkconnectivity.v1.DataTransferService/GetMulticloudDataTransferSupportedService",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.networkconnectivity.v1.DataTransferService",
                        "GetMulticloudDataTransferSupportedService",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Lists the services in the project for a region that are supported for
        /// Data Transfer Essentials.
        pub async fn list_multicloud_data_transfer_supported_services(
            &mut self,
            request: impl tonic::IntoRequest<
                super::ListMulticloudDataTransferSupportedServicesRequest,
            >,
        ) -> std::result::Result<
            tonic::Response<super::ListMulticloudDataTransferSupportedServicesResponse>,
            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.networkconnectivity.v1.DataTransferService/ListMulticloudDataTransferSupportedServices",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.networkconnectivity.v1.DataTransferService",
                        "ListMulticloudDataTransferSupportedServices",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
    }
}
/// A Network Connectivity Center hub is a global management resource to which
/// you attach spokes. A single hub can contain spokes from multiple regions.
/// However, if any of a hub's spokes use the site-to-site data transfer feature,
/// the resources associated with those spokes must all be in the same VPC
/// network. Spokes that do not use site-to-site data transfer can be associated
/// with any VPC network in your project.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Hub {
    /// Immutable. The name of the hub. Hub names must be unique. They use the
    /// following form:
    /// `projects/{project_number}/locations/global/hubs/{hub_id}`
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// Output only. The time the hub was created.
    #[prost(message, optional, tag = "2")]
    pub create_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Output only. The time the hub was last updated.
    #[prost(message, optional, tag = "3")]
    pub update_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Optional labels in key-value pair format. For more information about
    /// labels, see [Requirements for
    /// labels](<https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements>).
    #[prost(map = "string, string", tag = "4")]
    pub labels: ::std::collections::HashMap<
        ::prost::alloc::string::String,
        ::prost::alloc::string::String,
    >,
    /// Optional. An optional description of the hub.
    #[prost(string, tag = "5")]
    pub description: ::prost::alloc::string::String,
    /// Output only. The Google-generated UUID for the hub. This value is unique
    /// across all hub resources. If a hub is deleted and another with the same
    /// name is created, the new hub is assigned a different unique_id.
    #[prost(string, tag = "8")]
    pub unique_id: ::prost::alloc::string::String,
    /// Output only. The current lifecycle state of this hub.
    #[prost(enumeration = "State", tag = "9")]
    pub state: i32,
    /// The VPC networks associated with this hub's spokes.
    ///
    /// This field is read-only. Network Connectivity Center automatically
    /// populates it based on the set of spokes attached to the hub.
    #[prost(message, repeated, tag = "10")]
    pub routing_vpcs: ::prost::alloc::vec::Vec<RoutingVpc>,
    /// Output only. The route tables that belong to this hub. They use the
    /// following form:
    /// `projects/{project_number}/locations/global/hubs/{hub_id}/routeTables/{route_table_id}`
    ///
    /// This field is read-only. Network Connectivity Center automatically
    /// populates it based on the route tables nested under the hub.
    #[prost(string, repeated, tag = "11")]
    pub route_tables: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    /// Output only. A summary of the spokes associated with a hub. The
    /// summary includes a count of spokes according to type
    /// and according to state. If any spokes are inactive,
    /// the summary also lists the reasons they are inactive,
    /// including a count for each reason.
    #[prost(message, optional, tag = "12")]
    pub spoke_summary: ::core::option::Option<SpokeSummary>,
    /// Optional. The policy mode of this hub. This field can be either
    /// PRESET or CUSTOM. If unspecified, the
    /// policy_mode defaults to PRESET.
    #[prost(enumeration = "PolicyMode", tag = "13")]
    pub policy_mode: i32,
    /// Optional. The topology implemented in this hub. Currently, this field is
    /// only used when policy_mode = PRESET. The available preset topologies are
    /// MESH and STAR. If preset_topology is unspecified and policy_mode = PRESET,
    /// the preset_topology defaults to MESH. When policy_mode = CUSTOM,
    /// the preset_topology is set to PRESET_TOPOLOGY_UNSPECIFIED.
    #[prost(enumeration = "PresetTopology", tag = "14")]
    pub preset_topology: i32,
    /// Optional. Whether Private Service Connect connection propagation is enabled
    /// for the hub. If true, Private Service Connect endpoints in VPC spokes
    /// attached to the hub are made accessible to other VPC spokes attached to the
    /// hub. The default value is false.
    #[prost(bool, optional, tag = "15")]
    pub export_psc: ::core::option::Option<bool>,
}
/// RoutingVPC contains information about the VPC networks associated
/// with the spokes of a Network Connectivity Center hub.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct RoutingVpc {
    /// The URI of the VPC network.
    #[prost(string, tag = "1")]
    pub uri: ::prost::alloc::string::String,
    /// Output only. If true, indicates that this VPC network is currently
    /// associated with spokes that use the data transfer feature (spokes where the
    /// site_to_site_data_transfer field is set to true). If you create new spokes
    /// that use data transfer, they must be associated with this VPC network. At
    /// most, one VPC network will have this field set to true.
    #[prost(bool, tag = "2")]
    pub required_for_new_site_to_site_data_transfer_spokes: bool,
}
/// A Network Connectivity Center spoke represents one or more network
/// connectivity resources.
///
/// When you create a spoke, you associate it with a hub. You must also
/// identify a value for exactly one of the following fields:
///
/// * linked_vpn_tunnels
/// * linked_interconnect_attachments
/// * linked_router_appliance_instances
/// * linked_vpc_network
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Spoke {
    /// Immutable. The name of the spoke. Spoke names must be unique. They use the
    /// following form:
    /// `projects/{project_number}/locations/{region}/spokes/{spoke_id}`
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// Output only. The time the spoke was created.
    #[prost(message, optional, tag = "2")]
    pub create_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Output only. The time the spoke was last updated.
    #[prost(message, optional, tag = "3")]
    pub update_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Optional labels in key-value pair format. For more information about
    /// labels, see [Requirements for
    /// labels](<https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements>).
    #[prost(map = "string, string", tag = "4")]
    pub labels: ::std::collections::HashMap<
        ::prost::alloc::string::String,
        ::prost::alloc::string::String,
    >,
    /// Optional. An optional description of the spoke.
    #[prost(string, tag = "5")]
    pub description: ::prost::alloc::string::String,
    /// Immutable. The name of the hub that this spoke is attached to.
    #[prost(string, tag = "6")]
    pub hub: ::prost::alloc::string::String,
    /// Optional. The name of the group that this spoke is associated with.
    #[prost(string, tag = "23")]
    pub group: ::prost::alloc::string::String,
    /// Optional. VPN tunnels that are associated with the spoke.
    #[prost(message, optional, tag = "17")]
    pub linked_vpn_tunnels: ::core::option::Option<LinkedVpnTunnels>,
    /// Optional. VLAN attachments that are associated with the spoke.
    #[prost(message, optional, tag = "18")]
    pub linked_interconnect_attachments: ::core::option::Option<
        LinkedInterconnectAttachments,
    >,
    /// Optional. Router appliance instances that are associated with the spoke.
    #[prost(message, optional, tag = "19")]
    pub linked_router_appliance_instances: ::core::option::Option<
        LinkedRouterApplianceInstances,
    >,
    /// Optional. VPC network that is associated with the spoke.
    #[prost(message, optional, tag = "20")]
    pub linked_vpc_network: ::core::option::Option<LinkedVpcNetwork>,
    /// Optional. The linked producer VPC that is associated with the spoke.
    #[prost(message, optional, tag = "26")]
    pub linked_producer_vpc_network: ::core::option::Option<LinkedProducerVpcNetwork>,
    /// Output only. The Google-generated UUID for the spoke. This value is unique
    /// across all spoke resources. If a spoke is deleted and another with the same
    /// name is created, the new spoke is assigned a different `unique_id`.
    #[prost(string, tag = "11")]
    pub unique_id: ::prost::alloc::string::String,
    /// Output only. The current lifecycle state of this spoke.
    #[prost(enumeration = "State", tag = "15")]
    pub state: i32,
    /// Output only. The reasons for current state of the spoke.
    #[prost(message, repeated, tag = "21")]
    pub reasons: ::prost::alloc::vec::Vec<spoke::StateReason>,
    /// Output only. The type of resource associated with the spoke.
    #[prost(enumeration = "SpokeType", tag = "22")]
    pub spoke_type: i32,
    /// Optional. This checksum is computed by the server based on the value of
    /// other fields, and may be sent on update and delete requests to ensure the
    /// client has an up-to-date value before proceeding.
    #[prost(string, tag = "27")]
    pub etag: ::prost::alloc::string::String,
    /// Optional. The list of fields waiting for hub administration's approval.
    #[prost(string, repeated, tag = "28")]
    pub field_paths_pending_update: ::prost::alloc::vec::Vec<
        ::prost::alloc::string::String,
    >,
}
/// Nested message and enum types in `Spoke`.
pub mod spoke {
    /// The reason a spoke is inactive.
    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
    pub struct StateReason {
        /// The code associated with this reason.
        #[prost(enumeration = "state_reason::Code", tag = "1")]
        pub code: i32,
        /// Human-readable details about this reason.
        #[prost(string, tag = "2")]
        pub message: ::prost::alloc::string::String,
        /// Additional information provided by the user in the RejectSpoke call.
        #[prost(string, tag = "3")]
        pub user_details: ::prost::alloc::string::String,
    }
    /// Nested message and enum types in `StateReason`.
    pub mod state_reason {
        /// The Code enum represents the various reasons a state can be `INACTIVE`.
        #[derive(
            Clone,
            Copy,
            Debug,
            PartialEq,
            Eq,
            Hash,
            PartialOrd,
            Ord,
            ::prost::Enumeration
        )]
        #[repr(i32)]
        pub enum Code {
            /// No information available.
            Unspecified = 0,
            /// The proposed spoke is pending review.
            PendingReview = 1,
            /// The proposed spoke has been rejected by the hub administrator.
            Rejected = 2,
            /// The spoke has been deactivated internally.
            Paused = 3,
            /// Network Connectivity Center encountered errors while accepting
            /// the spoke.
            Failed = 4,
            /// The proposed spoke update is pending review.
            UpdatePendingReview = 5,
            /// The proposed spoke update has been rejected by the hub administrator.
            UpdateRejected = 6,
            /// Network Connectivity Center encountered errors while accepting
            /// the spoke update.
            UpdateFailed = 7,
        }
        impl Code {
            /// 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 => "CODE_UNSPECIFIED",
                    Self::PendingReview => "PENDING_REVIEW",
                    Self::Rejected => "REJECTED",
                    Self::Paused => "PAUSED",
                    Self::Failed => "FAILED",
                    Self::UpdatePendingReview => "UPDATE_PENDING_REVIEW",
                    Self::UpdateRejected => "UPDATE_REJECTED",
                    Self::UpdateFailed => "UPDATE_FAILED",
                }
            }
            /// Creates an enum from field names used in the ProtoBuf definition.
            pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
                match value {
                    "CODE_UNSPECIFIED" => Some(Self::Unspecified),
                    "PENDING_REVIEW" => Some(Self::PendingReview),
                    "REJECTED" => Some(Self::Rejected),
                    "PAUSED" => Some(Self::Paused),
                    "FAILED" => Some(Self::Failed),
                    "UPDATE_PENDING_REVIEW" => Some(Self::UpdatePendingReview),
                    "UPDATE_REJECTED" => Some(Self::UpdateRejected),
                    "UPDATE_FAILED" => Some(Self::UpdateFailed),
                    _ => None,
                }
            }
        }
    }
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RouteTable {
    /// Immutable. The name of the route table. Route table names must be unique.
    /// They use the following form:
    /// `projects/{project_number}/locations/global/hubs/{hub}/routeTables/{route_table_id}`
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// Output only. The time the route table was created.
    #[prost(message, optional, tag = "2")]
    pub create_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Output only. The time the route table was last updated.
    #[prost(message, optional, tag = "3")]
    pub update_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Optional labels in key-value pair format. For more information about
    /// labels, see [Requirements for
    /// labels](<https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements>).
    #[prost(map = "string, string", tag = "4")]
    pub labels: ::std::collections::HashMap<
        ::prost::alloc::string::String,
        ::prost::alloc::string::String,
    >,
    /// An optional description of the route table.
    #[prost(string, tag = "5")]
    pub description: ::prost::alloc::string::String,
    /// Output only. The Google-generated UUID for the route table. This value is
    /// unique across all route table resources. If a route table is deleted and
    /// another with the same name is created, the new route table is assigned
    /// a different `uid`.
    #[prost(string, tag = "6")]
    pub uid: ::prost::alloc::string::String,
    /// Output only. The current lifecycle state of this route table.
    #[prost(enumeration = "State", tag = "7")]
    pub state: i32,
}
/// A route defines a path from VM instances within a spoke to a specific
/// destination resource. Only VPC spokes have routes.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Route {
    /// Immutable. The name of the route. Route names must be unique. Route names
    /// use the following form:
    /// `projects/{project_number}/locations/global/hubs/{hub}/routeTables/{route_table_id}/routes/{route_id}`
    #[prost(string, tag = "3")]
    pub name: ::prost::alloc::string::String,
    /// Output only. The time the route was created.
    #[prost(message, optional, tag = "4")]
    pub create_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Output only. The time the route was last updated.
    #[prost(message, optional, tag = "5")]
    pub update_time: ::core::option::Option<::prost_types::Timestamp>,
    /// The destination IP address range.
    #[prost(string, tag = "1")]
    pub ip_cidr_range: ::prost::alloc::string::String,
    /// Output only. The route's type. Its type is determined by the properties of
    /// its IP address range.
    #[prost(enumeration = "RouteType", tag = "10")]
    pub r#type: i32,
    /// Immutable. The destination VPC network for packets on this route.
    #[prost(message, optional, tag = "2")]
    pub next_hop_vpc_network: ::core::option::Option<NextHopVpcNetwork>,
    /// Optional labels in key-value pair format. For more information about
    /// labels, see [Requirements for
    /// labels](<https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements>).
    #[prost(map = "string, string", tag = "6")]
    pub labels: ::std::collections::HashMap<
        ::prost::alloc::string::String,
        ::prost::alloc::string::String,
    >,
    /// An optional description of the route.
    #[prost(string, tag = "7")]
    pub description: ::prost::alloc::string::String,
    /// Output only. The Google-generated UUID for the route. This value is unique
    /// across all Network Connectivity Center route resources. If a
    /// route is deleted and another with the same name is created,
    /// the new route is assigned a different `uid`.
    #[prost(string, tag = "8")]
    pub uid: ::prost::alloc::string::String,
    /// Output only. The current lifecycle state of the route.
    #[prost(enumeration = "State", tag = "9")]
    pub state: i32,
    /// Immutable. The spoke that this route leads to.
    /// Example: projects/12345/locations/global/spokes/SPOKE
    #[prost(string, tag = "11")]
    pub spoke: ::prost::alloc::string::String,
    /// Output only. The origin location of the route.
    /// Uses the following form: "projects/{project}/locations/{location}"
    /// Example: projects/1234/locations/us-central1
    #[prost(string, tag = "12")]
    pub location: ::prost::alloc::string::String,
    /// Output only. The priority of this route. Priority is used to break ties in
    /// cases where a destination matches more than one route. In these cases the
    /// route with the lowest-numbered priority value wins.
    #[prost(int64, tag = "13")]
    pub priority: i64,
    /// Immutable. The next-hop VPN tunnel for packets on this route.
    #[prost(message, optional, tag = "14")]
    pub next_hop_vpn_tunnel: ::core::option::Option<NextHopVpnTunnel>,
    /// Immutable. The next-hop Router appliance instance for packets on this
    /// route.
    #[prost(message, optional, tag = "15")]
    pub next_hop_router_appliance_instance: ::core::option::Option<
        NextHopRouterApplianceInstance,
    >,
    /// Immutable. The next-hop VLAN attachment for packets on this route.
    #[prost(message, optional, tag = "16")]
    pub next_hop_interconnect_attachment: ::core::option::Option<
        NextHopInterconnectAttachment,
    >,
}
/// A group represents a subset of spokes attached to a hub.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Group {
    /// Immutable. The name of the group. Group names must be unique. They
    /// use the following form:
    /// `projects/{project_number}/locations/global/hubs/{hub}/groups/{group_id}`
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// Output only. The time the group was created.
    #[prost(message, optional, tag = "2")]
    pub create_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Output only. The time the group was last updated.
    #[prost(message, optional, tag = "3")]
    pub update_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Optional. Labels in key-value pair format. For more information about
    /// labels, see [Requirements for
    /// labels](<https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements>).
    #[prost(map = "string, string", tag = "4")]
    pub labels: ::std::collections::HashMap<
        ::prost::alloc::string::String,
        ::prost::alloc::string::String,
    >,
    /// Optional. The description of the group.
    #[prost(string, tag = "5")]
    pub description: ::prost::alloc::string::String,
    /// Output only. The Google-generated UUID for the group. This value is unique
    /// across all group resources. If a group is deleted and
    /// another with the same name is created, the new route table is assigned
    /// a different unique_id.
    #[prost(string, tag = "6")]
    pub uid: ::prost::alloc::string::String,
    /// Output only. The current lifecycle state of this group.
    #[prost(enumeration = "State", tag = "7")]
    pub state: i32,
    /// Optional. The auto-accept setting for this group.
    #[prost(message, optional, tag = "8")]
    pub auto_accept: ::core::option::Option<AutoAccept>,
    /// Output only. The name of the route table that corresponds to this group.
    /// They use the following form:
    /// `projects/{project_number}/locations/global/hubs/{hub_id}/routeTables/{route_table_id}`
    #[prost(string, tag = "9")]
    pub route_table: ::prost::alloc::string::String,
}
/// The auto-accept setting for a group controls whether
/// proposed spokes are automatically attached to the hub. If auto-accept is
/// enabled, the spoke immediately is attached to the hub and becomes part of the
/// group. In this case, the new spoke is in the ACTIVE state.
/// If auto-accept is disabled, the spoke goes to the INACTIVE
/// state, and it must be reviewed and accepted by a hub
/// administrator.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct AutoAccept {
    /// Optional. A list of project ids or project numbers for which you want
    /// to enable auto-accept. The auto-accept setting is applied to
    /// spokes being created or updated in these projects.
    #[prost(string, repeated, tag = "1")]
    pub auto_accept_projects: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
/// Request for
/// \[HubService.ListHubs\]\[google.cloud.networkconnectivity.v1.HubService.ListHubs\]
/// method.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ListHubsRequest {
    /// Required. The parent resource's name.
    #[prost(string, tag = "1")]
    pub parent: ::prost::alloc::string::String,
    /// The maximum number of results per page to return.
    #[prost(int32, tag = "2")]
    pub page_size: i32,
    /// The page token.
    #[prost(string, tag = "3")]
    pub page_token: ::prost::alloc::string::String,
    /// An expression that filters the list of results.
    #[prost(string, tag = "4")]
    pub filter: ::prost::alloc::string::String,
    /// Sort the results by a certain order.
    #[prost(string, tag = "5")]
    pub order_by: ::prost::alloc::string::String,
}
/// Response for
/// \[HubService.ListHubs\]\[google.cloud.networkconnectivity.v1.HubService.ListHubs\]
/// method.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListHubsResponse {
    /// The requested hubs.
    #[prost(message, repeated, tag = "1")]
    pub hubs: ::prost::alloc::vec::Vec<Hub>,
    /// The token for the next page of the response. To see more results,
    /// use this value as the page_token for your next request. If this value
    /// is empty, there are no more results.
    #[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 for
/// \[HubService.GetHub\]\[google.cloud.networkconnectivity.v1.HubService.GetHub\]
/// method.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GetHubRequest {
    /// Required. The name of the hub resource to get.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
}
/// Request for
/// \[HubService.CreateHub\]\[google.cloud.networkconnectivity.v1.HubService.CreateHub\]
/// method.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateHubRequest {
    /// Required. The parent resource.
    #[prost(string, tag = "1")]
    pub parent: ::prost::alloc::string::String,
    /// Required. A unique identifier for the hub.
    #[prost(string, tag = "2")]
    pub hub_id: ::prost::alloc::string::String,
    /// Required. The initial values for a new hub.
    #[prost(message, optional, tag = "3")]
    pub hub: ::core::option::Option<Hub>,
    /// Optional. A request ID to identify requests. Specify a unique request ID so
    /// that if you must retry your request, the server knows to ignore the request
    /// if it has already been completed. The server guarantees that a request
    /// doesn't result in creation of duplicate commitments for at least 60
    /// minutes.
    ///
    /// For example, consider a situation where you make an initial request and
    /// the request times out. If you make the request again with the same request
    /// ID, the server can check to see whether the original operation
    /// was received. If it was, the server ignores the second request. This
    /// behavior prevents clients from mistakenly 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,
}
/// Request for
/// \[HubService.UpdateHub\]\[google.cloud.networkconnectivity.v1.HubService.UpdateHub\]
/// method.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateHubRequest {
    /// Optional. In the case of an update to an existing hub, field mask is used
    /// to specify the fields to be overwritten. 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 provide a mask, then
    /// all fields are overwritten.
    #[prost(message, optional, tag = "1")]
    pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
    /// Required. The state that the hub should be in after the update.
    #[prost(message, optional, tag = "2")]
    pub hub: ::core::option::Option<Hub>,
    /// Optional. A request ID to identify requests. Specify a unique request ID so
    /// that if you must retry your request, the server knows to ignore the request
    /// if it has already been completed. The server guarantees that a request
    /// doesn't result in creation of duplicate commitments for at least 60
    /// minutes.
    ///
    /// For example, consider a situation where you make an initial request and
    /// the request times out. If you make the request again with the same request
    /// ID, the server can check to see whether the original operation
    /// was received. If it was, the server ignores the second request. This
    /// behavior prevents clients from mistakenly 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,
}
/// The request for
/// \[HubService.DeleteHub\]\[google.cloud.networkconnectivity.v1.HubService.DeleteHub\].
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct DeleteHubRequest {
    /// Required. The name of the hub to delete.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// Optional. A request ID to identify requests. Specify a unique request ID so
    /// that if you must retry your request, the server knows to ignore the request
    /// if it has already been completed. The server guarantees that a request
    /// doesn't result in creation of duplicate commitments for at least 60
    /// minutes.
    ///
    /// For example, consider a situation where you make an initial request and
    /// the request times out. If you make the request again with the same request
    /// ID, the server can check to see whether the original operation
    /// was received. If it was, the server ignores the second request. This
    /// behavior prevents clients from mistakenly 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 request for
/// \[HubService.ListHubSpokes\]\[google.cloud.networkconnectivity.v1.HubService.ListHubSpokes\].
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ListHubSpokesRequest {
    /// Required. The name of the hub.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// A list of locations.
    /// Specify one of the following: `\[global\]`, a single region (for
    /// example, `\[us-central1\]`), or a combination of
    /// values (for example, `\[global, us-central1, us-west1\]`).
    /// If the spoke_locations field is populated, the list of results
    /// includes only spokes in the specified location.
    /// If the spoke_locations field is not populated, the list of results
    /// includes spokes in all locations.
    #[prost(string, repeated, tag = "2")]
    pub spoke_locations: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    /// The maximum number of results to return per page.
    #[prost(int32, tag = "3")]
    pub page_size: i32,
    /// The page token.
    #[prost(string, tag = "4")]
    pub page_token: ::prost::alloc::string::String,
    /// An expression that filters the list of results.
    #[prost(string, tag = "5")]
    pub filter: ::prost::alloc::string::String,
    /// Sort the results by name or create_time.
    #[prost(string, tag = "6")]
    pub order_by: ::prost::alloc::string::String,
    /// The view of the spoke to return.
    /// The view that you use determines which spoke fields are included in the
    /// response.
    #[prost(enumeration = "list_hub_spokes_request::SpokeView", tag = "7")]
    pub view: i32,
}
/// Nested message and enum types in `ListHubSpokesRequest`.
pub mod list_hub_spokes_request {
    /// Enum that controls which spoke fields are included in the response.
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum SpokeView {
        /// The spoke view is unspecified. When the spoke view is unspecified, the
        /// API returns the same fields as the `BASIC` view.
        Unspecified = 0,
        /// Includes `name`, `create_time`, `hub`, `unique_id`, `state`, `reasons`,
        /// and `spoke_type`. This is the default value.
        Basic = 1,
        /// Includes all spoke fields except `labels`.
        /// You can use the `DETAILED` view only when you set the `spoke_locations`
        /// field to `\[global\]`.
        Detailed = 2,
    }
    impl SpokeView {
        /// 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 => "SPOKE_VIEW_UNSPECIFIED",
                Self::Basic => "BASIC",
                Self::Detailed => "DETAILED",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "SPOKE_VIEW_UNSPECIFIED" => Some(Self::Unspecified),
                "BASIC" => Some(Self::Basic),
                "DETAILED" => Some(Self::Detailed),
                _ => None,
            }
        }
    }
}
/// The response for
/// \[HubService.ListHubSpokes\]\[google.cloud.networkconnectivity.v1.HubService.ListHubSpokes\].
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListHubSpokesResponse {
    /// The requested spokes.
    /// The spoke fields can be partially populated based on the `view` field in
    /// the request message.
    #[prost(message, repeated, tag = "1")]
    pub spokes: ::prost::alloc::vec::Vec<Spoke>,
    /// The token for the next page of the response. To see more results,
    /// use this value as the page_token for your next request. If this value
    /// is empty, there are no more results.
    #[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>,
}
/// The request for
/// \[HubService.QueryHubStatus\]\[google.cloud.networkconnectivity.v1.HubService.QueryHubStatus\].
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct QueryHubStatusRequest {
    /// Required. The name of the hub.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// Optional. The maximum number of results to return per page.
    #[prost(int32, tag = "2")]
    pub page_size: i32,
    /// Optional. The page token.
    #[prost(string, tag = "3")]
    pub page_token: ::prost::alloc::string::String,
    /// Optional. An expression that filters the list of results.
    /// The filter can be used to filter the results by the following fields:
    ///
    /// * `psc_propagation_status.source_spoke`
    /// * `psc_propagation_status.source_group`
    /// * `psc_propagation_status.source_forwarding_rule`
    /// * `psc_propagation_status.target_spoke`
    /// * `psc_propagation_status.target_group`
    /// * `psc_propagation_status.code`
    /// * `psc_propagation_status.message`
    #[prost(string, tag = "4")]
    pub filter: ::prost::alloc::string::String,
    /// Optional. Sort the results in ascending order by the specified fields.
    /// A comma-separated list of any of these fields:
    ///
    /// * `psc_propagation_status.source_spoke`
    /// * `psc_propagation_status.source_group`
    /// * `psc_propagation_status.source_forwarding_rule`
    /// * `psc_propagation_status.target_spoke`
    /// * `psc_propagation_status.target_group`
    /// * `psc_propagation_status.code`
    ///   If `group_by` is set, the value of the `order_by` field must be the
    ///   same as or a subset of the `group_by` field.
    #[prost(string, tag = "5")]
    pub order_by: ::prost::alloc::string::String,
    /// Optional. Aggregate the results by the specified fields.
    /// A comma-separated list of any of these fields:
    ///
    /// * `psc_propagation_status.source_spoke`
    /// * `psc_propagation_status.source_group`
    /// * `psc_propagation_status.source_forwarding_rule`
    /// * `psc_propagation_status.target_spoke`
    /// * `psc_propagation_status.target_group`
    /// * `psc_propagation_status.code`
    #[prost(string, tag = "6")]
    pub group_by: ::prost::alloc::string::String,
}
/// The response for
/// \[HubService.QueryHubStatus\]\[google.cloud.networkconnectivity.v1.HubService.QueryHubStatus\].
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryHubStatusResponse {
    /// The list of hub status.
    #[prost(message, repeated, tag = "1")]
    pub hub_status_entries: ::prost::alloc::vec::Vec<HubStatusEntry>,
    /// The token for the next page of the response. To see more results,
    /// use this value as the page_token for your next request. If this value
    /// is empty, there are no more results.
    #[prost(string, tag = "2")]
    pub next_page_token: ::prost::alloc::string::String,
}
/// A hub status entry represents the status of a set of propagated Private
/// Service Connect connections grouped by certain fields.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct HubStatusEntry {
    /// The number of propagated Private Service Connect connections with this
    /// status. If the `group_by` field was not set in the request message, the
    /// value of this field is 1.
    #[prost(int32, tag = "1")]
    pub count: i32,
    /// The fields that this entry is grouped by. This has the same value as the
    /// `group_by` field in the request message.
    #[prost(string, tag = "2")]
    pub group_by: ::prost::alloc::string::String,
    /// The Private Service Connect propagation status.
    #[prost(message, optional, tag = "3")]
    pub psc_propagation_status: ::core::option::Option<PscPropagationStatus>,
}
/// The status of one or more propagated Private Service Connect connections in a
/// hub.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct PscPropagationStatus {
    /// The name of the spoke that the source forwarding rule belongs to.
    #[prost(string, tag = "1")]
    pub source_spoke: ::prost::alloc::string::String,
    /// The name of the group that the source spoke belongs to.
    #[prost(string, tag = "2")]
    pub source_group: ::prost::alloc::string::String,
    /// The name of the forwarding rule exported to the hub.
    #[prost(string, tag = "3")]
    pub source_forwarding_rule: ::prost::alloc::string::String,
    /// The name of the spoke that the source forwarding rule propagates to.
    #[prost(string, tag = "4")]
    pub target_spoke: ::prost::alloc::string::String,
    /// The name of the group that the target spoke belongs to.
    #[prost(string, tag = "5")]
    pub target_group: ::prost::alloc::string::String,
    /// The propagation status.
    #[prost(enumeration = "psc_propagation_status::Code", tag = "6")]
    pub code: i32,
    /// The human-readable summary of the Private Service Connect connection
    /// propagation status.
    #[prost(string, tag = "7")]
    pub message: ::prost::alloc::string::String,
}
/// Nested message and enum types in `PscPropagationStatus`.
pub mod psc_propagation_status {
    /// The Code enum represents the state of the Private Service Connect
    /// propagation.
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum Code {
        /// The code is unspecified.
        Unspecified = 0,
        /// The propagated Private Service Connect connection is ready.
        Ready = 1,
        /// The Private Service Connect connection is propagating. This is a
        /// transient state.
        Propagating = 2,
        /// The Private Service Connect connection propagation failed because the VPC
        /// network or the project of the target spoke has exceeded the connection
        /// limit set by the producer.
        ErrorProducerPropagatedConnectionLimitExceeded = 3,
        /// The Private Service Connect connection propagation failed because the NAT
        /// IP subnet space has been exhausted. It is equivalent to the `Needs  attention` status of the Private Service Connect connection. See
        /// <https://cloud.google.com/vpc/docs/about-accessing-vpc-hosted-services-endpoints#connection-statuses.>
        ErrorProducerNatIpSpaceExhausted = 4,
        /// The Private Service Connect connection propagation failed because the
        /// `PSC_ILB_CONSUMER_FORWARDING_RULES_PER_PRODUCER_NETWORK` quota in the
        /// producer VPC network has been exceeded.
        ErrorProducerQuotaExceeded = 5,
        /// The Private Service Connect connection propagation failed because the
        /// `PSC_PROPAGATED_CONNECTIONS_PER_VPC_NETWORK` quota in the consumer
        /// VPC network has been exceeded.
        ErrorConsumerQuotaExceeded = 6,
    }
    impl Code {
        /// 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 => "CODE_UNSPECIFIED",
                Self::Ready => "READY",
                Self::Propagating => "PROPAGATING",
                Self::ErrorProducerPropagatedConnectionLimitExceeded => {
                    "ERROR_PRODUCER_PROPAGATED_CONNECTION_LIMIT_EXCEEDED"
                }
                Self::ErrorProducerNatIpSpaceExhausted => {
                    "ERROR_PRODUCER_NAT_IP_SPACE_EXHAUSTED"
                }
                Self::ErrorProducerQuotaExceeded => "ERROR_PRODUCER_QUOTA_EXCEEDED",
                Self::ErrorConsumerQuotaExceeded => "ERROR_CONSUMER_QUOTA_EXCEEDED",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "CODE_UNSPECIFIED" => Some(Self::Unspecified),
                "READY" => Some(Self::Ready),
                "PROPAGATING" => Some(Self::Propagating),
                "ERROR_PRODUCER_PROPAGATED_CONNECTION_LIMIT_EXCEEDED" => {
                    Some(Self::ErrorProducerPropagatedConnectionLimitExceeded)
                }
                "ERROR_PRODUCER_NAT_IP_SPACE_EXHAUSTED" => {
                    Some(Self::ErrorProducerNatIpSpaceExhausted)
                }
                "ERROR_PRODUCER_QUOTA_EXCEEDED" => Some(Self::ErrorProducerQuotaExceeded),
                "ERROR_CONSUMER_QUOTA_EXCEEDED" => Some(Self::ErrorConsumerQuotaExceeded),
                _ => None,
            }
        }
    }
}
/// The request for
/// \[HubService.ListSpokes\]\[google.cloud.networkconnectivity.v1.HubService.ListSpokes\].
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ListSpokesRequest {
    /// Required. The parent resource.
    #[prost(string, tag = "1")]
    pub parent: ::prost::alloc::string::String,
    /// The maximum number of results to return per page.
    #[prost(int32, tag = "2")]
    pub page_size: i32,
    /// The page token.
    #[prost(string, tag = "3")]
    pub page_token: ::prost::alloc::string::String,
    /// An expression that filters the list of results.
    #[prost(string, tag = "4")]
    pub filter: ::prost::alloc::string::String,
    /// Sort the results by a certain order.
    #[prost(string, tag = "5")]
    pub order_by: ::prost::alloc::string::String,
}
/// The response for
/// \[HubService.ListSpokes\]\[google.cloud.networkconnectivity.v1.HubService.ListSpokes\].
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListSpokesResponse {
    /// The requested spokes.
    #[prost(message, repeated, tag = "1")]
    pub spokes: ::prost::alloc::vec::Vec<Spoke>,
    /// The token for the next page of the response. To see more results,
    /// use this value as the page_token for your next request. If this value
    /// is empty, there are no more results.
    #[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>,
}
/// The request for
/// \[HubService.GetSpoke\]\[google.cloud.networkconnectivity.v1.HubService.GetSpoke\].
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GetSpokeRequest {
    /// Required. The name of the spoke resource.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
}
/// The request for
/// \[HubService.CreateSpoke\]\[google.cloud.networkconnectivity.v1.HubService.CreateSpoke\].
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateSpokeRequest {
    /// Required. The parent resource.
    #[prost(string, tag = "1")]
    pub parent: ::prost::alloc::string::String,
    /// Required. Unique id for the spoke to create.
    #[prost(string, tag = "2")]
    pub spoke_id: ::prost::alloc::string::String,
    /// Required. The initial values for a new spoke.
    #[prost(message, optional, tag = "3")]
    pub spoke: ::core::option::Option<Spoke>,
    /// Optional. A request ID to identify requests. Specify a unique request ID so
    /// that if you must retry your request, the server knows to ignore the request
    /// if it has already been completed. The server guarantees that a request
    /// doesn't result in creation of duplicate commitments for at least 60
    /// minutes.
    ///
    /// For example, consider a situation where you make an initial request and
    /// the request times out. If you make the request again with the same request
    /// ID, the server can check to see whether the original operation
    /// was received. If it was, the server ignores the second request. This
    /// behavior prevents clients from mistakenly 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,
}
/// Request for
/// \[HubService.UpdateSpoke\]\[google.cloud.networkconnectivity.v1.HubService.UpdateSpoke\]
/// method.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateSpokeRequest {
    /// Optional. In the case of an update to an existing spoke, field mask is used
    /// to specify the fields to be overwritten. 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 provide a mask, then
    /// all fields are overwritten.
    #[prost(message, optional, tag = "1")]
    pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
    /// Required. The state that the spoke should be in after the update.
    #[prost(message, optional, tag = "2")]
    pub spoke: ::core::option::Option<Spoke>,
    /// Optional. A request ID to identify requests. Specify a unique request ID so
    /// that if you must retry your request, the server knows to ignore the request
    /// if it has already been completed. The server guarantees that a request
    /// doesn't result in creation of duplicate commitments for at least 60
    /// minutes.
    ///
    /// For example, consider a situation where you make an initial request and
    /// the request times out. If you make the request again with the same request
    /// ID, the server can check to see whether the original operation
    /// was received. If it was, the server ignores the second request. This
    /// behavior prevents clients from mistakenly 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,
}
/// The request for
/// \[HubService.DeleteSpoke\]\[google.cloud.networkconnectivity.v1.HubService.DeleteSpoke\].
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct DeleteSpokeRequest {
    /// Required. The name of the spoke to delete.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// Optional. A request ID to identify requests. Specify a unique request ID so
    /// that if you must retry your request, the server knows to ignore the request
    /// if it has already been completed. The server guarantees that a request
    /// doesn't result in creation of duplicate commitments for at least 60
    /// minutes.
    ///
    /// For example, consider a situation where you make an initial request and
    /// the request times out. If you make the request again with the same request
    /// ID, the server can check to see whether the original operation
    /// was received. If it was, the server ignores the second request. This
    /// behavior prevents clients from mistakenly 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 request for
/// \[HubService.AcceptHubSpoke\]\[google.cloud.networkconnectivity.v1.HubService.AcceptHubSpoke\].
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct AcceptHubSpokeRequest {
    /// Required. The name of the hub into which to accept the spoke.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// Required. The URI of the spoke to accept into the hub.
    #[prost(string, tag = "2")]
    pub spoke_uri: ::prost::alloc::string::String,
    /// Optional. A request ID to identify requests. Specify a unique request ID so
    /// that if you must retry your request, the server knows to ignore the request
    /// if it has already been completed. The server guarantees that a request
    /// doesn't result in creation of duplicate commitments for at least 60
    /// minutes.
    ///
    /// For example, consider a situation where you make an initial request and
    /// the request times out. If you make the request again with the same request
    /// ID, the server can check to see whether the original operation
    /// was received. If it was, the server ignores the second request. This
    /// behavior prevents clients from mistakenly 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,
}
/// The response for
/// \[HubService.AcceptHubSpoke\]\[google.cloud.networkconnectivity.v1.HubService.AcceptHubSpoke\].
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AcceptHubSpokeResponse {
    /// The spoke that was operated on.
    #[prost(message, optional, tag = "1")]
    pub spoke: ::core::option::Option<Spoke>,
}
/// The request for
/// \[HubService.RejectHubSpoke\]\[google.cloud.networkconnectivity.v1.HubService.RejectHubSpoke\].
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct RejectHubSpokeRequest {
    /// Required. The name of the hub from which to reject the spoke.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// Required. The URI of the spoke to reject from the hub.
    #[prost(string, tag = "2")]
    pub spoke_uri: ::prost::alloc::string::String,
    /// Optional. A request ID to identify requests. Specify a unique request ID so
    /// that if you must retry your request, the server knows to ignore the request
    /// if it has already been completed. The server guarantees that a request
    /// doesn't result in creation of duplicate commitments for at least 60
    /// minutes.
    ///
    /// For example, consider a situation where you make an initial request and
    /// the request times out. If you make the request again with the same request
    /// ID, the server can check to see whether the original operation
    /// was received. If it was, the server ignores the second request. This
    /// behavior prevents clients from mistakenly 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,
    /// Optional. Additional information provided by the hub administrator.
    #[prost(string, tag = "4")]
    pub details: ::prost::alloc::string::String,
}
/// The response for
/// \[HubService.RejectHubSpoke\]\[google.cloud.networkconnectivity.v1.HubService.RejectHubSpoke\].
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RejectHubSpokeResponse {
    /// The spoke that was operated on.
    #[prost(message, optional, tag = "1")]
    pub spoke: ::core::option::Option<Spoke>,
}
/// The request for
/// \[HubService.AcceptSpokeUpdate\]\[google.cloud.networkconnectivity.v1.HubService.AcceptSpokeUpdate\].
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct AcceptSpokeUpdateRequest {
    /// Required. The name of the hub to accept spoke update.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// Required. The URI of the spoke to accept update.
    #[prost(string, tag = "2")]
    pub spoke_uri: ::prost::alloc::string::String,
    /// Required. The etag of the spoke to accept update.
    #[prost(string, tag = "3")]
    pub spoke_etag: ::prost::alloc::string::String,
    /// Optional. A request ID to identify requests. Specify a unique request ID so
    /// that if you must retry your request, the server knows to ignore the request
    /// if it has already been completed. The server guarantees that a request
    /// doesn't result in creation of duplicate commitments for at least 60
    /// minutes.
    ///
    /// For example, consider a situation where you make an initial request and
    /// the request times out. If you make the request again with the same request
    /// ID, the server can check to see whether the original operation
    /// was received. If it was, the server ignores the second request. This
    /// behavior prevents clients from mistakenly 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,
}
/// The response for
/// \[HubService.AcceptSpokeUpdate\]\[google.cloud.networkconnectivity.v1.HubService.AcceptSpokeUpdate\].
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AcceptSpokeUpdateResponse {
    /// The spoke that was operated on.
    #[prost(message, optional, tag = "1")]
    pub spoke: ::core::option::Option<Spoke>,
}
/// The request for
/// \[HubService.RejectSpokeUpdate\]\[google.cloud.networkconnectivity.v1.HubService.RejectSpokeUpdate\].
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct RejectSpokeUpdateRequest {
    /// Required. The name of the hub to reject spoke update.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// Required. The URI of the spoke to reject update.
    #[prost(string, tag = "2")]
    pub spoke_uri: ::prost::alloc::string::String,
    /// Required. The etag of the spoke to reject update.
    #[prost(string, tag = "3")]
    pub spoke_etag: ::prost::alloc::string::String,
    /// Optional. Additional information provided by the hub administrator.
    #[prost(string, tag = "4")]
    pub details: ::prost::alloc::string::String,
    /// Optional. A request ID to identify requests. Specify a unique request ID so
    /// that if you must retry your request, the server knows to ignore the request
    /// if it has already been completed. The server guarantees that a request
    /// doesn't result in creation of duplicate commitments for at least 60
    /// minutes.
    ///
    /// For example, consider a situation where you make an initial request and
    /// the request times out. If you make the request again with the same request
    /// ID, the server can check to see whether the original operation
    /// was received. If it was, the server ignores the second request. This
    /// behavior prevents clients from mistakenly 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 = "5")]
    pub request_id: ::prost::alloc::string::String,
}
/// The response for
/// \[HubService.RejectSpokeUpdate\]\[google.cloud.networkconnectivity.v1.HubService.RejectSpokeUpdate\].
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RejectSpokeUpdateResponse {
    /// The spoke that was operated on.
    #[prost(message, optional, tag = "1")]
    pub spoke: ::core::option::Option<Spoke>,
}
/// The request for
/// \[HubService.GetRouteTable\]\[google.cloud.networkconnectivity.v1.HubService.GetRouteTable\].
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GetRouteTableRequest {
    /// Required. The name of the route table resource.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
}
/// The request for
/// \[HubService.GetRoute\]\[google.cloud.networkconnectivity.v1.HubService.GetRoute\].
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GetRouteRequest {
    /// Required. The name of the route resource.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
}
/// Request for
/// \[HubService.ListRoutes\]\[google.cloud.networkconnectivity.v1.HubService.ListRoutes\]
/// method.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ListRoutesRequest {
    /// Required. The parent resource's name.
    #[prost(string, tag = "1")]
    pub parent: ::prost::alloc::string::String,
    /// The maximum number of results to return per page.
    #[prost(int32, tag = "2")]
    pub page_size: i32,
    /// The page token.
    #[prost(string, tag = "3")]
    pub page_token: ::prost::alloc::string::String,
    /// An expression that filters the list of results.
    #[prost(string, tag = "4")]
    pub filter: ::prost::alloc::string::String,
    /// Sort the results by a certain order.
    #[prost(string, tag = "5")]
    pub order_by: ::prost::alloc::string::String,
}
/// Response for
/// \[HubService.ListRoutes\]\[google.cloud.networkconnectivity.v1.HubService.ListRoutes\]
/// method.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListRoutesResponse {
    /// The requested routes.
    #[prost(message, repeated, tag = "1")]
    pub routes: ::prost::alloc::vec::Vec<Route>,
    /// The token for the next page of the response. To see more results,
    /// use this value as the page_token for your next request. If this value
    /// is empty, there are no more results.
    #[prost(string, tag = "2")]
    pub next_page_token: ::prost::alloc::string::String,
    /// RouteTables that could not be reached.
    #[prost(string, repeated, tag = "3")]
    pub unreachable: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
/// Request for
/// \[HubService.ListRouteTables\]\[google.cloud.networkconnectivity.v1.HubService.ListRouteTables\]
/// method.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ListRouteTablesRequest {
    /// Required. The parent resource's name.
    #[prost(string, tag = "1")]
    pub parent: ::prost::alloc::string::String,
    /// The maximum number of results to return per page.
    #[prost(int32, tag = "2")]
    pub page_size: i32,
    /// The page token.
    #[prost(string, tag = "3")]
    pub page_token: ::prost::alloc::string::String,
    /// An expression that filters the list of results.
    #[prost(string, tag = "4")]
    pub filter: ::prost::alloc::string::String,
    /// Sort the results by a certain order.
    #[prost(string, tag = "5")]
    pub order_by: ::prost::alloc::string::String,
}
/// Response for
/// \[HubService.ListRouteTables\]\[google.cloud.networkconnectivity.v1.HubService.ListRouteTables\]
/// method.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListRouteTablesResponse {
    /// The requested route tables.
    #[prost(message, repeated, tag = "1")]
    pub route_tables: ::prost::alloc::vec::Vec<RouteTable>,
    /// The token for the next page of the response. To see more results,
    /// use this value as the page_token for your next request. If this value
    /// is empty, there are no more results.
    #[prost(string, tag = "2")]
    pub next_page_token: ::prost::alloc::string::String,
    /// Hubs that could not be reached.
    #[prost(string, repeated, tag = "3")]
    pub unreachable: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
/// Request for
/// \[HubService.ListGroups\]\[google.cloud.networkconnectivity.v1.HubService.ListGroups\]
/// method.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ListGroupsRequest {
    /// Required. The parent resource's name.
    #[prost(string, tag = "1")]
    pub parent: ::prost::alloc::string::String,
    /// The maximum number of results to return per page.
    #[prost(int32, tag = "2")]
    pub page_size: i32,
    /// The page token.
    #[prost(string, tag = "3")]
    pub page_token: ::prost::alloc::string::String,
    /// An expression that filters the list of results.
    #[prost(string, tag = "4")]
    pub filter: ::prost::alloc::string::String,
    /// Sort the results by a certain order.
    #[prost(string, tag = "5")]
    pub order_by: ::prost::alloc::string::String,
}
/// Response for
/// \[HubService.ListGroups\]\[google.cloud.networkconnectivity.v1.HubService.ListGroups\]
/// method.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListGroupsResponse {
    /// The requested groups.
    #[prost(message, repeated, tag = "1")]
    pub groups: ::prost::alloc::vec::Vec<Group>,
    /// The token for the next page of the response. To see more results,
    /// use this value as the page_token for your next request. If this value
    /// is empty, there are no more results.
    #[prost(string, tag = "2")]
    pub next_page_token: ::prost::alloc::string::String,
    /// Hubs that could not be reached.
    #[prost(string, repeated, tag = "3")]
    pub unreachable: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
/// A collection of Cloud VPN tunnel resources. These resources should be
/// redundant HA VPN tunnels that all advertise the same prefixes to Google
/// Cloud. Alternatively, in a passive/active configuration, all tunnels
/// should be capable of advertising the same prefixes.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct LinkedVpnTunnels {
    /// The URIs of linked VPN tunnel resources.
    #[prost(string, repeated, tag = "1")]
    pub uris: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    /// A value that controls whether site-to-site data transfer is enabled for
    /// these resources. Data transfer is available only in [supported
    /// locations](<https://cloud.google.com/network-connectivity/docs/network-connectivity-center/concepts/locations>).
    #[prost(bool, tag = "2")]
    pub site_to_site_data_transfer: bool,
    /// Output only. The VPC network where these VPN tunnels are located.
    #[prost(string, tag = "3")]
    pub vpc_network: ::prost::alloc::string::String,
    /// Optional. IP ranges allowed to be included during import from hub (does not
    /// control transit connectivity). The only allowed value for now is
    /// "ALL_IPV4_RANGES".
    #[prost(string, repeated, tag = "5")]
    pub include_import_ranges: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
/// A collection of VLAN attachment resources. These resources should
/// be redundant attachments that all advertise the same prefixes to Google
/// Cloud. Alternatively, in active/passive configurations, all attachments
/// should be capable of advertising the same prefixes.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct LinkedInterconnectAttachments {
    /// The URIs of linked interconnect attachment resources
    #[prost(string, repeated, tag = "1")]
    pub uris: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    /// A value that controls whether site-to-site data transfer is enabled for
    /// these resources. Data transfer is available only in [supported
    /// locations](<https://cloud.google.com/network-connectivity/docs/network-connectivity-center/concepts/locations>).
    #[prost(bool, tag = "2")]
    pub site_to_site_data_transfer: bool,
    /// Output only. The VPC network where these VLAN attachments are located.
    #[prost(string, tag = "3")]
    pub vpc_network: ::prost::alloc::string::String,
    /// Optional. IP ranges allowed to be included during import from hub (does not
    /// control transit connectivity). The only allowed value for now is
    /// "ALL_IPV4_RANGES".
    #[prost(string, repeated, tag = "5")]
    pub include_import_ranges: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
/// A collection of router appliance instances. If you configure multiple router
/// appliance instances to receive data from the same set of sites outside of
/// Google Cloud, we recommend that you associate those instances with the same
/// spoke.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct LinkedRouterApplianceInstances {
    /// The list of router appliance instances.
    #[prost(message, repeated, tag = "1")]
    pub instances: ::prost::alloc::vec::Vec<RouterApplianceInstance>,
    /// A value that controls whether site-to-site data transfer is enabled for
    /// these resources. Data transfer is available only in [supported
    /// locations](<https://cloud.google.com/network-connectivity/docs/network-connectivity-center/concepts/locations>).
    #[prost(bool, tag = "2")]
    pub site_to_site_data_transfer: bool,
    /// Output only. The VPC network where these router appliance instances are
    /// located.
    #[prost(string, tag = "3")]
    pub vpc_network: ::prost::alloc::string::String,
    /// Optional. IP ranges allowed to be included during import from hub (does not
    /// control transit connectivity). The only allowed value for now is
    /// "ALL_IPV4_RANGES".
    #[prost(string, repeated, tag = "5")]
    pub include_import_ranges: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
/// An existing VPC network.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct LinkedVpcNetwork {
    /// Required. The URI of the VPC network resource.
    #[prost(string, tag = "1")]
    pub uri: ::prost::alloc::string::String,
    /// Optional. IP ranges encompassing the subnets to be excluded from peering.
    #[prost(string, repeated, tag = "2")]
    pub exclude_export_ranges: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    /// Optional. IP ranges allowed to be included from peering.
    #[prost(string, repeated, tag = "3")]
    pub include_export_ranges: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    /// Optional. The proposed include export IP ranges waiting for hub
    /// administration's approval.
    #[prost(string, repeated, tag = "5")]
    pub proposed_include_export_ranges: ::prost::alloc::vec::Vec<
        ::prost::alloc::string::String,
    >,
    /// Output only. The proposed exclude export IP ranges waiting for hub
    /// administration's approval.
    #[prost(string, repeated, tag = "6")]
    pub proposed_exclude_export_ranges: ::prost::alloc::vec::Vec<
        ::prost::alloc::string::String,
    >,
    /// Output only. The list of Producer VPC spokes that this VPC spoke is a
    /// service consumer VPC spoke for. These producer VPCs are connected through
    /// VPC peering to this spoke's backing VPC network. Because they are directly
    /// connected throuh VPC peering, NCC export filters do not apply between the
    /// service consumer VPC spoke and any of its producer VPC spokes. This VPC
    /// spoke cannot be deleted as long as any of these producer VPC spokes are
    /// connected to the NCC Hub.
    #[prost(string, repeated, tag = "4")]
    pub producer_vpc_spokes: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct LinkedProducerVpcNetwork {
    /// Immutable. The URI of the Service Consumer VPC that the Producer VPC is
    /// peered with.
    #[prost(string, tag = "1")]
    pub network: ::prost::alloc::string::String,
    /// Output only. The Service Consumer Network spoke.
    #[prost(string, tag = "6")]
    pub service_consumer_vpc_spoke: ::prost::alloc::string::String,
    /// Immutable. The name of the VPC peering between the Service Consumer VPC and
    /// the Producer VPC (defined in the Tenant project) which is added to the NCC
    /// hub. This peering must be in ACTIVE state.
    #[prost(string, tag = "2")]
    pub peering: ::prost::alloc::string::String,
    /// Output only. The URI of the Producer VPC.
    #[prost(string, tag = "5")]
    pub producer_network: ::prost::alloc::string::String,
    /// Optional. IP ranges encompassing the subnets to be excluded from peering.
    #[prost(string, repeated, tag = "3")]
    pub exclude_export_ranges: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    /// Optional. IP ranges allowed to be included from peering.
    #[prost(string, repeated, tag = "4")]
    pub include_export_ranges: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    /// Optional. The proposed include export IP ranges waiting for hub
    /// administration's approval.
    #[prost(string, repeated, tag = "7")]
    pub proposed_include_export_ranges: ::prost::alloc::vec::Vec<
        ::prost::alloc::string::String,
    >,
    /// Output only. The proposed exclude export IP ranges waiting for hub
    /// administration's approval.
    #[prost(string, repeated, tag = "8")]
    pub proposed_exclude_export_ranges: ::prost::alloc::vec::Vec<
        ::prost::alloc::string::String,
    >,
}
/// A router appliance instance is a Compute Engine virtual machine (VM) instance
/// that acts as a BGP speaker. A router appliance instance is specified by the
/// URI of the VM and the internal IP address of one of the VM's network
/// interfaces.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct RouterApplianceInstance {
    /// The URI of the VM.
    #[prost(string, tag = "1")]
    pub virtual_machine: ::prost::alloc::string::String,
    /// The IP address on the VM to use for peering.
    #[prost(string, tag = "3")]
    pub ip_address: ::prost::alloc::string::String,
}
/// Metadata about locations
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct LocationMetadata {
    /// List of supported features
    #[prost(enumeration = "LocationFeature", repeated, tag = "1")]
    pub location_features: ::prost::alloc::vec::Vec<i32>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct NextHopVpcNetwork {
    /// The URI of the VPC network resource
    #[prost(string, tag = "1")]
    pub uri: ::prost::alloc::string::String,
}
/// A route next hop that leads to a VPN tunnel resource.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct NextHopVpnTunnel {
    /// The URI of the VPN tunnel resource.
    #[prost(string, tag = "1")]
    pub uri: ::prost::alloc::string::String,
    /// The VPC network where this VPN tunnel is located.
    #[prost(string, tag = "2")]
    pub vpc_network: ::prost::alloc::string::String,
    /// Indicates whether site-to-site data transfer is allowed for this VPN tunnel
    /// resource. Data transfer is available only in [supported
    /// locations](<https://cloud.google.com/network-connectivity/docs/network-connectivity-center/concepts/locations>).
    #[prost(bool, tag = "3")]
    pub site_to_site_data_transfer: bool,
}
/// A route next hop that leads to a Router appliance instance.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct NextHopRouterApplianceInstance {
    /// The URI of the Router appliance instance.
    #[prost(string, tag = "1")]
    pub uri: ::prost::alloc::string::String,
    /// The VPC network where this VM is located.
    #[prost(string, tag = "2")]
    pub vpc_network: ::prost::alloc::string::String,
    /// Indicates whether site-to-site data transfer is allowed for this Router
    /// appliance instance resource. Data transfer is available only in [supported
    /// locations](<https://cloud.google.com/network-connectivity/docs/network-connectivity-center/concepts/locations>).
    #[prost(bool, tag = "3")]
    pub site_to_site_data_transfer: bool,
}
/// A route next hop that leads to an interconnect attachment resource.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct NextHopInterconnectAttachment {
    /// The URI of the interconnect attachment resource.
    #[prost(string, tag = "1")]
    pub uri: ::prost::alloc::string::String,
    /// The VPC network where this interconnect attachment is located.
    #[prost(string, tag = "2")]
    pub vpc_network: ::prost::alloc::string::String,
    /// Indicates whether site-to-site data transfer is allowed for this
    /// interconnect attachment resource. Data transfer is available only in
    /// [supported
    /// locations](<https://cloud.google.com/network-connectivity/docs/network-connectivity-center/concepts/locations>).
    #[prost(bool, tag = "3")]
    pub site_to_site_data_transfer: bool,
}
/// Summarizes information about the spokes associated with a hub.
/// The summary includes a count of spokes according to type
/// and according to state. If any spokes are inactive,
/// the summary also lists the reasons they are inactive,
/// including a count for each reason.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SpokeSummary {
    /// Output only. Counts the number of spokes of each type that are
    /// associated with a specific hub.
    #[prost(message, repeated, tag = "1")]
    pub spoke_type_counts: ::prost::alloc::vec::Vec<spoke_summary::SpokeTypeCount>,
    /// Output only. Counts the number of spokes that are in each state
    /// and associated with a given hub.
    #[prost(message, repeated, tag = "2")]
    pub spoke_state_counts: ::prost::alloc::vec::Vec<spoke_summary::SpokeStateCount>,
    /// Output only. Counts the number of spokes that are inactive for each
    /// possible reason and associated with a given hub.
    #[prost(message, repeated, tag = "3")]
    pub spoke_state_reason_counts: ::prost::alloc::vec::Vec<
        spoke_summary::SpokeStateReasonCount,
    >,
}
/// Nested message and enum types in `SpokeSummary`.
pub mod spoke_summary {
    /// The number of spokes of a given type that are associated
    /// with a specific hub. The type indicates what kind of
    /// resource is associated with the spoke.
    #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
    pub struct SpokeTypeCount {
        /// Output only. The type of the spokes.
        #[prost(enumeration = "super::SpokeType", tag = "1")]
        pub spoke_type: i32,
        /// Output only. The total number of spokes of this type that are
        /// associated with the hub.
        #[prost(int64, tag = "2")]
        pub count: i64,
    }
    /// The number of spokes that are in a particular state
    /// and associated with a given hub.
    #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
    pub struct SpokeStateCount {
        /// Output only. The state of the spokes.
        #[prost(enumeration = "super::State", tag = "1")]
        pub state: i32,
        /// Output only. The total number of spokes that are in this state
        /// and associated with a given hub.
        #[prost(int64, tag = "2")]
        pub count: i64,
    }
    /// The number of spokes in the hub that are inactive for this reason.
    #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
    pub struct SpokeStateReasonCount {
        /// Output only. The reason that a spoke is inactive.
        #[prost(enumeration = "super::spoke::state_reason::Code", tag = "1")]
        pub state_reason_code: i32,
        /// Output only. The total number of spokes that are inactive for a
        /// particular reason and associated with a given hub.
        #[prost(int64, tag = "2")]
        pub count: i64,
    }
}
/// The request for
/// \[HubService.GetGroup\]\[google.cloud.networkconnectivity.v1.HubService.GetGroup\].
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GetGroupRequest {
    /// Required. The name of the route table resource.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
}
/// Request for
/// \[HubService.UpdateGroup\]\[google.cloud.networkconnectivity.v1.HubService.UpdateGroup\]
/// method.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateGroupRequest {
    /// Optional. In the case of an update to an existing group, field mask is used
    /// to specify the fields to be overwritten. 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 provide a mask, then
    /// all fields are overwritten.
    #[prost(message, optional, tag = "1")]
    pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
    /// Required. The state that the group should be in after the update.
    #[prost(message, optional, tag = "2")]
    pub group: ::core::option::Option<Group>,
    /// Optional. A request ID to identify requests. Specify a unique request ID so
    /// that if you must retry your request, the server knows to ignore the request
    /// if it has already been completed. The server guarantees that a request
    /// doesn't result in creation of duplicate commitments for at least 60
    /// minutes.
    ///
    /// For example, consider a situation where you make an initial request and
    /// the request times out. If you make the request again with the same request
    /// ID, the server can check to see whether the original operation
    /// was received. If it was, the server ignores the second request. This
    /// behavior prevents clients from mistakenly 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,
}
/// Supported features for a location
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum LocationFeature {
    /// No publicly supported feature in this location
    Unspecified = 0,
    /// Site-to-cloud spokes are supported in this location
    SiteToCloudSpokes = 1,
    /// Site-to-site spokes are supported in this location
    SiteToSiteSpokes = 2,
}
impl LocationFeature {
    /// 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 => "LOCATION_FEATURE_UNSPECIFIED",
            Self::SiteToCloudSpokes => "SITE_TO_CLOUD_SPOKES",
            Self::SiteToSiteSpokes => "SITE_TO_SITE_SPOKES",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "LOCATION_FEATURE_UNSPECIFIED" => Some(Self::Unspecified),
            "SITE_TO_CLOUD_SPOKES" => Some(Self::SiteToCloudSpokes),
            "SITE_TO_SITE_SPOKES" => Some(Self::SiteToSiteSpokes),
            _ => None,
        }
    }
}
/// The route's type
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum RouteType {
    /// No route type information specified
    Unspecified = 0,
    /// The route leads to a destination within the primary address range of the
    /// VPC network's subnet.
    VpcPrimarySubnet = 1,
    /// The route leads to a destination within the secondary address range of the
    /// VPC network's subnet.
    VpcSecondarySubnet = 2,
    /// The route leads to a destination in a dynamic route. Dynamic routes are
    /// derived from Border Gateway Protocol (BGP) advertisements received from an
    /// NCC hybrid spoke.
    DynamicRoute = 3,
}
impl RouteType {
    /// 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 => "ROUTE_TYPE_UNSPECIFIED",
            Self::VpcPrimarySubnet => "VPC_PRIMARY_SUBNET",
            Self::VpcSecondarySubnet => "VPC_SECONDARY_SUBNET",
            Self::DynamicRoute => "DYNAMIC_ROUTE",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "ROUTE_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
            "VPC_PRIMARY_SUBNET" => Some(Self::VpcPrimarySubnet),
            "VPC_SECONDARY_SUBNET" => Some(Self::VpcSecondarySubnet),
            "DYNAMIC_ROUTE" => Some(Self::DynamicRoute),
            _ => None,
        }
    }
}
/// The State enum represents the lifecycle stage of a Network Connectivity
/// Center resource.
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum State {
    /// No state information available
    Unspecified = 0,
    /// The resource's create operation is in progress.
    Creating = 1,
    /// The resource is active
    Active = 2,
    /// The resource's delete operation is in progress.
    Deleting = 3,
    /// The resource's accept operation is in progress.
    Accepting = 8,
    /// The resource's reject operation is in progress.
    Rejecting = 9,
    /// The resource's update operation is in progress.
    Updating = 6,
    /// The resource is inactive.
    Inactive = 7,
    /// The hub associated with this spoke resource has been deleted.
    /// This state applies to spoke resources only.
    Obsolete = 10,
    /// The resource is in an undefined state due to resource creation or deletion
    /// failure. You can try to delete the resource later or contact support for
    /// help.
    Failed = 11,
}
impl State {
    /// 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 => "STATE_UNSPECIFIED",
            Self::Creating => "CREATING",
            Self::Active => "ACTIVE",
            Self::Deleting => "DELETING",
            Self::Accepting => "ACCEPTING",
            Self::Rejecting => "REJECTING",
            Self::Updating => "UPDATING",
            Self::Inactive => "INACTIVE",
            Self::Obsolete => "OBSOLETE",
            Self::Failed => "FAILED",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "STATE_UNSPECIFIED" => Some(Self::Unspecified),
            "CREATING" => Some(Self::Creating),
            "ACTIVE" => Some(Self::Active),
            "DELETING" => Some(Self::Deleting),
            "ACCEPTING" => Some(Self::Accepting),
            "REJECTING" => Some(Self::Rejecting),
            "UPDATING" => Some(Self::Updating),
            "INACTIVE" => Some(Self::Inactive),
            "OBSOLETE" => Some(Self::Obsolete),
            "FAILED" => Some(Self::Failed),
            _ => None,
        }
    }
}
/// The SpokeType enum represents the type of spoke. The type
/// reflects the kind of resource that a spoke is associated with.
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum SpokeType {
    /// Unspecified spoke type.
    Unspecified = 0,
    /// Spokes associated with VPN tunnels.
    VpnTunnel = 1,
    /// Spokes associated with VLAN attachments.
    InterconnectAttachment = 2,
    /// Spokes associated with router appliance instances.
    RouterAppliance = 3,
    /// Spokes associated with VPC networks.
    VpcNetwork = 4,
    /// Spokes that are backed by a producer VPC network.
    ProducerVpcNetwork = 7,
}
impl SpokeType {
    /// 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 => "SPOKE_TYPE_UNSPECIFIED",
            Self::VpnTunnel => "VPN_TUNNEL",
            Self::InterconnectAttachment => "INTERCONNECT_ATTACHMENT",
            Self::RouterAppliance => "ROUTER_APPLIANCE",
            Self::VpcNetwork => "VPC_NETWORK",
            Self::ProducerVpcNetwork => "PRODUCER_VPC_NETWORK",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "SPOKE_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
            "VPN_TUNNEL" => Some(Self::VpnTunnel),
            "INTERCONNECT_ATTACHMENT" => Some(Self::InterconnectAttachment),
            "ROUTER_APPLIANCE" => Some(Self::RouterAppliance),
            "VPC_NETWORK" => Some(Self::VpcNetwork),
            "PRODUCER_VPC_NETWORK" => Some(Self::ProducerVpcNetwork),
            _ => None,
        }
    }
}
/// This enum controls the policy mode used in a hub.
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum PolicyMode {
    /// Policy mode is unspecified. It defaults to PRESET
    /// with preset_topology = MESH.
    Unspecified = 0,
    /// Hub uses one of the preset topologies.
    Preset = 1,
}
impl PolicyMode {
    /// 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 => "POLICY_MODE_UNSPECIFIED",
            Self::Preset => "PRESET",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "POLICY_MODE_UNSPECIFIED" => Some(Self::Unspecified),
            "PRESET" => Some(Self::Preset),
            _ => None,
        }
    }
}
/// The list of available preset topologies.
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum PresetTopology {
    /// Preset topology is unspecified. When policy_mode = PRESET,
    /// it defaults to MESH.
    Unspecified = 0,
    /// Mesh topology is implemented. Group `default` is automatically created.
    /// All spokes in the hub are added to group `default`.
    Mesh = 2,
    /// Star topology is implemented. Two groups, `center` and `edge`, are
    /// automatically created along with hub creation. Spokes have to join one of
    /// the groups during creation.
    Star = 3,
}
impl PresetTopology {
    /// 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 => "PRESET_TOPOLOGY_UNSPECIFIED",
            Self::Mesh => "MESH",
            Self::Star => "STAR",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "PRESET_TOPOLOGY_UNSPECIFIED" => Some(Self::Unspecified),
            "MESH" => Some(Self::Mesh),
            "STAR" => Some(Self::Star),
            _ => None,
        }
    }
}
/// Generated client implementations.
pub mod hub_service_client {
    #![allow(
        unused_variables,
        dead_code,
        missing_docs,
        clippy::wildcard_imports,
        clippy::let_unit_value,
    )]
    use tonic::codegen::*;
    use tonic::codegen::http::Uri;
    /// Network Connectivity Center is a hub-and-spoke abstraction for network
    /// connectivity management in Google Cloud. It reduces operational complexity
    /// through a simple, centralized connectivity management model.
    #[derive(Debug, Clone)]
    pub struct HubServiceClient<T> {
        inner: tonic::client::Grpc<T>,
    }
    impl HubServiceClient<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> HubServiceClient<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,
        ) -> HubServiceClient<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,
        {
            HubServiceClient::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 the Network Connectivity Center hubs associated with a given project.
        pub async fn list_hubs(
            &mut self,
            request: impl tonic::IntoRequest<super::ListHubsRequest>,
        ) -> std::result::Result<
            tonic::Response<super::ListHubsResponse>,
            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.networkconnectivity.v1.HubService/ListHubs",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.networkconnectivity.v1.HubService",
                        "ListHubs",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Gets details about a Network Connectivity Center hub.
        pub async fn get_hub(
            &mut self,
            request: impl tonic::IntoRequest<super::GetHubRequest>,
        ) -> std::result::Result<tonic::Response<super::Hub>, 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.networkconnectivity.v1.HubService/GetHub",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.networkconnectivity.v1.HubService",
                        "GetHub",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Creates a new Network Connectivity Center hub in the specified project.
        pub async fn create_hub(
            &mut self,
            request: impl tonic::IntoRequest<super::CreateHubRequest>,
        ) -> 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.networkconnectivity.v1.HubService/CreateHub",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.networkconnectivity.v1.HubService",
                        "CreateHub",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Updates the description and/or labels of a Network Connectivity Center
        /// hub.
        pub async fn update_hub(
            &mut self,
            request: impl tonic::IntoRequest<super::UpdateHubRequest>,
        ) -> 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.networkconnectivity.v1.HubService/UpdateHub",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.networkconnectivity.v1.HubService",
                        "UpdateHub",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Deletes a Network Connectivity Center hub.
        pub async fn delete_hub(
            &mut self,
            request: impl tonic::IntoRequest<super::DeleteHubRequest>,
        ) -> 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.networkconnectivity.v1.HubService/DeleteHub",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.networkconnectivity.v1.HubService",
                        "DeleteHub",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Lists the Network Connectivity Center spokes associated with a
        /// specified hub and location. The list includes both spokes that are attached
        /// to the hub and spokes that have been proposed but not yet accepted.
        pub async fn list_hub_spokes(
            &mut self,
            request: impl tonic::IntoRequest<super::ListHubSpokesRequest>,
        ) -> std::result::Result<
            tonic::Response<super::ListHubSpokesResponse>,
            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.networkconnectivity.v1.HubService/ListHubSpokes",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.networkconnectivity.v1.HubService",
                        "ListHubSpokes",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Query the Private Service Connect propagation status of a Network
        /// Connectivity Center hub.
        pub async fn query_hub_status(
            &mut self,
            request: impl tonic::IntoRequest<super::QueryHubStatusRequest>,
        ) -> std::result::Result<
            tonic::Response<super::QueryHubStatusResponse>,
            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.networkconnectivity.v1.HubService/QueryHubStatus",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.networkconnectivity.v1.HubService",
                        "QueryHubStatus",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Lists the Network Connectivity Center spokes in a specified project and
        /// location.
        pub async fn list_spokes(
            &mut self,
            request: impl tonic::IntoRequest<super::ListSpokesRequest>,
        ) -> std::result::Result<
            tonic::Response<super::ListSpokesResponse>,
            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.networkconnectivity.v1.HubService/ListSpokes",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.networkconnectivity.v1.HubService",
                        "ListSpokes",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Gets details about a Network Connectivity Center spoke.
        pub async fn get_spoke(
            &mut self,
            request: impl tonic::IntoRequest<super::GetSpokeRequest>,
        ) -> std::result::Result<tonic::Response<super::Spoke>, 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.networkconnectivity.v1.HubService/GetSpoke",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.networkconnectivity.v1.HubService",
                        "GetSpoke",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Creates a Network Connectivity Center spoke.
        pub async fn create_spoke(
            &mut self,
            request: impl tonic::IntoRequest<super::CreateSpokeRequest>,
        ) -> 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.networkconnectivity.v1.HubService/CreateSpoke",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.networkconnectivity.v1.HubService",
                        "CreateSpoke",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Updates the parameters of a Network Connectivity Center spoke.
        pub async fn update_spoke(
            &mut self,
            request: impl tonic::IntoRequest<super::UpdateSpokeRequest>,
        ) -> 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.networkconnectivity.v1.HubService/UpdateSpoke",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.networkconnectivity.v1.HubService",
                        "UpdateSpoke",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Rejects a Network Connectivity Center spoke from being attached to a hub.
        /// If the spoke was previously in the `ACTIVE` state, it
        /// transitions to the `INACTIVE` state and is no longer able to
        /// connect to other spokes that are attached to the hub.
        pub async fn reject_hub_spoke(
            &mut self,
            request: impl tonic::IntoRequest<super::RejectHubSpokeRequest>,
        ) -> 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.networkconnectivity.v1.HubService/RejectHubSpoke",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.networkconnectivity.v1.HubService",
                        "RejectHubSpoke",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Accepts a proposal to attach a Network Connectivity Center spoke
        /// to a hub.
        pub async fn accept_hub_spoke(
            &mut self,
            request: impl tonic::IntoRequest<super::AcceptHubSpokeRequest>,
        ) -> 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.networkconnectivity.v1.HubService/AcceptHubSpoke",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.networkconnectivity.v1.HubService",
                        "AcceptHubSpoke",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Accepts a proposal to update a Network Connectivity Center spoke in a hub.
        pub async fn accept_spoke_update(
            &mut self,
            request: impl tonic::IntoRequest<super::AcceptSpokeUpdateRequest>,
        ) -> 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.networkconnectivity.v1.HubService/AcceptSpokeUpdate",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.networkconnectivity.v1.HubService",
                        "AcceptSpokeUpdate",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Rejects a proposal to update a Network Connectivity Center spoke in a hub.
        pub async fn reject_spoke_update(
            &mut self,
            request: impl tonic::IntoRequest<super::RejectSpokeUpdateRequest>,
        ) -> 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.networkconnectivity.v1.HubService/RejectSpokeUpdate",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.networkconnectivity.v1.HubService",
                        "RejectSpokeUpdate",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Deletes a Network Connectivity Center spoke.
        pub async fn delete_spoke(
            &mut self,
            request: impl tonic::IntoRequest<super::DeleteSpokeRequest>,
        ) -> 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.networkconnectivity.v1.HubService/DeleteSpoke",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.networkconnectivity.v1.HubService",
                        "DeleteSpoke",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Gets details about a Network Connectivity Center route table.
        pub async fn get_route_table(
            &mut self,
            request: impl tonic::IntoRequest<super::GetRouteTableRequest>,
        ) -> std::result::Result<tonic::Response<super::RouteTable>, 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.networkconnectivity.v1.HubService/GetRouteTable",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.networkconnectivity.v1.HubService",
                        "GetRouteTable",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Gets details about the specified route.
        pub async fn get_route(
            &mut self,
            request: impl tonic::IntoRequest<super::GetRouteRequest>,
        ) -> std::result::Result<tonic::Response<super::Route>, 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.networkconnectivity.v1.HubService/GetRoute",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.networkconnectivity.v1.HubService",
                        "GetRoute",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Lists routes in a given route table.
        pub async fn list_routes(
            &mut self,
            request: impl tonic::IntoRequest<super::ListRoutesRequest>,
        ) -> std::result::Result<
            tonic::Response<super::ListRoutesResponse>,
            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.networkconnectivity.v1.HubService/ListRoutes",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.networkconnectivity.v1.HubService",
                        "ListRoutes",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Lists route tables in a given hub.
        pub async fn list_route_tables(
            &mut self,
            request: impl tonic::IntoRequest<super::ListRouteTablesRequest>,
        ) -> std::result::Result<
            tonic::Response<super::ListRouteTablesResponse>,
            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.networkconnectivity.v1.HubService/ListRouteTables",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.networkconnectivity.v1.HubService",
                        "ListRouteTables",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Gets details about a Network Connectivity Center group.
        pub async fn get_group(
            &mut self,
            request: impl tonic::IntoRequest<super::GetGroupRequest>,
        ) -> std::result::Result<tonic::Response<super::Group>, 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.networkconnectivity.v1.HubService/GetGroup",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.networkconnectivity.v1.HubService",
                        "GetGroup",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Lists groups in a given hub.
        pub async fn list_groups(
            &mut self,
            request: impl tonic::IntoRequest<super::ListGroupsRequest>,
        ) -> std::result::Result<
            tonic::Response<super::ListGroupsResponse>,
            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.networkconnectivity.v1.HubService/ListGroups",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.networkconnectivity.v1.HubService",
                        "ListGroups",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Updates the parameters of a Network Connectivity Center group.
        pub async fn update_group(
            &mut self,
            request: impl tonic::IntoRequest<super::UpdateGroupRequest>,
        ) -> 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.networkconnectivity.v1.HubService/UpdateGroup",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.networkconnectivity.v1.HubService",
                        "UpdateGroup",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
    }
}
/// The internal range resource for IPAM operations within a VPC network.
/// Used to represent a private address range along with behavioral
/// characteristics of that range (its usage and peering behavior).
/// Networking resources can link to this range if they are created
/// as belonging to it.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct InternalRange {
    /// Identifier. The name of an internal range.
    /// Format:
    /// projects/{project}/locations/{location}/internalRanges/{internal_range}
    /// See: <https://google.aip.dev/122#fields-representing-resource-names>
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// Output only. Time when the internal range was created.
    #[prost(message, optional, tag = "2")]
    pub create_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Output only. Time when the internal range was updated.
    #[prost(message, optional, tag = "3")]
    pub update_time: ::core::option::Option<::prost_types::Timestamp>,
    /// User-defined labels.
    #[prost(map = "string, string", tag = "4")]
    pub labels: ::std::collections::HashMap<
        ::prost::alloc::string::String,
        ::prost::alloc::string::String,
    >,
    /// Optional. A description of this resource.
    #[prost(string, tag = "5")]
    pub description: ::prost::alloc::string::String,
    /// Optional. The IP range that this internal range defines.
    /// NOTE: IPv6 ranges are limited to usage=EXTERNAL_TO_VPC and
    /// peering=FOR_SELF.
    /// NOTE: For IPv6 Ranges this field is compulsory, i.e. the address range must
    /// be specified explicitly.
    #[prost(string, tag = "6")]
    pub ip_cidr_range: ::prost::alloc::string::String,
    /// Immutable. The URL or resource ID of the network in which to reserve the
    /// internal range. The network cannot be deleted if there are any reserved
    /// internal ranges referring to it. Legacy networks are not supported. For
    /// example:
    /// <https://www.googleapis.com/compute/v1/projects/{project}/locations/global/networks/{network}>
    /// projects/{project}/locations/global/networks/{network}
    /// {network}
    #[prost(string, tag = "7")]
    pub network: ::prost::alloc::string::String,
    /// Optional. The type of usage set for this InternalRange.
    #[prost(enumeration = "internal_range::Usage", tag = "8")]
    pub usage: i32,
    /// Optional. The type of peering set for this internal range.
    #[prost(enumeration = "internal_range::Peering", tag = "9")]
    pub peering: i32,
    /// Optional. An alternate to ip_cidr_range. Can be set when trying to create
    /// an IPv4 reservation that automatically finds a free range of the given
    /// size. If both ip_cidr_range and prefix_length are set, there is an error if
    /// the range sizes do not match. Can also be used during updates to change the
    /// range size.
    /// NOTE: For IPv6 this field only works if ip_cidr_range is set as well, and
    /// both fields must match. In other words, with IPv6 this field only works as
    /// a redundant parameter.
    #[prost(int32, tag = "10")]
    pub prefix_length: i32,
    /// Optional. Can be set to narrow down or pick a different address space while
    /// searching for a free range. If not set, defaults to the \["10.0.0.0/8",
    /// "172.16.0.0/12", "192.168.0.0/16"\] address space (for auto-mode networks,
    /// the "10.0.0.0/9" range is used instead of "10.0.0.0/8"). This can be used
    /// to target the search in other rfc-1918 address spaces like "172.16.0.0/12"
    /// and "192.168.0.0/16" or non-rfc-1918 address spaces used in the VPC.
    #[prost(string, repeated, tag = "11")]
    pub target_cidr_range: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    /// Output only. The list of resources that refer to this internal range.
    /// Resources that use the internal range for their range allocation
    /// are referred to as users of the range. Other resources mark themselves
    /// as users while doing so by creating a reference to this internal range.
    /// Having a user, based on this reference, prevents deletion of the
    /// internal range referred to. Can be empty.
    #[prost(string, repeated, tag = "12")]
    pub users: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    /// Optional. Types of resources that are allowed to overlap with the current
    /// internal range.
    #[prost(
        enumeration = "internal_range::Overlap",
        repeated,
        packed = "false",
        tag = "13"
    )]
    pub overlaps: ::prost::alloc::vec::Vec<i32>,
    /// Optional. Must be present if usage is set to FOR_MIGRATION.
    #[prost(message, optional, tag = "14")]
    pub migration: ::core::option::Option<internal_range::Migration>,
    /// Optional. Immutable ranges cannot have their fields modified, except for
    /// labels and description.
    #[prost(bool, tag = "15")]
    pub immutable: bool,
    /// Optional. Range auto-allocation options, may be set only when
    /// auto-allocation is selected by not setting ip_cidr_range (and setting
    /// prefix_length).
    #[prost(message, optional, tag = "16")]
    pub allocation_options: ::core::option::Option<internal_range::AllocationOptions>,
    /// Optional. ExcludeCidrRanges flag. Specifies a set of CIDR blocks that
    /// allows exclusion of particular CIDR ranges from the auto-allocation
    /// process, without having to reserve these blocks
    #[prost(string, repeated, tag = "17")]
    pub exclude_cidr_ranges: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
/// Nested message and enum types in `InternalRange`.
pub mod internal_range {
    /// Specification for migration with source and target resource names.
    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
    pub struct Migration {
        /// Immutable. Resource path as an URI of the source resource, for example a
        /// subnet. The project for the source resource should match the project for
        /// the InternalRange. An example:
        /// /projects/{project}/regions/{region}/subnetworks/{subnet}
        #[prost(string, tag = "1")]
        pub source: ::prost::alloc::string::String,
        /// Immutable. Resource path of the target resource. The target project can
        /// be different, as in the cases when migrating to peer networks. For
        /// example:
        /// /projects/{project}/regions/{region}/subnetworks/{subnet}
        #[prost(string, tag = "2")]
        pub target: ::prost::alloc::string::String,
    }
    /// Range auto-allocation options, to be optionally used when CIDR block is not
    /// explicitly set.
    #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
    pub struct AllocationOptions {
        /// Optional. Allocation strategy Not setting this field when the allocation
        /// is requested means an implementation defined strategy is used.
        #[prost(enumeration = "AllocationStrategy", tag = "1")]
        pub allocation_strategy: i32,
        /// Optional. This field must be set only when allocation_strategy is set to
        /// RANDOM_FIRST_N_AVAILABLE.
        /// The value should be the maximum expected parallelism of range creation
        /// requests issued to the same space of peered netwroks.
        #[prost(int32, tag = "2")]
        pub first_available_ranges_lookup_size: i32,
    }
    /// Possible usage of an internal range.
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum Usage {
        /// Unspecified usage is allowed in calls which identify the resource by
        /// other fields and do not need Usage set to complete. These are, i.e.:
        /// GetInternalRange and DeleteInternalRange.
        /// Usage needs to be specified explicitly in CreateInternalRange
        /// or UpdateInternalRange calls.
        Unspecified = 0,
        /// A VPC resource can use the reserved CIDR block by associating it with the
        /// internal range resource if usage is set to FOR_VPC.
        ForVpc = 1,
        /// Ranges created with EXTERNAL_TO_VPC cannot be associated with VPC
        /// resources and are meant to block out address ranges for various use
        /// cases, like for example, usage on-prem, with dynamic route announcements
        /// via interconnect.
        ExternalToVpc = 2,
        /// Ranges created FOR_MIGRATION can be used to lock a CIDR range between a
        /// source and target subnet. If usage is set to FOR_MIGRATION, the peering
        /// value has to be set to FOR_SELF or default to FOR_SELF when unset.
        ForMigration = 3,
    }
    impl Usage {
        /// 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 => "USAGE_UNSPECIFIED",
                Self::ForVpc => "FOR_VPC",
                Self::ExternalToVpc => "EXTERNAL_TO_VPC",
                Self::ForMigration => "FOR_MIGRATION",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "USAGE_UNSPECIFIED" => Some(Self::Unspecified),
                "FOR_VPC" => Some(Self::ForVpc),
                "EXTERNAL_TO_VPC" => Some(Self::ExternalToVpc),
                "FOR_MIGRATION" => Some(Self::ForMigration),
                _ => None,
            }
        }
    }
    /// Peering type.
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum Peering {
        /// If Peering is left unspecified in CreateInternalRange or
        /// UpdateInternalRange, it will be defaulted to FOR_SELF.
        Unspecified = 0,
        /// This is the default behavior and represents the case that this
        /// internal range is intended to be used in the VPC in which it is created
        /// and is accessible from its peers. This implies that peers or
        /// peers-of-peers cannot use this range.
        ForSelf = 1,
        /// This behavior can be set when the internal range is being reserved for
        /// usage by peers. This means that no resource within the VPC in which
        /// it is being created can use this to associate with a VPC resource, but
        /// one of the peers can. This represents donating a range for peers to
        /// use.
        ForPeer = 2,
        /// This behavior can be set when the internal range is being reserved for
        /// usage by the VPC in which it is created, but not shared with peers.
        /// In a sense, it is local to the VPC. This can be used to create internal
        /// ranges for various purposes like HTTP_INTERNAL_LOAD_BALANCER or for
        /// Interconnect routes that are not shared with peers. This also implies
        /// that peers cannot use this range in a way that is visible to this VPC,
        /// but can re-use this range as long as it is NOT_SHARED from the peer VPC,
        /// too.
        NotShared = 3,
    }
    impl Peering {
        /// 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 => "PEERING_UNSPECIFIED",
                Self::ForSelf => "FOR_SELF",
                Self::ForPeer => "FOR_PEER",
                Self::NotShared => "NOT_SHARED",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "PEERING_UNSPECIFIED" => Some(Self::Unspecified),
                "FOR_SELF" => Some(Self::ForSelf),
                "FOR_PEER" => Some(Self::ForPeer),
                "NOT_SHARED" => Some(Self::NotShared),
                _ => None,
            }
        }
    }
    /// Overlap specifications.
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum Overlap {
        /// No overlap overrides.
        Unspecified = 0,
        /// Allow creation of static routes more specific that the current
        /// internal range.
        RouteRange = 1,
        /// Allow creation of internal ranges that overlap with existing subnets.
        ExistingSubnetRange = 2,
    }
    impl Overlap {
        /// 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 => "OVERLAP_UNSPECIFIED",
                Self::RouteRange => "OVERLAP_ROUTE_RANGE",
                Self::ExistingSubnetRange => "OVERLAP_EXISTING_SUBNET_RANGE",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "OVERLAP_UNSPECIFIED" => Some(Self::Unspecified),
                "OVERLAP_ROUTE_RANGE" => Some(Self::RouteRange),
                "OVERLAP_EXISTING_SUBNET_RANGE" => Some(Self::ExistingSubnetRange),
                _ => None,
            }
        }
    }
    /// Enumeration of range auto-allocation strategies
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum AllocationStrategy {
        /// Unspecified is the only valid option when the range is specified
        /// explicitly by ip_cidr_range field. Otherwise unspefified means using the
        /// default strategy.
        Unspecified = 0,
        /// Random strategy, the legacy algorithm, used for backwards compatibility.
        /// This allocation strategy remains efficient in the case of concurrent
        /// allocation requests in the same peered network space and doesn't require
        /// providing the level of concurrency in an explicit parameter, but it is
        /// prone to fragmenting available address space.
        Random = 1,
        /// Pick the first available address range. This strategy is deterministic
        /// and the result is easy to predict.
        FirstAvailable = 2,
        /// Pick an arbitrary range out of the first N available ones. The N will be
        /// set in the first_available_ranges_lookup_size field. This strategy should
        /// be used when concurrent allocation requests are made in the same space of
        /// peered networks while the fragmentation of the addrress space is reduced.
        RandomFirstNAvailable = 3,
        /// Pick the smallest but fitting available range. This deterministic
        /// strategy minimizes fragmentation of the address space.
        FirstSmallestFitting = 4,
    }
    impl AllocationStrategy {
        /// 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 => "ALLOCATION_STRATEGY_UNSPECIFIED",
                Self::Random => "RANDOM",
                Self::FirstAvailable => "FIRST_AVAILABLE",
                Self::RandomFirstNAvailable => "RANDOM_FIRST_N_AVAILABLE",
                Self::FirstSmallestFitting => "FIRST_SMALLEST_FITTING",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "ALLOCATION_STRATEGY_UNSPECIFIED" => Some(Self::Unspecified),
                "RANDOM" => Some(Self::Random),
                "FIRST_AVAILABLE" => Some(Self::FirstAvailable),
                "RANDOM_FIRST_N_AVAILABLE" => Some(Self::RandomFirstNAvailable),
                "FIRST_SMALLEST_FITTING" => Some(Self::FirstSmallestFitting),
                _ => None,
            }
        }
    }
}
/// Request for InternalRangeService.ListInternalRanges
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ListInternalRangesRequest {
    /// Required. The parent resource's name.
    #[prost(string, tag = "1")]
    pub parent: ::prost::alloc::string::String,
    /// The maximum number of results per page that should be returned.
    #[prost(int32, tag = "2")]
    pub page_size: i32,
    /// The page token.
    #[prost(string, tag = "3")]
    pub page_token: ::prost::alloc::string::String,
    /// A filter expression that filters the results listed in the response.
    #[prost(string, tag = "4")]
    pub filter: ::prost::alloc::string::String,
    /// Sort the results by a certain order.
    #[prost(string, tag = "5")]
    pub order_by: ::prost::alloc::string::String,
}
/// Response for InternalRange.ListInternalRanges
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListInternalRangesResponse {
    /// Internal ranges to be returned.
    #[prost(message, repeated, tag = "1")]
    pub internal_ranges: ::prost::alloc::vec::Vec<InternalRange>,
    /// The next pagination token in the List response. It should be used as
    /// page_token for the following request. An empty value means no more result.
    #[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 for InternalRangeService.GetInternalRange
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GetInternalRangeRequest {
    /// Required. Name of the InternalRange to get.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
}
/// Request for InternalRangeService.CreateInternalRange
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateInternalRangeRequest {
    /// Required. The parent resource's name of the internal range.
    #[prost(string, tag = "1")]
    pub parent: ::prost::alloc::string::String,
    /// Optional. Resource ID
    /// (i.e. 'foo' in '\[...\]/projects/p/locations/l/internalRanges/foo')
    /// See <https://google.aip.dev/122#resource-id-segments>
    /// Unique per location.
    #[prost(string, tag = "2")]
    pub internal_range_id: ::prost::alloc::string::String,
    /// Required. Initial values for a new internal range
    #[prost(message, optional, tag = "3")]
    pub internal_range: ::core::option::Option<InternalRange>,
    /// Optional. An optional request ID to identify requests. Specify a unique
    /// request ID so that if you must retry your request, the server will know to
    /// ignore the request if it has already been completed. The server will
    /// guarantee that for at least 60 minutes since the first request.
    ///
    /// For example, consider a situation where you make an initial request and
    /// the request times out. If you make the request again with the same request
    /// ID, the server can check if original operation with the same request ID
    /// was received, and if so, will ignore the second request. This prevents
    /// clients from accidentally creating duplicate commitments.
    ///
    /// The request ID must be a valid UUID with the exception that zero UUID is
    /// not supported (00000000-0000-0000-0000-000000000000).
    #[prost(string, tag = "4")]
    pub request_id: ::prost::alloc::string::String,
}
/// Request for InternalRangeService.UpdateInternalRange
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateInternalRangeRequest {
    /// Optional. Field mask is used to specify the fields to be overwritten in the
    /// InternalRange 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. New values to be patched into the resource.
    #[prost(message, optional, tag = "2")]
    pub internal_range: ::core::option::Option<InternalRange>,
    /// Optional. An optional request ID to identify requests. Specify a unique
    /// request ID so that if you must retry your request, the server will know to
    /// ignore the request if it has already been completed. The server will
    /// guarantee that for at least 60 minutes since the first request.
    ///
    /// For example, consider a situation where you make an initial request and
    /// the request times out. If you make the request again with the same request
    /// ID, the server can check if original operation with the same request ID
    /// was received, and if so, will ignore the second request. This prevents
    /// clients from accidentally creating duplicate commitments.
    ///
    /// The request ID must be a valid UUID with the exception that zero UUID is
    /// not supported (00000000-0000-0000-0000-000000000000).
    #[prost(string, tag = "3")]
    pub request_id: ::prost::alloc::string::String,
}
/// Request for InternalRangeService.DeleteInternalRange
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct DeleteInternalRangeRequest {
    /// Required. The name of the internal range to delete.
    #[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 will know to
    /// ignore the request if it has already been completed. The server will
    /// guarantee that for at least 60 minutes after the first request.
    ///
    /// For example, consider a situation where you make an initial request and
    /// the request times out. If you make the request again with the same request
    /// ID, the server can check if original operation with the same request ID
    /// was received, and if so, will ignore the second request. This prevents
    /// clients from accidentally creating duplicate commitments.
    ///
    /// The request ID must be a valid UUID with the exception that zero UUID is
    /// not supported (00000000-0000-0000-0000-000000000000).
    #[prost(string, tag = "2")]
    pub request_id: ::prost::alloc::string::String,
}
/// Generated client implementations.
pub mod internal_range_service_client {
    #![allow(
        unused_variables,
        dead_code,
        missing_docs,
        clippy::wildcard_imports,
        clippy::let_unit_value,
    )]
    use tonic::codegen::*;
    use tonic::codegen::http::Uri;
    /// The CLH-based service for internal range resources used to perform IPAM
    /// operations within a VPC network.
    #[derive(Debug, Clone)]
    pub struct InternalRangeServiceClient<T> {
        inner: tonic::client::Grpc<T>,
    }
    impl InternalRangeServiceClient<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> InternalRangeServiceClient<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,
        ) -> InternalRangeServiceClient<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,
        {
            InternalRangeServiceClient::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 internal ranges in a given project and location.
        pub async fn list_internal_ranges(
            &mut self,
            request: impl tonic::IntoRequest<super::ListInternalRangesRequest>,
        ) -> std::result::Result<
            tonic::Response<super::ListInternalRangesResponse>,
            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.networkconnectivity.v1.InternalRangeService/ListInternalRanges",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.networkconnectivity.v1.InternalRangeService",
                        "ListInternalRanges",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Gets details of a single internal range.
        pub async fn get_internal_range(
            &mut self,
            request: impl tonic::IntoRequest<super::GetInternalRangeRequest>,
        ) -> std::result::Result<tonic::Response<super::InternalRange>, 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.networkconnectivity.v1.InternalRangeService/GetInternalRange",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.networkconnectivity.v1.InternalRangeService",
                        "GetInternalRange",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Creates a new internal range in a given project and location.
        pub async fn create_internal_range(
            &mut self,
            request: impl tonic::IntoRequest<super::CreateInternalRangeRequest>,
        ) -> 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.networkconnectivity.v1.InternalRangeService/CreateInternalRange",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.networkconnectivity.v1.InternalRangeService",
                        "CreateInternalRange",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Updates the parameters of a single internal range.
        pub async fn update_internal_range(
            &mut self,
            request: impl tonic::IntoRequest<super::UpdateInternalRangeRequest>,
        ) -> 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.networkconnectivity.v1.InternalRangeService/UpdateInternalRange",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.networkconnectivity.v1.InternalRangeService",
                        "UpdateInternalRange",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Deletes a single internal range.
        pub async fn delete_internal_range(
            &mut self,
            request: impl tonic::IntoRequest<super::DeleteInternalRangeRequest>,
        ) -> 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.networkconnectivity.v1.InternalRangeService/DeleteInternalRange",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.networkconnectivity.v1.InternalRangeService",
                        "DeleteInternalRange",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
    }
}
/// Policy-based routes route L4 network traffic based on not just destination IP
/// address, but also source IP address, protocol, and more. If a policy-based
/// route conflicts with other types of routes, the policy-based route always
/// takes precedence.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PolicyBasedRoute {
    /// Immutable. A unique name of the resource in the form of
    /// `projects/{project_number}/locations/global/PolicyBasedRoutes/{policy_based_route_id}`
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// Output only. Time when the policy-based route was created.
    #[prost(message, optional, tag = "2")]
    pub create_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Output only. Time when the policy-based route was updated.
    #[prost(message, optional, tag = "3")]
    pub update_time: ::core::option::Option<::prost_types::Timestamp>,
    /// User-defined labels.
    #[prost(map = "string, string", tag = "4")]
    pub labels: ::std::collections::HashMap<
        ::prost::alloc::string::String,
        ::prost::alloc::string::String,
    >,
    /// Optional. An optional description of this resource. Provide this field when
    /// you create the resource.
    #[prost(string, tag = "5")]
    pub description: ::prost::alloc::string::String,
    /// Required. Fully-qualified URL of the network that this route applies to,
    /// for example: projects/my-project/global/networks/my-network.
    #[prost(string, tag = "6")]
    pub network: ::prost::alloc::string::String,
    /// Required. The filter to match L4 traffic.
    #[prost(message, optional, tag = "10")]
    pub filter: ::core::option::Option<policy_based_route::Filter>,
    /// Optional. The priority of this policy-based route. Priority is used to
    /// break ties in cases where there are more than one matching policy-based
    /// routes found. In cases where multiple policy-based routes are matched, the
    /// one with the lowest-numbered priority value wins. The default value is
    /// 1000. The priority value must be from 1 to 65535, inclusive.
    #[prost(int32, tag = "11")]
    pub priority: i32,
    /// Output only. If potential misconfigurations are detected for this route,
    /// this field will be populated with warning messages.
    #[prost(message, repeated, tag = "14")]
    pub warnings: ::prost::alloc::vec::Vec<policy_based_route::Warnings>,
    /// Output only. Server-defined fully-qualified URL for this resource.
    #[prost(string, tag = "15")]
    pub self_link: ::prost::alloc::string::String,
    /// Output only. Type of this resource. Always
    /// networkconnectivity#policyBasedRoute for policy-based Route resources.
    #[prost(string, tag = "16")]
    pub kind: ::prost::alloc::string::String,
    /// Target specifies network endpoints that this policy-based route applies to.
    /// If no target is specified, the PBR will be installed on all network
    /// endpoints (e.g. VMs, VPNs, and Interconnects) in the VPC.
    #[prost(oneof = "policy_based_route::Target", tags = "18, 9")]
    pub target: ::core::option::Option<policy_based_route::Target>,
    #[prost(oneof = "policy_based_route::NextHop", tags = "12, 21")]
    pub next_hop: ::core::option::Option<policy_based_route::NextHop>,
}
/// Nested message and enum types in `PolicyBasedRoute`.
pub mod policy_based_route {
    /// VM instances that this policy-based route applies to.
    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
    pub struct VirtualMachine {
        /// Optional. A list of VM instance tags that this policy-based route applies
        /// to. VM instances that have ANY of tags specified here installs this PBR.
        #[prost(string, repeated, tag = "1")]
        pub tags: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    }
    /// InterconnectAttachment that this route applies to.
    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
    pub struct InterconnectAttachment {
        /// Optional. Cloud region to install this policy-based route on interconnect
        /// attachment. Use `all` to install it on all interconnect attachments.
        #[prost(string, tag = "1")]
        pub region: ::prost::alloc::string::String,
    }
    /// Filter matches L4 traffic.
    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
    pub struct Filter {
        /// Optional. The IP protocol that this policy-based route applies to. Valid
        /// values are 'TCP', 'UDP', and 'ALL'. Default is 'ALL'.
        #[prost(string, tag = "1")]
        pub ip_protocol: ::prost::alloc::string::String,
        /// Optional. The source IP range of outgoing packets that this policy-based
        /// route applies to. Default is "0.0.0.0/0" if protocol version is IPv4.
        #[prost(string, tag = "2")]
        pub src_range: ::prost::alloc::string::String,
        /// Optional. The destination IP range of outgoing packets that this
        /// policy-based route applies to. Default is "0.0.0.0/0" if protocol version
        /// is IPv4.
        #[prost(string, tag = "3")]
        pub dest_range: ::prost::alloc::string::String,
        /// Required. Internet protocol versions this policy-based route applies to.
        /// For this version, only IPV4 is supported. IPV6 is supported in preview.
        #[prost(enumeration = "filter::ProtocolVersion", tag = "6")]
        pub protocol_version: i32,
    }
    /// Nested message and enum types in `Filter`.
    pub mod filter {
        /// The internet protocol version.
        #[derive(
            Clone,
            Copy,
            Debug,
            PartialEq,
            Eq,
            Hash,
            PartialOrd,
            Ord,
            ::prost::Enumeration
        )]
        #[repr(i32)]
        pub enum ProtocolVersion {
            /// Default value.
            Unspecified = 0,
            /// The PBR is for IPv4 internet protocol traffic.
            Ipv4 = 1,
        }
        impl ProtocolVersion {
            /// 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 => "PROTOCOL_VERSION_UNSPECIFIED",
                    Self::Ipv4 => "IPV4",
                }
            }
            /// Creates an enum from field names used in the ProtoBuf definition.
            pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
                match value {
                    "PROTOCOL_VERSION_UNSPECIFIED" => Some(Self::Unspecified),
                    "IPV4" => Some(Self::Ipv4),
                    _ => None,
                }
            }
        }
    }
    /// Informational warning message.
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct Warnings {
        /// Output only. A warning code, if applicable.
        #[prost(enumeration = "warnings::Code", tag = "1")]
        pub code: i32,
        /// Output only. Metadata about this warning in key: value format. The key
        /// should provides more detail on the warning being returned. For example,
        /// for warnings where there are no results in a list request for a
        /// particular zone, this key might be scope and the key value might be the
        /// zone name. Other examples might be a key indicating a deprecated resource
        /// and a suggested replacement.
        #[prost(map = "string, string", tag = "2")]
        pub data: ::std::collections::HashMap<
            ::prost::alloc::string::String,
            ::prost::alloc::string::String,
        >,
        /// Output only. A human-readable description of the warning code.
        #[prost(string, tag = "3")]
        pub warning_message: ::prost::alloc::string::String,
    }
    /// Nested message and enum types in `Warnings`.
    pub mod warnings {
        /// Warning code for policy-based routing. Expect to add values in the
        /// future.
        #[derive(
            Clone,
            Copy,
            Debug,
            PartialEq,
            Eq,
            Hash,
            PartialOrd,
            Ord,
            ::prost::Enumeration
        )]
        #[repr(i32)]
        pub enum Code {
            /// Default value.
            WarningUnspecified = 0,
            /// The policy-based route is not active and functioning. Common causes are
            /// that the dependent network was deleted or the resource project was
            /// turned off.
            ResourceNotActive = 1,
            /// The policy-based route is being modified (e.g. created/deleted) at this
            /// time.
            ResourceBeingModified = 2,
        }
        impl Code {
            /// 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::WarningUnspecified => "WARNING_UNSPECIFIED",
                    Self::ResourceNotActive => "RESOURCE_NOT_ACTIVE",
                    Self::ResourceBeingModified => "RESOURCE_BEING_MODIFIED",
                }
            }
            /// Creates an enum from field names used in the ProtoBuf definition.
            pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
                match value {
                    "WARNING_UNSPECIFIED" => Some(Self::WarningUnspecified),
                    "RESOURCE_NOT_ACTIVE" => Some(Self::ResourceNotActive),
                    "RESOURCE_BEING_MODIFIED" => Some(Self::ResourceBeingModified),
                    _ => None,
                }
            }
        }
    }
    /// The other routing cases.
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum OtherRoutes {
        /// Default value.
        Unspecified = 0,
        /// Use the routes from the default routing tables (system-generated routes,
        /// custom routes, peering route) to determine the next hop. This effectively
        /// excludes matching packets being applied on other PBRs with a lower
        /// priority.
        DefaultRouting = 1,
    }
    impl OtherRoutes {
        /// 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 => "OTHER_ROUTES_UNSPECIFIED",
                Self::DefaultRouting => "DEFAULT_ROUTING",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "OTHER_ROUTES_UNSPECIFIED" => Some(Self::Unspecified),
                "DEFAULT_ROUTING" => Some(Self::DefaultRouting),
                _ => None,
            }
        }
    }
    /// Target specifies network endpoints that this policy-based route applies to.
    /// If no target is specified, the PBR will be installed on all network
    /// endpoints (e.g. VMs, VPNs, and Interconnects) in the VPC.
    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
    pub enum Target {
        /// Optional. VM instances that this policy-based route applies to.
        #[prost(message, tag = "18")]
        VirtualMachine(VirtualMachine),
        /// Optional. The interconnect attachments that this policy-based route
        /// applies to.
        #[prost(message, tag = "9")]
        InterconnectAttachment(InterconnectAttachment),
    }
    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
    pub enum NextHop {
        /// Optional. The IP address of a global-access-enabled L4 ILB that is the
        /// next hop for matching packets. For this version, only nextHopIlbIp is
        /// supported.
        #[prost(string, tag = "12")]
        NextHopIlbIp(::prost::alloc::string::String),
        /// Optional. Other routes that will be referenced to determine the next hop
        /// of the packet.
        #[prost(enumeration = "OtherRoutes", tag = "21")]
        NextHopOtherRoutes(i32),
    }
}
/// Request for
/// \[PolicyBasedRoutingService.ListPolicyBasedRoutes\]\[google.cloud.networkconnectivity.v1.PolicyBasedRoutingService.ListPolicyBasedRoutes\]
/// method.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ListPolicyBasedRoutesRequest {
    /// Required. The parent resource's name.
    #[prost(string, tag = "1")]
    pub parent: ::prost::alloc::string::String,
    /// The maximum number of results per page that should be returned.
    #[prost(int32, tag = "2")]
    pub page_size: i32,
    /// The page token.
    #[prost(string, tag = "3")]
    pub page_token: ::prost::alloc::string::String,
    /// A filter expression that filters the results listed in the response.
    #[prost(string, tag = "4")]
    pub filter: ::prost::alloc::string::String,
    /// Sort the results by a certain order.
    #[prost(string, tag = "5")]
    pub order_by: ::prost::alloc::string::String,
}
/// Response for
/// \[PolicyBasedRoutingService.ListPolicyBasedRoutes\]\[google.cloud.networkconnectivity.v1.PolicyBasedRoutingService.ListPolicyBasedRoutes\]
/// method.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListPolicyBasedRoutesResponse {
    /// Policy-based routes to be returned.
    #[prost(message, repeated, tag = "1")]
    pub policy_based_routes: ::prost::alloc::vec::Vec<PolicyBasedRoute>,
    /// The next pagination token in the List response. It should be used as
    /// page_token for the following request. An empty value means no more result.
    #[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 for
/// \[PolicyBasedRoutingService.GetPolicyBasedRoute\]\[google.cloud.networkconnectivity.v1.PolicyBasedRoutingService.GetPolicyBasedRoute\]
/// method.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GetPolicyBasedRouteRequest {
    /// Required. Name of the PolicyBasedRoute resource to get.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
}
/// Request for
/// \[PolicyBasedRoutingService.CreatePolicyBasedRoute\]\[google.cloud.networkconnectivity.v1.PolicyBasedRoutingService.CreatePolicyBasedRoute\]
/// method.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreatePolicyBasedRouteRequest {
    /// Required. The parent resource's name of the PolicyBasedRoute.
    #[prost(string, tag = "1")]
    pub parent: ::prost::alloc::string::String,
    /// Required. Unique id for the policy-based route to create. Provided by the
    /// client when the resource is created. The name must comply with
    /// <https://google.aip.dev/122#resource-id-segments.> Specifically, the name
    /// must be 1-63 characters long and match the regular expression
    /// [a-z](\[a-z0-9-\]*[a-z0-9])?. The first character must be a lowercase letter,
    /// and all following characters (except for the last character) must be a
    /// dash, lowercase letter, or digit. The last character must be a lowercase
    /// letter or digit.
    #[prost(string, tag = "2")]
    pub policy_based_route_id: ::prost::alloc::string::String,
    /// Required. Initial values for a new policy-based route.
    #[prost(message, optional, tag = "3")]
    pub policy_based_route: ::core::option::Option<PolicyBasedRoute>,
    /// Optional. An optional request ID to identify requests. Specify a unique
    /// request ID so that if you must retry your request, the server knows to
    /// ignore the request if it has already been completed. The server guarantees
    /// that for at least 60 minutes since the first request.
    ///
    /// For example, consider a situation where you make an initial request and
    /// the request times out. If you make the request again with the same request
    /// ID, the server can check if original operation with the same request ID
    /// was received, and if so, 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,
}
/// Request for
/// \[PolicyBasedRoutingService.DeletePolicyBasedRoute\]\[google.cloud.networkconnectivity.v1.PolicyBasedRoutingService.DeletePolicyBasedRoute\]
/// method.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct DeletePolicyBasedRouteRequest {
    /// Required. Name of the policy-based route resource to delete.
    #[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 knows to
    /// ignore the request if it has already been completed. The server guarantees
    /// that for at least 60 minutes after the first request.
    ///
    /// For example, consider a situation where you make an initial request and
    /// the request times out. If you make the request again with the same request
    /// ID, the server can check if original operation with the same request ID
    /// was received, and if so, 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,
}
/// Generated client implementations.
pub mod policy_based_routing_service_client {
    #![allow(
        unused_variables,
        dead_code,
        missing_docs,
        clippy::wildcard_imports,
        clippy::let_unit_value,
    )]
    use tonic::codegen::*;
    use tonic::codegen::http::Uri;
    /// Policy-Based Routing allows GCP customers to specify flexibile routing
    /// policies for Layer 4 traffic traversing through the connected service.
    #[derive(Debug, Clone)]
    pub struct PolicyBasedRoutingServiceClient<T> {
        inner: tonic::client::Grpc<T>,
    }
    impl PolicyBasedRoutingServiceClient<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> PolicyBasedRoutingServiceClient<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,
        ) -> PolicyBasedRoutingServiceClient<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,
        {
            PolicyBasedRoutingServiceClient::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 policy-based routes in a given project and location.
        pub async fn list_policy_based_routes(
            &mut self,
            request: impl tonic::IntoRequest<super::ListPolicyBasedRoutesRequest>,
        ) -> std::result::Result<
            tonic::Response<super::ListPolicyBasedRoutesResponse>,
            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.networkconnectivity.v1.PolicyBasedRoutingService/ListPolicyBasedRoutes",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.networkconnectivity.v1.PolicyBasedRoutingService",
                        "ListPolicyBasedRoutes",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Gets details of a single policy-based route.
        pub async fn get_policy_based_route(
            &mut self,
            request: impl tonic::IntoRequest<super::GetPolicyBasedRouteRequest>,
        ) -> std::result::Result<
            tonic::Response<super::PolicyBasedRoute>,
            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.networkconnectivity.v1.PolicyBasedRoutingService/GetPolicyBasedRoute",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.networkconnectivity.v1.PolicyBasedRoutingService",
                        "GetPolicyBasedRoute",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Creates a new policy-based route in a given project and location.
        pub async fn create_policy_based_route(
            &mut self,
            request: impl tonic::IntoRequest<super::CreatePolicyBasedRouteRequest>,
        ) -> 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.networkconnectivity.v1.PolicyBasedRoutingService/CreatePolicyBasedRoute",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.networkconnectivity.v1.PolicyBasedRoutingService",
                        "CreatePolicyBasedRoute",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Deletes a single policy-based route.
        pub async fn delete_policy_based_route(
            &mut self,
            request: impl tonic::IntoRequest<super::DeletePolicyBasedRouteRequest>,
        ) -> 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.networkconnectivity.v1.PolicyBasedRoutingService/DeletePolicyBasedRoute",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.networkconnectivity.v1.PolicyBasedRoutingService",
                        "DeletePolicyBasedRoute",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
    }
}
