1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
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<Id<AnyObject>, Id<NSError>>;

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

        #[method_id(@__retain_semantics Init initWithContentsOfURL:error:_)]
        pub unsafe fn initWithContentsOfURL_error(
            this: Allocated<Self>,
            file_url: &NSURL,
        ) -> Result<Id<Self>, Id<NSError>>;

        #[method(writeToURL:error:_)]
        pub unsafe fn writeToURL_error(&self, file_url: &NSURL) -> Result<(), Id<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<Id<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<Id<NSURL>>;

        #[cfg(feature = "AMAction")]
        #[method_id(@__retain_semantics Other actions)]
        pub unsafe fn actions(&self) -> Id<NSArray<AMAction>>;

        #[method_id(@__retain_semantics Other input)]
        pub unsafe fn input(&self) -> Option<Id<AnyObject>>;

        #[method(setInput:)]
        pub unsafe fn setInput(&self, input: Option<&AnyObject>);

        #[method_id(@__retain_semantics Other output)]
        pub unsafe fn output(&self) -> Option<Id<AnyObject>>;
    }
);

extern_methods!(
    /// Methods declared on superclass `NSObject`
    unsafe impl AMWorkflow {
        #[method_id(@__retain_semantics New new)]
        pub unsafe fn new() -> Id<Self>;
    }
);