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

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

public class PortScheduleQueryOpenApiVo   {
  @JsonProperty("id")
  private String id;

  @JsonProperty("siteId")
  private String siteId;

  @JsonProperty("name")
  private String name;

  @JsonProperty("status")
  private Boolean status;

  @JsonProperty("turnOnTime")
  private String turnOnTime;

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

  @JsonProperty("nextExecute")
  private Long nextExecute;

  @JsonProperty("notInDst")
  private Boolean notInDst;

  public PortScheduleQueryOpenApiVo id(String id) {
    this.id = id;
    return this;
  }

  /**
   * Port Schedule individual ID.
   * @return id
  */
  @ApiModelProperty(value = "Port Schedule individual ID.")


  public String getId() {
    return id;
  }

  public void setId(String id) {
    this.id = id;
  }

  public PortScheduleQueryOpenApiVo 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 PortScheduleQueryOpenApiVo name(String name) {
    this.name = name;
    return this;
  }

  /**
   * Port Schedule Name should contain 1 to 128 characters.
   * @return name
  */
  @ApiModelProperty(required = true, value = "Port 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 PortScheduleQueryOpenApiVo status(Boolean status) {
    this.status = status;
    return this;
  }

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


  public Boolean getStatus() {
    return status;
  }

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

  public PortScheduleQueryOpenApiVo 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 PortScheduleQueryOpenApiVo portsMap(Map<String, List<Integer>> portsMap) {
    this.portsMap = portsMap;
    return this;
  }

  public PortScheduleQueryOpenApiVo putPortsMapItem(String key, List<Integer> portsMapItem) {
    this.portsMap.put(key, portsMapItem);
    return this;
  }

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

  @Valid

  public Map<String, List<Integer>> getPortsMap() {
    return portsMap;
  }

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

  public PortScheduleQueryOpenApiVo nextExecute(Long nextExecute) {
    this.nextExecute = nextExecute;
    return this;
  }

  /**
   * Show Poe Schedule next execution timestamp.
   * @return nextExecute
  */
  @ApiModelProperty(value = "Show Poe Schedule next execution timestamp.")


  public Long getNextExecute() {
    return nextExecute;
  }

  public void setNextExecute(Long nextExecute) {
    this.nextExecute = nextExecute;
  }

  public PortScheduleQueryOpenApiVo notInDst(Boolean notInDst) {
    this.notInDst = notInDst;
    return this;
  }

  /**
   * When notInDst is true, Not displayed in DST.
   * @return notInDst
  */
  @ApiModelProperty(value = "When notInDst is true, Not displayed in DST.")


  public Boolean getNotInDst() {
    return notInDst;
  }

  public void setNotInDst(Boolean notInDst) {
    this.notInDst = notInDst;
  }


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    PortScheduleQueryOpenApiVo portScheduleQueryOpenApiVo = (PortScheduleQueryOpenApiVo) o;
    return Objects.equals(this.id, portScheduleQueryOpenApiVo.id) &&
        Objects.equals(this.siteId, portScheduleQueryOpenApiVo.siteId) &&
        Objects.equals(this.name, portScheduleQueryOpenApiVo.name) &&
        Objects.equals(this.status, portScheduleQueryOpenApiVo.status) &&
        Objects.equals(this.turnOnTime, portScheduleQueryOpenApiVo.turnOnTime) &&
        Objects.equals(this.portsMap, portScheduleQueryOpenApiVo.portsMap) &&
        Objects.equals(this.nextExecute, portScheduleQueryOpenApiVo.nextExecute) &&
        Objects.equals(this.notInDst, portScheduleQueryOpenApiVo.notInDst);
  }

  @Override
  public int hashCode() {
    return Objects.hash(id, siteId, name, status, turnOnTime, portsMap, nextExecute, notInDst);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class PortScheduleQueryOpenApiVo {\n");
    
    sb.append("    id: ").append(toIndentedString(id)).append("\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("    portsMap: ").append(toIndentedString(portsMap)).append("\n");
    sb.append("    nextExecute: ").append(toIndentedString(nextExecute)).append("\n");
    sb.append("    notInDst: ").append(toIndentedString(notInDst)).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    ");
  }
}

