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 java.util.Objects;

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

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

  @JsonProperty("classification")
  private String classification;

  @JsonProperty("category")
  private Integer category;

  @JsonProperty("signature")
  private String signature;

  @JsonProperty("sid")
  private Long sid;

  @JsonProperty("service")
  private String service;

  @JsonProperty("type")
  private Integer type;

  @JsonProperty("direction")
  private Integer direction;

  @JsonProperty("trafficType")
  private Integer trafficType;

  @JsonProperty("trafficSource")
  private String trafficSource;

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

  /**
   * The unique identity of the signature suppresses.
   * @return id
  */
  @ApiModelProperty(required = true, value = "The unique identity of the signature suppresses.")
  @NotNull


  public String getId() {
    return id;
  }

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

  public IpsSignatureInfo classification(String classification) {
    this.classification = classification;
    return this;
  }

  /**
   * Attack service concrete classification.
   * @return classification
  */
  @ApiModelProperty(required = true, value = "Attack service concrete classification.")
  @NotNull


  public String getClassification() {
    return classification;
  }

  public void setClassification(String classification) {
    this.classification = classification;
  }

  public IpsSignatureInfo category(Integer category) {
    this.category = category;
    return this;
  }

  /**
   * Attack service wide category.
   * @return category
  */
  @ApiModelProperty(required = true, value = "Attack service wide category.")
  @NotNull


  public Integer getCategory() {
    return category;
  }

  public void setCategory(Integer category) {
    this.category = category;
  }

  public IpsSignatureInfo signature(String signature) {
    this.signature = signature;
    return this;
  }

  /**
   * Attack service signature.
   * @return signature
  */
  @ApiModelProperty(required = true, value = "Attack service signature.")
  @NotNull


  public String getSignature() {
    return signature;
  }

  public void setSignature(String signature) {
    this.signature = signature;
  }

  public IpsSignatureInfo sid(Long sid) {
    this.sid = sid;
    return this;
  }

  /**
   * IPS signature rule SID which is from device.
   * @return sid
  */
  @ApiModelProperty(required = true, value = "IPS signature rule SID which is from device.")
  @NotNull


  public Long getSid() {
    return sid;
  }

  public void setSid(Long sid) {
    this.sid = sid;
  }

  public IpsSignatureInfo service(String service) {
    this.service = service;
    return this;
  }

  /**
   * Attack service service, the same as parameter[signature]
   * @return service
  */
  @ApiModelProperty(required = true, value = "Attack service service, the same as parameter[signature]")
  @NotNull


  public String getService() {
    return service;
  }

  public void setService(String service) {
    this.service = service;
  }

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

  /**
   * Type should be a value as follow: 0: all traffic; 1: packet tracking
   * @return type
  */
  @ApiModelProperty(required = true, value = "Type should be a value as follow: 0: all traffic; 1: packet tracking")
  @NotNull


  public Integer getType() {
    return type;
  }

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

  public IpsSignatureInfo direction(Integer direction) {
    this.direction = direction;
    return this;
  }

  /**
   * Direction should be a value as follow: 0: both direction; 1: source direction; 2: destination direction
   * @return direction
  */
  @ApiModelProperty(value = "Direction should be a value as follow: 0: both direction; 1: source direction; 2: destination direction")


  public Integer getDirection() {
    return direction;
  }

  public void setDirection(Integer direction) {
    this.direction = direction;
  }

  public IpsSignatureInfo trafficType(Integer trafficType) {
    this.trafficType = trafficType;
    return this;
  }

  /**
   * TrafficType should be a value as follow: 0: ip address; 1: subnet
   * @return trafficType
  */
  @ApiModelProperty(value = "TrafficType should be a value as follow: 0: ip address; 1: subnet")


  public Integer getTrafficType() {
    return trafficType;
  }

  public void setTrafficType(Integer trafficType) {
    this.trafficType = trafficType;
  }

  public IpsSignatureInfo trafficSource(String trafficSource) {
    this.trafficSource = trafficSource;
    return this;
  }

  /**
   * IPS signature traffic Source. If parameter [trafficType] is 0, parameter [trafficSource] should be IPV4 address. If parameter [trafficType] is 1, parameter [trafficSource] should be subnet address.
   * @return trafficSource
  */
  @ApiModelProperty(value = "IPS signature traffic Source. If parameter [trafficType] is 0, parameter [trafficSource] should be IPV4 address. If parameter [trafficType] is 1, parameter [trafficSource] should be subnet address.")


  public String getTrafficSource() {
    return trafficSource;
  }

  public void setTrafficSource(String trafficSource) {
    this.trafficSource = trafficSource;
  }


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    IpsSignatureInfo ipsSignatureInfo = (IpsSignatureInfo) o;
    return Objects.equals(this.id, ipsSignatureInfo.id) &&
        Objects.equals(this.classification, ipsSignatureInfo.classification) &&
        Objects.equals(this.category, ipsSignatureInfo.category) &&
        Objects.equals(this.signature, ipsSignatureInfo.signature) &&
        Objects.equals(this.sid, ipsSignatureInfo.sid) &&
        Objects.equals(this.service, ipsSignatureInfo.service) &&
        Objects.equals(this.type, ipsSignatureInfo.type) &&
        Objects.equals(this.direction, ipsSignatureInfo.direction) &&
        Objects.equals(this.trafficType, ipsSignatureInfo.trafficType) &&
        Objects.equals(this.trafficSource, ipsSignatureInfo.trafficSource);
  }

  @Override
  public int hashCode() {
    return Objects.hash(id, classification, category, signature, sid, service, type, direction, trafficType, trafficSource);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class IpsSignatureInfo {\n");
    
    sb.append("    id: ").append(toIndentedString(id)).append("\n");
    sb.append("    classification: ").append(toIndentedString(classification)).append("\n");
    sb.append("    category: ").append(toIndentedString(category)).append("\n");
    sb.append("    signature: ").append(toIndentedString(signature)).append("\n");
    sb.append("    sid: ").append(toIndentedString(sid)).append("\n");
    sb.append("    service: ").append(toIndentedString(service)).append("\n");
    sb.append("    type: ").append(toIndentedString(type)).append("\n");
    sb.append("    direction: ").append(toIndentedString(direction)).append("\n");
    sb.append("    trafficType: ").append(toIndentedString(trafficType)).append("\n");
    sb.append("    trafficSource: ").append(toIndentedString(trafficSource)).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    ");
  }
}

