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.constraints.NotNull;
import javax.validation.constraints.Pattern;
import java.util.Objects;

/**
 * MAC address list. [type] value of 2 is required
 */
@ApiModel(description = "MAC address list. [type] value of 2 is required")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-12-04T11:32:19.054+08:00[Asia/Shanghai]")

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

  @JsonProperty("macAddress")
  private String macAddress;

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

  /**
   * MAC address name, name should contain 1 to 128 characters
   * @return name
  */
  @ApiModelProperty(value = "MAC address name, name should contain 1 to 128 characters")


  public String getName() {
    return name;
  }

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

  public CreateMacAddressOpenApiVo macAddress(String macAddress) {
    this.macAddress = macAddress;
    return this;
  }

  /**
   * MAC address, should be a valid MAC address format, e.g. AA-BB-CC-DD-11-22
   * @return macAddress
  */
  @ApiModelProperty(required = true, value = "MAC address, should be a valid MAC address format, e.g. AA-BB-CC-DD-11-22")
  @NotNull

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

  public void setMacAddress(String macAddress) {
    this.macAddress = macAddress;
  }


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    CreateMacAddressOpenApiVo createMacAddressOpenApiVo = (CreateMacAddressOpenApiVo) o;
    return Objects.equals(this.name, createMacAddressOpenApiVo.name) &&
        Objects.equals(this.macAddress, createMacAddressOpenApiVo.macAddress);
  }

  @Override
  public int hashCode() {
    return Objects.hash(name, macAddress);
  }

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

