001
002package com.commercetools.api.models.error;
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>Returned when the request results in too much data being returned from the API. Adjust the request query to reduce the size of the data returned.</p>
019 */
020@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen")
021public class GraphQLContentTooLargeErrorImpl implements GraphQLContentTooLargeError, ModelBase {
022
023    private String code;
024
025    private Map<String, java.lang.Object> values;
026
027    /**
028     * create instance with all properties
029     */
030    @JsonCreator
031    GraphQLContentTooLargeErrorImpl(@JsonProperty("values") final Map<String, java.lang.Object> values) {
032        this.values = values;
033        this.code = CONTENT_TOO_LARGE;
034    }
035
036    /**
037     * create empty instance
038     */
039    public GraphQLContentTooLargeErrorImpl() {
040        this.code = CONTENT_TOO_LARGE;
041    }
042
043    /**
044     *
045     */
046
047    public String getCode() {
048        return this.code;
049    }
050
051    /**
052     *  <p>Error-specific additional fields.</p>
053     */
054
055    public Map<String, java.lang.Object> values() {
056        return values;
057    }
058
059    public void setValue(String key, java.lang.Object value) {
060        if (values == null) {
061            values = new HashMap<>();
062        }
063        values.put(key, value);
064    }
065
066    @Override
067    public boolean equals(Object o) {
068        if (this == o)
069            return true;
070
071        if (o == null || getClass() != o.getClass())
072            return false;
073
074        GraphQLContentTooLargeErrorImpl that = (GraphQLContentTooLargeErrorImpl) o;
075
076        return new EqualsBuilder().append(code, that.code)
077                .append(values, that.values)
078                .append(code, that.code)
079                .append(values, that.values)
080                .isEquals();
081    }
082
083    @Override
084    public int hashCode() {
085        return new HashCodeBuilder(17, 37).append(code).append(values).toHashCode();
086    }
087
088}