// This file is @generated by prost-build.
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct PathsRequest {
    /// ISD-AS of the source of the path request.
    #[prost(uint64, tag = "1")]
    pub source_isd_as: u64,
    /// ISD-AS of the destination of the path request.
    #[prost(uint64, tag = "2")]
    pub destination_isd_as: u64,
    /// Choose to fetch fresh paths for this request instead
    /// of having the server reply from its cache.
    #[prost(bool, tag = "3")]
    pub refresh: bool,
    /// Request hidden paths instead of standard paths.
    #[prost(bool, tag = "4")]
    pub hidden: bool,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PathsResponse {
    /// List of paths found by the daemon.
    #[prost(message, repeated, tag = "1")]
    pub paths: ::prost::alloc::vec::Vec<Path>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Path {
    /// The raw data-plane path.
    #[prost(bytes = "vec", tag = "1")]
    pub raw: ::prost::alloc::vec::Vec<u8>,
    /// Interface for exiting the local AS using this path.
    #[prost(message, optional, tag = "2")]
    pub interface: ::core::option::Option<Interface>,
    /// The list of interfaces the path is composed of.
    #[prost(message, repeated, tag = "3")]
    pub interfaces: ::prost::alloc::vec::Vec<PathInterface>,
    /// The maximum transmission unit (MTU) on the path.
    #[prost(uint32, tag = "4")]
    pub mtu: u32,
    /// The point in time when this path expires. In seconds since UNIX epoch.
    #[prost(message, optional, tag = "5")]
    pub expiration: ::core::option::Option<::prost_types::Timestamp>,
    /// Latency lists the latencies between any two consecutive interfaces.
    /// Entry i describes the latency between interface i and i+1.
    /// Consequently, there are N-1 entries for N interfaces.
    /// A negative value indicates that the AS did not announce a latency for
    /// this hop.
    #[prost(message, repeated, tag = "6")]
    pub latency: ::prost::alloc::vec::Vec<::prost_types::Duration>,
    /// Bandwidth lists the bandwidth between any two consecutive interfaces, in
    /// Kbit/s.
    /// Entry i describes the bandwidth between interfaces i and i+1.
    /// A 0-value indicates that the AS did not announce a bandwidth for this
    /// hop.
    #[prost(uint64, repeated, tag = "7")]
    pub bandwidth: ::prost::alloc::vec::Vec<u64>,
    /// Geo lists the geographical position of the border routers along the
    /// path.
    /// Entry i describes the position of the router for interface i.
    /// A 0-value indicates that the AS did not announce a position for this
    /// router.
    #[prost(message, repeated, tag = "8")]
    pub geo: ::prost::alloc::vec::Vec<GeoCoordinates>,
    /// LinkType contains the announced link type of inter-domain links.
    /// Entry i describes the link between interfaces 2*i and 2*i+1.
    #[prost(enumeration = "LinkType", repeated, tag = "9")]
    pub link_type: ::prost::alloc::vec::Vec<i32>,
    /// InternalHops lists the number of AS internal hops for the ASes on path.
    /// Entry i describes the hop between interfaces 2*i+1 and 2*i+2 in the same
    /// AS.
    /// Consequently, there are no entries for the first and last ASes, as these
    /// are not traversed completely by the path.
    #[prost(uint32, repeated, tag = "10")]
    pub internal_hops: ::prost::alloc::vec::Vec<u32>,
    /// Notes contains the notes added by ASes on the path, in the order of
    /// occurrence.
    /// Entry i is the note of AS i on the path.
    #[prost(string, repeated, tag = "11")]
    pub notes: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    /// EpicAuths contains the EPIC authenticators used to calculate the PHVF and LHVF.
    #[prost(message, optional, tag = "12")]
    pub epic_auths: ::core::option::Option<EpicAuths>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct EpicAuths {
    /// AuthPHVF is the authenticator use to calculate the PHVF.
    #[prost(bytes = "vec", tag = "1")]
    pub auth_phvf: ::prost::alloc::vec::Vec<u8>,
    /// AuthLHVF is the authenticator use to calculate the LHVF.
    #[prost(bytes = "vec", tag = "2")]
    pub auth_lhvf: ::prost::alloc::vec::Vec<u8>,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct PathInterface {
    /// ISD-AS the interface belongs to.
    #[prost(uint64, tag = "1")]
    pub isd_as: u64,
    /// ID of the interface in the AS.
    #[prost(uint64, tag = "2")]
    pub id: u64,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GeoCoordinates {
    /// Latitude of the geographic coordinate, in the WGS 84 datum.
    #[prost(float, tag = "1")]
    pub latitude: f32,
    /// Longitude of the geographic coordinate, in the WGS 84 datum.
    #[prost(float, tag = "2")]
    pub longitude: f32,
    /// Civic address of the location.
    #[prost(string, tag = "3")]
    pub address: ::prost::alloc::string::String,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct AsRequest {
    /// ISD-AS of the AS information is requested about. The 0 value
    /// can be used to discover the ISD-AS number of the local AS.
    #[prost(uint64, tag = "1")]
    pub isd_as: u64,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct AsResponse {
    /// ISD-AS of the AS information was requested about.
    #[prost(uint64, tag = "1")]
    pub isd_as: u64,
    /// Indicates whether the local AS is core.
    #[prost(bool, tag = "2")]
    pub core: bool,
    /// The maximum transmission unit (MTU) in the local AS.
    #[prost(uint32, tag = "3")]
    pub mtu: u32,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct InterfacesRequest {}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct InterfacesResponse {
    /// Map from SCION interface IDs in the local AS to interface details.
    #[prost(map = "uint64, message", tag = "1")]
    pub interfaces: ::std::collections::HashMap<u64, Interface>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct Interface {
    /// Underlay address to exit through the interface.
    #[prost(message, optional, tag = "1")]
    pub address: ::core::option::Option<Underlay>,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ServicesRequest {}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ServicesResponse {
    /// Map from service names to known services.
    #[prost(map = "string, message", tag = "1")]
    pub services: ::std::collections::HashMap<
        ::prost::alloc::string::String,
        ListService,
    >,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListService {
    /// Services is the list of services.
    #[prost(message, repeated, tag = "1")]
    pub services: ::prost::alloc::vec::Vec<Service>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct Service {
    /// Address of the service instance, in RFC 3986 format.
    #[prost(string, tag = "1")]
    pub uri: ::prost::alloc::string::String,
}
/// Address of an underlay socket.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct Underlay {
    /// The underlay address in standard IP:port notation (e.g., 192.0.2.1:10000
    /// or \[2001:db8::1\]:10000). The underlay is UDP/IP.
    #[prost(string, tag = "1")]
    pub address: ::prost::alloc::string::String,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct NotifyInterfaceDownRequest {
    /// ISD-AS the failing interface belongs to.
    #[prost(uint64, tag = "1")]
    pub isd_as: u64,
    /// ID of the failing interface.
    #[prost(uint64, tag = "2")]
    pub id: u64,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct NotifyInterfaceDownResponse {}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct DrKeyHostAsRequest {
    /// Point in time where requested key is valid.
    #[prost(message, optional, tag = "1")]
    pub val_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Protocol value.
    #[prost(enumeration = "super::super::drkey::v1::Protocol", tag = "2")]
    pub protocol_id: i32,
    /// Src ISD-AS of the requested DRKey.
    #[prost(uint64, tag = "3")]
    pub src_ia: u64,
    /// Dst ISD-AS of the requested DRKey.
    #[prost(uint64, tag = "4")]
    pub dst_ia: u64,
    /// Src Host of the request DRKey.
    #[prost(string, tag = "5")]
    pub src_host: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct DrKeyHostAsResponse {
    /// Begin of validity period of DRKey.
    #[prost(message, optional, tag = "1")]
    pub epoch_begin: ::core::option::Option<::prost_types::Timestamp>,
    /// End of validity period of DRKey.
    #[prost(message, optional, tag = "2")]
    pub epoch_end: ::core::option::Option<::prost_types::Timestamp>,
    /// Level2 key.
    #[prost(bytes = "vec", tag = "3")]
    pub key: ::prost::alloc::vec::Vec<u8>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct DrKeyAsHostRequest {
    /// Point in time where requested key is valid.
    #[prost(message, optional, tag = "1")]
    pub val_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Protocol value.
    #[prost(enumeration = "super::super::drkey::v1::Protocol", tag = "2")]
    pub protocol_id: i32,
    /// Src ISD-AS of the requested DRKey.
    #[prost(uint64, tag = "3")]
    pub src_ia: u64,
    /// Dst ISD-AS of the requested DRKey.
    #[prost(uint64, tag = "4")]
    pub dst_ia: u64,
    /// Dst Host of the request DRKey.
    #[prost(string, tag = "5")]
    pub dst_host: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct DrKeyAsHostResponse {
    /// Begin of validity period of DRKey.
    #[prost(message, optional, tag = "1")]
    pub epoch_begin: ::core::option::Option<::prost_types::Timestamp>,
    /// End of validity period of DRKey.
    #[prost(message, optional, tag = "2")]
    pub epoch_end: ::core::option::Option<::prost_types::Timestamp>,
    /// Level2 key.
    #[prost(bytes = "vec", tag = "3")]
    pub key: ::prost::alloc::vec::Vec<u8>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct DrKeyHostHostRequest {
    /// Point in time where requested key is valid.
    #[prost(message, optional, tag = "1")]
    pub val_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Protocol value.
    #[prost(enumeration = "super::super::drkey::v1::Protocol", tag = "2")]
    pub protocol_id: i32,
    /// Src ISD-AS of the requested DRKey.
    #[prost(uint64, tag = "3")]
    pub src_ia: u64,
    /// Dst ISD-AS of the requested DRKey.
    #[prost(uint64, tag = "4")]
    pub dst_ia: u64,
    /// Src Host of the request DRKey.
    #[prost(string, tag = "5")]
    pub src_host: ::prost::alloc::string::String,
    /// Dst Host of the request DRKey.
    #[prost(string, tag = "6")]
    pub dst_host: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct DrKeyHostHostResponse {
    /// Begin of validity period of DRKey.
    #[prost(message, optional, tag = "1")]
    pub epoch_begin: ::core::option::Option<::prost_types::Timestamp>,
    /// End of validity period of DRKey.
    #[prost(message, optional, tag = "2")]
    pub epoch_end: ::core::option::Option<::prost_types::Timestamp>,
    /// Level2 key.
    #[prost(bytes = "vec", tag = "3")]
    pub key: ::prost::alloc::vec::Vec<u8>,
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum LinkType {
    /// Unspecified link type.
    Unspecified = 0,
    /// Direct physical connection.
    Direct = 1,
    /// Connection with local routing/switching.
    MultiHop = 2,
    /// Connection overlaid over publicly routed Internet.
    OpenNet = 3,
}
impl LinkType {
    /// 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 => "LINK_TYPE_UNSPECIFIED",
            Self::Direct => "LINK_TYPE_DIRECT",
            Self::MultiHop => "LINK_TYPE_MULTI_HOP",
            Self::OpenNet => "LINK_TYPE_OPEN_NET",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "LINK_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
            "LINK_TYPE_DIRECT" => Some(Self::Direct),
            "LINK_TYPE_MULTI_HOP" => Some(Self::MultiHop),
            "LINK_TYPE_OPEN_NET" => Some(Self::OpenNet),
            _ => None,
        }
    }
}
/// Generated client implementations.
pub mod daemon_service_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 DaemonServiceClient<T> {
        inner: tonic::client::Grpc<T>,
    }
    impl DaemonServiceClient<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> DaemonServiceClient<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,
        ) -> DaemonServiceClient<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,
        {
            DaemonServiceClient::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
        }
        /// Return a set of paths to the requested destination.
        pub async fn paths(
            &mut self,
            request: impl tonic::IntoRequest<super::PathsRequest>,
        ) -> std::result::Result<tonic::Response<super::PathsResponse>, 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(
                "/proto.daemon.v1.DaemonService/Paths",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(GrpcMethod::new("proto.daemon.v1.DaemonService", "Paths"));
            self.inner.unary(req, path, codec).await
        }
        /// Return information about an AS.
        pub async fn r#as(
            &mut self,
            request: impl tonic::IntoRequest<super::AsRequest>,
        ) -> std::result::Result<tonic::Response<super::AsResponse>, 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(
                "/proto.daemon.v1.DaemonService/AS",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(GrpcMethod::new("proto.daemon.v1.DaemonService", "AS"));
            self.inner.unary(req, path, codec).await
        }
        /// Return the underlay addresses associated with
        /// the specified interfaces.
        pub async fn interfaces(
            &mut self,
            request: impl tonic::IntoRequest<super::InterfacesRequest>,
        ) -> std::result::Result<
            tonic::Response<super::InterfacesResponse>,
            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(
                "/proto.daemon.v1.DaemonService/Interfaces",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(GrpcMethod::new("proto.daemon.v1.DaemonService", "Interfaces"));
            self.inner.unary(req, path, codec).await
        }
        /// Return the underlay addresses associated with the
        /// specified services.
        pub async fn services(
            &mut self,
            request: impl tonic::IntoRequest<super::ServicesRequest>,
        ) -> std::result::Result<
            tonic::Response<super::ServicesResponse>,
            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(
                "/proto.daemon.v1.DaemonService/Services",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(GrpcMethod::new("proto.daemon.v1.DaemonService", "Services"));
            self.inner.unary(req, path, codec).await
        }
        /// Inform the SCION Daemon of a revocation.
        pub async fn notify_interface_down(
            &mut self,
            request: impl tonic::IntoRequest<super::NotifyInterfaceDownRequest>,
        ) -> std::result::Result<
            tonic::Response<super::NotifyInterfaceDownResponse>,
            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(
                "/proto.daemon.v1.DaemonService/NotifyInterfaceDown",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "proto.daemon.v1.DaemonService",
                        "NotifyInterfaceDown",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// DRKeyASHost returns a key that matches the request.
        pub async fn dr_key_as_host(
            &mut self,
            request: impl tonic::IntoRequest<super::DrKeyAsHostRequest>,
        ) -> std::result::Result<
            tonic::Response<super::DrKeyAsHostResponse>,
            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(
                "/proto.daemon.v1.DaemonService/DRKeyASHost",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(GrpcMethod::new("proto.daemon.v1.DaemonService", "DRKeyASHost"));
            self.inner.unary(req, path, codec).await
        }
        /// DRKeyHostAS returns a key that matches the request.
        pub async fn dr_key_host_as(
            &mut self,
            request: impl tonic::IntoRequest<super::DrKeyHostAsRequest>,
        ) -> std::result::Result<
            tonic::Response<super::DrKeyHostAsResponse>,
            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(
                "/proto.daemon.v1.DaemonService/DRKeyHostAS",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(GrpcMethod::new("proto.daemon.v1.DaemonService", "DRKeyHostAS"));
            self.inner.unary(req, path, codec).await
        }
        /// DRKeyHostHost returns a key that matches the request.
        pub async fn dr_key_host_host(
            &mut self,
            request: impl tonic::IntoRequest<super::DrKeyHostHostRequest>,
        ) -> std::result::Result<
            tonic::Response<super::DrKeyHostHostResponse>,
            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(
                "/proto.daemon.v1.DaemonService/DRKeyHostHost",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new("proto.daemon.v1.DaemonService", "DRKeyHostHost"),
                );
            self.inner.unary(req, path, codec).await
        }
    }
}
/// Generated server implementations.
pub mod daemon_service_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 DaemonServiceServer.
    #[async_trait]
    pub trait DaemonService: std::marker::Send + std::marker::Sync + 'static {
        /// Return a set of paths to the requested destination.
        async fn paths(
            &self,
            request: tonic::Request<super::PathsRequest>,
        ) -> std::result::Result<tonic::Response<super::PathsResponse>, tonic::Status>;
        /// Return information about an AS.
        async fn r#as(
            &self,
            request: tonic::Request<super::AsRequest>,
        ) -> std::result::Result<tonic::Response<super::AsResponse>, tonic::Status>;
        /// Return the underlay addresses associated with
        /// the specified interfaces.
        async fn interfaces(
            &self,
            request: tonic::Request<super::InterfacesRequest>,
        ) -> std::result::Result<
            tonic::Response<super::InterfacesResponse>,
            tonic::Status,
        >;
        /// Return the underlay addresses associated with the
        /// specified services.
        async fn services(
            &self,
            request: tonic::Request<super::ServicesRequest>,
        ) -> std::result::Result<
            tonic::Response<super::ServicesResponse>,
            tonic::Status,
        >;
        /// Inform the SCION Daemon of a revocation.
        async fn notify_interface_down(
            &self,
            request: tonic::Request<super::NotifyInterfaceDownRequest>,
        ) -> std::result::Result<
            tonic::Response<super::NotifyInterfaceDownResponse>,
            tonic::Status,
        >;
        /// DRKeyASHost returns a key that matches the request.
        async fn dr_key_as_host(
            &self,
            request: tonic::Request<super::DrKeyAsHostRequest>,
        ) -> std::result::Result<
            tonic::Response<super::DrKeyAsHostResponse>,
            tonic::Status,
        >;
        /// DRKeyHostAS returns a key that matches the request.
        async fn dr_key_host_as(
            &self,
            request: tonic::Request<super::DrKeyHostAsRequest>,
        ) -> std::result::Result<
            tonic::Response<super::DrKeyHostAsResponse>,
            tonic::Status,
        >;
        /// DRKeyHostHost returns a key that matches the request.
        async fn dr_key_host_host(
            &self,
            request: tonic::Request<super::DrKeyHostHostRequest>,
        ) -> std::result::Result<
            tonic::Response<super::DrKeyHostHostResponse>,
            tonic::Status,
        >;
    }
    #[derive(Debug)]
    pub struct DaemonServiceServer<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> DaemonServiceServer<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 DaemonServiceServer<T>
    where
        T: DaemonService,
        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() {
                "/proto.daemon.v1.DaemonService/Paths" => {
                    #[allow(non_camel_case_types)]
                    struct PathsSvc<T: DaemonService>(pub Arc<T>);
                    impl<
                        T: DaemonService,
                    > tonic::server::UnaryService<super::PathsRequest> for PathsSvc<T> {
                        type Response = super::PathsResponse;
                        type Future = BoxFuture<
                            tonic::Response<Self::Response>,
                            tonic::Status,
                        >;
                        fn call(
                            &mut self,
                            request: tonic::Request<super::PathsRequest>,
                        ) -> Self::Future {
                            let inner = Arc::clone(&self.0);
                            let fut = async move {
                                <T as DaemonService>::paths(&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 = PathsSvc(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)
                }
                "/proto.daemon.v1.DaemonService/AS" => {
                    #[allow(non_camel_case_types)]
                    struct ASSvc<T: DaemonService>(pub Arc<T>);
                    impl<T: DaemonService> tonic::server::UnaryService<super::AsRequest>
                    for ASSvc<T> {
                        type Response = super::AsResponse;
                        type Future = BoxFuture<
                            tonic::Response<Self::Response>,
                            tonic::Status,
                        >;
                        fn call(
                            &mut self,
                            request: tonic::Request<super::AsRequest>,
                        ) -> Self::Future {
                            let inner = Arc::clone(&self.0);
                            let fut = async move {
                                <T as DaemonService>::r#as(&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 = ASSvc(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)
                }
                "/proto.daemon.v1.DaemonService/Interfaces" => {
                    #[allow(non_camel_case_types)]
                    struct InterfacesSvc<T: DaemonService>(pub Arc<T>);
                    impl<
                        T: DaemonService,
                    > tonic::server::UnaryService<super::InterfacesRequest>
                    for InterfacesSvc<T> {
                        type Response = super::InterfacesResponse;
                        type Future = BoxFuture<
                            tonic::Response<Self::Response>,
                            tonic::Status,
                        >;
                        fn call(
                            &mut self,
                            request: tonic::Request<super::InterfacesRequest>,
                        ) -> Self::Future {
                            let inner = Arc::clone(&self.0);
                            let fut = async move {
                                <T as DaemonService>::interfaces(&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 = InterfacesSvc(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)
                }
                "/proto.daemon.v1.DaemonService/Services" => {
                    #[allow(non_camel_case_types)]
                    struct ServicesSvc<T: DaemonService>(pub Arc<T>);
                    impl<
                        T: DaemonService,
                    > tonic::server::UnaryService<super::ServicesRequest>
                    for ServicesSvc<T> {
                        type Response = super::ServicesResponse;
                        type Future = BoxFuture<
                            tonic::Response<Self::Response>,
                            tonic::Status,
                        >;
                        fn call(
                            &mut self,
                            request: tonic::Request<super::ServicesRequest>,
                        ) -> Self::Future {
                            let inner = Arc::clone(&self.0);
                            let fut = async move {
                                <T as DaemonService>::services(&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 = ServicesSvc(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)
                }
                "/proto.daemon.v1.DaemonService/NotifyInterfaceDown" => {
                    #[allow(non_camel_case_types)]
                    struct NotifyInterfaceDownSvc<T: DaemonService>(pub Arc<T>);
                    impl<
                        T: DaemonService,
                    > tonic::server::UnaryService<super::NotifyInterfaceDownRequest>
                    for NotifyInterfaceDownSvc<T> {
                        type Response = super::NotifyInterfaceDownResponse;
                        type Future = BoxFuture<
                            tonic::Response<Self::Response>,
                            tonic::Status,
                        >;
                        fn call(
                            &mut self,
                            request: tonic::Request<super::NotifyInterfaceDownRequest>,
                        ) -> Self::Future {
                            let inner = Arc::clone(&self.0);
                            let fut = async move {
                                <T as DaemonService>::notify_interface_down(&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 = NotifyInterfaceDownSvc(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)
                }
                "/proto.daemon.v1.DaemonService/DRKeyASHost" => {
                    #[allow(non_camel_case_types)]
                    struct DRKeyASHostSvc<T: DaemonService>(pub Arc<T>);
                    impl<
                        T: DaemonService,
                    > tonic::server::UnaryService<super::DrKeyAsHostRequest>
                    for DRKeyASHostSvc<T> {
                        type Response = super::DrKeyAsHostResponse;
                        type Future = BoxFuture<
                            tonic::Response<Self::Response>,
                            tonic::Status,
                        >;
                        fn call(
                            &mut self,
                            request: tonic::Request<super::DrKeyAsHostRequest>,
                        ) -> Self::Future {
                            let inner = Arc::clone(&self.0);
                            let fut = async move {
                                <T as DaemonService>::dr_key_as_host(&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 = DRKeyASHostSvc(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)
                }
                "/proto.daemon.v1.DaemonService/DRKeyHostAS" => {
                    #[allow(non_camel_case_types)]
                    struct DRKeyHostASSvc<T: DaemonService>(pub Arc<T>);
                    impl<
                        T: DaemonService,
                    > tonic::server::UnaryService<super::DrKeyHostAsRequest>
                    for DRKeyHostASSvc<T> {
                        type Response = super::DrKeyHostAsResponse;
                        type Future = BoxFuture<
                            tonic::Response<Self::Response>,
                            tonic::Status,
                        >;
                        fn call(
                            &mut self,
                            request: tonic::Request<super::DrKeyHostAsRequest>,
                        ) -> Self::Future {
                            let inner = Arc::clone(&self.0);
                            let fut = async move {
                                <T as DaemonService>::dr_key_host_as(&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 = DRKeyHostASSvc(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)
                }
                "/proto.daemon.v1.DaemonService/DRKeyHostHost" => {
                    #[allow(non_camel_case_types)]
                    struct DRKeyHostHostSvc<T: DaemonService>(pub Arc<T>);
                    impl<
                        T: DaemonService,
                    > tonic::server::UnaryService<super::DrKeyHostHostRequest>
                    for DRKeyHostHostSvc<T> {
                        type Response = super::DrKeyHostHostResponse;
                        type Future = BoxFuture<
                            tonic::Response<Self::Response>,
                            tonic::Status,
                        >;
                        fn call(
                            &mut self,
                            request: tonic::Request<super::DrKeyHostHostRequest>,
                        ) -> Self::Future {
                            let inner = Arc::clone(&self.0);
                            let fut = async move {
                                <T as DaemonService>::dr_key_host_host(&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 = DRKeyHostHostSvc(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 DaemonServiceServer<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 = "proto.daemon.v1.DaemonService";
    impl<T> tonic::server::NamedService for DaemonServiceServer<T> {
        const NAME: &'static str = SERVICE_NAME;
    }
}
