-
Notifications
You must be signed in to change notification settings - Fork 11
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 #72 from KamlinneBebora-ly4sh/feat/add-request-res…
…ponse-interface-in-messages feat: add Request and Response interface
- Loading branch information
Showing
85 changed files
with
206 additions
and
98 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
3 changes: 3 additions & 0 deletions
3
ocpp-1-6-core/src/main/kotlin/com/izivia/ocpp/core16/model/Request.kt
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,3 @@ | ||
package com.izivia.ocpp.core16.model | ||
|
||
interface Request |
3 changes: 3 additions & 0 deletions
3
ocpp-1-6-core/src/main/kotlin/com/izivia/ocpp/core16/model/Response.kt
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,3 @@ | ||
package com.izivia.ocpp.core16.model | ||
|
||
interface Response |
4 changes: 3 additions & 1 deletion
4
ocpp-1-6-core/src/main/kotlin/com/izivia/ocpp/core16/model/authorize/AuthorizeReq.kt
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,5 +1,7 @@ | ||
package com.izivia.ocpp.core16.model.authorize | ||
|
||
import com.izivia.ocpp.core16.model.Request | ||
|
||
data class AuthorizeReq( | ||
val idTag: String | ||
) | ||
) : Request |
3 changes: 2 additions & 1 deletion
3
ocpp-1-6-core/src/main/kotlin/com/izivia/ocpp/core16/model/authorize/AuthorizeResp.kt
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,7 +1,8 @@ | ||
package com.izivia.ocpp.core16.model.authorize | ||
|
||
import com.izivia.ocpp.core16.model.Response | ||
import com.izivia.ocpp.core16.model.common.IdTagInfo | ||
|
||
data class AuthorizeResp( | ||
val idTagInfo: IdTagInfo | ||
) | ||
) : Response |
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
3 changes: 2 additions & 1 deletion
3
...ore/src/main/kotlin/com/izivia/ocpp/core16/model/bootnotification/BootNotificationResp.kt
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,10 +1,11 @@ | ||
package com.izivia.ocpp.core16.model.bootnotification | ||
|
||
import com.izivia.ocpp.core16.model.Response | ||
import com.izivia.ocpp.core16.model.bootnotification.enumeration.RegistrationStatus | ||
import kotlinx.datetime.Instant | ||
|
||
data class BootNotificationResp( | ||
val currentTime: Instant, | ||
val interval: Int, | ||
val status: RegistrationStatus | ||
) | ||
) : Response |
4 changes: 3 additions & 1 deletion
4
...re/src/main/kotlin/com/izivia/ocpp/core16/model/cancelreservation/CancelReservationReq.kt
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,5 +1,7 @@ | ||
package com.izivia.ocpp.core16.model.cancelreservation | ||
|
||
import com.izivia.ocpp.core16.model.Request | ||
|
||
data class CancelReservationReq( | ||
val reservationId: Int | ||
) | ||
) : Request |
3 changes: 2 additions & 1 deletion
3
...e/src/main/kotlin/com/izivia/ocpp/core16/model/cancelreservation/CancelReservationResp.kt
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,7 +1,8 @@ | ||
package com.izivia.ocpp.core16.model.cancelreservation | ||
|
||
import com.izivia.ocpp.core16.model.Response | ||
import com.izivia.ocpp.core16.model.cancelreservation.enumeration.CancelReservationStatus | ||
|
||
data class CancelReservationResp( | ||
val status: CancelReservationStatus | ||
) | ||
) : Response |
4 changes: 3 additions & 1 deletion
4
...re/src/main/kotlin/com/izivia/ocpp/core16/model/certificatesigned/CertificateSignedReq.kt
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,5 +1,7 @@ | ||
package com.izivia.ocpp.core16.model.certificatesigned | ||
|
||
import com.izivia.ocpp.core16.model.Request | ||
|
||
data class CertificateSignedReq( | ||
val certificateChain: String | ||
) | ||
) : Request |
3 changes: 2 additions & 1 deletion
3
...e/src/main/kotlin/com/izivia/ocpp/core16/model/certificatesigned/CertificateSignedResp.kt
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,7 +1,8 @@ | ||
package com.izivia.ocpp.core16.model.certificatesigned | ||
|
||
import com.izivia.ocpp.core16.model.Response | ||
import com.izivia.ocpp.core16.model.certificatesigned.enumeration.DeleteCertificateStatusEnumType | ||
|
||
data class CertificateSignedResp( | ||
val status: DeleteCertificateStatusEnumType | ||
) | ||
) : Response |
3 changes: 2 additions & 1 deletion
3
.../src/main/kotlin/com/izivia/ocpp/core16/model/changeavailability/ChangeAvailabilityReq.kt
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,8 +1,9 @@ | ||
package com.izivia.ocpp.core16.model.changeavailability | ||
|
||
import com.izivia.ocpp.core16.model.Request | ||
import com.izivia.ocpp.core16.model.changeavailability.enumeration.AvailabilityType | ||
|
||
data class ChangeAvailabilityReq( | ||
val connectorId: Int, | ||
val type: AvailabilityType | ||
) | ||
) : Request |
3 changes: 2 additions & 1 deletion
3
...src/main/kotlin/com/izivia/ocpp/core16/model/changeavailability/ChangeAvailabilityResp.kt
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,7 +1,8 @@ | ||
package com.izivia.ocpp.core16.model.changeavailability | ||
|
||
import com.izivia.ocpp.core16.model.Response | ||
import com.izivia.ocpp.core16.model.changeavailability.enumeration.AvailabilityStatus | ||
|
||
data class ChangeAvailabilityResp( | ||
val status: AvailabilityStatus | ||
) | ||
) : Response |
4 changes: 3 additions & 1 deletion
4
...rc/main/kotlin/com/izivia/ocpp/core16/model/changeconfiguration/ChangeConfigurationReq.kt
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,6 +1,8 @@ | ||
package com.izivia.ocpp.core16.model.changeconfiguration | ||
|
||
import com.izivia.ocpp.core16.model.Request | ||
|
||
data class ChangeConfigurationReq( | ||
val key: String, | ||
val value: String | ||
) | ||
) : Request |
3 changes: 2 additions & 1 deletion
3
...c/main/kotlin/com/izivia/ocpp/core16/model/changeconfiguration/ChangeConfigurationResp.kt
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,7 +1,8 @@ | ||
package com.izivia.ocpp.core16.model.changeconfiguration | ||
|
||
import com.izivia.ocpp.core16.model.Response | ||
import com.izivia.ocpp.core16.model.changeconfiguration.enumeration.ConfigurationStatus | ||
|
||
data class ChangeConfigurationResp( | ||
val status: ConfigurationStatus | ||
) | ||
) : Response |
4 changes: 3 additions & 1 deletion
4
ocpp-1-6-core/src/main/kotlin/com/izivia/ocpp/core16/model/clearcache/ClearCacheReq.kt
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,3 +1,5 @@ | ||
package com.izivia.ocpp.core16.model.clearcache | ||
|
||
class ClearCacheReq | ||
import com.izivia.ocpp.core16.model.Request | ||
|
||
class ClearCacheReq : Request |
3 changes: 2 additions & 1 deletion
3
ocpp-1-6-core/src/main/kotlin/com/izivia/ocpp/core16/model/clearcache/ClearCacheResp.kt
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,7 +1,8 @@ | ||
package com.izivia.ocpp.core16.model.clearcache | ||
|
||
import com.izivia.ocpp.core16.model.Response | ||
import com.izivia.ocpp.core16.model.clearcache.enumeration.ClearCacheStatus | ||
|
||
data class ClearCacheResp( | ||
val status: ClearCacheStatus | ||
) | ||
) : Response |
3 changes: 2 additions & 1 deletion
3
.../main/kotlin/com/izivia/ocpp/core16/model/clearchargingprofile/ClearChargingProfileReq.kt
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,10 +1,11 @@ | ||
package com.izivia.ocpp.core16.model.clearchargingprofile | ||
|
||
import com.izivia.ocpp.core16.model.Request | ||
import com.izivia.ocpp.core16.model.common.enumeration.ChargingProfilePurposeType | ||
|
||
data class ClearChargingProfileReq( | ||
val id: Int? = null, | ||
val connectorId: Int? = null, | ||
val chargingProfilePurpose: ChargingProfilePurposeType? = null, | ||
val stackLevel: Int? = null | ||
) | ||
) : Request |
3 changes: 2 additions & 1 deletion
3
...main/kotlin/com/izivia/ocpp/core16/model/clearchargingprofile/ClearChargingProfileResp.kt
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,7 +1,8 @@ | ||
package com.izivia.ocpp.core16.model.clearchargingprofile | ||
|
||
import com.izivia.ocpp.core16.model.Response | ||
import com.izivia.ocpp.core16.model.clearchargingprofile.enumeration.ClearChargingProfileStatus | ||
|
||
data class ClearChargingProfileResp( | ||
val status: ClearChargingProfileStatus | ||
) | ||
) : Response |
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
4 changes: 3 additions & 1 deletion
4
ocpp-1-6-core/src/main/kotlin/com/izivia/ocpp/core16/model/datatransfer/DataTransferReq.kt
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,7 +1,9 @@ | ||
package com.izivia.ocpp.core16.model.datatransfer | ||
|
||
import com.izivia.ocpp.core16.model.Request | ||
|
||
data class DataTransferReq( | ||
val vendorId: String, | ||
val messageId: String? = null, | ||
val data: String? = null | ||
) | ||
) : Request |
3 changes: 2 additions & 1 deletion
3
ocpp-1-6-core/src/main/kotlin/com/izivia/ocpp/core16/model/datatransfer/DataTransferResp.kt
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,8 +1,9 @@ | ||
package com.izivia.ocpp.core16.model.datatransfer | ||
|
||
import com.izivia.ocpp.core16.model.Response | ||
import com.izivia.ocpp.core16.model.datatransfer.enumeration.DataTransferStatus | ||
|
||
data class DataTransferResp( | ||
val status: DataTransferStatus, | ||
val data: String? = null | ||
) | ||
) : Response |
3 changes: 2 additions & 1 deletion
3
...re/src/main/kotlin/com/izivia/ocpp/core16/model/deletecertificate/DeleteCertificateReq.kt
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
5 changes: 3 additions & 2 deletions
5
...e/src/main/kotlin/com/izivia/ocpp/core16/model/deletecertificate/DeleteCertificateResp.kt
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,7 +1,8 @@ | ||
package com.izivia.ocpp.core16.model.certificatesigned | ||
package com.izivia.ocpp.core16.model.deletecertificate | ||
|
||
import com.izivia.ocpp.core16.model.Response | ||
import com.izivia.ocpp.core16.model.certificatesigned.enumeration.DeleteCertificateStatusEnumType | ||
|
||
data class DeleteCertificateResp( | ||
val status: DeleteCertificateStatusEnumType | ||
) | ||
) : Response |
5 changes: 3 additions & 2 deletions
5
...zivia/ocpp/core16/model/diagnosticsstatusnotification/DiagnosticsStatusNotificationReq.kt
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,7 +1,8 @@ | ||
package com.izivia.ocpp.core16.model.diagnosticsstatusnotification | ||
|
||
import com.izivia.ocpp.core16.model.Request | ||
import com.izivia.ocpp.core16.model.diagnosticsstatusnotification.enumeration.DiagnosticsStatus | ||
|
||
data class DiagnosticsStatusNotificationReq( | ||
val status: DiagnosticsStatus | ||
) | ||
val status: DiagnosticsStatus | ||
) : Request |
4 changes: 3 additions & 1 deletion
4
...ivia/ocpp/core16/model/diagnosticsstatusnotification/DiagnosticsStatusNotificationResp.kt
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,3 +1,5 @@ | ||
package com.izivia.ocpp.core16.model.diagnosticsstatusnotification | ||
|
||
class DiagnosticsStatusNotificationResp | ||
import com.izivia.ocpp.core16.model.Response | ||
|
||
class DiagnosticsStatusNotificationResp : Response |
5 changes: 3 additions & 2 deletions
5
...n/kotlin/com/izivia/ocpp/core16/model/extendedtriggermessage/ExtendedTriggerMessageReq.kt
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,8 +1,9 @@ | ||
package com.izivia.ocpp.core16.model.triggermessage | ||
package com.izivia.ocpp.core16.model.extendedtriggermessage | ||
|
||
import com.izivia.ocpp.core16.model.Request | ||
import com.izivia.ocpp.core16.model.triggermessage.enumeration.MessageTrigger | ||
|
||
data class ExtendedTriggerMessageReq( | ||
val requestedMessage: MessageTrigger, | ||
val connectorId: Int? = null | ||
) | ||
) : Request |
5 changes: 3 additions & 2 deletions
5
.../kotlin/com/izivia/ocpp/core16/model/extendedtriggermessage/ExtendedTriggerMessageResp.kt
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,7 +1,8 @@ | ||
package com.izivia.ocpp.core16.model.triggermessage | ||
package com.izivia.ocpp.core16.model.extendedtriggermessage | ||
|
||
import com.izivia.ocpp.core16.model.Response | ||
import com.izivia.ocpp.core16.model.triggermessage.enumeration.TriggerMessageStatus | ||
|
||
data class ExtendedTriggerMessageResp( | ||
val status: TriggerMessageStatus | ||
) | ||
) : Response |
5 changes: 3 additions & 2 deletions
5
.../com/izivia/ocpp/core16/model/firmwarestatusnotification/FirmwareStatusNotificationReq.kt
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,7 +1,8 @@ | ||
package com.izivia.ocpp.core16.model.firmwarestatusnotification | ||
|
||
import com.izivia.ocpp.core16.model.Request | ||
import com.izivia.ocpp.core16.model.firmwarestatusnotification.enumeration.FirmwareStatus | ||
|
||
data class FirmwareStatusNotificationReq( | ||
val status: FirmwareStatus | ||
) | ||
val status: FirmwareStatus | ||
) : Request |
4 changes: 3 additions & 1 deletion
4
...com/izivia/ocpp/core16/model/firmwarestatusnotification/FirmwareStatusNotificationResp.kt
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,3 +1,5 @@ | ||
package com.izivia.ocpp.core16.model.firmwarestatusnotification | ||
|
||
class FirmwareStatusNotificationResp | ||
import com.izivia.ocpp.core16.model.Response | ||
|
||
class FirmwareStatusNotificationResp : Response |
3 changes: 2 additions & 1 deletion
3
.../main/kotlin/com/izivia/ocpp/core16/model/getcompositeschedule/GetCompositeScheduleReq.kt
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,9 +1,10 @@ | ||
package com.izivia.ocpp.core16.model.getcompositeschedule | ||
|
||
import com.izivia.ocpp.core16.model.Request | ||
import com.izivia.ocpp.core16.model.common.enumeration.ChargingRateUnitType | ||
|
||
data class GetCompositeScheduleReq( | ||
val connectorId: Int, | ||
val duration: Int, | ||
val chargingRateUnit: ChargingRateUnitType? = null | ||
) | ||
) : Request |
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
4 changes: 3 additions & 1 deletion
4
...core/src/main/kotlin/com/izivia/ocpp/core16/model/getconfiguration/GetConfigurationReq.kt
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,5 +1,7 @@ | ||
package com.izivia.ocpp.core16.model.getconfiguration | ||
|
||
import com.izivia.ocpp.core16.model.Request | ||
|
||
data class GetConfigurationReq( | ||
val key: List<String>? = null | ||
) | ||
) : Request |
4 changes: 3 additions & 1 deletion
4
...ore/src/main/kotlin/com/izivia/ocpp/core16/model/getconfiguration/GetConfigurationResp.kt
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,6 +1,8 @@ | ||
package com.izivia.ocpp.core16.model.getconfiguration | ||
|
||
import com.izivia.ocpp.core16.model.Response | ||
|
||
data class GetConfigurationResp( | ||
val configurationKey: List<KeyValue>? = null, | ||
val unknownKey: List<String>? = null | ||
) | ||
) : Response |
Oops, something went wrong.