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        #[unsafe(method(setHttpResponse:))]
62        #[unsafe(method_family = none)]
63        pub unsafe fn setHttpResponse(&self, http_response: Option<&NSHTTPURLResponse>);
64
65        /// HTTP response body for OAUth and SAML based authentications.
66        #[unsafe(method(httpBody))]
67        #[unsafe(method_family = none)]
68        pub unsafe fn httpBody(&self) -> Option<Retained<NSData>>;
69
70        /// Setter for [`httpBody`][Self::httpBody].
71        #[unsafe(method(setHttpBody:))]
72        #[unsafe(method_family = none)]
73        pub unsafe fn setHttpBody(&self, http_body: Option<&NSData>);
74
75        /// Private SecKeys.
76        #[unsafe(method(privateKeys))]
77        #[unsafe(method_family = none)]
78        pub unsafe fn privateKeys(&self) -> Retained<NSArray>;
79
80        /// Setter for [`privateKeys`][Self::privateKeys].
81        #[unsafe(method(setPrivateKeys:))]
82        #[unsafe(method_family = none)]
83        pub unsafe fn setPrivateKeys(&self, private_keys: &NSArray);
84    );
85}
86
87/// Methods declared on superclass `NSObject`.
88impl ASAuthorizationProviderExtensionAuthorizationResult {
89    extern_methods!(
90        #[unsafe(method(init))]
91        #[unsafe(method_family = init)]
92        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
93
94        #[unsafe(method(new))]
95        #[unsafe(method_family = new)]
96        pub unsafe fn new() -> Retained<Self>;
97    );
98}