All Downloads are FREE. Search and download functionalities are using the official Maven repository.

dev.crashteam.openapi.keanalytics.model.DiscountPromoCode Maven / Gradle / Ivy

Go to download

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;

/**
 * DiscountPromoCode
 */


@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-03-26T08:59:12.399131532Z[Etc/UTC]")
public class DiscountPromoCode extends PromoCodeContext {

  private Integer discount;

  /**
   * Default constructor
   * @deprecated Use {@link DiscountPromoCode#DiscountPromoCode(Integer)}
   */
  @Deprecated
  public DiscountPromoCode() {
    super();
  }

  /**
   * Constructor with only required parameters
   */
  public DiscountPromoCode(Integer discount) {
    super();
    this.discount = discount;
  }

  public DiscountPromoCode discount(Integer discount) {
    this.discount = discount;
    return this;
  }

  /**
   * Скидка при покупке
   * minimum: 1
   * maximum: 99
   * @return discount
  */
  @NotNull @Min(1) @Max(99) 
  @Schema(name = "discount", description = "Скидка при покупке", requiredMode = Schema.RequiredMode.REQUIRED)
  @JsonProperty("discount")
  public Integer getDiscount() {
    return discount;
  }

  public void setDiscount(Integer discount) {
    this.discount = discount;
  }

  public DiscountPromoCode 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;
    }
    DiscountPromoCode discountPromoCode = (DiscountPromoCode) o;
    return Objects.equals(this.discount, discountPromoCode.discount) &&
        super.equals(o);
  }

  @Override
  public int hashCode() {
    return Objects.hash(discount, super.hashCode());
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class DiscountPromoCode {\n");
    sb.append("    ").append(toIndentedString(super.toString())).append("\n");
    sb.append("    discount: ").append(toIndentedString(discount)).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    ");
  }
}





© 2015 - 2024 Weber Informatics LLC | Privacy Policy