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

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

import javax.validation.Valid;
import javax.validation.constraints.NotNull;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;

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

public class IpsOperateThreat   {
  @JsonProperty("threatId")
  @Valid
  private List<IpsOperateThreatIdAndTime> threatId = null;

  @JsonProperty("type")
  private Integer type;

  @JsonProperty("signatureSuppression")
  private SignatureSuppression signatureSuppression;

  @JsonProperty("blockName")
  private String blockName;

  public IpsOperateThreat threatId(List<IpsOperateThreatIdAndTime> threatId) {
    this.threatId = threatId;
    return this;
  }

  public IpsOperateThreat addThreatIdItem(IpsOperateThreatIdAndTime threatIdItem) {
    if (this.threatId == null) {
      this.threatId = new ArrayList<>();
    }
    this.threatId.add(threatIdItem);
    return this;
  }

  /**
   * IPS signature type should be a value as follows: 0: all traffic; 1: packet tracking respectively.
   * @return threatId
  */
  @ApiModelProperty(value = "IPS signature type should be a value as follows: 0: all traffic; 1: packet tracking respectively.")

  @Valid

  public List<IpsOperateThreatIdAndTime> getThreatId() {
    return threatId;
  }

  public void setThreatId(List<IpsOperateThreatIdAndTime> threatId) {
    this.threatId = threatId;
  }

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

  /**
   * IPS Operate Threat type should be a value as follows: 0: block; 1:isolate device; 2: signature Suppression; 3: allow
   * @return type
  */
  @ApiModelProperty(required = true, value = "IPS Operate Threat type should be a value as follows: 0: block; 1:isolate device; 2: signature Suppression; 3: allow")
  @NotNull


  public Integer getType() {
    return type;
  }

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

  public IpsOperateThreat signatureSuppression(SignatureSuppression signatureSuppression) {
    this.signatureSuppression = signatureSuppression;
    return this;
  }

  /**
   * Get signatureSuppression
   * @return signatureSuppression
  */
  @ApiModelProperty(value = "")

  @Valid

  public SignatureSuppression getSignatureSuppression() {
    return signatureSuppression;
  }

  public void setSignatureSuppression(SignatureSuppression signatureSuppression) {
    this.signatureSuppression = signatureSuppression;
  }

  public IpsOperateThreat blockName(String blockName) {
    this.blockName = blockName;
    return this;
  }

  /**
   * IPS block name should not be empty when type is 0 or 1.
   * @return blockName
  */
  @ApiModelProperty(value = "IPS block name should not be empty when type is 0 or 1.")


  public String getBlockName() {
    return blockName;
  }

  public void setBlockName(String blockName) {
    this.blockName = blockName;
  }


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    IpsOperateThreat ipsOperateThreat = (IpsOperateThreat) o;
    return Objects.equals(this.threatId, ipsOperateThreat.threatId) &&
        Objects.equals(this.type, ipsOperateThreat.type) &&
        Objects.equals(this.signatureSuppression, ipsOperateThreat.signatureSuppression) &&
        Objects.equals(this.blockName, ipsOperateThreat.blockName);
  }

  @Override
  public int hashCode() {
    return Objects.hash(threatId, type, signatureSuppression, blockName);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class IpsOperateThreat {\n");
    
    sb.append("    threatId: ").append(toIndentedString(threatId)).append("\n");
    sb.append("    type: ").append(toIndentedString(type)).append("\n");
    sb.append("    signatureSuppression: ").append(toIndentedString(signatureSuppression)).append("\n");
    sb.append("    blockName: ").append(toIndentedString(blockName)).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    ");
  }
}

