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

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

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

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

public class MacFiltering   {
  @JsonProperty("id")
  private String id;

  @JsonProperty("name")
  private String name;

  @JsonProperty("filterMode")
  private Integer filterMode;

  @JsonProperty("type")
  private Integer type;

  @JsonProperty("macAddresses")
  @Valid
  private List<OsgMacFilterAddressOpenApiVo> macAddresses = null;

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

  public MacFiltering id(String id) {
    this.id = id;
    return this;
  }

  /**
   * ID of the MAC filtering entity.
   * @return id
  */
  @ApiModelProperty(value = "ID of the MAC filtering entity.")


  public String getId() {
    return id;
  }

  public void setId(String id) {
    this.id = id;
  }

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

  /**
   * Name of the MAC filtering entity.
   * @return name
  */
  @ApiModelProperty(value = "Name of the MAC filtering entity.")


  public String getName() {
    return name;
  }

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

  public MacFiltering filterMode(Integer filterMode) {
    this.filterMode = filterMode;
    return this;
  }

  /**
   * Filter mode should be a value as follows: 0: allow; 1: deny.
   * @return filterMode
  */
  @ApiModelProperty(value = "Filter mode should be a value as follows: 0: allow; 1: deny.")


  public Integer getFilterMode() {
    return filterMode;
  }

  public void setFilterMode(Integer filterMode) {
    this.filterMode = filterMode;
  }

  public MacFiltering type(Integer type) {
    this.type = type;
    return this;
  }

  /**
   * Type should be a value as follows: 0: macAddresses; 1: macGroupIds.
   * @return type
  */
  @ApiModelProperty(value = "Type should be a value as follows: 0: macAddresses; 1: macGroupIds.")


  public Integer getType() {
    return type;
  }

  public void setType(Integer type) {
    this.type = type;
  }

  public MacFiltering macAddresses(List<OsgMacFilterAddressOpenApiVo> macAddresses) {
    this.macAddresses = macAddresses;
    return this;
  }

  public MacFiltering addMacAddressesItem(OsgMacFilterAddressOpenApiVo macAddressesItem) {
    if (this.macAddresses == null) {
      this.macAddresses = new ArrayList<>();
    }
    this.macAddresses.add(macAddressesItem);
    return this;
  }

  /**
   * MAC addresses of the MAC filtering entity.
   * @return macAddresses
  */
  @ApiModelProperty(value = "MAC addresses of the MAC filtering entity.")

  @Valid

  public List<OsgMacFilterAddressOpenApiVo> getMacAddresses() {
    return macAddresses;
  }

  public void setMacAddresses(List<OsgMacFilterAddressOpenApiVo> macAddresses) {
    this.macAddresses = macAddresses;
  }

  public MacFiltering macGroupIds(List<String> macGroupIds) {
    this.macGroupIds = macGroupIds;
    return this;
  }

  public MacFiltering addMacGroupIdsItem(String macGroupIdsItem) {
    if (this.macGroupIds == null) {
      this.macGroupIds = new ArrayList<>();
    }
    this.macGroupIds.add(macGroupIdsItem);
    return this;
  }

  /**
   * MAC groups of the MAC filtering entity. MAC group can be created using 'Create a new group profile' interface, and MAC group ID can be obtained from 'Get group profile list' interface.
   * @return macGroupIds
  */
  @ApiModelProperty(value = "MAC groups of the MAC filtering entity. MAC group can be created using 'Create a new group profile' interface, and MAC group ID can be obtained from 'Get group profile list' interface.")


  public List<String> getMacGroupIds() {
    return macGroupIds;
  }

  public void setMacGroupIds(List<String> macGroupIds) {
    this.macGroupIds = macGroupIds;
  }


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    MacFiltering macFiltering = (MacFiltering) o;
    return Objects.equals(this.id, macFiltering.id) &&
        Objects.equals(this.name, macFiltering.name) &&
        Objects.equals(this.filterMode, macFiltering.filterMode) &&
        Objects.equals(this.type, macFiltering.type) &&
        Objects.equals(this.macAddresses, macFiltering.macAddresses) &&
        Objects.equals(this.macGroupIds, macFiltering.macGroupIds);
  }

  @Override
  public int hashCode() {
    return Objects.hash(id, name, filterMode, type, macAddresses, macGroupIds);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class MacFiltering {\n");
    
    sb.append("    id: ").append(toIndentedString(id)).append("\n");
    sb.append("    name: ").append(toIndentedString(name)).append("\n");
    sb.append("    filterMode: ").append(toIndentedString(filterMode)).append("\n");
    sb.append("    type: ").append(toIndentedString(type)).append("\n");
    sb.append("    macAddresses: ").append(toIndentedString(macAddresses)).append("\n");
    sb.append("    macGroupIds: ").append(toIndentedString(macGroupIds)).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    ");
  }
}

