// This file is @generated by prost-build.
/// The state of McpServer resource.
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum State {
    /// The McpServer state is unspecified.
    Unspecified = 0,
    /// The McpServer is enabled.
    Enabled = 1,
    /// The McpServer is disabled.
    Disabled = 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::Enabled => "ENABLED",
            Self::Disabled => "DISABLED",
        }
    }
    /// 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),
            "ENABLED" => Some(Self::Enabled),
            "DISABLED" => Some(Self::Disabled),
            _ => None,
        }
    }
}
/// Represents an MCP Server. MCP Servers act as endpoints that expose a
/// collection of tools that can be invoked by agents.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct McpServer {
    /// Identifier. The resource name of the MCP Server.
    /// Format:
    /// `projects/{project}/locations/{location}/mcpServers/{mcp_server}`.
    /// Example:
    /// projects/12345/locations/us-central1/mcpServers/google:bigquery.googleapis.com:mcp
    /// for 1p
    /// projects/12345/locations/us-central1/mcpServers/apphub:starbucks for
    /// 2p
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// Optional. A human readable name for the MCP server.
    #[prost(string, tag = "2")]
    pub display_name: ::prost::alloc::string::String,
    /// Optional. A human-readable description of the MCP Server's functionality.
    #[prost(string, tag = "3")]
    pub description: ::prost::alloc::string::String,
    /// The base URL of the MCP server. Example: \[geolocation.googleapis.com/mcp\].
    #[prost(string, repeated, tag = "4")]
    pub urls: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    /// The capabilities that a server may support. Known capabilities defined in
    /// <https://modelcontextprotocol.io/specification/2025-06-18/schema#servercapabilities>
    /// and additional capabilities defined by the servers.
    #[prost(message, optional, tag = "6")]
    pub capabilities: ::core::option::Option<::prost_types::Struct>,
    /// Output only. The state of the MCP Server.
    #[prost(enumeration = "State", tag = "7")]
    pub state: i32,
}
/// Message describing McpTool object
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct McpTool {
    /// Identifier. The resource name of the McpTool.
    /// Format:
    /// `projects/{project}/locations/{location}/mcpServers/{mcp_server}/mcpTools/{mcp_tool}`.
    /// Example:
    /// projects/12345/locations/us-central1/mcpServers/google:bigquery.googleapis.com:mcp/mcpTools/insert_job
    /// for 1p
    /// projects/12345/locations/us-central1/mcpServers/apphub:starbucks/mcpTools/order_pizza
    /// for 2p
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// Optional. A human-readable name for the tool, suitable for display.
    #[prost(string, tag = "2")]
    pub display_name: ::prost::alloc::string::String,
    /// A human-readable description of the tool's functionality.
    #[prost(string, tag = "3")]
    pub description: ::prost::alloc::string::String,
    /// Automatically populated reference to MCP Server. Helpful when multiple
    /// tools are requested across different MCP Servers.
    #[prost(string, repeated, tag = "4")]
    pub mcp_server_urls: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    /// A JSON Schema object defining the expected parameters for invoking the
    /// tool.
    #[prost(message, optional, tag = "5")]
    pub input_schema: ::core::option::Option<::prost_types::Struct>,
    /// Optional. A JSON Schema object defining the expected structure of the
    /// tool's output.
    #[prost(message, optional, tag = "6")]
    pub output_schema: ::core::option::Option<::prost_types::Struct>,
    /// Optional key-value object that allows developers to provide additional
    /// information regarding tool properties, behavior, and usage best practices.
    /// Annotations or tags to facilitate semantic search across tools ("semantic
    /// tags") are not in the MVP scope. When implemented, the first set of
    /// supported annotations will likely be the standard, predefined annotations
    /// from the open-source MCP spec. These include:
    ///
    /// * title: A human-readable title for the tool, useful for UI display.
    /// * readOnlyHint: If true, indicates the tool does not modify its
    ///   environment.
    /// * destructiveHint: If true, the tool may perform destructive updates
    ///   (only meaningful when readOnlyHint is false).
    /// * idempotentHint: If true, calling the tool repeatedly with the same
    ///   arguments has no additional effect (only meaningful when readOnlyHint is
    ///   false).
    /// * openWorldHint: If true, the tool may interact with an "open world" of
    ///   external entities.
    #[prost(message, optional, tag = "7")]
    pub annotations: ::core::option::Option<::prost_types::Struct>,
}
/// Message for getting a McpServer
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GetMcpServerRequest {
    /// Required. Name of the resource
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
}
/// Message for requesting list of McpServers
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ListMcpServersRequest {
    /// Required. Parent value for ListMcpServersRequest
    #[prost(string, tag = "1")]
    pub parent: ::prost::alloc::string::String,
    /// Optional. Requested page size. Server may return fewer items than
    /// requested. If unspecified, server will pick an appropriate default.
    #[prost(int32, tag = "2")]
    pub page_size: i32,
    /// Optional. A token identifying a page of results the server should return.
    #[prost(string, tag = "3")]
    pub page_token: ::prost::alloc::string::String,
    /// Optional. Filtering results
    #[prost(string, tag = "4")]
    pub filter: ::prost::alloc::string::String,
    /// Optional. Hint for how to order the results
    #[prost(string, tag = "5")]
    pub order_by: ::prost::alloc::string::String,
}
/// Message for response to listing McpServers
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListMcpServersResponse {
    /// The list of McpServer
    #[prost(message, repeated, tag = "1")]
    pub mcp_servers: ::prost::alloc::vec::Vec<McpServer>,
    /// A token identifying a page of results the server should return.
    #[prost(string, tag = "2")]
    pub next_page_token: ::prost::alloc::string::String,
    /// Locations that could not be reached.
    #[prost(string, repeated, tag = "3")]
    pub unreachable: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
/// Message for getting a McpTool
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GetMcpToolRequest {
    /// Required. Name of the resource
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
}
/// Message for requesting list of McpTools
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ListMcpToolsRequest {
    /// Required. Parent value for ListMcpToolsRequest
    #[prost(string, tag = "1")]
    pub parent: ::prost::alloc::string::String,
    /// Optional. Requested page size. Server may return fewer items than
    /// requested. If unspecified, server will pick an appropriate default.
    #[prost(int32, tag = "2")]
    pub page_size: i32,
    /// Optional. A token identifying a page of results the server should return.
    #[prost(string, tag = "3")]
    pub page_token: ::prost::alloc::string::String,
    /// Optional. Filtering results
    #[prost(string, tag = "4")]
    pub filter: ::prost::alloc::string::String,
    /// Optional. Hint for how to order the results
    #[prost(string, tag = "5")]
    pub order_by: ::prost::alloc::string::String,
}
/// Message for response to listing McpTools
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListMcpToolsResponse {
    /// The list of McpTool
    #[prost(message, repeated, tag = "1")]
    pub mcp_tools: ::prost::alloc::vec::Vec<McpTool>,
    /// A token identifying a page of results the server should return.
    #[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>,
}
/// Generated client implementations.
pub mod cloud_api_registry_client {
    #![allow(
        unused_variables,
        dead_code,
        missing_docs,
        clippy::wildcard_imports,
        clippy::let_unit_value,
    )]
    use tonic::codegen::*;
    use tonic::codegen::http::Uri;
    /// The Cloud API Registry service provides a central registry for managing API
    /// Data.
    #[derive(Debug, Clone)]
    pub struct CloudApiRegistryClient<T> {
        inner: tonic::client::Grpc<T>,
    }
    impl CloudApiRegistryClient<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> CloudApiRegistryClient<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,
        ) -> CloudApiRegistryClient<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,
        {
            CloudApiRegistryClient::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
        }
        /// Gets a single McpServer.
        pub async fn get_mcp_server(
            &mut self,
            request: impl tonic::IntoRequest<super::GetMcpServerRequest>,
        ) -> std::result::Result<tonic::Response<super::McpServer>, 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.apiregistry.v1beta.CloudApiRegistry/GetMcpServer",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.apiregistry.v1beta.CloudApiRegistry",
                        "GetMcpServer",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Lists McpServers in a given Project.
        pub async fn list_mcp_servers(
            &mut self,
            request: impl tonic::IntoRequest<super::ListMcpServersRequest>,
        ) -> std::result::Result<
            tonic::Response<super::ListMcpServersResponse>,
            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.apiregistry.v1beta.CloudApiRegistry/ListMcpServers",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.apiregistry.v1beta.CloudApiRegistry",
                        "ListMcpServers",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Gets a single McpTool.
        pub async fn get_mcp_tool(
            &mut self,
            request: impl tonic::IntoRequest<super::GetMcpToolRequest>,
        ) -> std::result::Result<tonic::Response<super::McpTool>, 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.apiregistry.v1beta.CloudApiRegistry/GetMcpTool",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.apiregistry.v1beta.CloudApiRegistry",
                        "GetMcpTool",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Lists McpTools in a given McpServer.
        pub async fn list_mcp_tools(
            &mut self,
            request: impl tonic::IntoRequest<super::ListMcpToolsRequest>,
        ) -> std::result::Result<
            tonic::Response<super::ListMcpToolsResponse>,
            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.apiregistry.v1beta.CloudApiRegistry/ListMcpTools",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.apiregistry.v1beta.CloudApiRegistry",
                        "ListMcpTools",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
    }
}
