package org.wfc.omada.api.device.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.Pattern;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;

/**
 * After the device is added to the stack group, the interface can only modify the device name.
 */
@ApiModel(description = "After the device is added to the stack group, the interface can only modify the device name.")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-12-04T11:26:25.576+08:00[Asia/Shanghai]")

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

  @JsonProperty("ledSetting")
  private Integer ledSetting;

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

  @JsonProperty("location")
  private DeviceLocationDetailVo location;

  @JsonProperty("jumbo")
  private Integer jumbo;

  @JsonProperty("lagHashAlg")
  private Integer lagHashAlg;

  public SwitchGeneralConfig 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 SwitchGeneralConfig 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 SwitchGeneralConfig tagIds(List<String> tagIds) {
    this.tagIds = tagIds;
    return this;
  }

  public SwitchGeneralConfig 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 SwitchGeneralConfig 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;
  }

  public SwitchGeneralConfig jumbo(Integer jumbo) {
    this.jumbo = jumbo;
    return this;
  }

  /**
   * It should be within the range of 1518–9216 Bytes.
   * @return jumbo
  */
  @ApiModelProperty(value = "It should be within the range of 1518–9216 Bytes.")


  public Integer getJumbo() {
    return jumbo;
  }

  public void setJumbo(Integer jumbo) {
    this.jumbo = jumbo;
  }

  public SwitchGeneralConfig lagHashAlg(Integer lagHashAlg) {
    this.lagHashAlg = lagHashAlg;
    return this;
  }

  /**
   * It should be a value as follows: 0: SRC MAC; 1: DST MAC; 2: SRC MAC + DST MAC; 3: SRC IP; 4: DST IP; 5: SRC IP + DST IP
   * @return lagHashAlg
  */
  @ApiModelProperty(value = "It should be a value as follows: 0: SRC MAC; 1: DST MAC; 2: SRC MAC + DST MAC; 3: SRC IP; 4: DST IP; 5: SRC IP + DST IP")


  public Integer getLagHashAlg() {
    return lagHashAlg;
  }

  public void setLagHashAlg(Integer lagHashAlg) {
    this.lagHashAlg = lagHashAlg;
  }


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

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

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

