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

/**
 * Custom Service list. Up to 2 DoT default and custom Servers can be selected, setting the parameter [enable] to true indicates the selection of the custom server. Up to 8 custom servers can be configured
 */
@ApiModel(description = "Custom Service list. Up to 2 DoT default and custom Servers can be selected, setting the parameter [enable] to true indicates the selection of the custom server. Up to 8 custom servers can be configured")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-12-04T11:32:19.054+08:00[Asia/Shanghai]")

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

  @JsonProperty("name")
  private String name;

  @JsonProperty("server")
  @Valid
  private List<String> server = new ArrayList<>();

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

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


  public Boolean getEnable() {
    return enable;
  }

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

  public DotCustomizedServerOpenApiVo name(String name) {
    this.name = name;
    return this;
  }

  /**
   * Custom service name, should contain 1 to 64 characters
   * @return name
  */
  @ApiModelProperty(required = true, value = "Custom service name, should contain 1 to 64 characters")
  @NotNull


  public String getName() {
    return name;
  }

  public void setName(String name) {
    this.name = name;
  }

  public DotCustomizedServerOpenApiVo server(List<String> server) {
    this.server = server;
    return this;
  }

  public DotCustomizedServerOpenApiVo addServerItem(String serverItem) {
    this.server.add(serverItem);
    return this;
  }

  /**
   * Custom service IPs, up to 2 IPs can be configured
   * @return server
  */
  @ApiModelProperty(required = true, value = "Custom service IPs, up to 2 IPs can be configured")
  @NotNull


  public List<String> getServer() {
    return server;
  }

  public void setServer(List<String> server) {
    this.server = server;
  }


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    DotCustomizedServerOpenApiVo dotCustomizedServerOpenApiVo = (DotCustomizedServerOpenApiVo) o;
    return Objects.equals(this.enable, dotCustomizedServerOpenApiVo.enable) &&
        Objects.equals(this.name, dotCustomizedServerOpenApiVo.name) &&
        Objects.equals(this.server, dotCustomizedServerOpenApiVo.server);
  }

  @Override
  public int hashCode() {
    return Objects.hash(enable, name, server);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class DotCustomizedServerOpenApiVo {\n");
    
    sb.append("    enable: ").append(toIndentedString(enable)).append("\n");
    sb.append("    name: ").append(toIndentedString(name)).append("\n");
    sb.append("    server: ").append(toIndentedString(server)).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    ");
  }
}

