com.dominodatalab.pub.model.DataSourceAuditDataV1 Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of domino-java-client Show documentation
Show all versions of domino-java-client Show documentation
Domino Data Lab API Client to connect to Domino web services using Java HTTP Client.
/*
* 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.dominodatalab.pub.model.DataSourceAuditEventKindV1;
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;
/**
* DataSourceAuditDataV1
*/
@JsonPropertyOrder({
DataSourceAuditDataV1.JSON_PROPERTY_DATA_SOURCE_ID,
DataSourceAuditDataV1.JSON_PROPERTY_DATA_SOURCE_NAME,
DataSourceAuditDataV1.JSON_PROPERTY_DATA_SOURCE_TYPE,
DataSourceAuditDataV1.JSON_PROPERTY_EVENT_KIND,
DataSourceAuditDataV1.JSON_PROPERTY_METADATA,
DataSourceAuditDataV1.JSON_PROPERTY_PERFORMED_BY,
DataSourceAuditDataV1.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 DataSourceAuditDataV1 {
public static final String JSON_PROPERTY_DATA_SOURCE_ID = "dataSourceId";
private String dataSourceId;
public static final String JSON_PROPERTY_DATA_SOURCE_NAME = "dataSourceName";
private String dataSourceName;
public static final String JSON_PROPERTY_DATA_SOURCE_TYPE = "dataSourceType";
private String dataSourceType;
public static final String JSON_PROPERTY_EVENT_KIND = "eventKind";
private DataSourceAuditEventKindV1 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 DataSourceAuditDataV1() {
}
public DataSourceAuditDataV1 dataSourceId(String dataSourceId) {
this.dataSourceId = dataSourceId;
return this;
}
/**
* ID of the Data Source
* @return dataSourceId
*/
@javax.annotation.Nonnull
@JsonProperty(JSON_PROPERTY_DATA_SOURCE_ID)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public String getDataSourceId() {
return dataSourceId;
}
@JsonProperty(JSON_PROPERTY_DATA_SOURCE_ID)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public void setDataSourceId(String dataSourceId) {
this.dataSourceId = dataSourceId;
}
public DataSourceAuditDataV1 dataSourceName(String dataSourceName) {
this.dataSourceName = dataSourceName;
return this;
}
/**
* name of the Data Source
* @return dataSourceName
*/
@javax.annotation.Nonnull
@JsonProperty(JSON_PROPERTY_DATA_SOURCE_NAME)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public String getDataSourceName() {
return dataSourceName;
}
@JsonProperty(JSON_PROPERTY_DATA_SOURCE_NAME)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public void setDataSourceName(String dataSourceName) {
this.dataSourceName = dataSourceName;
}
public DataSourceAuditDataV1 dataSourceType(String dataSourceType) {
this.dataSourceType = dataSourceType;
return this;
}
/**
* The configuration type of the Data Source
* @return dataSourceType
*/
@javax.annotation.Nonnull
@JsonProperty(JSON_PROPERTY_DATA_SOURCE_TYPE)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public String getDataSourceType() {
return dataSourceType;
}
@JsonProperty(JSON_PROPERTY_DATA_SOURCE_TYPE)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public void setDataSourceType(String dataSourceType) {
this.dataSourceType = dataSourceType;
}
public DataSourceAuditDataV1 eventKind(DataSourceAuditEventKindV1 eventKind) {
this.eventKind = eventKind;
return this;
}
/**
* Get eventKind
* @return eventKind
*/
@javax.annotation.Nonnull
@JsonProperty(JSON_PROPERTY_EVENT_KIND)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public DataSourceAuditEventKindV1 getEventKind() {
return eventKind;
}
@JsonProperty(JSON_PROPERTY_EVENT_KIND)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public void setEventKind(DataSourceAuditEventKindV1 eventKind) {
this.eventKind = eventKind;
}
public DataSourceAuditDataV1 metadata(Map metadata) {
this.metadata = metadata;
return this;
}
public DataSourceAuditDataV1 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 DataSourceAuditDataV1 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 DataSourceAuditDataV1 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 DataSourceAuditDataV1 object is equal to o.
*/
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
DataSourceAuditDataV1 dataSourceAuditDataV1 = (DataSourceAuditDataV1) o;
return Objects.equals(this.dataSourceId, dataSourceAuditDataV1.dataSourceId) &&
Objects.equals(this.dataSourceName, dataSourceAuditDataV1.dataSourceName) &&
Objects.equals(this.dataSourceType, dataSourceAuditDataV1.dataSourceType) &&
Objects.equals(this.eventKind, dataSourceAuditDataV1.eventKind) &&
Objects.equals(this.metadata, dataSourceAuditDataV1.metadata) &&
Objects.equals(this.performedBy, dataSourceAuditDataV1.performedBy) &&
Objects.equals(this.timestamp, dataSourceAuditDataV1.timestamp);
}
@Override
public int hashCode() {
return Objects.hash(dataSourceId, dataSourceName, dataSourceType, eventKind, metadata, performedBy, timestamp);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class DataSourceAuditDataV1 {\n");
sb.append(" dataSourceId: ").append(toIndentedString(dataSourceId)).append("\n");
sb.append(" dataSourceName: ").append(toIndentedString(dataSourceName)).append("\n");
sb.append(" dataSourceType: ").append(toIndentedString(dataSourceType)).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 `dataSourceId` to the URL query string
if (getDataSourceId() != null) {
joiner.add(String.format("%sdataSourceId%s=%s", prefix, suffix, URLEncoder.encode(ApiClient.valueToString(getDataSourceId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
}
// add `dataSourceName` to the URL query string
if (getDataSourceName() != null) {
joiner.add(String.format("%sdataSourceName%s=%s", prefix, suffix, URLEncoder.encode(ApiClient.valueToString(getDataSourceName()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
}
// add `dataSourceType` to the URL query string
if (getDataSourceType() != null) {
joiner.add(String.format("%sdataSourceType%s=%s", prefix, suffix, URLEncoder.encode(ApiClient.valueToString(getDataSourceType()), 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