use core::ptr::NonNull;
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
extern_class!(
#[unsafe(super(NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct ASPasswordCredential;
);
#[cfg(feature = "ASAuthorizationCredential")]
extern_conformance!(
unsafe impl ASAuthorizationCredential for ASPasswordCredential {}
);
extern_conformance!(
unsafe impl NSCoding for ASPasswordCredential {}
);
extern_conformance!(
unsafe impl NSCopying for ASPasswordCredential {}
);
unsafe impl CopyingHelper for ASPasswordCredential {
type Result = Self;
}
extern_conformance!(
unsafe impl NSObjectProtocol for ASPasswordCredential {}
);
extern_conformance!(
unsafe impl NSSecureCoding for ASPasswordCredential {}
);
impl ASPasswordCredential {
extern_methods!(
#[unsafe(method(initWithUser:password:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithUser_password(
this: Allocated<Self>,
user: &NSString,
password: &NSString,
) -> Retained<Self>;
#[unsafe(method(credentialWithUser:password:))]
#[unsafe(method_family = none)]
pub unsafe fn credentialWithUser_password(
user: &NSString,
password: &NSString,
) -> Retained<Self>;
#[unsafe(method(user))]
#[unsafe(method_family = none)]
pub unsafe fn user(&self) -> Retained<NSString>;
#[unsafe(method(password))]
#[unsafe(method_family = none)]
pub unsafe fn password(&self) -> Retained<NSString>;
);
}
impl ASPasswordCredential {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}