This commit is contained in:
2026-10-06 14:32:54 +03:00
parent 65003b6119
commit b95197a6fc
75 changed files with 4403 additions and 28 deletions
@@ -0,0 +1,87 @@
package ru.mtusi.messenger.dto;
import java.util.Objects;
import com.fasterxml.jackson.annotation.JsonProperty;
import ru.mtusi.messenger.dto.ErrorErrorDTO;
import jakarta.validation.Valid;
import jakarta.validation.constraints.*;
import io.swagger.v3.oas.annotations.media.Schema;
import java.util.*;
/**
* ErrorDTO
*/
public class ErrorDTO {
private ErrorErrorDTO error;
public ErrorDTO() {
super();
}
/**
* Constructor with only required parameters
*/
public ErrorDTO(ErrorErrorDTO error) {
this.error = error;
}
public ErrorDTO error(ErrorErrorDTO error) {
this.error = error;
return this;
}
/**
* Get error
* @return error
*/
@NotNull @Valid
@Schema(name = "error", requiredMode = Schema.RequiredMode.REQUIRED)
@JsonProperty("error")
public ErrorErrorDTO getError() {
return error;
}
public void setError(ErrorErrorDTO error) {
this.error = error;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
ErrorDTO errorDTO = (ErrorDTO) o;
return Objects.equals(this.error, errorDTO.error);
}
@Override
public int hashCode() {
return Objects.hash(error);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class ErrorDTO {\n");
sb.append(" error: ").append(toIndentedString(error)).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 ");
}
}