com.wix.mediaplatform.v7.exception.ErrorCode Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of media-platform-java-sdk Show documentation
Show all versions of media-platform-java-sdk Show documentation
The Wix Media Platform Java SDK
package com.wix.mediaplatform.v7.exception;
import org.jetbrains.annotations.Nullable;
/**
* Created by alonne on 06/07/2017.
*/
public enum ErrorCode {
ok(0),
fileAlreadyExists(1),
notFound(404);
private final int value;
ErrorCode(int value) {
this.value = value;
}
public int getValue() {
return value;
}
@Nullable
public static ErrorCode find(int code) {
for (ErrorCode c : ErrorCode.values()) {
if (c.value == code) {
return c;
}
}
return null;
}
}