All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.gitee.sdk.gitee5j.model.RepoCommitsBody Maven / Gradle / Ivy

/*
 * Gitee Open API
 * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
 *
 * OpenAPI spec version: 5.4.83
 * 
 *
 * 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 com.gitee.sdk.gitee5j.model;

import java.util.Objects;
import java.util.Arrays;
import com.gitee.sdk.gitee5j.model.GitAction;
import com.gitee.sdk.gitee5j.model.GitUserBasic;
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.swagger.v3.oas.annotations.media.Schema;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
/**
 * 提交多个文件变更
 */
@Schema(description = "提交多个文件变更")


public class RepoCommitsBody {
  @SerializedName("actions")
  private List actions = new ArrayList<>();

  @SerializedName("author")
  private GitUserBasic author = null;

  @SerializedName("branch")
  private String branch = null;

  @SerializedName("message")
  private String message = null;

  @SerializedName("start_branch")
  private String startBranch = null;

  public RepoCommitsBody actions(List actions) {
    this.actions = actions;
    return this;
  }

  public RepoCommitsBody addActionsItem(GitAction actionsItem) {
    this.actions.add(actionsItem);
    return this;
  }

   /**
   * Get actions
   * @return actions
  **/
  @Schema(required = true, description = "")
  public List getActions() {
    return actions;
  }

  public void setActions(List actions) {
    this.actions = actions;
  }

  public RepoCommitsBody author(GitUserBasic author) {
    this.author = author;
    return this;
  }

   /**
   * Get author
   * @return author
  **/
  @Schema(description = "")
  public GitUserBasic getAuthor() {
    return author;
  }

  public void setAuthor(GitUserBasic author) {
    this.author = author;
  }

  public RepoCommitsBody branch(String branch) {
    this.branch = branch;
    return this;
  }

   /**
   * 变更的目标分支名。创建新分支时需提供 `start_branch` 参数
   * @return branch
  **/
  @Schema(required = true, description = "变更的目标分支名。创建新分支时需提供 `start_branch` 参数")
  public String getBranch() {
    return branch;
  }

  public void setBranch(String branch) {
    this.branch = branch;
  }

  public RepoCommitsBody message(String message) {
    this.message = message;
    return this;
  }

   /**
   * 提交信息
   * @return message
  **/
  @Schema(required = true, description = "提交信息")
  public String getMessage() {
    return message;
  }

  public void setMessage(String message) {
    this.message = message;
  }

  public RepoCommitsBody startBranch(String startBranch) {
    this.startBranch = startBranch;
    return this;
  }

   /**
   * 分支起地点。新建分支时使用,更新分支时可选
   * @return startBranch
  **/
  @Schema(description = "分支起地点。新建分支时使用,更新分支时可选")
  public String getStartBranch() {
    return startBranch;
  }

  public void setStartBranch(String startBranch) {
    this.startBranch = startBranch;
  }


  @Override
  public boolean equals(java.lang.Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    RepoCommitsBody repoCommitsBody = (RepoCommitsBody) o;
    return Objects.equals(this.actions, repoCommitsBody.actions) &&
        Objects.equals(this.author, repoCommitsBody.author) &&
        Objects.equals(this.branch, repoCommitsBody.branch) &&
        Objects.equals(this.message, repoCommitsBody.message) &&
        Objects.equals(this.startBranch, repoCommitsBody.startBranch);
  }

  @Override
  public int hashCode() {
    return Objects.hash(actions, author, branch, message, startBranch);
  }


  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class RepoCommitsBody {\n");
    
    sb.append("    actions: ").append(toIndentedString(actions)).append("\n");
    sb.append("    author: ").append(toIndentedString(author)).append("\n");
    sb.append("    branch: ").append(toIndentedString(branch)).append("\n");
    sb.append("    message: ").append(toIndentedString(message)).append("\n");
    sb.append("    startBranch: ").append(toIndentedString(startBranch)).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    ");
  }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy