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

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

The newest version!
/*
 * 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.BranchCommit;
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;
/**
 * 获取所有分支
 */
@Schema(description = "获取所有分支")


public class Branch {
  @SerializedName("commit")
  private BranchCommit commit = null;

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

  @SerializedName("protected")
  private Boolean _protected = null;

  @SerializedName("protection_url")
  private String protectionUrl = null;

  public Branch commit(BranchCommit commit) {
    this.commit = commit;
    return this;
  }

   /**
   * Get commit
   * @return commit
  **/
  @Schema(description = "")
  public BranchCommit getCommit() {
    return commit;
  }

  public void setCommit(BranchCommit commit) {
    this.commit = commit;
  }

  public Branch name(String name) {
    this.name = name;
    return this;
  }

   /**
   * Get name
   * @return name
  **/
  @Schema(description = "")
  public String getName() {
    return name;
  }

  public void setName(String name) {
    this.name = name;
  }

  public Branch _protected(Boolean _protected) {
    this._protected = _protected;
    return this;
  }

   /**
   * Get _protected
   * @return _protected
  **/
  @Schema(description = "")
  public Boolean isProtected() {
    return _protected;
  }

  public void setProtected(Boolean _protected) {
    this._protected = _protected;
  }

  public Branch protectionUrl(String protectionUrl) {
    this.protectionUrl = protectionUrl;
    return this;
  }

   /**
   * Get protectionUrl
   * @return protectionUrl
  **/
  @Schema(description = "")
  public String getProtectionUrl() {
    return protectionUrl;
  }

  public void setProtectionUrl(String protectionUrl) {
    this.protectionUrl = protectionUrl;
  }


  @Override
  public boolean equals(java.lang.Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    Branch branch = (Branch) o;
    return Objects.equals(this.commit, branch.commit) &&
        Objects.equals(this.name, branch.name) &&
        Objects.equals(this._protected, branch._protected) &&
        Objects.equals(this.protectionUrl, branch.protectionUrl);
  }

  @Override
  public int hashCode() {
    return Objects.hash(commit, name, _protected, protectionUrl);
  }


  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class Branch {\n");
    
    sb.append("    commit: ").append(toIndentedString(commit)).append("\n");
    sb.append("    name: ").append(toIndentedString(name)).append("\n");
    sb.append("    _protected: ").append(toIndentedString(_protected)).append("\n");
    sb.append("    protectionUrl: ").append(toIndentedString(protectionUrl)).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