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

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

public class IptvOpenApiVo   {
  @JsonProperty("enable")
  private Boolean enable;

  @JsonProperty("wanPortId")
  private String wanPortId;

  @JsonProperty("mode")
  private Integer mode;

  @JsonProperty("customConfig")
  private IptvCustomOpenApiVo customConfig;

  @JsonProperty("portConfig")
  @Valid
  private List<IptvPortOpenApiVo> portConfig = new ArrayList<>();

  @JsonProperty("dslConfig")
  private IptvDslOpenApiVo dslConfig;

  public IptvOpenApiVo enable(Boolean enable) {
    this.enable = enable;
    return this;
  }

  /**
   * Get enable
   * @return enable
  */
  @ApiModelProperty(required = true, value = "")
  @NotNull


  public Boolean getEnable() {
    return enable;
  }

  public void setEnable(Boolean enable) {
    this.enable = enable;
  }

  public IptvOpenApiVo wanPortId(String wanPortId) {
    this.wanPortId = wanPortId;
    return this;
  }

  /**
   * WAN port ID can be obtained from 'Get internet basic info' interface.
   * @return wanPortId
  */
  @ApiModelProperty(required = true, value = "WAN port ID can be obtained from 'Get internet basic info' interface.")
  @NotNull


  public String getWanPortId() {
    return wanPortId;
  }

  public void setWanPortId(String wanPortId) {
    this.wanPortId = wanPortId;
  }

  public IptvOpenApiVo mode(Integer mode) {
    this.mode = mode;
    return this;
  }

  /**
   * Mode should be a value as follows: 0:Bridge, 1:Custom
   * @return mode
  */
  @ApiModelProperty(required = true, value = "Mode should be a value as follows: 0:Bridge, 1:Custom")
  @NotNull


  public Integer getMode() {
    return mode;
  }

  public void setMode(Integer mode) {
    this.mode = mode;
  }

  public IptvOpenApiVo customConfig(IptvCustomOpenApiVo customConfig) {
    this.customConfig = customConfig;
    return this;
  }

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

  @Valid

  public IptvCustomOpenApiVo getCustomConfig() {
    return customConfig;
  }

  public void setCustomConfig(IptvCustomOpenApiVo customConfig) {
    this.customConfig = customConfig;
  }

  public IptvOpenApiVo portConfig(List<IptvPortOpenApiVo> portConfig) {
    this.portConfig = portConfig;
    return this;
  }

  public IptvOpenApiVo addPortConfigItem(IptvPortOpenApiVo portConfigItem) {
    this.portConfig.add(portConfigItem);
    return this;
  }

  /**
   * Get portConfig
   * @return portConfig
  */
  @ApiModelProperty(required = true, value = "")
  @NotNull

  @Valid

  public List<IptvPortOpenApiVo> getPortConfig() {
    return portConfig;
  }

  public void setPortConfig(List<IptvPortOpenApiVo> portConfig) {
    this.portConfig = portConfig;
  }

  public IptvOpenApiVo dslConfig(IptvDslOpenApiVo dslConfig) {
    this.dslConfig = dslConfig;
    return this;
  }

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

  @Valid

  public IptvDslOpenApiVo getDslConfig() {
    return dslConfig;
  }

  public void setDslConfig(IptvDslOpenApiVo dslConfig) {
    this.dslConfig = dslConfig;
  }


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    IptvOpenApiVo iptvOpenApiVo = (IptvOpenApiVo) o;
    return Objects.equals(this.enable, iptvOpenApiVo.enable) &&
        Objects.equals(this.wanPortId, iptvOpenApiVo.wanPortId) &&
        Objects.equals(this.mode, iptvOpenApiVo.mode) &&
        Objects.equals(this.customConfig, iptvOpenApiVo.customConfig) &&
        Objects.equals(this.portConfig, iptvOpenApiVo.portConfig) &&
        Objects.equals(this.dslConfig, iptvOpenApiVo.dslConfig);
  }

  @Override
  public int hashCode() {
    return Objects.hash(enable, wanPortId, mode, customConfig, portConfig, dslConfig);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class IptvOpenApiVo {\n");
    
    sb.append("    enable: ").append(toIndentedString(enable)).append("\n");
    sb.append("    wanPortId: ").append(toIndentedString(wanPortId)).append("\n");
    sb.append("    mode: ").append(toIndentedString(mode)).append("\n");
    sb.append("    customConfig: ").append(toIndentedString(customConfig)).append("\n");
    sb.append("    portConfig: ").append(toIndentedString(portConfig)).append("\n");
    sb.append("    dslConfig: ").append(toIndentedString(dslConfig)).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    ");
  }
}

