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 query times out.</p> 019 * <p>If a query constantly times out, please check if it follows the performance best practices.</p> 020 */ 021@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") 022public class GraphQLQueryTimedOutErrorImpl implements GraphQLQueryTimedOutError, ModelBase { 023 024 private String code; 025 026 private Map<String, java.lang.Object> values; 027 028 /** 029 * create instance with all properties 030 */ 031 @JsonCreator 032 GraphQLQueryTimedOutErrorImpl(@JsonProperty("values") final Map<String, java.lang.Object> values) { 033 this.values = values; 034 this.code = QUERY_TIMED_OUT; 035 } 036 037 /** 038 * create empty instance 039 */ 040 public GraphQLQueryTimedOutErrorImpl() { 041 this.code = QUERY_TIMED_OUT; 042 } 043 044 /** 045 * 046 */ 047 048 public String getCode() { 049 return this.code; 050 } 051 052 /** 053 * <p>Error-specific additional fields.</p> 054 */ 055 056 public Map<String, java.lang.Object> values() { 057 return values; 058 } 059 060 public void setValue(String key, java.lang.Object value) { 061 if (values == null) { 062 values = new HashMap<>(); 063 } 064 values.put(key, value); 065 } 066 067 @Override 068 public boolean equals(Object o) { 069 if (this == o) 070 return true; 071 072 if (o == null || getClass() != o.getClass()) 073 return false; 074 075 GraphQLQueryTimedOutErrorImpl that = (GraphQLQueryTimedOutErrorImpl) o; 076 077 return new EqualsBuilder().append(code, that.code) 078 .append(values, that.values) 079 .append(code, that.code) 080 .append(values, that.values) 081 .isEquals(); 082 } 083 084 @Override 085 public int hashCode() { 086 return new HashCodeBuilder(17, 37).append(code).append(values).toHashCode(); 087 } 088 089}