mirror of
https://github.com/openhab/openhab-addons.git
synced 2025-01-26 15:21:41 +01:00
[freeboxos] Restore enum in API response record DTO (MacOS file sharing) (#17284)
Partial revert of #17203 Signed-off-by: Laurent Garnier <lg.hc@free.fr>
This commit is contained in:
parent
687337f88b
commit
04d87ad599
@ -19,6 +19,8 @@ import org.eclipse.jdt.annotation.Nullable;
|
|||||||
import org.openhab.binding.freeboxos.internal.api.FreeboxException;
|
import org.openhab.binding.freeboxos.internal.api.FreeboxException;
|
||||||
import org.openhab.binding.freeboxos.internal.api.Response;
|
import org.openhab.binding.freeboxos.internal.api.Response;
|
||||||
|
|
||||||
|
import com.google.gson.annotations.SerializedName;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The {@link AfpManager} is the Java class used to handle api requests related to Afp shares
|
* The {@link AfpManager} is the Java class used to handle api requests related to Afp shares
|
||||||
*
|
*
|
||||||
@ -31,8 +33,33 @@ public class AfpManager extends ConfigurableRest<AfpManager.Afp, AfpManager.Conf
|
|||||||
protected static class ConfigResponse extends Response<Afp> {
|
protected static class ConfigResponse extends Response<Afp> {
|
||||||
}
|
}
|
||||||
|
|
||||||
protected static record Afp(boolean enabled, boolean guestAllow, String serverType, @Nullable String loginName,
|
protected static record Afp(boolean enabled, boolean guestAllow, ServerType serverType, @Nullable String loginName,
|
||||||
@Nullable String loginPassword) {
|
@Nullable String loginPassword) {
|
||||||
|
private enum ServerType {
|
||||||
|
@SerializedName("powerbook")
|
||||||
|
POWERBOOK,
|
||||||
|
@SerializedName("powermac")
|
||||||
|
POWERMAC,
|
||||||
|
@SerializedName("macmini")
|
||||||
|
MACMINI,
|
||||||
|
@SerializedName("imac")
|
||||||
|
IMAC,
|
||||||
|
@SerializedName("macbook")
|
||||||
|
MACBOOK,
|
||||||
|
@SerializedName("macbookpro")
|
||||||
|
MACBOOKPRO,
|
||||||
|
@SerializedName("macbookair")
|
||||||
|
MACBOOKAIR,
|
||||||
|
@SerializedName("macpro")
|
||||||
|
MACPRO,
|
||||||
|
@SerializedName("appletv")
|
||||||
|
APPLETV,
|
||||||
|
@SerializedName("airport")
|
||||||
|
AIRPORT,
|
||||||
|
@SerializedName("xserve")
|
||||||
|
XSERVE,
|
||||||
|
UNKNOWN
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public AfpManager(FreeboxOsSession session, UriBuilder uriBuilder) throws FreeboxException {
|
public AfpManager(FreeboxOsSession session, UriBuilder uriBuilder) throws FreeboxException {
|
||||||
|
Loading…
Reference in New Issue
Block a user