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;

/**
 * Ethertype(4-hex number; 0-9，A-F) is only editable when the Source Type and Destination Type are both selected as MAC Group in the Rule.
 */
@ApiModel(description = "Ethertype(4-hex number; 0-9，A-F) is only editable when the Source Type and Destination Type are both selected as MAC Group in the Rule.")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-12-04T11:32:19.054+08:00[Asia/Shanghai]")

public class SwitchAclEtherTypeEntity   {
  @JsonProperty("enable")
  private Boolean enable;

  @JsonProperty("value")
  private String value;

  public SwitchAclEtherTypeEntity enable(Boolean enable) {
    this.enable = enable;
    return this;
  }

  /**
   * Default:false
   * @return enable
  */
  @ApiModelProperty(required = true, value = "Default:false")
  @NotNull


  public Boolean getEnable() {
    return enable;
  }

  public void setEnable(Boolean enable) {
    this.enable = enable;
  }

  public SwitchAclEtherTypeEntity value(String value) {
    this.value = value;
    return this;
  }

  /**
   * Value, if enable is true, value must not be null
   * @return value
  */
  @ApiModelProperty(value = "Value, if enable is true, value must not be null")

@Pattern(regexp="^[0-9a-fA-F]{4}$") 
  public String getValue() {
    return value;
  }

  public void setValue(String value) {
    this.value = value;
  }


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    SwitchAclEtherTypeEntity switchAclEtherTypeEntity = (SwitchAclEtherTypeEntity) o;
    return Objects.equals(this.enable, switchAclEtherTypeEntity.enable) &&
        Objects.equals(this.value, switchAclEtherTypeEntity.value);
  }

  @Override
  public int hashCode() {
    return Objects.hash(enable, value);
  }

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

