use core::ffi::*;
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct UIMailConversationEntryKind(pub NSInteger);
impl UIMailConversationEntryKind {
#[doc(alias = "UIMailConversationEntryKindNone")]
pub const None: Self = Self(0);
#[doc(alias = "UIMailConversationEntryKindPersonal")]
pub const Personal: Self = Self(1);
#[doc(alias = "UIMailConversationEntryKindPromotion")]
pub const Promotion: Self = Self(2);
#[doc(alias = "UIMailConversationEntryKindSocial")]
pub const Social: Self = Self(3);
#[doc(alias = "UIMailConversationEntryKindTransaction")]
pub const Transaction: Self = Self(4);
#[doc(alias = "UIMailConversationEntryKindNews")]
pub const News: Self = Self(5);
}
unsafe impl Encode for UIMailConversationEntryKind {
const ENCODING: Encoding = NSInteger::ENCODING;
}
unsafe impl RefEncode for UIMailConversationEntryKind {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
extern_class!(
#[unsafe(super(UIConversationEntry, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(feature = "UIConversationEntry")]
pub struct UIMailConversationEntry;
);
#[cfg(feature = "UIConversationEntry")]
extern_conformance!(
unsafe impl NSObjectProtocol for UIMailConversationEntry {}
);
#[cfg(feature = "UIConversationEntry")]
impl UIMailConversationEntry {
extern_methods!(
#[unsafe(method(kind))]
#[unsafe(method_family = none)]
pub fn kind(&self) -> UIMailConversationEntryKind;
#[unsafe(method(setKind:))]
#[unsafe(method_family = none)]
pub fn setKind(&self, kind: UIMailConversationEntryKind);
#[unsafe(method(responseSecondaryRecipientIdentifiers))]
#[unsafe(method_family = none)]
pub fn responseSecondaryRecipientIdentifiers(&self) -> Retained<NSSet<NSString>>;
#[unsafe(method(setResponseSecondaryRecipientIdentifiers:))]
#[unsafe(method_family = none)]
pub fn setResponseSecondaryRecipientIdentifiers(
&self,
response_secondary_recipient_identifiers: &NSSet<NSString>,
);
);
}
#[cfg(feature = "UIConversationEntry")]
impl UIMailConversationEntry {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub fn init(this: Allocated<Self>) -> Retained<Self>;
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub fn new() -> Retained<Self>;
);
}
#[cfg(feature = "UIConversationEntry")]
impl DefaultRetained for UIMailConversationEntry {
#[inline]
fn default_retained() -> Retained<Self> {
Self::new()
}
}