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

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

The newest version!
/*
 * Audit Web Service
 * Allows audit event message details to be indexed into ElasticSearch.  Each audit event message will comprise a set of fixed fields including the application the audit event message is associated with, the user that triggered the audit event as well as the tenant that the user belongs to. The audit event message will also include additional fields specific to the application.  
 *
 * The version of the OpenAPI document: 4.0.0
 * 
 *
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 */


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

import java.util.Objects;
import java.util.Map;
import java.util.HashMap;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonTypeName;
import com.fasterxml.jackson.annotation.JsonValue;
import com.hpe.caf.services.audit.client.model.EventParam;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.hpe.caf.services.audit.client.JSON;


/**
 * NewAuditEvent
 */
@JsonPropertyOrder({
  NewAuditEvent.JSON_PROPERTY_APPLICATION_ID,
  NewAuditEvent.JSON_PROPERTY_PROCESS_ID,
  NewAuditEvent.JSON_PROPERTY_THREAD_ID,
  NewAuditEvent.JSON_PROPERTY_EVENT_ORDER,
  NewAuditEvent.JSON_PROPERTY_EVENT_TIME,
  NewAuditEvent.JSON_PROPERTY_EVENT_TIME_SOURCE,
  NewAuditEvent.JSON_PROPERTY_USER_ID,
  NewAuditEvent.JSON_PROPERTY_TENANT_ID,
  NewAuditEvent.JSON_PROPERTY_CORRELATION_ID,
  NewAuditEvent.JSON_PROPERTY_EVENT_TYPE_ID,
  NewAuditEvent.JSON_PROPERTY_EVENT_CATEGORY_ID,
  NewAuditEvent.JSON_PROPERTY_EVENT_PARAMS
})
@JsonTypeName("newAuditEvent")
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-23T11:21:10.586433281Z[Etc/UTC]")
public class NewAuditEvent {
  public static final String JSON_PROPERTY_APPLICATION_ID = "applicationId";
  private String applicationId;

  public static final String JSON_PROPERTY_PROCESS_ID = "processId";
  private String processId;

  public static final String JSON_PROPERTY_THREAD_ID = "threadId";
  private Long threadId;

  public static final String JSON_PROPERTY_EVENT_ORDER = "eventOrder";
  private Long eventOrder;

  public static final String JSON_PROPERTY_EVENT_TIME = "eventTime";
  private String eventTime;

  public static final String JSON_PROPERTY_EVENT_TIME_SOURCE = "eventTimeSource";
  private String eventTimeSource;

  public static final String JSON_PROPERTY_USER_ID = "userId";
  private String userId;

  public static final String JSON_PROPERTY_TENANT_ID = "tenantId";
  private String tenantId;

  public static final String JSON_PROPERTY_CORRELATION_ID = "correlationId";
  private String correlationId;

  public static final String JSON_PROPERTY_EVENT_TYPE_ID = "eventTypeId";
  private String eventTypeId;

  public static final String JSON_PROPERTY_EVENT_CATEGORY_ID = "eventCategoryId";
  private String eventCategoryId;

  public static final String JSON_PROPERTY_EVENT_PARAMS = "eventParams";
  private List eventParams;

  public NewAuditEvent() { 
  }

  public NewAuditEvent applicationId(String applicationId) {
    this.applicationId = applicationId;
    return this;
  }

   /**
   * The application that the audit event type is associated with.
   * @return applicationId
  **/
  @jakarta.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_APPLICATION_ID)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public String getApplicationId() {
    return applicationId;
  }


  @JsonProperty(JSON_PROPERTY_APPLICATION_ID)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setApplicationId(String applicationId) {
    this.applicationId = applicationId;
  }


  public NewAuditEvent processId(String processId) {
    this.processId = processId;
    return this;
  }

   /**
   * Unique identifier associated with the particular instance of the process that generated the audit event.
   * @return processId
  **/
  @jakarta.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_PROCESS_ID)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public String getProcessId() {
    return processId;
  }


  @JsonProperty(JSON_PROPERTY_PROCESS_ID)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setProcessId(String processId) {
    this.processId = processId;
  }


  public NewAuditEvent threadId(Long threadId) {
    this.threadId = threadId;
    return this;
  }

   /**
   * Numeric id associated with the particular thread within the process that generated the audit event.
   * @return threadId
  **/
  @jakarta.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_THREAD_ID)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public Long getThreadId() {
    return threadId;
  }


  @JsonProperty(JSON_PROPERTY_THREAD_ID)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setThreadId(Long threadId) {
    this.threadId = threadId;
  }


  public NewAuditEvent eventOrder(Long eventOrder) {
    this.eventOrder = eventOrder;
    return this;
  }

   /**
   * Used to order events raised by the specified thread.
   * @return eventOrder
  **/
  @jakarta.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_EVENT_ORDER)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public Long getEventOrder() {
    return eventOrder;
  }


  @JsonProperty(JSON_PROPERTY_EVENT_ORDER)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setEventOrder(Long eventOrder) {
    this.eventOrder = eventOrder;
  }


  public NewAuditEvent eventTime(String eventTime) {
    this.eventTime = eventTime;
    return this;
  }

   /**
   * Records the time that the event occurred (in the ISO-8601 format).
   * @return eventTime
  **/
  @jakarta.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_EVENT_TIME)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public String getEventTime() {
    return eventTime;
  }


  @JsonProperty(JSON_PROPERTY_EVENT_TIME)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setEventTime(String eventTime) {
    this.eventTime = eventTime;
  }


  public NewAuditEvent eventTimeSource(String eventTimeSource) {
    this.eventTimeSource = eventTimeSource;
    return this;
  }

   /**
   * Identifies the machine which provided the eventTime.
   * @return eventTimeSource
  **/
  @jakarta.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_EVENT_TIME_SOURCE)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public String getEventTimeSource() {
    return eventTimeSource;
  }


  @JsonProperty(JSON_PROPERTY_EVENT_TIME_SOURCE)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setEventTimeSource(String eventTimeSource) {
    this.eventTimeSource = eventTimeSource;
  }


  public NewAuditEvent userId(String userId) {
    this.userId = userId;
    return this;
  }

   /**
   * Identifies the user who triggered the event.
   * @return userId
  **/
  @jakarta.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_USER_ID)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public String getUserId() {
    return userId;
  }


  @JsonProperty(JSON_PROPERTY_USER_ID)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setUserId(String userId) {
    this.userId = userId;
  }


  public NewAuditEvent tenantId(String tenantId) {
    this.tenantId = tenantId;
    return this;
  }

   /**
   * Identifies the tenant that the user belongs to.
   * @return tenantId
  **/
  @jakarta.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_TENANT_ID)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public String getTenantId() {
    return tenantId;
  }


  @JsonProperty(JSON_PROPERTY_TENANT_ID)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setTenantId(String tenantId) {
    this.tenantId = tenantId;
  }


  public NewAuditEvent correlationId(String correlationId) {
    this.correlationId = correlationId;
    return this;
  }

   /**
   * Identifies the same user action.
   * @return correlationId
  **/
  @jakarta.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_CORRELATION_ID)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public String getCorrelationId() {
    return correlationId;
  }


  @JsonProperty(JSON_PROPERTY_CORRELATION_ID)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setCorrelationId(String correlationId) {
    this.correlationId = correlationId;
  }


  public NewAuditEvent eventTypeId(String eventTypeId) {
    this.eventTypeId = eventTypeId;
    return this;
  }

   /**
   * Identifier for the particular event.
   * @return eventTypeId
  **/
  @jakarta.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_EVENT_TYPE_ID)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public String getEventTypeId() {
    return eventTypeId;
  }


  @JsonProperty(JSON_PROPERTY_EVENT_TYPE_ID)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setEventTypeId(String eventTypeId) {
    this.eventTypeId = eventTypeId;
  }


  public NewAuditEvent eventCategoryId(String eventCategoryId) {
    this.eventCategoryId = eventCategoryId;
    return this;
  }

   /**
   * Identifies the category of event.
   * @return eventCategoryId
  **/
  @jakarta.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_EVENT_CATEGORY_ID)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public String getEventCategoryId() {
    return eventCategoryId;
  }


  @JsonProperty(JSON_PROPERTY_EVENT_CATEGORY_ID)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setEventCategoryId(String eventCategoryId) {
    this.eventCategoryId = eventCategoryId;
  }


  public NewAuditEvent eventParams(List eventParams) {
    this.eventParams = eventParams;
    return this;
  }

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

   /**
   * List of application specific fields associated with the audit event.
   * @return eventParams
  **/
  @jakarta.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_EVENT_PARAMS)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public List getEventParams() {
    return eventParams;
  }


  @JsonProperty(JSON_PROPERTY_EVENT_PARAMS)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setEventParams(List eventParams) {
    this.eventParams = eventParams;
  }


  /**
   * Return true if this newAuditEvent object is equal to o.
   */
  @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