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

net.commuty.parking.rest.JsonError Maven / Gradle / Ivy

Go to download

This package acts as a client to communicate with the Commuty Parking Access API. It avoids you to deal with HTTP directly and provides you proper data structures to work with the API.

The newest version!
package net.commuty.parking.rest;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
import net.commuty.parking.http.Error;

public class JsonError implements Error {

    private final String reason;

    private final String message;

    @JsonCreator
    JsonError(@JsonProperty("reason") String reason,
              @JsonProperty("message") String message) {
        this.reason = reason;
        this.message = message;
    }

    @JsonProperty("reason")
    public String getReason() {
        return reason;
    }

    @JsonProperty("message")
    public String getMessage() {
        return message;
    }

    @Override
    public String toString() {
        return "Message{" +
                "reason='" + reason + '\'' +
                ", message='" + message + '\'' +
                '}';
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy