// This file is @generated by prost-build.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct HelloRequest {
    #[prost(string, tag = "1")]
    pub version: ::prost::alloc::string::String,
    #[prost(string, tag = "2")]
    pub session_id: ::prost::alloc::string::String,
    /// The version compatibility range that the client requests.
    /// For example, if the client requests Patch level compatibility,
    /// then the server should trigger a failed precondition if the
    /// server's version is not identical down to the patch level.
    #[prost(enumeration = "VersionRange", tag = "3")]
    pub supported_version_range: i32,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct HelloResponse {}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ShutdownRequest {}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ShutdownResponse {}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct StatusRequest {}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct StatusResponse {
    #[prost(message, optional, tag = "1")]
    pub daemon_status: ::core::option::Option<DaemonStatus>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct NotifyOutputsWrittenRequest {
    #[prost(string, repeated, tag = "1")]
    pub output_globs: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    #[prost(string, tag = "2")]
    pub hash: ::prost::alloc::string::String,
    #[prost(string, repeated, tag = "3")]
    pub output_exclusion_globs: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    #[prost(uint64, tag = "4")]
    pub time_saved: u64,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct NotifyOutputsWrittenResponse {}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GetChangedOutputsRequest {
    #[prost(string, repeated, tag = "1")]
    pub output_globs: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    #[prost(string, tag = "2")]
    pub hash: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GetChangedOutputsResponse {
    #[prost(string, repeated, tag = "1")]
    pub changed_output_globs: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    #[prost(uint64, tag = "2")]
    pub time_saved: u64,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct DaemonStatus {
    #[prost(string, tag = "1")]
    pub log_file: ::prost::alloc::string::String,
    #[prost(uint64, tag = "2")]
    pub uptime_msec: u64,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct DiscoverPackagesRequest {}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct PackageChangesRequest {}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct PackageChangeEvent {
    #[prost(oneof = "package_change_event::Event", tags = "1, 2, 3")]
    pub event: ::core::option::Option<package_change_event::Event>,
}
/// Nested message and enum types in `PackageChangeEvent`.
pub mod package_change_event {
    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
    pub enum Event {
        #[prost(message, tag = "1")]
        PackageChanged(super::PackageChanged),
        #[prost(message, tag = "2")]
        RediscoverPackages(super::RediscoverPackages),
        #[prost(message, tag = "3")]
        Error(super::PackageChangeError),
    }
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct PackageChangeError {
    #[prost(string, tag = "1")]
    pub message: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct PackageChanged {
    #[prost(string, tag = "1")]
    pub package_name: ::prost::alloc::string::String,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct RediscoverPackages {}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DiscoverPackagesResponse {
    #[prost(message, repeated, tag = "1")]
    pub package_files: ::prost::alloc::vec::Vec<PackageFiles>,
    #[prost(enumeration = "PackageManager", tag = "2")]
    pub package_manager: i32,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct PackageFiles {
    #[prost(string, tag = "1")]
    pub package_json: ::prost::alloc::string::String,
    #[prost(string, optional, tag = "2")]
    pub turbo_json: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GetFileHashesRequest {
    /// AnchoredSystemPathBuf
    #[prost(string, tag = "1")]
    pub package_path: ::prost::alloc::string::String,
    #[prost(string, repeated, tag = "2")]
    pub input_globs: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    #[prost(bool, optional, tag = "3")]
    pub include_default: ::core::option::Option<bool>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetFileHashesResponse {
    /// RelativeUnixPathBuf -> Hash
    #[prost(map = "string, string", tag = "1")]
    pub file_hashes: ::std::collections::HashMap<
        ::prost::alloc::string::String,
        ::prost::alloc::string::String,
    >,
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum VersionRange {
    /// Default to match old behaviour. Requires exact string match,
    /// performing no compatibility checks.
    Exact = 0,
    /// The Major and Minor version must match, and the Patch version
    /// must be greater than or equal to the client's Patch version.
    Patch = 1,
    /// The Major version must match, and the Minor version must be
    /// greater than or equal to the client's Minor version.
    Minor = 2,
    /// The Major version must match. This is the most lenient check.
    Major = 3,
}
impl VersionRange {
    /// 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::Exact => "Exact",
            Self::Patch => "Patch",
            Self::Minor => "Minor",
            Self::Major => "Major",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "Exact" => Some(Self::Exact),
            "Patch" => Some(Self::Patch),
            "Minor" => Some(Self::Minor),
            "Major" => Some(Self::Major),
            _ => None,
        }
    }
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum PackageManager {
    Berry = 0,
    Npm = 1,
    Pnpm = 2,
    Pnpm6 = 3,
    Yarn = 4,
    Bun = 5,
    Pnpm9 = 6,
}
impl PackageManager {
    /// 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::Berry => "Berry",
            Self::Npm => "Npm",
            Self::Pnpm => "Pnpm",
            Self::Pnpm6 => "Pnpm6",
            Self::Yarn => "Yarn",
            Self::Bun => "Bun",
            Self::Pnpm9 => "Pnpm9",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "Berry" => Some(Self::Berry),
            "Npm" => Some(Self::Npm),
            "Pnpm" => Some(Self::Pnpm),
            "Pnpm6" => Some(Self::Pnpm6),
            "Yarn" => Some(Self::Yarn),
            "Bun" => Some(Self::Bun),
            "Pnpm9" => Some(Self::Pnpm9),
            _ => None,
        }
    }
}
/// Generated client implementations.
pub mod turbod_client {
    #![allow(
        unused_variables,
        dead_code,
        missing_docs,
        clippy::wildcard_imports,
        clippy::let_unit_value,
    )]
    use tonic::codegen::*;
    use tonic::codegen::http::Uri;
    #[derive(Debug, Clone)]
    pub struct TurbodClient<T> {
        inner: tonic::client::Grpc<T>,
    }
    impl TurbodClient<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> TurbodClient<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,
        ) -> TurbodClient<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,
        {
            TurbodClient::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
        }
        pub async fn hello(
            &mut self,
            request: impl tonic::IntoRequest<super::HelloRequest>,
        ) -> std::result::Result<tonic::Response<super::HelloResponse>, 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(
                "/turbodprotocol.Turbod/Hello",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(GrpcMethod::new("turbodprotocol.Turbod", "Hello"));
            self.inner.unary(req, path, codec).await
        }
        pub async fn shutdown(
            &mut self,
            request: impl tonic::IntoRequest<super::ShutdownRequest>,
        ) -> std::result::Result<
            tonic::Response<super::ShutdownResponse>,
            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(
                "/turbodprotocol.Turbod/Shutdown",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(GrpcMethod::new("turbodprotocol.Turbod", "Shutdown"));
            self.inner.unary(req, path, codec).await
        }
        pub async fn status(
            &mut self,
            request: impl tonic::IntoRequest<super::StatusRequest>,
        ) -> std::result::Result<tonic::Response<super::StatusResponse>, 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(
                "/turbodprotocol.Turbod/Status",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(GrpcMethod::new("turbodprotocol.Turbod", "Status"));
            self.inner.unary(req, path, codec).await
        }
        /// Implement cache watching
        pub async fn notify_outputs_written(
            &mut self,
            request: impl tonic::IntoRequest<super::NotifyOutputsWrittenRequest>,
        ) -> std::result::Result<
            tonic::Response<super::NotifyOutputsWrittenResponse>,
            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(
                "/turbodprotocol.Turbod/NotifyOutputsWritten",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new("turbodprotocol.Turbod", "NotifyOutputsWritten"),
                );
            self.inner.unary(req, path, codec).await
        }
        pub async fn get_changed_outputs(
            &mut self,
            request: impl tonic::IntoRequest<super::GetChangedOutputsRequest>,
        ) -> std::result::Result<
            tonic::Response<super::GetChangedOutputsResponse>,
            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(
                "/turbodprotocol.Turbod/GetChangedOutputs",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(GrpcMethod::new("turbodprotocol.Turbod", "GetChangedOutputs"));
            self.inner.unary(req, path, codec).await
        }
        /// Request the list of packages that the daemon is aware of.
        ///
        /// Since 1.11.0
        pub async fn discover_packages(
            &mut self,
            request: impl tonic::IntoRequest<super::DiscoverPackagesRequest>,
        ) -> std::result::Result<
            tonic::Response<super::DiscoverPackagesResponse>,
            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(
                "/turbodprotocol.Turbod/DiscoverPackages",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(GrpcMethod::new("turbodprotocol.Turbod", "DiscoverPackages"));
            self.inner.unary(req, path, codec).await
        }
        /// Request the list of packages that the daemon is aware of.
        /// This is a blocking call that will wait for the daemon to finish
        /// discovering the packages, rather than returning 'unavailable'.
        /// It will *still* report unavailable if a critical process in the
        /// daemon is not running, and the answer will never come.
        ///
        /// Since 1.12.0
        pub async fn discover_packages_blocking(
            &mut self,
            request: impl tonic::IntoRequest<super::DiscoverPackagesRequest>,
        ) -> std::result::Result<
            tonic::Response<super::DiscoverPackagesResponse>,
            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(
                "/turbodprotocol.Turbod/DiscoverPackagesBlocking",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new("turbodprotocol.Turbod", "DiscoverPackagesBlocking"),
                );
            self.inner.unary(req, path, codec).await
        }
        pub async fn package_changes(
            &mut self,
            request: impl tonic::IntoRequest<super::PackageChangesRequest>,
        ) -> std::result::Result<
            tonic::Response<tonic::codec::Streaming<super::PackageChangeEvent>>,
            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(
                "/turbodprotocol.Turbod/PackageChanges",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(GrpcMethod::new("turbodprotocol.Turbod", "PackageChanges"));
            self.inner.server_streaming(req, path, codec).await
        }
        pub async fn get_file_hashes(
            &mut self,
            request: impl tonic::IntoRequest<super::GetFileHashesRequest>,
        ) -> std::result::Result<
            tonic::Response<super::GetFileHashesResponse>,
            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(
                "/turbodprotocol.Turbod/GetFileHashes",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(GrpcMethod::new("turbodprotocol.Turbod", "GetFileHashes"));
            self.inner.unary(req, path, codec).await
        }
    }
}
/// Generated server implementations.
pub mod turbod_server {
    #![allow(
        unused_variables,
        dead_code,
        missing_docs,
        clippy::wildcard_imports,
        clippy::let_unit_value,
    )]
    use tonic::codegen::*;
    /// Generated trait containing gRPC methods that should be implemented for use with TurbodServer.
    #[async_trait]
    pub trait Turbod: std::marker::Send + std::marker::Sync + 'static {
        async fn hello(
            &self,
            request: tonic::Request<super::HelloRequest>,
        ) -> std::result::Result<tonic::Response<super::HelloResponse>, tonic::Status>;
        async fn shutdown(
            &self,
            request: tonic::Request<super::ShutdownRequest>,
        ) -> std::result::Result<
            tonic::Response<super::ShutdownResponse>,
            tonic::Status,
        >;
        async fn status(
            &self,
            request: tonic::Request<super::StatusRequest>,
        ) -> std::result::Result<tonic::Response<super::StatusResponse>, tonic::Status>;
        /// Implement cache watching
        async fn notify_outputs_written(
            &self,
            request: tonic::Request<super::NotifyOutputsWrittenRequest>,
        ) -> std::result::Result<
            tonic::Response<super::NotifyOutputsWrittenResponse>,
            tonic::Status,
        >;
        async fn get_changed_outputs(
            &self,
            request: tonic::Request<super::GetChangedOutputsRequest>,
        ) -> std::result::Result<
            tonic::Response<super::GetChangedOutputsResponse>,
            tonic::Status,
        >;
        /// Request the list of packages that the daemon is aware of.
        ///
        /// Since 1.11.0
        async fn discover_packages(
            &self,
            request: tonic::Request<super::DiscoverPackagesRequest>,
        ) -> std::result::Result<
            tonic::Response<super::DiscoverPackagesResponse>,
            tonic::Status,
        >;
        /// Request the list of packages that the daemon is aware of.
        /// This is a blocking call that will wait for the daemon to finish
        /// discovering the packages, rather than returning 'unavailable'.
        /// It will *still* report unavailable if a critical process in the
        /// daemon is not running, and the answer will never come.
        ///
        /// Since 1.12.0
        async fn discover_packages_blocking(
            &self,
            request: tonic::Request<super::DiscoverPackagesRequest>,
        ) -> std::result::Result<
            tonic::Response<super::DiscoverPackagesResponse>,
            tonic::Status,
        >;
        /// Server streaming response type for the PackageChanges method.
        type PackageChangesStream: tonic::codegen::tokio_stream::Stream<
                Item = std::result::Result<super::PackageChangeEvent, tonic::Status>,
            >
            + std::marker::Send
            + 'static;
        async fn package_changes(
            &self,
            request: tonic::Request<super::PackageChangesRequest>,
        ) -> std::result::Result<
            tonic::Response<Self::PackageChangesStream>,
            tonic::Status,
        >;
        async fn get_file_hashes(
            &self,
            request: tonic::Request<super::GetFileHashesRequest>,
        ) -> std::result::Result<
            tonic::Response<super::GetFileHashesResponse>,
            tonic::Status,
        >;
    }
    #[derive(Debug)]
    pub struct TurbodServer<T> {
        inner: Arc<T>,
        accept_compression_encodings: EnabledCompressionEncodings,
        send_compression_encodings: EnabledCompressionEncodings,
        max_decoding_message_size: Option<usize>,
        max_encoding_message_size: Option<usize>,
    }
    impl<T> TurbodServer<T> {
        pub fn new(inner: T) -> Self {
            Self::from_arc(Arc::new(inner))
        }
        pub fn from_arc(inner: Arc<T>) -> Self {
            Self {
                inner,
                accept_compression_encodings: Default::default(),
                send_compression_encodings: Default::default(),
                max_decoding_message_size: None,
                max_encoding_message_size: None,
            }
        }
        pub fn with_interceptor<F>(
            inner: T,
            interceptor: F,
        ) -> InterceptedService<Self, F>
        where
            F: tonic::service::Interceptor,
        {
            InterceptedService::new(Self::new(inner), interceptor)
        }
        /// Enable decompressing requests with the given encoding.
        #[must_use]
        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
            self.accept_compression_encodings.enable(encoding);
            self
        }
        /// Compress responses with the given encoding, if the client supports it.
        #[must_use]
        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
            self.send_compression_encodings.enable(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.max_decoding_message_size = Some(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.max_encoding_message_size = Some(limit);
            self
        }
    }
    impl<T, B> tonic::codegen::Service<http::Request<B>> for TurbodServer<T>
    where
        T: Turbod,
        B: Body + std::marker::Send + 'static,
        B::Error: Into<StdError> + std::marker::Send + 'static,
    {
        type Response = http::Response<tonic::body::Body>;
        type Error = std::convert::Infallible;
        type Future = BoxFuture<Self::Response, Self::Error>;
        fn poll_ready(
            &mut self,
            _cx: &mut Context<'_>,
        ) -> Poll<std::result::Result<(), Self::Error>> {
            Poll::Ready(Ok(()))
        }
        fn call(&mut self, req: http::Request<B>) -> Self::Future {
            match req.uri().path() {
                "/turbodprotocol.Turbod/Hello" => {
                    #[allow(non_camel_case_types)]
                    struct HelloSvc<T: Turbod>(pub Arc<T>);
                    impl<T: Turbod> tonic::server::UnaryService<super::HelloRequest>
                    for HelloSvc<T> {
                        type Response = super::HelloResponse;
                        type Future = BoxFuture<
                            tonic::Response<Self::Response>,
                            tonic::Status,
                        >;
                        fn call(
                            &mut self,
                            request: tonic::Request<super::HelloRequest>,
                        ) -> Self::Future {
                            let inner = Arc::clone(&self.0);
                            let fut = async move {
                                <T as Turbod>::hello(&inner, request).await
                            };
                            Box::pin(fut)
                        }
                    }
                    let accept_compression_encodings = self.accept_compression_encodings;
                    let send_compression_encodings = self.send_compression_encodings;
                    let max_decoding_message_size = self.max_decoding_message_size;
                    let max_encoding_message_size = self.max_encoding_message_size;
                    let inner = self.inner.clone();
                    let fut = async move {
                        let method = HelloSvc(inner);
                        let codec = tonic_prost::ProstCodec::default();
                        let mut grpc = tonic::server::Grpc::new(codec)
                            .apply_compression_config(
                                accept_compression_encodings,
                                send_compression_encodings,
                            )
                            .apply_max_message_size_config(
                                max_decoding_message_size,
                                max_encoding_message_size,
                            );
                        let res = grpc.unary(method, req).await;
                        Ok(res)
                    };
                    Box::pin(fut)
                }
                "/turbodprotocol.Turbod/Shutdown" => {
                    #[allow(non_camel_case_types)]
                    struct ShutdownSvc<T: Turbod>(pub Arc<T>);
                    impl<T: Turbod> tonic::server::UnaryService<super::ShutdownRequest>
                    for ShutdownSvc<T> {
                        type Response = super::ShutdownResponse;
                        type Future = BoxFuture<
                            tonic::Response<Self::Response>,
                            tonic::Status,
                        >;
                        fn call(
                            &mut self,
                            request: tonic::Request<super::ShutdownRequest>,
                        ) -> Self::Future {
                            let inner = Arc::clone(&self.0);
                            let fut = async move {
                                <T as Turbod>::shutdown(&inner, request).await
                            };
                            Box::pin(fut)
                        }
                    }
                    let accept_compression_encodings = self.accept_compression_encodings;
                    let send_compression_encodings = self.send_compression_encodings;
                    let max_decoding_message_size = self.max_decoding_message_size;
                    let max_encoding_message_size = self.max_encoding_message_size;
                    let inner = self.inner.clone();
                    let fut = async move {
                        let method = ShutdownSvc(inner);
                        let codec = tonic_prost::ProstCodec::default();
                        let mut grpc = tonic::server::Grpc::new(codec)
                            .apply_compression_config(
                                accept_compression_encodings,
                                send_compression_encodings,
                            )
                            .apply_max_message_size_config(
                                max_decoding_message_size,
                                max_encoding_message_size,
                            );
                        let res = grpc.unary(method, req).await;
                        Ok(res)
                    };
                    Box::pin(fut)
                }
                "/turbodprotocol.Turbod/Status" => {
                    #[allow(non_camel_case_types)]
                    struct StatusSvc<T: Turbod>(pub Arc<T>);
                    impl<T: Turbod> tonic::server::UnaryService<super::StatusRequest>
                    for StatusSvc<T> {
                        type Response = super::StatusResponse;
                        type Future = BoxFuture<
                            tonic::Response<Self::Response>,
                            tonic::Status,
                        >;
                        fn call(
                            &mut self,
                            request: tonic::Request<super::StatusRequest>,
                        ) -> Self::Future {
                            let inner = Arc::clone(&self.0);
                            let fut = async move {
                                <T as Turbod>::status(&inner, request).await
                            };
                            Box::pin(fut)
                        }
                    }
                    let accept_compression_encodings = self.accept_compression_encodings;
                    let send_compression_encodings = self.send_compression_encodings;
                    let max_decoding_message_size = self.max_decoding_message_size;
                    let max_encoding_message_size = self.max_encoding_message_size;
                    let inner = self.inner.clone();
                    let fut = async move {
                        let method = StatusSvc(inner);
                        let codec = tonic_prost::ProstCodec::default();
                        let mut grpc = tonic::server::Grpc::new(codec)
                            .apply_compression_config(
                                accept_compression_encodings,
                                send_compression_encodings,
                            )
                            .apply_max_message_size_config(
                                max_decoding_message_size,
                                max_encoding_message_size,
                            );
                        let res = grpc.unary(method, req).await;
                        Ok(res)
                    };
                    Box::pin(fut)
                }
                "/turbodprotocol.Turbod/NotifyOutputsWritten" => {
                    #[allow(non_camel_case_types)]
                    struct NotifyOutputsWrittenSvc<T: Turbod>(pub Arc<T>);
                    impl<
                        T: Turbod,
                    > tonic::server::UnaryService<super::NotifyOutputsWrittenRequest>
                    for NotifyOutputsWrittenSvc<T> {
                        type Response = super::NotifyOutputsWrittenResponse;
                        type Future = BoxFuture<
                            tonic::Response<Self::Response>,
                            tonic::Status,
                        >;
                        fn call(
                            &mut self,
                            request: tonic::Request<super::NotifyOutputsWrittenRequest>,
                        ) -> Self::Future {
                            let inner = Arc::clone(&self.0);
                            let fut = async move {
                                <T as Turbod>::notify_outputs_written(&inner, request).await
                            };
                            Box::pin(fut)
                        }
                    }
                    let accept_compression_encodings = self.accept_compression_encodings;
                    let send_compression_encodings = self.send_compression_encodings;
                    let max_decoding_message_size = self.max_decoding_message_size;
                    let max_encoding_message_size = self.max_encoding_message_size;
                    let inner = self.inner.clone();
                    let fut = async move {
                        let method = NotifyOutputsWrittenSvc(inner);
                        let codec = tonic_prost::ProstCodec::default();
                        let mut grpc = tonic::server::Grpc::new(codec)
                            .apply_compression_config(
                                accept_compression_encodings,
                                send_compression_encodings,
                            )
                            .apply_max_message_size_config(
                                max_decoding_message_size,
                                max_encoding_message_size,
                            );
                        let res = grpc.unary(method, req).await;
                        Ok(res)
                    };
                    Box::pin(fut)
                }
                "/turbodprotocol.Turbod/GetChangedOutputs" => {
                    #[allow(non_camel_case_types)]
                    struct GetChangedOutputsSvc<T: Turbod>(pub Arc<T>);
                    impl<
                        T: Turbod,
                    > tonic::server::UnaryService<super::GetChangedOutputsRequest>
                    for GetChangedOutputsSvc<T> {
                        type Response = super::GetChangedOutputsResponse;
                        type Future = BoxFuture<
                            tonic::Response<Self::Response>,
                            tonic::Status,
                        >;
                        fn call(
                            &mut self,
                            request: tonic::Request<super::GetChangedOutputsRequest>,
                        ) -> Self::Future {
                            let inner = Arc::clone(&self.0);
                            let fut = async move {
                                <T as Turbod>::get_changed_outputs(&inner, request).await
                            };
                            Box::pin(fut)
                        }
                    }
                    let accept_compression_encodings = self.accept_compression_encodings;
                    let send_compression_encodings = self.send_compression_encodings;
                    let max_decoding_message_size = self.max_decoding_message_size;
                    let max_encoding_message_size = self.max_encoding_message_size;
                    let inner = self.inner.clone();
                    let fut = async move {
                        let method = GetChangedOutputsSvc(inner);
                        let codec = tonic_prost::ProstCodec::default();
                        let mut grpc = tonic::server::Grpc::new(codec)
                            .apply_compression_config(
                                accept_compression_encodings,
                                send_compression_encodings,
                            )
                            .apply_max_message_size_config(
                                max_decoding_message_size,
                                max_encoding_message_size,
                            );
                        let res = grpc.unary(method, req).await;
                        Ok(res)
                    };
                    Box::pin(fut)
                }
                "/turbodprotocol.Turbod/DiscoverPackages" => {
                    #[allow(non_camel_case_types)]
                    struct DiscoverPackagesSvc<T: Turbod>(pub Arc<T>);
                    impl<
                        T: Turbod,
                    > tonic::server::UnaryService<super::DiscoverPackagesRequest>
                    for DiscoverPackagesSvc<T> {
                        type Response = super::DiscoverPackagesResponse;
                        type Future = BoxFuture<
                            tonic::Response<Self::Response>,
                            tonic::Status,
                        >;
                        fn call(
                            &mut self,
                            request: tonic::Request<super::DiscoverPackagesRequest>,
                        ) -> Self::Future {
                            let inner = Arc::clone(&self.0);
                            let fut = async move {
                                <T as Turbod>::discover_packages(&inner, request).await
                            };
                            Box::pin(fut)
                        }
                    }
                    let accept_compression_encodings = self.accept_compression_encodings;
                    let send_compression_encodings = self.send_compression_encodings;
                    let max_decoding_message_size = self.max_decoding_message_size;
                    let max_encoding_message_size = self.max_encoding_message_size;
                    let inner = self.inner.clone();
                    let fut = async move {
                        let method = DiscoverPackagesSvc(inner);
                        let codec = tonic_prost::ProstCodec::default();
                        let mut grpc = tonic::server::Grpc::new(codec)
                            .apply_compression_config(
                                accept_compression_encodings,
                                send_compression_encodings,
                            )
                            .apply_max_message_size_config(
                                max_decoding_message_size,
                                max_encoding_message_size,
                            );
                        let res = grpc.unary(method, req).await;
                        Ok(res)
                    };
                    Box::pin(fut)
                }
                "/turbodprotocol.Turbod/DiscoverPackagesBlocking" => {
                    #[allow(non_camel_case_types)]
                    struct DiscoverPackagesBlockingSvc<T: Turbod>(pub Arc<T>);
                    impl<
                        T: Turbod,
                    > tonic::server::UnaryService<super::DiscoverPackagesRequest>
                    for DiscoverPackagesBlockingSvc<T> {
                        type Response = super::DiscoverPackagesResponse;
                        type Future = BoxFuture<
                            tonic::Response<Self::Response>,
                            tonic::Status,
                        >;
                        fn call(
                            &mut self,
                            request: tonic::Request<super::DiscoverPackagesRequest>,
                        ) -> Self::Future {
                            let inner = Arc::clone(&self.0);
                            let fut = async move {
                                <T as Turbod>::discover_packages_blocking(&inner, request)
                                    .await
                            };
                            Box::pin(fut)
                        }
                    }
                    let accept_compression_encodings = self.accept_compression_encodings;
                    let send_compression_encodings = self.send_compression_encodings;
                    let max_decoding_message_size = self.max_decoding_message_size;
                    let max_encoding_message_size = self.max_encoding_message_size;
                    let inner = self.inner.clone();
                    let fut = async move {
                        let method = DiscoverPackagesBlockingSvc(inner);
                        let codec = tonic_prost::ProstCodec::default();
                        let mut grpc = tonic::server::Grpc::new(codec)
                            .apply_compression_config(
                                accept_compression_encodings,
                                send_compression_encodings,
                            )
                            .apply_max_message_size_config(
                                max_decoding_message_size,
                                max_encoding_message_size,
                            );
                        let res = grpc.unary(method, req).await;
                        Ok(res)
                    };
                    Box::pin(fut)
                }
                "/turbodprotocol.Turbod/PackageChanges" => {
                    #[allow(non_camel_case_types)]
                    struct PackageChangesSvc<T: Turbod>(pub Arc<T>);
                    impl<
                        T: Turbod,
                    > tonic::server::ServerStreamingService<super::PackageChangesRequest>
                    for PackageChangesSvc<T> {
                        type Response = super::PackageChangeEvent;
                        type ResponseStream = T::PackageChangesStream;
                        type Future = BoxFuture<
                            tonic::Response<Self::ResponseStream>,
                            tonic::Status,
                        >;
                        fn call(
                            &mut self,
                            request: tonic::Request<super::PackageChangesRequest>,
                        ) -> Self::Future {
                            let inner = Arc::clone(&self.0);
                            let fut = async move {
                                <T as Turbod>::package_changes(&inner, request).await
                            };
                            Box::pin(fut)
                        }
                    }
                    let accept_compression_encodings = self.accept_compression_encodings;
                    let send_compression_encodings = self.send_compression_encodings;
                    let max_decoding_message_size = self.max_decoding_message_size;
                    let max_encoding_message_size = self.max_encoding_message_size;
                    let inner = self.inner.clone();
                    let fut = async move {
                        let method = PackageChangesSvc(inner);
                        let codec = tonic_prost::ProstCodec::default();
                        let mut grpc = tonic::server::Grpc::new(codec)
                            .apply_compression_config(
                                accept_compression_encodings,
                                send_compression_encodings,
                            )
                            .apply_max_message_size_config(
                                max_decoding_message_size,
                                max_encoding_message_size,
                            );
                        let res = grpc.server_streaming(method, req).await;
                        Ok(res)
                    };
                    Box::pin(fut)
                }
                "/turbodprotocol.Turbod/GetFileHashes" => {
                    #[allow(non_camel_case_types)]
                    struct GetFileHashesSvc<T: Turbod>(pub Arc<T>);
                    impl<
                        T: Turbod,
                    > tonic::server::UnaryService<super::GetFileHashesRequest>
                    for GetFileHashesSvc<T> {
                        type Response = super::GetFileHashesResponse;
                        type Future = BoxFuture<
                            tonic::Response<Self::Response>,
                            tonic::Status,
                        >;
                        fn call(
                            &mut self,
                            request: tonic::Request<super::GetFileHashesRequest>,
                        ) -> Self::Future {
                            let inner = Arc::clone(&self.0);
                            let fut = async move {
                                <T as Turbod>::get_file_hashes(&inner, request).await
                            };
                            Box::pin(fut)
                        }
                    }
                    let accept_compression_encodings = self.accept_compression_encodings;
                    let send_compression_encodings = self.send_compression_encodings;
                    let max_decoding_message_size = self.max_decoding_message_size;
                    let max_encoding_message_size = self.max_encoding_message_size;
                    let inner = self.inner.clone();
                    let fut = async move {
                        let method = GetFileHashesSvc(inner);
                        let codec = tonic_prost::ProstCodec::default();
                        let mut grpc = tonic::server::Grpc::new(codec)
                            .apply_compression_config(
                                accept_compression_encodings,
                                send_compression_encodings,
                            )
                            .apply_max_message_size_config(
                                max_decoding_message_size,
                                max_encoding_message_size,
                            );
                        let res = grpc.unary(method, req).await;
                        Ok(res)
                    };
                    Box::pin(fut)
                }
                _ => {
                    Box::pin(async move {
                        let mut response = http::Response::new(
                            tonic::body::Body::default(),
                        );
                        let headers = response.headers_mut();
                        headers
                            .insert(
                                tonic::Status::GRPC_STATUS,
                                (tonic::Code::Unimplemented as i32).into(),
                            );
                        headers
                            .insert(
                                http::header::CONTENT_TYPE,
                                tonic::metadata::GRPC_CONTENT_TYPE,
                            );
                        Ok(response)
                    })
                }
            }
        }
    }
    impl<T> Clone for TurbodServer<T> {
        fn clone(&self) -> Self {
            let inner = self.inner.clone();
            Self {
                inner,
                accept_compression_encodings: self.accept_compression_encodings,
                send_compression_encodings: self.send_compression_encodings,
                max_decoding_message_size: self.max_decoding_message_size,
                max_encoding_message_size: self.max_encoding_message_size,
            }
        }
    }
    /// Generated gRPC service name
    pub const SERVICE_NAME: &str = "turbodprotocol.Turbod";
    impl<T> tonic::server::NamedService for TurbodServer<T> {
        const NAME: &'static str = SERVICE_NAME;
    }
}
