objc2_authentication_services/generated/
ASAccountAuthenticationModificationReplacePasswordWithSignInWithAppleRequest.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    /// [Apple's documentation](https://developer.apple.com/documentation/authenticationservices/asaccountauthenticationmodificationreplacepasswordwithsigninwithapplerequest?language=objc)
11    #[unsafe(super(ASAccountAuthenticationModificationRequest, NSObject))]
12    #[derive(Debug, PartialEq, Eq, Hash)]
13    #[cfg(feature = "ASAccountAuthenticationModificationRequest")]
14    pub struct ASAccountAuthenticationModificationReplacePasswordWithSignInWithAppleRequest;
15);
16
17#[cfg(feature = "ASAccountAuthenticationModificationRequest")]
18extern_conformance!(
19    unsafe impl NSObjectProtocol
20        for ASAccountAuthenticationModificationReplacePasswordWithSignInWithAppleRequest
21    {
22    }
23);
24
25#[cfg(feature = "ASAccountAuthenticationModificationRequest")]
26impl ASAccountAuthenticationModificationReplacePasswordWithSignInWithAppleRequest {
27    extern_methods!(
28        #[cfg(feature = "ASCredentialServiceIdentifier")]
29        /// Creates a request for a Sign in with Apple upgrade invoked within the extension's containing app.
30        ///
31        /// Parameter `user`: The username for the account to upgrade.
32        ///
33        /// Parameter `serviceIdentifier`: The service identifier of the credential the user wishes to upgrade.
34        ///
35        /// Parameter `userInfo`: A dictionary the app can use to pass information to the extension, most likely to help with authorizing the upgrade.
36        ///
37        /// In this flow, when the extension is invoked from within the containing app, the extension
38        /// will receive an empty password for the credential to upgrade. It should check that it is authorized to perform
39        /// the upgrade. The authorization check should ideally be done with information in userInfo, but may involve
40        /// communicating with a backend server or using a shared data container between the app and extension.
41        #[unsafe(method(initWithUser:serviceIdentifier:userInfo:))]
42        #[unsafe(method_family = init)]
43        pub unsafe fn initWithUser_serviceIdentifier_userInfo(
44            this: Allocated<Self>,
45            user: &NSString,
46            service_identifier: &ASCredentialServiceIdentifier,
47            user_info: Option<&NSDictionary>,
48        ) -> Retained<Self>;
49
50        #[unsafe(method(user))]
51        #[unsafe(method_family = none)]
52        pub unsafe fn user(&self) -> Retained<NSString>;
53
54        #[cfg(feature = "ASCredentialServiceIdentifier")]
55        #[unsafe(method(serviceIdentifier))]
56        #[unsafe(method_family = none)]
57        pub unsafe fn serviceIdentifier(&self) -> Retained<ASCredentialServiceIdentifier>;
58
59        #[unsafe(method(userInfo))]
60        #[unsafe(method_family = none)]
61        pub unsafe fn userInfo(&self) -> Option<Retained<NSDictionary>>;
62    );
63}
64
65/// Methods declared on superclass `NSObject`.
66#[cfg(feature = "ASAccountAuthenticationModificationRequest")]
67impl ASAccountAuthenticationModificationReplacePasswordWithSignInWithAppleRequest {
68    extern_methods!(
69        #[unsafe(method(init))]
70        #[unsafe(method_family = init)]
71        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
72
73        #[unsafe(method(new))]
74        #[unsafe(method_family = new)]
75        pub unsafe fn new() -> Retained<Self>;
76    );
77}