impl serde::Serialize for ChangeItem {
    #[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.name.is_empty() {
            len += 1;
        }
        if self.from.is_some() {
            len += 1;
        }
        if self.to.is_some() {
            len += 1;
        }
        if self.metadata.is_some() {
            len += 1;
        }
        let mut struct_ser = serializer.serialize_struct("objdiff.report.ChangeItem", len)?;
        if !self.name.is_empty() {
            struct_ser.serialize_field("name", &self.name)?;
        }
        if let Some(v) = self.from.as_ref() {
            struct_ser.serialize_field("from", v)?;
        }
        if let Some(v) = self.to.as_ref() {
            struct_ser.serialize_field("to", v)?;
        }
        if let Some(v) = self.metadata.as_ref() {
            struct_ser.serialize_field("metadata", v)?;
        }
        struct_ser.end()
    }
}
impl<'de> serde::Deserialize<'de> for ChangeItem {
    #[allow(deprecated)]
    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        const FIELDS: &[&str] = &[
            "name",
            "from",
            "to",
            "metadata",
        ];

        #[allow(clippy::enum_variant_names)]
        enum GeneratedField {
            Name,
            From,
            To,
            Metadata,
        }
        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 serde::de::Visitor<'_> 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 {
                            "name" => Ok(GeneratedField::Name),
                            "from" => Ok(GeneratedField::From),
                            "to" => Ok(GeneratedField::To),
                            "metadata" => Ok(GeneratedField::Metadata),
                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
                        }
                    }
                }
                deserializer.deserialize_identifier(GeneratedVisitor)
            }
        }
        struct GeneratedVisitor;
        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
            type Value = ChangeItem;

            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                formatter.write_str("struct objdiff.report.ChangeItem")
            }

            fn visit_map<V>(self, mut map_: V) -> std::result::Result<ChangeItem, V::Error>
                where
                    V: serde::de::MapAccess<'de>,
            {
                let mut name__ = None;
                let mut from__ = None;
                let mut to__ = None;
                let mut metadata__ = None;
                while let Some(k) = map_.next_key()? {
                    match k {
                        GeneratedField::Name => {
                            if name__.is_some() {
                                return Err(serde::de::Error::duplicate_field("name"));
                            }
                            name__ = Some(map_.next_value()?);
                        }
                        GeneratedField::From => {
                            if from__.is_some() {
                                return Err(serde::de::Error::duplicate_field("from"));
                            }
                            from__ = map_.next_value()?;
                        }
                        GeneratedField::To => {
                            if to__.is_some() {
                                return Err(serde::de::Error::duplicate_field("to"));
                            }
                            to__ = map_.next_value()?;
                        }
                        GeneratedField::Metadata => {
                            if metadata__.is_some() {
                                return Err(serde::de::Error::duplicate_field("metadata"));
                            }
                            metadata__ = map_.next_value()?;
                        }
                    }
                }
                Ok(ChangeItem {
                    name: name__.unwrap_or_default(),
                    from: from__,
                    to: to__,
                    metadata: metadata__,
                })
            }
        }
        deserializer.deserialize_struct("objdiff.report.ChangeItem", FIELDS, GeneratedVisitor)
    }
}
impl serde::Serialize for ChangeItemInfo {
    #[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.fuzzy_match_percent != 0. {
            len += 1;
        }
        if self.size != 0 {
            len += 1;
        }
        let mut struct_ser = serializer.serialize_struct("objdiff.report.ChangeItemInfo", len)?;
        if self.fuzzy_match_percent != 0. {
            struct_ser.serialize_field("fuzzy_match_percent", &self.fuzzy_match_percent)?;
        }
        if self.size != 0 {
            #[allow(clippy::needless_borrow)]
            #[allow(clippy::needless_borrows_for_generic_args)]
            struct_ser.serialize_field("size", ToString::to_string(&self.size).as_str())?;
        }
        struct_ser.end()
    }
}
impl<'de> serde::Deserialize<'de> for ChangeItemInfo {
    #[allow(deprecated)]
    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        const FIELDS: &[&str] = &[
            "fuzzy_match_percent",
            "fuzzyMatchPercent",
            "size",
        ];

        #[allow(clippy::enum_variant_names)]
        enum GeneratedField {
            FuzzyMatchPercent,
            Size,
        }
        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 serde::de::Visitor<'_> 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 {
                            "fuzzyMatchPercent" | "fuzzy_match_percent" => Ok(GeneratedField::FuzzyMatchPercent),
                            "size" => Ok(GeneratedField::Size),
                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
                        }
                    }
                }
                deserializer.deserialize_identifier(GeneratedVisitor)
            }
        }
        struct GeneratedVisitor;
        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
            type Value = ChangeItemInfo;

            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                formatter.write_str("struct objdiff.report.ChangeItemInfo")
            }

            fn visit_map<V>(self, mut map_: V) -> std::result::Result<ChangeItemInfo, V::Error>
                where
                    V: serde::de::MapAccess<'de>,
            {
                let mut fuzzy_match_percent__ = None;
                let mut size__ = None;
                while let Some(k) = map_.next_key()? {
                    match k {
                        GeneratedField::FuzzyMatchPercent => {
                            if fuzzy_match_percent__.is_some() {
                                return Err(serde::de::Error::duplicate_field("fuzzyMatchPercent"));
                            }
                            fuzzy_match_percent__ = 
                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
                            ;
                        }
                        GeneratedField::Size => {
                            if size__.is_some() {
                                return Err(serde::de::Error::duplicate_field("size"));
                            }
                            size__ = 
                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
                            ;
                        }
                    }
                }
                Ok(ChangeItemInfo {
                    fuzzy_match_percent: fuzzy_match_percent__.unwrap_or_default(),
                    size: size__.unwrap_or_default(),
                })
            }
        }
        deserializer.deserialize_struct("objdiff.report.ChangeItemInfo", FIELDS, GeneratedVisitor)
    }
}
impl serde::Serialize for ChangeUnit {
    #[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.name.is_empty() {
            len += 1;
        }
        if self.from.is_some() {
            len += 1;
        }
        if self.to.is_some() {
            len += 1;
        }
        if !self.sections.is_empty() {
            len += 1;
        }
        if !self.functions.is_empty() {
            len += 1;
        }
        if self.metadata.is_some() {
            len += 1;
        }
        let mut struct_ser = serializer.serialize_struct("objdiff.report.ChangeUnit", len)?;
        if !self.name.is_empty() {
            struct_ser.serialize_field("name", &self.name)?;
        }
        if let Some(v) = self.from.as_ref() {
            struct_ser.serialize_field("from", v)?;
        }
        if let Some(v) = self.to.as_ref() {
            struct_ser.serialize_field("to", v)?;
        }
        if !self.sections.is_empty() {
            struct_ser.serialize_field("sections", &self.sections)?;
        }
        if !self.functions.is_empty() {
            struct_ser.serialize_field("functions", &self.functions)?;
        }
        if let Some(v) = self.metadata.as_ref() {
            struct_ser.serialize_field("metadata", v)?;
        }
        struct_ser.end()
    }
}
impl<'de> serde::Deserialize<'de> for ChangeUnit {
    #[allow(deprecated)]
    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        const FIELDS: &[&str] = &[
            "name",
            "from",
            "to",
            "sections",
            "functions",
            "metadata",
        ];

        #[allow(clippy::enum_variant_names)]
        enum GeneratedField {
            Name,
            From,
            To,
            Sections,
            Functions,
            Metadata,
        }
        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 serde::de::Visitor<'_> 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 {
                            "name" => Ok(GeneratedField::Name),
                            "from" => Ok(GeneratedField::From),
                            "to" => Ok(GeneratedField::To),
                            "sections" => Ok(GeneratedField::Sections),
                            "functions" => Ok(GeneratedField::Functions),
                            "metadata" => Ok(GeneratedField::Metadata),
                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
                        }
                    }
                }
                deserializer.deserialize_identifier(GeneratedVisitor)
            }
        }
        struct GeneratedVisitor;
        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
            type Value = ChangeUnit;

            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                formatter.write_str("struct objdiff.report.ChangeUnit")
            }

            fn visit_map<V>(self, mut map_: V) -> std::result::Result<ChangeUnit, V::Error>
                where
                    V: serde::de::MapAccess<'de>,
            {
                let mut name__ = None;
                let mut from__ = None;
                let mut to__ = None;
                let mut sections__ = None;
                let mut functions__ = None;
                let mut metadata__ = None;
                while let Some(k) = map_.next_key()? {
                    match k {
                        GeneratedField::Name => {
                            if name__.is_some() {
                                return Err(serde::de::Error::duplicate_field("name"));
                            }
                            name__ = Some(map_.next_value()?);
                        }
                        GeneratedField::From => {
                            if from__.is_some() {
                                return Err(serde::de::Error::duplicate_field("from"));
                            }
                            from__ = map_.next_value()?;
                        }
                        GeneratedField::To => {
                            if to__.is_some() {
                                return Err(serde::de::Error::duplicate_field("to"));
                            }
                            to__ = map_.next_value()?;
                        }
                        GeneratedField::Sections => {
                            if sections__.is_some() {
                                return Err(serde::de::Error::duplicate_field("sections"));
                            }
                            sections__ = Some(map_.next_value()?);
                        }
                        GeneratedField::Functions => {
                            if functions__.is_some() {
                                return Err(serde::de::Error::duplicate_field("functions"));
                            }
                            functions__ = Some(map_.next_value()?);
                        }
                        GeneratedField::Metadata => {
                            if metadata__.is_some() {
                                return Err(serde::de::Error::duplicate_field("metadata"));
                            }
                            metadata__ = map_.next_value()?;
                        }
                    }
                }
                Ok(ChangeUnit {
                    name: name__.unwrap_or_default(),
                    from: from__,
                    to: to__,
                    sections: sections__.unwrap_or_default(),
                    functions: functions__.unwrap_or_default(),
                    metadata: metadata__,
                })
            }
        }
        deserializer.deserialize_struct("objdiff.report.ChangeUnit", FIELDS, GeneratedVisitor)
    }
}
impl serde::Serialize for Changes {
    #[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.from.is_some() {
            len += 1;
        }
        if self.to.is_some() {
            len += 1;
        }
        if !self.units.is_empty() {
            len += 1;
        }
        let mut struct_ser = serializer.serialize_struct("objdiff.report.Changes", len)?;
        if let Some(v) = self.from.as_ref() {
            struct_ser.serialize_field("from", v)?;
        }
        if let Some(v) = self.to.as_ref() {
            struct_ser.serialize_field("to", v)?;
        }
        if !self.units.is_empty() {
            struct_ser.serialize_field("units", &self.units)?;
        }
        struct_ser.end()
    }
}
impl<'de> serde::Deserialize<'de> for Changes {
    #[allow(deprecated)]
    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        const FIELDS: &[&str] = &[
            "from",
            "to",
            "units",
        ];

        #[allow(clippy::enum_variant_names)]
        enum GeneratedField {
            From,
            To,
            Units,
        }
        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 serde::de::Visitor<'_> 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 {
                            "from" => Ok(GeneratedField::From),
                            "to" => Ok(GeneratedField::To),
                            "units" => Ok(GeneratedField::Units),
                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
                        }
                    }
                }
                deserializer.deserialize_identifier(GeneratedVisitor)
            }
        }
        struct GeneratedVisitor;
        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
            type Value = Changes;

            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                formatter.write_str("struct objdiff.report.Changes")
            }

            fn visit_map<V>(self, mut map_: V) -> std::result::Result<Changes, V::Error>
                where
                    V: serde::de::MapAccess<'de>,
            {
                let mut from__ = None;
                let mut to__ = None;
                let mut units__ = None;
                while let Some(k) = map_.next_key()? {
                    match k {
                        GeneratedField::From => {
                            if from__.is_some() {
                                return Err(serde::de::Error::duplicate_field("from"));
                            }
                            from__ = map_.next_value()?;
                        }
                        GeneratedField::To => {
                            if to__.is_some() {
                                return Err(serde::de::Error::duplicate_field("to"));
                            }
                            to__ = map_.next_value()?;
                        }
                        GeneratedField::Units => {
                            if units__.is_some() {
                                return Err(serde::de::Error::duplicate_field("units"));
                            }
                            units__ = Some(map_.next_value()?);
                        }
                    }
                }
                Ok(Changes {
                    from: from__,
                    to: to__,
                    units: units__.unwrap_or_default(),
                })
            }
        }
        deserializer.deserialize_struct("objdiff.report.Changes", FIELDS, GeneratedVisitor)
    }
}
impl serde::Serialize for ChangesInput {
    #[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.from.is_some() {
            len += 1;
        }
        if self.to.is_some() {
            len += 1;
        }
        let mut struct_ser = serializer.serialize_struct("objdiff.report.ChangesInput", len)?;
        if let Some(v) = self.from.as_ref() {
            struct_ser.serialize_field("from", v)?;
        }
        if let Some(v) = self.to.as_ref() {
            struct_ser.serialize_field("to", v)?;
        }
        struct_ser.end()
    }
}
impl<'de> serde::Deserialize<'de> for ChangesInput {
    #[allow(deprecated)]
    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        const FIELDS: &[&str] = &[
            "from",
            "to",
        ];

        #[allow(clippy::enum_variant_names)]
        enum GeneratedField {
            From,
            To,
        }
        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 serde::de::Visitor<'_> 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 {
                            "from" => Ok(GeneratedField::From),
                            "to" => Ok(GeneratedField::To),
                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
                        }
                    }
                }
                deserializer.deserialize_identifier(GeneratedVisitor)
            }
        }
        struct GeneratedVisitor;
        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
            type Value = ChangesInput;

            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                formatter.write_str("struct objdiff.report.ChangesInput")
            }

            fn visit_map<V>(self, mut map_: V) -> std::result::Result<ChangesInput, V::Error>
                where
                    V: serde::de::MapAccess<'de>,
            {
                let mut from__ = None;
                let mut to__ = None;
                while let Some(k) = map_.next_key()? {
                    match k {
                        GeneratedField::From => {
                            if from__.is_some() {
                                return Err(serde::de::Error::duplicate_field("from"));
                            }
                            from__ = map_.next_value()?;
                        }
                        GeneratedField::To => {
                            if to__.is_some() {
                                return Err(serde::de::Error::duplicate_field("to"));
                            }
                            to__ = map_.next_value()?;
                        }
                    }
                }
                Ok(ChangesInput {
                    from: from__,
                    to: to__,
                })
            }
        }
        deserializer.deserialize_struct("objdiff.report.ChangesInput", FIELDS, GeneratedVisitor)
    }
}
impl serde::Serialize for Measures {
    #[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.fuzzy_match_percent != 0. {
            len += 1;
        }
        if self.total_code != 0 {
            len += 1;
        }
        if self.matched_code != 0 {
            len += 1;
        }
        if self.matched_code_percent != 0. {
            len += 1;
        }
        if self.total_data != 0 {
            len += 1;
        }
        if self.matched_data != 0 {
            len += 1;
        }
        if self.matched_data_percent != 0. {
            len += 1;
        }
        if self.total_functions != 0 {
            len += 1;
        }
        if self.matched_functions != 0 {
            len += 1;
        }
        if self.matched_functions_percent != 0. {
            len += 1;
        }
        if self.complete_code != 0 {
            len += 1;
        }
        if self.complete_code_percent != 0. {
            len += 1;
        }
        if self.complete_data != 0 {
            len += 1;
        }
        if self.complete_data_percent != 0. {
            len += 1;
        }
        if self.total_units != 0 {
            len += 1;
        }
        if self.complete_units != 0 {
            len += 1;
        }
        let mut struct_ser = serializer.serialize_struct("objdiff.report.Measures", len)?;
        if self.fuzzy_match_percent != 0. {
            struct_ser.serialize_field("fuzzy_match_percent", &self.fuzzy_match_percent)?;
        }
        if self.total_code != 0 {
            #[allow(clippy::needless_borrow)]
            #[allow(clippy::needless_borrows_for_generic_args)]
            struct_ser.serialize_field("total_code", ToString::to_string(&self.total_code).as_str())?;
        }
        if self.matched_code != 0 {
            #[allow(clippy::needless_borrow)]
            #[allow(clippy::needless_borrows_for_generic_args)]
            struct_ser.serialize_field("matched_code", ToString::to_string(&self.matched_code).as_str())?;
        }
        if self.matched_code_percent != 0. {
            struct_ser.serialize_field("matched_code_percent", &self.matched_code_percent)?;
        }
        if self.total_data != 0 {
            #[allow(clippy::needless_borrow)]
            #[allow(clippy::needless_borrows_for_generic_args)]
            struct_ser.serialize_field("total_data", ToString::to_string(&self.total_data).as_str())?;
        }
        if self.matched_data != 0 {
            #[allow(clippy::needless_borrow)]
            #[allow(clippy::needless_borrows_for_generic_args)]
            struct_ser.serialize_field("matched_data", ToString::to_string(&self.matched_data).as_str())?;
        }
        if self.matched_data_percent != 0. {
            struct_ser.serialize_field("matched_data_percent", &self.matched_data_percent)?;
        }
        if self.total_functions != 0 {
            struct_ser.serialize_field("total_functions", &self.total_functions)?;
        }
        if self.matched_functions != 0 {
            struct_ser.serialize_field("matched_functions", &self.matched_functions)?;
        }
        if self.matched_functions_percent != 0. {
            struct_ser.serialize_field("matched_functions_percent", &self.matched_functions_percent)?;
        }
        if self.complete_code != 0 {
            #[allow(clippy::needless_borrow)]
            #[allow(clippy::needless_borrows_for_generic_args)]
            struct_ser.serialize_field("complete_code", ToString::to_string(&self.complete_code).as_str())?;
        }
        if self.complete_code_percent != 0. {
            struct_ser.serialize_field("complete_code_percent", &self.complete_code_percent)?;
        }
        if self.complete_data != 0 {
            #[allow(clippy::needless_borrow)]
            #[allow(clippy::needless_borrows_for_generic_args)]
            struct_ser.serialize_field("complete_data", ToString::to_string(&self.complete_data).as_str())?;
        }
        if self.complete_data_percent != 0. {
            struct_ser.serialize_field("complete_data_percent", &self.complete_data_percent)?;
        }
        if self.total_units != 0 {
            struct_ser.serialize_field("total_units", &self.total_units)?;
        }
        if self.complete_units != 0 {
            struct_ser.serialize_field("complete_units", &self.complete_units)?;
        }
        struct_ser.end()
    }
}
impl<'de> serde::Deserialize<'de> for Measures {
    #[allow(deprecated)]
    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        const FIELDS: &[&str] = &[
            "fuzzy_match_percent",
            "fuzzyMatchPercent",
            "total_code",
            "totalCode",
            "matched_code",
            "matchedCode",
            "matched_code_percent",
            "matchedCodePercent",
            "total_data",
            "totalData",
            "matched_data",
            "matchedData",
            "matched_data_percent",
            "matchedDataPercent",
            "total_functions",
            "totalFunctions",
            "matched_functions",
            "matchedFunctions",
            "matched_functions_percent",
            "matchedFunctionsPercent",
            "complete_code",
            "completeCode",
            "complete_code_percent",
            "completeCodePercent",
            "complete_data",
            "completeData",
            "complete_data_percent",
            "completeDataPercent",
            "total_units",
            "totalUnits",
            "complete_units",
            "completeUnits",
        ];

        #[allow(clippy::enum_variant_names)]
        enum GeneratedField {
            FuzzyMatchPercent,
            TotalCode,
            MatchedCode,
            MatchedCodePercent,
            TotalData,
            MatchedData,
            MatchedDataPercent,
            TotalFunctions,
            MatchedFunctions,
            MatchedFunctionsPercent,
            CompleteCode,
            CompleteCodePercent,
            CompleteData,
            CompleteDataPercent,
            TotalUnits,
            CompleteUnits,
        }
        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 serde::de::Visitor<'_> 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 {
                            "fuzzyMatchPercent" | "fuzzy_match_percent" => Ok(GeneratedField::FuzzyMatchPercent),
                            "totalCode" | "total_code" => Ok(GeneratedField::TotalCode),
                            "matchedCode" | "matched_code" => Ok(GeneratedField::MatchedCode),
                            "matchedCodePercent" | "matched_code_percent" => Ok(GeneratedField::MatchedCodePercent),
                            "totalData" | "total_data" => Ok(GeneratedField::TotalData),
                            "matchedData" | "matched_data" => Ok(GeneratedField::MatchedData),
                            "matchedDataPercent" | "matched_data_percent" => Ok(GeneratedField::MatchedDataPercent),
                            "totalFunctions" | "total_functions" => Ok(GeneratedField::TotalFunctions),
                            "matchedFunctions" | "matched_functions" => Ok(GeneratedField::MatchedFunctions),
                            "matchedFunctionsPercent" | "matched_functions_percent" => Ok(GeneratedField::MatchedFunctionsPercent),
                            "completeCode" | "complete_code" => Ok(GeneratedField::CompleteCode),
                            "completeCodePercent" | "complete_code_percent" => Ok(GeneratedField::CompleteCodePercent),
                            "completeData" | "complete_data" => Ok(GeneratedField::CompleteData),
                            "completeDataPercent" | "complete_data_percent" => Ok(GeneratedField::CompleteDataPercent),
                            "totalUnits" | "total_units" => Ok(GeneratedField::TotalUnits),
                            "completeUnits" | "complete_units" => Ok(GeneratedField::CompleteUnits),
                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
                        }
                    }
                }
                deserializer.deserialize_identifier(GeneratedVisitor)
            }
        }
        struct GeneratedVisitor;
        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
            type Value = Measures;

            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                formatter.write_str("struct objdiff.report.Measures")
            }

            fn visit_map<V>(self, mut map_: V) -> std::result::Result<Measures, V::Error>
                where
                    V: serde::de::MapAccess<'de>,
            {
                let mut fuzzy_match_percent__ = None;
                let mut total_code__ = None;
                let mut matched_code__ = None;
                let mut matched_code_percent__ = None;
                let mut total_data__ = None;
                let mut matched_data__ = None;
                let mut matched_data_percent__ = None;
                let mut total_functions__ = None;
                let mut matched_functions__ = None;
                let mut matched_functions_percent__ = None;
                let mut complete_code__ = None;
                let mut complete_code_percent__ = None;
                let mut complete_data__ = None;
                let mut complete_data_percent__ = None;
                let mut total_units__ = None;
                let mut complete_units__ = None;
                while let Some(k) = map_.next_key()? {
                    match k {
                        GeneratedField::FuzzyMatchPercent => {
                            if fuzzy_match_percent__.is_some() {
                                return Err(serde::de::Error::duplicate_field("fuzzyMatchPercent"));
                            }
                            fuzzy_match_percent__ = 
                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
                            ;
                        }
                        GeneratedField::TotalCode => {
                            if total_code__.is_some() {
                                return Err(serde::de::Error::duplicate_field("totalCode"));
                            }
                            total_code__ = 
                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
                            ;
                        }
                        GeneratedField::MatchedCode => {
                            if matched_code__.is_some() {
                                return Err(serde::de::Error::duplicate_field("matchedCode"));
                            }
                            matched_code__ = 
                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
                            ;
                        }
                        GeneratedField::MatchedCodePercent => {
                            if matched_code_percent__.is_some() {
                                return Err(serde::de::Error::duplicate_field("matchedCodePercent"));
                            }
                            matched_code_percent__ = 
                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
                            ;
                        }
                        GeneratedField::TotalData => {
                            if total_data__.is_some() {
                                return Err(serde::de::Error::duplicate_field("totalData"));
                            }
                            total_data__ = 
                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
                            ;
                        }
                        GeneratedField::MatchedData => {
                            if matched_data__.is_some() {
                                return Err(serde::de::Error::duplicate_field("matchedData"));
                            }
                            matched_data__ = 
                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
                            ;
                        }
                        GeneratedField::MatchedDataPercent => {
                            if matched_data_percent__.is_some() {
                                return Err(serde::de::Error::duplicate_field("matchedDataPercent"));
                            }
                            matched_data_percent__ = 
                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
                            ;
                        }
                        GeneratedField::TotalFunctions => {
                            if total_functions__.is_some() {
                                return Err(serde::de::Error::duplicate_field("totalFunctions"));
                            }
                            total_functions__ = 
                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
                            ;
                        }
                        GeneratedField::MatchedFunctions => {
                            if matched_functions__.is_some() {
                                return Err(serde::de::Error::duplicate_field("matchedFunctions"));
                            }
                            matched_functions__ = 
                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
                            ;
                        }
                        GeneratedField::MatchedFunctionsPercent => {
                            if matched_functions_percent__.is_some() {
                                return Err(serde::de::Error::duplicate_field("matchedFunctionsPercent"));
                            }
                            matched_functions_percent__ = 
                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
                            ;
                        }
                        GeneratedField::CompleteCode => {
                            if complete_code__.is_some() {
                                return Err(serde::de::Error::duplicate_field("completeCode"));
                            }
                            complete_code__ = 
                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
                            ;
                        }
                        GeneratedField::CompleteCodePercent => {
                            if complete_code_percent__.is_some() {
                                return Err(serde::de::Error::duplicate_field("completeCodePercent"));
                            }
                            complete_code_percent__ = 
                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
                            ;
                        }
                        GeneratedField::CompleteData => {
                            if complete_data__.is_some() {
                                return Err(serde::de::Error::duplicate_field("completeData"));
                            }
                            complete_data__ = 
                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
                            ;
                        }
                        GeneratedField::CompleteDataPercent => {
                            if complete_data_percent__.is_some() {
                                return Err(serde::de::Error::duplicate_field("completeDataPercent"));
                            }
                            complete_data_percent__ = 
                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
                            ;
                        }
                        GeneratedField::TotalUnits => {
                            if total_units__.is_some() {
                                return Err(serde::de::Error::duplicate_field("totalUnits"));
                            }
                            total_units__ = 
                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
                            ;
                        }
                        GeneratedField::CompleteUnits => {
                            if complete_units__.is_some() {
                                return Err(serde::de::Error::duplicate_field("completeUnits"));
                            }
                            complete_units__ = 
                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
                            ;
                        }
                    }
                }
                Ok(Measures {
                    fuzzy_match_percent: fuzzy_match_percent__.unwrap_or_default(),
                    total_code: total_code__.unwrap_or_default(),
                    matched_code: matched_code__.unwrap_or_default(),
                    matched_code_percent: matched_code_percent__.unwrap_or_default(),
                    total_data: total_data__.unwrap_or_default(),
                    matched_data: matched_data__.unwrap_or_default(),
                    matched_data_percent: matched_data_percent__.unwrap_or_default(),
                    total_functions: total_functions__.unwrap_or_default(),
                    matched_functions: matched_functions__.unwrap_or_default(),
                    matched_functions_percent: matched_functions_percent__.unwrap_or_default(),
                    complete_code: complete_code__.unwrap_or_default(),
                    complete_code_percent: complete_code_percent__.unwrap_or_default(),
                    complete_data: complete_data__.unwrap_or_default(),
                    complete_data_percent: complete_data_percent__.unwrap_or_default(),
                    total_units: total_units__.unwrap_or_default(),
                    complete_units: complete_units__.unwrap_or_default(),
                })
            }
        }
        deserializer.deserialize_struct("objdiff.report.Measures", FIELDS, GeneratedVisitor)
    }
}
impl serde::Serialize for Report {
    #[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.measures.is_some() {
            len += 1;
        }
        if !self.units.is_empty() {
            len += 1;
        }
        if self.version != 0 {
            len += 1;
        }
        if !self.categories.is_empty() {
            len += 1;
        }
        let mut struct_ser = serializer.serialize_struct("objdiff.report.Report", len)?;
        if let Some(v) = self.measures.as_ref() {
            struct_ser.serialize_field("measures", v)?;
        }
        if !self.units.is_empty() {
            struct_ser.serialize_field("units", &self.units)?;
        }
        if self.version != 0 {
            struct_ser.serialize_field("version", &self.version)?;
        }
        if !self.categories.is_empty() {
            struct_ser.serialize_field("categories", &self.categories)?;
        }
        struct_ser.end()
    }
}
impl<'de> serde::Deserialize<'de> for Report {
    #[allow(deprecated)]
    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        const FIELDS: &[&str] = &[
            "measures",
            "units",
            "version",
            "categories",
        ];

        #[allow(clippy::enum_variant_names)]
        enum GeneratedField {
            Measures,
            Units,
            Version,
            Categories,
        }
        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 serde::de::Visitor<'_> 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 {
                            "measures" => Ok(GeneratedField::Measures),
                            "units" => Ok(GeneratedField::Units),
                            "version" => Ok(GeneratedField::Version),
                            "categories" => Ok(GeneratedField::Categories),
                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
                        }
                    }
                }
                deserializer.deserialize_identifier(GeneratedVisitor)
            }
        }
        struct GeneratedVisitor;
        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
            type Value = Report;

            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                formatter.write_str("struct objdiff.report.Report")
            }

            fn visit_map<V>(self, mut map_: V) -> std::result::Result<Report, V::Error>
                where
                    V: serde::de::MapAccess<'de>,
            {
                let mut measures__ = None;
                let mut units__ = None;
                let mut version__ = None;
                let mut categories__ = None;
                while let Some(k) = map_.next_key()? {
                    match k {
                        GeneratedField::Measures => {
                            if measures__.is_some() {
                                return Err(serde::de::Error::duplicate_field("measures"));
                            }
                            measures__ = map_.next_value()?;
                        }
                        GeneratedField::Units => {
                            if units__.is_some() {
                                return Err(serde::de::Error::duplicate_field("units"));
                            }
                            units__ = Some(map_.next_value()?);
                        }
                        GeneratedField::Version => {
                            if version__.is_some() {
                                return Err(serde::de::Error::duplicate_field("version"));
                            }
                            version__ = 
                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
                            ;
                        }
                        GeneratedField::Categories => {
                            if categories__.is_some() {
                                return Err(serde::de::Error::duplicate_field("categories"));
                            }
                            categories__ = Some(map_.next_value()?);
                        }
                    }
                }
                Ok(Report {
                    measures: measures__,
                    units: units__.unwrap_or_default(),
                    version: version__.unwrap_or_default(),
                    categories: categories__.unwrap_or_default(),
                })
            }
        }
        deserializer.deserialize_struct("objdiff.report.Report", FIELDS, GeneratedVisitor)
    }
}
impl serde::Serialize for ReportCategory {
    #[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.id.is_empty() {
            len += 1;
        }
        if !self.name.is_empty() {
            len += 1;
        }
        if self.measures.is_some() {
            len += 1;
        }
        let mut struct_ser = serializer.serialize_struct("objdiff.report.ReportCategory", len)?;
        if !self.id.is_empty() {
            struct_ser.serialize_field("id", &self.id)?;
        }
        if !self.name.is_empty() {
            struct_ser.serialize_field("name", &self.name)?;
        }
        if let Some(v) = self.measures.as_ref() {
            struct_ser.serialize_field("measures", v)?;
        }
        struct_ser.end()
    }
}
impl<'de> serde::Deserialize<'de> for ReportCategory {
    #[allow(deprecated)]
    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        const FIELDS: &[&str] = &[
            "id",
            "name",
            "measures",
        ];

        #[allow(clippy::enum_variant_names)]
        enum GeneratedField {
            Id,
            Name,
            Measures,
        }
        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 serde::de::Visitor<'_> 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 {
                            "id" => Ok(GeneratedField::Id),
                            "name" => Ok(GeneratedField::Name),
                            "measures" => Ok(GeneratedField::Measures),
                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
                        }
                    }
                }
                deserializer.deserialize_identifier(GeneratedVisitor)
            }
        }
        struct GeneratedVisitor;
        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
            type Value = ReportCategory;

            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                formatter.write_str("struct objdiff.report.ReportCategory")
            }

            fn visit_map<V>(self, mut map_: V) -> std::result::Result<ReportCategory, V::Error>
                where
                    V: serde::de::MapAccess<'de>,
            {
                let mut id__ = None;
                let mut name__ = None;
                let mut measures__ = None;
                while let Some(k) = map_.next_key()? {
                    match k {
                        GeneratedField::Id => {
                            if id__.is_some() {
                                return Err(serde::de::Error::duplicate_field("id"));
                            }
                            id__ = Some(map_.next_value()?);
                        }
                        GeneratedField::Name => {
                            if name__.is_some() {
                                return Err(serde::de::Error::duplicate_field("name"));
                            }
                            name__ = Some(map_.next_value()?);
                        }
                        GeneratedField::Measures => {
                            if measures__.is_some() {
                                return Err(serde::de::Error::duplicate_field("measures"));
                            }
                            measures__ = map_.next_value()?;
                        }
                    }
                }
                Ok(ReportCategory {
                    id: id__.unwrap_or_default(),
                    name: name__.unwrap_or_default(),
                    measures: measures__,
                })
            }
        }
        deserializer.deserialize_struct("objdiff.report.ReportCategory", FIELDS, GeneratedVisitor)
    }
}
impl serde::Serialize for ReportItem {
    #[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.name.is_empty() {
            len += 1;
        }
        if self.size != 0 {
            len += 1;
        }
        if self.fuzzy_match_percent != 0. {
            len += 1;
        }
        if self.metadata.is_some() {
            len += 1;
        }
        if self.address.is_some() {
            len += 1;
        }
        let mut struct_ser = serializer.serialize_struct("objdiff.report.ReportItem", len)?;
        if !self.name.is_empty() {
            struct_ser.serialize_field("name", &self.name)?;
        }
        if self.size != 0 {
            #[allow(clippy::needless_borrow)]
            #[allow(clippy::needless_borrows_for_generic_args)]
            struct_ser.serialize_field("size", ToString::to_string(&self.size).as_str())?;
        }
        if self.fuzzy_match_percent != 0. {
            struct_ser.serialize_field("fuzzy_match_percent", &self.fuzzy_match_percent)?;
        }
        if let Some(v) = self.metadata.as_ref() {
            struct_ser.serialize_field("metadata", v)?;
        }
        if let Some(v) = self.address.as_ref() {
            #[allow(clippy::needless_borrow)]
            #[allow(clippy::needless_borrows_for_generic_args)]
            struct_ser.serialize_field("address", ToString::to_string(&v).as_str())?;
        }
        struct_ser.end()
    }
}
impl<'de> serde::Deserialize<'de> for ReportItem {
    #[allow(deprecated)]
    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        const FIELDS: &[&str] = &[
            "name",
            "size",
            "fuzzy_match_percent",
            "fuzzyMatchPercent",
            "metadata",
            "address",
        ];

        #[allow(clippy::enum_variant_names)]
        enum GeneratedField {
            Name,
            Size,
            FuzzyMatchPercent,
            Metadata,
            Address,
        }
        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 serde::de::Visitor<'_> 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 {
                            "name" => Ok(GeneratedField::Name),
                            "size" => Ok(GeneratedField::Size),
                            "fuzzyMatchPercent" | "fuzzy_match_percent" => Ok(GeneratedField::FuzzyMatchPercent),
                            "metadata" => Ok(GeneratedField::Metadata),
                            "address" => Ok(GeneratedField::Address),
                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
                        }
                    }
                }
                deserializer.deserialize_identifier(GeneratedVisitor)
            }
        }
        struct GeneratedVisitor;
        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
            type Value = ReportItem;

            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                formatter.write_str("struct objdiff.report.ReportItem")
            }

            fn visit_map<V>(self, mut map_: V) -> std::result::Result<ReportItem, V::Error>
                where
                    V: serde::de::MapAccess<'de>,
            {
                let mut name__ = None;
                let mut size__ = None;
                let mut fuzzy_match_percent__ = None;
                let mut metadata__ = None;
                let mut address__ = None;
                while let Some(k) = map_.next_key()? {
                    match k {
                        GeneratedField::Name => {
                            if name__.is_some() {
                                return Err(serde::de::Error::duplicate_field("name"));
                            }
                            name__ = Some(map_.next_value()?);
                        }
                        GeneratedField::Size => {
                            if size__.is_some() {
                                return Err(serde::de::Error::duplicate_field("size"));
                            }
                            size__ = 
                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
                            ;
                        }
                        GeneratedField::FuzzyMatchPercent => {
                            if fuzzy_match_percent__.is_some() {
                                return Err(serde::de::Error::duplicate_field("fuzzyMatchPercent"));
                            }
                            fuzzy_match_percent__ = 
                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
                            ;
                        }
                        GeneratedField::Metadata => {
                            if metadata__.is_some() {
                                return Err(serde::de::Error::duplicate_field("metadata"));
                            }
                            metadata__ = map_.next_value()?;
                        }
                        GeneratedField::Address => {
                            if address__.is_some() {
                                return Err(serde::de::Error::duplicate_field("address"));
                            }
                            address__ = 
                                map_.next_value::<::std::option::Option<::pbjson::private::NumberDeserialize<_>>>()?.map(|x| x.0)
                            ;
                        }
                    }
                }
                Ok(ReportItem {
                    name: name__.unwrap_or_default(),
                    size: size__.unwrap_or_default(),
                    fuzzy_match_percent: fuzzy_match_percent__.unwrap_or_default(),
                    metadata: metadata__,
                    address: address__,
                })
            }
        }
        deserializer.deserialize_struct("objdiff.report.ReportItem", FIELDS, GeneratedVisitor)
    }
}
impl serde::Serialize for ReportItemMetadata {
    #[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.demangled_name.is_some() {
            len += 1;
        }
        if self.virtual_address.is_some() {
            len += 1;
        }
        let mut struct_ser = serializer.serialize_struct("objdiff.report.ReportItemMetadata", len)?;
        if let Some(v) = self.demangled_name.as_ref() {
            struct_ser.serialize_field("demangled_name", v)?;
        }
        if let Some(v) = self.virtual_address.as_ref() {
            #[allow(clippy::needless_borrow)]
            #[allow(clippy::needless_borrows_for_generic_args)]
            struct_ser.serialize_field("virtual_address", ToString::to_string(&v).as_str())?;
        }
        struct_ser.end()
    }
}
impl<'de> serde::Deserialize<'de> for ReportItemMetadata {
    #[allow(deprecated)]
    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        const FIELDS: &[&str] = &[
            "demangled_name",
            "demangledName",
            "virtual_address",
            "virtualAddress",
        ];

        #[allow(clippy::enum_variant_names)]
        enum GeneratedField {
            DemangledName,
            VirtualAddress,
        }
        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 serde::de::Visitor<'_> 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 {
                            "demangledName" | "demangled_name" => Ok(GeneratedField::DemangledName),
                            "virtualAddress" | "virtual_address" => Ok(GeneratedField::VirtualAddress),
                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
                        }
                    }
                }
                deserializer.deserialize_identifier(GeneratedVisitor)
            }
        }
        struct GeneratedVisitor;
        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
            type Value = ReportItemMetadata;

            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                formatter.write_str("struct objdiff.report.ReportItemMetadata")
            }

            fn visit_map<V>(self, mut map_: V) -> std::result::Result<ReportItemMetadata, V::Error>
                where
                    V: serde::de::MapAccess<'de>,
            {
                let mut demangled_name__ = None;
                let mut virtual_address__ = None;
                while let Some(k) = map_.next_key()? {
                    match k {
                        GeneratedField::DemangledName => {
                            if demangled_name__.is_some() {
                                return Err(serde::de::Error::duplicate_field("demangledName"));
                            }
                            demangled_name__ = map_.next_value()?;
                        }
                        GeneratedField::VirtualAddress => {
                            if virtual_address__.is_some() {
                                return Err(serde::de::Error::duplicate_field("virtualAddress"));
                            }
                            virtual_address__ = 
                                map_.next_value::<::std::option::Option<::pbjson::private::NumberDeserialize<_>>>()?.map(|x| x.0)
                            ;
                        }
                    }
                }
                Ok(ReportItemMetadata {
                    demangled_name: demangled_name__,
                    virtual_address: virtual_address__,
                })
            }
        }
        deserializer.deserialize_struct("objdiff.report.ReportItemMetadata", FIELDS, GeneratedVisitor)
    }
}
impl serde::Serialize for ReportUnit {
    #[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.name.is_empty() {
            len += 1;
        }
        if self.measures.is_some() {
            len += 1;
        }
        if !self.sections.is_empty() {
            len += 1;
        }
        if !self.functions.is_empty() {
            len += 1;
        }
        if self.metadata.is_some() {
            len += 1;
        }
        let mut struct_ser = serializer.serialize_struct("objdiff.report.ReportUnit", len)?;
        if !self.name.is_empty() {
            struct_ser.serialize_field("name", &self.name)?;
        }
        if let Some(v) = self.measures.as_ref() {
            struct_ser.serialize_field("measures", v)?;
        }
        if !self.sections.is_empty() {
            struct_ser.serialize_field("sections", &self.sections)?;
        }
        if !self.functions.is_empty() {
            struct_ser.serialize_field("functions", &self.functions)?;
        }
        if let Some(v) = self.metadata.as_ref() {
            struct_ser.serialize_field("metadata", v)?;
        }
        struct_ser.end()
    }
}
impl<'de> serde::Deserialize<'de> for ReportUnit {
    #[allow(deprecated)]
    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        const FIELDS: &[&str] = &[
            "name",
            "measures",
            "sections",
            "functions",
            "metadata",
        ];

        #[allow(clippy::enum_variant_names)]
        enum GeneratedField {
            Name,
            Measures,
            Sections,
            Functions,
            Metadata,
        }
        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 serde::de::Visitor<'_> 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 {
                            "name" => Ok(GeneratedField::Name),
                            "measures" => Ok(GeneratedField::Measures),
                            "sections" => Ok(GeneratedField::Sections),
                            "functions" => Ok(GeneratedField::Functions),
                            "metadata" => Ok(GeneratedField::Metadata),
                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
                        }
                    }
                }
                deserializer.deserialize_identifier(GeneratedVisitor)
            }
        }
        struct GeneratedVisitor;
        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
            type Value = ReportUnit;

            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                formatter.write_str("struct objdiff.report.ReportUnit")
            }

            fn visit_map<V>(self, mut map_: V) -> std::result::Result<ReportUnit, V::Error>
                where
                    V: serde::de::MapAccess<'de>,
            {
                let mut name__ = None;
                let mut measures__ = None;
                let mut sections__ = None;
                let mut functions__ = None;
                let mut metadata__ = None;
                while let Some(k) = map_.next_key()? {
                    match k {
                        GeneratedField::Name => {
                            if name__.is_some() {
                                return Err(serde::de::Error::duplicate_field("name"));
                            }
                            name__ = Some(map_.next_value()?);
                        }
                        GeneratedField::Measures => {
                            if measures__.is_some() {
                                return Err(serde::de::Error::duplicate_field("measures"));
                            }
                            measures__ = map_.next_value()?;
                        }
                        GeneratedField::Sections => {
                            if sections__.is_some() {
                                return Err(serde::de::Error::duplicate_field("sections"));
                            }
                            sections__ = Some(map_.next_value()?);
                        }
                        GeneratedField::Functions => {
                            if functions__.is_some() {
                                return Err(serde::de::Error::duplicate_field("functions"));
                            }
                            functions__ = Some(map_.next_value()?);
                        }
                        GeneratedField::Metadata => {
                            if metadata__.is_some() {
                                return Err(serde::de::Error::duplicate_field("metadata"));
                            }
                            metadata__ = map_.next_value()?;
                        }
                    }
                }
                Ok(ReportUnit {
                    name: name__.unwrap_or_default(),
                    measures: measures__,
                    sections: sections__.unwrap_or_default(),
                    functions: functions__.unwrap_or_default(),
                    metadata: metadata__,
                })
            }
        }
        deserializer.deserialize_struct("objdiff.report.ReportUnit", FIELDS, GeneratedVisitor)
    }
}
impl serde::Serialize for ReportUnitMetadata {
    #[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.complete.is_some() {
            len += 1;
        }
        if self.module_name.is_some() {
            len += 1;
        }
        if self.module_id.is_some() {
            len += 1;
        }
        if self.source_path.is_some() {
            len += 1;
        }
        if !self.progress_categories.is_empty() {
            len += 1;
        }
        if self.auto_generated.is_some() {
            len += 1;
        }
        let mut struct_ser = serializer.serialize_struct("objdiff.report.ReportUnitMetadata", len)?;
        if let Some(v) = self.complete.as_ref() {
            struct_ser.serialize_field("complete", v)?;
        }
        if let Some(v) = self.module_name.as_ref() {
            struct_ser.serialize_field("module_name", v)?;
        }
        if let Some(v) = self.module_id.as_ref() {
            struct_ser.serialize_field("module_id", v)?;
        }
        if let Some(v) = self.source_path.as_ref() {
            struct_ser.serialize_field("source_path", v)?;
        }
        if !self.progress_categories.is_empty() {
            struct_ser.serialize_field("progress_categories", &self.progress_categories)?;
        }
        if let Some(v) = self.auto_generated.as_ref() {
            struct_ser.serialize_field("auto_generated", v)?;
        }
        struct_ser.end()
    }
}
impl<'de> serde::Deserialize<'de> for ReportUnitMetadata {
    #[allow(deprecated)]
    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        const FIELDS: &[&str] = &[
            "complete",
            "module_name",
            "moduleName",
            "module_id",
            "moduleId",
            "source_path",
            "sourcePath",
            "progress_categories",
            "progressCategories",
            "auto_generated",
            "autoGenerated",
        ];

        #[allow(clippy::enum_variant_names)]
        enum GeneratedField {
            Complete,
            ModuleName,
            ModuleId,
            SourcePath,
            ProgressCategories,
            AutoGenerated,
        }
        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 serde::de::Visitor<'_> 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 {
                            "complete" => Ok(GeneratedField::Complete),
                            "moduleName" | "module_name" => Ok(GeneratedField::ModuleName),
                            "moduleId" | "module_id" => Ok(GeneratedField::ModuleId),
                            "sourcePath" | "source_path" => Ok(GeneratedField::SourcePath),
                            "progressCategories" | "progress_categories" => Ok(GeneratedField::ProgressCategories),
                            "autoGenerated" | "auto_generated" => Ok(GeneratedField::AutoGenerated),
                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
                        }
                    }
                }
                deserializer.deserialize_identifier(GeneratedVisitor)
            }
        }
        struct GeneratedVisitor;
        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
            type Value = ReportUnitMetadata;

            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                formatter.write_str("struct objdiff.report.ReportUnitMetadata")
            }

            fn visit_map<V>(self, mut map_: V) -> std::result::Result<ReportUnitMetadata, V::Error>
                where
                    V: serde::de::MapAccess<'de>,
            {
                let mut complete__ = None;
                let mut module_name__ = None;
                let mut module_id__ = None;
                let mut source_path__ = None;
                let mut progress_categories__ = None;
                let mut auto_generated__ = None;
                while let Some(k) = map_.next_key()? {
                    match k {
                        GeneratedField::Complete => {
                            if complete__.is_some() {
                                return Err(serde::de::Error::duplicate_field("complete"));
                            }
                            complete__ = map_.next_value()?;
                        }
                        GeneratedField::ModuleName => {
                            if module_name__.is_some() {
                                return Err(serde::de::Error::duplicate_field("moduleName"));
                            }
                            module_name__ = map_.next_value()?;
                        }
                        GeneratedField::ModuleId => {
                            if module_id__.is_some() {
                                return Err(serde::de::Error::duplicate_field("moduleId"));
                            }
                            module_id__ = 
                                map_.next_value::<::std::option::Option<::pbjson::private::NumberDeserialize<_>>>()?.map(|x| x.0)
                            ;
                        }
                        GeneratedField::SourcePath => {
                            if source_path__.is_some() {
                                return Err(serde::de::Error::duplicate_field("sourcePath"));
                            }
                            source_path__ = map_.next_value()?;
                        }
                        GeneratedField::ProgressCategories => {
                            if progress_categories__.is_some() {
                                return Err(serde::de::Error::duplicate_field("progressCategories"));
                            }
                            progress_categories__ = Some(map_.next_value()?);
                        }
                        GeneratedField::AutoGenerated => {
                            if auto_generated__.is_some() {
                                return Err(serde::de::Error::duplicate_field("autoGenerated"));
                            }
                            auto_generated__ = map_.next_value()?;
                        }
                    }
                }
                Ok(ReportUnitMetadata {
                    complete: complete__,
                    module_name: module_name__,
                    module_id: module_id__,
                    source_path: source_path__,
                    progress_categories: progress_categories__.unwrap_or_default(),
                    auto_generated: auto_generated__,
                })
            }
        }
        deserializer.deserialize_struct("objdiff.report.ReportUnitMetadata", FIELDS, GeneratedVisitor)
    }
}
