blob: f5f4ddd5579e6e5faf1b3115177f3c247969f1fb (
plain)
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
|
// SDLPerformInteractionResponse.m
//
#import "SDLPerformInteractionResponse.h"
#import "SDLNames.h"
#import "SDLTriggerSource.h"
@implementation SDLPerformInteractionResponse
- (instancetype)init {
if (self = [super initWithName:NAMES_PerformInteraction]) {
}
return self;
}
- (void)setChoiceID:(NSNumber *)choiceID {
if (choiceID != nil) {
[parameters setObject:choiceID forKey:NAMES_choiceID];
} else {
[parameters removeObjectForKey:NAMES_choiceID];
}
}
- (NSNumber *)choiceID {
return [parameters objectForKey:NAMES_choiceID];
}
- (void)setManualTextEntry:(NSString *)manualTextEntry {
if (manualTextEntry != nil) {
[parameters setObject:manualTextEntry forKey:NAMES_manualTextEntry];
} else {
[parameters removeObjectForKey:NAMES_manualTextEntry];
}
}
- (NSString *)manualTextEntry {
return [parameters objectForKey:NAMES_manualTextEntry];
}
- (void)setTriggerSource:(SDLTriggerSource *)triggerSource {
if (triggerSource != nil) {
[parameters setObject:triggerSource forKey:NAMES_triggerSource];
} else {
[parameters removeObjectForKey:NAMES_triggerSource];
}
}
- (SDLTriggerSource *)triggerSource {
NSObject *obj = [parameters objectForKey:NAMES_triggerSource];
if (obj == nil || [obj isKindOfClass:SDLTriggerSource.class]) {
return (SDLTriggerSource *)obj;
} else {
return [SDLTriggerSource valueOf:(NSString *)obj];
}
}
@end
|