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

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

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import java.util.Objects;

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

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

  @JsonProperty("description")
  private String description;

  @JsonProperty("mac")
  private String mac;

  @JsonProperty("ip")
  private String ip;

  @JsonProperty("status")
  private Boolean status;

  @JsonProperty("interfaceType")
  private Integer interfaceType;

  @JsonProperty("interfaceId")
  private String interfaceId;

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

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


  public String getId() {
    return id;
  }

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

  public IpMacBinding description(String description) {
    this.description = description;
    return this;
  }

  /**
   * Description should contain 1 to 64 characters.
   * @return description
  */
  @ApiModelProperty(value = "Description should contain 1 to 64 characters.")

@Pattern(regexp="^$|^[^ ]$|^[^ ].{0,62}[^ ]$") 
  public String getDescription() {
    return description;
  }

  public void setDescription(String description) {
    this.description = description;
  }

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

  /**
   * MAC of the IP MAC binding entity.
   * @return mac
  */
  @ApiModelProperty(required = true, value = "MAC of the IP MAC binding entity.")
  @NotNull

@Pattern(regexp="[A-Fa-f0-9]{1}[02468aceACE]{1}([-:][A-Fa-f0-9]{2}){5}") 
  public String getMac() {
    return mac;
  }

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

  public IpMacBinding ip(String ip) {
    this.ip = ip;
    return this;
  }

  /**
   * IP of the IP MAC binding entity.
   * @return ip
  */
  @ApiModelProperty(required = true, value = "IP of the IP MAC binding entity.")
  @NotNull

@Pattern(regexp="\\b((?!\\d\\d\\d)\\d+|1\\d\\d|2[0-4]\\d|25[0-5])\\.((?!\\d\\d\\d)\\d+|1\\d\\d|2[0-4]\\d|25[0-5])\\.((?!\\d\\d\\d)\\d+|1\\d\\d|2[0-4]\\d|25[0-5])\\.((?!\\d\\d\\d)\\d+|1\\d\\d|2[0-4]\\d|25[0-5])\\b") 
  public String getIp() {
    return ip;
  }

  public void setIp(String ip) {
    this.ip = ip;
  }

  public IpMacBinding status(Boolean status) {
    this.status = status;
    return this;
  }

  /**
   * Status of the IP MAC binding entity.
   * @return status
  */
  @ApiModelProperty(required = true, value = "Status of the IP MAC binding entity.")
  @NotNull


  public Boolean getStatus() {
    return status;
  }

  public void setStatus(Boolean status) {
    this.status = status;
  }

  public IpMacBinding interfaceType(Integer interfaceType) {
    this.interfaceType = interfaceType;
    return this;
  }

  /**
   * Interface type should be a value as follows: 0: WAN; 1: LAN interface.
   * @return interfaceType
  */
  @ApiModelProperty(required = true, value = "Interface type should be a value as follows: 0: WAN; 1: LAN interface.")
  @NotNull


  public Integer getInterfaceType() {
    return interfaceType;
  }

  public void setInterfaceType(Integer interfaceType) {
    this.interfaceType = interfaceType;
  }

  public IpMacBinding interfaceId(String interfaceId) {
    this.interfaceId = interfaceId;
    return this;
  }

  /**
   * Interface ID. WAN port ID can be obtained from 'Get internet basic info' interface. LAN Network can be created using 'Create LAN network' interface, and LAN Network ID can be obtained from 'Get LAN network list' interface.
   * @return interfaceId
  */
  @ApiModelProperty(required = true, value = "Interface ID. WAN port ID can be obtained from 'Get internet basic info' interface. LAN Network can be created using 'Create LAN network' interface, and LAN Network ID can be obtained from 'Get LAN network list' interface.")
  @NotNull


  public String getInterfaceId() {
    return interfaceId;
  }

  public void setInterfaceId(String interfaceId) {
    this.interfaceId = interfaceId;
  }


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    IpMacBinding ipMacBinding = (IpMacBinding) o;
    return Objects.equals(this.id, ipMacBinding.id) &&
        Objects.equals(this.description, ipMacBinding.description) &&
        Objects.equals(this.mac, ipMacBinding.mac) &&
        Objects.equals(this.ip, ipMacBinding.ip) &&
        Objects.equals(this.status, ipMacBinding.status) &&
        Objects.equals(this.interfaceType, ipMacBinding.interfaceType) &&
        Objects.equals(this.interfaceId, ipMacBinding.interfaceId);
  }

  @Override
  public int hashCode() {
    return Objects.hash(id, description, mac, ip, status, interfaceType, interfaceId);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class IpMacBinding {\n");
    
    sb.append("    id: ").append(toIndentedString(id)).append("\n");
    sb.append("    description: ").append(toIndentedString(description)).append("\n");
    sb.append("    mac: ").append(toIndentedString(mac)).append("\n");
    sb.append("    ip: ").append(toIndentedString(ip)).append("\n");
    sb.append("    status: ").append(toIndentedString(status)).append("\n");
    sb.append("    interfaceType: ").append(toIndentedString(interfaceType)).append("\n");
    sb.append("    interfaceId: ").append(toIndentedString(interfaceId)).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    ");
  }
}

