summaryrefslogtreecommitdiff
path: root/SmartDeviceLink/SDLGetInteriorVehicleDataConsent.m
blob: 88ed0d8e98fc7cd5212246a8b19999a4c92aee06 (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
//
//  SDLGetInteriorVehicleDataConsent.m
//  SmartDeviceLink
//
//  Created by standa1 on 7/25/19.
//  Copyright © 2019 smartdevicelink. All rights reserved.
//

#import "SDLGetInteriorVehicleDataConsent.h"
#import "SDLRPCParameterNames.h"
#import "SDLRPCFunctionNames.h"
#import "NSMutableDictionary+Store.h"

@implementation SDLGetInteriorVehicleDataConsent

#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
- (instancetype)init {
    if (self = [super initWithName:SDLRPCFunctionNameGetInteriorVehicleDataConsent]) {
    }
    return self;
}
#pragma clang diagnostic pop

- (instancetype)initWithModuleType:(SDLModuleType)moduleType moduleIds:(NSArray<NSString *> *)moduleIds {
    self = [self init];
    if (!self) {
        return nil;
    }
    
    self.moduleType = moduleType;
    self.moduleIds = moduleIds;
    
    return self;
}

- (void)setModuleType:(SDLModuleType)moduleType {
    [self.parameters sdl_setObject:moduleType forName:SDLRPCParameterNameModuleType];
}

- (SDLModuleType)moduleType {
    NSError *error = nil;
    return [self.parameters sdl_enumForName:SDLRPCParameterNameModuleType error:&error];
}

- (void)setModuleIds:(NSArray<NSString *> *)moduleIds {
    [self.parameters sdl_setObject:moduleIds forName:SDLRPCParameterNameModuleIds];
}

- (NSArray<NSString *> *)moduleIds {
    NSError *error = nil;
    return [self.parameters sdl_objectsForName:SDLRPCParameterNameModuleIds ofClass:NSString.class error:&error];
}

@end