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;

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

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

  @JsonProperty("pictureIds")
  @Valid
  private List<String> pictureIds = null;

  @JsonProperty("totalDuration")
  private Integer totalDuration;

  @JsonProperty("pictureInterval")
  private Integer pictureInterval;

  @JsonProperty("skipEnable")
  private Boolean skipEnable;

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

  /**
   * Advertisement enable.
   * @return enable
  */
  @ApiModelProperty(required = true, value = "Advertisement enable.")
  @NotNull


  public Boolean getEnable() {
    return enable;
  }

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

  public AdvertisementSetting pictureIds(List<String> pictureIds) {
    this.pictureIds = pictureIds;
    return this;
  }

  public AdvertisementSetting addPictureIdsItem(String pictureIdsItem) {
    if (this.pictureIds == null) {
      this.pictureIds = new ArrayList<>();
    }
    this.pictureIds.add(pictureIdsItem);
    return this;
  }

  /**
   * Picture ID list, Up to 5 entries are allowed for the pictureIds list.
   * @return pictureIds
  */
  @ApiModelProperty(value = "Picture ID list, Up to 5 entries are allowed for the pictureIds list.")


  public List<String> getPictureIds() {
    return pictureIds;
  }

  public void setPictureIds(List<String> pictureIds) {
    this.pictureIds = pictureIds;
  }

  public AdvertisementSetting totalDuration(Integer totalDuration) {
    this.totalDuration = totalDuration;
    return this;
  }

  /**
   * Advertisement totalDuration, should be within the range of 1–30, time unit is second.
   * @return totalDuration
  */
  @ApiModelProperty(value = "Advertisement totalDuration, should be within the range of 1–30, time unit is second.")


  public Integer getTotalDuration() {
    return totalDuration;
  }

  public void setTotalDuration(Integer totalDuration) {
    this.totalDuration = totalDuration;
  }

  public AdvertisementSetting pictureInterval(Integer pictureInterval) {
    this.pictureInterval = pictureInterval;
    return this;
  }

  /**
   * Advertisement picture interval, should be within the range of 1–10, time unit is second.
   * @return pictureInterval
  */
  @ApiModelProperty(value = "Advertisement picture interval, should be within the range of 1–10, time unit is second.")


  public Integer getPictureInterval() {
    return pictureInterval;
  }

  public void setPictureInterval(Integer pictureInterval) {
    this.pictureInterval = pictureInterval;
  }

  public AdvertisementSetting skipEnable(Boolean skipEnable) {
    this.skipEnable = skipEnable;
    return this;
  }

  /**
   * Whether allow users to skip the advertisement.
   * @return skipEnable
  */
  @ApiModelProperty(value = "Whether allow users to skip the advertisement.")


  public Boolean getSkipEnable() {
    return skipEnable;
  }

  public void setSkipEnable(Boolean skipEnable) {
    this.skipEnable = skipEnable;
  }


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    AdvertisementSetting advertisementSetting = (AdvertisementSetting) o;
    return Objects.equals(this.enable, advertisementSetting.enable) &&
        Objects.equals(this.pictureIds, advertisementSetting.pictureIds) &&
        Objects.equals(this.totalDuration, advertisementSetting.totalDuration) &&
        Objects.equals(this.pictureInterval, advertisementSetting.pictureInterval) &&
        Objects.equals(this.skipEnable, advertisementSetting.skipEnable);
  }

  @Override
  public int hashCode() {
    return Objects.hash(enable, pictureIds, totalDuration, pictureInterval, skipEnable);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class AdvertisementSetting {\n");
    
    sb.append("    enable: ").append(toIndentedString(enable)).append("\n");
    sb.append("    pictureIds: ").append(toIndentedString(pictureIds)).append("\n");
    sb.append("    totalDuration: ").append(toIndentedString(totalDuration)).append("\n");
    sb.append("    pictureInterval: ").append(toIndentedString(pictureInterval)).append("\n");
    sb.append("    skipEnable: ").append(toIndentedString(skipEnable)).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    ");
  }
}

