com.dominodatalab.api.model.DominoProjectsApiRepositoriesRequestsCreateRepoRequest 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 Data Lab API v4
* This API provides access to select Domino functions available in Domino's non-public API. 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.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.api.invoker.ApiClient;
/**
* DominoProjectsApiRepositoriesRequestsCreateRepoRequest
*/
@JsonPropertyOrder({
DominoProjectsApiRepositoriesRequestsCreateRepoRequest.JSON_PROPERTY_CREDENTIAL_ID,
DominoProjectsApiRepositoriesRequestsCreateRepoRequest.JSON_PROPERTY_OWNER,
DominoProjectsApiRepositoriesRequestsCreateRepoRequest.JSON_PROPERTY_REPOSITORY_TEMPLATE_NAME,
DominoProjectsApiRepositoriesRequestsCreateRepoRequest.JSON_PROPERTY_REPOSITORY_TO_CREATE_NAME,
DominoProjectsApiRepositoriesRequestsCreateRepoRequest.JSON_PROPERTY_SERVICE_PROVIDER,
DominoProjectsApiRepositoriesRequestsCreateRepoRequest.JSON_PROPERTY_VISIBILITY
})
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-10-04T16:37:26.309454-04:00[America/New_York]", comments = "Generator version: 7.8.0")
public class DominoProjectsApiRepositoriesRequestsCreateRepoRequest {
public static final String JSON_PROPERTY_CREDENTIAL_ID = "credentialId";
private String credentialId;
public static final String JSON_PROPERTY_OWNER = "owner";
private String owner;
public static final String JSON_PROPERTY_REPOSITORY_TEMPLATE_NAME = "repositoryTemplateName";
private String repositoryTemplateName;
public static final String JSON_PROPERTY_REPOSITORY_TO_CREATE_NAME = "repositoryToCreateName";
private String repositoryToCreateName;
/**
* Gets or Sets serviceProvider
*/
public enum ServiceProviderEnum {
GITHUB("github"),
GITLAB("gitlab"),
GITHUB_ENTERPRISE("githubEnterprise"),
UNKNOWN("unknown"),
GITLAB_ENTERPRISE("gitlabEnterprise"),
BITBUCKET("bitbucket"),
BITBUCKET_SERVER("bitbucketServer");
private String value;
ServiceProviderEnum(String value) {
this.value = value;
}
@JsonValue
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
@JsonCreator
public static ServiceProviderEnum fromValue(String value) {
for (ServiceProviderEnum b : ServiceProviderEnum.values()) {
if (b.value.equals(value)) {
return b;
}
}
throw new IllegalArgumentException("Unexpected value '" + value + "'");
}
}
public static final String JSON_PROPERTY_SERVICE_PROVIDER = "serviceProvider";
private ServiceProviderEnum serviceProvider;
/**
* Gets or Sets visibility
*/
public enum VisibilityEnum {
PUBLIC("Public"),
PRIVATE("Private"),
INTERNAL("Internal");
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 DominoProjectsApiRepositoriesRequestsCreateRepoRequest() {
}
public DominoProjectsApiRepositoriesRequestsCreateRepoRequest credentialId(String credentialId) {
this.credentialId = credentialId;
return this;
}
/**
* Get credentialId
* @return credentialId
*/
@javax.annotation.Nonnull
@JsonProperty(JSON_PROPERTY_CREDENTIAL_ID)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public String getCredentialId() {
return credentialId;
}
@JsonProperty(JSON_PROPERTY_CREDENTIAL_ID)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public void setCredentialId(String credentialId) {
this.credentialId = credentialId;
}
public DominoProjectsApiRepositoriesRequestsCreateRepoRequest owner(String owner) {
this.owner = owner;
return this;
}
/**
* Get owner
* @return owner
*/
@javax.annotation.Nonnull
@JsonProperty(JSON_PROPERTY_OWNER)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public String getOwner() {
return owner;
}
@JsonProperty(JSON_PROPERTY_OWNER)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public void setOwner(String owner) {
this.owner = owner;
}
public DominoProjectsApiRepositoriesRequestsCreateRepoRequest repositoryTemplateName(String repositoryTemplateName) {
this.repositoryTemplateName = repositoryTemplateName;
return this;
}
/**
* Get repositoryTemplateName
* @return repositoryTemplateName
*/
@javax.annotation.Nullable
@JsonProperty(JSON_PROPERTY_REPOSITORY_TEMPLATE_NAME)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getRepositoryTemplateName() {
return repositoryTemplateName;
}
@JsonProperty(JSON_PROPERTY_REPOSITORY_TEMPLATE_NAME)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setRepositoryTemplateName(String repositoryTemplateName) {
this.repositoryTemplateName = repositoryTemplateName;
}
public DominoProjectsApiRepositoriesRequestsCreateRepoRequest repositoryToCreateName(String repositoryToCreateName) {
this.repositoryToCreateName = repositoryToCreateName;
return this;
}
/**
* Get repositoryToCreateName
* @return repositoryToCreateName
*/
@javax.annotation.Nonnull
@JsonProperty(JSON_PROPERTY_REPOSITORY_TO_CREATE_NAME)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public String getRepositoryToCreateName() {
return repositoryToCreateName;
}
@JsonProperty(JSON_PROPERTY_REPOSITORY_TO_CREATE_NAME)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public void setRepositoryToCreateName(String repositoryToCreateName) {
this.repositoryToCreateName = repositoryToCreateName;
}
public DominoProjectsApiRepositoriesRequestsCreateRepoRequest serviceProvider(ServiceProviderEnum serviceProvider) {
this.serviceProvider = serviceProvider;
return this;
}
/**
* Get serviceProvider
* @return serviceProvider
*/
@javax.annotation.Nonnull
@JsonProperty(JSON_PROPERTY_SERVICE_PROVIDER)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public ServiceProviderEnum getServiceProvider() {
return serviceProvider;
}
@JsonProperty(JSON_PROPERTY_SERVICE_PROVIDER)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public void setServiceProvider(ServiceProviderEnum serviceProvider) {
this.serviceProvider = serviceProvider;
}
public DominoProjectsApiRepositoriesRequestsCreateRepoRequest 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;
}
/**
* Return true if this domino.projects.api.repositories.requests.CreateRepoRequest object is equal to o.
*/
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
DominoProjectsApiRepositoriesRequestsCreateRepoRequest dominoProjectsApiRepositoriesRequestsCreateRepoRequest = (DominoProjectsApiRepositoriesRequestsCreateRepoRequest) o;
return Objects.equals(this.credentialId, dominoProjectsApiRepositoriesRequestsCreateRepoRequest.credentialId) &&
Objects.equals(this.owner, dominoProjectsApiRepositoriesRequestsCreateRepoRequest.owner) &&
Objects.equals(this.repositoryTemplateName, dominoProjectsApiRepositoriesRequestsCreateRepoRequest.repositoryTemplateName) &&
Objects.equals(this.repositoryToCreateName, dominoProjectsApiRepositoriesRequestsCreateRepoRequest.repositoryToCreateName) &&
Objects.equals(this.serviceProvider, dominoProjectsApiRepositoriesRequestsCreateRepoRequest.serviceProvider) &&
Objects.equals(this.visibility, dominoProjectsApiRepositoriesRequestsCreateRepoRequest.visibility);
}
@Override
public int hashCode() {
return Objects.hash(credentialId, owner, repositoryTemplateName, repositoryToCreateName, serviceProvider, visibility);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class DominoProjectsApiRepositoriesRequestsCreateRepoRequest {\n");
sb.append(" credentialId: ").append(toIndentedString(credentialId)).append("\n");
sb.append(" owner: ").append(toIndentedString(owner)).append("\n");
sb.append(" repositoryTemplateName: ").append(toIndentedString(repositoryTemplateName)).append("\n");
sb.append(" repositoryToCreateName: ").append(toIndentedString(repositoryToCreateName)).append("\n");
sb.append(" serviceProvider: ").append(toIndentedString(serviceProvider)).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 `credentialId` to the URL query string
if (getCredentialId() != null) {
joiner.add(String.format("%scredentialId%s=%s", prefix, suffix, URLEncoder.encode(ApiClient.valueToString(getCredentialId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
}
// add `owner` to the URL query string
if (getOwner() != null) {
joiner.add(String.format("%sowner%s=%s", prefix, suffix, URLEncoder.encode(ApiClient.valueToString(getOwner()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
}
// add `repositoryTemplateName` to the URL query string
if (getRepositoryTemplateName() != null) {
joiner.add(String.format("%srepositoryTemplateName%s=%s", prefix, suffix, URLEncoder.encode(ApiClient.valueToString(getRepositoryTemplateName()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
}
// add `repositoryToCreateName` to the URL query string
if (getRepositoryToCreateName() != null) {
joiner.add(String.format("%srepositoryToCreateName%s=%s", prefix, suffix, URLEncoder.encode(ApiClient.valueToString(getRepositoryToCreateName()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
}
// add `serviceProvider` to the URL query string
if (getServiceProvider() != null) {
joiner.add(String.format("%sserviceProvider%s=%s", prefix, suffix, URLEncoder.encode(ApiClient.valueToString(getServiceProvider()), 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(ApiClient.valueToString(getVisibility()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
}
return joiner.toString();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy