1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
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!(
    /// Methods declared on superclass `NSObject`
    #[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>;
    }
);