#![allow(non_camel_case_types)]
#![allow(non_upper_case_globals)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
#[repr(i32)]
pub enum EDRMBlobDownloadType {
    Error = 0,
    File = 1,
    Parts = 2,
    Compressed = 4,
    AllMask = 7,
    IsJob = 8,
    HighPriority = 16,
    AddTimestamp = 32,
    LowPriority = 64,
}

impl EDRMBlobDownloadType {
    pub fn from_i32(val: i32) -> Option<Self> {
        match val {
            x if x == Self::Error as i32 => Some(Self::Error),
            x if x == Self::File as i32 => Some(Self::File),
            x if x == Self::Parts as i32 => Some(Self::Parts),
            x if x == Self::Compressed as i32 => Some(Self::Compressed),
            x if x == Self::AllMask as i32 => Some(Self::AllMask),
            x if x == Self::IsJob as i32 => Some(Self::IsJob),
            x if x == Self::HighPriority as i32 => Some(Self::HighPriority),
            x if x == Self::AddTimestamp as i32 => Some(Self::AddTimestamp),
            x if x == Self::LowPriority as i32 => Some(Self::LowPriority),
            _ => None,
        }
    }
}
