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;

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

public class SwitchAclPortEntity   {
  @JsonProperty("mac")
  private String mac;

  @JsonProperty("customPortIds")
  @Valid
  private List<Integer> customPortIds = new ArrayList<>();

  @JsonProperty("customLagIds")
  @Valid
  private List<Integer> customLagIds = new ArrayList<>();

  public SwitchAclPortEntity mac(String mac) {
    this.mac = mac;
    return this;
  }

  /**
   * MAC
   * @return mac
  */
  @ApiModelProperty(required = true, value = "MAC")
  @NotNull


  public String getMac() {
    return mac;
  }

  public void setMac(String mac) {
    this.mac = mac;
  }

  public SwitchAclPortEntity customPortIds(List<Integer> customPortIds) {
    this.customPortIds = customPortIds;
    return this;
  }

  public SwitchAclPortEntity addCustomPortIdsItem(Integer customPortIdsItem) {
    this.customPortIds.add(customPortIdsItem);
    return this;
  }

  /**
   * Custom port IDs
   * @return customPortIds
  */
  @ApiModelProperty(required = true, value = "Custom port IDs")
  @NotNull


  public List<Integer> getCustomPortIds() {
    return customPortIds;
  }

  public void setCustomPortIds(List<Integer> customPortIds) {
    this.customPortIds = customPortIds;
  }

  public SwitchAclPortEntity customLagIds(List<Integer> customLagIds) {
    this.customLagIds = customLagIds;
    return this;
  }

  public SwitchAclPortEntity addCustomLagIdsItem(Integer customLagIdsItem) {
    this.customLagIds.add(customLagIdsItem);
    return this;
  }

  /**
   * Custom lag IDs
   * @return customLagIds
  */
  @ApiModelProperty(required = true, value = "Custom lag IDs")
  @NotNull


  public List<Integer> getCustomLagIds() {
    return customLagIds;
  }

  public void setCustomLagIds(List<Integer> customLagIds) {
    this.customLagIds = customLagIds;
  }


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    SwitchAclPortEntity switchAclPortEntity = (SwitchAclPortEntity) o;
    return Objects.equals(this.mac, switchAclPortEntity.mac) &&
        Objects.equals(this.customPortIds, switchAclPortEntity.customPortIds) &&
        Objects.equals(this.customLagIds, switchAclPortEntity.customLagIds);
  }

  @Override
  public int hashCode() {
    return Objects.hash(mac, customPortIds, customLagIds);
  }

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

