objc2_authentication_services/generated/
ASAuthorizationProviderExtensionAuthorizationResult.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/asauthorizationproviderextensionauthorizationresult?language=objc)
12    #[unsafe(super(NSObject))]
13    #[derive(Debug, PartialEq, Eq, Hash)]
14    pub struct ASAuthorizationProviderExtensionAuthorizationResult;
15);
16
17extern_conformance!(
18    unsafe impl NSObjectProtocol for ASAuthorizationProviderExtensionAuthorizationResult {}
19);
20
21impl ASAuthorizationProviderExtensionAuthorizationResult {
22    extern_methods!(
23        /// Authorization succeeded with an authorization tokens stored in HTTP headers.
24        #[unsafe(method(initWithHTTPAuthorizationHeaders:))]
25        #[unsafe(method_family = init)]
26        pub unsafe fn initWithHTTPAuthorizationHeaders(
27            this: Allocated<Self>,
28            http_authorization_headers: &NSDictionary<NSString, NSString>,
29        ) -> Retained<Self>;
30
31        /// Authorization succeeded with a HTTP response.
32        #[unsafe(method(initWithHTTPResponse:httpBody:))]
33        #[unsafe(method_family = init)]
34        pub unsafe fn initWithHTTPResponse_httpBody(
35            this: Allocated<Self>,
36            http_response: &NSHTTPURLResponse,
37            http_body: Option<&NSData>,
38        ) -> Retained<Self>;
39
40        /// HTTP extra headers for addition with credentials.
41        #[unsafe(method(httpAuthorizationHeaders))]
42        #[unsafe(method_family = none)]
43        pub unsafe fn httpAuthorizationHeaders(
44            &self,
45        ) -> Option<Retained<NSDictionary<NSString, NSString>>>;
46
47        /// Setter for [`httpAuthorizationHeaders`][Self::httpAuthorizationHeaders].
48        #[unsafe(method(setHttpAuthorizationHeaders:))]
49        #[unsafe(method_family = none)]
50        pub unsafe fn setHttpAuthorizationHeaders(
51            &self,
52            http_authorization_headers: Option<&NSDictionary<NSString, NSString>>,
53        );
54
55        /// HTTP response for OAUth and SAML based authentications.
56        #[unsafe(method(httpResponse))]
57        #[unsafe(method_family = none)]
58        pub unsafe fn httpResponse(&self) -> Option<Retained<NSHTTPURLResponse>>;
59
60        /// Setter for [`httpResponse`][Self::httpResponse].
61        ///
62        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
63        #[unsafe(method(setHttpResponse:))]
64        #[unsafe(method_family = none)]
65        pub unsafe fn setHttpResponse(&self, http_response: Option<&NSHTTPURLResponse>);
66
67        /// HTTP response body for OAUth and SAML based authentications.
68        #[unsafe(method(httpBody))]
69        #[unsafe(method_family = none)]
70        pub unsafe fn httpBody(&self) -> Option<Retained<NSData>>;
71
72        /// Setter for [`httpBody`][Self::httpBody].
73        #[unsafe(method(setHttpBody:))]
74        #[unsafe(method_family = none)]
75        pub unsafe fn setHttpBody(&self, http_body: Option<&NSData>);
76
77        /// Private SecKeys.
78        #[unsafe(method(privateKeys))]
79        #[unsafe(method_family = none)]
80        pub unsafe fn privateKeys(&self) -> Retained<NSArray>;
81
82        /// Setter for [`privateKeys`][Self::privateKeys].
83        ///
84        /// # Safety
85        ///
86        /// `private_keys` generic should be of the correct type.
87        #[unsafe(method(setPrivateKeys:))]
88        #[unsafe(method_family = none)]
89        pub unsafe fn setPrivateKeys(&self, private_keys: &NSArray);
90    );
91}
92
93/// Methods declared on superclass `NSObject`.
94impl ASAuthorizationProviderExtensionAuthorizationResult {
95    extern_methods!(
96        #[unsafe(method(init))]
97        #[unsafe(method_family = init)]
98        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
99
100        #[unsafe(method(new))]
101        #[unsafe(method_family = new)]
102        pub unsafe fn new() -> Retained<Self>;
103    );
104}