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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use core::ffi::*;
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
extern_class!(
/// An ASPasswordCredentialIdentity is used to describe an identity that can use a service upon successful password based authentication.
/// Use this class to save entries into ASCredentialIdentityStore.
///
/// See also [Apple's documentation](https://developer.apple.com/documentation/authenticationservices/aspasswordcredentialidentity?language=objc)
#[unsafe(super(NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct ASPasswordCredentialIdentity;
);
#[cfg(feature = "ASCredentialIdentity")]
extern_conformance!(
unsafe impl ASCredentialIdentity for ASPasswordCredentialIdentity {}
);
extern_conformance!(
unsafe impl NSCoding for ASPasswordCredentialIdentity {}
);
extern_conformance!(
unsafe impl NSCopying for ASPasswordCredentialIdentity {}
);
unsafe impl CopyingHelper for ASPasswordCredentialIdentity {
type Result = Self;
}
extern_conformance!(
unsafe impl NSObjectProtocol for ASPasswordCredentialIdentity {}
);
extern_conformance!(
unsafe impl NSSecureCoding for ASPasswordCredentialIdentity {}
);
impl ASPasswordCredentialIdentity {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[cfg(feature = "ASCredentialServiceIdentifier")]
/// Initializes an instance of ASPasswordCredentialIdentity.
///
/// Parameter `serviceIdentifier`: the service identifier for which this credential identity is valid.
///
/// Parameter `user`: the user that can authenticate into the service indicated by the serviceIdentifier.
///
/// Parameter `recordIdentifier`: an optional string to uniquely identify this record in your local database.
#[unsafe(method(initWithServiceIdentifier:user:recordIdentifier:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithServiceIdentifier_user_recordIdentifier(
this: Allocated<Self>,
service_identifier: &ASCredentialServiceIdentifier,
user: &NSString,
record_identifier: Option<&NSString>,
) -> Retained<Self>;
#[cfg(feature = "ASCredentialServiceIdentifier")]
/// Creates and initializes an instance of ASPasswordCredentialIdentity.
///
/// Parameter `serviceIdentifier`: the service identifier for which this credential identity is valid.
///
/// Parameter `user`: the user that can authenticate into the service indicated by the serviceIdentifier.
///
/// Parameter `recordIdentifier`: an optional string to uniquely identify this record in your local database.
#[unsafe(method(identityWithServiceIdentifier:user:recordIdentifier:))]
#[unsafe(method_family = none)]
pub unsafe fn identityWithServiceIdentifier_user_recordIdentifier(
service_identifier: &ASCredentialServiceIdentifier,
user: &NSString,
record_identifier: Option<&NSString>,
) -> Retained<Self>;
#[cfg(feature = "ASCredentialServiceIdentifier")]
/// Get the service identifier.
///
/// Returns: The service identifier for this credential identity.
#[unsafe(method(serviceIdentifier))]
#[unsafe(method_family = none)]
pub unsafe fn serviceIdentifier(&self) -> Retained<ASCredentialServiceIdentifier>;
/// Get the user.
///
/// Returns: The user string.
#[unsafe(method(user))]
#[unsafe(method_family = none)]
pub unsafe fn user(&self) -> Retained<NSString>;
/// Get the record identifier.
///
/// Returns: The record identifier.
///
/// You can utilize the record identifier to uniquely identify the credential identity in your local database.
#[unsafe(method(recordIdentifier))]
#[unsafe(method_family = none)]
pub unsafe fn recordIdentifier(&self) -> Option<Retained<NSString>>;
/// Get or set the rank of the credential identity object.
///
/// The system may utilize the rank to decide which credential identity precedes the other
/// if two identities have the same service identifier. A credential identity with a larger rank value
/// precedes one with a smaller value if both credential identities have the same service identifier.
/// The default value of this property is 0.
#[unsafe(method(rank))]
#[unsafe(method_family = none)]
pub unsafe fn rank(&self) -> NSInteger;
/// Setter for [`rank`][Self::rank].
#[unsafe(method(setRank:))]
#[unsafe(method_family = none)]
pub unsafe fn setRank(&self, rank: NSInteger);
);
}
/// Methods declared on superclass `NSObject`.
impl ASPasswordCredentialIdentity {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}