package org.wfc.omada.api.maintenance.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;

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

public class BatchSiteFileServerRestoreVo   {
  @JsonProperty("serverConfig")
  private FileServerOpenApiVo serverConfig;

  @JsonProperty("siteInfos")
  @Valid
  private List<FileServerSiteRestoreVo> siteInfos = new ArrayList<>();

  public BatchSiteFileServerRestoreVo serverConfig(FileServerOpenApiVo serverConfig) {
    this.serverConfig = serverConfig;
    return this;
  }

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

  @Valid

  public FileServerOpenApiVo getServerConfig() {
    return serverConfig;
  }

  public void setServerConfig(FileServerOpenApiVo serverConfig) {
    this.serverConfig = serverConfig;
  }

  public BatchSiteFileServerRestoreVo siteInfos(List<FileServerSiteRestoreVo> siteInfos) {
    this.siteInfos = siteInfos;
    return this;
  }

  public BatchSiteFileServerRestoreVo addSiteInfosItem(FileServerSiteRestoreVo siteInfosItem) {
    this.siteInfos.add(siteInfosItem);
    return this;
  }

  /**
   * Sites to restore.
   * @return siteInfos
  */
  @ApiModelProperty(required = true, value = "Sites to restore.")
  @NotNull

  @Valid

  public List<FileServerSiteRestoreVo> getSiteInfos() {
    return siteInfos;
  }

  public void setSiteInfos(List<FileServerSiteRestoreVo> siteInfos) {
    this.siteInfos = siteInfos;
  }


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    BatchSiteFileServerRestoreVo batchSiteFileServerRestoreVo = (BatchSiteFileServerRestoreVo) o;
    return Objects.equals(this.serverConfig, batchSiteFileServerRestoreVo.serverConfig) &&
        Objects.equals(this.siteInfos, batchSiteFileServerRestoreVo.siteInfos);
  }

  @Override
  public int hashCode() {
    return Objects.hash(serverConfig, siteInfos);
  }

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

