package org.wfc.omada.api.device.model;

import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModelProperty;

import javax.validation.Valid;
import javax.validation.constraints.Pattern;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;

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

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

  @JsonProperty("ledSetting")
  private Integer ledSetting;

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

  @JsonProperty("location")
  private DeviceLocationDetailVo location;

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

  /**
   * Device name should contain 1 to 128 characters.
   * @return name
  */
  @ApiModelProperty(value = "Device name should contain 1 to 128 characters.")

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

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

  public ApGeneralConfig ledSetting(Integer ledSetting) {
    this.ledSetting = ledSetting;
    return this;
  }

  /**
   * Led setting should be a value as follows: 0:off; 1:on; 2:Use Site Settings
   * @return ledSetting
  */
  @ApiModelProperty(value = "Led setting should be a value as follows: 0:off; 1:on; 2:Use Site Settings")


  public Integer getLedSetting() {
    return ledSetting;
  }

  public void setLedSetting(Integer ledSetting) {
    this.ledSetting = ledSetting;
  }

  public ApGeneralConfig tagIds(List<String> tagIds) {
    this.tagIds = tagIds;
    return this;
  }

  public ApGeneralConfig addTagIdsItem(String tagIdsItem) {
    if (this.tagIds == null) {
      this.tagIds = new ArrayList<>();
    }
    this.tagIds.add(tagIdsItem);
    return this;
  }

  /**
   * Tag IDs
   * @return tagIds
  */
  @ApiModelProperty(value = "Tag IDs")


  public List<String> getTagIds() {
    return tagIds;
  }

  public void setTagIds(List<String> tagIds) {
    this.tagIds = tagIds;
  }

  public ApGeneralConfig location(DeviceLocationDetailVo location) {
    this.location = location;
    return this;
  }

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

  @Valid

  public DeviceLocationDetailVo getLocation() {
    return location;
  }

  public void setLocation(DeviceLocationDetailVo location) {
    this.location = location;
  }


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    ApGeneralConfig apGeneralConfig = (ApGeneralConfig) o;
    return Objects.equals(this.name, apGeneralConfig.name) &&
        Objects.equals(this.ledSetting, apGeneralConfig.ledSetting) &&
        Objects.equals(this.tagIds, apGeneralConfig.tagIds) &&
        Objects.equals(this.location, apGeneralConfig.location);
  }

  @Override
  public int hashCode() {
    return Objects.hash(name, ledSetting, tagIds, location);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class ApGeneralConfig {\n");
    
    sb.append("    name: ").append(toIndentedString(name)).append("\n");
    sb.append("    ledSetting: ").append(toIndentedString(ledSetting)).append("\n");
    sb.append("    tagIds: ").append(toIndentedString(tagIds)).append("\n");
    sb.append("    location: ").append(toIndentedString(location)).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    ");
  }
}

