ark-grpc 0.9.3

gRPC client for Ark server communication
Documentation
// This file is @generated by prost-build.
/// GatewaySpec holds gRPC gateway configurations.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GatewaySpec {
    /// endpoints hold a series of endpoint binding specs.
    #[prost(message, repeated, tag = "1")]
    pub endpoints: ::prost::alloc::vec::Vec<EndpointBinding>,
}
/// EndpointBinding is a gRPC method - HTTP endpoint binding specification.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct EndpointBinding {
    /// selector is a dot-separated gRPC service method selector.
    ///
    /// If the selector begins with '~.', the current proto package will be added to the beginning
    /// of the path. For instance: `~.MyService`. Since no proto package can be deduced in the
    /// global config file, this alias cannot be used in the global config file.
    ///
    /// If the selector does not begin with '~.', it will be treated as a fully qualified method
    /// name (FQMN).
    #[prost(string, tag = "1")]
    pub selector: ::prost::alloc::string::String,
    /// body is a request message field selector that will be read via HTTP body.
    ///
    /// '\*' indicates that the entire request message gets decoded from the body.
    /// An empty string indicates that no part of the request gets decoded from the body.
    ///
    /// NOTE: Not all methods support HTTP body.
    #[prost(string, tag = "8")]
    pub body: ::prost::alloc::string::String,
    /// response_body is a response message field selector that will be written to HTTP response.
    ///
    /// '\*' or an empty string indicates that the entire response message gets encoded.
    #[prost(string, tag = "9")]
    pub response_body: ::prost::alloc::string::String,
    /// query_params are explicit query parameter bindings that can be used to rename
    /// or ignore query parameters.
    #[prost(message, repeated, tag = "10")]
    pub query_params: ::prost::alloc::vec::Vec<QueryParameterBinding>,
    /// additional_bindings holds additional bindings for the same gRPC service method.
    #[prost(message, repeated, tag = "11")]
    pub additional_bindings: ::prost::alloc::vec::Vec<AdditionalEndpointBinding>,
    /// disable_query_param_discovery can be used to avoid auto binding query parameters.
    #[prost(bool, tag = "12")]
    pub disable_query_param_discovery: bool,
    /// stream holds configurations for streaming methods.
    #[prost(message, optional, tag = "13")]
    pub stream: ::core::option::Option<StreamConfig>,
    /// pattern specifies the HTTP method for this endpoint binding.
    #[prost(oneof = "endpoint_binding::Pattern", tags = "2, 3, 4, 5, 6, 7")]
    pub pattern: ::core::option::Option<endpoint_binding::Pattern>,
}
/// Nested message and enum types in `EndpointBinding`.
pub mod endpoint_binding {
    /// pattern specifies the HTTP method for this endpoint binding.
    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
    pub enum Pattern {
        #[prost(string, tag = "2")]
        Get(::prost::alloc::string::String),
        #[prost(string, tag = "3")]
        Put(::prost::alloc::string::String),
        #[prost(string, tag = "4")]
        Post(::prost::alloc::string::String),
        #[prost(string, tag = "5")]
        Delete(::prost::alloc::string::String),
        #[prost(string, tag = "6")]
        Patch(::prost::alloc::string::String),
        /// custom can be used for custom HTTP methods.
        ///
        /// Not all HTTP methods are supported in OpenAPI specification, however and will not be
        /// included in the generated OpenAPI document.
        #[prost(message, tag = "7")]
        Custom(super::CustomPattern),
    }
}
/// AdditionalEndpointBinding is an additional gRPC method - HTTP endpoint binding specification.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AdditionalEndpointBinding {
    /// body is a request message field selector that will be read via HTTP body.
    ///
    /// '\*' indicates that the entire request message gets decoded from the body.
    /// An empty string indicates that no part of the request gets decoded from the body.
    ///
    /// NOTE: Not all methods support HTTP body.
    #[prost(string, tag = "8")]
    pub body: ::prost::alloc::string::String,
    /// response_body is a response message field selector that will be written to HTTP response.
    ///
    /// '\*' or an empty string indicates that the entire response message gets encoded.
    #[prost(string, tag = "9")]
    pub response_body: ::prost::alloc::string::String,
    /// query_params are explicit query parameter bindings that can be used to rename
    /// or ignore query parameters.
    #[prost(message, repeated, tag = "10")]
    pub query_params: ::prost::alloc::vec::Vec<QueryParameterBinding>,
    /// disable_query_param_discovery can be used to avoid auto binding query parameters.
    #[prost(bool, tag = "11")]
    pub disable_query_param_discovery: bool,
    /// stream holds configurations for streaming methods.
    #[prost(message, optional, tag = "12")]
    pub stream: ::core::option::Option<StreamConfig>,
    /// pattern specifies the HTTP method for this additional endpoint binding.
    #[prost(
        oneof = "additional_endpoint_binding::Pattern",
        tags = "2, 3, 4, 5, 6, 7"
    )]
    pub pattern: ::core::option::Option<additional_endpoint_binding::Pattern>,
}
/// Nested message and enum types in `AdditionalEndpointBinding`.
pub mod additional_endpoint_binding {
    /// pattern specifies the HTTP method for this additional endpoint binding.
    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
    pub enum Pattern {
        #[prost(string, tag = "2")]
        Get(::prost::alloc::string::String),
        #[prost(string, tag = "3")]
        Put(::prost::alloc::string::String),
        #[prost(string, tag = "4")]
        Post(::prost::alloc::string::String),
        #[prost(string, tag = "5")]
        Delete(::prost::alloc::string::String),
        #[prost(string, tag = "6")]
        Patch(::prost::alloc::string::String),
        /// custom can be used for custom HTTP methods.
        ///
        /// Not all HTTP methods are supported in OpenAPI specification, however and will not be
        /// included in the generated OpenAPI document.
        #[prost(message, tag = "7")]
        Custom(super::CustomPattern),
    }
}
/// CustomPattern describes an HTTP pattern and custom method.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct CustomPattern {
    /// method is the custom HTTP method.
    #[prost(string, tag = "1")]
    pub method: ::prost::alloc::string::String,
    /// path is the HTTP path pattern.
    #[prost(string, tag = "2")]
    pub path: ::prost::alloc::string::String,
}
/// QueryParameterBinding describes a query parameter to request message binding.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct QueryParameterBinding {
    /// selector is a dot-separated path to the request message's field.
    #[prost(string, tag = "1")]
    pub selector: ::prost::alloc::string::String,
    /// name is the name of the HTTP query parameter that will be used.
    #[prost(string, tag = "2")]
    pub name: ::prost::alloc::string::String,
    /// ignore avoids reading this query parameter altogether (default: false).
    #[prost(bool, tag = "3")]
    pub ignore: bool,
}
/// StreamConfig sets the behavior of the HTTP server for gRPC streaming methods.
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct StreamConfig {
    /// disable_websockets indicates whether or not websockets are allowed for this method.
    /// The client must still ask for a connection upgrade.
    #[prost(bool, tag = "1")]
    pub disable_websockets: bool,
    /// disable_sse indicates whether or not server-sent events are allowed.
    ///
    /// see: <https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events>
    ///
    /// SSE is only used when Accept-Type from the request includes MIME type text/event-stream.
    #[prost(bool, tag = "2")]
    pub disable_sse: bool,
    /// disable_chunked indicates whether or not chunked transfer encoding is allowed.
    ///
    /// NOTE: Chunked transfer encoding is disabled in HTTP/2 so this option will only be available
    /// if the request is HTTP/1.
    #[prost(bool, tag = "3")]
    pub disable_chunked_transfer: bool,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ProtoEndpointBinding {
    #[prost(string, tag = "8")]
    pub body: ::prost::alloc::string::String,
    #[prost(message, repeated, tag = "9")]
    pub query_params: ::prost::alloc::vec::Vec<QueryParameterBinding>,
    #[prost(message, repeated, tag = "10")]
    pub additional_bindings: ::prost::alloc::vec::Vec<AdditionalEndpointBinding>,
    #[prost(bool, tag = "11")]
    pub disable_query_param_discovery: bool,
    #[prost(message, optional, tag = "12")]
    pub stream: ::core::option::Option<StreamConfig>,
    #[prost(oneof = "proto_endpoint_binding::Pattern", tags = "2, 3, 4, 5, 6, 7")]
    pub pattern: ::core::option::Option<proto_endpoint_binding::Pattern>,
}
/// Nested message and enum types in `ProtoEndpointBinding`.
pub mod proto_endpoint_binding {
    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
    pub enum Pattern {
        #[prost(string, tag = "2")]
        Get(::prost::alloc::string::String),
        #[prost(string, tag = "3")]
        Put(::prost::alloc::string::String),
        #[prost(string, tag = "4")]
        Post(::prost::alloc::string::String),
        #[prost(string, tag = "5")]
        Delete(::prost::alloc::string::String),
        #[prost(string, tag = "6")]
        Patch(::prost::alloc::string::String),
        /// custom can be used for custom HTTP methods.
        #[prost(message, tag = "7")]
        Custom(super::CustomPattern),
    }
}