-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #133 from smartcar/lock-status
feat: get VehicleLockStatus
- Loading branch information
Showing
14 changed files
with
511 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
libGroup=com.smartcar.sdk | ||
libName=java-sdk | ||
libVersion=3.7.0 | ||
libVersion=3.8.0 | ||
libDescription=Smartcar Java SDK |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
src/main/java/com/smartcar/sdk/data/VehicleChargingPort.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
package com.smartcar.sdk.data; | ||
|
||
public class VehicleChargingPort extends ApiData { | ||
private String type; | ||
private String status; | ||
|
||
/** | ||
* Returns the charging port type | ||
* | ||
* @return charging port type | ||
*/ | ||
public String getType() { | ||
return this.type; | ||
} | ||
|
||
/** | ||
* Returns the charging port status | ||
* | ||
* @return charging port status | ||
*/ | ||
public String getStatus() { | ||
return this.status; | ||
} | ||
|
||
/** | ||
* @return a stringified representation of VehicleChargingPort | ||
*/ | ||
@Override | ||
public String toString() { | ||
return this.getClass().getName() + "{" + "type=" + type + ", status=" + status + '}'; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
package com.smartcar.sdk.data; | ||
|
||
public class VehicleDoor extends ApiData { | ||
private String type; | ||
private String status; | ||
|
||
/** | ||
* Returns the door type | ||
* | ||
* @return door type | ||
*/ | ||
public String getType() { | ||
return this.type; | ||
} | ||
|
||
/** | ||
* Returns the door status | ||
* | ||
* @return door status | ||
*/ | ||
public String getStatus() { | ||
return this.status; | ||
} | ||
|
||
/** | ||
* @return a stringified representation of VehicleDoor | ||
*/ | ||
@Override | ||
public String toString() { | ||
return this.getClass().getName() + "{" + "type=" + type + ", status=" + status + '}'; | ||
} | ||
} |
83 changes: 83 additions & 0 deletions
83
src/main/java/com/smartcar/sdk/data/VehicleLockStatus.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
package com.smartcar.sdk.data; | ||
|
||
import java.util.Arrays; | ||
|
||
public class VehicleLockStatus extends ApiData { | ||
private boolean isLocked; | ||
private VehicleDoor[] doors; | ||
private VehicleWindow[] windows; | ||
private VehicleStorage[] storage; | ||
private VehicleSunroof[] sunroof; | ||
private VehicleChargingPort[] chargingPort; | ||
|
||
/** | ||
* Check if the vehicle currently locked. | ||
* | ||
* @return {boolean} True if the vehicle is locked, otherwise false. | ||
*/ | ||
public boolean isLocked() { | ||
return this.isLocked; | ||
} | ||
|
||
/** | ||
* Returns the vehicle doors | ||
* | ||
* @return vehicle doors | ||
*/ | ||
public VehicleDoor[] getDoors() { | ||
return this.doors; | ||
} | ||
|
||
/** | ||
* Returns the vehicle's windows | ||
* | ||
* @return vehicle windows | ||
*/ | ||
public VehicleWindow[] getWindows() { | ||
return this.windows; | ||
} | ||
|
||
/** | ||
* Returns the vehicle's storage | ||
* | ||
* @return vehicle storage | ||
*/ | ||
public VehicleStorage[] getStorage() { | ||
return this.storage; | ||
} | ||
|
||
/** | ||
* Returns the vehicle's sunroofs | ||
* | ||
* @return vehicle sunroof | ||
*/ | ||
public VehicleSunroof[] getSunroof() { | ||
return this.sunroof; | ||
} | ||
|
||
/** | ||
* Returns the vehicle's charging ports | ||
* | ||
* @return vehicle charging port | ||
*/ | ||
public VehicleChargingPort[] getChargingPort() { | ||
return this.chargingPort; | ||
} | ||
|
||
/** | ||
* Returns a stringified representation of the VehicleLockStatus object. | ||
* | ||
* @return A string describing the lock status and other vehicle attributes. | ||
*/ | ||
@Override | ||
public String toString() { | ||
return this.getClass().getName() + "{" + | ||
"isLocked=" + this.isLocked + | ||
", doors=" + Arrays.toString(this.doors) + | ||
", windows=" + Arrays.toString(this.windows) + | ||
", storage=" + Arrays.toString(this.storage) + | ||
", sunroof=" + Arrays.toString(this.sunroof) + | ||
", chargingPort=" + Arrays.toString(this.chargingPort) + | ||
'}'; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
package com.smartcar.sdk.data; | ||
|
||
public class VehicleStorage extends ApiData { | ||
private String type; | ||
private String status; | ||
|
||
/** | ||
* Returns the storage type | ||
* | ||
* @return storage type | ||
*/ | ||
public String getType() { | ||
return this.type; | ||
} | ||
|
||
/** | ||
* Returns the storage status | ||
* | ||
* @return storage status | ||
*/ | ||
public String getStatus() { | ||
return this.status; | ||
} | ||
|
||
/** | ||
* @return a stringified representation of VehicleStorage | ||
*/ | ||
@Override | ||
public String toString() { | ||
return this.getClass().getName() + "{" + "type=" + type + ", status=" + status + '}'; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
package com.smartcar.sdk.data; | ||
|
||
public class VehicleSunroof extends ApiData { | ||
private String type; | ||
private String status; | ||
|
||
/** | ||
* Returns the sunroof type | ||
* | ||
* @return sunroof type | ||
*/ | ||
public String getType() { | ||
return this.type; | ||
} | ||
|
||
/** | ||
* Returns the sunroof status | ||
* | ||
* @return sunroof status | ||
*/ | ||
public String getStatus() { | ||
return this.status; | ||
} | ||
|
||
/** | ||
* @return a stringified representation of VehicleSunroof | ||
*/ | ||
@Override | ||
public String toString() { | ||
return this.getClass().getName() + "{" + "type=" + type + ", status=" + status + '}'; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
package com.smartcar.sdk.data; | ||
|
||
public class VehicleWindow extends ApiData { | ||
private String type; | ||
private String status; | ||
|
||
/** | ||
* Returns the window type | ||
* | ||
* @return window type | ||
*/ | ||
public String getType() { | ||
return this.type; | ||
} | ||
|
||
/** | ||
* Returns the window status | ||
* | ||
* @return window status | ||
*/ | ||
public String getStatus() { | ||
return this.status; | ||
} | ||
|
||
/** | ||
* @return a stringified representation of VehicleWindow | ||
*/ | ||
@Override | ||
public String toString() { | ||
return this.getClass().getName() + "{" + "type=" + type + ", status=" + status + '}'; | ||
} | ||
} |
Oops, something went wrong.