// This file is @generated by prost-build.
///
/// \[\#next-free-field: 7\]
/// `GrpcJsonReverseTranscoder` is the filter configuration for the gRPC JSON
/// reverse transcoder. The reverse transcoder acts as a bridge between a gRPC
/// client and an HTTP/JSON server, converting the gRPC request into HTTP/JSON
/// for the HTTP backend and the HTTP/JSON response back to gRPC for the gRPC
/// client. This effectively reverses the behavior of the
/// : ref:`grpc_json_transcoder filter <config_http_filters_grpc_json_transcoder>`,
///   allowing a gRPC client to communicate with an HTTP/JSON server.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GrpcJsonReverseTranscoder {
    ///
    /// Supplies the filename of
    /// : ref:`the proto descriptor set  <config_grpc_json_reverse_transcoder_generate_proto_descriptor_set>` for the gRPC services.
    ///   If set, takes precedence over the `descriptor_binary` field.
    #[prost(string, tag = "1")]
    pub descriptor_path: ::prost::alloc::string::String,
    ///
    /// Supplies the binary content of
    /// : ref:`the proto descriptor set  <config_grpc_json_reverse_transcoder_generate_proto_descriptor_set>` for the gRPC services.
    ///   If `descriptor_path` is set, this field is not used.
    #[prost(bytes = "vec", tag = "2")]
    pub descriptor_binary: ::prost::alloc::vec::Vec<u8>,
    /// The maximum size of a request body to be transcoded, in bytes. A body exceeding this size will
    /// provoke a `gRPC status: ResourceExhausted` response.
    ///
    /// Large values may cause envoy to use a lot of memory if there are many
    /// concurrent requests.
    ///
    /// If unset, the current stream buffer size is used.
    #[prost(message, optional, tag = "3")]
    pub max_request_body_size: ::core::option::Option<
        super::super::super::super::super::super::google::protobuf::UInt32Value,
    >,
    /// The maximum size of a response body to be transcoded, in bytes. A body exceeding this size will
    /// provoke a `gRPC status: Internal` response.
    ///
    /// Large values may cause envoy to use a lot of memory if there are many
    /// concurrent requests.
    ///
    /// If unset, the current stream buffer size is used.
    #[prost(message, optional, tag = "4")]
    pub max_response_body_size: ::core::option::Option<
        super::super::super::super::super::super::google::protobuf::UInt32Value,
    >,
    /// The name of the header field that has the API version of the request.
    #[prost(string, tag = "5")]
    pub api_version_header: ::prost::alloc::string::String,
    /// Control options for upstream request JSON. These options are passed directly to
    /// `JsonPrintOptions <<https://developers.google.com/protocol-buffers/docs/reference/cpp/>  google.protobuf.util.json_util#JsonPrintOptions>`\_.
    #[prost(message, optional, tag = "6")]
    pub request_json_print_options: ::core::option::Option<
        grpc_json_reverse_transcoder::PrintOptions,
    >,
}
/// Nested message and enum types in `GrpcJsonReverseTranscoder`.
pub mod grpc_json_reverse_transcoder {
    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
    pub struct PrintOptions {
        /// Whether to always print primitive fields. By default primitive
        /// fields with default values will be omitted in JSON output. For
        /// example, an int32 field set to 0 will be omitted. Setting this flag to
        /// true will override the default behavior and print primitive fields
        /// regardless of their values. Defaults to false.
        #[prost(bool, tag = "1")]
        pub always_print_primitive_fields: bool,
        /// Whether to always print enums as ints. By default they are rendered
        /// as strings. Defaults to false.
        #[prost(bool, tag = "2")]
        pub always_print_enums_as_ints: bool,
        /// Whether to convert the proto field names to `json_name` annotation value, or lower camel case,
        /// in absence of `json_name`. By default the field names will be preserved after conversion.
        /// Setting this flag will convert the field names to their canonical form. Defaults to false.
        ///
        /// Example:
        ///
        /// .. code-block:: proto
        ///
        /// ```text
        /// message Author {
        ///    int64 id = 1;
        ///    enum Gender {
        ///      UNKNOWN = 0;
        ///      MALE = 1;
        ///      FEMALE = 2;
        ///    };
        ///    Gender gender = 2;
        ///    string first_name = 3;
        ///    string last_name = 4 \[json_name = "lname"\];
        /// }
        /// ```
        ///
        /// The above proto message after being transcoded to JSON with
        /// `use_canonical_field_names` set to `false` will have the
        /// field names same as in the proto message, as follows:
        ///
        /// .. code-block:: json
        ///
        /// ```text
        /// {
        ///    "id": "12345",
        ///    "gender": "MALE",
        ///    "first_name": "John",
        ///    "last_name": "Doe"
        /// }
        /// ```
        ///
        /// and with the `use_canonical_field_names` set to `true`, the
        /// transcoded JSON will have `first_name` converted to camelCase
        /// and `last_name` converted to its `json_name` annotation value,
        /// as follows:
        ///
        /// .. code-block:: json
        ///
        /// ```text
        /// {
        ///    "id": "12345",
        ///    "gender": "MALE",
        ///    "firstName": "John",
        ///    "lname": "Doe"
        /// }
        /// ```
        #[prost(bool, tag = "3")]
        pub use_canonical_field_names: bool,
    }
}
