#![allow(non_camel_case_types)]
#![allow(non_upper_case_globals)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
#[repr(i32)]
pub enum EDRMBlobDownloadErrorDetail {
    None = 0,
    DownloadFailed = 1,
    TargetLocked = 2,
    OpenZip = 3,
    ReadZipDirectory = 4,
    UnexpectedZipEntry = 5,
    UnzipFullFile = 6,
    UnknownBlobType = 7,
    UnzipStrips = 8,
    UnzipMergeGuid = 9,
    UnzipSignature = 10,
    ApplyStrips = 11,
    ApplyMergeGuid = 12,
    ApplySignature = 13,
    AppIdMismatch = 14,
    AppIdUnexpected = 15,
    AppliedSignatureCorrupt = 16,
    ApplyValveSignatureHeader = 17,
    UnzipValveSignatureHeader = 18,
    PathManipulationError = 19,
    TargetLocked_Base = 65536,
    TargetLocked_Max = 131071,
    NextBase = 131072,
}

impl EDRMBlobDownloadErrorDetail {
    pub fn from_i32(val: i32) -> Option<Self> {
        match val {
            x if x == Self::None as i32 => Some(Self::None),
            x if x == Self::DownloadFailed as i32 => Some(Self::DownloadFailed),
            x if x == Self::TargetLocked as i32 => Some(Self::TargetLocked),
            x if x == Self::OpenZip as i32 => Some(Self::OpenZip),
            x if x == Self::ReadZipDirectory as i32 => Some(Self::ReadZipDirectory),
            x if x == Self::UnexpectedZipEntry as i32 => Some(Self::UnexpectedZipEntry),
            x if x == Self::UnzipFullFile as i32 => Some(Self::UnzipFullFile),
            x if x == Self::UnknownBlobType as i32 => Some(Self::UnknownBlobType),
            x if x == Self::UnzipStrips as i32 => Some(Self::UnzipStrips),
            x if x == Self::UnzipMergeGuid as i32 => Some(Self::UnzipMergeGuid),
            x if x == Self::UnzipSignature as i32 => Some(Self::UnzipSignature),
            x if x == Self::ApplyStrips as i32 => Some(Self::ApplyStrips),
            x if x == Self::ApplyMergeGuid as i32 => Some(Self::ApplyMergeGuid),
            x if x == Self::ApplySignature as i32 => Some(Self::ApplySignature),
            x if x == Self::AppIdMismatch as i32 => Some(Self::AppIdMismatch),
            x if x == Self::AppIdUnexpected as i32 => Some(Self::AppIdUnexpected),
            x if x == Self::AppliedSignatureCorrupt as i32 => Some(Self::AppliedSignatureCorrupt),
            x if x == Self::ApplyValveSignatureHeader as i32 => Some(Self::ApplyValveSignatureHeader),
            x if x == Self::UnzipValveSignatureHeader as i32 => Some(Self::UnzipValveSignatureHeader),
            x if x == Self::PathManipulationError as i32 => Some(Self::PathManipulationError),
            x if x == Self::TargetLocked_Base as i32 => Some(Self::TargetLocked_Base),
            x if x == Self::TargetLocked_Max as i32 => Some(Self::TargetLocked_Max),
            x if x == Self::NextBase as i32 => Some(Self::NextBase),
            _ => None,
        }
    }
}
