objc2_authentication_services/generated/
ASAuthorizationProviderExtensionUserLoginConfiguration.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/authenticationservices/asauthorizationproviderextensionuserloginconfiguration?language=objc)
12    #[unsafe(super(NSObject))]
13    #[derive(Debug, PartialEq, Eq, Hash)]
14    pub struct ASAuthorizationProviderExtensionUserLoginConfiguration;
15);
16
17extern_conformance!(
18    unsafe impl NSObjectProtocol for ASAuthorizationProviderExtensionUserLoginConfiguration {}
19);
20
21impl ASAuthorizationProviderExtensionUserLoginConfiguration {
22    extern_methods!(
23        #[unsafe(method(init))]
24        #[unsafe(method_family = init)]
25        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
26
27        #[unsafe(method(new))]
28        #[unsafe(method_family = new)]
29        pub unsafe fn new() -> Retained<Self>;
30
31        /// The user name to use when authenticating with the identity provider.
32        #[unsafe(method(loginUserName))]
33        #[unsafe(method_family = none)]
34        pub unsafe fn loginUserName(&self) -> Retained<NSString>;
35
36        /// Setter for [`loginUserName`][Self::loginUserName].
37        ///
38        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
39        #[unsafe(method(setLoginUserName:))]
40        #[unsafe(method_family = none)]
41        pub unsafe fn setLoginUserName(&self, login_user_name: &NSString);
42
43        /// Creates an instance with the required values.
44        ///
45        /// Parameter `loginUserName`: The login user name to use.
46        #[unsafe(method(initWithLoginUserName:))]
47        #[unsafe(method_family = init)]
48        pub unsafe fn initWithLoginUserName(
49            this: Allocated<Self>,
50            login_user_name: &NSString,
51        ) -> Retained<Self>;
52
53        /// Sets custom claims to be added to the embedded assertion request header.
54        ///
55        /// Parameter `claims`: The claims to be added. It must serialize as valid JSON to be accepted.
56        ///
57        /// Parameter `error`: Nil or an NSError indicating why the claims were rejected.
58        ///
59        /// Returns: YES when successful and NO when claims are rejected.
60        ///
61        /// # Safety
62        ///
63        /// `claims` generic should be of the correct type.
64        #[unsafe(method(setCustomAssertionRequestHeaderClaims:returningError:_))]
65        #[unsafe(method_family = none)]
66        pub unsafe fn setCustomAssertionRequestHeaderClaims_returningError(
67            &self,
68            claims: &NSDictionary<NSString, AnyObject>,
69        ) -> Result<(), Retained<NSError>>;
70
71        /// Sets custom claims to be added to the embedded assertion request body.
72        ///
73        /// Parameter `claims`: The claims to be added. It must serialize as valid JSON to be accepted.
74        ///
75        /// Parameter `error`: Nil or an NSError indicating why the claims were rejected.
76        ///
77        /// Returns: YES when successful and NO when claims are rejected.
78        ///
79        /// # Safety
80        ///
81        /// `claims` generic should be of the correct type.
82        #[unsafe(method(setCustomAssertionRequestBodyClaims:returningError:_))]
83        #[unsafe(method_family = none)]
84        pub unsafe fn setCustomAssertionRequestBodyClaims_returningError(
85            &self,
86            claims: &NSDictionary<NSString, AnyObject>,
87        ) -> Result<(), Retained<NSError>>;
88
89        /// Sets custom claims to be added to the login request header.
90        ///
91        /// Parameter `claims`: The claims to be added. It must serialize as valid JSON to be accepted.
92        ///
93        /// Parameter `error`: Nil or an NSError indicating why the claims were rejected.
94        ///
95        /// Returns: YES when successful and NO when claims are rejected.
96        ///
97        /// # Safety
98        ///
99        /// `claims` generic should be of the correct type.
100        #[unsafe(method(setCustomLoginRequestHeaderClaims:returningError:_))]
101        #[unsafe(method_family = none)]
102        pub unsafe fn setCustomLoginRequestHeaderClaims_returningError(
103            &self,
104            claims: &NSDictionary<NSString, AnyObject>,
105        ) -> Result<(), Retained<NSError>>;
106
107        /// Sets custom claims to be added to the login request body.
108        ///
109        /// Parameter `claims`: The claims to be added. It must serialize as valid JSON to be accepted.
110        ///
111        /// Parameter `error`: Nil or an NSError indicating why the claims were rejected.
112        ///
113        /// Returns: YES when successful and NO when claims are rejected.
114        ///
115        /// # Safety
116        ///
117        /// `claims` generic should be of the correct type.
118        #[unsafe(method(setCustomLoginRequestBodyClaims:returningError:_))]
119        #[unsafe(method_family = none)]
120        pub unsafe fn setCustomLoginRequestBodyClaims_returningError(
121            &self,
122            claims: &NSDictionary<NSString, AnyObject>,
123        ) -> Result<(), Retained<NSError>>;
124    );
125}