objc2_authentication_services/generated/
ASOneTimeCodeCredentialIdentity.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ptr::NonNull;
4use objc2::__framework_prelude::*;
5use objc2_foundation::*;
6
7use crate::*;
8
9extern_class!(
10    /// An ASOneTimeCodeCredentialIdentity is used to describe an identity that can use a service upon successful one time code based authentication.
11    /// Use this class to save entries into ASCredentialIdentityStore.
12    ///
13    /// See also [Apple's documentation](https://developer.apple.com/documentation/authenticationservices/asonetimecodecredentialidentity?language=objc)
14    #[unsafe(super(NSObject))]
15    #[derive(Debug, PartialEq, Eq, Hash)]
16    pub struct ASOneTimeCodeCredentialIdentity;
17);
18
19#[cfg(feature = "ASCredentialIdentity")]
20extern_conformance!(
21    unsafe impl ASCredentialIdentity for ASOneTimeCodeCredentialIdentity {}
22);
23
24extern_conformance!(
25    unsafe impl NSCoding for ASOneTimeCodeCredentialIdentity {}
26);
27
28extern_conformance!(
29    unsafe impl NSCopying for ASOneTimeCodeCredentialIdentity {}
30);
31
32unsafe impl CopyingHelper for ASOneTimeCodeCredentialIdentity {
33    type Result = Self;
34}
35
36extern_conformance!(
37    unsafe impl NSObjectProtocol for ASOneTimeCodeCredentialIdentity {}
38);
39
40extern_conformance!(
41    unsafe impl NSSecureCoding for ASOneTimeCodeCredentialIdentity {}
42);
43
44impl ASOneTimeCodeCredentialIdentity {
45    extern_methods!(
46        #[unsafe(method(init))]
47        #[unsafe(method_family = init)]
48        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
49
50        #[cfg(feature = "ASCredentialServiceIdentifier")]
51        /// Initializes an instance of ASOneTimeCodeCredentialIdentity.
52        ///
53        /// Parameter `serviceIdentifier`: The service identifier for which this credential identity is valid.
54        ///
55        /// Parameter `label`: A user-provided label to identify the one time code.
56        ///
57        /// Parameter `recordIdentifier`: An optional string to uniquely identify this record in your local database.
58        #[unsafe(method(initWithServiceIdentifier:label:recordIdentifier:))]
59        #[unsafe(method_family = init)]
60        pub unsafe fn initWithServiceIdentifier_label_recordIdentifier(
61            this: Allocated<Self>,
62            service_identifier: &ASCredentialServiceIdentifier,
63            label: &NSString,
64            record_identifier: Option<&NSString>,
65        ) -> Retained<Self>;
66
67        /// A label to identify the one time code, typically supplied by the user.
68        /// This string will be shown in the AutoFill suggestion for this one time code credential.
69        #[unsafe(method(label))]
70        #[unsafe(method_family = none)]
71        pub unsafe fn label(&self) -> Retained<NSString>;
72    );
73}
74
75/// Methods declared on superclass `NSObject`.
76impl ASOneTimeCodeCredentialIdentity {
77    extern_methods!(
78        #[unsafe(method(new))]
79        #[unsafe(method_family = new)]
80        pub unsafe fn new() -> Retained<Self>;
81    );
82}