JLChen
2021-11-29 06c09ecbdf83cc5cc33971ffb75ba81e85b6eb33
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
//
// HDLRunSceneIntent.m
//
// This file was automatically generated and should not be edited.
//
 
#import "HDLRunSceneIntent.h"
 
#if __has_include(<Intents/Intents.h>) && !TARGET_OS_TV
 
@implementation HDLRunSceneIntent
 
@dynamic controlName, controlId, homeId, controlType, controlJSONStr, actionName;
 
@end
 
@interface HDLRunSceneIntentResponse ()
 
@property (readwrite, NS_NONATOMIC_IOSONLY) HDLRunSceneIntentResponseCode code;
 
@end
 
@implementation HDLRunSceneIntentResponse
 
@synthesize code = _code;
 
@dynamic errorMessage, successMessage, controlName;
 
- (instancetype)initWithCode:(HDLRunSceneIntentResponseCode)code userActivity:(nullable NSUserActivity *)userActivity {
    self = [super init];
    if (self) {
        _code = code;
        self.userActivity = userActivity;
    }
    return self;
}
 
+ (instancetype)successIntentResponseWithControlName:(NSString *)controlName {
    HDLRunSceneIntentResponse *intentResponse = [[HDLRunSceneIntentResponse alloc] initWithCode:HDLRunSceneIntentResponseCodeSuccess userActivity:nil];
    intentResponse.controlName = controlName;
    return intentResponse;
}
 
+ (instancetype)failureIntentResponseWithErrorMessage:(NSString *)errorMessage {
    HDLRunSceneIntentResponse *intentResponse = [[HDLRunSceneIntentResponse alloc] initWithCode:HDLRunSceneIntentResponseCodeFailure userActivity:nil];
    intentResponse.errorMessage = errorMessage;
    return intentResponse;
}
 
@end
 
#endif