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

com.dominodatalab.pub.model.AIGatewayAuditDataV1 Maven / Gradle / Ivy

Go to download

Domino Data Lab API Client to connect to Domino web services using Java HTTP Client.

There is a newer version: 6.0.1.0
Show newest version
/*
 * Domino Public API
 * Domino Public API Endpoints
 *
 * The version of the OpenAPI document: 0.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.dominodatalab.pub.model;

import java.net.URLEncoder;
import java.nio.charset.StandardCharsets;
import java.util.StringJoiner;
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 java.time.OffsetDateTime;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;


import com.dominodatalab.pub.invoker.ApiClient;
/**
 * AIGatewayAuditDataV1
 */
@JsonPropertyOrder({
  AIGatewayAuditDataV1.JSON_PROPERTY_ENDPOINT_ID,
  AIGatewayAuditDataV1.JSON_PROPERTY_ENDPOINT_TYPE,
  AIGatewayAuditDataV1.JSON_PROPERTY_EVENT_KIND,
  AIGatewayAuditDataV1.JSON_PROPERTY_METADATA,
  AIGatewayAuditDataV1.JSON_PROPERTY_PERFORMED_BY,
  AIGatewayAuditDataV1.JSON_PROPERTY_TIMESTAMP
})
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-10-04T16:37:28.765500600-04:00[America/New_York]", comments = "Generator version: 7.8.0")
public class AIGatewayAuditDataV1 {
  public static final String JSON_PROPERTY_ENDPOINT_ID = "endpointId";
  private String endpointId;

  public static final String JSON_PROPERTY_ENDPOINT_TYPE = "endpointType";
  private String endpointType;

  public static final String JSON_PROPERTY_EVENT_KIND = "eventKind";
  private String eventKind;

  public static final String JSON_PROPERTY_METADATA = "metadata";
  private Map metadata = new HashMap<>();

  public static final String JSON_PROPERTY_PERFORMED_BY = "performedBy";
  private String performedBy;

  public static final String JSON_PROPERTY_TIMESTAMP = "timestamp";
  private OffsetDateTime timestamp;

  public AIGatewayAuditDataV1() { 
  }

  public AIGatewayAuditDataV1 endpointId(String endpointId) {
    this.endpointId = endpointId;
    return this;
  }

  /**
   * Endpoint ID
   * @return endpointId
   */
  @javax.annotation.Nonnull
  @JsonProperty(JSON_PROPERTY_ENDPOINT_ID)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)
  public String getEndpointId() {
    return endpointId;
  }


  @JsonProperty(JSON_PROPERTY_ENDPOINT_ID)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)
  public void setEndpointId(String endpointId) {
    this.endpointId = endpointId;
  }


  public AIGatewayAuditDataV1 endpointType(String endpointType) {
    this.endpointType = endpointType;
    return this;
  }

  /**
   * Endpoint type
   * @return endpointType
   */
  @javax.annotation.Nonnull
  @JsonProperty(JSON_PROPERTY_ENDPOINT_TYPE)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)
  public String getEndpointType() {
    return endpointType;
  }


  @JsonProperty(JSON_PROPERTY_ENDPOINT_TYPE)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)
  public void setEndpointType(String endpointType) {
    this.endpointType = endpointType;
  }


  public AIGatewayAuditDataV1 eventKind(String eventKind) {
    this.eventKind = eventKind;
    return this;
  }

  /**
   * Event kind
   * @return eventKind
   */
  @javax.annotation.Nonnull
  @JsonProperty(JSON_PROPERTY_EVENT_KIND)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)
  public String getEventKind() {
    return eventKind;
  }


  @JsonProperty(JSON_PROPERTY_EVENT_KIND)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)
  public void setEventKind(String eventKind) {
    this.eventKind = eventKind;
  }


  public AIGatewayAuditDataV1 metadata(Map metadata) {
    this.metadata = metadata;
    return this;
  }

  public AIGatewayAuditDataV1 putMetadataItem(String key, String metadataItem) {
    if (this.metadata == null) {
      this.metadata = new HashMap<>();
    }
    this.metadata.put(key, metadataItem);
    return this;
  }

  /**
   * A map of string -> string
   * @return metadata
   */
  @javax.annotation.Nonnull
  @JsonProperty(JSON_PROPERTY_METADATA)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)
  public Map getMetadata() {
    return metadata;
  }


  @JsonProperty(JSON_PROPERTY_METADATA)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)
  public void setMetadata(Map metadata) {
    this.metadata = metadata;
  }


  public AIGatewayAuditDataV1 performedBy(String performedBy) {
    this.performedBy = performedBy;
    return this;
  }

  /**
   * ID of user who performed the event
   * @return performedBy
   */
  @javax.annotation.Nonnull
  @JsonProperty(JSON_PROPERTY_PERFORMED_BY)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)
  public String getPerformedBy() {
    return performedBy;
  }


  @JsonProperty(JSON_PROPERTY_PERFORMED_BY)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)
  public void setPerformedBy(String performedBy) {
    this.performedBy = performedBy;
  }


  public AIGatewayAuditDataV1 timestamp(OffsetDateTime timestamp) {
    this.timestamp = timestamp;
    return this;
  }

  /**
   * timestamp of when event was performed
   * @return timestamp
   */
  @javax.annotation.Nonnull
  @JsonProperty(JSON_PROPERTY_TIMESTAMP)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)
  public OffsetDateTime getTimestamp() {
    return timestamp;
  }


  @JsonProperty(JSON_PROPERTY_TIMESTAMP)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)
  public void setTimestamp(OffsetDateTime timestamp) {
    this.timestamp = timestamp;
  }


  /**
   * Return true if this AIGatewayAuditDataV1 object is equal to o.
   */
  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    AIGatewayAuditDataV1 aiGatewayAuditDataV1 = (AIGatewayAuditDataV1) o;
    return Objects.equals(this.endpointId, aiGatewayAuditDataV1.endpointId) &&
        Objects.equals(this.endpointType, aiGatewayAuditDataV1.endpointType) &&
        Objects.equals(this.eventKind, aiGatewayAuditDataV1.eventKind) &&
        Objects.equals(this.metadata, aiGatewayAuditDataV1.metadata) &&
        Objects.equals(this.performedBy, aiGatewayAuditDataV1.performedBy) &&
        Objects.equals(this.timestamp, aiGatewayAuditDataV1.timestamp);
  }

  @Override
  public int hashCode() {
    return Objects.hash(endpointId, endpointType, eventKind, metadata, performedBy, timestamp);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class AIGatewayAuditDataV1 {\n");
    sb.append("    endpointId: ").append(toIndentedString(endpointId)).append("\n");
    sb.append("    endpointType: ").append(toIndentedString(endpointType)).append("\n");
    sb.append("    eventKind: ").append(toIndentedString(eventKind)).append("\n");
    sb.append("    metadata: ").append(toIndentedString(metadata)).append("\n");
    sb.append("    performedBy: ").append(toIndentedString(performedBy)).append("\n");
    sb.append("    timestamp: ").append(toIndentedString(timestamp)).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    ");
  }

  /**
   * Convert the instance into URL query string.
   *
   * @return URL query string
   */
  public String toUrlQueryString() {
    return toUrlQueryString(null);
  }

  /**
   * Convert the instance into URL query string.
   *
   * @param prefix prefix of the query string
   * @return URL query string
   */
  public String toUrlQueryString(String prefix) {
    String suffix = "";
    String containerSuffix = "";
    String containerPrefix = "";
    if (prefix == null) {
      // style=form, explode=true, e.g. /pet?name=cat&type=manx
      prefix = "";
    } else {
      // deepObject style e.g. /pet?id[name]=cat&id[type]=manx
      prefix = prefix + "[";
      suffix = "]";
      containerSuffix = "]";
      containerPrefix = "[";
    }

    StringJoiner joiner = new StringJoiner("&");

    // add `endpointId` to the URL query string
    if (getEndpointId() != null) {
      joiner.add(String.format("%sendpointId%s=%s", prefix, suffix, URLEncoder.encode(ApiClient.valueToString(getEndpointId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
    }

    // add `endpointType` to the URL query string
    if (getEndpointType() != null) {
      joiner.add(String.format("%sendpointType%s=%s", prefix, suffix, URLEncoder.encode(ApiClient.valueToString(getEndpointType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
    }

    // add `eventKind` to the URL query string
    if (getEventKind() != null) {
      joiner.add(String.format("%seventKind%s=%s", prefix, suffix, URLEncoder.encode(ApiClient.valueToString(getEventKind()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
    }

    // add `metadata` to the URL query string
    if (getMetadata() != null) {
      for (String _key : getMetadata().keySet()) {
        joiner.add(String.format("%smetadata%s%s=%s", prefix, suffix,
            "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix),
            getMetadata().get(_key), URLEncoder.encode(ApiClient.valueToString(getMetadata().get(_key)), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
      }
    }

    // add `performedBy` to the URL query string
    if (getPerformedBy() != null) {
      joiner.add(String.format("%sperformedBy%s=%s", prefix, suffix, URLEncoder.encode(ApiClient.valueToString(getPerformedBy()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
    }

    // add `timestamp` to the URL query string
    if (getTimestamp() != null) {
      joiner.add(String.format("%stimestamp%s=%s", prefix, suffix, URLEncoder.encode(ApiClient.valueToString(getTimestamp()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
    }

    return joiner.toString();
  }
}





© 2015 - 2025 Weber Informatics LLC | Privacy Policy