objc2_authentication_services/generated/ASCredentialIdentity.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_protocol!(
11 /// An ASCredentialIdentity is used to describe an identity that can use a service upon successful authentication.
12 /// Use this class to save entries into ASCredentialIdentityStore.
13 ///
14 /// See also [Apple's documentation](https://developer.apple.com/documentation/authenticationservices/ascredentialidentity?language=objc)
15 pub unsafe trait ASCredentialIdentity: NSObjectProtocol {
16 #[cfg(feature = "ASCredentialServiceIdentifier")]
17 /// Get the service identifier.
18 #[unsafe(method(serviceIdentifier))]
19 #[unsafe(method_family = none)]
20 unsafe fn serviceIdentifier(&self) -> Retained<ASCredentialServiceIdentifier>;
21
22 /// Get the user.
23 #[unsafe(method(user))]
24 #[unsafe(method_family = none)]
25 unsafe fn user(&self) -> Retained<NSString>;
26
27 /// Get the record identifier.
28 ///
29 /// You can utilize the record identifier to uniquely identify the credential identity in your local database.
30 #[unsafe(method(recordIdentifier))]
31 #[unsafe(method_family = none)]
32 unsafe fn recordIdentifier(&self) -> Option<Retained<NSString>>;
33
34 /// Get or set the rank of the credential identity object.
35 ///
36 /// The system may utilize the rank to decide which credential identity precedes the other
37 /// if two identities have the same service identifier. A credential identity with a larger rank value
38 /// precedes one with a smaller value if both credential identities have the same service identifier.
39 /// The default value of this property is 0.
40 #[unsafe(method(rank))]
41 #[unsafe(method_family = none)]
42 unsafe fn rank(&self) -> NSInteger;
43
44 /// Setter for [`rank`][Self::rank].
45 #[unsafe(method(setRank:))]
46 #[unsafe(method_family = none)]
47 unsafe fn setRank(&self, rank: NSInteger);
48 }
49);