2 * Copyright (c) 2010-2023 Contributors to the openHAB project
4 * See the NOTICE file(s) distributed with this work for additional
7 * This program and the accompanying materials are made available under the
8 * terms of the Eclipse Public License 2.0 which is available at
9 * http://www.eclipse.org/legal/epl-2.0
11 * SPDX-License-Identifier: EPL-2.0
13 package org.openhab.binding.mybmw.internal.dto.vehicle;
15 import org.openhab.binding.mybmw.internal.utils.BimmerConstants;
19 * derived from the API responses
21 * @author Martin Grassl - initial contribution
22 * @author Mark Herwege - fix brand BMW_I
24 public class VehicleAttributes {
25 private String lastFetched = ""; // "2022-12-21T17:30:40.363Z"
26 private String model = "";// ": "i3 94 (+ REX)",
27 private int year = -1;// ": 2017,
28 private long color = -1;// ": 4284572001,
29 private String brand = "";// ": "BMW",
30 private String driveTrain = "";// ": "ELECTRIC",
31 private String headUnitType = "";// ": "ID5",
32 private String headUnitRaw = "";// ": "ID5",
33 private String hmiVersion = "";// ": "ID4",
34 // softwareVersionCurrent - needed?
35 // softwareVersionExFactory - needed?
36 private String telematicsUnit = "";// ": "TCB1",
37 private String bodyType = "";// ": "I01",
38 private String countryOfOrigin = ""; // "DE"
39 // driverGuideInfo - needed?
41 public String getModel() {
45 public void setModel(String model) {
49 public int getYear() {
53 public void setYear(int year) {
57 public long getColor() {
61 public void setColor(long color) {
65 public String getBrand() {
66 if (BimmerConstants.BRAND_BMWI.equals(brand.toLowerCase())) {
67 return BimmerConstants.BRAND_BMW;
69 return brand.toLowerCase();
73 public void setBrand(String brand) {
77 public String getDriveTrain() {
81 public void setDriveTrain(String driveTrain) {
82 this.driveTrain = driveTrain;
85 public String getHeadUnitType() {
89 public void setHeadUnitType(String headUnitType) {
90 this.headUnitType = headUnitType;
93 public String getHeadUnitRaw() {
97 public void setHeadUnitRaw(String headUnitRaw) {
98 this.headUnitRaw = headUnitRaw;
101 public String getHmiVersion() {
105 public void setHmiVersion(String hmiVersion) {
106 this.hmiVersion = hmiVersion;
109 public String getTelematicsUnit() {
110 return telematicsUnit;
113 public void setTelematicsUnit(String telematicsUnit) {
114 this.telematicsUnit = telematicsUnit;
117 public String getBodyType() {
121 public void setBodyType(String bodyType) {
122 this.bodyType = bodyType;
125 public String getCountryOfOrigin() {
126 return countryOfOrigin;
129 public void setCountryOfOrigin(String countryOfOrigin) {
130 this.countryOfOrigin = countryOfOrigin;
133 public String getLastFetched() {
137 public void setLastFetched(String lastFetched) {
138 this.lastFetched = lastFetched;
142 public String toString() {
143 return "VehicleAttributes [lastFetched=" + lastFetched + ", model=" + model + ", year=" + year + ", color="
144 + color + ", brand=" + brand + ", driveTrain=" + driveTrain + ", headUnitType=" + headUnitType
145 + ", headUnitRaw=" + headUnitRaw + ", hmiVersion=" + hmiVersion + ", telematicsUnit=" + telematicsUnit
146 + ", bodyType=" + bodyType + ", countryOfOrigin=" + countryOfOrigin + "]";