use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(feature = "EKObject")]
pub struct EKRecurrenceRule;
#[cfg(feature = "EKObject")]
unsafe impl ClassType for EKRecurrenceRule {
#[inherits(NSObject)]
type Super = EKObject;
type Mutability = InteriorMutable;
}
);
#[cfg(feature = "EKObject")]
unsafe impl NSCopying for EKRecurrenceRule {}
#[cfg(feature = "EKObject")]
unsafe impl NSObjectProtocol for EKRecurrenceRule {}
extern_methods!(
#[cfg(feature = "EKObject")]
unsafe impl EKRecurrenceRule {
#[cfg(all(feature = "EKRecurrenceEnd", feature = "EKTypes"))]
#[method_id(@__retain_semantics Init initRecurrenceWithFrequency:interval:end:)]
pub unsafe fn initRecurrenceWithFrequency_interval_end(
this: Allocated<Self>,
r#type: EKRecurrenceFrequency,
interval: NSInteger,
end: Option<&EKRecurrenceEnd>,
) -> Retained<Self>;
#[cfg(all(
feature = "EKRecurrenceDayOfWeek",
feature = "EKRecurrenceEnd",
feature = "EKTypes"
))]
#[method_id(@__retain_semantics Init initRecurrenceWithFrequency:interval:daysOfTheWeek:daysOfTheMonth:monthsOfTheYear:weeksOfTheYear:daysOfTheYear:setPositions:end:)]
pub unsafe fn initRecurrenceWithFrequency_interval_daysOfTheWeek_daysOfTheMonth_monthsOfTheYear_weeksOfTheYear_daysOfTheYear_setPositions_end(
this: Allocated<Self>,
r#type: EKRecurrenceFrequency,
interval: NSInteger,
days: Option<&NSArray<EKRecurrenceDayOfWeek>>,
month_days: Option<&NSArray<NSNumber>>,
months: Option<&NSArray<NSNumber>>,
weeks_of_the_year: Option<&NSArray<NSNumber>>,
days_of_the_year: Option<&NSArray<NSNumber>>,
set_positions: Option<&NSArray<NSNumber>>,
end: Option<&EKRecurrenceEnd>,
) -> Retained<Self>;
#[method_id(@__retain_semantics Other calendarIdentifier)]
pub unsafe fn calendarIdentifier(&self) -> Retained<NSString>;
#[cfg(feature = "EKRecurrenceEnd")]
#[method_id(@__retain_semantics Other recurrenceEnd)]
pub unsafe fn recurrenceEnd(&self) -> Option<Retained<EKRecurrenceEnd>>;
#[cfg(feature = "EKRecurrenceEnd")]
#[method(setRecurrenceEnd:)]
pub unsafe fn setRecurrenceEnd(&self, recurrence_end: Option<&EKRecurrenceEnd>);
#[cfg(feature = "EKTypes")]
#[method(frequency)]
pub unsafe fn frequency(&self) -> EKRecurrenceFrequency;
#[method(interval)]
pub unsafe fn interval(&self) -> NSInteger;
#[method(firstDayOfTheWeek)]
pub unsafe fn firstDayOfTheWeek(&self) -> NSInteger;
#[cfg(feature = "EKRecurrenceDayOfWeek")]
#[method_id(@__retain_semantics Other daysOfTheWeek)]
pub unsafe fn daysOfTheWeek(&self) -> Option<Retained<NSArray<EKRecurrenceDayOfWeek>>>;
#[method_id(@__retain_semantics Other daysOfTheMonth)]
pub unsafe fn daysOfTheMonth(&self) -> Option<Retained<NSArray<NSNumber>>>;
#[method_id(@__retain_semantics Other daysOfTheYear)]
pub unsafe fn daysOfTheYear(&self) -> Option<Retained<NSArray<NSNumber>>>;
#[method_id(@__retain_semantics Other weeksOfTheYear)]
pub unsafe fn weeksOfTheYear(&self) -> Option<Retained<NSArray<NSNumber>>>;
#[method_id(@__retain_semantics Other monthsOfTheYear)]
pub unsafe fn monthsOfTheYear(&self) -> Option<Retained<NSArray<NSNumber>>>;
#[method_id(@__retain_semantics Other setPositions)]
pub unsafe fn setPositions(&self) -> Option<Retained<NSArray<NSNumber>>>;
}
);
extern_methods!(
#[cfg(feature = "EKObject")]
unsafe impl EKRecurrenceRule {
#[method_id(@__retain_semantics Init init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[method_id(@__retain_semantics New new)]
pub unsafe fn new() -> Retained<Self>;
}
);