001 002package com.commercetools.history.models.change_history; 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 * ErrorResponse 019 */ 020@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") 021public class ErrorResponseImpl implements ErrorResponse, ModelBase { 022 023 private Integer statusCode; 024 025 private String message; 026 027 private String error; 028 029 private String errorDescription; 030 031 private java.util.List<com.commercetools.history.models.change_history.ErrorObject> errors; 032 033 /** 034 * create instance with all properties 035 */ 036 @JsonCreator 037 ErrorResponseImpl(@JsonProperty("statusCode") final Integer statusCode, 038 @JsonProperty("message") final String message, @JsonProperty("error") final String error, 039 @JsonProperty("error_description") final String errorDescription, 040 @JsonProperty("errors") final java.util.List<com.commercetools.history.models.change_history.ErrorObject> errors) { 041 this.statusCode = statusCode; 042 this.message = message; 043 this.error = error; 044 this.errorDescription = errorDescription; 045 this.errors = errors; 046 } 047 048 /** 049 * create empty instance 050 */ 051 public ErrorResponseImpl() { 052 } 053 054 /** 055 * 056 */ 057 058 public Integer getStatusCode() { 059 return this.statusCode; 060 } 061 062 /** 063 * 064 */ 065 066 public String getMessage() { 067 return this.message; 068 } 069 070 /** 071 * 072 */ 073 074 public String getError() { 075 return this.error; 076 } 077 078 /** 079 * 080 */ 081 082 public String getErrorDescription() { 083 return this.errorDescription; 084 } 085 086 /** 087 * 088 */ 089 090 public java.util.List<com.commercetools.history.models.change_history.ErrorObject> getErrors() { 091 return this.errors; 092 } 093 094 public void setStatusCode(final Integer statusCode) { 095 this.statusCode = statusCode; 096 } 097 098 public void setMessage(final String message) { 099 this.message = message; 100 } 101 102 public void setError(final String error) { 103 this.error = error; 104 } 105 106 public void setErrorDescription(final String errorDescription) { 107 this.errorDescription = errorDescription; 108 } 109 110 public void setErrors(final com.commercetools.history.models.change_history.ErrorObject... errors) { 111 this.errors = new ArrayList<>(Arrays.asList(errors)); 112 } 113 114 public void setErrors(final java.util.List<com.commercetools.history.models.change_history.ErrorObject> errors) { 115 this.errors = errors; 116 } 117 118 @Override 119 public boolean equals(Object o) { 120 if (this == o) 121 return true; 122 123 if (o == null || getClass() != o.getClass()) 124 return false; 125 126 ErrorResponseImpl that = (ErrorResponseImpl) o; 127 128 return new EqualsBuilder().append(statusCode, that.statusCode) 129 .append(message, that.message) 130 .append(error, that.error) 131 .append(errorDescription, that.errorDescription) 132 .append(errors, that.errors) 133 .append(statusCode, that.statusCode) 134 .append(message, that.message) 135 .append(error, that.error) 136 .append(errorDescription, that.errorDescription) 137 .append(errors, that.errors) 138 .isEquals(); 139 } 140 141 @Override 142 public int hashCode() { 143 return new HashCodeBuilder(17, 37).append(statusCode) 144 .append(message) 145 .append(error) 146 .append(errorDescription) 147 .append(errors) 148 .toHashCode(); 149 } 150 151}