267 lines
7.3 KiB
Java
267 lines
7.3 KiB
Java
/*
|
|
* Gitea API
|
|
* This documentation describes the Gitea API.
|
|
*
|
|
* OpenAPI spec version: 1.21.1
|
|
*
|
|
*
|
|
* NOTE: This class is auto generated by the swagger code generator program.
|
|
* https://github.com/swagger-api/swagger-codegen.git
|
|
* Do not edit the class manually.
|
|
*/
|
|
|
|
|
|
package io.gitea.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.gitea.model.ChangeFileOperation;
|
|
import io.gitea.model.CommitDateOptions;
|
|
import io.gitea.model.Identity;
|
|
import io.swagger.annotations.ApiModel;
|
|
import io.swagger.annotations.ApiModelProperty;
|
|
import java.io.IOException;
|
|
import java.util.ArrayList;
|
|
import java.util.List;
|
|
|
|
/**
|
|
* ChangeFilesOptions options for creating, updating or deleting multiple files Note: `author` and `committer` are optional (if only one is given, it will be used for the other, otherwise the authenticated user will be used)
|
|
*/
|
|
@ApiModel(description = "ChangeFilesOptions options for creating, updating or deleting multiple files Note: `author` and `committer` are optional (if only one is given, it will be used for the other, otherwise the authenticated user will be used)")
|
|
|
|
public class ChangeFilesOptions {
|
|
@SerializedName("author")
|
|
private Identity author = null;
|
|
|
|
@SerializedName("branch")
|
|
private String branch = null;
|
|
|
|
@SerializedName("committer")
|
|
private Identity committer = null;
|
|
|
|
@SerializedName("dates")
|
|
private CommitDateOptions dates = null;
|
|
|
|
@SerializedName("files")
|
|
private List<ChangeFileOperation> files = new ArrayList<ChangeFileOperation>();
|
|
|
|
@SerializedName("message")
|
|
private String message = null;
|
|
|
|
@SerializedName("new_branch")
|
|
private String newBranch = null;
|
|
|
|
@SerializedName("signoff")
|
|
private Boolean signoff = null;
|
|
|
|
public ChangeFilesOptions author(Identity author) {
|
|
this.author = author;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Get author
|
|
* @return author
|
|
**/
|
|
@ApiModelProperty(value = "")
|
|
public Identity getAuthor() {
|
|
return author;
|
|
}
|
|
|
|
public void setAuthor(Identity author) {
|
|
this.author = author;
|
|
}
|
|
|
|
public ChangeFilesOptions branch(String branch) {
|
|
this.branch = branch;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* branch (optional) to base this file from. if not given, the default branch is used
|
|
* @return branch
|
|
**/
|
|
@ApiModelProperty(value = "branch (optional) to base this file from. if not given, the default branch is used")
|
|
public String getBranch() {
|
|
return branch;
|
|
}
|
|
|
|
public void setBranch(String branch) {
|
|
this.branch = branch;
|
|
}
|
|
|
|
public ChangeFilesOptions committer(Identity committer) {
|
|
this.committer = committer;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Get committer
|
|
* @return committer
|
|
**/
|
|
@ApiModelProperty(value = "")
|
|
public Identity getCommitter() {
|
|
return committer;
|
|
}
|
|
|
|
public void setCommitter(Identity committer) {
|
|
this.committer = committer;
|
|
}
|
|
|
|
public ChangeFilesOptions dates(CommitDateOptions dates) {
|
|
this.dates = dates;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Get dates
|
|
* @return dates
|
|
**/
|
|
@ApiModelProperty(value = "")
|
|
public CommitDateOptions getDates() {
|
|
return dates;
|
|
}
|
|
|
|
public void setDates(CommitDateOptions dates) {
|
|
this.dates = dates;
|
|
}
|
|
|
|
public ChangeFilesOptions files(List<ChangeFileOperation> files) {
|
|
this.files = files;
|
|
return this;
|
|
}
|
|
|
|
public ChangeFilesOptions addFilesItem(ChangeFileOperation filesItem) {
|
|
this.files.add(filesItem);
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* list of file operations
|
|
* @return files
|
|
**/
|
|
@ApiModelProperty(required = true, value = "list of file operations")
|
|
public List<ChangeFileOperation> getFiles() {
|
|
return files;
|
|
}
|
|
|
|
public void setFiles(List<ChangeFileOperation> files) {
|
|
this.files = files;
|
|
}
|
|
|
|
public ChangeFilesOptions message(String message) {
|
|
this.message = message;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* message (optional) for the commit of this file. if not supplied, a default message will be used
|
|
* @return message
|
|
**/
|
|
@ApiModelProperty(value = "message (optional) for the commit of this file. if not supplied, a default message will be used")
|
|
public String getMessage() {
|
|
return message;
|
|
}
|
|
|
|
public void setMessage(String message) {
|
|
this.message = message;
|
|
}
|
|
|
|
public ChangeFilesOptions newBranch(String newBranch) {
|
|
this.newBranch = newBranch;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* new_branch (optional) will make a new branch from `branch` before creating the file
|
|
* @return newBranch
|
|
**/
|
|
@ApiModelProperty(value = "new_branch (optional) will make a new branch from `branch` before creating the file")
|
|
public String getNewBranch() {
|
|
return newBranch;
|
|
}
|
|
|
|
public void setNewBranch(String newBranch) {
|
|
this.newBranch = newBranch;
|
|
}
|
|
|
|
public ChangeFilesOptions signoff(Boolean signoff) {
|
|
this.signoff = signoff;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Add a Signed-off-by trailer by the committer at the end of the commit log message.
|
|
* @return signoff
|
|
**/
|
|
@ApiModelProperty(value = "Add a Signed-off-by trailer by the committer at the end of the commit log message.")
|
|
public Boolean isSignoff() {
|
|
return signoff;
|
|
}
|
|
|
|
public void setSignoff(Boolean signoff) {
|
|
this.signoff = signoff;
|
|
}
|
|
|
|
|
|
@Override
|
|
public boolean equals(java.lang.Object o) {
|
|
if (this == o) {
|
|
return true;
|
|
}
|
|
if (o == null || getClass() != o.getClass()) {
|
|
return false;
|
|
}
|
|
ChangeFilesOptions changeFilesOptions = (ChangeFilesOptions) o;
|
|
return Objects.equals(this.author, changeFilesOptions.author) &&
|
|
Objects.equals(this.branch, changeFilesOptions.branch) &&
|
|
Objects.equals(this.committer, changeFilesOptions.committer) &&
|
|
Objects.equals(this.dates, changeFilesOptions.dates) &&
|
|
Objects.equals(this.files, changeFilesOptions.files) &&
|
|
Objects.equals(this.message, changeFilesOptions.message) &&
|
|
Objects.equals(this.newBranch, changeFilesOptions.newBranch) &&
|
|
Objects.equals(this.signoff, changeFilesOptions.signoff);
|
|
}
|
|
|
|
@Override
|
|
public int hashCode() {
|
|
return Objects.hash(author, branch, committer, dates, files, message, newBranch, signoff);
|
|
}
|
|
|
|
|
|
@Override
|
|
public String toString() {
|
|
StringBuilder sb = new StringBuilder();
|
|
sb.append("class ChangeFilesOptions {\n");
|
|
|
|
sb.append(" author: ").append(toIndentedString(author)).append("\n");
|
|
sb.append(" branch: ").append(toIndentedString(branch)).append("\n");
|
|
sb.append(" committer: ").append(toIndentedString(committer)).append("\n");
|
|
sb.append(" dates: ").append(toIndentedString(dates)).append("\n");
|
|
sb.append(" files: ").append(toIndentedString(files)).append("\n");
|
|
sb.append(" message: ").append(toIndentedString(message)).append("\n");
|
|
sb.append(" newBranch: ").append(toIndentedString(newBranch)).append("\n");
|
|
sb.append(" signoff: ").append(toIndentedString(signoff)).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(java.lang.Object o) {
|
|
if (o == null) {
|
|
return "null";
|
|
}
|
|
return o.toString().replace("\n", "\n ");
|
|
}
|
|
|
|
}
|
|
|