All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.hpe.caf.services.audit.server.model.NewAuditEvent Maven / Gradle / Ivy

package com.hpe.caf.services.audit.server.model;

import com.fasterxml.jackson.annotation.JsonTypeName;
import com.hpe.caf.services.audit.server.model.EventParam;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

import java.util.Objects;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import com.fasterxml.jackson.annotation.JsonTypeName;



@JsonTypeName("newAuditEvent")
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", date = "2024-09-23T11:21:17.304470716Z[Etc/UTC]")
public class NewAuditEvent   {
  private String applicationId;
  private String processId;
  private Long threadId;
  private Long eventOrder;
  private String eventTime;
  private String eventTimeSource;
  private String userId;
  private String tenantId;
  private String correlationId;
  private String eventTypeId;
  private String eventCategoryId;
  private List eventParams;

  /**
   * The application that the audit event type is associated with.
   **/
  public NewAuditEvent applicationId(String applicationId) {
    this.applicationId = applicationId;
    return this;
  }

  
  @JsonProperty("applicationId")
  public String getApplicationId() {
    return applicationId;
  }

  @JsonProperty("applicationId")
  public void setApplicationId(String applicationId) {
    this.applicationId = applicationId;
  }

  /**
   * Unique identifier associated with the particular instance of the process that generated the audit event.
   **/
  public NewAuditEvent processId(String processId) {
    this.processId = processId;
    return this;
  }

  
  @JsonProperty("processId")
  public String getProcessId() {
    return processId;
  }

  @JsonProperty("processId")
  public void setProcessId(String processId) {
    this.processId = processId;
  }

  /**
   * Numeric id associated with the particular thread within the process that generated the audit event.
   **/
  public NewAuditEvent threadId(Long threadId) {
    this.threadId = threadId;
    return this;
  }

  
  @JsonProperty("threadId")
  public Long getThreadId() {
    return threadId;
  }

  @JsonProperty("threadId")
  public void setThreadId(Long threadId) {
    this.threadId = threadId;
  }

  /**
   * Used to order events raised by the specified thread.
   **/
  public NewAuditEvent eventOrder(Long eventOrder) {
    this.eventOrder = eventOrder;
    return this;
  }

  
  @JsonProperty("eventOrder")
  public Long getEventOrder() {
    return eventOrder;
  }

  @JsonProperty("eventOrder")
  public void setEventOrder(Long eventOrder) {
    this.eventOrder = eventOrder;
  }

  /**
   * Records the time that the event occurred (in the ISO-8601 format).
   **/
  public NewAuditEvent eventTime(String eventTime) {
    this.eventTime = eventTime;
    return this;
  }

  
  @JsonProperty("eventTime")
  public String getEventTime() {
    return eventTime;
  }

  @JsonProperty("eventTime")
  public void setEventTime(String eventTime) {
    this.eventTime = eventTime;
  }

  /**
   * Identifies the machine which provided the eventTime.
   **/
  public NewAuditEvent eventTimeSource(String eventTimeSource) {
    this.eventTimeSource = eventTimeSource;
    return this;
  }

  
  @JsonProperty("eventTimeSource")
  public String getEventTimeSource() {
    return eventTimeSource;
  }

  @JsonProperty("eventTimeSource")
  public void setEventTimeSource(String eventTimeSource) {
    this.eventTimeSource = eventTimeSource;
  }

  /**
   * Identifies the user who triggered the event.
   **/
  public NewAuditEvent userId(String userId) {
    this.userId = userId;
    return this;
  }

  
  @JsonProperty("userId")
  public String getUserId() {
    return userId;
  }

  @JsonProperty("userId")
  public void setUserId(String userId) {
    this.userId = userId;
  }

  /**
   * Identifies the tenant that the user belongs to.
   **/
  public NewAuditEvent tenantId(String tenantId) {
    this.tenantId = tenantId;
    return this;
  }

  
  @JsonProperty("tenantId")
  public String getTenantId() {
    return tenantId;
  }

  @JsonProperty("tenantId")
  public void setTenantId(String tenantId) {
    this.tenantId = tenantId;
  }

  /**
   * Identifies the same user action.
   **/
  public NewAuditEvent correlationId(String correlationId) {
    this.correlationId = correlationId;
    return this;
  }

  
  @JsonProperty("correlationId")
  public String getCorrelationId() {
    return correlationId;
  }

  @JsonProperty("correlationId")
  public void setCorrelationId(String correlationId) {
    this.correlationId = correlationId;
  }

  /**
   * Identifier for the particular event.
   **/
  public NewAuditEvent eventTypeId(String eventTypeId) {
    this.eventTypeId = eventTypeId;
    return this;
  }

  
  @JsonProperty("eventTypeId")
  public String getEventTypeId() {
    return eventTypeId;
  }

  @JsonProperty("eventTypeId")
  public void setEventTypeId(String eventTypeId) {
    this.eventTypeId = eventTypeId;
  }

  /**
   * Identifies the category of event.
   **/
  public NewAuditEvent eventCategoryId(String eventCategoryId) {
    this.eventCategoryId = eventCategoryId;
    return this;
  }

  
  @JsonProperty("eventCategoryId")
  public String getEventCategoryId() {
    return eventCategoryId;
  }

  @JsonProperty("eventCategoryId")
  public void setEventCategoryId(String eventCategoryId) {
    this.eventCategoryId = eventCategoryId;
  }

  /**
   * List of application specific fields associated with the audit event.
   **/
  public NewAuditEvent eventParams(List eventParams) {
    this.eventParams = eventParams;
    return this;
  }

  
  @JsonProperty("eventParams")
  public List getEventParams() {
    return eventParams;
  }

  @JsonProperty("eventParams")
  public void setEventParams(List eventParams) {
    this.eventParams = eventParams;
  }

  public NewAuditEvent addEventParamsItem(EventParam eventParamsItem) {
    if (this.eventParams == null) {
      this.eventParams = new ArrayList<>();
    }

    this.eventParams.add(eventParamsItem);
    return this;
  }

  public NewAuditEvent removeEventParamsItem(EventParam eventParamsItem) {
    if (eventParamsItem != null && this.eventParams != null) {
      this.eventParams.remove(eventParamsItem);
    }

    return this;
  }

  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    NewAuditEvent newAuditEvent = (NewAuditEvent) o;
    return Objects.equals(this.applicationId, newAuditEvent.applicationId) &&
        Objects.equals(this.processId, newAuditEvent.processId) &&
        Objects.equals(this.threadId, newAuditEvent.threadId) &&
        Objects.equals(this.eventOrder, newAuditEvent.eventOrder) &&
        Objects.equals(this.eventTime, newAuditEvent.eventTime) &&
        Objects.equals(this.eventTimeSource, newAuditEvent.eventTimeSource) &&
        Objects.equals(this.userId, newAuditEvent.userId) &&
        Objects.equals(this.tenantId, newAuditEvent.tenantId) &&
        Objects.equals(this.correlationId, newAuditEvent.correlationId) &&
        Objects.equals(this.eventTypeId, newAuditEvent.eventTypeId) &&
        Objects.equals(this.eventCategoryId, newAuditEvent.eventCategoryId) &&
        Objects.equals(this.eventParams, newAuditEvent.eventParams);
  }

  @Override
  public int hashCode() {
    return Objects.hash(applicationId, processId, threadId, eventOrder, eventTime, eventTimeSource, userId, tenantId, correlationId, eventTypeId, eventCategoryId, eventParams);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class NewAuditEvent {\n");
    
    sb.append("    applicationId: ").append(toIndentedString(applicationId)).append("\n");
    sb.append("    processId: ").append(toIndentedString(processId)).append("\n");
    sb.append("    threadId: ").append(toIndentedString(threadId)).append("\n");
    sb.append("    eventOrder: ").append(toIndentedString(eventOrder)).append("\n");
    sb.append("    eventTime: ").append(toIndentedString(eventTime)).append("\n");
    sb.append("    eventTimeSource: ").append(toIndentedString(eventTimeSource)).append("\n");
    sb.append("    userId: ").append(toIndentedString(userId)).append("\n");
    sb.append("    tenantId: ").append(toIndentedString(tenantId)).append("\n");
    sb.append("    correlationId: ").append(toIndentedString(correlationId)).append("\n");
    sb.append("    eventTypeId: ").append(toIndentedString(eventTypeId)).append("\n");
    sb.append("    eventCategoryId: ").append(toIndentedString(eventCategoryId)).append("\n");
    sb.append("    eventParams: ").append(toIndentedString(eventParams)).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    ");
  }


}





© 2015 - 2024 Weber Informatics LLC | Privacy Policy