Synchronizing API and documentation updates

This commit is contained in:
gitnexbot
2024-03-02 00:06:41 +00:00
parent 379e3a228b
commit 1fd74ce6bc
8 changed files with 665 additions and 0 deletions
+268
View File
@@ -4,6 +4,7 @@ All URIs are relative to *https://{{AppSubUrl | JSEscape}}/api/v1*
Method | HTTP request | Description
------------- | ------------- | -------------
[**adminAddUserBadges**](AdminApi.md#adminAddUserBadges) | **POST** admin/users/{username}/badges | Add a badge to a user
[**adminAdoptRepository**](AdminApi.md#adminAdoptRepository) | **POST** admin/unadopted/{owner}/{repo} | Adopt unadopted files as a repository
[**adminCreateHook**](AdminApi.md#adminCreateHook) | **POST** admin/hooks | Create a hook
[**adminCreateOrg**](AdminApi.md#adminCreateOrg) | **POST** admin/users/{username}/orgs | Create an organization
@@ -15,6 +16,7 @@ Method | HTTP request | Description
[**adminDeleteHook**](AdminApi.md#adminDeleteHook) | **DELETE** admin/hooks/{id} | Delete a hook
[**adminDeleteUnadoptedRepository**](AdminApi.md#adminDeleteUnadoptedRepository) | **DELETE** admin/unadopted/{owner}/{repo} | Delete unadopted files
[**adminDeleteUser**](AdminApi.md#adminDeleteUser) | **DELETE** admin/users/{username} | Delete a user
[**adminDeleteUserBadges**](AdminApi.md#adminDeleteUserBadges) | **DELETE** admin/users/{username}/badges | Remove a badge from a user
[**adminDeleteUserPublicKey**](AdminApi.md#adminDeleteUserPublicKey) | **DELETE** admin/users/{username}/keys/{id} | Delete a user's public key
[**adminEditHook**](AdminApi.md#adminEditHook) | **PATCH** admin/hooks/{id} | Update a hook
[**adminEditUser**](AdminApi.md#adminEditUser) | **PATCH** admin/users/{username} | Edit an existing user
@@ -23,11 +25,101 @@ Method | HTTP request | Description
[**adminGetHook**](AdminApi.md#adminGetHook) | **GET** admin/hooks/{id} | Get a hook
[**adminGetRunnerRegistrationToken**](AdminApi.md#adminGetRunnerRegistrationToken) | **GET** admin/runners/registration-token | Get an global actions runner registration token
[**adminListHooks**](AdminApi.md#adminListHooks) | **GET** admin/hooks | List system's webhooks
[**adminListUserBadges**](AdminApi.md#adminListUserBadges) | **GET** admin/users/{username}/badges | List a user's badges
[**adminRenameUser**](AdminApi.md#adminRenameUser) | **POST** admin/users/{username}/rename | Rename a user
[**adminSearchEmails**](AdminApi.md#adminSearchEmails) | **GET** admin/emails/search | Search all emails
[**adminSearchUsers**](AdminApi.md#adminSearchUsers) | **GET** admin/users | Search users according filter conditions
[**adminUnadoptedList**](AdminApi.md#adminUnadoptedList) | **GET** admin/unadopted | List unadopted repositories
<a name="adminAddUserBadges"></a>
# **adminAddUserBadges**
> Void adminAddUserBadges(username, body)
Add a badge to a user
### Example
```java
// Import classes:
//import org.gitnex.tea4j.v2.ApiClient;
//import org.gitnex.tea4j.v2.ApiException;
//import org.gitnex.tea4j.v2.Configuration;
//import org.gitnex.tea4j.v2.auth.*;
//import org.gitnex.tea4j.v2.apis.AdminApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure API key authorization: AccessToken
ApiKeyAuth AccessToken = (ApiKeyAuth) defaultClient.getAuthentication("AccessToken");
AccessToken.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//AccessToken.setApiKeyPrefix("Token");
// Configure API key authorization: AuthorizationHeaderToken
ApiKeyAuth AuthorizationHeaderToken = (ApiKeyAuth) defaultClient.getAuthentication("AuthorizationHeaderToken");
AuthorizationHeaderToken.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//AuthorizationHeaderToken.setApiKeyPrefix("Token");
// Configure HTTP basic authorization: BasicAuth
HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth");
BasicAuth.setUsername("YOUR USERNAME");
BasicAuth.setPassword("YOUR PASSWORD");
// Configure API key authorization: SudoHeader
ApiKeyAuth SudoHeader = (ApiKeyAuth) defaultClient.getAuthentication("SudoHeader");
SudoHeader.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//SudoHeader.setApiKeyPrefix("Token");
// Configure API key authorization: SudoParam
ApiKeyAuth SudoParam = (ApiKeyAuth) defaultClient.getAuthentication("SudoParam");
SudoParam.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//SudoParam.setApiKeyPrefix("Token");
// Configure API key authorization: TOTPHeader
ApiKeyAuth TOTPHeader = (ApiKeyAuth) defaultClient.getAuthentication("TOTPHeader");
TOTPHeader.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//TOTPHeader.setApiKeyPrefix("Token");
// Configure API key authorization: Token
ApiKeyAuth Token = (ApiKeyAuth) defaultClient.getAuthentication("Token");
Token.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//Token.setApiKeyPrefix("Token");
AdminApi apiInstance = new AdminApi();
String username = "username_example"; // String | username of user
UserBadgeOption body = new UserBadgeOption(); // UserBadgeOption |
try {
Void result = apiInstance.adminAddUserBadges(username, body);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling AdminApi#adminAddUserBadges");
e.printStackTrace();
}
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**username** | **String**| username of user |
**body** | [**UserBadgeOption**](UserBadgeOption.md)| | [optional]
### Return type
[**Void**](.md)
### Authorization
[AccessToken](../README.md#AccessToken)[AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken)[BasicAuth](../README.md#BasicAuth)[SudoHeader](../README.md#SudoHeader)[SudoParam](../README.md#SudoParam)[TOTPHeader](../README.md#TOTPHeader)[Token](../README.md#Token)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: Not defined
<a name="adminAdoptRepository"></a>
# **adminAdoptRepository**
> Void adminAdoptRepository(owner, repo)
@@ -999,6 +1091,95 @@ Name | Type | Description | Notes
- **Content-Type**: Not defined
- **Accept**: Not defined
<a name="adminDeleteUserBadges"></a>
# **adminDeleteUserBadges**
> Void adminDeleteUserBadges(username, body)
Remove a badge from a user
### Example
```java
// Import classes:
//import org.gitnex.tea4j.v2.ApiClient;
//import org.gitnex.tea4j.v2.ApiException;
//import org.gitnex.tea4j.v2.Configuration;
//import org.gitnex.tea4j.v2.auth.*;
//import org.gitnex.tea4j.v2.apis.AdminApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure API key authorization: AccessToken
ApiKeyAuth AccessToken = (ApiKeyAuth) defaultClient.getAuthentication("AccessToken");
AccessToken.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//AccessToken.setApiKeyPrefix("Token");
// Configure API key authorization: AuthorizationHeaderToken
ApiKeyAuth AuthorizationHeaderToken = (ApiKeyAuth) defaultClient.getAuthentication("AuthorizationHeaderToken");
AuthorizationHeaderToken.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//AuthorizationHeaderToken.setApiKeyPrefix("Token");
// Configure HTTP basic authorization: BasicAuth
HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth");
BasicAuth.setUsername("YOUR USERNAME");
BasicAuth.setPassword("YOUR PASSWORD");
// Configure API key authorization: SudoHeader
ApiKeyAuth SudoHeader = (ApiKeyAuth) defaultClient.getAuthentication("SudoHeader");
SudoHeader.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//SudoHeader.setApiKeyPrefix("Token");
// Configure API key authorization: SudoParam
ApiKeyAuth SudoParam = (ApiKeyAuth) defaultClient.getAuthentication("SudoParam");
SudoParam.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//SudoParam.setApiKeyPrefix("Token");
// Configure API key authorization: TOTPHeader
ApiKeyAuth TOTPHeader = (ApiKeyAuth) defaultClient.getAuthentication("TOTPHeader");
TOTPHeader.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//TOTPHeader.setApiKeyPrefix("Token");
// Configure API key authorization: Token
ApiKeyAuth Token = (ApiKeyAuth) defaultClient.getAuthentication("Token");
Token.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//Token.setApiKeyPrefix("Token");
AdminApi apiInstance = new AdminApi();
String username = "username_example"; // String | username of user
UserBadgeOption body = new UserBadgeOption(); // UserBadgeOption |
try {
Void result = apiInstance.adminDeleteUserBadges(username, body);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling AdminApi#adminDeleteUserBadges");
e.printStackTrace();
}
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**username** | **String**| username of user |
**body** | [**UserBadgeOption**](UserBadgeOption.md)| | [optional]
### Return type
[**Void**](.md)
### Authorization
[AccessToken](../README.md#AccessToken)[AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken)[BasicAuth](../README.md#BasicAuth)[SudoHeader](../README.md#SudoHeader)[SudoParam](../README.md#SudoParam)[TOTPHeader](../README.md#TOTPHeader)[Token](../README.md#Token)
### HTTP request headers
- **Content-Type**: application/json, text/plain
- **Accept**: Not defined
<a name="adminDeleteUserPublicKey"></a>
# **adminDeleteUserPublicKey**
> Void adminDeleteUserPublicKey(username, id)
@@ -1698,6 +1879,93 @@ Name | Type | Description | Notes
[AccessToken](../README.md#AccessToken)[AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken)[BasicAuth](../README.md#BasicAuth)[SudoHeader](../README.md#SudoHeader)[SudoParam](../README.md#SudoParam)[TOTPHeader](../README.md#TOTPHeader)[Token](../README.md#Token)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
<a name="adminListUserBadges"></a>
# **adminListUserBadges**
> List&lt;Badge&gt; adminListUserBadges(username)
List a user&#x27;s badges
### Example
```java
// Import classes:
//import org.gitnex.tea4j.v2.ApiClient;
//import org.gitnex.tea4j.v2.ApiException;
//import org.gitnex.tea4j.v2.Configuration;
//import org.gitnex.tea4j.v2.auth.*;
//import org.gitnex.tea4j.v2.apis.AdminApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure API key authorization: AccessToken
ApiKeyAuth AccessToken = (ApiKeyAuth) defaultClient.getAuthentication("AccessToken");
AccessToken.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//AccessToken.setApiKeyPrefix("Token");
// Configure API key authorization: AuthorizationHeaderToken
ApiKeyAuth AuthorizationHeaderToken = (ApiKeyAuth) defaultClient.getAuthentication("AuthorizationHeaderToken");
AuthorizationHeaderToken.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//AuthorizationHeaderToken.setApiKeyPrefix("Token");
// Configure HTTP basic authorization: BasicAuth
HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth");
BasicAuth.setUsername("YOUR USERNAME");
BasicAuth.setPassword("YOUR PASSWORD");
// Configure API key authorization: SudoHeader
ApiKeyAuth SudoHeader = (ApiKeyAuth) defaultClient.getAuthentication("SudoHeader");
SudoHeader.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//SudoHeader.setApiKeyPrefix("Token");
// Configure API key authorization: SudoParam
ApiKeyAuth SudoParam = (ApiKeyAuth) defaultClient.getAuthentication("SudoParam");
SudoParam.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//SudoParam.setApiKeyPrefix("Token");
// Configure API key authorization: TOTPHeader
ApiKeyAuth TOTPHeader = (ApiKeyAuth) defaultClient.getAuthentication("TOTPHeader");
TOTPHeader.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//TOTPHeader.setApiKeyPrefix("Token");
// Configure API key authorization: Token
ApiKeyAuth Token = (ApiKeyAuth) defaultClient.getAuthentication("Token");
Token.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//Token.setApiKeyPrefix("Token");
AdminApi apiInstance = new AdminApi();
String username = "username_example"; // String | username of user
try {
List<Badge> result = apiInstance.adminListUserBadges(username);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling AdminApi#adminListUserBadges");
e.printStackTrace();
}
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**username** | **String**| username of user |
### Return type
[**List&lt;Badge&gt;**](Badge.md)
### Authorization
[AccessToken](../README.md#AccessToken)[AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken)[BasicAuth](../README.md#BasicAuth)[SudoHeader](../README.md#SudoHeader)[SudoParam](../README.md#SudoParam)[TOTPHeader](../README.md#TOTPHeader)[Token](../README.md#Token)
### HTTP request headers
- **Content-Type**: Not defined
+9
View File
@@ -0,0 +1,9 @@
# Badge
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**description** | **String** | | [optional]
**id** | **Long** | | [optional]
**imageUrl** | **String** | | [optional]
**slug** | **String** | | [optional]
+6
View File
@@ -0,0 +1,6 @@
# BadgeList
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**body** | [**List&lt;Badge&gt;**](Badge.md) | in:body | [optional]
+6
View File
@@ -0,0 +1,6 @@
# UserBadgeOption
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**badgeSlugs** | **List&lt;String&gt;** | | [optional]
@@ -2,6 +2,7 @@ package org.gitnex.tea4j.v2.apis;
import java.util.List;
import org.gitnex.tea4j.v2.CollectionFormats.*;
import org.gitnex.tea4j.v2.models.Badge;
import org.gitnex.tea4j.v2.models.CreateHookOption;
import org.gitnex.tea4j.v2.models.CreateKeyOption;
import org.gitnex.tea4j.v2.models.CreateOrgOption;
@@ -17,10 +18,23 @@ import org.gitnex.tea4j.v2.models.PublicKey;
import org.gitnex.tea4j.v2.models.RenameUserOption;
import org.gitnex.tea4j.v2.models.Repository;
import org.gitnex.tea4j.v2.models.User;
import org.gitnex.tea4j.v2.models.UserBadgeOption;
import retrofit2.Call;
import retrofit2.http.*;
public interface AdminApi {
/**
* Add a badge to a user
*
* @param username username of user (required)
* @param body (optional)
* @return Call&lt;Void&gt;
*/
@Headers({"Content-Type:application/json"})
@POST("admin/users/{username}/badges")
Call<Void> adminAddUserBadges(
@retrofit2.http.Path("username") String username, @retrofit2.http.Body UserBadgeOption body);
/**
* Adopt unadopted files as a repository
*
@@ -140,6 +154,18 @@ public interface AdminApi {
@retrofit2.http.Path("username") String username,
@retrofit2.http.Query("purge") Boolean purge);
/**
* Remove a badge from a user
*
* @param username username of user (required)
* @param body (optional)
* @return Call&lt;Void&gt;
*/
@Headers({"Content-Type:application/json"})
@DELETE("admin/users/{username}/badges")
Call<Void> adminDeleteUserBadges(
@retrofit2.http.Path("username") String username, @retrofit2.http.Body UserBadgeOption body);
/**
* Delete a user&#x27;s public key
*
@@ -225,6 +251,15 @@ public interface AdminApi {
Call<List<Hook>> adminListHooks(
@retrofit2.http.Query("page") Integer page, @retrofit2.http.Query("limit") Integer limit);
/**
* List a user&#x27;s badges
*
* @param username username of user (required)
* @return Call&lt;List&lt;Badge&gt;&gt;
*/
@GET("admin/users/{username}/badges")
Call<List<Badge>> adminListUserBadges(@retrofit2.http.Path("username") String username);
/**
* Rename a user
*
@@ -0,0 +1,155 @@
/*
* Gitea API
* This documentation describes the Gitea API.
*
* OpenAPI spec version: {{AppVer | JSEscape}}
*
*
* 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;
/** Badge represents a user badge */
@Schema(description = "Badge represents a user badge")
public class Badge implements Serializable {
private static final long serialVersionUID = 1L;
@SerializedName("description")
private String description = null;
@SerializedName("id")
private Long id = null;
@SerializedName("image_url")
private String imageUrl = null;
@SerializedName("slug")
private String slug = null;
public Badge description(String description) {
this.description = description;
return this;
}
/**
* Get description
*
* @return description
*/
@Schema(description = "")
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public Badge id(Long id) {
this.id = id;
return this;
}
/**
* Get id
*
* @return id
*/
@Schema(description = "")
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public Badge imageUrl(String imageUrl) {
this.imageUrl = imageUrl;
return this;
}
/**
* Get imageUrl
*
* @return imageUrl
*/
@Schema(description = "")
public String getImageUrl() {
return imageUrl;
}
public void setImageUrl(String imageUrl) {
this.imageUrl = imageUrl;
}
public Badge slug(String slug) {
this.slug = slug;
return this;
}
/**
* Get slug
*
* @return slug
*/
@Schema(description = "")
public String getSlug() {
return slug;
}
public void setSlug(String slug) {
this.slug = slug;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
Badge badge = (Badge) o;
return Objects.equals(this.description, badge.description)
&& Objects.equals(this.id, badge.id)
&& Objects.equals(this.imageUrl, badge.imageUrl)
&& Objects.equals(this.slug, badge.slug);
}
@Override
public int hashCode() {
return Objects.hash(description, id, imageUrl, slug);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class Badge {\n");
sb.append(" description: ").append(toIndentedString(description)).append("\n");
sb.append(" id: ").append(toIndentedString(id)).append("\n");
sb.append(" imageUrl: ").append(toIndentedString(imageUrl)).append("\n");
sb.append(" slug: ").append(toIndentedString(slug)).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 ");
}
}
@@ -0,0 +1,93 @@
/*
* Gitea API
* This documentation describes the Gitea API.
*
* OpenAPI spec version: {{AppVer | JSEscape}}
*
*
* 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.ArrayList;
import java.util.List;
import java.util.Objects;
/** BadgeList */
@Schema(description = "BadgeList")
public class BadgeList implements Serializable {
private static final long serialVersionUID = 1L;
@SerializedName("body")
private List<Badge> body = null;
public BadgeList body(List<Badge> body) {
this.body = body;
return this;
}
public BadgeList addBodyItem(Badge bodyItem) {
if (this.body == null) {
this.body = new ArrayList<>();
}
this.body.add(bodyItem);
return this;
}
/**
* in:body
*
* @return body
*/
@Schema(description = "in:body")
public List<Badge> getBody() {
return body;
}
public void setBody(List<Badge> body) {
this.body = body;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
BadgeList badgeList = (BadgeList) o;
return Objects.equals(this.body, badgeList.body);
}
@Override
public int hashCode() {
return Objects.hash(body);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class BadgeList {\n");
sb.append(" body: ").append(toIndentedString(body)).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 ");
}
}
@@ -0,0 +1,93 @@
/*
* Gitea API
* This documentation describes the Gitea API.
*
* OpenAPI spec version: {{AppVer | JSEscape}}
*
*
* 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.ArrayList;
import java.util.List;
import java.util.Objects;
/** UserBadgeOption options for link between users and badges */
@Schema(description = "UserBadgeOption options for link between users and badges")
public class UserBadgeOption implements Serializable {
private static final long serialVersionUID = 1L;
@SerializedName("badge_slugs")
private List<String> badgeSlugs = null;
public UserBadgeOption badgeSlugs(List<String> badgeSlugs) {
this.badgeSlugs = badgeSlugs;
return this;
}
public UserBadgeOption addBadgeSlugsItem(String badgeSlugsItem) {
if (this.badgeSlugs == null) {
this.badgeSlugs = new ArrayList<>();
}
this.badgeSlugs.add(badgeSlugsItem);
return this;
}
/**
* Get badgeSlugs
*
* @return badgeSlugs
*/
@Schema(example = "[\"badge1\",\"badge2\"]", description = "")
public List<String> getBadgeSlugs() {
return badgeSlugs;
}
public void setBadgeSlugs(List<String> badgeSlugs) {
this.badgeSlugs = badgeSlugs;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
UserBadgeOption userBadgeOption = (UserBadgeOption) o;
return Objects.equals(this.badgeSlugs, userBadgeOption.badgeSlugs);
}
@Override
public int hashCode() {
return Objects.hash(badgeSlugs);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class UserBadgeOption {\n");
sb.append(" badgeSlugs: ").append(toIndentedString(badgeSlugs)).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 ");
}
}