use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct AMWorkflow;
unsafe impl ClassType for AMWorkflow {
type Super = NSObject;
type Mutability = InteriorMutable;
}
);
unsafe impl NSCopying for AMWorkflow {}
unsafe impl NSObjectProtocol for AMWorkflow {}
extern_methods!(
unsafe impl AMWorkflow {
#[method_id(@__retain_semantics Other runWorkflowAtURL:withInput:error:_)]
pub unsafe fn runWorkflowAtURL_withInput_error(
file_url: &NSURL,
input: Option<&AnyObject>,
) -> Result<Retained<AnyObject>, Retained<NSError>>;
#[method_id(@__retain_semantics Init init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[method_id(@__retain_semantics Init initWithContentsOfURL:error:_)]
pub unsafe fn initWithContentsOfURL_error(
this: Allocated<Self>,
file_url: &NSURL,
) -> Result<Retained<Self>, Retained<NSError>>;
#[method(writeToURL:error:_)]
pub unsafe fn writeToURL_error(&self, file_url: &NSURL) -> Result<(), Retained<NSError>>;
#[method(setValue:forVariableWithName:)]
pub unsafe fn setValue_forVariableWithName(
&self,
value: Option<&AnyObject>,
variable_name: &NSString,
) -> bool;
#[method_id(@__retain_semantics Other valueForVariableWithName:)]
pub unsafe fn valueForVariableWithName(
&self,
variable_name: &NSString,
) -> Option<Retained<AnyObject>>;
#[cfg(feature = "AMAction")]
#[method(addAction:)]
pub unsafe fn addAction(&self, action: &AMAction);
#[cfg(feature = "AMAction")]
#[method(removeAction:)]
pub unsafe fn removeAction(&self, action: &AMAction);
#[cfg(feature = "AMAction")]
#[method(insertAction:atIndex:)]
pub unsafe fn insertAction_atIndex(&self, action: &AMAction, index: NSUInteger);
#[method(moveActionAtIndex:toIndex:)]
pub unsafe fn moveActionAtIndex_toIndex(
&self,
start_index: NSUInteger,
end_index: NSUInteger,
);
#[method_id(@__retain_semantics Other fileURL)]
pub unsafe fn fileURL(&self) -> Option<Retained<NSURL>>;
#[cfg(feature = "AMAction")]
#[method_id(@__retain_semantics Other actions)]
pub unsafe fn actions(&self) -> Retained<NSArray<AMAction>>;
#[method_id(@__retain_semantics Other input)]
pub unsafe fn input(&self) -> Option<Retained<AnyObject>>;
#[method(setInput:)]
pub unsafe fn setInput(&self, input: Option<&AnyObject>);
#[method_id(@__retain_semantics Other output)]
pub unsafe fn output(&self) -> Option<Retained<AnyObject>>;
}
);
extern_methods!(
unsafe impl AMWorkflow {
#[method_id(@__retain_semantics New new)]
pub unsafe fn new() -> Retained<Self>;
}
);