//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;

use crate::*;

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

    unsafe impl ClassType for NSPortMessage {
        type Super = NSObject;
        type Mutability = InteriorMutable;
    }
);

unsafe impl NSObjectProtocol for NSPortMessage {}

extern_methods!(
    unsafe impl NSPortMessage {
        #[cfg(all(feature = "NSArray", feature = "NSPort"))]
        #[method_id(@__retain_semantics Init initWithSendPort:receivePort:components:)]
        pub unsafe fn initWithSendPort_receivePort_components(
            this: Allocated<Self>,
            send_port: Option<&NSPort>,
            reply_port: Option<&NSPort>,
            components: Option<&NSArray>,
        ) -> Retained<Self>;

        #[cfg(feature = "NSArray")]
        #[method_id(@__retain_semantics Other components)]
        pub unsafe fn components(&self) -> Option<Retained<NSArray>>;

        #[cfg(feature = "NSPort")]
        #[method_id(@__retain_semantics Other receivePort)]
        pub unsafe fn receivePort(&self) -> Option<Retained<NSPort>>;

        #[cfg(feature = "NSPort")]
        #[method_id(@__retain_semantics Other sendPort)]
        pub unsafe fn sendPort(&self) -> Option<Retained<NSPort>>;

        #[cfg(feature = "NSDate")]
        #[method(sendBeforeDate:)]
        pub unsafe fn sendBeforeDate(&self, date: &NSDate) -> bool;

        #[method(msgid)]
        pub unsafe fn msgid(&self) -> u32;

        #[method(setMsgid:)]
        pub unsafe fn setMsgid(&self, msgid: u32);
    }
);

extern_methods!(
    /// Methods declared on superclass `NSObject`
    unsafe impl NSPortMessage {
        #[method_id(@__retain_semantics Init init)]
        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;

        #[method_id(@__retain_semantics New new)]
        pub unsafe fn new() -> Retained<Self>;
    }
);
