use crate::common::*;
use crate::DataDetection::*;
use crate::Foundation::*;
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(feature = "DataDetection_DDMatch")]
pub struct DDMatch;
#[cfg(feature = "DataDetection_DDMatch")]
unsafe impl ClassType for DDMatch {
type Super = NSObject;
type Mutability = InteriorMutable;
}
);
#[cfg(feature = "DataDetection_DDMatch")]
unsafe impl NSObjectProtocol for DDMatch {}
extern_methods!(
#[cfg(feature = "DataDetection_DDMatch")]
unsafe impl DDMatch {
#[cfg(feature = "Foundation_NSString")]
#[method_id(@__retain_semantics Other matchedString)]
pub unsafe fn matchedString(&self) -> Id<NSString>;
#[method_id(@__retain_semantics Init init)]
pub unsafe fn init(this: Allocated<Self>) -> Id<Self>;
}
);
extern_methods!(
#[cfg(feature = "DataDetection_DDMatch")]
unsafe impl DDMatch {
#[method_id(@__retain_semantics New new)]
pub unsafe fn new() -> Id<Self>;
}
);
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(feature = "DataDetection_DDMatchLink")]
pub struct DDMatchLink;
#[cfg(feature = "DataDetection_DDMatchLink")]
unsafe impl ClassType for DDMatchLink {
#[inherits(NSObject)]
type Super = DDMatch;
type Mutability = InteriorMutable;
}
);
#[cfg(feature = "DataDetection_DDMatchLink")]
unsafe impl NSObjectProtocol for DDMatchLink {}
extern_methods!(
#[cfg(feature = "DataDetection_DDMatchLink")]
unsafe impl DDMatchLink {
#[cfg(feature = "Foundation_NSURL")]
#[method_id(@__retain_semantics Other URL)]
pub unsafe fn URL(&self) -> Id<NSURL>;
}
);
extern_methods!(
#[cfg(feature = "DataDetection_DDMatchLink")]
unsafe impl DDMatchLink {
#[method_id(@__retain_semantics Init init)]
pub unsafe fn init(this: Allocated<Self>) -> Id<Self>;
}
);
extern_methods!(
#[cfg(feature = "DataDetection_DDMatchLink")]
unsafe impl DDMatchLink {
#[method_id(@__retain_semantics New new)]
pub unsafe fn new() -> Id<Self>;
}
);
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(feature = "DataDetection_DDMatchPhoneNumber")]
pub struct DDMatchPhoneNumber;
#[cfg(feature = "DataDetection_DDMatchPhoneNumber")]
unsafe impl ClassType for DDMatchPhoneNumber {
#[inherits(NSObject)]
type Super = DDMatch;
type Mutability = InteriorMutable;
}
);
#[cfg(feature = "DataDetection_DDMatchPhoneNumber")]
unsafe impl NSObjectProtocol for DDMatchPhoneNumber {}
extern_methods!(
#[cfg(feature = "DataDetection_DDMatchPhoneNumber")]
unsafe impl DDMatchPhoneNumber {
#[cfg(feature = "Foundation_NSString")]
#[method_id(@__retain_semantics Other phoneNumber)]
pub unsafe fn phoneNumber(&self) -> Id<NSString>;
#[cfg(feature = "Foundation_NSString")]
#[method_id(@__retain_semantics Other label)]
pub unsafe fn label(&self) -> Option<Id<NSString>>;
}
);
extern_methods!(
#[cfg(feature = "DataDetection_DDMatchPhoneNumber")]
unsafe impl DDMatchPhoneNumber {
#[method_id(@__retain_semantics Init init)]
pub unsafe fn init(this: Allocated<Self>) -> Id<Self>;
}
);
extern_methods!(
#[cfg(feature = "DataDetection_DDMatchPhoneNumber")]
unsafe impl DDMatchPhoneNumber {
#[method_id(@__retain_semantics New new)]
pub unsafe fn new() -> Id<Self>;
}
);
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(feature = "DataDetection_DDMatchEmailAddress")]
pub struct DDMatchEmailAddress;
#[cfg(feature = "DataDetection_DDMatchEmailAddress")]
unsafe impl ClassType for DDMatchEmailAddress {
#[inherits(NSObject)]
type Super = DDMatch;
type Mutability = InteriorMutable;
}
);
#[cfg(feature = "DataDetection_DDMatchEmailAddress")]
unsafe impl NSObjectProtocol for DDMatchEmailAddress {}
extern_methods!(
#[cfg(feature = "DataDetection_DDMatchEmailAddress")]
unsafe impl DDMatchEmailAddress {
#[cfg(feature = "Foundation_NSString")]
#[method_id(@__retain_semantics Other emailAddress)]
pub unsafe fn emailAddress(&self) -> Id<NSString>;
#[cfg(feature = "Foundation_NSString")]
#[method_id(@__retain_semantics Other label)]
pub unsafe fn label(&self) -> Option<Id<NSString>>;
}
);
extern_methods!(
#[cfg(feature = "DataDetection_DDMatchEmailAddress")]
unsafe impl DDMatchEmailAddress {
#[method_id(@__retain_semantics Init init)]
pub unsafe fn init(this: Allocated<Self>) -> Id<Self>;
}
);
extern_methods!(
#[cfg(feature = "DataDetection_DDMatchEmailAddress")]
unsafe impl DDMatchEmailAddress {
#[method_id(@__retain_semantics New new)]
pub unsafe fn new() -> Id<Self>;
}
);
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(feature = "DataDetection_DDMatchPostalAddress")]
pub struct DDMatchPostalAddress;
#[cfg(feature = "DataDetection_DDMatchPostalAddress")]
unsafe impl ClassType for DDMatchPostalAddress {
#[inherits(NSObject)]
type Super = DDMatch;
type Mutability = InteriorMutable;
}
);
#[cfg(feature = "DataDetection_DDMatchPostalAddress")]
unsafe impl NSObjectProtocol for DDMatchPostalAddress {}
extern_methods!(
#[cfg(feature = "DataDetection_DDMatchPostalAddress")]
unsafe impl DDMatchPostalAddress {
#[cfg(feature = "Foundation_NSString")]
#[method_id(@__retain_semantics Other street)]
pub unsafe fn street(&self) -> Option<Id<NSString>>;
#[cfg(feature = "Foundation_NSString")]
#[method_id(@__retain_semantics Other city)]
pub unsafe fn city(&self) -> Option<Id<NSString>>;
#[cfg(feature = "Foundation_NSString")]
#[method_id(@__retain_semantics Other state)]
pub unsafe fn state(&self) -> Option<Id<NSString>>;
#[cfg(feature = "Foundation_NSString")]
#[method_id(@__retain_semantics Other postalCode)]
pub unsafe fn postalCode(&self) -> Option<Id<NSString>>;
#[cfg(feature = "Foundation_NSString")]
#[method_id(@__retain_semantics Other country)]
pub unsafe fn country(&self) -> Option<Id<NSString>>;
}
);
extern_methods!(
#[cfg(feature = "DataDetection_DDMatchPostalAddress")]
unsafe impl DDMatchPostalAddress {
#[method_id(@__retain_semantics Init init)]
pub unsafe fn init(this: Allocated<Self>) -> Id<Self>;
}
);
extern_methods!(
#[cfg(feature = "DataDetection_DDMatchPostalAddress")]
unsafe impl DDMatchPostalAddress {
#[method_id(@__retain_semantics New new)]
pub unsafe fn new() -> Id<Self>;
}
);
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(feature = "DataDetection_DDMatchCalendarEvent")]
pub struct DDMatchCalendarEvent;
#[cfg(feature = "DataDetection_DDMatchCalendarEvent")]
unsafe impl ClassType for DDMatchCalendarEvent {
#[inherits(NSObject)]
type Super = DDMatch;
type Mutability = InteriorMutable;
}
);
#[cfg(feature = "DataDetection_DDMatchCalendarEvent")]
unsafe impl NSObjectProtocol for DDMatchCalendarEvent {}
extern_methods!(
#[cfg(feature = "DataDetection_DDMatchCalendarEvent")]
unsafe impl DDMatchCalendarEvent {
#[method(isAllDay)]
pub unsafe fn isAllDay(&self) -> bool;
#[cfg(feature = "Foundation_NSDate")]
#[method_id(@__retain_semantics Other startDate)]
pub unsafe fn startDate(&self) -> Option<Id<NSDate>>;
#[cfg(feature = "Foundation_NSTimeZone")]
#[method_id(@__retain_semantics Other startTimeZone)]
pub unsafe fn startTimeZone(&self) -> Option<Id<NSTimeZone>>;
#[cfg(feature = "Foundation_NSDate")]
#[method_id(@__retain_semantics Other endDate)]
pub unsafe fn endDate(&self) -> Option<Id<NSDate>>;
#[cfg(feature = "Foundation_NSTimeZone")]
#[method_id(@__retain_semantics Other endTimeZone)]
pub unsafe fn endTimeZone(&self) -> Option<Id<NSTimeZone>>;
}
);
extern_methods!(
#[cfg(feature = "DataDetection_DDMatchCalendarEvent")]
unsafe impl DDMatchCalendarEvent {
#[method_id(@__retain_semantics Init init)]
pub unsafe fn init(this: Allocated<Self>) -> Id<Self>;
}
);
extern_methods!(
#[cfg(feature = "DataDetection_DDMatchCalendarEvent")]
unsafe impl DDMatchCalendarEvent {
#[method_id(@__retain_semantics New new)]
pub unsafe fn new() -> Id<Self>;
}
);
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(feature = "DataDetection_DDMatchShipmentTrackingNumber")]
pub struct DDMatchShipmentTrackingNumber;
#[cfg(feature = "DataDetection_DDMatchShipmentTrackingNumber")]
unsafe impl ClassType for DDMatchShipmentTrackingNumber {
#[inherits(NSObject)]
type Super = DDMatch;
type Mutability = InteriorMutable;
}
);
#[cfg(feature = "DataDetection_DDMatchShipmentTrackingNumber")]
unsafe impl NSObjectProtocol for DDMatchShipmentTrackingNumber {}
extern_methods!(
#[cfg(feature = "DataDetection_DDMatchShipmentTrackingNumber")]
unsafe impl DDMatchShipmentTrackingNumber {
#[cfg(feature = "Foundation_NSString")]
#[method_id(@__retain_semantics Other carrier)]
pub unsafe fn carrier(&self) -> Id<NSString>;
#[cfg(feature = "Foundation_NSString")]
#[method_id(@__retain_semantics Other trackingNumber)]
pub unsafe fn trackingNumber(&self) -> Id<NSString>;
}
);
extern_methods!(
#[cfg(feature = "DataDetection_DDMatchShipmentTrackingNumber")]
unsafe impl DDMatchShipmentTrackingNumber {
#[method_id(@__retain_semantics Init init)]
pub unsafe fn init(this: Allocated<Self>) -> Id<Self>;
}
);
extern_methods!(
#[cfg(feature = "DataDetection_DDMatchShipmentTrackingNumber")]
unsafe impl DDMatchShipmentTrackingNumber {
#[method_id(@__retain_semantics New new)]
pub unsafe fn new() -> Id<Self>;
}
);
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(feature = "DataDetection_DDMatchFlightNumber")]
pub struct DDMatchFlightNumber;
#[cfg(feature = "DataDetection_DDMatchFlightNumber")]
unsafe impl ClassType for DDMatchFlightNumber {
#[inherits(NSObject)]
type Super = DDMatch;
type Mutability = InteriorMutable;
}
);
#[cfg(feature = "DataDetection_DDMatchFlightNumber")]
unsafe impl NSObjectProtocol for DDMatchFlightNumber {}
extern_methods!(
#[cfg(feature = "DataDetection_DDMatchFlightNumber")]
unsafe impl DDMatchFlightNumber {
#[cfg(feature = "Foundation_NSString")]
#[method_id(@__retain_semantics Other airline)]
pub unsafe fn airline(&self) -> Id<NSString>;
#[cfg(feature = "Foundation_NSString")]
#[method_id(@__retain_semantics Other flightNumber)]
pub unsafe fn flightNumber(&self) -> Id<NSString>;
}
);
extern_methods!(
#[cfg(feature = "DataDetection_DDMatchFlightNumber")]
unsafe impl DDMatchFlightNumber {
#[method_id(@__retain_semantics Init init)]
pub unsafe fn init(this: Allocated<Self>) -> Id<Self>;
}
);
extern_methods!(
#[cfg(feature = "DataDetection_DDMatchFlightNumber")]
unsafe impl DDMatchFlightNumber {
#[method_id(@__retain_semantics New new)]
pub unsafe fn new() -> Id<Self>;
}
);
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(feature = "DataDetection_DDMatchMoneyAmount")]
pub struct DDMatchMoneyAmount;
#[cfg(feature = "DataDetection_DDMatchMoneyAmount")]
unsafe impl ClassType for DDMatchMoneyAmount {
#[inherits(NSObject)]
type Super = DDMatch;
type Mutability = InteriorMutable;
}
);
#[cfg(feature = "DataDetection_DDMatchMoneyAmount")]
unsafe impl NSObjectProtocol for DDMatchMoneyAmount {}
extern_methods!(
#[cfg(feature = "DataDetection_DDMatchMoneyAmount")]
unsafe impl DDMatchMoneyAmount {
#[cfg(feature = "Foundation_NSString")]
#[method_id(@__retain_semantics Other currency)]
pub unsafe fn currency(&self) -> Id<NSString>;
#[method(amount)]
pub unsafe fn amount(&self) -> c_double;
}
);
extern_methods!(
#[cfg(feature = "DataDetection_DDMatchMoneyAmount")]
unsafe impl DDMatchMoneyAmount {
#[method_id(@__retain_semantics Init init)]
pub unsafe fn init(this: Allocated<Self>) -> Id<Self>;
}
);
extern_methods!(
#[cfg(feature = "DataDetection_DDMatchMoneyAmount")]
unsafe impl DDMatchMoneyAmount {
#[method_id(@__retain_semantics New new)]
pub unsafe fn new() -> Id<Self>;
}
);