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;

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

public class CreateDhcpReservationOpenApiVo   {
  @JsonProperty("netId")
  private String netId;

  @JsonProperty("mac")
  private String mac;

  @JsonProperty("ip")
  private String ip;

  @JsonProperty("description")
  private String description;

  @JsonProperty("status")
  private Boolean status;

  @JsonProperty("confirmConflict")
  private Boolean confirmConflict;

  public CreateDhcpReservationOpenApiVo netId(String netId) {
    this.netId = netId;
    return this;
  }

  /**
   * This field represents LAN Network ID. LAN Network can be created using 'Create LAN network' interface, and LAN Network ID can be obtained from 'Get LAN network list' interface
   * @return netId
  */
  @ApiModelProperty(required = true, value = "This field represents LAN Network ID. 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 getNetId() {
    return netId;
  }

  public void setNetId(String netId) {
    this.netId = netId;
  }

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

  /**
   * Device MAC address, format: AA-BB-CC-11-22-33
   * @return mac
  */
  @ApiModelProperty(required = true, value = "Device MAC address, format: AA-BB-CC-11-22-33")
  @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 CreateDhcpReservationOpenApiVo ip(String ip) {
    this.ip = ip;
    return this;
  }

  /**
   * Reserved IP address
   * @return ip
  */
  @ApiModelProperty(required = true, value = "Reserved IP address")
  @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 CreateDhcpReservationOpenApiVo description(String description) {
    this.description = description;
    return this;
  }

  /**
   * Description of DHCP reservation. Description should contain 1 to 128 characters
   * @return description
  */
  @ApiModelProperty(value = "Description of DHCP reservation. Description should contain 1 to 128 characters")

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

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

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

  /**
   * DHCP reservation enable status
   * @return status
  */
  @ApiModelProperty(required = true, value = "DHCP reservation enable status")
  @NotNull


  public Boolean getStatus() {
    return status;
  }

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

  public CreateDhcpReservationOpenApiVo confirmConflict(Boolean confirmConflict) {
    this.confirmConflict = confirmConflict;
    return this;
  }

  /**
   * True when creating an entry with IP and IP-MAC Binding conflicts confirmed
   * @return confirmConflict
  */
  @ApiModelProperty(value = "True when creating an entry with IP and IP-MAC Binding conflicts confirmed")


  public Boolean getConfirmConflict() {
    return confirmConflict;
  }

  public void setConfirmConflict(Boolean confirmConflict) {
    this.confirmConflict = confirmConflict;
  }


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    CreateDhcpReservationOpenApiVo createDhcpReservationOpenApiVo = (CreateDhcpReservationOpenApiVo) o;
    return Objects.equals(this.netId, createDhcpReservationOpenApiVo.netId) &&
        Objects.equals(this.mac, createDhcpReservationOpenApiVo.mac) &&
        Objects.equals(this.ip, createDhcpReservationOpenApiVo.ip) &&
        Objects.equals(this.description, createDhcpReservationOpenApiVo.description) &&
        Objects.equals(this.status, createDhcpReservationOpenApiVo.status) &&
        Objects.equals(this.confirmConflict, createDhcpReservationOpenApiVo.confirmConflict);
  }

  @Override
  public int hashCode() {
    return Objects.hash(netId, mac, ip, description, status, confirmConflict);
  }

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

