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.Valid;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;

/**
 * Incoming calls blocking rules. Rules are valid if and only if parameter [incomingCallsBlockingEnable] equals true.
 */
@ApiModel(description = "Incoming calls blocking rules. Rules are valid if and only if parameter [incomingCallsBlockingEnable] equals true.")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-12-04T11:32:19.054+08:00[Asia/Shanghai]")

public class IncomingCallsBlockingVo   {
  @JsonProperty("types")
  @Valid
  private List<Integer> types = null;

  @JsonProperty("numberList")
  @Valid
  private List<String> numberList = null;

  public IncomingCallsBlockingVo types(List<Integer> types) {
    this.types = types;
    return this;
  }

  public IncomingCallsBlockingVo addTypesItem(Integer typesItem) {
    if (this.types == null) {
      this.types = new ArrayList<>();
    }
    this.types.add(typesItem);
    return this;
  }

  /**
   * Incoming calls blocking types. 0 means specific number, 1 means anonymous number.
   * @return types
  */
  @ApiModelProperty(value = "Incoming calls blocking types. 0 means specific number, 1 means anonymous number.")


  public List<Integer> getTypes() {
    return types;
  }

  public void setTypes(List<Integer> types) {
    this.types = types;
  }

  public IncomingCallsBlockingVo numberList(List<String> numberList) {
    this.numberList = numberList;
    return this;
  }

  public IncomingCallsBlockingVo addNumberListItem(String numberListItem) {
    if (this.numberList == null) {
      this.numberList = new ArrayList<>();
    }
    this.numberList.add(numberListItem);
    return this;
  }

  /**
   * Field [numberList] is required when the value of field [types] contains 0.
   * @return numberList
  */
  @ApiModelProperty(value = "Field [numberList] is required when the value of field [types] contains 0.")


  public List<String> getNumberList() {
    return numberList;
  }

  public void setNumberList(List<String> numberList) {
    this.numberList = numberList;
  }


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    IncomingCallsBlockingVo incomingCallsBlockingVo = (IncomingCallsBlockingVo) o;
    return Objects.equals(this.types, incomingCallsBlockingVo.types) &&
        Objects.equals(this.numberList, incomingCallsBlockingVo.numberList);
  }

  @Override
  public int hashCode() {
    return Objects.hash(types, numberList);
  }

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

