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

use crate::*;

extern_class!(
    /// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsscriptcommanddescription?language=objc)
    #[unsafe(super(NSObject))]
    #[derive(Debug, PartialEq, Eq, Hash)]
    pub struct NSScriptCommandDescription;
);

#[cfg(feature = "NSObject")]
extern_conformance!(
    unsafe impl NSCoding for NSScriptCommandDescription {}
);

extern_conformance!(
    unsafe impl NSObjectProtocol for NSScriptCommandDescription {}
);

impl NSScriptCommandDescription {
    extern_methods!(
        #[unsafe(method(init))]
        #[unsafe(method_family = init)]
        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;

        #[cfg(all(feature = "NSDictionary", feature = "NSString"))]
        #[unsafe(method(initWithSuiteName:commandName:dictionary:))]
        #[unsafe(method_family = init)]
        pub unsafe fn initWithSuiteName_commandName_dictionary(
            this: Allocated<Self>,
            suite_name: &NSString,
            command_name: &NSString,
            command_declaration: Option<&NSDictionary>,
        ) -> Option<Retained<Self>>;

        #[cfg(feature = "NSCoder")]
        #[unsafe(method(initWithCoder:))]
        #[unsafe(method_family = init)]
        pub unsafe fn initWithCoder(
            this: Allocated<Self>,
            in_coder: &NSCoder,
        ) -> Option<Retained<Self>>;

        #[cfg(feature = "NSString")]
        #[unsafe(method(suiteName))]
        #[unsafe(method_family = none)]
        pub unsafe fn suiteName(&self) -> Retained<NSString>;

        #[cfg(feature = "NSString")]
        #[unsafe(method(commandName))]
        #[unsafe(method_family = none)]
        pub unsafe fn commandName(&self) -> Retained<NSString>;

        #[unsafe(method(appleEventClassCode))]
        #[unsafe(method_family = none)]
        pub unsafe fn appleEventClassCode(&self) -> FourCharCode;

        #[unsafe(method(appleEventCode))]
        #[unsafe(method_family = none)]
        pub unsafe fn appleEventCode(&self) -> FourCharCode;

        #[cfg(feature = "NSString")]
        #[unsafe(method(commandClassName))]
        #[unsafe(method_family = none)]
        pub unsafe fn commandClassName(&self) -> Retained<NSString>;

        #[cfg(feature = "NSString")]
        #[unsafe(method(returnType))]
        #[unsafe(method_family = none)]
        pub unsafe fn returnType(&self) -> Option<Retained<NSString>>;

        #[unsafe(method(appleEventCodeForReturnType))]
        #[unsafe(method_family = none)]
        pub unsafe fn appleEventCodeForReturnType(&self) -> FourCharCode;

        #[cfg(all(feature = "NSArray", feature = "NSString"))]
        #[unsafe(method(argumentNames))]
        #[unsafe(method_family = none)]
        pub unsafe fn argumentNames(&self) -> Retained<NSArray<NSString>>;

        #[cfg(feature = "NSString")]
        #[unsafe(method(typeForArgumentWithName:))]
        #[unsafe(method_family = none)]
        pub unsafe fn typeForArgumentWithName(
            &self,
            argument_name: &NSString,
        ) -> Option<Retained<NSString>>;

        #[cfg(feature = "NSString")]
        #[unsafe(method(appleEventCodeForArgumentWithName:))]
        #[unsafe(method_family = none)]
        pub unsafe fn appleEventCodeForArgumentWithName(
            &self,
            argument_name: &NSString,
        ) -> FourCharCode;

        #[cfg(feature = "NSString")]
        #[unsafe(method(isOptionalArgumentWithName:))]
        #[unsafe(method_family = none)]
        pub unsafe fn isOptionalArgumentWithName(&self, argument_name: &NSString) -> bool;

        #[cfg(feature = "NSScriptCommand")]
        #[unsafe(method(createCommandInstance))]
        #[unsafe(method_family = none)]
        pub unsafe fn createCommandInstance(&self) -> Retained<NSScriptCommand>;

        #[cfg(all(feature = "NSScriptCommand", feature = "NSZone"))]
        #[unsafe(method(createCommandInstanceWithZone:))]
        #[unsafe(method_family = none)]
        pub unsafe fn createCommandInstanceWithZone(
            &self,
            zone: *mut NSZone,
        ) -> Retained<NSScriptCommand>;
    );
}

/// Methods declared on superclass `NSObject`.
impl NSScriptCommandDescription {
    extern_methods!(
        #[unsafe(method(new))]
        #[unsafe(method_family = new)]
        pub unsafe fn new() -> Retained<Self>;
    );
}
