// This file is @generated by prost-build.
/// Top-level diff result containing left and right object diffs
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DiffResult {
    #[prost(message, optional, tag = "1")]
    pub left: ::core::option::Option<DiffObject>,
    #[prost(message, optional, tag = "2")]
    pub right: ::core::option::Option<DiffObject>,
}
/// Diff information for a single object file
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DiffObject {
    #[prost(message, repeated, tag = "1")]
    pub sections: ::prost::alloc::vec::Vec<DiffSection>,
    #[prost(message, repeated, tag = "2")]
    pub symbols: ::prost::alloc::vec::Vec<DiffSymbol>,
}
/// Diff information for a section
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DiffSection {
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    #[prost(enumeration = "DiffSectionKind", tag = "2")]
    pub kind: i32,
    #[prost(uint64, tag = "3")]
    pub size: u64,
    #[prost(uint64, tag = "4")]
    pub address: u64,
    #[prost(float, optional, tag = "5")]
    pub match_percent: ::core::option::Option<f32>,
    #[prost(message, repeated, tag = "6")]
    pub data_diff: ::prost::alloc::vec::Vec<DiffDataSegment>,
    #[prost(message, repeated, tag = "7")]
    pub reloc_diff: ::prost::alloc::vec::Vec<DiffDataRelocation>,
}
/// Symbol with diff information
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DiffSymbol {
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    #[prost(string, optional, tag = "2")]
    pub demangled_name: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(uint64, tag = "3")]
    pub address: u64,
    #[prost(uint64, tag = "4")]
    pub size: u64,
    #[prost(message, optional, tag = "5")]
    pub flags: ::core::option::Option<DiffSymbolFlags>,
    #[prost(enumeration = "DiffSymbolKind", tag = "10")]
    pub kind: i32,
    /// The symbol index in the _other_ object that this symbol was diffed against
    #[prost(uint32, optional, tag = "6")]
    pub target_symbol: ::core::option::Option<u32>,
    #[prost(float, optional, tag = "7")]
    pub match_percent: ::core::option::Option<f32>,
    /// Instruction diff rows (for code symbols)
    #[prost(message, repeated, tag = "8")]
    pub instructions: ::prost::alloc::vec::Vec<DiffInstructionRow>,
    /// Data diff (for data symbols)
    #[prost(message, repeated, tag = "9")]
    pub data_diff: ::prost::alloc::vec::Vec<DiffDataSegment>,
}
/// Symbol flags
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct DiffSymbolFlags {
    #[prost(bool, tag = "1")]
    pub global: bool,
    #[prost(bool, tag = "2")]
    pub local: bool,
    #[prost(bool, tag = "3")]
    pub weak: bool,
    #[prost(bool, tag = "4")]
    pub common: bool,
    #[prost(bool, tag = "5")]
    pub hidden: bool,
    #[prost(bool, tag = "6")]
    pub ignored: bool,
    #[prost(bool, tag = "7")]
    pub size_inferred: bool,
}
/// A single instruction diff row
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DiffInstructionRow {
    #[prost(enumeration = "DiffKind", tag = "1")]
    pub diff_kind: i32,
    #[prost(message, optional, tag = "2")]
    pub instruction: ::core::option::Option<DiffInstruction>,
    #[prost(message, repeated, tag = "3")]
    pub arg_diff: ::prost::alloc::vec::Vec<DiffInstructionArgDiff>,
}
/// Parsed instruction information
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DiffInstruction {
    #[prost(uint64, tag = "1")]
    pub address: u64,
    #[prost(uint32, tag = "2")]
    pub size: u32,
    /// Formatted instruction string
    #[prost(string, tag = "3")]
    pub formatted: ::prost::alloc::string::String,
    /// Formatted instruction parts
    #[prost(message, repeated, tag = "4")]
    pub parts: ::prost::alloc::vec::Vec<DiffInstructionPart>,
    /// Relocation information (if present)
    #[prost(message, optional, tag = "5")]
    pub relocation: ::core::option::Option<DiffRelocation>,
    /// Branch destination address
    #[prost(uint64, optional, tag = "6")]
    pub branch_dest: ::core::option::Option<u64>,
    /// Source line number (if present)
    #[prost(uint32, optional, tag = "7")]
    pub line_number: ::core::option::Option<u32>,
}
/// An instruction part
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct DiffInstructionPart {
    #[prost(oneof = "diff_instruction_part::Part", tags = "1, 2, 3, 4")]
    pub part: ::core::option::Option<diff_instruction_part::Part>,
}
/// Nested message and enum types in `DiffInstructionPart`.
pub mod diff_instruction_part {
    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
    pub enum Part {
        /// Basic text (whitespace, punctuation, etc.)
        #[prost(string, tag = "1")]
        Basic(::prost::alloc::string::String),
        /// Opcode/mnemonic
        #[prost(message, tag = "2")]
        Opcode(super::DiffOpcode),
        /// Argument
        #[prost(message, tag = "3")]
        Arg(super::DiffInstructionArg),
        /// Separator between arguments (comma)
        #[prost(bool, tag = "4")]
        Separator(bool),
    }
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct DiffOpcode {
    /// Mnemonic string
    #[prost(string, tag = "1")]
    pub mnemonic: ::prost::alloc::string::String,
    /// Base opcode ID
    #[prost(uint32, tag = "2")]
    pub opcode: u32,
}
/// An instruction argument
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct DiffInstructionArg {
    #[prost(oneof = "diff_instruction_arg::Arg", tags = "1, 2, 3, 4, 5")]
    pub arg: ::core::option::Option<diff_instruction_arg::Arg>,
}
/// Nested message and enum types in `DiffInstructionArg`.
pub mod diff_instruction_arg {
    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
    pub enum Arg {
        /// Signed immediate value
        #[prost(sint64, tag = "1")]
        Signed(i64),
        /// Unsigned immediate value
        #[prost(uint64, tag = "2")]
        Unsigned(u64),
        /// Opaque string value (register names, etc.)
        #[prost(string, tag = "3")]
        Opaque(::prost::alloc::string::String),
        /// Relocation
        #[prost(bool, tag = "4")]
        Reloc(bool),
        /// Branch destination address
        #[prost(uint64, tag = "5")]
        BranchDest(u64),
    }
}
/// Relocation information
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct DiffRelocation {
    #[prost(uint32, tag = "1")]
    pub r#type: u32,
    #[prost(string, tag = "2")]
    pub type_name: ::prost::alloc::string::String,
    #[prost(uint32, tag = "3")]
    pub target_symbol: u32,
    #[prost(int64, tag = "4")]
    pub addend: i64,
}
/// Argument diff information
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct DiffInstructionArgDiff {
    /// If set, this argument differs from the other side.
    /// The value is a rotating index for coloring.
    #[prost(uint32, optional, tag = "1")]
    pub diff_index: ::core::option::Option<u32>,
}
/// Data diff segment
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct DiffDataSegment {
    #[prost(enumeration = "DiffKind", tag = "1")]
    pub kind: i32,
    #[prost(bytes = "vec", tag = "2")]
    pub data: ::prost::alloc::vec::Vec<u8>,
    /// Size may be larger than data length for BSS
    #[prost(uint64, tag = "3")]
    pub size: u64,
}
/// Data relocation diff
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct DiffDataRelocation {
    #[prost(message, optional, tag = "1")]
    pub relocation: ::core::option::Option<DiffRelocation>,
    #[prost(enumeration = "DiffKind", tag = "2")]
    pub kind: i32,
    /// Address range this relocation covers
    #[prost(uint64, tag = "3")]
    pub start: u64,
    #[prost(uint64, tag = "4")]
    pub end: u64,
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum DiffSectionKind {
    SectionUnknown = 0,
    SectionCode = 1,
    SectionData = 2,
    SectionBss = 3,
    SectionCommon = 4,
}
impl DiffSectionKind {
    /// String value of the enum field names used in the ProtoBuf definition.
    ///
    /// The values are not transformed in any way and thus are considered stable
    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
    pub fn as_str_name(&self) -> &'static str {
        match self {
            Self::SectionUnknown => "SECTION_UNKNOWN",
            Self::SectionCode => "SECTION_CODE",
            Self::SectionData => "SECTION_DATA",
            Self::SectionBss => "SECTION_BSS",
            Self::SectionCommon => "SECTION_COMMON",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "SECTION_UNKNOWN" => Some(Self::SectionUnknown),
            "SECTION_CODE" => Some(Self::SectionCode),
            "SECTION_DATA" => Some(Self::SectionData),
            "SECTION_BSS" => Some(Self::SectionBss),
            "SECTION_COMMON" => Some(Self::SectionCommon),
            _ => None,
        }
    }
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum DiffSymbolKind {
    SymbolUnknown = 0,
    SymbolFunction = 1,
    SymbolObject = 2,
    SymbolSection = 3,
}
impl DiffSymbolKind {
    /// String value of the enum field names used in the ProtoBuf definition.
    ///
    /// The values are not transformed in any way and thus are considered stable
    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
    pub fn as_str_name(&self) -> &'static str {
        match self {
            Self::SymbolUnknown => "SYMBOL_UNKNOWN",
            Self::SymbolFunction => "SYMBOL_FUNCTION",
            Self::SymbolObject => "SYMBOL_OBJECT",
            Self::SymbolSection => "SYMBOL_SECTION",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "SYMBOL_UNKNOWN" => Some(Self::SymbolUnknown),
            "SYMBOL_FUNCTION" => Some(Self::SymbolFunction),
            "SYMBOL_OBJECT" => Some(Self::SymbolObject),
            "SYMBOL_SECTION" => Some(Self::SymbolSection),
            _ => None,
        }
    }
}
/// Diff kind for instructions and data
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum DiffKind {
    DiffNone = 0,
    DiffReplace = 1,
    DiffDelete = 2,
    DiffInsert = 3,
    DiffOpMismatch = 4,
    DiffArgMismatch = 5,
}
impl DiffKind {
    /// String value of the enum field names used in the ProtoBuf definition.
    ///
    /// The values are not transformed in any way and thus are considered stable
    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
    pub fn as_str_name(&self) -> &'static str {
        match self {
            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",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "DIFF_NONE" => Some(Self::DiffNone),
            "DIFF_REPLACE" => Some(Self::DiffReplace),
            "DIFF_DELETE" => Some(Self::DiffDelete),
            "DIFF_INSERT" => Some(Self::DiffInsert),
            "DIFF_OP_MISMATCH" => Some(Self::DiffOpMismatch),
            "DIFF_ARG_MISMATCH" => Some(Self::DiffArgMismatch),
            _ => None,
        }
    }
}
