summaryrefslogtreecommitdiff
path: root/src/rpc/envoy.extensions.compression.qatzip.compressor.v3alpha.rs
blob: 43b1005acdc83fe02639ec691b6d8542a0aa6219 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
// @generated
// This file is @generated by prost-build.
// \[#protodoc-title: Qatzip Compressor\]
// Qatzip :ref:`configuration overview <config_qatzip>`.
// \[#extension: envoy.compression.qatzip.compressor\]

/// \[#next-free-field: 6\]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct Qatzip {
    /// Value from 1 to 9 that controls the main compression speed-density lever.
    /// The higher quality, the slower compression. The default value is 1.
    #[prost(message, optional, tag="1")]
    pub compression_level: ::core::option::Option<super::super::super::super::super::super::google::protobuf::UInt32Value>,
    /// A size of qat hardware buffer. This field will be set to "DEFAULT" if not specified.
    #[prost(enumeration="qatzip::HardwareBufferSize", tag="2")]
    pub hardware_buffer_size: i32,
    /// Threshold of compression service’s input size for software failover.
    /// If the size of input request less than the threshold, qatzip will route the request to software
    /// compressor. The default value is 1024. The maximum value is 512*1024.
    #[prost(message, optional, tag="3")]
    pub input_size_threshold: ::core::option::Option<super::super::super::super::super::super::google::protobuf::UInt32Value>,
    /// A size of stream buffer. The default value is 128 * 1024. The maximum value is 2*1024*1024 -
    /// 5*1024
    #[prost(message, optional, tag="4")]
    pub stream_buffer_size: ::core::option::Option<super::super::super::super::super::super::google::protobuf::UInt32Value>,
    /// Value for compressor's next output buffer. If not set, defaults to 4096.
    #[prost(message, optional, tag="5")]
    pub chunk_size: ::core::option::Option<super::super::super::super::super::super::google::protobuf::UInt32Value>,
}
/// Nested message and enum types in `Qatzip`.
pub mod qatzip {
    #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
    #[repr(i32)]
    pub enum HardwareBufferSize {
        Default = 0,
        Sz4k = 1,
        Sz8k = 2,
        Sz32k = 3,
        Sz64k = 4,
        Sz128k = 5,
        Sz512k = 6,
    }
    impl HardwareBufferSize {
        /// 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 {
                HardwareBufferSize::Default => "DEFAULT",
                HardwareBufferSize::Sz4k => "SZ_4K",
                HardwareBufferSize::Sz8k => "SZ_8K",
                HardwareBufferSize::Sz32k => "SZ_32K",
                HardwareBufferSize::Sz64k => "SZ_64K",
                HardwareBufferSize::Sz128k => "SZ_128K",
                HardwareBufferSize::Sz512k => "SZ_512K",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "DEFAULT" => Some(Self::Default),
                "SZ_4K" => Some(Self::Sz4k),
                "SZ_8K" => Some(Self::Sz8k),
                "SZ_32K" => Some(Self::Sz32k),
                "SZ_64K" => Some(Self::Sz64k),
                "SZ_128K" => Some(Self::Sz128k),
                "SZ_512K" => Some(Self::Sz512k),
                _ => None,
            }
        }
    }
}
// @@protoc_insertion_point(module)