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
111
112
113
114
115
//! 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)]
    pub struct NSPropertyDescription;

    unsafe impl ClassType for NSPropertyDescription {
        type Super = NSObject;
        type Mutability = InteriorMutable;
    }
);

unsafe impl NSCoding for NSPropertyDescription {}

unsafe impl NSCopying for NSPropertyDescription {}

unsafe impl NSObjectProtocol for NSPropertyDescription {}

extern_methods!(
    unsafe impl NSPropertyDescription {
        #[cfg(feature = "NSEntityDescription")]
        #[method_id(@__retain_semantics Other entity)]
        pub unsafe fn entity(&self) -> Retained<NSEntityDescription>;

        #[method_id(@__retain_semantics Other name)]
        pub unsafe fn name(&self) -> Retained<NSString>;

        #[method(setName:)]
        pub unsafe fn setName(&self, name: &NSString);

        #[method(isOptional)]
        pub unsafe fn isOptional(&self) -> bool;

        #[method(setOptional:)]
        pub unsafe fn setOptional(&self, optional: bool);

        #[method(isTransient)]
        pub unsafe fn isTransient(&self) -> bool;

        #[method(setTransient:)]
        pub unsafe fn setTransient(&self, transient: bool);

        #[method_id(@__retain_semantics Other validationPredicates)]
        pub unsafe fn validationPredicates(&self) -> Retained<NSArray<NSPredicate>>;

        #[method_id(@__retain_semantics Other validationWarnings)]
        pub unsafe fn validationWarnings(&self) -> Retained<NSArray>;

        #[method(setValidationPredicates:withValidationWarnings:)]
        pub unsafe fn setValidationPredicates_withValidationWarnings(
            &self,
            validation_predicates: Option<&NSArray<NSPredicate>>,
            validation_warnings: Option<&NSArray<NSString>>,
        );

        #[method_id(@__retain_semantics Other userInfo)]
        pub unsafe fn userInfo(&self) -> Option<Retained<NSDictionary>>;

        #[method(setUserInfo:)]
        pub unsafe fn setUserInfo(&self, user_info: Option<&NSDictionary>);

        #[deprecated = "Use NSEntityDescription.indexes instead"]
        #[method(isIndexed)]
        pub unsafe fn isIndexed(&self) -> bool;

        #[deprecated = "Use NSEntityDescription.indexes instead"]
        #[method(setIndexed:)]
        pub unsafe fn setIndexed(&self, indexed: bool);

        #[method_id(@__retain_semantics Other versionHash)]
        pub unsafe fn versionHash(&self) -> Retained<NSData>;

        #[method_id(@__retain_semantics Other versionHashModifier)]
        pub unsafe fn versionHashModifier(&self) -> Option<Retained<NSString>>;

        #[method(setVersionHashModifier:)]
        pub unsafe fn setVersionHashModifier(&self, version_hash_modifier: Option<&NSString>);

        #[method(isIndexedBySpotlight)]
        pub unsafe fn isIndexedBySpotlight(&self) -> bool;

        #[method(setIndexedBySpotlight:)]
        pub unsafe fn setIndexedBySpotlight(&self, indexed_by_spotlight: bool);

        #[deprecated = "Spotlight integration is deprecated. Use CoreSpotlight integration instead."]
        #[method(isStoredInExternalRecord)]
        pub unsafe fn isStoredInExternalRecord(&self) -> bool;

        #[deprecated = "Spotlight integration is deprecated. Use CoreSpotlight integration instead."]
        #[method(setStoredInExternalRecord:)]
        pub unsafe fn setStoredInExternalRecord(&self, stored_in_external_record: bool);

        #[method_id(@__retain_semantics Other renamingIdentifier)]
        pub unsafe fn renamingIdentifier(&self) -> Option<Retained<NSString>>;

        #[method(setRenamingIdentifier:)]
        pub unsafe fn setRenamingIdentifier(&self, renaming_identifier: Option<&NSString>);
    }
);

extern_methods!(
    /// Methods declared on superclass `NSObject`
    unsafe impl NSPropertyDescription {
        #[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>;
    }
);