impl serde::Serialize for DiffDataRelocation {
    #[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.relocation.is_some() {
            len += 1;
        }
        if self.kind != 0 {
            len += 1;
        }
        if self.start != 0 {
            len += 1;
        }
        if self.end != 0 {
            len += 1;
        }
        let mut struct_ser = serializer.serialize_struct("objdiff.diff.DiffDataRelocation", len)?;
        if let Some(v) = self.relocation.as_ref() {
            struct_ser.serialize_field("relocation", v)?;
        }
        if self.kind != 0 {
            let v = DiffKind::try_from(self.kind)
                .map_err(|_| serde::ser::Error::custom(format!("Invalid variant {}", self.kind)))?;
            struct_ser.serialize_field("kind", &v)?;
        }
        if self.start != 0 {
            #[allow(clippy::needless_borrow)]
            #[allow(clippy::needless_borrows_for_generic_args)]
            struct_ser.serialize_field("start", ToString::to_string(&self.start).as_str())?;
        }
        if self.end != 0 {
            #[allow(clippy::needless_borrow)]
            #[allow(clippy::needless_borrows_for_generic_args)]
            struct_ser.serialize_field("end", ToString::to_string(&self.end).as_str())?;
        }
        struct_ser.end()
    }
}
impl<'de> serde::Deserialize<'de> for DiffDataRelocation {
    #[allow(deprecated)]
    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        const FIELDS: &[&str] = &[
            "relocation",
            "kind",
            "start",
            "end",
        ];

        #[allow(clippy::enum_variant_names)]
        enum GeneratedField {
            Relocation,
            Kind,
            Start,
            End,
        }
        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 {
                            "relocation" => Ok(GeneratedField::Relocation),
                            "kind" => Ok(GeneratedField::Kind),
                            "start" => Ok(GeneratedField::Start),
                            "end" => Ok(GeneratedField::End),
                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
                        }
                    }
                }
                deserializer.deserialize_identifier(GeneratedVisitor)
            }
        }
        struct GeneratedVisitor;
        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
            type Value = DiffDataRelocation;

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

            fn visit_map<V>(self, mut map_: V) -> std::result::Result<DiffDataRelocation, V::Error>
                where
                    V: serde::de::MapAccess<'de>,
            {
                let mut relocation__ = None;
                let mut kind__ = None;
                let mut start__ = None;
                let mut end__ = None;
                while let Some(k) = map_.next_key()? {
                    match k {
                        GeneratedField::Relocation => {
                            if relocation__.is_some() {
                                return Err(serde::de::Error::duplicate_field("relocation"));
                            }
                            relocation__ = map_.next_value()?;
                        }
                        GeneratedField::Kind => {
                            if kind__.is_some() {
                                return Err(serde::de::Error::duplicate_field("kind"));
                            }
                            kind__ = Some(map_.next_value::<DiffKind>()? as i32);
                        }
                        GeneratedField::Start => {
                            if start__.is_some() {
                                return Err(serde::de::Error::duplicate_field("start"));
                            }
                            start__ = 
                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
                            ;
                        }
                        GeneratedField::End => {
                            if end__.is_some() {
                                return Err(serde::de::Error::duplicate_field("end"));
                            }
                            end__ = 
                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
                            ;
                        }
                    }
                }
                Ok(DiffDataRelocation {
                    relocation: relocation__,
                    kind: kind__.unwrap_or_default(),
                    start: start__.unwrap_or_default(),
                    end: end__.unwrap_or_default(),
                })
            }
        }
        deserializer.deserialize_struct("objdiff.diff.DiffDataRelocation", FIELDS, GeneratedVisitor)
    }
}
impl serde::Serialize for DiffDataSegment {
    #[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.kind != 0 {
            len += 1;
        }
        if !self.data.is_empty() {
            len += 1;
        }
        if self.size != 0 {
            len += 1;
        }
        let mut struct_ser = serializer.serialize_struct("objdiff.diff.DiffDataSegment", len)?;
        if self.kind != 0 {
            let v = DiffKind::try_from(self.kind)
                .map_err(|_| serde::ser::Error::custom(format!("Invalid variant {}", self.kind)))?;
            struct_ser.serialize_field("kind", &v)?;
        }
        if !self.data.is_empty() {
            #[allow(clippy::needless_borrow)]
            #[allow(clippy::needless_borrows_for_generic_args)]
            struct_ser.serialize_field("data", pbjson::private::base64::encode(&self.data).as_str())?;
        }
        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 DiffDataSegment {
    #[allow(deprecated)]
    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        const FIELDS: &[&str] = &[
            "kind",
            "data",
            "size",
        ];

        #[allow(clippy::enum_variant_names)]
        enum GeneratedField {
            Kind,
            Data,
            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 {
                            "kind" => Ok(GeneratedField::Kind),
                            "data" => Ok(GeneratedField::Data),
                            "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 = DiffDataSegment;

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

            fn visit_map<V>(self, mut map_: V) -> std::result::Result<DiffDataSegment, V::Error>
                where
                    V: serde::de::MapAccess<'de>,
            {
                let mut kind__ = None;
                let mut data__ = None;
                let mut size__ = None;
                while let Some(k) = map_.next_key()? {
                    match k {
                        GeneratedField::Kind => {
                            if kind__.is_some() {
                                return Err(serde::de::Error::duplicate_field("kind"));
                            }
                            kind__ = Some(map_.next_value::<DiffKind>()? as i32);
                        }
                        GeneratedField::Data => {
                            if data__.is_some() {
                                return Err(serde::de::Error::duplicate_field("data"));
                            }
                            data__ = 
                                Some(map_.next_value::<::pbjson::private::BytesDeserialize<_>>()?.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(DiffDataSegment {
                    kind: kind__.unwrap_or_default(),
                    data: data__.unwrap_or_default(),
                    size: size__.unwrap_or_default(),
                })
            }
        }
        deserializer.deserialize_struct("objdiff.diff.DiffDataSegment", FIELDS, GeneratedVisitor)
    }
}
impl serde::Serialize for DiffInstruction {
    #[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.address != 0 {
            len += 1;
        }
        if self.size != 0 {
            len += 1;
        }
        if !self.formatted.is_empty() {
            len += 1;
        }
        if !self.parts.is_empty() {
            len += 1;
        }
        if self.relocation.is_some() {
            len += 1;
        }
        if self.branch_dest.is_some() {
            len += 1;
        }
        if self.line_number.is_some() {
            len += 1;
        }
        let mut struct_ser = serializer.serialize_struct("objdiff.diff.DiffInstruction", len)?;
        if self.address != 0 {
            #[allow(clippy::needless_borrow)]
            #[allow(clippy::needless_borrows_for_generic_args)]
            struct_ser.serialize_field("address", ToString::to_string(&self.address).as_str())?;
        }
        if self.size != 0 {
            struct_ser.serialize_field("size", &self.size)?;
        }
        if !self.formatted.is_empty() {
            struct_ser.serialize_field("formatted", &self.formatted)?;
        }
        if !self.parts.is_empty() {
            struct_ser.serialize_field("parts", &self.parts)?;
        }
        if let Some(v) = self.relocation.as_ref() {
            struct_ser.serialize_field("relocation", v)?;
        }
        if let Some(v) = self.branch_dest.as_ref() {
            #[allow(clippy::needless_borrow)]
            #[allow(clippy::needless_borrows_for_generic_args)]
            struct_ser.serialize_field("branch_dest", ToString::to_string(&v).as_str())?;
        }
        if let Some(v) = self.line_number.as_ref() {
            struct_ser.serialize_field("line_number", v)?;
        }
        struct_ser.end()
    }
}
impl<'de> serde::Deserialize<'de> for DiffInstruction {
    #[allow(deprecated)]
    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        const FIELDS: &[&str] = &[
            "address",
            "size",
            "formatted",
            "parts",
            "relocation",
            "branch_dest",
            "branchDest",
            "line_number",
            "lineNumber",
        ];

        #[allow(clippy::enum_variant_names)]
        enum GeneratedField {
            Address,
            Size,
            Formatted,
            Parts,
            Relocation,
            BranchDest,
            LineNumber,
        }
        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 {
                            "address" => Ok(GeneratedField::Address),
                            "size" => Ok(GeneratedField::Size),
                            "formatted" => Ok(GeneratedField::Formatted),
                            "parts" => Ok(GeneratedField::Parts),
                            "relocation" => Ok(GeneratedField::Relocation),
                            "branchDest" | "branch_dest" => Ok(GeneratedField::BranchDest),
                            "lineNumber" | "line_number" => Ok(GeneratedField::LineNumber),
                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
                        }
                    }
                }
                deserializer.deserialize_identifier(GeneratedVisitor)
            }
        }
        struct GeneratedVisitor;
        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
            type Value = DiffInstruction;

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

            fn visit_map<V>(self, mut map_: V) -> std::result::Result<DiffInstruction, V::Error>
                where
                    V: serde::de::MapAccess<'de>,
            {
                let mut address__ = None;
                let mut size__ = None;
                let mut formatted__ = None;
                let mut parts__ = None;
                let mut relocation__ = None;
                let mut branch_dest__ = None;
                let mut line_number__ = None;
                while let Some(k) = map_.next_key()? {
                    match k {
                        GeneratedField::Address => {
                            if address__.is_some() {
                                return Err(serde::de::Error::duplicate_field("address"));
                            }
                            address__ = 
                                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)
                            ;
                        }
                        GeneratedField::Formatted => {
                            if formatted__.is_some() {
                                return Err(serde::de::Error::duplicate_field("formatted"));
                            }
                            formatted__ = Some(map_.next_value()?);
                        }
                        GeneratedField::Parts => {
                            if parts__.is_some() {
                                return Err(serde::de::Error::duplicate_field("parts"));
                            }
                            parts__ = Some(map_.next_value()?);
                        }
                        GeneratedField::Relocation => {
                            if relocation__.is_some() {
                                return Err(serde::de::Error::duplicate_field("relocation"));
                            }
                            relocation__ = map_.next_value()?;
                        }
                        GeneratedField::BranchDest => {
                            if branch_dest__.is_some() {
                                return Err(serde::de::Error::duplicate_field("branchDest"));
                            }
                            branch_dest__ = 
                                map_.next_value::<::std::option::Option<::pbjson::private::NumberDeserialize<_>>>()?.map(|x| x.0)
                            ;
                        }
                        GeneratedField::LineNumber => {
                            if line_number__.is_some() {
                                return Err(serde::de::Error::duplicate_field("lineNumber"));
                            }
                            line_number__ = 
                                map_.next_value::<::std::option::Option<::pbjson::private::NumberDeserialize<_>>>()?.map(|x| x.0)
                            ;
                        }
                    }
                }
                Ok(DiffInstruction {
                    address: address__.unwrap_or_default(),
                    size: size__.unwrap_or_default(),
                    formatted: formatted__.unwrap_or_default(),
                    parts: parts__.unwrap_or_default(),
                    relocation: relocation__,
                    branch_dest: branch_dest__,
                    line_number: line_number__,
                })
            }
        }
        deserializer.deserialize_struct("objdiff.diff.DiffInstruction", FIELDS, GeneratedVisitor)
    }
}
impl serde::Serialize for DiffInstructionArg {
    #[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.arg.is_some() {
            len += 1;
        }
        let mut struct_ser = serializer.serialize_struct("objdiff.diff.DiffInstructionArg", len)?;
        if let Some(v) = self.arg.as_ref() {
            match v {
                diff_instruction_arg::Arg::Signed(v) => {
                    #[allow(clippy::needless_borrow)]
                    #[allow(clippy::needless_borrows_for_generic_args)]
                    struct_ser.serialize_field("signed", ToString::to_string(&v).as_str())?;
                }
                diff_instruction_arg::Arg::Unsigned(v) => {
                    #[allow(clippy::needless_borrow)]
                    #[allow(clippy::needless_borrows_for_generic_args)]
                    struct_ser.serialize_field("unsigned", ToString::to_string(&v).as_str())?;
                }
                diff_instruction_arg::Arg::Opaque(v) => {
                    struct_ser.serialize_field("opaque", v)?;
                }
                diff_instruction_arg::Arg::Reloc(v) => {
                    struct_ser.serialize_field("reloc", v)?;
                }
                diff_instruction_arg::Arg::BranchDest(v) => {
                    #[allow(clippy::needless_borrow)]
                    #[allow(clippy::needless_borrows_for_generic_args)]
                    struct_ser.serialize_field("branch_dest", ToString::to_string(&v).as_str())?;
                }
            }
        }
        struct_ser.end()
    }
}
impl<'de> serde::Deserialize<'de> for DiffInstructionArg {
    #[allow(deprecated)]
    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        const FIELDS: &[&str] = &[
            "signed",
            "unsigned",
            "opaque",
            "reloc",
            "branch_dest",
            "branchDest",
        ];

        #[allow(clippy::enum_variant_names)]
        enum GeneratedField {
            Signed,
            Unsigned,
            Opaque,
            Reloc,
            BranchDest,
        }
        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 {
                            "signed" => Ok(GeneratedField::Signed),
                            "unsigned" => Ok(GeneratedField::Unsigned),
                            "opaque" => Ok(GeneratedField::Opaque),
                            "reloc" => Ok(GeneratedField::Reloc),
                            "branchDest" | "branch_dest" => Ok(GeneratedField::BranchDest),
                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
                        }
                    }
                }
                deserializer.deserialize_identifier(GeneratedVisitor)
            }
        }
        struct GeneratedVisitor;
        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
            type Value = DiffInstructionArg;

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

            fn visit_map<V>(self, mut map_: V) -> std::result::Result<DiffInstructionArg, V::Error>
                where
                    V: serde::de::MapAccess<'de>,
            {
                let mut arg__ = None;
                while let Some(k) = map_.next_key()? {
                    match k {
                        GeneratedField::Signed => {
                            if arg__.is_some() {
                                return Err(serde::de::Error::duplicate_field("signed"));
                            }
                            arg__ = map_.next_value::<::std::option::Option<::pbjson::private::NumberDeserialize<_>>>()?.map(|x| diff_instruction_arg::Arg::Signed(x.0));
                        }
                        GeneratedField::Unsigned => {
                            if arg__.is_some() {
                                return Err(serde::de::Error::duplicate_field("unsigned"));
                            }
                            arg__ = map_.next_value::<::std::option::Option<::pbjson::private::NumberDeserialize<_>>>()?.map(|x| diff_instruction_arg::Arg::Unsigned(x.0));
                        }
                        GeneratedField::Opaque => {
                            if arg__.is_some() {
                                return Err(serde::de::Error::duplicate_field("opaque"));
                            }
                            arg__ = map_.next_value::<::std::option::Option<_>>()?.map(diff_instruction_arg::Arg::Opaque);
                        }
                        GeneratedField::Reloc => {
                            if arg__.is_some() {
                                return Err(serde::de::Error::duplicate_field("reloc"));
                            }
                            arg__ = map_.next_value::<::std::option::Option<_>>()?.map(diff_instruction_arg::Arg::Reloc);
                        }
                        GeneratedField::BranchDest => {
                            if arg__.is_some() {
                                return Err(serde::de::Error::duplicate_field("branchDest"));
                            }
                            arg__ = map_.next_value::<::std::option::Option<::pbjson::private::NumberDeserialize<_>>>()?.map(|x| diff_instruction_arg::Arg::BranchDest(x.0));
                        }
                    }
                }
                Ok(DiffInstructionArg {
                    arg: arg__,
                })
            }
        }
        deserializer.deserialize_struct("objdiff.diff.DiffInstructionArg", FIELDS, GeneratedVisitor)
    }
}
impl serde::Serialize for DiffInstructionArgDiff {
    #[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.diff_index.is_some() {
            len += 1;
        }
        let mut struct_ser = serializer.serialize_struct("objdiff.diff.DiffInstructionArgDiff", len)?;
        if let Some(v) = self.diff_index.as_ref() {
            struct_ser.serialize_field("diff_index", v)?;
        }
        struct_ser.end()
    }
}
impl<'de> serde::Deserialize<'de> for DiffInstructionArgDiff {
    #[allow(deprecated)]
    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        const FIELDS: &[&str] = &[
            "diff_index",
            "diffIndex",
        ];

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

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

            fn visit_map<V>(self, mut map_: V) -> std::result::Result<DiffInstructionArgDiff, V::Error>
                where
                    V: serde::de::MapAccess<'de>,
            {
                let mut diff_index__ = None;
                while let Some(k) = map_.next_key()? {
                    match k {
                        GeneratedField::DiffIndex => {
                            if diff_index__.is_some() {
                                return Err(serde::de::Error::duplicate_field("diffIndex"));
                            }
                            diff_index__ = 
                                map_.next_value::<::std::option::Option<::pbjson::private::NumberDeserialize<_>>>()?.map(|x| x.0)
                            ;
                        }
                    }
                }
                Ok(DiffInstructionArgDiff {
                    diff_index: diff_index__,
                })
            }
        }
        deserializer.deserialize_struct("objdiff.diff.DiffInstructionArgDiff", FIELDS, GeneratedVisitor)
    }
}
impl serde::Serialize for DiffInstructionPart {
    #[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.part.is_some() {
            len += 1;
        }
        let mut struct_ser = serializer.serialize_struct("objdiff.diff.DiffInstructionPart", len)?;
        if let Some(v) = self.part.as_ref() {
            match v {
                diff_instruction_part::Part::Basic(v) => {
                    struct_ser.serialize_field("basic", v)?;
                }
                diff_instruction_part::Part::Opcode(v) => {
                    struct_ser.serialize_field("opcode", v)?;
                }
                diff_instruction_part::Part::Arg(v) => {
                    struct_ser.serialize_field("arg", v)?;
                }
                diff_instruction_part::Part::Separator(v) => {
                    struct_ser.serialize_field("separator", v)?;
                }
            }
        }
        struct_ser.end()
    }
}
impl<'de> serde::Deserialize<'de> for DiffInstructionPart {
    #[allow(deprecated)]
    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        const FIELDS: &[&str] = &[
            "basic",
            "opcode",
            "arg",
            "separator",
        ];

        #[allow(clippy::enum_variant_names)]
        enum GeneratedField {
            Basic,
            Opcode,
            Arg,
            Separator,
        }
        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 {
                            "basic" => Ok(GeneratedField::Basic),
                            "opcode" => Ok(GeneratedField::Opcode),
                            "arg" => Ok(GeneratedField::Arg),
                            "separator" => Ok(GeneratedField::Separator),
                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
                        }
                    }
                }
                deserializer.deserialize_identifier(GeneratedVisitor)
            }
        }
        struct GeneratedVisitor;
        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
            type Value = DiffInstructionPart;

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

            fn visit_map<V>(self, mut map_: V) -> std::result::Result<DiffInstructionPart, V::Error>
                where
                    V: serde::de::MapAccess<'de>,
            {
                let mut part__ = None;
                while let Some(k) = map_.next_key()? {
                    match k {
                        GeneratedField::Basic => {
                            if part__.is_some() {
                                return Err(serde::de::Error::duplicate_field("basic"));
                            }
                            part__ = map_.next_value::<::std::option::Option<_>>()?.map(diff_instruction_part::Part::Basic);
                        }
                        GeneratedField::Opcode => {
                            if part__.is_some() {
                                return Err(serde::de::Error::duplicate_field("opcode"));
                            }
                            part__ = map_.next_value::<::std::option::Option<_>>()?.map(diff_instruction_part::Part::Opcode)
;
                        }
                        GeneratedField::Arg => {
                            if part__.is_some() {
                                return Err(serde::de::Error::duplicate_field("arg"));
                            }
                            part__ = map_.next_value::<::std::option::Option<_>>()?.map(diff_instruction_part::Part::Arg)
;
                        }
                        GeneratedField::Separator => {
                            if part__.is_some() {
                                return Err(serde::de::Error::duplicate_field("separator"));
                            }
                            part__ = map_.next_value::<::std::option::Option<_>>()?.map(diff_instruction_part::Part::Separator);
                        }
                    }
                }
                Ok(DiffInstructionPart {
                    part: part__,
                })
            }
        }
        deserializer.deserialize_struct("objdiff.diff.DiffInstructionPart", FIELDS, GeneratedVisitor)
    }
}
impl serde::Serialize for DiffInstructionRow {
    #[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.diff_kind != 0 {
            len += 1;
        }
        if self.instruction.is_some() {
            len += 1;
        }
        if !self.arg_diff.is_empty() {
            len += 1;
        }
        let mut struct_ser = serializer.serialize_struct("objdiff.diff.DiffInstructionRow", len)?;
        if self.diff_kind != 0 {
            let v = DiffKind::try_from(self.diff_kind)
                .map_err(|_| serde::ser::Error::custom(format!("Invalid variant {}", self.diff_kind)))?;
            struct_ser.serialize_field("diff_kind", &v)?;
        }
        if let Some(v) = self.instruction.as_ref() {
            struct_ser.serialize_field("instruction", v)?;
        }
        if !self.arg_diff.is_empty() {
            struct_ser.serialize_field("arg_diff", &self.arg_diff)?;
        }
        struct_ser.end()
    }
}
impl<'de> serde::Deserialize<'de> for DiffInstructionRow {
    #[allow(deprecated)]
    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        const FIELDS: &[&str] = &[
            "diff_kind",
            "diffKind",
            "instruction",
            "arg_diff",
            "argDiff",
        ];

        #[allow(clippy::enum_variant_names)]
        enum GeneratedField {
            DiffKind,
            Instruction,
            ArgDiff,
        }
        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 {
                            "diffKind" | "diff_kind" => Ok(GeneratedField::DiffKind),
                            "instruction" => Ok(GeneratedField::Instruction),
                            "argDiff" | "arg_diff" => Ok(GeneratedField::ArgDiff),
                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
                        }
                    }
                }
                deserializer.deserialize_identifier(GeneratedVisitor)
            }
        }
        struct GeneratedVisitor;
        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
            type Value = DiffInstructionRow;

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

            fn visit_map<V>(self, mut map_: V) -> std::result::Result<DiffInstructionRow, V::Error>
                where
                    V: serde::de::MapAccess<'de>,
            {
                let mut diff_kind__ = None;
                let mut instruction__ = None;
                let mut arg_diff__ = None;
                while let Some(k) = map_.next_key()? {
                    match k {
                        GeneratedField::DiffKind => {
                            if diff_kind__.is_some() {
                                return Err(serde::de::Error::duplicate_field("diffKind"));
                            }
                            diff_kind__ = Some(map_.next_value::<DiffKind>()? as i32);
                        }
                        GeneratedField::Instruction => {
                            if instruction__.is_some() {
                                return Err(serde::de::Error::duplicate_field("instruction"));
                            }
                            instruction__ = map_.next_value()?;
                        }
                        GeneratedField::ArgDiff => {
                            if arg_diff__.is_some() {
                                return Err(serde::de::Error::duplicate_field("argDiff"));
                            }
                            arg_diff__ = Some(map_.next_value()?);
                        }
                    }
                }
                Ok(DiffInstructionRow {
                    diff_kind: diff_kind__.unwrap_or_default(),
                    instruction: instruction__,
                    arg_diff: arg_diff__.unwrap_or_default(),
                })
            }
        }
        deserializer.deserialize_struct("objdiff.diff.DiffInstructionRow", FIELDS, GeneratedVisitor)
    }
}
impl serde::Serialize for DiffKind {
    #[allow(deprecated)]
    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        let variant = match self {
            Self::DiffNone => "DIFF_NONE",
            Self::DiffReplace => "DIFF_REPLACE",
            Self::DiffDelete => "DIFF_DELETE",
            Self::DiffInsert => "DIFF_INSERT",
            Self::DiffOpMismatch => "DIFF_OP_MISMATCH",
            Self::DiffArgMismatch => "DIFF_ARG_MISMATCH",
        };
        serializer.serialize_str(variant)
    }
}
impl<'de> serde::Deserialize<'de> for DiffKind {
    #[allow(deprecated)]
    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        const FIELDS: &[&str] = &[
            "DIFF_NONE",
            "DIFF_REPLACE",
            "DIFF_DELETE",
            "DIFF_INSERT",
            "DIFF_OP_MISMATCH",
            "DIFF_ARG_MISMATCH",
        ];

        struct GeneratedVisitor;

        impl serde::de::Visitor<'_> for GeneratedVisitor {
            type Value = DiffKind;

            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                write!(formatter, "expected one of: {:?}", &FIELDS)
            }

            fn visit_i64<E>(self, v: i64) -> std::result::Result<Self::Value, E>
            where
                E: serde::de::Error,
            {
                i32::try_from(v)
                    .ok()
                    .and_then(|x| x.try_into().ok())
                    .ok_or_else(|| {
                        serde::de::Error::invalid_value(serde::de::Unexpected::Signed(v), &self)
                    })
            }

            fn visit_u64<E>(self, v: u64) -> std::result::Result<Self::Value, E>
            where
                E: serde::de::Error,
            {
                i32::try_from(v)
                    .ok()
                    .and_then(|x| x.try_into().ok())
                    .ok_or_else(|| {
                        serde::de::Error::invalid_value(serde::de::Unexpected::Unsigned(v), &self)
                    })
            }

            fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
            where
                E: serde::de::Error,
            {
                match value {
                    "DIFF_NONE" => Ok(DiffKind::DiffNone),
                    "DIFF_REPLACE" => Ok(DiffKind::DiffReplace),
                    "DIFF_DELETE" => Ok(DiffKind::DiffDelete),
                    "DIFF_INSERT" => Ok(DiffKind::DiffInsert),
                    "DIFF_OP_MISMATCH" => Ok(DiffKind::DiffOpMismatch),
                    "DIFF_ARG_MISMATCH" => Ok(DiffKind::DiffArgMismatch),
                    _ => Err(serde::de::Error::unknown_variant(value, FIELDS)),
                }
            }
        }
        deserializer.deserialize_any(GeneratedVisitor)
    }
}
impl serde::Serialize for DiffObject {
    #[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.sections.is_empty() {
            len += 1;
        }
        if !self.symbols.is_empty() {
            len += 1;
        }
        let mut struct_ser = serializer.serialize_struct("objdiff.diff.DiffObject", len)?;
        if !self.sections.is_empty() {
            struct_ser.serialize_field("sections", &self.sections)?;
        }
        if !self.symbols.is_empty() {
            struct_ser.serialize_field("symbols", &self.symbols)?;
        }
        struct_ser.end()
    }
}
impl<'de> serde::Deserialize<'de> for DiffObject {
    #[allow(deprecated)]
    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        const FIELDS: &[&str] = &[
            "sections",
            "symbols",
        ];

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

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

            fn visit_map<V>(self, mut map_: V) -> std::result::Result<DiffObject, V::Error>
                where
                    V: serde::de::MapAccess<'de>,
            {
                let mut sections__ = None;
                let mut symbols__ = None;
                while let Some(k) = map_.next_key()? {
                    match k {
                        GeneratedField::Sections => {
                            if sections__.is_some() {
                                return Err(serde::de::Error::duplicate_field("sections"));
                            }
                            sections__ = Some(map_.next_value()?);
                        }
                        GeneratedField::Symbols => {
                            if symbols__.is_some() {
                                return Err(serde::de::Error::duplicate_field("symbols"));
                            }
                            symbols__ = Some(map_.next_value()?);
                        }
                    }
                }
                Ok(DiffObject {
                    sections: sections__.unwrap_or_default(),
                    symbols: symbols__.unwrap_or_default(),
                })
            }
        }
        deserializer.deserialize_struct("objdiff.diff.DiffObject", FIELDS, GeneratedVisitor)
    }
}
impl serde::Serialize for DiffOpcode {
    #[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.mnemonic.is_empty() {
            len += 1;
        }
        if self.opcode != 0 {
            len += 1;
        }
        let mut struct_ser = serializer.serialize_struct("objdiff.diff.DiffOpcode", len)?;
        if !self.mnemonic.is_empty() {
            struct_ser.serialize_field("mnemonic", &self.mnemonic)?;
        }
        if self.opcode != 0 {
            struct_ser.serialize_field("opcode", &self.opcode)?;
        }
        struct_ser.end()
    }
}
impl<'de> serde::Deserialize<'de> for DiffOpcode {
    #[allow(deprecated)]
    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        const FIELDS: &[&str] = &[
            "mnemonic",
            "opcode",
        ];

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

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

            fn visit_map<V>(self, mut map_: V) -> std::result::Result<DiffOpcode, V::Error>
                where
                    V: serde::de::MapAccess<'de>,
            {
                let mut mnemonic__ = None;
                let mut opcode__ = None;
                while let Some(k) = map_.next_key()? {
                    match k {
                        GeneratedField::Mnemonic => {
                            if mnemonic__.is_some() {
                                return Err(serde::de::Error::duplicate_field("mnemonic"));
                            }
                            mnemonic__ = Some(map_.next_value()?);
                        }
                        GeneratedField::Opcode => {
                            if opcode__.is_some() {
                                return Err(serde::de::Error::duplicate_field("opcode"));
                            }
                            opcode__ = 
                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
                            ;
                        }
                    }
                }
                Ok(DiffOpcode {
                    mnemonic: mnemonic__.unwrap_or_default(),
                    opcode: opcode__.unwrap_or_default(),
                })
            }
        }
        deserializer.deserialize_struct("objdiff.diff.DiffOpcode", FIELDS, GeneratedVisitor)
    }
}
impl serde::Serialize for DiffRelocation {
    #[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.r#type != 0 {
            len += 1;
        }
        if !self.type_name.is_empty() {
            len += 1;
        }
        if self.target_symbol != 0 {
            len += 1;
        }
        if self.addend != 0 {
            len += 1;
        }
        let mut struct_ser = serializer.serialize_struct("objdiff.diff.DiffRelocation", len)?;
        if self.r#type != 0 {
            struct_ser.serialize_field("type", &self.r#type)?;
        }
        if !self.type_name.is_empty() {
            struct_ser.serialize_field("type_name", &self.type_name)?;
        }
        if self.target_symbol != 0 {
            struct_ser.serialize_field("target_symbol", &self.target_symbol)?;
        }
        if self.addend != 0 {
            #[allow(clippy::needless_borrow)]
            #[allow(clippy::needless_borrows_for_generic_args)]
            struct_ser.serialize_field("addend", ToString::to_string(&self.addend).as_str())?;
        }
        struct_ser.end()
    }
}
impl<'de> serde::Deserialize<'de> for DiffRelocation {
    #[allow(deprecated)]
    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        const FIELDS: &[&str] = &[
            "type",
            "type_name",
            "typeName",
            "target_symbol",
            "targetSymbol",
            "addend",
        ];

        #[allow(clippy::enum_variant_names)]
        enum GeneratedField {
            Type,
            TypeName,
            TargetSymbol,
            Addend,
        }
        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 {
                            "type" => Ok(GeneratedField::Type),
                            "typeName" | "type_name" => Ok(GeneratedField::TypeName),
                            "targetSymbol" | "target_symbol" => Ok(GeneratedField::TargetSymbol),
                            "addend" => Ok(GeneratedField::Addend),
                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
                        }
                    }
                }
                deserializer.deserialize_identifier(GeneratedVisitor)
            }
        }
        struct GeneratedVisitor;
        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
            type Value = DiffRelocation;

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

            fn visit_map<V>(self, mut map_: V) -> std::result::Result<DiffRelocation, V::Error>
                where
                    V: serde::de::MapAccess<'de>,
            {
                let mut r#type__ = None;
                let mut type_name__ = None;
                let mut target_symbol__ = None;
                let mut addend__ = None;
                while let Some(k) = map_.next_key()? {
                    match k {
                        GeneratedField::Type => {
                            if r#type__.is_some() {
                                return Err(serde::de::Error::duplicate_field("type"));
                            }
                            r#type__ = 
                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
                            ;
                        }
                        GeneratedField::TypeName => {
                            if type_name__.is_some() {
                                return Err(serde::de::Error::duplicate_field("typeName"));
                            }
                            type_name__ = Some(map_.next_value()?);
                        }
                        GeneratedField::TargetSymbol => {
                            if target_symbol__.is_some() {
                                return Err(serde::de::Error::duplicate_field("targetSymbol"));
                            }
                            target_symbol__ = 
                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
                            ;
                        }
                        GeneratedField::Addend => {
                            if addend__.is_some() {
                                return Err(serde::de::Error::duplicate_field("addend"));
                            }
                            addend__ = 
                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
                            ;
                        }
                    }
                }
                Ok(DiffRelocation {
                    r#type: r#type__.unwrap_or_default(),
                    type_name: type_name__.unwrap_or_default(),
                    target_symbol: target_symbol__.unwrap_or_default(),
                    addend: addend__.unwrap_or_default(),
                })
            }
        }
        deserializer.deserialize_struct("objdiff.diff.DiffRelocation", FIELDS, GeneratedVisitor)
    }
}
impl serde::Serialize for DiffResult {
    #[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.left.is_some() {
            len += 1;
        }
        if self.right.is_some() {
            len += 1;
        }
        let mut struct_ser = serializer.serialize_struct("objdiff.diff.DiffResult", len)?;
        if let Some(v) = self.left.as_ref() {
            struct_ser.serialize_field("left", v)?;
        }
        if let Some(v) = self.right.as_ref() {
            struct_ser.serialize_field("right", v)?;
        }
        struct_ser.end()
    }
}
impl<'de> serde::Deserialize<'de> for DiffResult {
    #[allow(deprecated)]
    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        const FIELDS: &[&str] = &[
            "left",
            "right",
        ];

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

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

            fn visit_map<V>(self, mut map_: V) -> std::result::Result<DiffResult, V::Error>
                where
                    V: serde::de::MapAccess<'de>,
            {
                let mut left__ = None;
                let mut right__ = None;
                while let Some(k) = map_.next_key()? {
                    match k {
                        GeneratedField::Left => {
                            if left__.is_some() {
                                return Err(serde::de::Error::duplicate_field("left"));
                            }
                            left__ = map_.next_value()?;
                        }
                        GeneratedField::Right => {
                            if right__.is_some() {
                                return Err(serde::de::Error::duplicate_field("right"));
                            }
                            right__ = map_.next_value()?;
                        }
                    }
                }
                Ok(DiffResult {
                    left: left__,
                    right: right__,
                })
            }
        }
        deserializer.deserialize_struct("objdiff.diff.DiffResult", FIELDS, GeneratedVisitor)
    }
}
impl serde::Serialize for DiffSection {
    #[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.kind != 0 {
            len += 1;
        }
        if self.size != 0 {
            len += 1;
        }
        if self.address != 0 {
            len += 1;
        }
        if self.match_percent.is_some() {
            len += 1;
        }
        if !self.data_diff.is_empty() {
            len += 1;
        }
        if !self.reloc_diff.is_empty() {
            len += 1;
        }
        let mut struct_ser = serializer.serialize_struct("objdiff.diff.DiffSection", len)?;
        if !self.name.is_empty() {
            struct_ser.serialize_field("name", &self.name)?;
        }
        if self.kind != 0 {
            let v = DiffSectionKind::try_from(self.kind)
                .map_err(|_| serde::ser::Error::custom(format!("Invalid variant {}", self.kind)))?;
            struct_ser.serialize_field("kind", &v)?;
        }
        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.address != 0 {
            #[allow(clippy::needless_borrow)]
            #[allow(clippy::needless_borrows_for_generic_args)]
            struct_ser.serialize_field("address", ToString::to_string(&self.address).as_str())?;
        }
        if let Some(v) = self.match_percent.as_ref() {
            struct_ser.serialize_field("match_percent", v)?;
        }
        if !self.data_diff.is_empty() {
            struct_ser.serialize_field("data_diff", &self.data_diff)?;
        }
        if !self.reloc_diff.is_empty() {
            struct_ser.serialize_field("reloc_diff", &self.reloc_diff)?;
        }
        struct_ser.end()
    }
}
impl<'de> serde::Deserialize<'de> for DiffSection {
    #[allow(deprecated)]
    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        const FIELDS: &[&str] = &[
            "name",
            "kind",
            "size",
            "address",
            "match_percent",
            "matchPercent",
            "data_diff",
            "dataDiff",
            "reloc_diff",
            "relocDiff",
        ];

        #[allow(clippy::enum_variant_names)]
        enum GeneratedField {
            Name,
            Kind,
            Size,
            Address,
            MatchPercent,
            DataDiff,
            RelocDiff,
        }
        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),
                            "kind" => Ok(GeneratedField::Kind),
                            "size" => Ok(GeneratedField::Size),
                            "address" => Ok(GeneratedField::Address),
                            "matchPercent" | "match_percent" => Ok(GeneratedField::MatchPercent),
                            "dataDiff" | "data_diff" => Ok(GeneratedField::DataDiff),
                            "relocDiff" | "reloc_diff" => Ok(GeneratedField::RelocDiff),
                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
                        }
                    }
                }
                deserializer.deserialize_identifier(GeneratedVisitor)
            }
        }
        struct GeneratedVisitor;
        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
            type Value = DiffSection;

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

            fn visit_map<V>(self, mut map_: V) -> std::result::Result<DiffSection, V::Error>
                where
                    V: serde::de::MapAccess<'de>,
            {
                let mut name__ = None;
                let mut kind__ = None;
                let mut size__ = None;
                let mut address__ = None;
                let mut match_percent__ = None;
                let mut data_diff__ = None;
                let mut reloc_diff__ = 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::Kind => {
                            if kind__.is_some() {
                                return Err(serde::de::Error::duplicate_field("kind"));
                            }
                            kind__ = Some(map_.next_value::<DiffSectionKind>()? as i32);
                        }
                        GeneratedField::Size => {
                            if size__.is_some() {
                                return Err(serde::de::Error::duplicate_field("size"));
                            }
                            size__ = 
                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
                            ;
                        }
                        GeneratedField::Address => {
                            if address__.is_some() {
                                return Err(serde::de::Error::duplicate_field("address"));
                            }
                            address__ = 
                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
                            ;
                        }
                        GeneratedField::MatchPercent => {
                            if match_percent__.is_some() {
                                return Err(serde::de::Error::duplicate_field("matchPercent"));
                            }
                            match_percent__ = 
                                map_.next_value::<::std::option::Option<::pbjson::private::NumberDeserialize<_>>>()?.map(|x| x.0)
                            ;
                        }
                        GeneratedField::DataDiff => {
                            if data_diff__.is_some() {
                                return Err(serde::de::Error::duplicate_field("dataDiff"));
                            }
                            data_diff__ = Some(map_.next_value()?);
                        }
                        GeneratedField::RelocDiff => {
                            if reloc_diff__.is_some() {
                                return Err(serde::de::Error::duplicate_field("relocDiff"));
                            }
                            reloc_diff__ = Some(map_.next_value()?);
                        }
                    }
                }
                Ok(DiffSection {
                    name: name__.unwrap_or_default(),
                    kind: kind__.unwrap_or_default(),
                    size: size__.unwrap_or_default(),
                    address: address__.unwrap_or_default(),
                    match_percent: match_percent__,
                    data_diff: data_diff__.unwrap_or_default(),
                    reloc_diff: reloc_diff__.unwrap_or_default(),
                })
            }
        }
        deserializer.deserialize_struct("objdiff.diff.DiffSection", FIELDS, GeneratedVisitor)
    }
}
impl serde::Serialize for DiffSectionKind {
    #[allow(deprecated)]
    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        let variant = match self {
            Self::SectionUnknown => "SECTION_UNKNOWN",
            Self::SectionCode => "SECTION_CODE",
            Self::SectionData => "SECTION_DATA",
            Self::SectionBss => "SECTION_BSS",
            Self::SectionCommon => "SECTION_COMMON",
        };
        serializer.serialize_str(variant)
    }
}
impl<'de> serde::Deserialize<'de> for DiffSectionKind {
    #[allow(deprecated)]
    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        const FIELDS: &[&str] = &[
            "SECTION_UNKNOWN",
            "SECTION_CODE",
            "SECTION_DATA",
            "SECTION_BSS",
            "SECTION_COMMON",
        ];

        struct GeneratedVisitor;

        impl serde::de::Visitor<'_> for GeneratedVisitor {
            type Value = DiffSectionKind;

            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                write!(formatter, "expected one of: {:?}", &FIELDS)
            }

            fn visit_i64<E>(self, v: i64) -> std::result::Result<Self::Value, E>
            where
                E: serde::de::Error,
            {
                i32::try_from(v)
                    .ok()
                    .and_then(|x| x.try_into().ok())
                    .ok_or_else(|| {
                        serde::de::Error::invalid_value(serde::de::Unexpected::Signed(v), &self)
                    })
            }

            fn visit_u64<E>(self, v: u64) -> std::result::Result<Self::Value, E>
            where
                E: serde::de::Error,
            {
                i32::try_from(v)
                    .ok()
                    .and_then(|x| x.try_into().ok())
                    .ok_or_else(|| {
                        serde::de::Error::invalid_value(serde::de::Unexpected::Unsigned(v), &self)
                    })
            }

            fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
            where
                E: serde::de::Error,
            {
                match value {
                    "SECTION_UNKNOWN" => Ok(DiffSectionKind::SectionUnknown),
                    "SECTION_CODE" => Ok(DiffSectionKind::SectionCode),
                    "SECTION_DATA" => Ok(DiffSectionKind::SectionData),
                    "SECTION_BSS" => Ok(DiffSectionKind::SectionBss),
                    "SECTION_COMMON" => Ok(DiffSectionKind::SectionCommon),
                    _ => Err(serde::de::Error::unknown_variant(value, FIELDS)),
                }
            }
        }
        deserializer.deserialize_any(GeneratedVisitor)
    }
}
impl serde::Serialize for DiffSymbol {
    #[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.demangled_name.is_some() {
            len += 1;
        }
        if self.address != 0 {
            len += 1;
        }
        if self.size != 0 {
            len += 1;
        }
        if self.flags.is_some() {
            len += 1;
        }
        if self.kind != 0 {
            len += 1;
        }
        if self.target_symbol.is_some() {
            len += 1;
        }
        if self.match_percent.is_some() {
            len += 1;
        }
        if !self.instructions.is_empty() {
            len += 1;
        }
        if !self.data_diff.is_empty() {
            len += 1;
        }
        let mut struct_ser = serializer.serialize_struct("objdiff.diff.DiffSymbol", len)?;
        if !self.name.is_empty() {
            struct_ser.serialize_field("name", &self.name)?;
        }
        if let Some(v) = self.demangled_name.as_ref() {
            struct_ser.serialize_field("demangled_name", v)?;
        }
        if self.address != 0 {
            #[allow(clippy::needless_borrow)]
            #[allow(clippy::needless_borrows_for_generic_args)]
            struct_ser.serialize_field("address", ToString::to_string(&self.address).as_str())?;
        }
        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 let Some(v) = self.flags.as_ref() {
            struct_ser.serialize_field("flags", v)?;
        }
        if self.kind != 0 {
            let v = DiffSymbolKind::try_from(self.kind)
                .map_err(|_| serde::ser::Error::custom(format!("Invalid variant {}", self.kind)))?;
            struct_ser.serialize_field("kind", &v)?;
        }
        if let Some(v) = self.target_symbol.as_ref() {
            struct_ser.serialize_field("target_symbol", v)?;
        }
        if let Some(v) = self.match_percent.as_ref() {
            struct_ser.serialize_field("match_percent", v)?;
        }
        if !self.instructions.is_empty() {
            struct_ser.serialize_field("instructions", &self.instructions)?;
        }
        if !self.data_diff.is_empty() {
            struct_ser.serialize_field("data_diff", &self.data_diff)?;
        }
        struct_ser.end()
    }
}
impl<'de> serde::Deserialize<'de> for DiffSymbol {
    #[allow(deprecated)]
    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        const FIELDS: &[&str] = &[
            "name",
            "demangled_name",
            "demangledName",
            "address",
            "size",
            "flags",
            "kind",
            "target_symbol",
            "targetSymbol",
            "match_percent",
            "matchPercent",
            "instructions",
            "data_diff",
            "dataDiff",
        ];

        #[allow(clippy::enum_variant_names)]
        enum GeneratedField {
            Name,
            DemangledName,
            Address,
            Size,
            Flags,
            Kind,
            TargetSymbol,
            MatchPercent,
            Instructions,
            DataDiff,
        }
        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),
                            "demangledName" | "demangled_name" => Ok(GeneratedField::DemangledName),
                            "address" => Ok(GeneratedField::Address),
                            "size" => Ok(GeneratedField::Size),
                            "flags" => Ok(GeneratedField::Flags),
                            "kind" => Ok(GeneratedField::Kind),
                            "targetSymbol" | "target_symbol" => Ok(GeneratedField::TargetSymbol),
                            "matchPercent" | "match_percent" => Ok(GeneratedField::MatchPercent),
                            "instructions" => Ok(GeneratedField::Instructions),
                            "dataDiff" | "data_diff" => Ok(GeneratedField::DataDiff),
                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
                        }
                    }
                }
                deserializer.deserialize_identifier(GeneratedVisitor)
            }
        }
        struct GeneratedVisitor;
        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
            type Value = DiffSymbol;

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

            fn visit_map<V>(self, mut map_: V) -> std::result::Result<DiffSymbol, V::Error>
                where
                    V: serde::de::MapAccess<'de>,
            {
                let mut name__ = None;
                let mut demangled_name__ = None;
                let mut address__ = None;
                let mut size__ = None;
                let mut flags__ = None;
                let mut kind__ = None;
                let mut target_symbol__ = None;
                let mut match_percent__ = None;
                let mut instructions__ = None;
                let mut data_diff__ = 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::DemangledName => {
                            if demangled_name__.is_some() {
                                return Err(serde::de::Error::duplicate_field("demangledName"));
                            }
                            demangled_name__ = map_.next_value()?;
                        }
                        GeneratedField::Address => {
                            if address__.is_some() {
                                return Err(serde::de::Error::duplicate_field("address"));
                            }
                            address__ = 
                                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)
                            ;
                        }
                        GeneratedField::Flags => {
                            if flags__.is_some() {
                                return Err(serde::de::Error::duplicate_field("flags"));
                            }
                            flags__ = map_.next_value()?;
                        }
                        GeneratedField::Kind => {
                            if kind__.is_some() {
                                return Err(serde::de::Error::duplicate_field("kind"));
                            }
                            kind__ = Some(map_.next_value::<DiffSymbolKind>()? as i32);
                        }
                        GeneratedField::TargetSymbol => {
                            if target_symbol__.is_some() {
                                return Err(serde::de::Error::duplicate_field("targetSymbol"));
                            }
                            target_symbol__ = 
                                map_.next_value::<::std::option::Option<::pbjson::private::NumberDeserialize<_>>>()?.map(|x| x.0)
                            ;
                        }
                        GeneratedField::MatchPercent => {
                            if match_percent__.is_some() {
                                return Err(serde::de::Error::duplicate_field("matchPercent"));
                            }
                            match_percent__ = 
                                map_.next_value::<::std::option::Option<::pbjson::private::NumberDeserialize<_>>>()?.map(|x| x.0)
                            ;
                        }
                        GeneratedField::Instructions => {
                            if instructions__.is_some() {
                                return Err(serde::de::Error::duplicate_field("instructions"));
                            }
                            instructions__ = Some(map_.next_value()?);
                        }
                        GeneratedField::DataDiff => {
                            if data_diff__.is_some() {
                                return Err(serde::de::Error::duplicate_field("dataDiff"));
                            }
                            data_diff__ = Some(map_.next_value()?);
                        }
                    }
                }
                Ok(DiffSymbol {
                    name: name__.unwrap_or_default(),
                    demangled_name: demangled_name__,
                    address: address__.unwrap_or_default(),
                    size: size__.unwrap_or_default(),
                    flags: flags__,
                    kind: kind__.unwrap_or_default(),
                    target_symbol: target_symbol__,
                    match_percent: match_percent__,
                    instructions: instructions__.unwrap_or_default(),
                    data_diff: data_diff__.unwrap_or_default(),
                })
            }
        }
        deserializer.deserialize_struct("objdiff.diff.DiffSymbol", FIELDS, GeneratedVisitor)
    }
}
impl serde::Serialize for DiffSymbolFlags {
    #[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.global {
            len += 1;
        }
        if self.local {
            len += 1;
        }
        if self.weak {
            len += 1;
        }
        if self.common {
            len += 1;
        }
        if self.hidden {
            len += 1;
        }
        if self.ignored {
            len += 1;
        }
        if self.size_inferred {
            len += 1;
        }
        let mut struct_ser = serializer.serialize_struct("objdiff.diff.DiffSymbolFlags", len)?;
        if self.global {
            struct_ser.serialize_field("global", &self.global)?;
        }
        if self.local {
            struct_ser.serialize_field("local", &self.local)?;
        }
        if self.weak {
            struct_ser.serialize_field("weak", &self.weak)?;
        }
        if self.common {
            struct_ser.serialize_field("common", &self.common)?;
        }
        if self.hidden {
            struct_ser.serialize_field("hidden", &self.hidden)?;
        }
        if self.ignored {
            struct_ser.serialize_field("ignored", &self.ignored)?;
        }
        if self.size_inferred {
            struct_ser.serialize_field("size_inferred", &self.size_inferred)?;
        }
        struct_ser.end()
    }
}
impl<'de> serde::Deserialize<'de> for DiffSymbolFlags {
    #[allow(deprecated)]
    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        const FIELDS: &[&str] = &[
            "global",
            "local",
            "weak",
            "common",
            "hidden",
            "ignored",
            "size_inferred",
            "sizeInferred",
        ];

        #[allow(clippy::enum_variant_names)]
        enum GeneratedField {
            Global,
            Local,
            Weak,
            Common,
            Hidden,
            Ignored,
            SizeInferred,
        }
        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 {
                            "global" => Ok(GeneratedField::Global),
                            "local" => Ok(GeneratedField::Local),
                            "weak" => Ok(GeneratedField::Weak),
                            "common" => Ok(GeneratedField::Common),
                            "hidden" => Ok(GeneratedField::Hidden),
                            "ignored" => Ok(GeneratedField::Ignored),
                            "sizeInferred" | "size_inferred" => Ok(GeneratedField::SizeInferred),
                            _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
                        }
                    }
                }
                deserializer.deserialize_identifier(GeneratedVisitor)
            }
        }
        struct GeneratedVisitor;
        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
            type Value = DiffSymbolFlags;

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

            fn visit_map<V>(self, mut map_: V) -> std::result::Result<DiffSymbolFlags, V::Error>
                where
                    V: serde::de::MapAccess<'de>,
            {
                let mut global__ = None;
                let mut local__ = None;
                let mut weak__ = None;
                let mut common__ = None;
                let mut hidden__ = None;
                let mut ignored__ = None;
                let mut size_inferred__ = None;
                while let Some(k) = map_.next_key()? {
                    match k {
                        GeneratedField::Global => {
                            if global__.is_some() {
                                return Err(serde::de::Error::duplicate_field("global"));
                            }
                            global__ = Some(map_.next_value()?);
                        }
                        GeneratedField::Local => {
                            if local__.is_some() {
                                return Err(serde::de::Error::duplicate_field("local"));
                            }
                            local__ = Some(map_.next_value()?);
                        }
                        GeneratedField::Weak => {
                            if weak__.is_some() {
                                return Err(serde::de::Error::duplicate_field("weak"));
                            }
                            weak__ = Some(map_.next_value()?);
                        }
                        GeneratedField::Common => {
                            if common__.is_some() {
                                return Err(serde::de::Error::duplicate_field("common"));
                            }
                            common__ = Some(map_.next_value()?);
                        }
                        GeneratedField::Hidden => {
                            if hidden__.is_some() {
                                return Err(serde::de::Error::duplicate_field("hidden"));
                            }
                            hidden__ = Some(map_.next_value()?);
                        }
                        GeneratedField::Ignored => {
                            if ignored__.is_some() {
                                return Err(serde::de::Error::duplicate_field("ignored"));
                            }
                            ignored__ = Some(map_.next_value()?);
                        }
                        GeneratedField::SizeInferred => {
                            if size_inferred__.is_some() {
                                return Err(serde::de::Error::duplicate_field("sizeInferred"));
                            }
                            size_inferred__ = Some(map_.next_value()?);
                        }
                    }
                }
                Ok(DiffSymbolFlags {
                    global: global__.unwrap_or_default(),
                    local: local__.unwrap_or_default(),
                    weak: weak__.unwrap_or_default(),
                    common: common__.unwrap_or_default(),
                    hidden: hidden__.unwrap_or_default(),
                    ignored: ignored__.unwrap_or_default(),
                    size_inferred: size_inferred__.unwrap_or_default(),
                })
            }
        }
        deserializer.deserialize_struct("objdiff.diff.DiffSymbolFlags", FIELDS, GeneratedVisitor)
    }
}
impl serde::Serialize for DiffSymbolKind {
    #[allow(deprecated)]
    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        let variant = match self {
            Self::SymbolUnknown => "SYMBOL_UNKNOWN",
            Self::SymbolFunction => "SYMBOL_FUNCTION",
            Self::SymbolObject => "SYMBOL_OBJECT",
            Self::SymbolSection => "SYMBOL_SECTION",
        };
        serializer.serialize_str(variant)
    }
}
impl<'de> serde::Deserialize<'de> for DiffSymbolKind {
    #[allow(deprecated)]
    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        const FIELDS: &[&str] = &[
            "SYMBOL_UNKNOWN",
            "SYMBOL_FUNCTION",
            "SYMBOL_OBJECT",
            "SYMBOL_SECTION",
        ];

        struct GeneratedVisitor;

        impl serde::de::Visitor<'_> for GeneratedVisitor {
            type Value = DiffSymbolKind;

            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                write!(formatter, "expected one of: {:?}", &FIELDS)
            }

            fn visit_i64<E>(self, v: i64) -> std::result::Result<Self::Value, E>
            where
                E: serde::de::Error,
            {
                i32::try_from(v)
                    .ok()
                    .and_then(|x| x.try_into().ok())
                    .ok_or_else(|| {
                        serde::de::Error::invalid_value(serde::de::Unexpected::Signed(v), &self)
                    })
            }

            fn visit_u64<E>(self, v: u64) -> std::result::Result<Self::Value, E>
            where
                E: serde::de::Error,
            {
                i32::try_from(v)
                    .ok()
                    .and_then(|x| x.try_into().ok())
                    .ok_or_else(|| {
                        serde::de::Error::invalid_value(serde::de::Unexpected::Unsigned(v), &self)
                    })
            }

            fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
            where
                E: serde::de::Error,
            {
                match value {
                    "SYMBOL_UNKNOWN" => Ok(DiffSymbolKind::SymbolUnknown),
                    "SYMBOL_FUNCTION" => Ok(DiffSymbolKind::SymbolFunction),
                    "SYMBOL_OBJECT" => Ok(DiffSymbolKind::SymbolObject),
                    "SYMBOL_SECTION" => Ok(DiffSymbolKind::SymbolSection),
                    _ => Err(serde::de::Error::unknown_variant(value, FIELDS)),
                }
            }
        }
        deserializer.deserialize_any(GeneratedVisitor)
    }
}
