mirror of
https://codeberg.org/gitnex/tea4j-autodeploy
synced 2026-06-05 09:22:19 +00:00
Synchronizing API and documentation updates
This commit is contained in:
@@ -54,6 +54,7 @@ import org.gitnex.tea4j.v2.models.PullReviewComment;
|
||||
import org.gitnex.tea4j.v2.models.PullReviewRequestOptions;
|
||||
import org.gitnex.tea4j.v2.models.Reference;
|
||||
import org.gitnex.tea4j.v2.models.Release;
|
||||
import org.gitnex.tea4j.v2.models.RepoCollaboratorPermission;
|
||||
import org.gitnex.tea4j.v2.models.RepoTopicOptions;
|
||||
import org.gitnex.tea4j.v2.models.Repository;
|
||||
import org.gitnex.tea4j.v2.models.SearchResults;
|
||||
@@ -1298,6 +1299,20 @@ public interface RepositoryApi {
|
||||
@retrofit2.http.Path("repo") String repo,
|
||||
@retrofit2.http.Path("tag") String tag);
|
||||
|
||||
/**
|
||||
* Get repository permissions for a user
|
||||
*
|
||||
* @param owner owner of the repo (required)
|
||||
* @param repo name of the repo (required)
|
||||
* @param collaborator username of the collaborator (required)
|
||||
* @return Call<RepoCollaboratorPermission>
|
||||
*/
|
||||
@GET("repos/{owner}/{repo}/collaborators/{collaborator}/permission")
|
||||
Call<RepoCollaboratorPermission> repoGetRepoPermissions(
|
||||
@retrofit2.http.Path("owner") String owner,
|
||||
@retrofit2.http.Path("repo") String repo,
|
||||
@retrofit2.http.Path("collaborator") String collaborator);
|
||||
|
||||
/**
|
||||
* Return all users that can be requested to review in this repo
|
||||
*
|
||||
|
||||
@@ -37,6 +37,9 @@ public class CreateUserOption implements Serializable {
|
||||
@SerializedName("password")
|
||||
private String password = null;
|
||||
|
||||
@SerializedName("restricted")
|
||||
private Boolean restricted = null;
|
||||
|
||||
@SerializedName("send_notify")
|
||||
private Boolean sendNotify = null;
|
||||
|
||||
@@ -144,6 +147,25 @@ public class CreateUserOption implements Serializable {
|
||||
this.password = password;
|
||||
}
|
||||
|
||||
public CreateUserOption restricted(Boolean restricted) {
|
||||
this.restricted = restricted;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get restricted
|
||||
*
|
||||
* @return restricted
|
||||
*/
|
||||
@Schema(description = "")
|
||||
public Boolean isRestricted() {
|
||||
return restricted;
|
||||
}
|
||||
|
||||
public void setRestricted(Boolean restricted) {
|
||||
this.restricted = restricted;
|
||||
}
|
||||
|
||||
public CreateUserOption sendNotify(Boolean sendNotify) {
|
||||
this.sendNotify = sendNotify;
|
||||
return this;
|
||||
@@ -234,6 +256,7 @@ public class CreateUserOption implements Serializable {
|
||||
&& Objects.equals(this.loginName, createUserOption.loginName)
|
||||
&& Objects.equals(this.mustChangePassword, createUserOption.mustChangePassword)
|
||||
&& Objects.equals(this.password, createUserOption.password)
|
||||
&& Objects.equals(this.restricted, createUserOption.restricted)
|
||||
&& Objects.equals(this.sendNotify, createUserOption.sendNotify)
|
||||
&& Objects.equals(this.sourceId, createUserOption.sourceId)
|
||||
&& Objects.equals(this.username, createUserOption.username)
|
||||
@@ -248,6 +271,7 @@ public class CreateUserOption implements Serializable {
|
||||
loginName,
|
||||
mustChangePassword,
|
||||
password,
|
||||
restricted,
|
||||
sendNotify,
|
||||
sourceId,
|
||||
username,
|
||||
@@ -264,6 +288,7 @@ public class CreateUserOption implements Serializable {
|
||||
sb.append(" loginName: ").append(toIndentedString(loginName)).append("\n");
|
||||
sb.append(" mustChangePassword: ").append(toIndentedString(mustChangePassword)).append("\n");
|
||||
sb.append(" password: ").append(toIndentedString(password)).append("\n");
|
||||
sb.append(" restricted: ").append(toIndentedString(restricted)).append("\n");
|
||||
sb.append(" sendNotify: ").append(toIndentedString(sendNotify)).append("\n");
|
||||
sb.append(" sourceId: ").append(toIndentedString(sourceId)).append("\n");
|
||||
sb.append(" username: ").append(toIndentedString(username)).append("\n");
|
||||
|
||||
@@ -0,0 +1,131 @@
|
||||
/*
|
||||
* Gitea API.
|
||||
* This documentation describes the Gitea API.
|
||||
*
|
||||
* OpenAPI spec version: {{AppVer | JSEscape | Safe}}
|
||||
*
|
||||
*
|
||||
* 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 org.gitnex.tea4j.v2.models;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import java.io.Serializable;
|
||||
import java.util.Objects;
|
||||
|
||||
/** RepoCollaboratorPermission to get repository permission for a collaborator */
|
||||
@Schema(description = "RepoCollaboratorPermission to get repository permission for a collaborator")
|
||||
public class RepoCollaboratorPermission implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@SerializedName("permission")
|
||||
private String permission = null;
|
||||
|
||||
@SerializedName("role_name")
|
||||
private String roleName = null;
|
||||
|
||||
@SerializedName("user")
|
||||
private User user = null;
|
||||
|
||||
public RepoCollaboratorPermission permission(String permission) {
|
||||
this.permission = permission;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get permission
|
||||
*
|
||||
* @return permission
|
||||
*/
|
||||
@Schema(description = "")
|
||||
public String getPermission() {
|
||||
return permission;
|
||||
}
|
||||
|
||||
public void setPermission(String permission) {
|
||||
this.permission = permission;
|
||||
}
|
||||
|
||||
public RepoCollaboratorPermission roleName(String roleName) {
|
||||
this.roleName = roleName;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get roleName
|
||||
*
|
||||
* @return roleName
|
||||
*/
|
||||
@Schema(description = "")
|
||||
public String getRoleName() {
|
||||
return roleName;
|
||||
}
|
||||
|
||||
public void setRoleName(String roleName) {
|
||||
this.roleName = roleName;
|
||||
}
|
||||
|
||||
public RepoCollaboratorPermission user(User user) {
|
||||
this.user = user;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get user
|
||||
*
|
||||
* @return user
|
||||
*/
|
||||
@Schema(description = "")
|
||||
public User getUser() {
|
||||
return user;
|
||||
}
|
||||
|
||||
public void setUser(User user) {
|
||||
this.user = user;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
RepoCollaboratorPermission repoCollaboratorPermission = (RepoCollaboratorPermission) o;
|
||||
return Objects.equals(this.permission, repoCollaboratorPermission.permission)
|
||||
&& Objects.equals(this.roleName, repoCollaboratorPermission.roleName)
|
||||
&& Objects.equals(this.user, repoCollaboratorPermission.user);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(permission, roleName, user);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("class RepoCollaboratorPermission {\n");
|
||||
|
||||
sb.append(" permission: ").append(toIndentedString(permission)).append("\n");
|
||||
sb.append(" roleName: ").append(toIndentedString(roleName)).append("\n");
|
||||
sb.append(" user: ").append(toIndentedString(user)).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 ");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user