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.Objects;

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

public class CreateDdnsOpenApiVo   {
  @JsonProperty("service")
  private Integer service;

  @JsonProperty("status")
  private Boolean status;

  @JsonProperty("interfacePortId")
  private String interfacePortId;

  @JsonProperty("username")
  private String username;

  @JsonProperty("password")
  private String password;

  @JsonProperty("domainName")
  private String domainName;

  @JsonProperty("interval")
  private DdnsIntervalOpenApiVo interval;

  @JsonProperty("updateUrl")
  private String updateUrl;

  public CreateDdnsOpenApiVo service(Integer service) {
    this.service = service;
    return this;
  }

  /**
   * Dynamic DNS service type. Service should be a value as follows: 0: DynDNS, 1: NO-IP, 2: Peanuthull, 3: Comexe, 4: Custom, 5: TP-Link DDNS
   * @return service
  */
  @ApiModelProperty(required = true, value = "Dynamic DNS service type. Service should be a value as follows: 0: DynDNS, 1: NO-IP, 2: Peanuthull, 3: Comexe, 4: Custom, 5: TP-Link DDNS")
  @NotNull


  public Integer getService() {
    return service;
  }

  public void setService(Integer service) {
    this.service = service;
  }

  public CreateDdnsOpenApiVo status(Boolean status) {
    this.status = status;
    return this;
  }

  /**
   * Dynamic DNS enable status
   * @return status
  */
  @ApiModelProperty(required = true, value = "Dynamic DNS enable status")
  @NotNull


  public Boolean getStatus() {
    return status;
  }

  public void setStatus(Boolean status) {
    this.status = status;
  }

  public CreateDdnsOpenApiVo interfacePortId(String interfacePortId) {
    this.interfacePortId = interfacePortId;
    return this;
  }

  /**
   * This field represents interface Port ID
   * @return interfacePortId
  */
  @ApiModelProperty(required = true, value = "This field represents interface Port ID")
  @NotNull


  public String getInterfacePortId() {
    return interfacePortId;
  }

  public void setInterfacePortId(String interfacePortId) {
    this.interfacePortId = interfacePortId;
  }

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

  /**
   * Dynamic DNS username. Username should contain 1 to 128 characters
   * @return username
  */
  @ApiModelProperty(required = true, value = "Dynamic DNS username. Username should contain 1 to 128 characters")
  @NotNull

@Pattern(regexp="^[\\041-\\0176]$|^[\\041-\\0176][\\040-\\0176]{0,126}[\\041-\\0176]$") 
  public String getUsername() {
    return username;
  }

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

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

  /**
   * Dynamic DNS password. Password should contain 1 to 128 characters
   * @return password
  */
  @ApiModelProperty(required = true, value = "Dynamic DNS password. Password should contain 1 to 128 characters")
  @NotNull

@Pattern(regexp="^[\\041-\\0176]$|^[\\041-\\0176][\\040-\\0176]{0,126}[\\041-\\0176]$") 
  public String getPassword() {
    return password;
  }

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

  public CreateDdnsOpenApiVo domainName(String domainName) {
    this.domainName = domainName;
    return this;
  }

  /**
   * Dynamic DNS domainName, valid when parameter [service] is 0, 1 or 4
   * @return domainName
  */
  @ApiModelProperty(value = "Dynamic DNS domainName, valid when parameter [service] is 0, 1 or 4")

@Pattern(regexp="((\\d{1,2}|1\\d\\d|2[0-4]\\d|25[0-5])(\\.(\\d{1,2}|1\\d\\d|2[0-4]\\d|25[0-5])){3}|([a-zA-Z0-9]([a-zA-Z0-9\\-]{0,61}[a-zA-Z0-9])?\\.)+[a-zA-Z]{2,6})") 
  public String getDomainName() {
    return domainName;
  }

  public void setDomainName(String domainName) {
    this.domainName = domainName;
  }

  public CreateDdnsOpenApiVo interval(DdnsIntervalOpenApiVo interval) {
    this.interval = interval;
    return this;
  }

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

  @Valid

  public DdnsIntervalOpenApiVo getInterval() {
    return interval;
  }

  public void setInterval(DdnsIntervalOpenApiVo interval) {
    this.interval = interval;
  }

  public CreateDdnsOpenApiVo updateUrl(String updateUrl) {
    this.updateUrl = updateUrl;
    return this;
  }

  /**
   * Dynamic DNS updateUrl, valid when parameter [service] is 4. Update URL must contain [USERNAME], [PASSWORD] and [DOMAIN], and Update-URL will be applied to all custom entries
   * @return updateUrl
  */
  @ApiModelProperty(value = "Dynamic DNS updateUrl, valid when parameter [service] is 4. Update URL must contain [USERNAME], [PASSWORD] and [DOMAIN], and Update-URL will be applied to all custom entries")


  public String getUpdateUrl() {
    return updateUrl;
  }

  public void setUpdateUrl(String updateUrl) {
    this.updateUrl = updateUrl;
  }


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    CreateDdnsOpenApiVo createDdnsOpenApiVo = (CreateDdnsOpenApiVo) o;
    return Objects.equals(this.service, createDdnsOpenApiVo.service) &&
        Objects.equals(this.status, createDdnsOpenApiVo.status) &&
        Objects.equals(this.interfacePortId, createDdnsOpenApiVo.interfacePortId) &&
        Objects.equals(this.username, createDdnsOpenApiVo.username) &&
        Objects.equals(this.password, createDdnsOpenApiVo.password) &&
        Objects.equals(this.domainName, createDdnsOpenApiVo.domainName) &&
        Objects.equals(this.interval, createDdnsOpenApiVo.interval) &&
        Objects.equals(this.updateUrl, createDdnsOpenApiVo.updateUrl);
  }

  @Override
  public int hashCode() {
    return Objects.hash(service, status, interfacePortId, username, password, domainName, interval, updateUrl);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class CreateDdnsOpenApiVo {\n");
    
    sb.append("    service: ").append(toIndentedString(service)).append("\n");
    sb.append("    status: ").append(toIndentedString(status)).append("\n");
    sb.append("    interfacePortId: ").append(toIndentedString(interfacePortId)).append("\n");
    sb.append("    username: ").append(toIndentedString(username)).append("\n");
    sb.append("    password: ").append(toIndentedString(password)).append("\n");
    sb.append("    domainName: ").append(toIndentedString(domainName)).append("\n");
    sb.append("    interval: ").append(toIndentedString(interval)).append("\n");
    sb.append("    updateUrl: ").append(toIndentedString(updateUrl)).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    ");
  }
}

