JLChen
2021-11-26 f26dfd48aa7bf4c194863cc3b3f47d38bc8a2d57
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 sceneName, sceneId;
 
@end
 
@interface HDLRunSceneIntentResponse ()
 
@property (readwrite, NS_NONATOMIC_IOSONLY) HDLRunSceneIntentResponseCode code;
 
@end
 
@implementation HDLRunSceneIntentResponse
 
@synthesize code = _code;
 
@dynamic errorMessage, successMessage, sceneName;
 
- (instancetype)initWithCode:(HDLRunSceneIntentResponseCode)code userActivity:(nullable NSUserActivity *)userActivity {
    self = [super init];
    if (self) {
        _code = code;
        self.userActivity = userActivity;
    }
    return self;
}
 
+ (instancetype)successIntentResponseWithSceneName:(NSString *)sceneName {
    HDLRunSceneIntentResponse *intentResponse = [[HDLRunSceneIntentResponse alloc] initWithCode:HDLRunSceneIntentResponseCodeSuccess userActivity:nil];
    intentResponse.sceneName = sceneName;
    return intentResponse;
}
 
+ (instancetype)failureIntentResponseWithErrorMessage:(NSString *)errorMessage {
    HDLRunSceneIntentResponse *intentResponse = [[HDLRunSceneIntentResponse alloc] initWithCode:HDLRunSceneIntentResponseCodeFailure userActivity:nil];
    intentResponse.errorMessage = errorMessage;
    return intentResponse;
}
 
@end
 
#endif