001
002package com.commercetools.importapi.models.errors;
003
004import java.time.*;
005import java.util.*;
006
007import com.fasterxml.jackson.annotation.JsonCreator;
008import com.fasterxml.jackson.annotation.JsonProperty;
009import com.fasterxml.jackson.databind.annotation.*;
010
011import io.vrap.rmf.base.client.ModelBase;
012import io.vrap.rmf.base.client.utils.Generated;
013
014import org.apache.commons.lang3.builder.EqualsBuilder;
015import org.apache.commons.lang3.builder.HashCodeBuilder;
016
017/**
018 *  <p>An invalid JSON input has been sent to the service. Either the JSON is syntactically incorrect or the JSON has an unexpected shape, for example, a required field is missing. The client application should validate the input according to the constraints described in the error message before sending the request again.</p>
019 */
020@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen")
021public class InvalidJsonInputImpl implements InvalidJsonInput, ModelBase {
022
023    private String code;
024
025    private String message;
026
027    /**
028     * create instance with all properties
029     */
030    @JsonCreator
031    InvalidJsonInputImpl(@JsonProperty("message") final String message) {
032        this.message = message;
033        this.code = INVALID_JSON_INPUT;
034    }
035
036    /**
037     * create empty instance
038     */
039    public InvalidJsonInputImpl() {
040        this.code = INVALID_JSON_INPUT;
041    }
042
043    /**
044     *
045     */
046
047    public String getCode() {
048        return this.code;
049    }
050
051    /**
052     *
053     */
054
055    public String getMessage() {
056        return this.message;
057    }
058
059    public void setMessage(final String message) {
060        this.message = message;
061    }
062
063    @Override
064    public boolean equals(Object o) {
065        if (this == o)
066            return true;
067
068        if (o == null || getClass() != o.getClass())
069            return false;
070
071        InvalidJsonInputImpl that = (InvalidJsonInputImpl) o;
072
073        return new EqualsBuilder().append(code, that.code)
074                .append(message, that.message)
075                .append(code, that.code)
076                .append(message, that.message)
077                .isEquals();
078    }
079
080    @Override
081    public int hashCode() {
082        return new HashCodeBuilder(17, 37).append(code).append(message).toHashCode();
083    }
084
085}