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

/**
 * Domain info. Handle situations where there are ports, [type] value of 7 is required
 */
@ApiModel(description = "Domain info. Handle situations where there are ports, [type] value of 7 is required")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-12-04T11:32:19.054+08:00[Asia/Shanghai]")

public class DomainOpenApiVo   {
  @JsonProperty("address")
  private String address;

  @JsonProperty("port")
  private String port;

  @JsonProperty("description")
  private String description;

  public DomainOpenApiVo address(String address) {
    this.address = address;
    return this;
  }

  /**
   * Domain address, should be a valid domain address
   * @return address
  */
  @ApiModelProperty(required = true, value = "Domain address, should be a valid domain address")
  @NotNull


  public String getAddress() {
    return address;
  }

  public void setAddress(String address) {
    this.address = address;
  }

  public DomainOpenApiVo port(String port) {
    this.port = port;
    return this;
  }

  /**
   * Domain port, port should be within the range of 0-65535 or empty, e.g. 80,80-100
   * @return port
  */
  @ApiModelProperty(value = "Domain port, port should be within the range of 0-65535 or empty, e.g. 80,80-100")


  public String getPort() {
    return port;
  }

  public void setPort(String port) {
    this.port = port;
  }

  public DomainOpenApiVo description(String description) {
    this.description = description;
    return this;
  }

  /**
   * Domain description, description should contain 1 to 512 characters.
   * @return description
  */
  @ApiModelProperty(value = "Domain description, description should contain 1 to 512 characters.")

@Pattern(regexp="^$|^[^ ]$|^[^ ].{0,510}[^ ]$") 
  public String getDescription() {
    return description;
  }

  public void setDescription(String description) {
    this.description = description;
  }


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    DomainOpenApiVo domainOpenApiVo = (DomainOpenApiVo) o;
    return Objects.equals(this.address, domainOpenApiVo.address) &&
        Objects.equals(this.port, domainOpenApiVo.port) &&
        Objects.equals(this.description, domainOpenApiVo.description);
  }

  @Override
  public int hashCode() {
    return Objects.hash(address, port, description);
  }

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

