objc2_open_directory/generated/
ODRecordMap.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6use objc2_foundation::*;
7
8use crate::*;
9
10extern_class!(
11    /// [Apple's documentation](https://developer.apple.com/documentation/opendirectory/odrecordmap?language=objc)
12    #[unsafe(super(NSObject))]
13    #[derive(Debug, PartialEq, Eq, Hash)]
14    pub struct ODRecordMap;
15);
16
17extern_conformance!(
18    unsafe impl NSObjectProtocol for ODRecordMap {}
19);
20
21impl ODRecordMap {
22    extern_methods!(
23        #[unsafe(method(native))]
24        #[unsafe(method_family = none)]
25        pub unsafe fn native(&self) -> Retained<NSString>;
26
27        /// Setter for [`native`][Self::native].
28        ///
29        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
30        #[unsafe(method(setNative:))]
31        #[unsafe(method_family = none)]
32        pub unsafe fn setNative(&self, native: Option<&NSString>);
33
34        #[unsafe(method(odPredicate))]
35        #[unsafe(method_family = none)]
36        pub unsafe fn odPredicate(&self) -> Retained<NSDictionary>;
37
38        /// Setter for [`odPredicate`][Self::odPredicate].
39        ///
40        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
41        ///
42        /// # Safety
43        ///
44        /// `od_predicate` generic should be of the correct type.
45        #[unsafe(method(setOdPredicate:))]
46        #[unsafe(method_family = none)]
47        pub unsafe fn setOdPredicate(&self, od_predicate: Option<&NSDictionary>);
48
49        #[unsafe(method(attributes))]
50        #[unsafe(method_family = none)]
51        pub unsafe fn attributes(&self) -> Retained<NSDictionary>;
52
53        #[unsafe(method(standardAttributeTypes))]
54        #[unsafe(method_family = none)]
55        pub unsafe fn standardAttributeTypes(&self) -> Retained<NSArray>;
56
57        /// Returns an initialized and autoreleased ODRecordMap object.
58        ///
59        ///
60        /// Returns an initialized and autoreleased ODRecordMap object.
61        #[unsafe(method(recordMap))]
62        #[unsafe(method_family = none)]
63        pub unsafe fn recordMap() -> Option<Retained<Self>>;
64
65        #[cfg(feature = "ODAttributeMap")]
66        /// Returns an ODAttributeMap object for the given OD standard attribute.
67        ///
68        ///
69        /// Returns an ODAttributeMap object for the given OD standard attribute.
70        ///
71        /// # Safety
72        ///
73        /// `standard_attribute` might not allow `None`.
74        #[unsafe(method(attributeMapForStandardAttribute:))]
75        #[unsafe(method_family = none)]
76        pub unsafe fn attributeMapForStandardAttribute(
77            &self,
78            standard_attribute: Option<&NSString>,
79        ) -> Option<Retained<ODAttributeMap>>;
80
81        #[cfg(feature = "ODAttributeMap")]
82        /// Sets an ODAttributeMap object for a given OD standard attribute.
83        ///
84        ///
85        /// Sets an ODAttributeMap object for a given OD standard attribute.
86        ///
87        /// # Safety
88        ///
89        /// - `attribute_map` might not allow `None`.
90        /// - `standard_attribute` might not allow `None`.
91        #[unsafe(method(setAttributeMap:forStandardAttribute:))]
92        #[unsafe(method_family = none)]
93        pub unsafe fn setAttributeMap_forStandardAttribute(
94            &self,
95            attribute_map: Option<&ODAttributeMap>,
96            standard_attribute: Option<&NSString>,
97        );
98    );
99}
100
101/// Methods declared on superclass `NSObject`.
102impl ODRecordMap {
103    extern_methods!(
104        #[unsafe(method(init))]
105        #[unsafe(method_family = init)]
106        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
107
108        #[unsafe(method(new))]
109        #[unsafe(method_family = new)]
110        pub unsafe fn new() -> Retained<Self>;
111    );
112}