objc2_authentication_services/generated/
ASAuthorizationSingleSignOnRequest.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/asauthorizationsinglesignonrequest?language=objc)
12    #[unsafe(super(ASAuthorizationOpenIDRequest, ASAuthorizationRequest, NSObject))]
13    #[derive(Debug, PartialEq, Eq, Hash)]
14    #[cfg(all(
15        feature = "ASAuthorizationOpenIDRequest",
16        feature = "ASAuthorizationRequest"
17    ))]
18    pub struct ASAuthorizationSingleSignOnRequest;
19);
20
21#[cfg(all(
22    feature = "ASAuthorizationOpenIDRequest",
23    feature = "ASAuthorizationRequest"
24))]
25extern_conformance!(
26    unsafe impl NSCoding for ASAuthorizationSingleSignOnRequest {}
27);
28
29#[cfg(all(
30    feature = "ASAuthorizationOpenIDRequest",
31    feature = "ASAuthorizationRequest"
32))]
33extern_conformance!(
34    unsafe impl NSCopying for ASAuthorizationSingleSignOnRequest {}
35);
36
37#[cfg(all(
38    feature = "ASAuthorizationOpenIDRequest",
39    feature = "ASAuthorizationRequest"
40))]
41unsafe impl CopyingHelper for ASAuthorizationSingleSignOnRequest {
42    type Result = Self;
43}
44
45#[cfg(all(
46    feature = "ASAuthorizationOpenIDRequest",
47    feature = "ASAuthorizationRequest"
48))]
49extern_conformance!(
50    unsafe impl NSObjectProtocol for ASAuthorizationSingleSignOnRequest {}
51);
52
53#[cfg(all(
54    feature = "ASAuthorizationOpenIDRequest",
55    feature = "ASAuthorizationRequest"
56))]
57extern_conformance!(
58    unsafe impl NSSecureCoding for ASAuthorizationSingleSignOnRequest {}
59);
60
61#[cfg(all(
62    feature = "ASAuthorizationOpenIDRequest",
63    feature = "ASAuthorizationRequest"
64))]
65impl ASAuthorizationSingleSignOnRequest {
66    extern_methods!(
67        /// Parameters required by the specific Authorization Server which should be used by the selected Authorization Services extension for authorization.
68        #[unsafe(method(authorizationOptions))]
69        #[unsafe(method_family = none)]
70        pub unsafe fn authorizationOptions(&self) -> Retained<NSArray<NSURLQueryItem>>;
71
72        /// Setter for [`authorizationOptions`][Self::authorizationOptions].
73        #[unsafe(method(setAuthorizationOptions:))]
74        #[unsafe(method_family = none)]
75        pub unsafe fn setAuthorizationOptions(
76            &self,
77            authorization_options: &NSArray<NSURLQueryItem>,
78        );
79
80        /// Enables or disables the authorization user interface.
81        ///
82        /// The default values is YES. If user interface is not enabled, then the authorization will fail with
83        ///
84        /// See: ASAuthorizationErrorNotInteractive if it attempts to display the authorization user interface.
85        #[unsafe(method(isUserInterfaceEnabled))]
86        #[unsafe(method_family = none)]
87        pub unsafe fn isUserInterfaceEnabled(&self) -> bool;
88
89        /// Setter for [`isUserInterfaceEnabled`][Self::isUserInterfaceEnabled].
90        #[unsafe(method(setUserInterfaceEnabled:))]
91        #[unsafe(method_family = none)]
92        pub unsafe fn setUserInterfaceEnabled(&self, user_interface_enabled: bool);
93    );
94}
95
96/// Methods declared on superclass `ASAuthorizationRequest`.
97#[cfg(all(
98    feature = "ASAuthorizationOpenIDRequest",
99    feature = "ASAuthorizationRequest"
100))]
101impl ASAuthorizationSingleSignOnRequest {
102    extern_methods!(
103        #[unsafe(method(new))]
104        #[unsafe(method_family = new)]
105        pub unsafe fn new() -> Retained<Self>;
106
107        #[unsafe(method(init))]
108        #[unsafe(method_family = init)]
109        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
110    );
111}