package org.wfc.omada.api.sitesetting.model;

import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;
import java.util.Objects;

/**
 * SMS quota setting.
 */
@ApiModel(description = "SMS quota setting.")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-12-04T11:32:19.054+08:00[Asia/Shanghai]")

public class QuotaSmsSettingOpenApiVo   {
  @JsonProperty("used")
  private Integer used;

  @JsonProperty("type")
  private Integer type;

  @JsonProperty("startDate")
  private Integer startDate;

  @JsonProperty("limit")
  private Boolean limit;

  @JsonProperty("credit")
  private Integer credit;

  @JsonProperty("alert")
  private Boolean alert;

  @JsonProperty("usage")
  private Integer usage;

  @JsonProperty("countryCode")
  private String countryCode;

  @JsonProperty("callingCode")
  private String callingCode;

  @JsonProperty("phone")
  private String phone;

  public QuotaSmsSettingOpenApiVo used(Integer used) {
    this.used = used;
    return this;
  }

  /**
   * The amount of SMS in current billing cycle.
   * @return used
  */
  @ApiModelProperty(value = "The amount of SMS in current billing cycle.")


  public Integer getUsed() {
    return used;
  }

  public void setUsed(Integer used) {
    this.used = used;
  }

  public QuotaSmsSettingOpenApiVo type(Integer type) {
    this.type = type;
    return this;
  }

  /**
   * Billing cycle type should be a value as follows: 0:total; 1:monthly.
   * @return type
  */
  @ApiModelProperty(required = true, value = "Billing cycle type should be a value as follows: 0:total; 1:monthly.")
  @NotNull


  public Integer getType() {
    return type;
  }

  public void setType(Integer type) {
    this.type = type;
  }

  public QuotaSmsSettingOpenApiVo startDate(Integer startDate) {
    this.startDate = startDate;
    return this;
  }

  /**
   * Start date of monthly billing cycle type, valid date should be within the range of 1–31.
   * @return startDate
  */
  @ApiModelProperty(value = "Start date of monthly billing cycle type, valid date should be within the range of 1–31.")


  public Integer getStartDate() {
    return startDate;
  }

  public void setStartDate(Integer startDate) {
    this.startDate = startDate;
  }

  public QuotaSmsSettingOpenApiVo limit(Boolean limit) {
    this.limit = limit;
    return this;
  }

  /**
   * Quota limit is enabled/disabled.
   * @return limit
  */
  @ApiModelProperty(required = true, value = "Quota limit is enabled/disabled.")
  @NotNull


  public Boolean getLimit() {
    return limit;
  }

  public void setLimit(Boolean limit) {
    this.limit = limit;
  }

  public QuotaSmsSettingOpenApiVo credit(Integer credit) {
    this.credit = credit;
    return this;
  }

  /**
   * The amount of data allowance in current billing cycle, valid date should be within the range of 0–100000.
   * @return credit
  */
  @ApiModelProperty(value = "The amount of data allowance in current billing cycle, valid date should be within the range of 0–100000.")


  public Integer getCredit() {
    return credit;
  }

  public void setCredit(Integer credit) {
    this.credit = credit;
  }

  public QuotaSmsSettingOpenApiVo alert(Boolean alert) {
    this.alert = alert;
    return this;
  }

  /**
   * SMS alert for usage is enabled/disabled.
   * @return alert
  */
  @ApiModelProperty(value = "SMS alert for usage is enabled/disabled.")


  public Boolean getAlert() {
    return alert;
  }

  public void setAlert(Boolean alert) {
    this.alert = alert;
  }

  public QuotaSmsSettingOpenApiVo usage(Integer usage) {
    this.usage = usage;
    return this;
  }

  /**
   * SMS alert for usage when reach percentage of allowance, valid date should be within the range of 0–100.
   * @return usage
  */
  @ApiModelProperty(value = "SMS alert for usage when reach percentage of allowance, valid date should be within the range of 0–100.")


  public Integer getUsage() {
    return usage;
  }

  public void setUsage(Integer usage) {
    this.usage = usage;
  }

  public QuotaSmsSettingOpenApiVo countryCode(String countryCode) {
    this.countryCode = countryCode;
    return this;
  }

  /**
   * Country code should contain 2 characters. Country code must be entered when entering the calling code. For the values of Country code, refer to section 5.4.1 of the Open API Access Guide.
   * @return countryCode
  */
  @ApiModelProperty(value = "Country code should contain 2 characters. Country code must be entered when entering the calling code. For the values of Country code, refer to section 5.4.1 of the Open API Access Guide.")

@Size(min=2,max=2) 
  public String getCountryCode() {
    return countryCode;
  }

  public void setCountryCode(String countryCode) {
    this.countryCode = countryCode;
  }

  public QuotaSmsSettingOpenApiVo callingCode(String callingCode) {
    this.callingCode = callingCode;
    return this;
  }

  /**
   * Calling code should contain 2 to 5 characters. Calling code must be entered when entering the country code. For the values of Calling code, refer to section 5.4.1 of the Open API Access Guide.
   * @return callingCode
  */
  @ApiModelProperty(value = "Calling code should contain 2 to 5 characters. Calling code must be entered when entering the country code. For the values of Calling code, refer to section 5.4.1 of the Open API Access Guide.")

@Size(min=2,max=5) 
  public String getCallingCode() {
    return callingCode;
  }

  public void setCallingCode(String callingCode) {
    this.callingCode = callingCode;
  }

  public QuotaSmsSettingOpenApiVo phone(String phone) {
    this.phone = phone;
    return this;
  }

  /**
   * The phone number to receive SMS alerts.
   * @return phone
  */
  @ApiModelProperty(value = "The phone number to receive SMS alerts.")

@Pattern(regexp="\\d{4,12}") 
  public String getPhone() {
    return phone;
  }

  public void setPhone(String phone) {
    this.phone = phone;
  }


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    QuotaSmsSettingOpenApiVo quotaSmsSettingOpenApiVo = (QuotaSmsSettingOpenApiVo) o;
    return Objects.equals(this.used, quotaSmsSettingOpenApiVo.used) &&
        Objects.equals(this.type, quotaSmsSettingOpenApiVo.type) &&
        Objects.equals(this.startDate, quotaSmsSettingOpenApiVo.startDate) &&
        Objects.equals(this.limit, quotaSmsSettingOpenApiVo.limit) &&
        Objects.equals(this.credit, quotaSmsSettingOpenApiVo.credit) &&
        Objects.equals(this.alert, quotaSmsSettingOpenApiVo.alert) &&
        Objects.equals(this.usage, quotaSmsSettingOpenApiVo.usage) &&
        Objects.equals(this.countryCode, quotaSmsSettingOpenApiVo.countryCode) &&
        Objects.equals(this.callingCode, quotaSmsSettingOpenApiVo.callingCode) &&
        Objects.equals(this.phone, quotaSmsSettingOpenApiVo.phone);
  }

  @Override
  public int hashCode() {
    return Objects.hash(used, type, startDate, limit, credit, alert, usage, countryCode, callingCode, phone);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class QuotaSmsSettingOpenApiVo {\n");
    
    sb.append("    used: ").append(toIndentedString(used)).append("\n");
    sb.append("    type: ").append(toIndentedString(type)).append("\n");
    sb.append("    startDate: ").append(toIndentedString(startDate)).append("\n");
    sb.append("    limit: ").append(toIndentedString(limit)).append("\n");
    sb.append("    credit: ").append(toIndentedString(credit)).append("\n");
    sb.append("    alert: ").append(toIndentedString(alert)).append("\n");
    sb.append("    usage: ").append(toIndentedString(usage)).append("\n");
    sb.append("    countryCode: ").append(toIndentedString(countryCode)).append("\n");
    sb.append("    callingCode: ").append(toIndentedString(callingCode)).append("\n");
    sb.append("    phone: ").append(toIndentedString(phone)).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    ");
  }
}

