io.lakefs.clients.api.model.RevertCreation Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of api-client Show documentation
Show all versions of api-client Show documentation
lakeFS OpenAPI Java client legacy SDK
/*
* lakeFS API
* lakeFS HTTP API
*
* The version of the OpenAPI document: 1.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 io.lakefs.clients.api.model;
import java.util.Objects;
import java.util.Arrays;
import com.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import io.lakefs.clients.api.model.CommitOverrides;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.IOException;
/**
* RevertCreation
*/
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class RevertCreation {
public static final String SERIALIZED_NAME_REF = "ref";
@SerializedName(SERIALIZED_NAME_REF)
private String ref;
public static final String SERIALIZED_NAME_COMMIT_OVERRIDES = "commit_overrides";
@SerializedName(SERIALIZED_NAME_COMMIT_OVERRIDES)
private CommitOverrides commitOverrides;
public static final String SERIALIZED_NAME_PARENT_NUMBER = "parent_number";
@SerializedName(SERIALIZED_NAME_PARENT_NUMBER)
private Integer parentNumber;
public static final String SERIALIZED_NAME_FORCE = "force";
@SerializedName(SERIALIZED_NAME_FORCE)
private Boolean force = false;
public static final String SERIALIZED_NAME_ALLOW_EMPTY = "allow_empty";
@SerializedName(SERIALIZED_NAME_ALLOW_EMPTY)
private Boolean allowEmpty = false;
public RevertCreation ref(String ref) {
this.ref = ref;
return this;
}
/**
* the commit to revert, given by a ref
* @return ref
**/
@javax.annotation.Nonnull
@ApiModelProperty(required = true, value = "the commit to revert, given by a ref")
public String getRef() {
return ref;
}
public void setRef(String ref) {
this.ref = ref;
}
public RevertCreation commitOverrides(CommitOverrides commitOverrides) {
this.commitOverrides = commitOverrides;
return this;
}
/**
* Get commitOverrides
* @return commitOverrides
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
public CommitOverrides getCommitOverrides() {
return commitOverrides;
}
public void setCommitOverrides(CommitOverrides commitOverrides) {
this.commitOverrides = commitOverrides;
}
public RevertCreation parentNumber(Integer parentNumber) {
this.parentNumber = parentNumber;
return this;
}
/**
* when reverting a merge commit, the parent number (starting from 1) relative to which to perform the revert.
* @return parentNumber
**/
@javax.annotation.Nonnull
@ApiModelProperty(required = true, value = "when reverting a merge commit, the parent number (starting from 1) relative to which to perform the revert.")
public Integer getParentNumber() {
return parentNumber;
}
public void setParentNumber(Integer parentNumber) {
this.parentNumber = parentNumber;
}
public RevertCreation force(Boolean force) {
this.force = force;
return this;
}
/**
* Get force
* @return force
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
public Boolean getForce() {
return force;
}
public void setForce(Boolean force) {
this.force = force;
}
public RevertCreation allowEmpty(Boolean allowEmpty) {
this.allowEmpty = allowEmpty;
return this;
}
/**
* allow empty commit (revert without changes)
* @return allowEmpty
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "allow empty commit (revert without changes)")
public Boolean getAllowEmpty() {
return allowEmpty;
}
public void setAllowEmpty(Boolean allowEmpty) {
this.allowEmpty = allowEmpty;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
RevertCreation revertCreation = (RevertCreation) o;
return Objects.equals(this.ref, revertCreation.ref) &&
Objects.equals(this.commitOverrides, revertCreation.commitOverrides) &&
Objects.equals(this.parentNumber, revertCreation.parentNumber) &&
Objects.equals(this.force, revertCreation.force) &&
Objects.equals(this.allowEmpty, revertCreation.allowEmpty);
}
@Override
public int hashCode() {
return Objects.hash(ref, commitOverrides, parentNumber, force, allowEmpty);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class RevertCreation {\n");
sb.append(" ref: ").append(toIndentedString(ref)).append("\n");
sb.append(" commitOverrides: ").append(toIndentedString(commitOverrides)).append("\n");
sb.append(" parentNumber: ").append(toIndentedString(parentNumber)).append("\n");
sb.append(" force: ").append(toIndentedString(force)).append("\n");
sb.append(" allowEmpty: ").append(toIndentedString(allowEmpty)).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 ");
}
}