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 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 AdvertisementSettingResOpenApiVo   {
  @JsonProperty("enable")
  private Boolean enable;

  @JsonProperty("pictures")
  @Valid
  private List<PortalPictureInfo> pictures = null;

  @JsonProperty("totalDuration")
  private Integer totalDuration;

  @JsonProperty("pictureInterval")
  private Integer pictureInterval;

  @JsonProperty("skipEnable")
  private Boolean skipEnable;

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

  /**
   * Whether to enable Advertisement setting
   * @return enable
  */
  @ApiModelProperty(value = "Whether to enable Advertisement setting")


  public Boolean getEnable() {
    return enable;
  }

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

  public AdvertisementSettingResOpenApiVo pictures(List<PortalPictureInfo> pictures) {
    this.pictures = pictures;
    return this;
  }

  public AdvertisementSettingResOpenApiVo addPicturesItem(PortalPictureInfo picturesItem) {
    if (this.pictures == null) {
      this.pictures = new ArrayList<>();
    }
    this.pictures.add(picturesItem);
    return this;
  }

  /**
   * Advertisement picture list. Up to 5 entries are allowed for the pictures list
   * @return pictures
  */
  @ApiModelProperty(value = "Advertisement picture list. Up to 5 entries are allowed for the pictures list")

  @Valid

  public List<PortalPictureInfo> getPictures() {
    return pictures;
  }

  public void setPictures(List<PortalPictureInfo> pictures) {
    this.pictures = pictures;
  }

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

  /**
   * Total duration of advertisement, should be within the range of 1–30 seconds
   * @return totalDuration
  */
  @ApiModelProperty(value = "Total duration of advertisement, should be within the range of 1–30 seconds")


  public Integer getTotalDuration() {
    return totalDuration;
  }

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

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

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


  public Integer getPictureInterval() {
    return pictureInterval;
  }

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

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

  /**
   * Whether to allow users to skip the advertisement
   * @return skipEnable
  */
  @ApiModelProperty(value = "Whether to 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;
    }
    AdvertisementSettingResOpenApiVo advertisementSettingResOpenApiVo = (AdvertisementSettingResOpenApiVo) o;
    return Objects.equals(this.enable, advertisementSettingResOpenApiVo.enable) &&
        Objects.equals(this.pictures, advertisementSettingResOpenApiVo.pictures) &&
        Objects.equals(this.totalDuration, advertisementSettingResOpenApiVo.totalDuration) &&
        Objects.equals(this.pictureInterval, advertisementSettingResOpenApiVo.pictureInterval) &&
        Objects.equals(this.skipEnable, advertisementSettingResOpenApiVo.skipEnable);
  }

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

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

