mirror of
https://codeberg.org/gitnex/tea4j-autodeploy
synced 2026-05-31 07:01:55 +00:00
Synchronizing API and documentation updates
This commit is contained in:
@@ -5,5 +5,6 @@ Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**id** | **Long** | | [optional]
|
||||
**name** | **String** | | [optional]
|
||||
**scopes** | **List<String>** | | [optional]
|
||||
**sha1** | **String** | | [optional]
|
||||
**tokenLastEight** | **String** | | [optional]
|
||||
|
||||
@@ -3,4 +3,5 @@
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**name** | **String** | | [optional]
|
||||
**name** | **String** | |
|
||||
**scopes** | **List<String>** | | [optional]
|
||||
|
||||
@@ -15,6 +15,8 @@ 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.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
/** AccessToken */
|
||||
@@ -27,6 +29,9 @@ public class AccessToken implements Serializable {
|
||||
@SerializedName("name")
|
||||
private String name = null;
|
||||
|
||||
@SerializedName("scopes")
|
||||
private List<String> scopes = null;
|
||||
|
||||
@SerializedName("sha1")
|
||||
private String sha1 = null;
|
||||
|
||||
@@ -71,6 +76,33 @@ public class AccessToken implements Serializable {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public AccessToken scopes(List<String> scopes) {
|
||||
this.scopes = scopes;
|
||||
return this;
|
||||
}
|
||||
|
||||
public AccessToken addScopesItem(String scopesItem) {
|
||||
if (this.scopes == null) {
|
||||
this.scopes = new ArrayList<>();
|
||||
}
|
||||
this.scopes.add(scopesItem);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get scopes
|
||||
*
|
||||
* @return scopes
|
||||
*/
|
||||
@Schema(description = "")
|
||||
public List<String> getScopes() {
|
||||
return scopes;
|
||||
}
|
||||
|
||||
public void setScopes(List<String> scopes) {
|
||||
this.scopes = scopes;
|
||||
}
|
||||
|
||||
public AccessToken sha1(String sha1) {
|
||||
this.sha1 = sha1;
|
||||
return this;
|
||||
@@ -120,13 +152,14 @@ public class AccessToken implements Serializable {
|
||||
AccessToken accessToken = (AccessToken) o;
|
||||
return Objects.equals(this.id, accessToken.id)
|
||||
&& Objects.equals(this.name, accessToken.name)
|
||||
&& Objects.equals(this.scopes, accessToken.scopes)
|
||||
&& Objects.equals(this.sha1, accessToken.sha1)
|
||||
&& Objects.equals(this.tokenLastEight, accessToken.tokenLastEight);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(id, name, sha1, tokenLastEight);
|
||||
return Objects.hash(id, name, scopes, sha1, tokenLastEight);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -136,6 +169,7 @@ public class AccessToken implements Serializable {
|
||||
|
||||
sb.append(" id: ").append(toIndentedString(id)).append("\n");
|
||||
sb.append(" name: ").append(toIndentedString(name)).append("\n");
|
||||
sb.append(" scopes: ").append(toIndentedString(scopes)).append("\n");
|
||||
sb.append(" sha1: ").append(toIndentedString(sha1)).append("\n");
|
||||
sb.append(" tokenLastEight: ").append(toIndentedString(tokenLastEight)).append("\n");
|
||||
sb.append("}");
|
||||
|
||||
@@ -15,6 +15,8 @@ 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.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
/** CreateAccessTokenOption options when create access token */
|
||||
@@ -25,6 +27,9 @@ public class CreateAccessTokenOption implements Serializable {
|
||||
@SerializedName("name")
|
||||
private String name = null;
|
||||
|
||||
@SerializedName("scopes")
|
||||
private List<String> scopes = null;
|
||||
|
||||
public CreateAccessTokenOption name(String name) {
|
||||
this.name = name;
|
||||
return this;
|
||||
@@ -35,7 +40,7 @@ public class CreateAccessTokenOption implements Serializable {
|
||||
*
|
||||
* @return name
|
||||
*/
|
||||
@Schema(description = "")
|
||||
@Schema(required = true, description = "")
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
@@ -44,6 +49,33 @@ public class CreateAccessTokenOption implements Serializable {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public CreateAccessTokenOption scopes(List<String> scopes) {
|
||||
this.scopes = scopes;
|
||||
return this;
|
||||
}
|
||||
|
||||
public CreateAccessTokenOption addScopesItem(String scopesItem) {
|
||||
if (this.scopes == null) {
|
||||
this.scopes = new ArrayList<>();
|
||||
}
|
||||
this.scopes.add(scopesItem);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get scopes
|
||||
*
|
||||
* @return scopes
|
||||
*/
|
||||
@Schema(description = "")
|
||||
public List<String> getScopes() {
|
||||
return scopes;
|
||||
}
|
||||
|
||||
public void setScopes(List<String> scopes) {
|
||||
this.scopes = scopes;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
@@ -53,12 +85,13 @@ public class CreateAccessTokenOption implements Serializable {
|
||||
return false;
|
||||
}
|
||||
CreateAccessTokenOption createAccessTokenOption = (CreateAccessTokenOption) o;
|
||||
return Objects.equals(this.name, createAccessTokenOption.name);
|
||||
return Objects.equals(this.name, createAccessTokenOption.name)
|
||||
&& Objects.equals(this.scopes, createAccessTokenOption.scopes);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(name);
|
||||
return Objects.hash(name, scopes);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -67,6 +100,7 @@ public class CreateAccessTokenOption implements Serializable {
|
||||
sb.append("class CreateAccessTokenOption {\n");
|
||||
|
||||
sb.append(" name: ").append(toIndentedString(name)).append("\n");
|
||||
sb.append(" scopes: ").append(toIndentedString(scopes)).append("\n");
|
||||
sb.append("}");
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user