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

com.truelayer.java.http.entities.ProblemDetails Maven / Gradle / Ivy

There is a newer version: 16.0.0
Show newest version
package com.truelayer.java.http.entities;

import static org.apache.commons.lang3.ObjectUtils.allNotNull;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.databind.JsonNode;
import lombok.Builder;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.ToString;

/**
 * Model for errors in the Problem Details format.
 *
 * @see Problem Details RFC
 */
@Builder
@Getter
@ToString
@EqualsAndHashCode
public class ProblemDetails {
    private String type;
    private String title;
    private String detail;
    private Integer status;
    private String traceId;
    private JsonNode errors;

    @JsonIgnore
    public boolean isWellFormed() {
        return allNotNull(type, title, status);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy