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;

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

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

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

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

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

  /**
   * Outgoing calls blocking types. 0 means mobile, 1 means landline, 2 means long distance, 3 means international, 4 means calls with specific number prefix.
   * @return types
  */
  @ApiModelProperty(value = "Outgoing calls blocking types. 0 means mobile, 1 means landline, 2 means long distance, 3 means international, 4 means calls with specific number prefix.")


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

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

  public OutgoingCallsBlockingVo prefixList(List<String> prefixList) {
    this.prefixList = prefixList;
    return this;
  }

  public OutgoingCallsBlockingVo addPrefixListItem(String prefixListItem) {
    if (this.prefixList == null) {
      this.prefixList = new ArrayList<>();
    }
    this.prefixList.add(prefixListItem);
    return this;
  }

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


  public List<String> getPrefixList() {
    return prefixList;
  }

  public void setPrefixList(List<String> prefixList) {
    this.prefixList = prefixList;
  }


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

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

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

