summaryrefslogtreecommitdiff
path: root/SmartDeviceLink/SDLPowerModeStatus.m
blob: efc46a094c23224be4d3b62e867061c4d137d6f2 (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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
//  SDLPowerModeStatus.m
//


#import "SDLPowerModeStatus.h"

SDLPowerModeStatus *SDLPowerModeStatus_KEY_OUT = nil;
SDLPowerModeStatus *SDLPowerModeStatus_KEY_RECENTLY_OUT = nil;
SDLPowerModeStatus *SDLPowerModeStatus_KEY_APPROVED_0 = nil;
SDLPowerModeStatus *SDLPowerModeStatus_POST_ACCESORY_0 = nil;
SDLPowerModeStatus *SDLPowerModeStatus_ACCESORY_1 = nil;
SDLPowerModeStatus *SDLPowerModeStatus_POST_IGNITION_1 = nil;
SDLPowerModeStatus *SDLPowerModeStatus_IGNITION_ON_2 = nil;
SDLPowerModeStatus *SDLPowerModeStatus_RUNNING_2 = nil;
SDLPowerModeStatus *SDLPowerModeStatus_CRANK_3 = nil;

NSArray *SDLPowerModeStatus_values = nil;

@implementation SDLPowerModeStatus

+ (SDLPowerModeStatus *)valueOf:(NSString *)value {
    for (SDLPowerModeStatus *item in SDLPowerModeStatus.values) {
        if ([item.value isEqualToString:value]) {
            return item;
        }
    }
    return nil;
}

+ (NSArray *)values {
    if (SDLPowerModeStatus_values == nil) {
        SDLPowerModeStatus_values = @[
            SDLPowerModeStatus.KEY_OUT,
            SDLPowerModeStatus.KEY_RECENTLY_OUT,
            SDLPowerModeStatus.KEY_APPROVED_0,
            SDLPowerModeStatus.POST_ACCESORY_0,
            SDLPowerModeStatus.ACCESORY_1,
            SDLPowerModeStatus.POST_IGNITION_1,
            SDLPowerModeStatus.IGNITION_ON_2,
            SDLPowerModeStatus.RUNNING_2,
            SDLPowerModeStatus.CRANK_3,
        ];
    }
    return SDLPowerModeStatus_values;
}

+ (SDLPowerModeStatus *)KEY_OUT {
    if (SDLPowerModeStatus_KEY_OUT == nil) {
        SDLPowerModeStatus_KEY_OUT = [[SDLPowerModeStatus alloc] initWithValue:@"KEY_OUT"];
    }
    return SDLPowerModeStatus_KEY_OUT;
}

+ (SDLPowerModeStatus *)KEY_RECENTLY_OUT {
    if (SDLPowerModeStatus_KEY_RECENTLY_OUT == nil) {
        SDLPowerModeStatus_KEY_RECENTLY_OUT = [[SDLPowerModeStatus alloc] initWithValue:@"KEY_RECENTLY_OUT"];
    }
    return SDLPowerModeStatus_KEY_RECENTLY_OUT;
}

+ (SDLPowerModeStatus *)KEY_APPROVED_0 {
    if (SDLPowerModeStatus_KEY_APPROVED_0 == nil) {
        SDLPowerModeStatus_KEY_APPROVED_0 = [[SDLPowerModeStatus alloc] initWithValue:@"KEY_APPROVED_0"];
    }
    return SDLPowerModeStatus_KEY_APPROVED_0;
}

+ (SDLPowerModeStatus *)POST_ACCESORY_0 {
    if (SDLPowerModeStatus_POST_ACCESORY_0 == nil) {
        SDLPowerModeStatus_POST_ACCESORY_0 = [[SDLPowerModeStatus alloc] initWithValue:@"POST_ACCESORY_0"];
    }
    return SDLPowerModeStatus_POST_ACCESORY_0;
}

+ (SDLPowerModeStatus *)ACCESORY_1 {
    if (SDLPowerModeStatus_ACCESORY_1 == nil) {
        SDLPowerModeStatus_ACCESORY_1 = [[SDLPowerModeStatus alloc] initWithValue:@"ACCESORY_1"];
    }
    return SDLPowerModeStatus_ACCESORY_1;
}

+ (SDLPowerModeStatus *)POST_IGNITION_1 {
    if (SDLPowerModeStatus_POST_IGNITION_1 == nil) {
        SDLPowerModeStatus_POST_IGNITION_1 = [[SDLPowerModeStatus alloc] initWithValue:@"POST_IGNITION_1"];
    }
    return SDLPowerModeStatus_POST_IGNITION_1;
}

+ (SDLPowerModeStatus *)IGNITION_ON_2 {
    if (SDLPowerModeStatus_IGNITION_ON_2 == nil) {
        SDLPowerModeStatus_IGNITION_ON_2 = [[SDLPowerModeStatus alloc] initWithValue:@"IGNITION_ON_2"];
    }
    return SDLPowerModeStatus_IGNITION_ON_2;
}

+ (SDLPowerModeStatus *)RUNNING_2 {
    if (SDLPowerModeStatus_RUNNING_2 == nil) {
        SDLPowerModeStatus_RUNNING_2 = [[SDLPowerModeStatus alloc] initWithValue:@"RUNNING_2"];
    }
    return SDLPowerModeStatus_RUNNING_2;
}

+ (SDLPowerModeStatus *)CRANK_3 {
    if (SDLPowerModeStatus_CRANK_3 == nil) {
        SDLPowerModeStatus_CRANK_3 = [[SDLPowerModeStatus alloc] initWithValue:@"CRANK_3"];
    }
    return SDLPowerModeStatus_CRANK_3;
}

@end