Synchronizing API and documentation updates

This commit is contained in:
gitnexbot
2024-06-15 00:08:48 +00:00
parent 55caeecf64
commit f950e94f46
8 changed files with 1081 additions and 0 deletions
+8
View File
@@ -0,0 +1,8 @@
# CreateTagProtectionOption
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**namePattern** | **String** | | [optional]
**whitelistTeams** | **List<String>** | | [optional]
**whitelistUsernames** | **List<String>** | | [optional]
+8
View File
@@ -0,0 +1,8 @@
# EditTagProtectionOption
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**namePattern** | **String** | | [optional]
**whitelistTeams** | **List<String>** | | [optional]
**whitelistUsernames** | **List<String>** | | [optional]
+460
View File
@@ -41,6 +41,7 @@ Method | HTTP request | Description
[**repoCreateReleaseAttachment**](RepositoryApi.md#repoCreateReleaseAttachment) | **POST** repos/{owner}/{repo}/releases/{id}/assets | Create a release attachment
[**repoCreateStatus**](RepositoryApi.md#repoCreateStatus) | **POST** repos/{owner}/{repo}/statuses/{sha} | Create a commit status
[**repoCreateTag**](RepositoryApi.md#repoCreateTag) | **POST** repos/{owner}/{repo}/tags | Create a new git tag in a repository
[**repoCreateTagProtection**](RepositoryApi.md#repoCreateTagProtection) | **POST** repos/{owner}/{repo}/tag_protections | Create a tag protections for a repository
[**repoCreateWikiPage**](RepositoryApi.md#repoCreateWikiPage) | **POST** repos/{owner}/{repo}/wiki/new | Create a wiki page
[**repoDelete**](RepositoryApi.md#repoDelete) | **DELETE** repos/{owner}/{repo} | Delete a repository
[**repoDeleteAvatar**](RepositoryApi.md#repoDeleteAvatar) | **DELETE** repos/{owner}/{repo}/avatar | Delete avatar
@@ -58,6 +59,7 @@ Method | HTTP request | Description
[**repoDeleteReleaseAttachment**](RepositoryApi.md#repoDeleteReleaseAttachment) | **DELETE** repos/{owner}/{repo}/releases/{id}/assets/{attachment_id} | Delete a release attachment
[**repoDeleteReleaseByTag**](RepositoryApi.md#repoDeleteReleaseByTag) | **DELETE** repos/{owner}/{repo}/releases/tags/{tag} | Delete a release by tag name
[**repoDeleteTag**](RepositoryApi.md#repoDeleteTag) | **DELETE** repos/{owner}/{repo}/tags/{tag} | Delete a repository's tag by name
[**repoDeleteTagProtection**](RepositoryApi.md#repoDeleteTagProtection) | **DELETE** repos/{owner}/{repo}/tag_protections/{id} | Delete a specific tag protection for the repository
[**repoDeleteTeam**](RepositoryApi.md#repoDeleteTeam) | **DELETE** repos/{owner}/{repo}/teams/{team} | Delete a team from a repository
[**repoDeleteTopic**](RepositoryApi.md#repoDeleteTopic) | **DELETE** repos/{owner}/{repo}/topics/{topic} | Delete a topic from a repository
[**repoDeleteWikiPage**](RepositoryApi.md#repoDeleteWikiPage) | **DELETE** repos/{owner}/{repo}/wiki/page/{pageName} | Delete a wiki page
@@ -71,6 +73,7 @@ Method | HTTP request | Description
[**repoEditPullRequest**](RepositoryApi.md#repoEditPullRequest) | **PATCH** repos/{owner}/{repo}/pulls/{index} | Update a pull request. If using deadline only the date will be taken into account, and time of day ignored.
[**repoEditRelease**](RepositoryApi.md#repoEditRelease) | **PATCH** repos/{owner}/{repo}/releases/{id} | Update a release
[**repoEditReleaseAttachment**](RepositoryApi.md#repoEditReleaseAttachment) | **PATCH** repos/{owner}/{repo}/releases/{id}/assets/{attachment_id} | Edit a release attachment
[**repoEditTagProtection**](RepositoryApi.md#repoEditTagProtection) | **PATCH** repos/{owner}/{repo}/tag_protections/{id} | Edit a tag protections for a repository. Only fields that are set will be changed
[**repoEditWikiPage**](RepositoryApi.md#repoEditWikiPage) | **PATCH** repos/{owner}/{repo}/wiki/page/{pageName} | Edit a wiki page
[**repoGet**](RepositoryApi.md#repoGet) | **GET** repos/{owner}/{repo} | Get a repository
[**repoGetAllCommits**](RepositoryApi.md#repoGetAllCommits) | **GET** repos/{owner}/{repo}/commits | Get a list of all commits from a repository
@@ -109,6 +112,7 @@ Method | HTTP request | Description
[**repoGetRunnerRegistrationToken**](RepositoryApi.md#repoGetRunnerRegistrationToken) | **GET** repos/{owner}/{repo}/runners/registration-token | Get a repository's actions runner registration token
[**repoGetSingleCommit**](RepositoryApi.md#repoGetSingleCommit) | **GET** repos/{owner}/{repo}/git/commits/{sha} | Get a single commit from a repository
[**repoGetTag**](RepositoryApi.md#repoGetTag) | **GET** repos/{owner}/{repo}/tags/{tag} | Get the tag of a repository by tag name
[**repoGetTagProtection**](RepositoryApi.md#repoGetTagProtection) | **GET** repos/{owner}/{repo}/tag_protections/{id} | Get a specific tag protection for the repository
[**repoGetWikiPage**](RepositoryApi.md#repoGetWikiPage) | **GET** repos/{owner}/{repo}/wiki/page/{pageName} | Get a wiki page
[**repoGetWikiPageRevisions**](RepositoryApi.md#repoGetWikiPageRevisions) | **GET** repos/{owner}/{repo}/wiki/revisions/{pageName} | Get revisions of a wiki page
[**repoGetWikiPages**](RepositoryApi.md#repoGetWikiPages) | **GET** repos/{owner}/{repo}/wiki/pages | Get all wiki pages
@@ -133,6 +137,7 @@ Method | HTTP request | Description
[**repoListStatuses**](RepositoryApi.md#repoListStatuses) | **GET** repos/{owner}/{repo}/statuses/{sha} | Get a commit's statuses
[**repoListStatusesByRef**](RepositoryApi.md#repoListStatusesByRef) | **GET** repos/{owner}/{repo}/commits/{ref}/statuses | Get a commit's statuses, by branch/tag/commit reference
[**repoListSubscribers**](RepositoryApi.md#repoListSubscribers) | **GET** repos/{owner}/{repo}/subscribers | List a repo's watchers
[**repoListTagProtection**](RepositoryApi.md#repoListTagProtection) | **GET** repos/{owner}/{repo}/tag_protections | List tag protections for a repository
[**repoListTags**](RepositoryApi.md#repoListTags) | **GET** repos/{owner}/{repo}/tags | List a repository's tags
[**repoListTeams**](RepositoryApi.md#repoListTeams) | **GET** repos/{owner}/{repo}/teams | List a repository's teams
[**repoListTopics**](RepositoryApi.md#repoListTopics) | **GET** repos/{owner}/{repo}/topics | Get list of topics that a repository has
@@ -3644,6 +3649,97 @@ Name | Type | Description | Notes
- **Content-Type**: application/json, text/plain
- **Accept**: application/json
<a name="repoCreateTagProtection"></a>
# **repoCreateTagProtection**
> TagProtection repoCreateTagProtection(owner, repo, body)
Create a tag protections for a repository
### 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.RepositoryApi;
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");
RepositoryApi apiInstance = new RepositoryApi();
String owner = "owner_example"; // String | owner of the repo
String repo = "repo_example"; // String | name of the repo
CreateTagProtectionOption body = new CreateTagProtectionOption(); // CreateTagProtectionOption |
try {
TagProtection result = apiInstance.repoCreateTagProtection(owner, repo, body);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling RepositoryApi#repoCreateTagProtection");
e.printStackTrace();
}
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**owner** | **String**| owner of the repo |
**repo** | **String**| name of the repo |
**body** | [**CreateTagProtectionOption**](CreateTagProtectionOption.md)| | [optional]
### Return type
[**TagProtection**](TagProtection.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**: application/json
<a name="repoCreateWikiPage"></a>
# **repoCreateWikiPage**
> WikiPage repoCreateWikiPage(owner, repo, body)
@@ -5190,6 +5286,97 @@ 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**: Not defined
<a name="repoDeleteTagProtection"></a>
# **repoDeleteTagProtection**
> Void repoDeleteTagProtection(owner, repo, id)
Delete a specific tag protection for the repository
### 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.RepositoryApi;
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");
RepositoryApi apiInstance = new RepositoryApi();
String owner = "owner_example"; // String | owner of the repo
String repo = "repo_example"; // String | name of the repo
Integer id = 56; // Integer | id of protected tag
try {
Void result = apiInstance.repoDeleteTagProtection(owner, repo, id);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling RepositoryApi#repoDeleteTagProtection");
e.printStackTrace();
}
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**owner** | **String**| owner of the repo |
**repo** | **String**| name of the repo |
**id** | **Integer**| id of protected tag |
### 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**: Not defined
@@ -6397,6 +6584,99 @@ 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**: application/json
- **Accept**: application/json
<a name="repoEditTagProtection"></a>
# **repoEditTagProtection**
> TagProtection repoEditTagProtection(owner, repo, id, body)
Edit a tag protections for a repository. Only fields that are set will be changed
### 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.RepositoryApi;
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");
RepositoryApi apiInstance = new RepositoryApi();
String owner = "owner_example"; // String | owner of the repo
String repo = "repo_example"; // String | name of the repo
Integer id = 56; // Integer | id of protected tag
EditTagProtectionOption body = new EditTagProtectionOption(); // EditTagProtectionOption |
try {
TagProtection result = apiInstance.repoEditTagProtection(owner, repo, id, body);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling RepositoryApi#repoEditTagProtection");
e.printStackTrace();
}
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**owner** | **String**| owner of the repo |
**repo** | **String**| name of the repo |
**id** | **Integer**| id of protected tag |
**body** | [**EditTagProtectionOption**](EditTagProtectionOption.md)| | [optional]
### Return type
[**TagProtection**](TagProtection.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
@@ -9897,6 +10177,97 @@ 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="repoGetTagProtection"></a>
# **repoGetTagProtection**
> TagProtection repoGetTagProtection(owner, repo, id)
Get a specific tag protection for the repository
### 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.RepositoryApi;
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");
RepositoryApi apiInstance = new RepositoryApi();
String owner = "owner_example"; // String | owner of the repo
String repo = "repo_example"; // String | name of the repo
Integer id = 56; // Integer | id of the tag protect to get
try {
TagProtection result = apiInstance.repoGetTagProtection(owner, repo, id);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling RepositoryApi#repoGetTagProtection");
e.printStackTrace();
}
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**owner** | **String**| owner of the repo |
**repo** | **String**| name of the repo |
**id** | **Integer**| id of the tag protect to get |
### Return type
[**TagProtection**](TagProtection.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
@@ -12135,6 +12506,95 @@ 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="repoListTagProtection"></a>
# **repoListTagProtection**
> List&lt;TagProtection&gt; repoListTagProtection(owner, repo)
List tag protections for a repository
### 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.RepositoryApi;
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");
RepositoryApi apiInstance = new RepositoryApi();
String owner = "owner_example"; // String | owner of the repo
String repo = "repo_example"; // String | name of the repo
try {
List<TagProtection> result = apiInstance.repoListTagProtection(owner, repo);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling RepositoryApi#repoListTagProtection");
e.printStackTrace();
}
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**owner** | **String**| owner of the repo |
**repo** | **String**| name of the repo |
### Return type
[**List&lt;TagProtection&gt;**](TagProtection.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
+11
View File
@@ -0,0 +1,11 @@
# TagProtection
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**createdAt** | [**Date**](Date.md) | | [optional]
**id** | **Long** | | [optional]
**namePattern** | **String** | | [optional]
**updatedAt** | [**Date**](Date.md) | | [optional]
**whitelistTeams** | **List&lt;String&gt;** | | [optional]
**whitelistUsernames** | **List&lt;String&gt;** | | [optional]
@@ -34,6 +34,7 @@ import org.gitnex.tea4j.v2.models.CreateReleaseOption;
import org.gitnex.tea4j.v2.models.CreateRepoOption;
import org.gitnex.tea4j.v2.models.CreateStatusOption;
import org.gitnex.tea4j.v2.models.CreateTagOption;
import org.gitnex.tea4j.v2.models.CreateTagProtectionOption;
import org.gitnex.tea4j.v2.models.CreateVariableOption;
import org.gitnex.tea4j.v2.models.CreateWikiPageOptions;
import org.gitnex.tea4j.v2.models.DeleteFileOptions;
@@ -46,6 +47,7 @@ import org.gitnex.tea4j.v2.models.EditHookOption;
import org.gitnex.tea4j.v2.models.EditPullRequestOption;
import org.gitnex.tea4j.v2.models.EditReleaseOption;
import org.gitnex.tea4j.v2.models.EditRepoOption;
import org.gitnex.tea4j.v2.models.EditTagProtectionOption;
import org.gitnex.tea4j.v2.models.FileDeleteResponse;
import org.gitnex.tea4j.v2.models.FileResponse;
import org.gitnex.tea4j.v2.models.FilesResponse;
@@ -77,6 +79,7 @@ import org.gitnex.tea4j.v2.models.SearchResults;
import org.gitnex.tea4j.v2.models.Secret;
import org.gitnex.tea4j.v2.models.SubmitPullReviewOptions;
import org.gitnex.tea4j.v2.models.Tag;
import org.gitnex.tea4j.v2.models.TagProtection;
import org.gitnex.tea4j.v2.models.Team;
import org.gitnex.tea4j.v2.models.TopicName;
import org.gitnex.tea4j.v2.models.TopicResponse;
@@ -670,6 +673,21 @@ public interface RepositoryApi {
@retrofit2.http.Path("repo") String repo,
@retrofit2.http.Body CreateTagOption body);
/**
* Create a tag protections for a repository
*
* @param owner owner of the repo (required)
* @param repo name of the repo (required)
* @param body (optional)
* @return Call&lt;TagProtection&gt;
*/
@Headers({"Content-Type:application/json"})
@POST("repos/{owner}/{repo}/tag_protections")
Call<TagProtection> repoCreateTagProtection(
@retrofit2.http.Path("owner") String owner,
@retrofit2.http.Path("repo") String repo,
@retrofit2.http.Body CreateTagProtectionOption body);
/**
* Create a wiki page
*
@@ -913,6 +931,20 @@ public interface RepositoryApi {
@retrofit2.http.Path("repo") String repo,
@retrofit2.http.Path("tag") String tag);
/**
* Delete a specific tag protection for the repository
*
* @param owner owner of the repo (required)
* @param repo name of the repo (required)
* @param id id of protected tag (required)
* @return Call&lt;Void&gt;
*/
@DELETE("repos/{owner}/{repo}/tag_protections/{id}")
Call<Void> repoDeleteTagProtection(
@retrofit2.http.Path("owner") String owner,
@retrofit2.http.Path("repo") String repo,
@retrofit2.http.Path("id") Integer id);
/**
* Delete a team from a repository
*
@@ -1129,6 +1161,23 @@ public interface RepositoryApi {
@retrofit2.http.Path("attachment_id") Long attachmentId,
@retrofit2.http.Body EditAttachmentOptions body);
/**
* Edit a tag protections for a repository. Only fields that are set will be changed
*
* @param owner owner of the repo (required)
* @param repo name of the repo (required)
* @param id id of protected tag (required)
* @param body (optional)
* @return Call&lt;TagProtection&gt;
*/
@Headers({"Content-Type:application/json"})
@PATCH("repos/{owner}/{repo}/tag_protections/{id}")
Call<TagProtection> repoEditTagProtection(
@retrofit2.http.Path("owner") String owner,
@retrofit2.http.Path("repo") String repo,
@retrofit2.http.Path("id") Integer id,
@retrofit2.http.Body EditTagProtectionOption body);
/**
* Edit a wiki page
*
@@ -1712,6 +1761,20 @@ public interface RepositoryApi {
@retrofit2.http.Path("repo") String repo,
@retrofit2.http.Path("tag") String tag);
/**
* Get a specific tag protection for the repository
*
* @param owner owner of the repo (required)
* @param repo name of the repo (required)
* @param id id of the tag protect to get (required)
* @return Call&lt;TagProtection&gt;
*/
@GET("repos/{owner}/{repo}/tag_protections/{id}")
Call<TagProtection> repoGetTagProtection(
@retrofit2.http.Path("owner") String owner,
@retrofit2.http.Path("repo") String repo,
@retrofit2.http.Path("id") Integer id);
/**
* Get a wiki page
*
@@ -2098,6 +2161,17 @@ public interface RepositoryApi {
@retrofit2.http.Query("page") Integer page,
@retrofit2.http.Query("limit") Integer limit);
/**
* List tag protections for a repository
*
* @param owner owner of the repo (required)
* @param repo name of the repo (required)
* @return Call&lt;List&lt;TagProtection&gt;&gt;
*/
@GET("repos/{owner}/{repo}/tag_protections")
Call<List<TagProtection>> repoListTagProtection(
@retrofit2.http.Path("owner") String owner, @retrofit2.http.Path("repo") String repo);
/**
* List a repository&#x27;s tags
*
@@ -0,0 +1,149 @@
/*
* 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;
/** CreateTagProtectionOption options for creating a tag protection */
@Schema(description = "CreateTagProtectionOption options for creating a tag protection")
public class CreateTagProtectionOption implements Serializable {
private static final long serialVersionUID = 1L;
@SerializedName("name_pattern")
private String namePattern = null;
@SerializedName("whitelist_teams")
private List<String> whitelistTeams = null;
@SerializedName("whitelist_usernames")
private List<String> whitelistUsernames = null;
public CreateTagProtectionOption namePattern(String namePattern) {
this.namePattern = namePattern;
return this;
}
/**
* Get namePattern
*
* @return namePattern
*/
@Schema(description = "")
public String getNamePattern() {
return namePattern;
}
public void setNamePattern(String namePattern) {
this.namePattern = namePattern;
}
public CreateTagProtectionOption whitelistTeams(List<String> whitelistTeams) {
this.whitelistTeams = whitelistTeams;
return this;
}
public CreateTagProtectionOption addWhitelistTeamsItem(String whitelistTeamsItem) {
if (this.whitelistTeams == null) {
this.whitelistTeams = new ArrayList<>();
}
this.whitelistTeams.add(whitelistTeamsItem);
return this;
}
/**
* Get whitelistTeams
*
* @return whitelistTeams
*/
@Schema(description = "")
public List<String> getWhitelistTeams() {
return whitelistTeams;
}
public void setWhitelistTeams(List<String> whitelistTeams) {
this.whitelistTeams = whitelistTeams;
}
public CreateTagProtectionOption whitelistUsernames(List<String> whitelistUsernames) {
this.whitelistUsernames = whitelistUsernames;
return this;
}
public CreateTagProtectionOption addWhitelistUsernamesItem(String whitelistUsernamesItem) {
if (this.whitelistUsernames == null) {
this.whitelistUsernames = new ArrayList<>();
}
this.whitelistUsernames.add(whitelistUsernamesItem);
return this;
}
/**
* Get whitelistUsernames
*
* @return whitelistUsernames
*/
@Schema(description = "")
public List<String> getWhitelistUsernames() {
return whitelistUsernames;
}
public void setWhitelistUsernames(List<String> whitelistUsernames) {
this.whitelistUsernames = whitelistUsernames;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
CreateTagProtectionOption createTagProtectionOption = (CreateTagProtectionOption) o;
return Objects.equals(this.namePattern, createTagProtectionOption.namePattern)
&& Objects.equals(this.whitelistTeams, createTagProtectionOption.whitelistTeams)
&& Objects.equals(this.whitelistUsernames, createTagProtectionOption.whitelistUsernames);
}
@Override
public int hashCode() {
return Objects.hash(namePattern, whitelistTeams, whitelistUsernames);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class CreateTagProtectionOption {\n");
sb.append(" namePattern: ").append(toIndentedString(namePattern)).append("\n");
sb.append(" whitelistTeams: ").append(toIndentedString(whitelistTeams)).append("\n");
sb.append(" whitelistUsernames: ").append(toIndentedString(whitelistUsernames)).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,149 @@
/*
* 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;
/** EditTagProtectionOption options for editing a tag protection */
@Schema(description = "EditTagProtectionOption options for editing a tag protection")
public class EditTagProtectionOption implements Serializable {
private static final long serialVersionUID = 1L;
@SerializedName("name_pattern")
private String namePattern = null;
@SerializedName("whitelist_teams")
private List<String> whitelistTeams = null;
@SerializedName("whitelist_usernames")
private List<String> whitelistUsernames = null;
public EditTagProtectionOption namePattern(String namePattern) {
this.namePattern = namePattern;
return this;
}
/**
* Get namePattern
*
* @return namePattern
*/
@Schema(description = "")
public String getNamePattern() {
return namePattern;
}
public void setNamePattern(String namePattern) {
this.namePattern = namePattern;
}
public EditTagProtectionOption whitelistTeams(List<String> whitelistTeams) {
this.whitelistTeams = whitelistTeams;
return this;
}
public EditTagProtectionOption addWhitelistTeamsItem(String whitelistTeamsItem) {
if (this.whitelistTeams == null) {
this.whitelistTeams = new ArrayList<>();
}
this.whitelistTeams.add(whitelistTeamsItem);
return this;
}
/**
* Get whitelistTeams
*
* @return whitelistTeams
*/
@Schema(description = "")
public List<String> getWhitelistTeams() {
return whitelistTeams;
}
public void setWhitelistTeams(List<String> whitelistTeams) {
this.whitelistTeams = whitelistTeams;
}
public EditTagProtectionOption whitelistUsernames(List<String> whitelistUsernames) {
this.whitelistUsernames = whitelistUsernames;
return this;
}
public EditTagProtectionOption addWhitelistUsernamesItem(String whitelistUsernamesItem) {
if (this.whitelistUsernames == null) {
this.whitelistUsernames = new ArrayList<>();
}
this.whitelistUsernames.add(whitelistUsernamesItem);
return this;
}
/**
* Get whitelistUsernames
*
* @return whitelistUsernames
*/
@Schema(description = "")
public List<String> getWhitelistUsernames() {
return whitelistUsernames;
}
public void setWhitelistUsernames(List<String> whitelistUsernames) {
this.whitelistUsernames = whitelistUsernames;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
EditTagProtectionOption editTagProtectionOption = (EditTagProtectionOption) o;
return Objects.equals(this.namePattern, editTagProtectionOption.namePattern)
&& Objects.equals(this.whitelistTeams, editTagProtectionOption.whitelistTeams)
&& Objects.equals(this.whitelistUsernames, editTagProtectionOption.whitelistUsernames);
}
@Override
public int hashCode() {
return Objects.hash(namePattern, whitelistTeams, whitelistUsernames);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class EditTagProtectionOption {\n");
sb.append(" namePattern: ").append(toIndentedString(namePattern)).append("\n");
sb.append(" whitelistTeams: ").append(toIndentedString(whitelistTeams)).append("\n");
sb.append(" whitelistUsernames: ").append(toIndentedString(whitelistUsernames)).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,222 @@
/*
* 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.Date;
import java.util.List;
import java.util.Objects;
/** TagProtection represents a tag protection */
@Schema(description = "TagProtection represents a tag protection")
public class TagProtection implements Serializable {
private static final long serialVersionUID = 1L;
@SerializedName("created_at")
private Date createdAt = null;
@SerializedName("id")
private Long id = null;
@SerializedName("name_pattern")
private String namePattern = null;
@SerializedName("updated_at")
private Date updatedAt = null;
@SerializedName("whitelist_teams")
private List<String> whitelistTeams = null;
@SerializedName("whitelist_usernames")
private List<String> whitelistUsernames = null;
public TagProtection createdAt(Date createdAt) {
this.createdAt = createdAt;
return this;
}
/**
* Get createdAt
*
* @return createdAt
*/
@Schema(description = "")
public Date getCreatedAt() {
return createdAt;
}
public void setCreatedAt(Date createdAt) {
this.createdAt = createdAt;
}
public TagProtection 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 TagProtection namePattern(String namePattern) {
this.namePattern = namePattern;
return this;
}
/**
* Get namePattern
*
* @return namePattern
*/
@Schema(description = "")
public String getNamePattern() {
return namePattern;
}
public void setNamePattern(String namePattern) {
this.namePattern = namePattern;
}
public TagProtection updatedAt(Date updatedAt) {
this.updatedAt = updatedAt;
return this;
}
/**
* Get updatedAt
*
* @return updatedAt
*/
@Schema(description = "")
public Date getUpdatedAt() {
return updatedAt;
}
public void setUpdatedAt(Date updatedAt) {
this.updatedAt = updatedAt;
}
public TagProtection whitelistTeams(List<String> whitelistTeams) {
this.whitelistTeams = whitelistTeams;
return this;
}
public TagProtection addWhitelistTeamsItem(String whitelistTeamsItem) {
if (this.whitelistTeams == null) {
this.whitelistTeams = new ArrayList<>();
}
this.whitelistTeams.add(whitelistTeamsItem);
return this;
}
/**
* Get whitelistTeams
*
* @return whitelistTeams
*/
@Schema(description = "")
public List<String> getWhitelistTeams() {
return whitelistTeams;
}
public void setWhitelistTeams(List<String> whitelistTeams) {
this.whitelistTeams = whitelistTeams;
}
public TagProtection whitelistUsernames(List<String> whitelistUsernames) {
this.whitelistUsernames = whitelistUsernames;
return this;
}
public TagProtection addWhitelistUsernamesItem(String whitelistUsernamesItem) {
if (this.whitelistUsernames == null) {
this.whitelistUsernames = new ArrayList<>();
}
this.whitelistUsernames.add(whitelistUsernamesItem);
return this;
}
/**
* Get whitelistUsernames
*
* @return whitelistUsernames
*/
@Schema(description = "")
public List<String> getWhitelistUsernames() {
return whitelistUsernames;
}
public void setWhitelistUsernames(List<String> whitelistUsernames) {
this.whitelistUsernames = whitelistUsernames;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
TagProtection tagProtection = (TagProtection) o;
return Objects.equals(this.createdAt, tagProtection.createdAt)
&& Objects.equals(this.id, tagProtection.id)
&& Objects.equals(this.namePattern, tagProtection.namePattern)
&& Objects.equals(this.updatedAt, tagProtection.updatedAt)
&& Objects.equals(this.whitelistTeams, tagProtection.whitelistTeams)
&& Objects.equals(this.whitelistUsernames, tagProtection.whitelistUsernames);
}
@Override
public int hashCode() {
return Objects.hash(createdAt, id, namePattern, updatedAt, whitelistTeams, whitelistUsernames);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class TagProtection {\n");
sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n");
sb.append(" id: ").append(toIndentedString(id)).append("\n");
sb.append(" namePattern: ").append(toIndentedString(namePattern)).append("\n");
sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n");
sb.append(" whitelistTeams: ").append(toIndentedString(whitelistTeams)).append("\n");
sb.append(" whitelistUsernames: ").append(toIndentedString(whitelistUsernames)).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 ");
}
}