com.dominodatalab.pub.model.SnapshotDetailsV1 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.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 com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.dominodatalab.pub.invoker.ApiClient;
/**
* SnapshotDetailsV1
*/
@JsonPropertyOrder({
SnapshotDetailsV1.JSON_PROPERTY_CREATED_AT,
SnapshotDetailsV1.JSON_PROPERTY_CREATOR_ID,
SnapshotDetailsV1.JSON_PROPERTY_DATASET_ID,
SnapshotDetailsV1.JSON_PROPERTY_DESCRIPTION,
SnapshotDetailsV1.JSON_PROPERTY_ID,
SnapshotDetailsV1.JSON_PROPERTY_LAST_MOUNTED,
SnapshotDetailsV1.JSON_PROPERTY_STATUS
})
@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 SnapshotDetailsV1 {
public static final String JSON_PROPERTY_CREATED_AT = "createdAt";
private OffsetDateTime createdAt;
public static final String JSON_PROPERTY_CREATOR_ID = "creatorId";
private String creatorId;
public static final String JSON_PROPERTY_DATASET_ID = "datasetId";
private String datasetId;
public static final String JSON_PROPERTY_DESCRIPTION = "description";
private String description;
public static final String JSON_PROPERTY_ID = "id";
private String id;
public static final String JSON_PROPERTY_LAST_MOUNTED = "lastMounted";
private OffsetDateTime lastMounted;
/**
* Gets or Sets status
*/
public enum StatusEnum {
ACTIVE("active"),
MARK_FOR_DELETION("markForDeletion"),
DELETION_IN_PROGRESS("deletionInProgress"),
DELETED("deleted"),
PENDING("pending"),
FAILED("failed"),
COPYING("copying");
private String value;
StatusEnum(String value) {
this.value = value;
}
@JsonValue
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
@JsonCreator
public static StatusEnum fromValue(String value) {
for (StatusEnum b : StatusEnum.values()) {
if (b.value.equals(value)) {
return b;
}
}
throw new IllegalArgumentException("Unexpected value '" + value + "'");
}
}
public static final String JSON_PROPERTY_STATUS = "status";
private StatusEnum status;
public SnapshotDetailsV1() {
}
public SnapshotDetailsV1 createdAt(OffsetDateTime createdAt) {
this.createdAt = createdAt;
return this;
}
/**
* When the snapshot was created
* @return createdAt
*/
@javax.annotation.Nonnull
@JsonProperty(JSON_PROPERTY_CREATED_AT)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public OffsetDateTime getCreatedAt() {
return createdAt;
}
@JsonProperty(JSON_PROPERTY_CREATED_AT)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public void setCreatedAt(OffsetDateTime createdAt) {
this.createdAt = createdAt;
}
public SnapshotDetailsV1 creatorId(String creatorId) {
this.creatorId = creatorId;
return this;
}
/**
* ID of the user who created this snapshot
* @return creatorId
*/
@javax.annotation.Nullable
@JsonProperty(JSON_PROPERTY_CREATOR_ID)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getCreatorId() {
return creatorId;
}
@JsonProperty(JSON_PROPERTY_CREATOR_ID)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setCreatorId(String creatorId) {
this.creatorId = creatorId;
}
public SnapshotDetailsV1 datasetId(String datasetId) {
this.datasetId = datasetId;
return this;
}
/**
* ID of the dataset this snapshot belongs to
* @return datasetId
*/
@javax.annotation.Nonnull
@JsonProperty(JSON_PROPERTY_DATASET_ID)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public String getDatasetId() {
return datasetId;
}
@JsonProperty(JSON_PROPERTY_DATASET_ID)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public void setDatasetId(String datasetId) {
this.datasetId = datasetId;
}
public SnapshotDetailsV1 description(String description) {
this.description = description;
return this;
}
/**
* Get description
* @return description
*/
@javax.annotation.Nullable
@JsonProperty(JSON_PROPERTY_DESCRIPTION)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getDescription() {
return description;
}
@JsonProperty(JSON_PROPERTY_DESCRIPTION)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setDescription(String description) {
this.description = description;
}
public SnapshotDetailsV1 id(String id) {
this.id = id;
return this;
}
/**
* ID of this snapshot
* @return id
*/
@javax.annotation.Nonnull
@JsonProperty(JSON_PROPERTY_ID)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public String getId() {
return id;
}
@JsonProperty(JSON_PROPERTY_ID)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public void setId(String id) {
this.id = id;
}
public SnapshotDetailsV1 lastMounted(OffsetDateTime lastMounted) {
this.lastMounted = lastMounted;
return this;
}
/**
* When the snapshot was last mounted
* @return lastMounted
*/
@javax.annotation.Nullable
@JsonProperty(JSON_PROPERTY_LAST_MOUNTED)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public OffsetDateTime getLastMounted() {
return lastMounted;
}
@JsonProperty(JSON_PROPERTY_LAST_MOUNTED)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setLastMounted(OffsetDateTime lastMounted) {
this.lastMounted = lastMounted;
}
public SnapshotDetailsV1 status(StatusEnum status) {
this.status = status;
return this;
}
/**
* Get status
* @return status
*/
@javax.annotation.Nonnull
@JsonProperty(JSON_PROPERTY_STATUS)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public StatusEnum getStatus() {
return status;
}
@JsonProperty(JSON_PROPERTY_STATUS)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public void setStatus(StatusEnum status) {
this.status = status;
}
/**
* Return true if this SnapshotDetailsV1 object is equal to o.
*/
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
SnapshotDetailsV1 snapshotDetailsV1 = (SnapshotDetailsV1) o;
return Objects.equals(this.createdAt, snapshotDetailsV1.createdAt) &&
Objects.equals(this.creatorId, snapshotDetailsV1.creatorId) &&
Objects.equals(this.datasetId, snapshotDetailsV1.datasetId) &&
Objects.equals(this.description, snapshotDetailsV1.description) &&
Objects.equals(this.id, snapshotDetailsV1.id) &&
Objects.equals(this.lastMounted, snapshotDetailsV1.lastMounted) &&
Objects.equals(this.status, snapshotDetailsV1.status);
}
@Override
public int hashCode() {
return Objects.hash(createdAt, creatorId, datasetId, description, id, lastMounted, status);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class SnapshotDetailsV1 {\n");
sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n");
sb.append(" creatorId: ").append(toIndentedString(creatorId)).append("\n");
sb.append(" datasetId: ").append(toIndentedString(datasetId)).append("\n");
sb.append(" description: ").append(toIndentedString(description)).append("\n");
sb.append(" id: ").append(toIndentedString(id)).append("\n");
sb.append(" lastMounted: ").append(toIndentedString(lastMounted)).append("\n");
sb.append(" status: ").append(toIndentedString(status)).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 `createdAt` to the URL query string
if (getCreatedAt() != null) {
joiner.add(String.format("%screatedAt%s=%s", prefix, suffix, URLEncoder.encode(ApiClient.valueToString(getCreatedAt()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
}
// add `creatorId` to the URL query string
if (getCreatorId() != null) {
joiner.add(String.format("%screatorId%s=%s", prefix, suffix, URLEncoder.encode(ApiClient.valueToString(getCreatorId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
}
// add `datasetId` to the URL query string
if (getDatasetId() != null) {
joiner.add(String.format("%sdatasetId%s=%s", prefix, suffix, URLEncoder.encode(ApiClient.valueToString(getDatasetId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
}
// add `description` to the URL query string
if (getDescription() != null) {
joiner.add(String.format("%sdescription%s=%s", prefix, suffix, URLEncoder.encode(ApiClient.valueToString(getDescription()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
}
// add `id` to the URL query string
if (getId() != null) {
joiner.add(String.format("%sid%s=%s", prefix, suffix, URLEncoder.encode(ApiClient.valueToString(getId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
}
// add `lastMounted` to the URL query string
if (getLastMounted() != null) {
joiner.add(String.format("%slastMounted%s=%s", prefix, suffix, URLEncoder.encode(ApiClient.valueToString(getLastMounted()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
}
// add `status` to the URL query string
if (getStatus() != null) {
joiner.add(String.format("%sstatus%s=%s", prefix, suffix, URLEncoder.encode(ApiClient.valueToString(getStatus()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
}
return joiner.toString();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy