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 indexing of Product information is still in progress for Projects that have indexing activated.</p>
019 */
020@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen")
021public class SearchIndexingInProgressErrorImpl implements SearchIndexingInProgressError, ModelBase {
022
023    private String code;
024
025    private String message;
026
027    private Map<String, java.lang.Object> values;
028
029    /**
030     * create instance with all properties
031     */
032    @JsonCreator
033    SearchIndexingInProgressErrorImpl(@JsonProperty("message") final String message,
034            @JsonProperty("values") final Map<String, java.lang.Object> values) {
035        this.message = message;
036        this.values = values;
037        this.code = SEARCH_INDEXING_IN_PROGRESS;
038    }
039
040    /**
041     * create empty instance
042     */
043    public SearchIndexingInProgressErrorImpl() {
044        this.code = SEARCH_INDEXING_IN_PROGRESS;
045    }
046
047    /**
048     *
049     */
050
051    public String getCode() {
052        return this.code;
053    }
054
055    /**
056     *  <p><code>"The indexing is currently in progress. Please wait until the status is "Activated" to execute search requests."</code></p>
057     */
058
059    public String getMessage() {
060        return this.message;
061    }
062
063    /**
064     *  <p>Error-specific additional fields.</p>
065     */
066
067    public Map<String, java.lang.Object> values() {
068        return values;
069    }
070
071    public void setMessage(final String message) {
072        this.message = message;
073    }
074
075    public void setValue(String key, java.lang.Object value) {
076        if (values == null) {
077            values = new HashMap<>();
078        }
079        values.put(key, value);
080    }
081
082    @Override
083    public boolean equals(Object o) {
084        if (this == o)
085            return true;
086
087        if (o == null || getClass() != o.getClass())
088            return false;
089
090        SearchIndexingInProgressErrorImpl that = (SearchIndexingInProgressErrorImpl) o;
091
092        return new EqualsBuilder().append(code, that.code)
093                .append(message, that.message)
094                .append(values, that.values)
095                .append(code, that.code)
096                .append(message, that.message)
097                .append(values, that.values)
098                .isEquals();
099    }
100
101    @Override
102    public int hashCode() {
103        return new HashCodeBuilder(17, 37).append(code).append(message).append(values).toHashCode();
104    }
105
106}