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

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

public class PoeScheduleOpenApiVo   {
  @JsonProperty("siteId")
  private String siteId;

  @JsonProperty("name")
  private String name;

  @JsonProperty("status")
  private Boolean status;

  @JsonProperty("turnOnTime")
  private String turnOnTime;

  @JsonProperty("poePortsMap")
  @Valid
  private Map<String, List<Integer>> poePortsMap = new HashMap<>();

  public PoeScheduleOpenApiVo siteId(String siteId) {
    this.siteId = siteId;
    return this;
  }

  /**
   * Site ID
   * @return siteId
  */
  @ApiModelProperty(value = "Site ID")


  public String getSiteId() {
    return siteId;
  }

  public void setSiteId(String siteId) {
    this.siteId = siteId;
  }

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

  /**
   * PoE Schedule Name should contain 1 to 128 characters.
   * @return name
  */
  @ApiModelProperty(required = true, value = "PoE Schedule Name should contain 1 to 128 characters.")
  @NotNull

@Pattern(regexp="^[^ ]$|^[^ ].{0,126}[^ ]$") 
  public String getName() {
    return name;
  }

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

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

  /**
   * PoE Schedule Status.
   * @return status
  */
  @ApiModelProperty(required = true, value = "PoE Schedule Status.")
  @NotNull


  public Boolean getStatus() {
    return status;
  }

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

  public PoeScheduleOpenApiVo turnOnTime(String turnOnTime) {
    this.turnOnTime = turnOnTime;
    return this;
  }

  /**
   * Time Range ID, cannot be empty.
   * @return turnOnTime
  */
  @ApiModelProperty(required = true, value = "Time Range ID, cannot be empty.")
  @NotNull


  public String getTurnOnTime() {
    return turnOnTime;
  }

  public void setTurnOnTime(String turnOnTime) {
    this.turnOnTime = turnOnTime;
  }

  public PoeScheduleOpenApiVo poePortsMap(Map<String, List<Integer>> poePortsMap) {
    this.poePortsMap = poePortsMap;
    return this;
  }

  public PoeScheduleOpenApiVo putPoePortsMapItem(String key, List<Integer> poePortsMapItem) {
    this.poePortsMap.put(key, poePortsMapItem);
    return this;
  }

  /**
   * Key:Mac(\"String\"), Value:Set of Ports(\"Integer\")
   * @return poePortsMap
  */
  @ApiModelProperty(required = true, value = "Key:Mac(\"String\"), Value:Set of Ports(\"Integer\")")
  @NotNull

  @Valid

  public Map<String, List<Integer>> getPoePortsMap() {
    return poePortsMap;
  }

  public void setPoePortsMap(Map<String, List<Integer>> poePortsMap) {
    this.poePortsMap = poePortsMap;
  }


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    PoeScheduleOpenApiVo poeScheduleOpenApiVo = (PoeScheduleOpenApiVo) o;
    return Objects.equals(this.siteId, poeScheduleOpenApiVo.siteId) &&
        Objects.equals(this.name, poeScheduleOpenApiVo.name) &&
        Objects.equals(this.status, poeScheduleOpenApiVo.status) &&
        Objects.equals(this.turnOnTime, poeScheduleOpenApiVo.turnOnTime) &&
        Objects.equals(this.poePortsMap, poeScheduleOpenApiVo.poePortsMap);
  }

  @Override
  public int hashCode() {
    return Objects.hash(siteId, name, status, turnOnTime, poePortsMap);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class PoeScheduleOpenApiVo {\n");
    
    sb.append("    siteId: ").append(toIndentedString(siteId)).append("\n");
    sb.append("    name: ").append(toIndentedString(name)).append("\n");
    sb.append("    status: ").append(toIndentedString(status)).append("\n");
    sb.append("    turnOnTime: ").append(toIndentedString(turnOnTime)).append("\n");
    sb.append("    poePortsMap: ").append(toIndentedString(poePortsMap)).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    ");
  }
}

