dev.crashteam.openapi.keanalytics.model.AdditionalTimePromoCode 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.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonSubTypes;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import com.fasterxml.jackson.annotation.JsonValue;
import dev.crashteam.openapi.keanalytics.model.PromoCodeContext;
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;
/**
* AdditionalTimePromoCode
*/
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-03-26T08:59:12.399131532Z[Etc/UTC]")
public class AdditionalTimePromoCode extends PromoCodeContext {
private Integer additionalDays;
/**
* Default constructor
* @deprecated Use {@link AdditionalTimePromoCode#AdditionalTimePromoCode(Integer)}
*/
@Deprecated
public AdditionalTimePromoCode() {
super();
}
/**
* Constructor with only required parameters
*/
public AdditionalTimePromoCode(Integer additionalDays) {
super();
this.additionalDays = additionalDays;
}
public AdditionalTimePromoCode additionalDays(Integer additionalDays) {
this.additionalDays = additionalDays;
return this;
}
/**
* Дополнительные дни добавляемые при покупке
* minimum: 1
* @return additionalDays
*/
@NotNull @Min(1)
@Schema(name = "additionalDays", description = "Дополнительные дни добавляемые при покупке", requiredMode = Schema.RequiredMode.REQUIRED)
@JsonProperty("additionalDays")
public Integer getAdditionalDays() {
return additionalDays;
}
public void setAdditionalDays(Integer additionalDays) {
this.additionalDays = additionalDays;
}
public AdditionalTimePromoCode type(TypeEnum type) {
super.setType(type);
return this;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
AdditionalTimePromoCode additionalTimePromoCode = (AdditionalTimePromoCode) o;
return Objects.equals(this.additionalDays, additionalTimePromoCode.additionalDays) &&
super.equals(o);
}
@Override
public int hashCode() {
return Objects.hash(additionalDays, super.hashCode());
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class AdditionalTimePromoCode {\n");
sb.append(" ").append(toIndentedString(super.toString())).append("\n");
sb.append(" additionalDays: ").append(toIndentedString(additionalDays)).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 ");
}
}