Skip to content

Instantly share code, notes, and snippets.

@Zheaoli
Created December 15, 2019 03:33
Show Gist options
  • Save Zheaoli/5db671281bf582bff5889e44a6e40522 to your computer and use it in GitHub Desktop.
Save Zheaoli/5db671281bf582bff5889e44a6e40522 to your computer and use it in GitHub Desktop.
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
ModelApiResponseEntity _apiResponse = (ModelApiResponseEntity) o;
return Objects.equals(this.code, _apiResponse.code) &&
Objects.equals(this.data, _apiResponse.data) &&
Objects.equals(this.message, _apiResponse.message);
}
@Override
public int hashCode() {
return Objects.hash(code, data, message);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class ModelApiResponse {\n");
sb.append(" code: ").append(toIndentedString(code)).append("\n");
sb.append(" data: ").append(toIndentedString(data)).append("\n");
sb.append(" message: ").append(toIndentedString(message)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment