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 javax.validation.constraints.NotNull;
import java.util.Objects;

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

public class ProviderSettingVo   {
  @JsonProperty("provider")
  private Integer provider;

  @JsonProperty("registrarAddress")
  private String registrarAddress;

  @JsonProperty("username")
  private String username;

  @JsonProperty("password")
  private String password;

  @JsonProperty("portSettings")
  private PortSettingVo portSettings;

  public ProviderSettingVo provider(Integer provider) {
    this.provider = provider;
    return this;
  }

  /**
   * The telephony providers supported. The range is between 0 and 13. 0: Other Provider; 1: 1 & 1 Internet; 2: Congstar; 3: Vodafone/Arcor; 4: DUS.net; 5: Easybell; 6: Kabel Deutschland; 7: QSC/Q-DSL home; 8: Sipgate.de; 9: Sipgate Team; 10: Sipload; 11: Ventengo; 12: Telekom; 13: Bellsip. The default value is 0.
   * @return provider
  */
  @ApiModelProperty(required = true, value = "The telephony providers supported. The range is between 0 and 13. 0: Other Provider; 1: 1 & 1 Internet; 2: Congstar; 3: Vodafone/Arcor; 4: DUS.net; 5: Easybell; 6: Kabel Deutschland; 7: QSC/Q-DSL home; 8: Sipgate.de; 9: Sipgate Team; 10: Sipload; 11: Ventengo; 12: Telekom; 13: Bellsip. The default value is 0.")
  @NotNull


  public Integer getProvider() {
    return provider;
  }

  public void setProvider(Integer provider) {
    this.provider = provider;
  }

  public ProviderSettingVo registrarAddress(String registrarAddress) {
    this.registrarAddress = registrarAddress;
    return this;
  }

  /**
   * When parameter [provider] is a value in[0, 6], parameter [registrarAddress] should not be null.
   * @return registrarAddress
  */
  @ApiModelProperty(value = "When parameter [provider] is a value in[0, 6], parameter [registrarAddress] should not be null.")


  public String getRegistrarAddress() {
    return registrarAddress;
  }

  public void setRegistrarAddress(String registrarAddress) {
    this.registrarAddress = registrarAddress;
  }

  public ProviderSettingVo username(String username) {
    this.username = username;
    return this;
  }

  /**
   * When parameter [provider] is a value in [0, 2, 4, 5, 8, 9, 10, 11, 12, 13], parameter [username] should not be null.
   * @return username
  */
  @ApiModelProperty(value = "When parameter [provider] is a value in [0, 2, 4, 5, 8, 9, 10, 11, 12, 13], parameter [username] should not be null.")


  public String getUsername() {
    return username;
  }

  public void setUsername(String username) {
    this.username = username;
  }

  public ProviderSettingVo password(String password) {
    this.password = password;
    return this;
  }

  /**
   * Get password
   * @return password
  */
  @ApiModelProperty(value = "")


  public String getPassword() {
    return password;
  }

  public void setPassword(String password) {
    this.password = password;
  }

  public ProviderSettingVo portSettings(PortSettingVo portSettings) {
    this.portSettings = portSettings;
    return this;
  }

  /**
   * Get portSettings
   * @return portSettings
  */
  @ApiModelProperty(value = "")

  @Valid

  public PortSettingVo getPortSettings() {
    return portSettings;
  }

  public void setPortSettings(PortSettingVo portSettings) {
    this.portSettings = portSettings;
  }


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    ProviderSettingVo providerSettingVo = (ProviderSettingVo) o;
    return Objects.equals(this.provider, providerSettingVo.provider) &&
        Objects.equals(this.registrarAddress, providerSettingVo.registrarAddress) &&
        Objects.equals(this.username, providerSettingVo.username) &&
        Objects.equals(this.password, providerSettingVo.password) &&
        Objects.equals(this.portSettings, providerSettingVo.portSettings);
  }

  @Override
  public int hashCode() {
    return Objects.hash(provider, registrarAddress, username, password, portSettings);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class ProviderSettingVo {\n");
    
    sb.append("    provider: ").append(toIndentedString(provider)).append("\n");
    sb.append("    registrarAddress: ").append(toIndentedString(registrarAddress)).append("\n");
    sb.append("    username: ").append(toIndentedString(username)).append("\n");
    sb.append("    password: ").append(toIndentedString(password)).append("\n");
    sb.append("    portSettings: ").append(toIndentedString(portSettings)).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    ");
  }
}

