dev.crashteam.openapi.keanalytics.model.PromoCodeCheckResult Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of openapi-ke-analytics Show documentation
Show all versions of openapi-ke-analytics Show documentation
Generates jar artifact containing compiled openapi classes based on generated openapi yaml files
The newest version!
package dev.crashteam.openapi.keanalytics.model;
import java.net.URI;
import java.util.Objects;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import org.openapitools.jackson.nullable.JsonNullable;
import java.time.OffsetDateTime;
import javax.validation.Valid;
import javax.validation.constraints.*;
import io.swagger.v3.oas.annotations.media.Schema;
import java.util.*;
import javax.annotation.Generated;
/**
* Результат проверки промокода
*/
@Schema(name = "PromoCodeCheckResult", description = "Результат проверки промокода")
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-03-26T08:59:12.399131532Z[Etc/UTC]")
public class PromoCodeCheckResult {
/**
* Код результата проверки
*/
public enum CodeEnum {
VALIDPROMOCODE("validPromoCode"),
INVALIDPROMOCODEDATE("invalidPromoCodeDate"),
INVALIDPROMOCODEUSELIMIT("invalidPromoCodeUseLimit"),
NOTFOUNDPROMOCODE("notFoundPromoCode");
private String value;
CodeEnum(String value) {
this.value = value;
}
@JsonValue
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
@JsonCreator
public static CodeEnum fromValue(String value) {
for (CodeEnum b : CodeEnum.values()) {
if (b.value.equals(value)) {
return b;
}
}
throw new IllegalArgumentException("Unexpected value '" + value + "'");
}
}
private CodeEnum code;
private String message;
public PromoCodeCheckResult code(CodeEnum code) {
this.code = code;
return this;
}
/**
* Код результата проверки
* @return code
*/
@Schema(name = "code", description = "Код результата проверки", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
@JsonProperty("code")
public CodeEnum getCode() {
return code;
}
public void setCode(CodeEnum code) {
this.code = code;
}
public PromoCodeCheckResult message(String message) {
this.message = message;
return this;
}
/**
* Описание результата проверки
* @return message
*/
@Schema(name = "message", description = "Описание результата проверки", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
@JsonProperty("message")
public String getMessage() {
return message;
}
public void setMessage(String message) {
this.message = message;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
PromoCodeCheckResult promoCodeCheckResult = (PromoCodeCheckResult) o;
return Objects.equals(this.code, promoCodeCheckResult.code) &&
Objects.equals(this.message, promoCodeCheckResult.message);
}
@Override
public int hashCode() {
return Objects.hash(code, message);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class PromoCodeCheckResult {\n");
sb.append(" code: ").append(toIndentedString(code)).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 ");
}
}