icrate 0.0.1

Bindings to Apple's frameworks
Documentation
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use crate::common::*;
use crate::AuthenticationServices::*;
use crate::Foundation::*;

ns_enum!(
    #[underlying(NSInteger)]
    pub enum ASUserDetectionStatus {
        ASUserDetectionStatusUnsupported = 0,
        ASUserDetectionStatusUnknown = 1,
        ASUserDetectionStatusLikelyReal = 2,
    }
);

extern_class!(
    #[derive(Debug, PartialEq, Eq, Hash)]
    pub struct ASAuthorizationAppleIDCredential;

    unsafe impl ClassType for ASAuthorizationAppleIDCredential {
        type Super = NSObject;
    }
);

extern_methods!(
    unsafe impl ASAuthorizationAppleIDCredential {
        #[method_id(@__retain_semantics Other user)]
        pub unsafe fn user(&self) -> Id<NSString, Shared>;

        #[method_id(@__retain_semantics Other state)]
        pub unsafe fn state(&self) -> Option<Id<NSString, Shared>>;

        #[method_id(@__retain_semantics Other authorizedScopes)]
        pub unsafe fn authorizedScopes(&self) -> Id<NSArray<ASAuthorizationScope>, Shared>;

        #[method_id(@__retain_semantics Other authorizationCode)]
        pub unsafe fn authorizationCode(&self) -> Option<Id<NSData, Shared>>;

        #[method_id(@__retain_semantics Other identityToken)]
        pub unsafe fn identityToken(&self) -> Option<Id<NSData, Shared>>;

        #[method_id(@__retain_semantics Other email)]
        pub unsafe fn email(&self) -> Option<Id<NSString, Shared>>;

        #[method_id(@__retain_semantics Other fullName)]
        pub unsafe fn fullName(&self) -> Option<Id<NSPersonNameComponents, Shared>>;

        #[method(realUserStatus)]
        pub unsafe fn realUserStatus(&self) -> ASUserDetectionStatus;

        #[method_id(@__retain_semantics New new)]
        pub unsafe fn new() -> Id<Self, Shared>;

        #[method_id(@__retain_semantics Init init)]
        pub unsafe fn init(this: Option<Allocated<Self>>) -> Id<Self, Shared>;
    }
);