org.telegram.telegraph.api.objects.TelegraphResponse Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of telegraph-meta Show documentation
Show all versions of telegraph-meta Show documentation
Easy to use library to interact with Telegra.ph
The newest version!
package org.telegram.telegraph.api.objects;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.io.Serializable;
/**
* @author Ruben Bermudez
* @version 1.0
*/
public class TelegraphResponse implements Serializable {
private static final String OK_FIELD = "ok";
private static final String ERROR_FIELD = "error";
private static final String RESULT_FIELD = "result";
@JsonProperty(OK_FIELD)
private Boolean ok;
@JsonProperty(ERROR_FIELD)
private String error;
@JsonProperty(RESULT_FIELD)
private T result;
public Boolean getOk() {
return ok;
}
public String getError() {
return error;
}
public T getResult() {
return result;
}
@Override
public String toString() {
if (ok) {
return "TelegraphResponse{" +
"ok=" + ok +
", result=" + result +
'}';
} else {
return "TelegraphResponse{" +
"ok=" + ok +
", error=" + error +
'}';
}
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy