All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.targomo.client.api.response.esri.ErrorDescription Maven / Gradle / Ivy

There is a newer version: 0.39.0
Show newest version
package com.targomo.client.api.response.esri;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.targomo.client.api.response.GeocodingResponse;

import java.util.List;

/**
 * The POJO for an error message reponse sent from an ESRI service (see
 * {@link GeocodingResponse} and {@link AuthenticationResponse})
 */
public class ErrorDescription {

    private final Integer code;
    private final String error;
    private final String errorDescription;
    private final String message;
    private final List details;

    /**
     * private - not used since this is a POJO only created from a json String
     */
    @JsonCreator
    public ErrorDescription(
            @JsonProperty("code") Integer code, @JsonProperty("error") String error, @JsonProperty("error_description") String errorDescription,
            @JsonProperty("message") String message, @JsonProperty("details") List details) {
        this.code = code;
        this.error = error;
        this.errorDescription = errorDescription;
        this.message = message;
        this.details = details;
    }

    /**
     * @return the ESRI error code (not the http status code of the response)
     */
    public Integer getCode() {
        return code;
    }

    /**
     * @return the error message
     */
    public String getMessage() {
        return message;
    }

    /**
     * @return the error name
     */
    public String getError() {
        return error;
    }

    /**
     * @return the error description as String
     */
    public String getErrorDescription() {
        return errorDescription;
    }

    /**
     * @return the error details
     */
    public List getDetails() {
        return details;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy