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

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

import javax.validation.Valid;
import java.util.Objects;

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

public class AuditLogOpenApiVo   {
  @JsonProperty("time")
  private Long time;

  @JsonProperty("operator")
  private String operator;

  @JsonProperty("resource")
  private String resource;

  @JsonProperty("ip")
  private String ip;

  @JsonProperty("auditType")
  private String auditType;

  @JsonProperty("level")
  private String level;

  @JsonProperty("result")
  private String result;

  @JsonProperty("content")
  private String content;

  @JsonProperty("label")
  private String label;

  @JsonProperty("oldValue")
  private Object oldValue;

  @JsonProperty("newValue")
  private Object newValue;

  public AuditLogOpenApiVo time(Long time) {
    this.time = time;
    return this;
  }

  /**
   * Log Creation TimeStamp, Unit:ms
   * @return time
  */
  @ApiModelProperty(value = "Log Creation TimeStamp, Unit:ms")


  public Long getTime() {
    return time;
  }

  public void setTime(Long time) {
    this.time = time;
  }

  public AuditLogOpenApiVo operator(String operator) {
    this.operator = operator;
    return this;
  }

  /**
   * Operator
   * @return operator
  */
  @ApiModelProperty(value = "Operator")


  public String getOperator() {
    return operator;
  }

  public void setOperator(String operator) {
    this.operator = operator;
  }

  public AuditLogOpenApiVo resource(String resource) {
    this.resource = resource;
    return this;
  }

  /**
   * Log Creation Resource. It should be a value as follows: WEB、Open API
   * @return resource
  */
  @ApiModelProperty(value = "Log Creation Resource. It should be a value as follows: WEB、Open API")


  public String getResource() {
    return resource;
  }

  public void setResource(String resource) {
    this.resource = resource;
  }

  public AuditLogOpenApiVo ip(String ip) {
    this.ip = ip;
    return this;
  }

  /**
   * User Login IP address
   * @return ip
  */
  @ApiModelProperty(value = "User Login IP address")


  public String getIp() {
    return ip;
  }

  public void setIp(String ip) {
    this.ip = ip;
  }

  public AuditLogOpenApiVo auditType(String auditType) {
    this.auditType = auditType;
    return this;
  }

  /**
   * Log Type
   * @return auditType
  */
  @ApiModelProperty(value = "Log Type")


  public String getAuditType() {
    return auditType;
  }

  public void setAuditType(String auditType) {
    this.auditType = auditType;
  }

  public AuditLogOpenApiVo level(String level) {
    this.level = level;
    return this;
  }

  /**
   * Log Level. It should be a value as follows: Error, Warning, Information.
   * @return level
  */
  @ApiModelProperty(value = "Log Level. It should be a value as follows: Error, Warning, Information.")


  public String getLevel() {
    return level;
  }

  public void setLevel(String level) {
    this.level = level;
  }

  public AuditLogOpenApiVo result(String result) {
    this.result = result;
    return this;
  }

  /**
   * Operation Result, it should be a value as follows: Succeed、Failed
   * @return result
  */
  @ApiModelProperty(value = "Operation Result, it should be a value as follows: Succeed、Failed")


  public String getResult() {
    return result;
  }

  public void setResult(String result) {
    this.result = result;
  }

  public AuditLogOpenApiVo content(String content) {
    this.content = content;
    return this;
  }

  /**
   * Log Content
   * @return content
  */
  @ApiModelProperty(value = "Log Content")


  public String getContent() {
    return content;
  }

  public void setContent(String content) {
    this.content = content;
  }

  public AuditLogOpenApiVo label(String label) {
    this.label = label;
    return this;
  }

  /**
   * Configuration card or request path, may be empty.
   * @return label
  */
  @ApiModelProperty(value = "Configuration card or request path, may be empty.")


  public String getLabel() {
    return label;
  }

  public void setLabel(String label) {
    this.label = label;
  }

  public AuditLogOpenApiVo oldValue(Object oldValue) {
    this.oldValue = oldValue;
    return this;
  }

  /**
   * Configuration before modification, may be empty.
   * @return oldValue
  */
  @ApiModelProperty(value = "Configuration before modification, may be empty.")

  @Valid

  public Object getOldValue() {
    return oldValue;
  }

  public void setOldValue(Object oldValue) {
    this.oldValue = oldValue;
  }

  public AuditLogOpenApiVo newValue(Object newValue) {
    this.newValue = newValue;
    return this;
  }

  /**
   * Configuration after modification, may be empty.
   * @return newValue
  */
  @ApiModelProperty(value = "Configuration after modification, may be empty.")

  @Valid

  public Object getNewValue() {
    return newValue;
  }

  public void setNewValue(Object newValue) {
    this.newValue = newValue;
  }


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    AuditLogOpenApiVo auditLogOpenApiVo = (AuditLogOpenApiVo) o;
    return Objects.equals(this.time, auditLogOpenApiVo.time) &&
        Objects.equals(this.operator, auditLogOpenApiVo.operator) &&
        Objects.equals(this.resource, auditLogOpenApiVo.resource) &&
        Objects.equals(this.ip, auditLogOpenApiVo.ip) &&
        Objects.equals(this.auditType, auditLogOpenApiVo.auditType) &&
        Objects.equals(this.level, auditLogOpenApiVo.level) &&
        Objects.equals(this.result, auditLogOpenApiVo.result) &&
        Objects.equals(this.content, auditLogOpenApiVo.content) &&
        Objects.equals(this.label, auditLogOpenApiVo.label) &&
        Objects.equals(this.oldValue, auditLogOpenApiVo.oldValue) &&
        Objects.equals(this.newValue, auditLogOpenApiVo.newValue);
  }

  @Override
  public int hashCode() {
    return Objects.hash(time, operator, resource, ip, auditType, level, result, content, label, oldValue, newValue);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class AuditLogOpenApiVo {\n");
    
    sb.append("    time: ").append(toIndentedString(time)).append("\n");
    sb.append("    operator: ").append(toIndentedString(operator)).append("\n");
    sb.append("    resource: ").append(toIndentedString(resource)).append("\n");
    sb.append("    ip: ").append(toIndentedString(ip)).append("\n");
    sb.append("    auditType: ").append(toIndentedString(auditType)).append("\n");
    sb.append("    level: ").append(toIndentedString(level)).append("\n");
    sb.append("    result: ").append(toIndentedString(result)).append("\n");
    sb.append("    content: ").append(toIndentedString(content)).append("\n");
    sb.append("    label: ").append(toIndentedString(label)).append("\n");
    sb.append("    oldValue: ").append(toIndentedString(oldValue)).append("\n");
    sb.append("    newValue: ").append(toIndentedString(newValue)).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    ");
  }
}

