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

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

import javax.validation.Valid;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;

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

public class VoipTelephoneBookBatchSetting   {
  @JsonProperty("contactIds")
  @Valid
  private List<String> contactIds = new ArrayList<>();

  @JsonProperty("selectType")
  private String selectType;

  @JsonProperty("forceDelete")
  private Boolean forceDelete;

  public VoipTelephoneBookBatchSetting contactIds(List<String> contactIds) {
    this.contactIds = contactIds;
    return this;
  }

  public VoipTelephoneBookBatchSetting addContactIdsItem(String contactIdsItem) {
    this.contactIds.add(contactIdsItem);
    return this;
  }

  /**
   * Delete the contact ID of contact person.
   * @return contactIds
  */
  @ApiModelProperty(required = true, value = "Delete the contact ID of contact person.")
  @NotNull


  public List<String> getContactIds() {
    return contactIds;
  }

  public void setContactIds(List<String> contactIds) {
    this.contactIds = contactIds;
  }

  public VoipTelephoneBookBatchSetting selectType(String selectType) {
    this.selectType = selectType;
    return this;
  }

  /**
   * SpeedDialNumberType should be a value as follows: all, include, exclude.
   * @return selectType
  */
  @ApiModelProperty(required = true, value = "SpeedDialNumberType should be a value as follows: all, include, exclude.")
  @NotNull

@Pattern(regexp="all|include|exclude") 
  public String getSelectType() {
    return selectType;
  }

  public void setSelectType(String selectType) {
    this.selectType = selectType;
  }

  public VoipTelephoneBookBatchSetting forceDelete(Boolean forceDelete) {
    this.forceDelete = forceDelete;
    return this;
  }

  /**
   * Other configurations depending on selected contacts (call forwarding rules for instance) will be deleted together if this field is true. Otherwise, a pre-check will be executed and an error message will be returned when this contact is already used in some other configurations.
   * @return forceDelete
  */
  @ApiModelProperty(required = true, value = "Other configurations depending on selected contacts (call forwarding rules for instance) will be deleted together if this field is true. Otherwise, a pre-check will be executed and an error message will be returned when this contact is already used in some other configurations.")
  @NotNull


  public Boolean getForceDelete() {
    return forceDelete;
  }

  public void setForceDelete(Boolean forceDelete) {
    this.forceDelete = forceDelete;
  }


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    VoipTelephoneBookBatchSetting voipTelephoneBookBatchSetting = (VoipTelephoneBookBatchSetting) o;
    return Objects.equals(this.contactIds, voipTelephoneBookBatchSetting.contactIds) &&
        Objects.equals(this.selectType, voipTelephoneBookBatchSetting.selectType) &&
        Objects.equals(this.forceDelete, voipTelephoneBookBatchSetting.forceDelete);
  }

  @Override
  public int hashCode() {
    return Objects.hash(contactIds, selectType, forceDelete);
  }

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

