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

io.katharsis.response.JsonApiResponse Maven / Gradle / Ivy

There is a newer version: 2.6.3
Show newest version
package io.katharsis.response;

import io.katharsis.errorhandling.ErrorData;

public class JsonApiResponse {

    private Object entity;
    private MetaInformation metaInformation;
    private LinksInformation linksInformation;
    private Iterable errors;

    public JsonApiResponse() {
    }

    /**
     * @param jsonApiResponse
     * Copy entity, metaInformation, linksInformation, errors from {@link JsonApiResponse}
     */
    public JsonApiResponse(JsonApiResponse jsonApiResponse) {
        this.entity = jsonApiResponse.entity;
        this.metaInformation = jsonApiResponse.metaInformation;
        this.linksInformation = jsonApiResponse.linksInformation;
        this.errors = jsonApiResponse.errors;
    }

    public Object getEntity() {
        return entity;
    }

    public JsonApiResponse setEntity(Object entity) {
        this.entity = entity;
        return this;
    }

    public MetaInformation getMetaInformation() {
        return metaInformation;
    }

    public JsonApiResponse setMetaInformation(MetaInformation metaInformation) {
        this.metaInformation = metaInformation;
        return this;
    }

    public LinksInformation getLinksInformation() {
        return linksInformation;
    }

    public JsonApiResponse setLinksInformation(LinksInformation linksInformation) {
        this.linksInformation = linksInformation;
        return this;
    }

    public Iterable getErrors() {
        return errors;
    }

    public JsonApiResponse setErrors(Iterable errors) {
        this.errors = errors;
        return this;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy