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

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

public class CreateTimeRangeProfileOpenApiVo   {
  @JsonProperty("name")
  private String name;

  @JsonProperty("dayMode")
  private Integer dayMode;

  @JsonProperty("customDayMode")
  private CustomDayModeOpenApiVo customDayMode;

  @JsonProperty("timeList")
  @Valid
  private List<ScheduleTimeOpenApiVo> timeList = new ArrayList<>();

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

  /**
   * Time range profile name should contain 1 to 64 characters.
   * @return name
  */
  @ApiModelProperty(required = true, value = "Time range profile name should contain 1 to 64 characters.")
  @NotNull

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

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

  public CreateTimeRangeProfileOpenApiVo dayMode(Integer dayMode) {
    this.dayMode = dayMode;
    return this;
  }

  /**
   * Time range profile day mode; It should be a value as follows: 0: Every Day, 1: Weekday, 2: Weekend, 3: Customized
   * @return dayMode
  */
  @ApiModelProperty(required = true, value = "Time range profile day mode; It should be a value as follows: 0: Every Day, 1: Weekday, 2: Weekend, 3: Customized")
  @NotNull


  public Integer getDayMode() {
    return dayMode;
  }

  public void setDayMode(Integer dayMode) {
    this.dayMode = dayMode;
  }

  public CreateTimeRangeProfileOpenApiVo customDayMode(CustomDayModeOpenApiVo customDayMode) {
    this.customDayMode = customDayMode;
    return this;
  }

  /**
   * Get customDayMode
   * @return customDayMode
  */
  @ApiModelProperty(value = "")

  @Valid

  public CustomDayModeOpenApiVo getCustomDayMode() {
    return customDayMode;
  }

  public void setCustomDayMode(CustomDayModeOpenApiVo customDayMode) {
    this.customDayMode = customDayMode;
  }

  public CreateTimeRangeProfileOpenApiVo timeList(List<ScheduleTimeOpenApiVo> timeList) {
    this.timeList = timeList;
    return this;
  }

  public CreateTimeRangeProfileOpenApiVo addTimeListItem(ScheduleTimeOpenApiVo timeListItem) {
    this.timeList.add(timeListItem);
    return this;
  }

  /**
   * Time range profile schedule time config
   * @return timeList
  */
  @ApiModelProperty(required = true, value = "Time range profile schedule time config")
  @NotNull

  @Valid

  public List<ScheduleTimeOpenApiVo> getTimeList() {
    return timeList;
  }

  public void setTimeList(List<ScheduleTimeOpenApiVo> timeList) {
    this.timeList = timeList;
  }


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    CreateTimeRangeProfileOpenApiVo createTimeRangeProfileOpenApiVo = (CreateTimeRangeProfileOpenApiVo) o;
    return Objects.equals(this.name, createTimeRangeProfileOpenApiVo.name) &&
        Objects.equals(this.dayMode, createTimeRangeProfileOpenApiVo.dayMode) &&
        Objects.equals(this.customDayMode, createTimeRangeProfileOpenApiVo.customDayMode) &&
        Objects.equals(this.timeList, createTimeRangeProfileOpenApiVo.timeList);
  }

  @Override
  public int hashCode() {
    return Objects.hash(name, dayMode, customDayMode, timeList);
  }

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

