com.dominodatalab.api.model.DominoProjectsApiRepositoriesResponsesBrowseRepoBrowserEntryDTO Maven / Gradle / Ivy
/*
* Domino Data Lab API v4
* This API is going to provide access to all the Domino functions available in the user interface. To authenticate your requests, include your API Key (which you can find on your account page) with the header X-Domino-Api-Key.
*
* 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.dominodatalab.api.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.api.model.DominoProjectsApiRepositoriesResponsesBrowseCommitShortDTO;
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.util.Arrays;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
/**
* DominoProjectsApiRepositoriesResponsesBrowseRepoBrowserEntryDTO
*/
@JsonPropertyOrder({
DominoProjectsApiRepositoriesResponsesBrowseRepoBrowserEntryDTO.JSON_PROPERTY_KIND,
DominoProjectsApiRepositoriesResponsesBrowseRepoBrowserEntryDTO.JSON_PROPERTY_SHA,
DominoProjectsApiRepositoriesResponsesBrowseRepoBrowserEntryDTO.JSON_PROPERTY_NAME,
DominoProjectsApiRepositoriesResponsesBrowseRepoBrowserEntryDTO.JSON_PROPERTY_PATH,
DominoProjectsApiRepositoriesResponsesBrowseRepoBrowserEntryDTO.JSON_PROPERTY_MODIFIED
})
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-17T15:20:46.682098100-04:00[America/New_York]")
public class DominoProjectsApiRepositoriesResponsesBrowseRepoBrowserEntryDTO {
/**
* Gets or Sets kind
*/
public enum KindEnum {
FILE("file"),
DIR("dir");
private String value;
KindEnum(String value) {
this.value = value;
}
@JsonValue
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
@JsonCreator
public static KindEnum fromValue(String value) {
for (KindEnum b : KindEnum.values()) {
if (b.value.equals(value)) {
return b;
}
}
throw new IllegalArgumentException("Unexpected value '" + value + "'");
}
}
public static final String JSON_PROPERTY_KIND = "kind";
private KindEnum kind;
public static final String JSON_PROPERTY_SHA = "sha";
private String sha;
public static final String JSON_PROPERTY_NAME = "name";
private String name;
public static final String JSON_PROPERTY_PATH = "path";
private String path;
public static final String JSON_PROPERTY_MODIFIED = "modified";
private DominoProjectsApiRepositoriesResponsesBrowseCommitShortDTO modified;
public DominoProjectsApiRepositoriesResponsesBrowseRepoBrowserEntryDTO() {
}
public DominoProjectsApiRepositoriesResponsesBrowseRepoBrowserEntryDTO kind(KindEnum kind) {
this.kind = kind;
return this;
}
/**
* Get kind
* @return kind
**/
@javax.annotation.Nonnull
@JsonProperty(JSON_PROPERTY_KIND)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public KindEnum getKind() {
return kind;
}
@JsonProperty(JSON_PROPERTY_KIND)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public void setKind(KindEnum kind) {
this.kind = kind;
}
public DominoProjectsApiRepositoriesResponsesBrowseRepoBrowserEntryDTO sha(String sha) {
this.sha = sha;
return this;
}
/**
* Get sha
* @return sha
**/
@javax.annotation.Nonnull
@JsonProperty(JSON_PROPERTY_SHA)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public String getSha() {
return sha;
}
@JsonProperty(JSON_PROPERTY_SHA)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public void setSha(String sha) {
this.sha = sha;
}
public DominoProjectsApiRepositoriesResponsesBrowseRepoBrowserEntryDTO name(String name) {
this.name = name;
return this;
}
/**
* Get name
* @return name
**/
@javax.annotation.Nonnull
@JsonProperty(JSON_PROPERTY_NAME)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public String getName() {
return name;
}
@JsonProperty(JSON_PROPERTY_NAME)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public void setName(String name) {
this.name = name;
}
public DominoProjectsApiRepositoriesResponsesBrowseRepoBrowserEntryDTO path(String path) {
this.path = path;
return this;
}
/**
* Get path
* @return path
**/
@javax.annotation.Nonnull
@JsonProperty(JSON_PROPERTY_PATH)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public String getPath() {
return path;
}
@JsonProperty(JSON_PROPERTY_PATH)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public void setPath(String path) {
this.path = path;
}
public DominoProjectsApiRepositoriesResponsesBrowseRepoBrowserEntryDTO modified(DominoProjectsApiRepositoriesResponsesBrowseCommitShortDTO modified) {
this.modified = modified;
return this;
}
/**
* Get modified
* @return modified
**/
@javax.annotation.Nonnull
@JsonProperty(JSON_PROPERTY_MODIFIED)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public DominoProjectsApiRepositoriesResponsesBrowseCommitShortDTO getModified() {
return modified;
}
@JsonProperty(JSON_PROPERTY_MODIFIED)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public void setModified(DominoProjectsApiRepositoriesResponsesBrowseCommitShortDTO modified) {
this.modified = modified;
}
/**
* Return true if this domino.projects.api.repositories.responses.browse.RepoBrowserEntryDTO object is equal to o.
*/
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
DominoProjectsApiRepositoriesResponsesBrowseRepoBrowserEntryDTO dominoProjectsApiRepositoriesResponsesBrowseRepoBrowserEntryDTO = (DominoProjectsApiRepositoriesResponsesBrowseRepoBrowserEntryDTO) o;
return Objects.equals(this.kind, dominoProjectsApiRepositoriesResponsesBrowseRepoBrowserEntryDTO.kind) &&
Objects.equals(this.sha, dominoProjectsApiRepositoriesResponsesBrowseRepoBrowserEntryDTO.sha) &&
Objects.equals(this.name, dominoProjectsApiRepositoriesResponsesBrowseRepoBrowserEntryDTO.name) &&
Objects.equals(this.path, dominoProjectsApiRepositoriesResponsesBrowseRepoBrowserEntryDTO.path) &&
Objects.equals(this.modified, dominoProjectsApiRepositoriesResponsesBrowseRepoBrowserEntryDTO.modified);
}
@Override
public int hashCode() {
return Objects.hash(kind, sha, name, path, modified);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class DominoProjectsApiRepositoriesResponsesBrowseRepoBrowserEntryDTO {\n");
sb.append(" kind: ").append(toIndentedString(kind)).append("\n");
sb.append(" sha: ").append(toIndentedString(sha)).append("\n");
sb.append(" name: ").append(toIndentedString(name)).append("\n");
sb.append(" path: ").append(toIndentedString(path)).append("\n");
sb.append(" modified: ").append(toIndentedString(modified)).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 `kind` to the URL query string
if (getKind() != null) {
joiner.add(String.format("%skind%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getKind()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
}
// add `sha` to the URL query string
if (getSha() != null) {
joiner.add(String.format("%ssha%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getSha()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
}
// add `name` to the URL query string
if (getName() != null) {
joiner.add(String.format("%sname%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getName()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
}
// add `path` to the URL query string
if (getPath() != null) {
joiner.add(String.format("%spath%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getPath()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
}
// add `modified` to the URL query string
if (getModified() != null) {
joiner.add(getModified().toUrlQueryString(prefix + "modified" + suffix));
}
return joiner.toString();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy