use crate::monitor_service::*;
impl serde::Serialize for AnalyzeHeapRequest {
#[allow(deprecated)]
fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
where
S: serde::Serializer,
{
use serde::ser::SerializeStruct;
let mut len = 0;
if !self.path.is_empty() {
len += 1;
}
let mut struct_ser = serializer.serialize_struct("monitor_service.AnalyzeHeapRequest", len)?;
if !self.path.is_empty() {
struct_ser.serialize_field("path", &self.path)?;
}
struct_ser.end()
}
}
impl<'de> serde::Deserialize<'de> for AnalyzeHeapRequest {
#[allow(deprecated)]
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
const FIELDS: &[&str] = &[
"path",
];
#[allow(clippy::enum_variant_names)]
enum GeneratedField {
Path,
}
impl<'de> serde::Deserialize<'de> for GeneratedField {
fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
where
D: serde::Deserializer<'de>,
{
struct GeneratedVisitor;
impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
type Value = GeneratedField;
fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(formatter, "expected one of: {:?}", &FIELDS)
}
#[allow(unused_variables)]
fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
where
E: serde::de::Error,
{
match value {
"path" => Ok(GeneratedField::Path),
_ => Err(serde::de::Error::unknown_field(value, FIELDS)),
}
}
}
deserializer.deserialize_identifier(GeneratedVisitor)
}
}
struct GeneratedVisitor;
impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
type Value = AnalyzeHeapRequest;
fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
formatter.write_str("struct monitor_service.AnalyzeHeapRequest")
}
fn visit_map<V>(self, mut map_: V) -> std::result::Result<AnalyzeHeapRequest, V::Error>
where
V: serde::de::MapAccess<'de>,
{
let mut path__ = None;
while let Some(k) = map_.next_key()? {
match k {
GeneratedField::Path => {
if path__.is_some() {
return Err(serde::de::Error::duplicate_field("path"));
}
path__ = Some(map_.next_value()?);
}
}
}
Ok(AnalyzeHeapRequest {
path: path__.unwrap_or_default(),
})
}
}
deserializer.deserialize_struct("monitor_service.AnalyzeHeapRequest", FIELDS, GeneratedVisitor)
}
}
impl serde::Serialize for AnalyzeHeapResponse {
#[allow(deprecated)]
fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
where
S: serde::Serializer,
{
use serde::ser::SerializeStruct;
let mut len = 0;
if !self.result.is_empty() {
len += 1;
}
let mut struct_ser = serializer.serialize_struct("monitor_service.AnalyzeHeapResponse", len)?;
if !self.result.is_empty() {
#[allow(clippy::needless_borrow)]
#[allow(clippy::needless_borrows_for_generic_args)]
struct_ser.serialize_field("result", pbjson::private::base64::encode(&self.result).as_str())?;
}
struct_ser.end()
}
}
impl<'de> serde::Deserialize<'de> for AnalyzeHeapResponse {
#[allow(deprecated)]
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
const FIELDS: &[&str] = &[
"result",
];
#[allow(clippy::enum_variant_names)]
enum GeneratedField {
Result,
}
impl<'de> serde::Deserialize<'de> for GeneratedField {
fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
where
D: serde::Deserializer<'de>,
{
struct GeneratedVisitor;
impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
type Value = GeneratedField;
fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(formatter, "expected one of: {:?}", &FIELDS)
}
#[allow(unused_variables)]
fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
where
E: serde::de::Error,
{
match value {
"result" => Ok(GeneratedField::Result),
_ => Err(serde::de::Error::unknown_field(value, FIELDS)),
}
}
}
deserializer.deserialize_identifier(GeneratedVisitor)
}
}
struct GeneratedVisitor;
impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
type Value = AnalyzeHeapResponse;
fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
formatter.write_str("struct monitor_service.AnalyzeHeapResponse")
}
fn visit_map<V>(self, mut map_: V) -> std::result::Result<AnalyzeHeapResponse, V::Error>
where
V: serde::de::MapAccess<'de>,
{
let mut result__ = None;
while let Some(k) = map_.next_key()? {
match k {
GeneratedField::Result => {
if result__.is_some() {
return Err(serde::de::Error::duplicate_field("result"));
}
result__ =
Some(map_.next_value::<::pbjson::private::BytesDeserialize<_>>()?.0)
;
}
}
}
Ok(AnalyzeHeapResponse {
result: result__.unwrap_or_default(),
})
}
}
deserializer.deserialize_struct("monitor_service.AnalyzeHeapResponse", FIELDS, GeneratedVisitor)
}
}
impl serde::Serialize for BackPressureInfo {
#[allow(deprecated)]
fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
where
S: serde::Serializer,
{
use serde::ser::SerializeStruct;
let mut len = 0;
if self.fragment_id != 0 {
len += 1;
}
if self.downstream_fragment_id != 0 {
len += 1;
}
if self.actor_count != 0 {
len += 1;
}
if self.value != 0. {
len += 1;
}
let mut struct_ser = serializer.serialize_struct("monitor_service.BackPressureInfo", len)?;
if self.fragment_id != 0 {
struct_ser.serialize_field("fragmentId", &self.fragment_id)?;
}
if self.downstream_fragment_id != 0 {
struct_ser.serialize_field("downstreamFragmentId", &self.downstream_fragment_id)?;
}
if self.actor_count != 0 {
struct_ser.serialize_field("actorCount", &self.actor_count)?;
}
if self.value != 0. {
struct_ser.serialize_field("value", &self.value)?;
}
struct_ser.end()
}
}
impl<'de> serde::Deserialize<'de> for BackPressureInfo {
#[allow(deprecated)]
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
const FIELDS: &[&str] = &[
"fragment_id",
"fragmentId",
"downstream_fragment_id",
"downstreamFragmentId",
"actor_count",
"actorCount",
"value",
];
#[allow(clippy::enum_variant_names)]
enum GeneratedField {
FragmentId,
DownstreamFragmentId,
ActorCount,
Value,
}
impl<'de> serde::Deserialize<'de> for GeneratedField {
fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
where
D: serde::Deserializer<'de>,
{
struct GeneratedVisitor;
impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
type Value = GeneratedField;
fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(formatter, "expected one of: {:?}", &FIELDS)
}
#[allow(unused_variables)]
fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
where
E: serde::de::Error,
{
match value {
"fragmentId" | "fragment_id" => Ok(GeneratedField::FragmentId),
"downstreamFragmentId" | "downstream_fragment_id" => Ok(GeneratedField::DownstreamFragmentId),
"actorCount" | "actor_count" => Ok(GeneratedField::ActorCount),
"value" => Ok(GeneratedField::Value),
_ => Err(serde::de::Error::unknown_field(value, FIELDS)),
}
}
}
deserializer.deserialize_identifier(GeneratedVisitor)
}
}
struct GeneratedVisitor;
impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
type Value = BackPressureInfo;
fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
formatter.write_str("struct monitor_service.BackPressureInfo")
}
fn visit_map<V>(self, mut map_: V) -> std::result::Result<BackPressureInfo, V::Error>
where
V: serde::de::MapAccess<'de>,
{
let mut fragment_id__ = None;
let mut downstream_fragment_id__ = None;
let mut actor_count__ = None;
let mut value__ = None;
while let Some(k) = map_.next_key()? {
match k {
GeneratedField::FragmentId => {
if fragment_id__.is_some() {
return Err(serde::de::Error::duplicate_field("fragmentId"));
}
fragment_id__ =
Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
;
}
GeneratedField::DownstreamFragmentId => {
if downstream_fragment_id__.is_some() {
return Err(serde::de::Error::duplicate_field("downstreamFragmentId"));
}
downstream_fragment_id__ =
Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
;
}
GeneratedField::ActorCount => {
if actor_count__.is_some() {
return Err(serde::de::Error::duplicate_field("actorCount"));
}
actor_count__ =
Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
;
}
GeneratedField::Value => {
if value__.is_some() {
return Err(serde::de::Error::duplicate_field("value"));
}
value__ =
Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
;
}
}
}
Ok(BackPressureInfo {
fragment_id: fragment_id__.unwrap_or_default(),
downstream_fragment_id: downstream_fragment_id__.unwrap_or_default(),
actor_count: actor_count__.unwrap_or_default(),
value: value__.unwrap_or_default(),
})
}
}
deserializer.deserialize_struct("monitor_service.BackPressureInfo", FIELDS, GeneratedVisitor)
}
}
impl serde::Serialize for GetBackPressureRequest {
#[allow(deprecated)]
fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
where
S: serde::Serializer,
{
use serde::ser::SerializeStruct;
let len = 0;
let struct_ser = serializer.serialize_struct("monitor_service.GetBackPressureRequest", len)?;
struct_ser.end()
}
}
impl<'de> serde::Deserialize<'de> for GetBackPressureRequest {
#[allow(deprecated)]
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
const FIELDS: &[&str] = &[
];
#[allow(clippy::enum_variant_names)]
enum GeneratedField {
}
impl<'de> serde::Deserialize<'de> for GeneratedField {
fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
where
D: serde::Deserializer<'de>,
{
struct GeneratedVisitor;
impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
type Value = GeneratedField;
fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(formatter, "expected one of: {:?}", &FIELDS)
}
#[allow(unused_variables)]
fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
where
E: serde::de::Error,
{
Err(serde::de::Error::unknown_field(value, FIELDS))
}
}
deserializer.deserialize_identifier(GeneratedVisitor)
}
}
struct GeneratedVisitor;
impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
type Value = GetBackPressureRequest;
fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
formatter.write_str("struct monitor_service.GetBackPressureRequest")
}
fn visit_map<V>(self, mut map_: V) -> std::result::Result<GetBackPressureRequest, V::Error>
where
V: serde::de::MapAccess<'de>,
{
while map_.next_key::<GeneratedField>()?.is_some() {
let _ = map_.next_value::<serde::de::IgnoredAny>()?;
}
Ok(GetBackPressureRequest {
})
}
}
deserializer.deserialize_struct("monitor_service.GetBackPressureRequest", FIELDS, GeneratedVisitor)
}
}
impl serde::Serialize for GetBackPressureResponse {
#[allow(deprecated)]
fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
where
S: serde::Serializer,
{
use serde::ser::SerializeStruct;
let mut len = 0;
if !self.back_pressure_infos.is_empty() {
len += 1;
}
let mut struct_ser = serializer.serialize_struct("monitor_service.GetBackPressureResponse", len)?;
if !self.back_pressure_infos.is_empty() {
struct_ser.serialize_field("backPressureInfos", &self.back_pressure_infos)?;
}
struct_ser.end()
}
}
impl<'de> serde::Deserialize<'de> for GetBackPressureResponse {
#[allow(deprecated)]
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
const FIELDS: &[&str] = &[
"back_pressure_infos",
"backPressureInfos",
];
#[allow(clippy::enum_variant_names)]
enum GeneratedField {
BackPressureInfos,
}
impl<'de> serde::Deserialize<'de> for GeneratedField {
fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
where
D: serde::Deserializer<'de>,
{
struct GeneratedVisitor;
impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
type Value = GeneratedField;
fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(formatter, "expected one of: {:?}", &FIELDS)
}
#[allow(unused_variables)]
fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
where
E: serde::de::Error,
{
match value {
"backPressureInfos" | "back_pressure_infos" => Ok(GeneratedField::BackPressureInfos),
_ => Err(serde::de::Error::unknown_field(value, FIELDS)),
}
}
}
deserializer.deserialize_identifier(GeneratedVisitor)
}
}
struct GeneratedVisitor;
impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
type Value = GetBackPressureResponse;
fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
formatter.write_str("struct monitor_service.GetBackPressureResponse")
}
fn visit_map<V>(self, mut map_: V) -> std::result::Result<GetBackPressureResponse, V::Error>
where
V: serde::de::MapAccess<'de>,
{
let mut back_pressure_infos__ = None;
while let Some(k) = map_.next_key()? {
match k {
GeneratedField::BackPressureInfos => {
if back_pressure_infos__.is_some() {
return Err(serde::de::Error::duplicate_field("backPressureInfos"));
}
back_pressure_infos__ = Some(map_.next_value()?);
}
}
}
Ok(GetBackPressureResponse {
back_pressure_infos: back_pressure_infos__.unwrap_or_default(),
})
}
}
deserializer.deserialize_struct("monitor_service.GetBackPressureResponse", FIELDS, GeneratedVisitor)
}
}
impl serde::Serialize for HeapProfilingRequest {
#[allow(deprecated)]
fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
where
S: serde::Serializer,
{
use serde::ser::SerializeStruct;
let mut len = 0;
if !self.dir.is_empty() {
len += 1;
}
let mut struct_ser = serializer.serialize_struct("monitor_service.HeapProfilingRequest", len)?;
if !self.dir.is_empty() {
struct_ser.serialize_field("dir", &self.dir)?;
}
struct_ser.end()
}
}
impl<'de> serde::Deserialize<'de> for HeapProfilingRequest {
#[allow(deprecated)]
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
const FIELDS: &[&str] = &[
"dir",
];
#[allow(clippy::enum_variant_names)]
enum GeneratedField {
Dir,
}
impl<'de> serde::Deserialize<'de> for GeneratedField {
fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
where
D: serde::Deserializer<'de>,
{
struct GeneratedVisitor;
impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
type Value = GeneratedField;
fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(formatter, "expected one of: {:?}", &FIELDS)
}
#[allow(unused_variables)]
fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
where
E: serde::de::Error,
{
match value {
"dir" => Ok(GeneratedField::Dir),
_ => Err(serde::de::Error::unknown_field(value, FIELDS)),
}
}
}
deserializer.deserialize_identifier(GeneratedVisitor)
}
}
struct GeneratedVisitor;
impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
type Value = HeapProfilingRequest;
fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
formatter.write_str("struct monitor_service.HeapProfilingRequest")
}
fn visit_map<V>(self, mut map_: V) -> std::result::Result<HeapProfilingRequest, V::Error>
where
V: serde::de::MapAccess<'de>,
{
let mut dir__ = None;
while let Some(k) = map_.next_key()? {
match k {
GeneratedField::Dir => {
if dir__.is_some() {
return Err(serde::de::Error::duplicate_field("dir"));
}
dir__ = Some(map_.next_value()?);
}
}
}
Ok(HeapProfilingRequest {
dir: dir__.unwrap_or_default(),
})
}
}
deserializer.deserialize_struct("monitor_service.HeapProfilingRequest", FIELDS, GeneratedVisitor)
}
}
impl serde::Serialize for HeapProfilingResponse {
#[allow(deprecated)]
fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
where
S: serde::Serializer,
{
use serde::ser::SerializeStruct;
let len = 0;
let struct_ser = serializer.serialize_struct("monitor_service.HeapProfilingResponse", len)?;
struct_ser.end()
}
}
impl<'de> serde::Deserialize<'de> for HeapProfilingResponse {
#[allow(deprecated)]
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
const FIELDS: &[&str] = &[
];
#[allow(clippy::enum_variant_names)]
enum GeneratedField {
}
impl<'de> serde::Deserialize<'de> for GeneratedField {
fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
where
D: serde::Deserializer<'de>,
{
struct GeneratedVisitor;
impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
type Value = GeneratedField;
fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(formatter, "expected one of: {:?}", &FIELDS)
}
#[allow(unused_variables)]
fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
where
E: serde::de::Error,
{
Err(serde::de::Error::unknown_field(value, FIELDS))
}
}
deserializer.deserialize_identifier(GeneratedVisitor)
}
}
struct GeneratedVisitor;
impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
type Value = HeapProfilingResponse;
fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
formatter.write_str("struct monitor_service.HeapProfilingResponse")
}
fn visit_map<V>(self, mut map_: V) -> std::result::Result<HeapProfilingResponse, V::Error>
where
V: serde::de::MapAccess<'de>,
{
while map_.next_key::<GeneratedField>()?.is_some() {
let _ = map_.next_value::<serde::de::IgnoredAny>()?;
}
Ok(HeapProfilingResponse {
})
}
}
deserializer.deserialize_struct("monitor_service.HeapProfilingResponse", FIELDS, GeneratedVisitor)
}
}
impl serde::Serialize for ListHeapProfilingRequest {
#[allow(deprecated)]
fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
where
S: serde::Serializer,
{
use serde::ser::SerializeStruct;
let len = 0;
let struct_ser = serializer.serialize_struct("monitor_service.ListHeapProfilingRequest", len)?;
struct_ser.end()
}
}
impl<'de> serde::Deserialize<'de> for ListHeapProfilingRequest {
#[allow(deprecated)]
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
const FIELDS: &[&str] = &[
];
#[allow(clippy::enum_variant_names)]
enum GeneratedField {
}
impl<'de> serde::Deserialize<'de> for GeneratedField {
fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
where
D: serde::Deserializer<'de>,
{
struct GeneratedVisitor;
impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
type Value = GeneratedField;
fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(formatter, "expected one of: {:?}", &FIELDS)
}
#[allow(unused_variables)]
fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
where
E: serde::de::Error,
{
Err(serde::de::Error::unknown_field(value, FIELDS))
}
}
deserializer.deserialize_identifier(GeneratedVisitor)
}
}
struct GeneratedVisitor;
impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
type Value = ListHeapProfilingRequest;
fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
formatter.write_str("struct monitor_service.ListHeapProfilingRequest")
}
fn visit_map<V>(self, mut map_: V) -> std::result::Result<ListHeapProfilingRequest, V::Error>
where
V: serde::de::MapAccess<'de>,
{
while map_.next_key::<GeneratedField>()?.is_some() {
let _ = map_.next_value::<serde::de::IgnoredAny>()?;
}
Ok(ListHeapProfilingRequest {
})
}
}
deserializer.deserialize_struct("monitor_service.ListHeapProfilingRequest", FIELDS, GeneratedVisitor)
}
}
impl serde::Serialize for ListHeapProfilingResponse {
#[allow(deprecated)]
fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
where
S: serde::Serializer,
{
use serde::ser::SerializeStruct;
let mut len = 0;
if !self.dir.is_empty() {
len += 1;
}
if !self.name_manually.is_empty() {
len += 1;
}
if !self.name_auto.is_empty() {
len += 1;
}
let mut struct_ser = serializer.serialize_struct("monitor_service.ListHeapProfilingResponse", len)?;
if !self.dir.is_empty() {
struct_ser.serialize_field("dir", &self.dir)?;
}
if !self.name_manually.is_empty() {
struct_ser.serialize_field("nameManually", &self.name_manually)?;
}
if !self.name_auto.is_empty() {
struct_ser.serialize_field("nameAuto", &self.name_auto)?;
}
struct_ser.end()
}
}
impl<'de> serde::Deserialize<'de> for ListHeapProfilingResponse {
#[allow(deprecated)]
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
const FIELDS: &[&str] = &[
"dir",
"name_manually",
"nameManually",
"name_auto",
"nameAuto",
];
#[allow(clippy::enum_variant_names)]
enum GeneratedField {
Dir,
NameManually,
NameAuto,
}
impl<'de> serde::Deserialize<'de> for GeneratedField {
fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
where
D: serde::Deserializer<'de>,
{
struct GeneratedVisitor;
impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
type Value = GeneratedField;
fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(formatter, "expected one of: {:?}", &FIELDS)
}
#[allow(unused_variables)]
fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
where
E: serde::de::Error,
{
match value {
"dir" => Ok(GeneratedField::Dir),
"nameManually" | "name_manually" => Ok(GeneratedField::NameManually),
"nameAuto" | "name_auto" => Ok(GeneratedField::NameAuto),
_ => Err(serde::de::Error::unknown_field(value, FIELDS)),
}
}
}
deserializer.deserialize_identifier(GeneratedVisitor)
}
}
struct GeneratedVisitor;
impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
type Value = ListHeapProfilingResponse;
fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
formatter.write_str("struct monitor_service.ListHeapProfilingResponse")
}
fn visit_map<V>(self, mut map_: V) -> std::result::Result<ListHeapProfilingResponse, V::Error>
where
V: serde::de::MapAccess<'de>,
{
let mut dir__ = None;
let mut name_manually__ = None;
let mut name_auto__ = None;
while let Some(k) = map_.next_key()? {
match k {
GeneratedField::Dir => {
if dir__.is_some() {
return Err(serde::de::Error::duplicate_field("dir"));
}
dir__ = Some(map_.next_value()?);
}
GeneratedField::NameManually => {
if name_manually__.is_some() {
return Err(serde::de::Error::duplicate_field("nameManually"));
}
name_manually__ = Some(map_.next_value()?);
}
GeneratedField::NameAuto => {
if name_auto__.is_some() {
return Err(serde::de::Error::duplicate_field("nameAuto"));
}
name_auto__ = Some(map_.next_value()?);
}
}
}
Ok(ListHeapProfilingResponse {
dir: dir__.unwrap_or_default(),
name_manually: name_manually__.unwrap_or_default(),
name_auto: name_auto__.unwrap_or_default(),
})
}
}
deserializer.deserialize_struct("monitor_service.ListHeapProfilingResponse", FIELDS, GeneratedVisitor)
}
}
impl serde::Serialize for ProfilingRequest {
#[allow(deprecated)]
fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
where
S: serde::Serializer,
{
use serde::ser::SerializeStruct;
let mut len = 0;
if self.sleep_s != 0 {
len += 1;
}
let mut struct_ser = serializer.serialize_struct("monitor_service.ProfilingRequest", len)?;
if self.sleep_s != 0 {
#[allow(clippy::needless_borrow)]
#[allow(clippy::needless_borrows_for_generic_args)]
struct_ser.serialize_field("sleepS", ToString::to_string(&self.sleep_s).as_str())?;
}
struct_ser.end()
}
}
impl<'de> serde::Deserialize<'de> for ProfilingRequest {
#[allow(deprecated)]
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
const FIELDS: &[&str] = &[
"sleep_s",
"sleepS",
];
#[allow(clippy::enum_variant_names)]
enum GeneratedField {
SleepS,
}
impl<'de> serde::Deserialize<'de> for GeneratedField {
fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
where
D: serde::Deserializer<'de>,
{
struct GeneratedVisitor;
impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
type Value = GeneratedField;
fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(formatter, "expected one of: {:?}", &FIELDS)
}
#[allow(unused_variables)]
fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
where
E: serde::de::Error,
{
match value {
"sleepS" | "sleep_s" => Ok(GeneratedField::SleepS),
_ => Err(serde::de::Error::unknown_field(value, FIELDS)),
}
}
}
deserializer.deserialize_identifier(GeneratedVisitor)
}
}
struct GeneratedVisitor;
impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
type Value = ProfilingRequest;
fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
formatter.write_str("struct monitor_service.ProfilingRequest")
}
fn visit_map<V>(self, mut map_: V) -> std::result::Result<ProfilingRequest, V::Error>
where
V: serde::de::MapAccess<'de>,
{
let mut sleep_s__ = None;
while let Some(k) = map_.next_key()? {
match k {
GeneratedField::SleepS => {
if sleep_s__.is_some() {
return Err(serde::de::Error::duplicate_field("sleepS"));
}
sleep_s__ =
Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
;
}
}
}
Ok(ProfilingRequest {
sleep_s: sleep_s__.unwrap_or_default(),
})
}
}
deserializer.deserialize_struct("monitor_service.ProfilingRequest", FIELDS, GeneratedVisitor)
}
}
impl serde::Serialize for ProfilingResponse {
#[allow(deprecated)]
fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
where
S: serde::Serializer,
{
use serde::ser::SerializeStruct;
let mut len = 0;
if !self.result.is_empty() {
len += 1;
}
let mut struct_ser = serializer.serialize_struct("monitor_service.ProfilingResponse", len)?;
if !self.result.is_empty() {
#[allow(clippy::needless_borrow)]
#[allow(clippy::needless_borrows_for_generic_args)]
struct_ser.serialize_field("result", pbjson::private::base64::encode(&self.result).as_str())?;
}
struct_ser.end()
}
}
impl<'de> serde::Deserialize<'de> for ProfilingResponse {
#[allow(deprecated)]
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
const FIELDS: &[&str] = &[
"result",
];
#[allow(clippy::enum_variant_names)]
enum GeneratedField {
Result,
}
impl<'de> serde::Deserialize<'de> for GeneratedField {
fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
where
D: serde::Deserializer<'de>,
{
struct GeneratedVisitor;
impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
type Value = GeneratedField;
fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(formatter, "expected one of: {:?}", &FIELDS)
}
#[allow(unused_variables)]
fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
where
E: serde::de::Error,
{
match value {
"result" => Ok(GeneratedField::Result),
_ => Err(serde::de::Error::unknown_field(value, FIELDS)),
}
}
}
deserializer.deserialize_identifier(GeneratedVisitor)
}
}
struct GeneratedVisitor;
impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
type Value = ProfilingResponse;
fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
formatter.write_str("struct monitor_service.ProfilingResponse")
}
fn visit_map<V>(self, mut map_: V) -> std::result::Result<ProfilingResponse, V::Error>
where
V: serde::de::MapAccess<'de>,
{
let mut result__ = None;
while let Some(k) = map_.next_key()? {
match k {
GeneratedField::Result => {
if result__.is_some() {
return Err(serde::de::Error::duplicate_field("result"));
}
result__ =
Some(map_.next_value::<::pbjson::private::BytesDeserialize<_>>()?.0)
;
}
}
}
Ok(ProfilingResponse {
result: result__.unwrap_or_default(),
})
}
}
deserializer.deserialize_struct("monitor_service.ProfilingResponse", FIELDS, GeneratedVisitor)
}
}
impl serde::Serialize for StackTraceRequest {
#[allow(deprecated)]
fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
where
S: serde::Serializer,
{
use serde::ser::SerializeStruct;
let len = 0;
let struct_ser = serializer.serialize_struct("monitor_service.StackTraceRequest", len)?;
struct_ser.end()
}
}
impl<'de> serde::Deserialize<'de> for StackTraceRequest {
#[allow(deprecated)]
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
const FIELDS: &[&str] = &[
];
#[allow(clippy::enum_variant_names)]
enum GeneratedField {
}
impl<'de> serde::Deserialize<'de> for GeneratedField {
fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
where
D: serde::Deserializer<'de>,
{
struct GeneratedVisitor;
impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
type Value = GeneratedField;
fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(formatter, "expected one of: {:?}", &FIELDS)
}
#[allow(unused_variables)]
fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
where
E: serde::de::Error,
{
Err(serde::de::Error::unknown_field(value, FIELDS))
}
}
deserializer.deserialize_identifier(GeneratedVisitor)
}
}
struct GeneratedVisitor;
impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
type Value = StackTraceRequest;
fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
formatter.write_str("struct monitor_service.StackTraceRequest")
}
fn visit_map<V>(self, mut map_: V) -> std::result::Result<StackTraceRequest, V::Error>
where
V: serde::de::MapAccess<'de>,
{
while map_.next_key::<GeneratedField>()?.is_some() {
let _ = map_.next_value::<serde::de::IgnoredAny>()?;
}
Ok(StackTraceRequest {
})
}
}
deserializer.deserialize_struct("monitor_service.StackTraceRequest", FIELDS, GeneratedVisitor)
}
}
impl serde::Serialize for StackTraceResponse {
#[allow(deprecated)]
fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
where
S: serde::Serializer,
{
use serde::ser::SerializeStruct;
let mut len = 0;
if !self.actor_traces.is_empty() {
len += 1;
}
if !self.rpc_traces.is_empty() {
len += 1;
}
if !self.compaction_task_traces.is_empty() {
len += 1;
}
if !self.inflight_barrier_traces.is_empty() {
len += 1;
}
if !self.barrier_worker_state.is_empty() {
len += 1;
}
if !self.jvm_stack_traces.is_empty() {
len += 1;
}
let mut struct_ser = serializer.serialize_struct("monitor_service.StackTraceResponse", len)?;
if !self.actor_traces.is_empty() {
struct_ser.serialize_field("actorTraces", &self.actor_traces)?;
}
if !self.rpc_traces.is_empty() {
struct_ser.serialize_field("rpcTraces", &self.rpc_traces)?;
}
if !self.compaction_task_traces.is_empty() {
struct_ser.serialize_field("compactionTaskTraces", &self.compaction_task_traces)?;
}
if !self.inflight_barrier_traces.is_empty() {
struct_ser.serialize_field("inflightBarrierTraces", &self.inflight_barrier_traces)?;
}
if !self.barrier_worker_state.is_empty() {
struct_ser.serialize_field("barrierWorkerState", &self.barrier_worker_state)?;
}
if !self.jvm_stack_traces.is_empty() {
struct_ser.serialize_field("jvmStackTraces", &self.jvm_stack_traces)?;
}
struct_ser.end()
}
}
impl<'de> serde::Deserialize<'de> for StackTraceResponse {
#[allow(deprecated)]
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
const FIELDS: &[&str] = &[
"actor_traces",
"actorTraces",
"rpc_traces",
"rpcTraces",
"compaction_task_traces",
"compactionTaskTraces",
"inflight_barrier_traces",
"inflightBarrierTraces",
"barrier_worker_state",
"barrierWorkerState",
"jvm_stack_traces",
"jvmStackTraces",
];
#[allow(clippy::enum_variant_names)]
enum GeneratedField {
ActorTraces,
RpcTraces,
CompactionTaskTraces,
InflightBarrierTraces,
BarrierWorkerState,
JvmStackTraces,
}
impl<'de> serde::Deserialize<'de> for GeneratedField {
fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
where
D: serde::Deserializer<'de>,
{
struct GeneratedVisitor;
impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
type Value = GeneratedField;
fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(formatter, "expected one of: {:?}", &FIELDS)
}
#[allow(unused_variables)]
fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
where
E: serde::de::Error,
{
match value {
"actorTraces" | "actor_traces" => Ok(GeneratedField::ActorTraces),
"rpcTraces" | "rpc_traces" => Ok(GeneratedField::RpcTraces),
"compactionTaskTraces" | "compaction_task_traces" => Ok(GeneratedField::CompactionTaskTraces),
"inflightBarrierTraces" | "inflight_barrier_traces" => Ok(GeneratedField::InflightBarrierTraces),
"barrierWorkerState" | "barrier_worker_state" => Ok(GeneratedField::BarrierWorkerState),
"jvmStackTraces" | "jvm_stack_traces" => Ok(GeneratedField::JvmStackTraces),
_ => Err(serde::de::Error::unknown_field(value, FIELDS)),
}
}
}
deserializer.deserialize_identifier(GeneratedVisitor)
}
}
struct GeneratedVisitor;
impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
type Value = StackTraceResponse;
fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
formatter.write_str("struct monitor_service.StackTraceResponse")
}
fn visit_map<V>(self, mut map_: V) -> std::result::Result<StackTraceResponse, V::Error>
where
V: serde::de::MapAccess<'de>,
{
let mut actor_traces__ = None;
let mut rpc_traces__ = None;
let mut compaction_task_traces__ = None;
let mut inflight_barrier_traces__ = None;
let mut barrier_worker_state__ = None;
let mut jvm_stack_traces__ = None;
while let Some(k) = map_.next_key()? {
match k {
GeneratedField::ActorTraces => {
if actor_traces__.is_some() {
return Err(serde::de::Error::duplicate_field("actorTraces"));
}
actor_traces__ = Some(
map_.next_value::<std::collections::BTreeMap<::pbjson::private::NumberDeserialize<u32>, _>>()?
.into_iter().map(|(k,v)| (k.0, v)).collect()
);
}
GeneratedField::RpcTraces => {
if rpc_traces__.is_some() {
return Err(serde::de::Error::duplicate_field("rpcTraces"));
}
rpc_traces__ = Some(
map_.next_value::<std::collections::BTreeMap<_, _>>()?
);
}
GeneratedField::CompactionTaskTraces => {
if compaction_task_traces__.is_some() {
return Err(serde::de::Error::duplicate_field("compactionTaskTraces"));
}
compaction_task_traces__ = Some(
map_.next_value::<std::collections::BTreeMap<_, _>>()?
);
}
GeneratedField::InflightBarrierTraces => {
if inflight_barrier_traces__.is_some() {
return Err(serde::de::Error::duplicate_field("inflightBarrierTraces"));
}
inflight_barrier_traces__ = Some(
map_.next_value::<std::collections::BTreeMap<::pbjson::private::NumberDeserialize<u64>, _>>()?
.into_iter().map(|(k,v)| (k.0, v)).collect()
);
}
GeneratedField::BarrierWorkerState => {
if barrier_worker_state__.is_some() {
return Err(serde::de::Error::duplicate_field("barrierWorkerState"));
}
barrier_worker_state__ = Some(
map_.next_value::<std::collections::BTreeMap<::pbjson::private::NumberDeserialize<u32>, _>>()?
.into_iter().map(|(k,v)| (k.0, v)).collect()
);
}
GeneratedField::JvmStackTraces => {
if jvm_stack_traces__.is_some() {
return Err(serde::de::Error::duplicate_field("jvmStackTraces"));
}
jvm_stack_traces__ = Some(
map_.next_value::<std::collections::BTreeMap<::pbjson::private::NumberDeserialize<u32>, _>>()?
.into_iter().map(|(k,v)| (k.0, v)).collect()
);
}
}
}
Ok(StackTraceResponse {
actor_traces: actor_traces__.unwrap_or_default(),
rpc_traces: rpc_traces__.unwrap_or_default(),
compaction_task_traces: compaction_task_traces__.unwrap_or_default(),
inflight_barrier_traces: inflight_barrier_traces__.unwrap_or_default(),
barrier_worker_state: barrier_worker_state__.unwrap_or_default(),
jvm_stack_traces: jvm_stack_traces__.unwrap_or_default(),
})
}
}
deserializer.deserialize_struct("monitor_service.StackTraceResponse", FIELDS, GeneratedVisitor)
}
}
impl serde::Serialize for TieredCacheTracingRequest {
#[allow(deprecated)]
fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
where
S: serde::Serializer,
{
use serde::ser::SerializeStruct;
let mut len = 0;
if self.enable {
len += 1;
}
if self.record_hybrid_insert_threshold_ms.is_some() {
len += 1;
}
if self.record_hybrid_get_threshold_ms.is_some() {
len += 1;
}
if self.record_hybrid_obtain_threshold_ms.is_some() {
len += 1;
}
if self.record_hybrid_remove_threshold_ms.is_some() {
len += 1;
}
if self.record_hybrid_fetch_threshold_ms.is_some() {
len += 1;
}
let mut struct_ser = serializer.serialize_struct("monitor_service.TieredCacheTracingRequest", len)?;
if self.enable {
struct_ser.serialize_field("enable", &self.enable)?;
}
if let Some(v) = self.record_hybrid_insert_threshold_ms.as_ref() {
struct_ser.serialize_field("recordHybridInsertThresholdMs", v)?;
}
if let Some(v) = self.record_hybrid_get_threshold_ms.as_ref() {
struct_ser.serialize_field("recordHybridGetThresholdMs", v)?;
}
if let Some(v) = self.record_hybrid_obtain_threshold_ms.as_ref() {
struct_ser.serialize_field("recordHybridObtainThresholdMs", v)?;
}
if let Some(v) = self.record_hybrid_remove_threshold_ms.as_ref() {
struct_ser.serialize_field("recordHybridRemoveThresholdMs", v)?;
}
if let Some(v) = self.record_hybrid_fetch_threshold_ms.as_ref() {
struct_ser.serialize_field("recordHybridFetchThresholdMs", v)?;
}
struct_ser.end()
}
}
impl<'de> serde::Deserialize<'de> for TieredCacheTracingRequest {
#[allow(deprecated)]
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
const FIELDS: &[&str] = &[
"enable",
"record_hybrid_insert_threshold_ms",
"recordHybridInsertThresholdMs",
"record_hybrid_get_threshold_ms",
"recordHybridGetThresholdMs",
"record_hybrid_obtain_threshold_ms",
"recordHybridObtainThresholdMs",
"record_hybrid_remove_threshold_ms",
"recordHybridRemoveThresholdMs",
"record_hybrid_fetch_threshold_ms",
"recordHybridFetchThresholdMs",
];
#[allow(clippy::enum_variant_names)]
enum GeneratedField {
Enable,
RecordHybridInsertThresholdMs,
RecordHybridGetThresholdMs,
RecordHybridObtainThresholdMs,
RecordHybridRemoveThresholdMs,
RecordHybridFetchThresholdMs,
}
impl<'de> serde::Deserialize<'de> for GeneratedField {
fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
where
D: serde::Deserializer<'de>,
{
struct GeneratedVisitor;
impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
type Value = GeneratedField;
fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(formatter, "expected one of: {:?}", &FIELDS)
}
#[allow(unused_variables)]
fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
where
E: serde::de::Error,
{
match value {
"enable" => Ok(GeneratedField::Enable),
"recordHybridInsertThresholdMs" | "record_hybrid_insert_threshold_ms" => Ok(GeneratedField::RecordHybridInsertThresholdMs),
"recordHybridGetThresholdMs" | "record_hybrid_get_threshold_ms" => Ok(GeneratedField::RecordHybridGetThresholdMs),
"recordHybridObtainThresholdMs" | "record_hybrid_obtain_threshold_ms" => Ok(GeneratedField::RecordHybridObtainThresholdMs),
"recordHybridRemoveThresholdMs" | "record_hybrid_remove_threshold_ms" => Ok(GeneratedField::RecordHybridRemoveThresholdMs),
"recordHybridFetchThresholdMs" | "record_hybrid_fetch_threshold_ms" => Ok(GeneratedField::RecordHybridFetchThresholdMs),
_ => Err(serde::de::Error::unknown_field(value, FIELDS)),
}
}
}
deserializer.deserialize_identifier(GeneratedVisitor)
}
}
struct GeneratedVisitor;
impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
type Value = TieredCacheTracingRequest;
fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
formatter.write_str("struct monitor_service.TieredCacheTracingRequest")
}
fn visit_map<V>(self, mut map_: V) -> std::result::Result<TieredCacheTracingRequest, V::Error>
where
V: serde::de::MapAccess<'de>,
{
let mut enable__ = None;
let mut record_hybrid_insert_threshold_ms__ = None;
let mut record_hybrid_get_threshold_ms__ = None;
let mut record_hybrid_obtain_threshold_ms__ = None;
let mut record_hybrid_remove_threshold_ms__ = None;
let mut record_hybrid_fetch_threshold_ms__ = None;
while let Some(k) = map_.next_key()? {
match k {
GeneratedField::Enable => {
if enable__.is_some() {
return Err(serde::de::Error::duplicate_field("enable"));
}
enable__ = Some(map_.next_value()?);
}
GeneratedField::RecordHybridInsertThresholdMs => {
if record_hybrid_insert_threshold_ms__.is_some() {
return Err(serde::de::Error::duplicate_field("recordHybridInsertThresholdMs"));
}
record_hybrid_insert_threshold_ms__ =
map_.next_value::<::std::option::Option<::pbjson::private::NumberDeserialize<_>>>()?.map(|x| x.0)
;
}
GeneratedField::RecordHybridGetThresholdMs => {
if record_hybrid_get_threshold_ms__.is_some() {
return Err(serde::de::Error::duplicate_field("recordHybridGetThresholdMs"));
}
record_hybrid_get_threshold_ms__ =
map_.next_value::<::std::option::Option<::pbjson::private::NumberDeserialize<_>>>()?.map(|x| x.0)
;
}
GeneratedField::RecordHybridObtainThresholdMs => {
if record_hybrid_obtain_threshold_ms__.is_some() {
return Err(serde::de::Error::duplicate_field("recordHybridObtainThresholdMs"));
}
record_hybrid_obtain_threshold_ms__ =
map_.next_value::<::std::option::Option<::pbjson::private::NumberDeserialize<_>>>()?.map(|x| x.0)
;
}
GeneratedField::RecordHybridRemoveThresholdMs => {
if record_hybrid_remove_threshold_ms__.is_some() {
return Err(serde::de::Error::duplicate_field("recordHybridRemoveThresholdMs"));
}
record_hybrid_remove_threshold_ms__ =
map_.next_value::<::std::option::Option<::pbjson::private::NumberDeserialize<_>>>()?.map(|x| x.0)
;
}
GeneratedField::RecordHybridFetchThresholdMs => {
if record_hybrid_fetch_threshold_ms__.is_some() {
return Err(serde::de::Error::duplicate_field("recordHybridFetchThresholdMs"));
}
record_hybrid_fetch_threshold_ms__ =
map_.next_value::<::std::option::Option<::pbjson::private::NumberDeserialize<_>>>()?.map(|x| x.0)
;
}
}
}
Ok(TieredCacheTracingRequest {
enable: enable__.unwrap_or_default(),
record_hybrid_insert_threshold_ms: record_hybrid_insert_threshold_ms__,
record_hybrid_get_threshold_ms: record_hybrid_get_threshold_ms__,
record_hybrid_obtain_threshold_ms: record_hybrid_obtain_threshold_ms__,
record_hybrid_remove_threshold_ms: record_hybrid_remove_threshold_ms__,
record_hybrid_fetch_threshold_ms: record_hybrid_fetch_threshold_ms__,
})
}
}
deserializer.deserialize_struct("monitor_service.TieredCacheTracingRequest", FIELDS, GeneratedVisitor)
}
}
impl serde::Serialize for TieredCacheTracingResponse {
#[allow(deprecated)]
fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
where
S: serde::Serializer,
{
use serde::ser::SerializeStruct;
let len = 0;
let struct_ser = serializer.serialize_struct("monitor_service.TieredCacheTracingResponse", len)?;
struct_ser.end()
}
}
impl<'de> serde::Deserialize<'de> for TieredCacheTracingResponse {
#[allow(deprecated)]
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
const FIELDS: &[&str] = &[
];
#[allow(clippy::enum_variant_names)]
enum GeneratedField {
}
impl<'de> serde::Deserialize<'de> for GeneratedField {
fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
where
D: serde::Deserializer<'de>,
{
struct GeneratedVisitor;
impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
type Value = GeneratedField;
fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(formatter, "expected one of: {:?}", &FIELDS)
}
#[allow(unused_variables)]
fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
where
E: serde::de::Error,
{
Err(serde::de::Error::unknown_field(value, FIELDS))
}
}
deserializer.deserialize_identifier(GeneratedVisitor)
}
}
struct GeneratedVisitor;
impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
type Value = TieredCacheTracingResponse;
fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
formatter.write_str("struct monitor_service.TieredCacheTracingResponse")
}
fn visit_map<V>(self, mut map_: V) -> std::result::Result<TieredCacheTracingResponse, V::Error>
where
V: serde::de::MapAccess<'de>,
{
while map_.next_key::<GeneratedField>()?.is_some() {
let _ = map_.next_value::<serde::de::IgnoredAny>()?;
}
Ok(TieredCacheTracingResponse {
})
}
}
deserializer.deserialize_struct("monitor_service.TieredCacheTracingResponse", FIELDS, GeneratedVisitor)
}
}