com.dominodatalab.api.model.DominoNucleusProjectModelsNewProject 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.DominoProjectsApiCollaboratorDTO;
import com.dominodatalab.api.model.DominoProjectsApiNewTagsDTO;
import com.dominodatalab.api.model.DominoProjectsApiProjectGitRepositoryTemp;
import com.dominodatalab.api.model.DominoProjectsApiRepositoriesRequestsCreateRepoRequest;
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.ArrayList;
import java.util.Arrays;
import java.util.List;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
/**
* DominoNucleusProjectModelsNewProject
*/
@JsonPropertyOrder({
DominoNucleusProjectModelsNewProject.JSON_PROPERTY_NAME,
DominoNucleusProjectModelsNewProject.JSON_PROPERTY_DESCRIPTION,
DominoNucleusProjectModelsNewProject.JSON_PROPERTY_VISIBILITY,
DominoNucleusProjectModelsNewProject.JSON_PROPERTY_OWNER_ID,
DominoNucleusProjectModelsNewProject.JSON_PROPERTY_REPO_TO_CREATE,
DominoNucleusProjectModelsNewProject.JSON_PROPERTY_MAIN_REPOSITORY,
DominoNucleusProjectModelsNewProject.JSON_PROPERTY_COLLABORATORS,
DominoNucleusProjectModelsNewProject.JSON_PROPERTY_IS_RESTRICTED,
DominoNucleusProjectModelsNewProject.JSON_PROPERTY_TAGS
})
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-10-17T15:20:46.682098100-04:00[America/New_York]")
public class DominoNucleusProjectModelsNewProject {
public static final String JSON_PROPERTY_NAME = "name";
private String name;
public static final String JSON_PROPERTY_DESCRIPTION = "description";
private String description;
/**
* Gets or Sets visibility
*/
public enum VisibilityEnum {
PUBLIC("Public"),
SEARCHABLE("Searchable"),
PRIVATE("Private");
private String value;
VisibilityEnum(String value) {
this.value = value;
}
@JsonValue
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
@JsonCreator
public static VisibilityEnum fromValue(String value) {
for (VisibilityEnum b : VisibilityEnum.values()) {
if (b.value.equals(value)) {
return b;
}
}
throw new IllegalArgumentException("Unexpected value '" + value + "'");
}
}
public static final String JSON_PROPERTY_VISIBILITY = "visibility";
private VisibilityEnum visibility;
public static final String JSON_PROPERTY_OWNER_ID = "ownerId";
private String ownerId;
public static final String JSON_PROPERTY_REPO_TO_CREATE = "repoToCreate";
private DominoProjectsApiRepositoriesRequestsCreateRepoRequest repoToCreate;
public static final String JSON_PROPERTY_MAIN_REPOSITORY = "mainRepository";
private DominoProjectsApiProjectGitRepositoryTemp mainRepository;
public static final String JSON_PROPERTY_COLLABORATORS = "collaborators";
private List collaborators = new ArrayList<>();
public static final String JSON_PROPERTY_IS_RESTRICTED = "isRestricted";
private Boolean isRestricted;
public static final String JSON_PROPERTY_TAGS = "tags";
private DominoProjectsApiNewTagsDTO tags;
public DominoNucleusProjectModelsNewProject() {
}
public DominoNucleusProjectModelsNewProject 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 DominoNucleusProjectModelsNewProject description(String description) {
this.description = description;
return this;
}
/**
* Get description
* @return description
**/
@javax.annotation.Nonnull
@JsonProperty(JSON_PROPERTY_DESCRIPTION)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public String getDescription() {
return description;
}
@JsonProperty(JSON_PROPERTY_DESCRIPTION)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public void setDescription(String description) {
this.description = description;
}
public DominoNucleusProjectModelsNewProject visibility(VisibilityEnum visibility) {
this.visibility = visibility;
return this;
}
/**
* Get visibility
* @return visibility
**/
@javax.annotation.Nonnull
@JsonProperty(JSON_PROPERTY_VISIBILITY)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public VisibilityEnum getVisibility() {
return visibility;
}
@JsonProperty(JSON_PROPERTY_VISIBILITY)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public void setVisibility(VisibilityEnum visibility) {
this.visibility = visibility;
}
public DominoNucleusProjectModelsNewProject ownerId(String ownerId) {
this.ownerId = ownerId;
return this;
}
/**
* Get ownerId
* @return ownerId
**/
@javax.annotation.Nonnull
@JsonProperty(JSON_PROPERTY_OWNER_ID)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public String getOwnerId() {
return ownerId;
}
@JsonProperty(JSON_PROPERTY_OWNER_ID)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public void setOwnerId(String ownerId) {
this.ownerId = ownerId;
}
public DominoNucleusProjectModelsNewProject repoToCreate(DominoProjectsApiRepositoriesRequestsCreateRepoRequest repoToCreate) {
this.repoToCreate = repoToCreate;
return this;
}
/**
* Get repoToCreate
* @return repoToCreate
**/
@javax.annotation.Nullable
@JsonProperty(JSON_PROPERTY_REPO_TO_CREATE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public DominoProjectsApiRepositoriesRequestsCreateRepoRequest getRepoToCreate() {
return repoToCreate;
}
@JsonProperty(JSON_PROPERTY_REPO_TO_CREATE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setRepoToCreate(DominoProjectsApiRepositoriesRequestsCreateRepoRequest repoToCreate) {
this.repoToCreate = repoToCreate;
}
public DominoNucleusProjectModelsNewProject mainRepository(DominoProjectsApiProjectGitRepositoryTemp mainRepository) {
this.mainRepository = mainRepository;
return this;
}
/**
* Get mainRepository
* @return mainRepository
**/
@javax.annotation.Nullable
@JsonProperty(JSON_PROPERTY_MAIN_REPOSITORY)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public DominoProjectsApiProjectGitRepositoryTemp getMainRepository() {
return mainRepository;
}
@JsonProperty(JSON_PROPERTY_MAIN_REPOSITORY)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setMainRepository(DominoProjectsApiProjectGitRepositoryTemp mainRepository) {
this.mainRepository = mainRepository;
}
public DominoNucleusProjectModelsNewProject collaborators(List collaborators) {
this.collaborators = collaborators;
return this;
}
public DominoNucleusProjectModelsNewProject addCollaboratorsItem(DominoProjectsApiCollaboratorDTO collaboratorsItem) {
if (this.collaborators == null) {
this.collaborators = new ArrayList<>();
}
this.collaborators.add(collaboratorsItem);
return this;
}
/**
* Get collaborators
* @return collaborators
**/
@javax.annotation.Nonnull
@JsonProperty(JSON_PROPERTY_COLLABORATORS)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public List getCollaborators() {
return collaborators;
}
@JsonProperty(JSON_PROPERTY_COLLABORATORS)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public void setCollaborators(List collaborators) {
this.collaborators = collaborators;
}
public DominoNucleusProjectModelsNewProject isRestricted(Boolean isRestricted) {
this.isRestricted = isRestricted;
return this;
}
/**
* Get isRestricted
* @return isRestricted
**/
@javax.annotation.Nullable
@JsonProperty(JSON_PROPERTY_IS_RESTRICTED)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Boolean getIsRestricted() {
return isRestricted;
}
@JsonProperty(JSON_PROPERTY_IS_RESTRICTED)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setIsRestricted(Boolean isRestricted) {
this.isRestricted = isRestricted;
}
public DominoNucleusProjectModelsNewProject tags(DominoProjectsApiNewTagsDTO tags) {
this.tags = tags;
return this;
}
/**
* Get tags
* @return tags
**/
@javax.annotation.Nonnull
@JsonProperty(JSON_PROPERTY_TAGS)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public DominoProjectsApiNewTagsDTO getTags() {
return tags;
}
@JsonProperty(JSON_PROPERTY_TAGS)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public void setTags(DominoProjectsApiNewTagsDTO tags) {
this.tags = tags;
}
/**
* Return true if this domino.nucleus.project.models.NewProject object is equal to o.
*/
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
DominoNucleusProjectModelsNewProject dominoNucleusProjectModelsNewProject = (DominoNucleusProjectModelsNewProject) o;
return Objects.equals(this.name, dominoNucleusProjectModelsNewProject.name) &&
Objects.equals(this.description, dominoNucleusProjectModelsNewProject.description) &&
Objects.equals(this.visibility, dominoNucleusProjectModelsNewProject.visibility) &&
Objects.equals(this.ownerId, dominoNucleusProjectModelsNewProject.ownerId) &&
Objects.equals(this.repoToCreate, dominoNucleusProjectModelsNewProject.repoToCreate) &&
Objects.equals(this.mainRepository, dominoNucleusProjectModelsNewProject.mainRepository) &&
Objects.equals(this.collaborators, dominoNucleusProjectModelsNewProject.collaborators) &&
Objects.equals(this.isRestricted, dominoNucleusProjectModelsNewProject.isRestricted) &&
Objects.equals(this.tags, dominoNucleusProjectModelsNewProject.tags);
}
@Override
public int hashCode() {
return Objects.hash(name, description, visibility, ownerId, repoToCreate, mainRepository, collaborators, isRestricted, tags);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class DominoNucleusProjectModelsNewProject {\n");
sb.append(" name: ").append(toIndentedString(name)).append("\n");
sb.append(" description: ").append(toIndentedString(description)).append("\n");
sb.append(" visibility: ").append(toIndentedString(visibility)).append("\n");
sb.append(" ownerId: ").append(toIndentedString(ownerId)).append("\n");
sb.append(" repoToCreate: ").append(toIndentedString(repoToCreate)).append("\n");
sb.append(" mainRepository: ").append(toIndentedString(mainRepository)).append("\n");
sb.append(" collaborators: ").append(toIndentedString(collaborators)).append("\n");
sb.append(" isRestricted: ").append(toIndentedString(isRestricted)).append("\n");
sb.append(" tags: ").append(toIndentedString(tags)).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 `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 `description` to the URL query string
if (getDescription() != null) {
joiner.add(String.format("%sdescription%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getDescription()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
}
// add `visibility` to the URL query string
if (getVisibility() != null) {
joiner.add(String.format("%svisibility%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getVisibility()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
}
// add `ownerId` to the URL query string
if (getOwnerId() != null) {
joiner.add(String.format("%sownerId%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getOwnerId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
}
// add `repoToCreate` to the URL query string
if (getRepoToCreate() != null) {
joiner.add(getRepoToCreate().toUrlQueryString(prefix + "repoToCreate" + suffix));
}
// add `mainRepository` to the URL query string
if (getMainRepository() != null) {
joiner.add(getMainRepository().toUrlQueryString(prefix + "mainRepository" + suffix));
}
// add `collaborators` to the URL query string
if (getCollaborators() != null) {
for (int i = 0; i < getCollaborators().size(); i++) {
if (getCollaborators().get(i) != null) {
joiner.add(getCollaborators().get(i).toUrlQueryString(String.format("%scollaborators%s%s", prefix, suffix,
"".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix))));
}
}
}
// add `isRestricted` to the URL query string
if (getIsRestricted() != null) {
joiner.add(String.format("%sisRestricted%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getIsRestricted()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
}
// add `tags` to the URL query string
if (getTags() != null) {
joiner.add(getTags().toUrlQueryString(prefix + "tags" + suffix));
}
return joiner.toString();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy