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

org.oxerr.viagogo.client.rescu.ViagogoException Maven / Gradle / Ivy

There is a newer version: 5.0.2
Show newest version
package org.oxerr.viagogo.client.rescu;

import java.util.List;
import java.util.Map;
import java.util.Objects;

import org.apache.commons.lang3.builder.ToStringBuilder;

import com.fasterxml.jackson.annotation.JsonProperty;

import si.mazi.rescu.HttpStatusExceptionSupport;

public class ViagogoException extends HttpStatusExceptionSupport {

	private static final long serialVersionUID = 2023020201L;

	private final String type;

	private final String title;

	private final Integer status;

	private final String traceId;

	private final String code;

	private final Map> errors;

	public ViagogoException(
		@JsonProperty("type") String type,
		@JsonProperty("title") String title,
		@JsonProperty("status") int status,
		@JsonProperty("traceId") String traceId,
		@JsonProperty("code") String code,
		@JsonProperty("message") String message,
		@JsonProperty("errors") Map> errors
	) {
		super(Objects.toString(title, message));
		this.type = type;
		this.title = title;
		this.status = status;
		this.traceId = traceId;
		this.code = code;
		this.errors = errors;
	}

	public String getType() {
		return type;
	}


	public String getTitle() {
		return title;
	}


	public Integer getStatus() {
		return status;
	}


	public String getTraceId() {
		return traceId;
	}

	public String getCode() {
		return code;
	}

	public Map> getErrors() {
		return errors;
	}

	@Override
	public String toString() {
		return new ToStringBuilder(this)
			.append("type", type)
			.append("title", title)
			.append("status", status)
			.append("traceId", traceId)
			.append("code", code)
			.append("errors", errors)
			.build();
	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy