blob: 5babd37b5d9fe19f97ed4cc112cd5ffde0d9b118 (
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
|
// SDLDeviceLevelStatus.m
//
#import "SDLDeviceLevelStatus.h"
SDLDeviceLevelStatus *SDLDeviceLevelStatus_ZERO_LEVEL_BARS = nil;
SDLDeviceLevelStatus *SDLDeviceLevelStatus_ONE_LEVEL_BARS = nil;
SDLDeviceLevelStatus *SDLDeviceLevelStatus_TWO_LEVEL_BARS = nil;
SDLDeviceLevelStatus *SDLDeviceLevelStatus_THREE_LEVEL_BARS = nil;
SDLDeviceLevelStatus *SDLDeviceLevelStatus_FOUR_LEVEL_BARS = nil;
SDLDeviceLevelStatus *SDLDeviceLevelStatus_NOT_PROVIDED = nil;
NSArray *SDLDeviceLevelStatus_values = nil;
@implementation SDLDeviceLevelStatus
+ (SDLDeviceLevelStatus *)valueOf:(NSString *)value {
for (SDLDeviceLevelStatus *item in SDLDeviceLevelStatus.values) {
if ([item.value isEqualToString:value]) {
return item;
}
}
return nil;
}
+ (NSArray *)values {
if (SDLDeviceLevelStatus_values == nil) {
SDLDeviceLevelStatus_values = @[
SDLDeviceLevelStatus.ZERO_LEVEL_BARS,
SDLDeviceLevelStatus.ONE_LEVEL_BARS,
SDLDeviceLevelStatus.TWO_LEVEL_BARS,
SDLDeviceLevelStatus.THREE_LEVEL_BARS,
SDLDeviceLevelStatus.FOUR_LEVEL_BARS,
SDLDeviceLevelStatus.NOT_PROVIDED,
];
}
return SDLDeviceLevelStatus_values;
}
+ (SDLDeviceLevelStatus *)ZERO_LEVEL_BARS {
if (SDLDeviceLevelStatus_ZERO_LEVEL_BARS == nil) {
SDLDeviceLevelStatus_ZERO_LEVEL_BARS = [[SDLDeviceLevelStatus alloc] initWithValue:@"ZERO_LEVEL_BARS"];
}
return SDLDeviceLevelStatus_ZERO_LEVEL_BARS;
}
+ (SDLDeviceLevelStatus *)ONE_LEVEL_BARS {
if (SDLDeviceLevelStatus_ONE_LEVEL_BARS == nil) {
SDLDeviceLevelStatus_ONE_LEVEL_BARS = [[SDLDeviceLevelStatus alloc] initWithValue:@"ONE_LEVEL_BARS"];
}
return SDLDeviceLevelStatus_ONE_LEVEL_BARS;
}
+ (SDLDeviceLevelStatus *)TWO_LEVEL_BARS {
if (SDLDeviceLevelStatus_TWO_LEVEL_BARS == nil) {
SDLDeviceLevelStatus_TWO_LEVEL_BARS = [[SDLDeviceLevelStatus alloc] initWithValue:@"TWO_LEVEL_BARS"];
}
return SDLDeviceLevelStatus_TWO_LEVEL_BARS;
}
+ (SDLDeviceLevelStatus *)THREE_LEVEL_BARS {
if (SDLDeviceLevelStatus_THREE_LEVEL_BARS == nil) {
SDLDeviceLevelStatus_THREE_LEVEL_BARS = [[SDLDeviceLevelStatus alloc] initWithValue:@"THREE_LEVEL_BARS"];
}
return SDLDeviceLevelStatus_THREE_LEVEL_BARS;
}
+ (SDLDeviceLevelStatus *)FOUR_LEVEL_BARS {
if (SDLDeviceLevelStatus_FOUR_LEVEL_BARS == nil) {
SDLDeviceLevelStatus_FOUR_LEVEL_BARS = [[SDLDeviceLevelStatus alloc] initWithValue:@"FOUR_LEVEL_BARS"];
}
return SDLDeviceLevelStatus_FOUR_LEVEL_BARS;
}
+ (SDLDeviceLevelStatus *)NOT_PROVIDED {
if (SDLDeviceLevelStatus_NOT_PROVIDED == nil) {
SDLDeviceLevelStatus_NOT_PROVIDED = [[SDLDeviceLevelStatus alloc] initWithValue:@"NOT_PROVIDED"];
}
return SDLDeviceLevelStatus_NOT_PROVIDED;
}
@end
|