com.dominodatalab.pub.model.NewProjectV1 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.BillingTagV1;
import com.dominodatalab.pub.model.NewProjectGitRepositoryV1;
import com.dominodatalab.pub.model.ProjectTemplateDetailsV1;
import com.dominodatalab.pub.model.ProjectVisibilityV1;
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;
import com.dominodatalab.pub.invoker.ApiClient;
/**
* NewProjectV1
*/
@JsonPropertyOrder({
NewProjectV1.JSON_PROPERTY_BILLING_TAG,
NewProjectV1.JSON_PROPERTY_DESCRIPTION,
NewProjectV1.JSON_PROPERTY_IS_RESTRICTED,
NewProjectV1.JSON_PROPERTY_MAIN_REPOSITORY,
NewProjectV1.JSON_PROPERTY_NAME,
NewProjectV1.JSON_PROPERTY_OWNER_ID,
NewProjectV1.JSON_PROPERTY_TEMPLATE_DETAILS,
NewProjectV1.JSON_PROPERTY_VISIBILITY
})
@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 NewProjectV1 {
public static final String JSON_PROPERTY_BILLING_TAG = "billingTag";
private BillingTagV1 billingTag;
public static final String JSON_PROPERTY_DESCRIPTION = "description";
private String description;
public static final String JSON_PROPERTY_IS_RESTRICTED = "isRestricted";
private Boolean isRestricted;
public static final String JSON_PROPERTY_MAIN_REPOSITORY = "mainRepository";
private NewProjectGitRepositoryV1 mainRepository;
public static final String JSON_PROPERTY_NAME = "name";
private String name;
public static final String JSON_PROPERTY_OWNER_ID = "ownerId";
private String ownerId;
public static final String JSON_PROPERTY_TEMPLATE_DETAILS = "templateDetails";
private ProjectTemplateDetailsV1 templateDetails;
public static final String JSON_PROPERTY_VISIBILITY = "visibility";
private ProjectVisibilityV1 visibility;
public NewProjectV1() {
}
public NewProjectV1 billingTag(BillingTagV1 billingTag) {
this.billingTag = billingTag;
return this;
}
/**
* Get billingTag
* @return billingTag
*/
@javax.annotation.Nullable
@JsonProperty(JSON_PROPERTY_BILLING_TAG)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public BillingTagV1 getBillingTag() {
return billingTag;
}
@JsonProperty(JSON_PROPERTY_BILLING_TAG)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setBillingTag(BillingTagV1 billingTag) {
this.billingTag = billingTag;
}
public NewProjectV1 description(String description) {
this.description = description;
return this;
}
/**
* Project 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 NewProjectV1 isRestricted(Boolean isRestricted) {
this.isRestricted = isRestricted;
return this;
}
/**
* Optional flag for setting a new project as restricted. ProjectClassifier permission required for use.
* @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 NewProjectV1 mainRepository(NewProjectGitRepositoryV1 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 NewProjectGitRepositoryV1 getMainRepository() {
return mainRepository;
}
@JsonProperty(JSON_PROPERTY_MAIN_REPOSITORY)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setMainRepository(NewProjectGitRepositoryV1 mainRepository) {
this.mainRepository = mainRepository;
}
public NewProjectV1 name(String name) {
this.name = name;
return this;
}
/**
* Name of this project. The name must be unique and cannot contain white space.
* @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 NewProjectV1 ownerId(String ownerId) {
this.ownerId = ownerId;
return this;
}
/**
* Optional Id of a user to own this project. Defaults to the calling user if not provided. Does not currently support creating projects owned by Organizations.
* @return ownerId
*/
@javax.annotation.Nullable
@JsonProperty(JSON_PROPERTY_OWNER_ID)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getOwnerId() {
return ownerId;
}
@JsonProperty(JSON_PROPERTY_OWNER_ID)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setOwnerId(String ownerId) {
this.ownerId = ownerId;
}
public NewProjectV1 templateDetails(ProjectTemplateDetailsV1 templateDetails) {
this.templateDetails = templateDetails;
return this;
}
/**
* Get templateDetails
* @return templateDetails
*/
@javax.annotation.Nullable
@JsonProperty(JSON_PROPERTY_TEMPLATE_DETAILS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public ProjectTemplateDetailsV1 getTemplateDetails() {
return templateDetails;
}
@JsonProperty(JSON_PROPERTY_TEMPLATE_DETAILS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setTemplateDetails(ProjectTemplateDetailsV1 templateDetails) {
this.templateDetails = templateDetails;
}
public NewProjectV1 visibility(ProjectVisibilityV1 visibility) {
this.visibility = visibility;
return this;
}
/**
* Get visibility
* @return visibility
*/
@javax.annotation.Nonnull
@JsonProperty(JSON_PROPERTY_VISIBILITY)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public ProjectVisibilityV1 getVisibility() {
return visibility;
}
@JsonProperty(JSON_PROPERTY_VISIBILITY)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public void setVisibility(ProjectVisibilityV1 visibility) {
this.visibility = visibility;
}
/**
* Return true if this NewProjectV1 object is equal to o.
*/
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
NewProjectV1 newProjectV1 = (NewProjectV1) o;
return Objects.equals(this.billingTag, newProjectV1.billingTag) &&
Objects.equals(this.description, newProjectV1.description) &&
Objects.equals(this.isRestricted, newProjectV1.isRestricted) &&
Objects.equals(this.mainRepository, newProjectV1.mainRepository) &&
Objects.equals(this.name, newProjectV1.name) &&
Objects.equals(this.ownerId, newProjectV1.ownerId) &&
Objects.equals(this.templateDetails, newProjectV1.templateDetails) &&
Objects.equals(this.visibility, newProjectV1.visibility);
}
@Override
public int hashCode() {
return Objects.hash(billingTag, description, isRestricted, mainRepository, name, ownerId, templateDetails, visibility);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class NewProjectV1 {\n");
sb.append(" billingTag: ").append(toIndentedString(billingTag)).append("\n");
sb.append(" description: ").append(toIndentedString(description)).append("\n");
sb.append(" isRestricted: ").append(toIndentedString(isRestricted)).append("\n");
sb.append(" mainRepository: ").append(toIndentedString(mainRepository)).append("\n");
sb.append(" name: ").append(toIndentedString(name)).append("\n");
sb.append(" ownerId: ").append(toIndentedString(ownerId)).append("\n");
sb.append(" templateDetails: ").append(toIndentedString(templateDetails)).append("\n");
sb.append(" visibility: ").append(toIndentedString(visibility)).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 `billingTag` to the URL query string
if (getBillingTag() != null) {
joiner.add(getBillingTag().toUrlQueryString(prefix + "billingTag" + suffix));
}
// 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 `isRestricted` to the URL query string
if (getIsRestricted() != null) {
joiner.add(String.format("%sisRestricted%s=%s", prefix, suffix, URLEncoder.encode(ApiClient.valueToString(getIsRestricted()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
}
// add `mainRepository` to the URL query string
if (getMainRepository() != null) {
joiner.add(getMainRepository().toUrlQueryString(prefix + "mainRepository" + suffix));
}
// add `name` to the URL query string
if (getName() != null) {
joiner.add(String.format("%sname%s=%s", prefix, suffix, URLEncoder.encode(ApiClient.valueToString(getName()), 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(ApiClient.valueToString(getOwnerId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
}
// add `templateDetails` to the URL query string
if (getTemplateDetails() != null) {
joiner.add(getTemplateDetails().toUrlQueryString(prefix + "templateDetails" + suffix));
}
// add `visibility` to the URL query string
if (getVisibility() != null) {
joiner.add(String.format("%svisibility%s=%s", prefix, suffix, URLEncoder.encode(ApiClient.valueToString(getVisibility()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
}
return joiner.toString();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy