com.dominodatalab.pub.model.ModelApiVersionCreationRequest 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.ModelApiSource;
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;
/**
* ModelApiVersionCreationRequest
*/
@JsonPropertyOrder({
ModelApiVersionCreationRequest.JSON_PROPERTY_COMMIT_ID,
ModelApiVersionCreationRequest.JSON_PROPERTY_DESCRIPTION,
ModelApiVersionCreationRequest.JSON_PROPERTY_ENVIRONMENT_ID,
ModelApiVersionCreationRequest.JSON_PROPERTY_LOG_HTTP_REQUEST_RESPONSE,
ModelApiVersionCreationRequest.JSON_PROPERTY_MONITORING_ENABLED,
ModelApiVersionCreationRequest.JSON_PROPERTY_PREDICTION_DATASET_RESOURCE_ID,
ModelApiVersionCreationRequest.JSON_PROPERTY_PROJECT_ID,
ModelApiVersionCreationRequest.JSON_PROPERTY_PROVENANCE_CHECKPOINT_ID,
ModelApiVersionCreationRequest.JSON_PROPERTY_RECORD_INVOCATION,
ModelApiVersionCreationRequest.JSON_PROPERTY_SHOULD_DEPLOY,
ModelApiVersionCreationRequest.JSON_PROPERTY_SOURCE
})
@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 ModelApiVersionCreationRequest {
public static final String JSON_PROPERTY_COMMIT_ID = "commitId";
private String commitId;
public static final String JSON_PROPERTY_DESCRIPTION = "description";
private String description;
public static final String JSON_PROPERTY_ENVIRONMENT_ID = "environmentId";
private String environmentId;
public static final String JSON_PROPERTY_LOG_HTTP_REQUEST_RESPONSE = "logHttpRequestResponse";
private Boolean logHttpRequestResponse;
public static final String JSON_PROPERTY_MONITORING_ENABLED = "monitoringEnabled";
private Boolean monitoringEnabled;
public static final String JSON_PROPERTY_PREDICTION_DATASET_RESOURCE_ID = "predictionDatasetResourceId";
private String predictionDatasetResourceId;
public static final String JSON_PROPERTY_PROJECT_ID = "projectId";
private String projectId;
public static final String JSON_PROPERTY_PROVENANCE_CHECKPOINT_ID = "provenanceCheckpointId";
private String provenanceCheckpointId;
public static final String JSON_PROPERTY_RECORD_INVOCATION = "recordInvocation";
private Boolean recordInvocation;
public static final String JSON_PROPERTY_SHOULD_DEPLOY = "shouldDeploy";
private Boolean shouldDeploy;
public static final String JSON_PROPERTY_SOURCE = "source";
private ModelApiSource source;
public ModelApiVersionCreationRequest() {
}
public ModelApiVersionCreationRequest commitId(String commitId) {
this.commitId = commitId;
return this;
}
/**
* The id of the commit id of the Model API Version to create.
* @return commitId
*/
@javax.annotation.Nullable
@JsonProperty(JSON_PROPERTY_COMMIT_ID)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getCommitId() {
return commitId;
}
@JsonProperty(JSON_PROPERTY_COMMIT_ID)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setCommitId(String commitId) {
this.commitId = commitId;
}
public ModelApiVersionCreationRequest description(String description) {
this.description = description;
return this;
}
/**
* The description for the Model API Version to create.
* @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 ModelApiVersionCreationRequest environmentId(String environmentId) {
this.environmentId = environmentId;
return this;
}
/**
* The id of the environment to deploy the Model API Version with.
* @return environmentId
*/
@javax.annotation.Nullable
@JsonProperty(JSON_PROPERTY_ENVIRONMENT_ID)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getEnvironmentId() {
return environmentId;
}
@JsonProperty(JSON_PROPERTY_ENVIRONMENT_ID)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setEnvironmentId(String environmentId) {
this.environmentId = environmentId;
}
public ModelApiVersionCreationRequest logHttpRequestResponse(Boolean logHttpRequestResponse) {
this.logHttpRequestResponse = logHttpRequestResponse;
return this;
}
/**
* Whether the Model API Version to create should log HTTP requests and responses.
* @return logHttpRequestResponse
*/
@javax.annotation.Nonnull
@JsonProperty(JSON_PROPERTY_LOG_HTTP_REQUEST_RESPONSE)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public Boolean getLogHttpRequestResponse() {
return logHttpRequestResponse;
}
@JsonProperty(JSON_PROPERTY_LOG_HTTP_REQUEST_RESPONSE)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public void setLogHttpRequestResponse(Boolean logHttpRequestResponse) {
this.logHttpRequestResponse = logHttpRequestResponse;
}
public ModelApiVersionCreationRequest monitoringEnabled(Boolean monitoringEnabled) {
this.monitoringEnabled = monitoringEnabled;
return this;
}
/**
* Whether the Model API Version to create should have monitoring enabled.
* @return monitoringEnabled
*/
@javax.annotation.Nonnull
@JsonProperty(JSON_PROPERTY_MONITORING_ENABLED)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public Boolean getMonitoringEnabled() {
return monitoringEnabled;
}
@JsonProperty(JSON_PROPERTY_MONITORING_ENABLED)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public void setMonitoringEnabled(Boolean monitoringEnabled) {
this.monitoringEnabled = monitoringEnabled;
}
public ModelApiVersionCreationRequest predictionDatasetResourceId(String predictionDatasetResourceId) {
this.predictionDatasetResourceId = predictionDatasetResourceId;
return this;
}
/**
* The id of the prediction dataset to be used by the Model API Version to create.
* @return predictionDatasetResourceId
*/
@javax.annotation.Nullable
@JsonProperty(JSON_PROPERTY_PREDICTION_DATASET_RESOURCE_ID)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getPredictionDatasetResourceId() {
return predictionDatasetResourceId;
}
@JsonProperty(JSON_PROPERTY_PREDICTION_DATASET_RESOURCE_ID)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setPredictionDatasetResourceId(String predictionDatasetResourceId) {
this.predictionDatasetResourceId = predictionDatasetResourceId;
}
public ModelApiVersionCreationRequest projectId(String projectId) {
this.projectId = projectId;
return this;
}
/**
* The id of the project the Model API Version to create should belong to.
* @return projectId
*/
@javax.annotation.Nonnull
@JsonProperty(JSON_PROPERTY_PROJECT_ID)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public String getProjectId() {
return projectId;
}
@JsonProperty(JSON_PROPERTY_PROJECT_ID)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public void setProjectId(String projectId) {
this.projectId = projectId;
}
public ModelApiVersionCreationRequest provenanceCheckpointId(String provenanceCheckpointId) {
this.provenanceCheckpointId = provenanceCheckpointId;
return this;
}
/**
* The id of the provenance checkpoint of the Model API Version to create.
* @return provenanceCheckpointId
*/
@javax.annotation.Nullable
@JsonProperty(JSON_PROPERTY_PROVENANCE_CHECKPOINT_ID)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getProvenanceCheckpointId() {
return provenanceCheckpointId;
}
@JsonProperty(JSON_PROPERTY_PROVENANCE_CHECKPOINT_ID)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setProvenanceCheckpointId(String provenanceCheckpointId) {
this.provenanceCheckpointId = provenanceCheckpointId;
}
public ModelApiVersionCreationRequest recordInvocation(Boolean recordInvocation) {
this.recordInvocation = recordInvocation;
return this;
}
/**
* Whether the Model API Version to create should record invocations.
* @return recordInvocation
*/
@javax.annotation.Nullable
@JsonProperty(JSON_PROPERTY_RECORD_INVOCATION)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Boolean getRecordInvocation() {
return recordInvocation;
}
@JsonProperty(JSON_PROPERTY_RECORD_INVOCATION)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setRecordInvocation(Boolean recordInvocation) {
this.recordInvocation = recordInvocation;
}
public ModelApiVersionCreationRequest shouldDeploy(Boolean shouldDeploy) {
this.shouldDeploy = shouldDeploy;
return this;
}
/**
* Whether the Model API Version to create should be deployed.
* @return shouldDeploy
*/
@javax.annotation.Nullable
@JsonProperty(JSON_PROPERTY_SHOULD_DEPLOY)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Boolean getShouldDeploy() {
return shouldDeploy;
}
@JsonProperty(JSON_PROPERTY_SHOULD_DEPLOY)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setShouldDeploy(Boolean shouldDeploy) {
this.shouldDeploy = shouldDeploy;
}
public ModelApiVersionCreationRequest source(ModelApiSource source) {
this.source = source;
return this;
}
/**
* Get source
* @return source
*/
@javax.annotation.Nonnull
@JsonProperty(JSON_PROPERTY_SOURCE)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public ModelApiSource getSource() {
return source;
}
@JsonProperty(JSON_PROPERTY_SOURCE)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public void setSource(ModelApiSource source) {
this.source = source;
}
/**
* Return true if this ModelApiVersionCreationRequest object is equal to o.
*/
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
ModelApiVersionCreationRequest modelApiVersionCreationRequest = (ModelApiVersionCreationRequest) o;
return Objects.equals(this.commitId, modelApiVersionCreationRequest.commitId) &&
Objects.equals(this.description, modelApiVersionCreationRequest.description) &&
Objects.equals(this.environmentId, modelApiVersionCreationRequest.environmentId) &&
Objects.equals(this.logHttpRequestResponse, modelApiVersionCreationRequest.logHttpRequestResponse) &&
Objects.equals(this.monitoringEnabled, modelApiVersionCreationRequest.monitoringEnabled) &&
Objects.equals(this.predictionDatasetResourceId, modelApiVersionCreationRequest.predictionDatasetResourceId) &&
Objects.equals(this.projectId, modelApiVersionCreationRequest.projectId) &&
Objects.equals(this.provenanceCheckpointId, modelApiVersionCreationRequest.provenanceCheckpointId) &&
Objects.equals(this.recordInvocation, modelApiVersionCreationRequest.recordInvocation) &&
Objects.equals(this.shouldDeploy, modelApiVersionCreationRequest.shouldDeploy) &&
Objects.equals(this.source, modelApiVersionCreationRequest.source);
}
@Override
public int hashCode() {
return Objects.hash(commitId, description, environmentId, logHttpRequestResponse, monitoringEnabled, predictionDatasetResourceId, projectId, provenanceCheckpointId, recordInvocation, shouldDeploy, source);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class ModelApiVersionCreationRequest {\n");
sb.append(" commitId: ").append(toIndentedString(commitId)).append("\n");
sb.append(" description: ").append(toIndentedString(description)).append("\n");
sb.append(" environmentId: ").append(toIndentedString(environmentId)).append("\n");
sb.append(" logHttpRequestResponse: ").append(toIndentedString(logHttpRequestResponse)).append("\n");
sb.append(" monitoringEnabled: ").append(toIndentedString(monitoringEnabled)).append("\n");
sb.append(" predictionDatasetResourceId: ").append(toIndentedString(predictionDatasetResourceId)).append("\n");
sb.append(" projectId: ").append(toIndentedString(projectId)).append("\n");
sb.append(" provenanceCheckpointId: ").append(toIndentedString(provenanceCheckpointId)).append("\n");
sb.append(" recordInvocation: ").append(toIndentedString(recordInvocation)).append("\n");
sb.append(" shouldDeploy: ").append(toIndentedString(shouldDeploy)).append("\n");
sb.append(" source: ").append(toIndentedString(source)).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 `commitId` to the URL query string
if (getCommitId() != null) {
joiner.add(String.format("%scommitId%s=%s", prefix, suffix, URLEncoder.encode(ApiClient.valueToString(getCommitId()), 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 `environmentId` to the URL query string
if (getEnvironmentId() != null) {
joiner.add(String.format("%senvironmentId%s=%s", prefix, suffix, URLEncoder.encode(ApiClient.valueToString(getEnvironmentId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
}
// add `logHttpRequestResponse` to the URL query string
if (getLogHttpRequestResponse() != null) {
joiner.add(String.format("%slogHttpRequestResponse%s=%s", prefix, suffix, URLEncoder.encode(ApiClient.valueToString(getLogHttpRequestResponse()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
}
// add `monitoringEnabled` to the URL query string
if (getMonitoringEnabled() != null) {
joiner.add(String.format("%smonitoringEnabled%s=%s", prefix, suffix, URLEncoder.encode(ApiClient.valueToString(getMonitoringEnabled()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
}
// add `predictionDatasetResourceId` to the URL query string
if (getPredictionDatasetResourceId() != null) {
joiner.add(String.format("%spredictionDatasetResourceId%s=%s", prefix, suffix, URLEncoder.encode(ApiClient.valueToString(getPredictionDatasetResourceId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
}
// add `projectId` to the URL query string
if (getProjectId() != null) {
joiner.add(String.format("%sprojectId%s=%s", prefix, suffix, URLEncoder.encode(ApiClient.valueToString(getProjectId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
}
// add `provenanceCheckpointId` to the URL query string
if (getProvenanceCheckpointId() != null) {
joiner.add(String.format("%sprovenanceCheckpointId%s=%s", prefix, suffix, URLEncoder.encode(ApiClient.valueToString(getProvenanceCheckpointId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
}
// add `recordInvocation` to the URL query string
if (getRecordInvocation() != null) {
joiner.add(String.format("%srecordInvocation%s=%s", prefix, suffix, URLEncoder.encode(ApiClient.valueToString(getRecordInvocation()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
}
// add `shouldDeploy` to the URL query string
if (getShouldDeploy() != null) {
joiner.add(String.format("%sshouldDeploy%s=%s", prefix, suffix, URLEncoder.encode(ApiClient.valueToString(getShouldDeploy()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
}
// add `source` to the URL query string
if (getSource() != null) {
joiner.add(getSource().toUrlQueryString(prefix + "source" + suffix));
}
return joiner.toString();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy