diff --git a/docs/ChangeFileOperation.md b/docs/ChangeFileOperation.md
index 89a8e97..88d02dc 100644
--- a/docs/ChangeFileOperation.md
+++ b/docs/ChangeFileOperation.md
@@ -3,11 +3,11 @@
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**content** | **String** | new or updated file content, must be base64 encoded | [optional]
+**content** | **String** | new or updated file content, it must be base64 encoded | [optional]
**fromPath** | **String** | old path of the file to move | [optional]
-**operation** | [**OperationEnum**](#OperationEnum) | indicates what to do with the file |
+**operation** | [**OperationEnum**](#OperationEnum) | indicates what to do with the file: \"create\" for creating a new file, \"update\" for updating an existing file, \"upload\" for creating or updating a file, \"rename\" for renaming a file, and \"delete\" for deleting an existing file. |
**path** | **String** | path to the existing or new file |
-**sha** | **String** | sha is the SHA for the file that already exists, required for update or delete | [optional]
+**sha** | **String** | the blob ID (SHA) for the file that already exists, required for changing existing files | [optional]
## Enum: OperationEnum
@@ -15,4 +15,6 @@ Name | Value
---- | -----
CREATE | "create"
UPDATE | "update"
+UPLOAD | "upload"
+RENAME | "rename"
DELETE | "delete"
diff --git a/docs/ContentsExtResponse.md b/docs/ContentsExtResponse.md
new file mode 100644
index 0000000..40b934b
--- /dev/null
+++ b/docs/ContentsExtResponse.md
@@ -0,0 +1,7 @@
+# ContentsExtResponse
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**dirContents** | [**List<ContentsResponse>**](ContentsResponse.md) | | [optional]
+**fileContents** | [**ContentsResponse**](ContentsResponse.md) | | [optional]
diff --git a/docs/ContentsResponse.md b/docs/ContentsResponse.md
index f8eac2d..3a5390a 100644
--- a/docs/ContentsResponse.md
+++ b/docs/ContentsResponse.md
@@ -12,6 +12,8 @@ Name | Type | Description | Notes
**lastAuthorDate** | [**Date**](Date.md) | | [optional]
**lastCommitSha** | **String** | | [optional]
**lastCommitterDate** | [**Date**](Date.md) | | [optional]
+**lfsOid** | **String** | | [optional]
+**lfsSize** | **Long** | | [optional]
**name** | **String** | | [optional]
**path** | **String** | | [optional]
**sha** | **String** | | [optional]
diff --git a/docs/DeleteFileOptions.md b/docs/DeleteFileOptions.md
index 0d4b392..11108ac 100644
--- a/docs/DeleteFileOptions.md
+++ b/docs/DeleteFileOptions.md
@@ -9,5 +9,5 @@ Name | Type | Description | Notes
**dates** | [**CommitDateOptions**](CommitDateOptions.md) | | [optional]
**message** | **String** | message (optional) for the commit of this file. if not supplied, a default message will be used | [optional]
**newBranch** | **String** | new_branch (optional) will make a new branch from `branch` before creating the file | [optional]
-**sha** | **String** | sha is the SHA for the file that already exists |
+**sha** | **String** | the blob ID (SHA) for the file that already exists, it is required for changing existing files |
**signoff** | **Boolean** | Add a Signed-off-by trailer by the committer at the end of the commit log message. | [optional]
diff --git a/docs/GitBlobResponse.md b/docs/GitBlobResponse.md
index ebdb911..2fed07d 100644
--- a/docs/GitBlobResponse.md
+++ b/docs/GitBlobResponse.md
@@ -5,6 +5,8 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**content** | **String** | | [optional]
**encoding** | **String** | | [optional]
+**lfsOid** | **String** | | [optional]
+**lfsSize** | **Long** | | [optional]
**sha** | **String** | | [optional]
**size** | **Long** | | [optional]
**url** | **String** | | [optional]
diff --git a/docs/RepositoryApi.md b/docs/RepositoryApi.md
index adff4a1..357a86e 100644
--- a/docs/RepositoryApi.md
+++ b/docs/RepositoryApi.md
@@ -105,8 +105,9 @@ Method | HTTP request | Description
[**repoGetByID**](RepositoryApi.md#repoGetByID) | **GET** repositories/{id} | Get a repository by id
[**repoGetCombinedStatusByRef**](RepositoryApi.md#repoGetCombinedStatusByRef) | **GET** repos/{owner}/{repo}/commits/{ref}/status | Get a commit's combined status, by branch/tag/commit reference
[**repoGetCommitPullRequest**](RepositoryApi.md#repoGetCommitPullRequest) | **GET** repos/{owner}/{repo}/commits/{sha}/pull | Get the merged pull request of the commit
-[**repoGetContents**](RepositoryApi.md#repoGetContents) | **GET** repos/{owner}/{repo}/contents/{filepath} | Gets the metadata and contents (if a file) of an entry in a repository, or a list of entries if a dir
-[**repoGetContentsList**](RepositoryApi.md#repoGetContentsList) | **GET** repos/{owner}/{repo}/contents | Gets the metadata of all the entries of the root dir
+[**repoGetContents**](RepositoryApi.md#repoGetContents) | **GET** repos/{owner}/{repo}/contents/{filepath} | Gets the metadata and contents (if a file) of an entry in a repository, or a list of entries if a dir.
+[**repoGetContentsExt**](RepositoryApi.md#repoGetContentsExt) | **GET** repos/{owner}/{repo}/contents-ext/{filepath} | The extended \"contents\" API, to get file metadata and/or content, or list a directory.
+[**repoGetContentsList**](RepositoryApi.md#repoGetContentsList) | **GET** repos/{owner}/{repo}/contents | Gets the metadata of all the entries of the root dir.
[**repoGetEditorConfig**](RepositoryApi.md#repoGetEditorConfig) | **GET** repos/{owner}/{repo}/editorconfig/{filepath} | Get the EditorConfig definitions of a file in a repository
[**repoGetFileContents**](RepositoryApi.md#repoGetFileContents) | **GET** repos/{owner}/{repo}/file-contents | Get the metadata and contents of requested files
[**repoGetFileContentsPost**](RepositoryApi.md#repoGetFileContentsPost) | **POST** repos/{owner}/{repo}/file-contents | Get the metadata and contents of requested files
@@ -9571,7 +9572,9 @@ Name | Type | Description | Notes
# **repoGetContents**
> ContentsResponse repoGetContents(owner, repo, filepath, ref)
-Gets the metadata and contents (if a file) of an entry in a repository, or a list of entries if a dir
+Gets the metadata and contents (if a file) of an entry in a repository, or a list of entries if a dir.
+
+This API follows GitHub's design, and it is not easy to use. Recommend users to use the \"contents-ext\" API instead.
### Example
```java
@@ -9655,6 +9658,103 @@ 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
+
+
+# **repoGetContentsExt**
+> ContentsExtResponse repoGetContentsExt(owner, repo, filepath, ref, includes)
+
+The extended \"contents\" API, to get file metadata and/or content, or list a directory.
+
+It guarantees that only one of the response fields is set if the request succeeds. Users can pass \"includes=file_content\" or \"includes=lfs_metadata\" to retrieve more fields. \"includes=file_content\" only works for single file, if you need to retrieve file contents in batch, use \"file-contents\" API after listing the directory.
+
+### 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
+String filepath = "filepath_example"; // String | path of the dir, file, symlink or submodule in the repo
+String ref = "ref_example"; // String | the name of the commit/branch/tag, default to the repository’s default branch.
+String includes = "includes_example"; // String | By default this API's response only contains file's metadata. Use comma-separated \"includes\" options to retrieve more fields. Option \"file_content\" will try to retrieve the file content, option \"lfs_metadata\" will try to retrieve LFS metadata.
+try {
+ ContentsExtResponse result = apiInstance.repoGetContentsExt(owner, repo, filepath, ref, includes);
+ System.out.println(result);
+} catch (ApiException e) {
+ System.err.println("Exception when calling RepositoryApi#repoGetContentsExt");
+ e.printStackTrace();
+}
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **owner** | **String**| owner of the repo |
+ **repo** | **String**| name of the repo |
+ **filepath** | **String**| path of the dir, file, symlink or submodule in the repo |
+ **ref** | **String**| the name of the commit/branch/tag, default to the repository’s default branch. | [optional]
+ **includes** | **String**| By default this API's response only contains file's metadata. Use comma-separated \"includes\" options to retrieve more fields. Option \"file_content\" will try to retrieve the file content, option \"lfs_metadata\" will try to retrieve LFS metadata. | [optional]
+
+### Return type
+
+[**ContentsExtResponse**](ContentsExtResponse.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
@@ -9664,7 +9764,9 @@ Name | Type | Description | Notes
# **repoGetContentsList**
> List<ContentsResponse> repoGetContentsList(owner, repo, ref)
-Gets the metadata of all the entries of the root dir
+Gets the metadata of all the entries of the root dir.
+
+This API follows GitHub's design, and it is not easy to use. Recommend users to use our \"contents-ext\" API instead.
### Example
```java
@@ -9850,7 +9952,7 @@ Name | Type | Description | Notes
Get the metadata and contents of requested files
-See the POST method. This GET method supports to use JSON encoded request body in query parameter.
+See the POST method. This GET method supports using JSON encoded request body in query parameter.
### Example
```java
@@ -11567,7 +11669,7 @@ RepositoryApi apiInstance = new RepositoryApi();
String owner = "owner_example"; // String | owner of the repo
String repo = "repo_example"; // String | name of the repo
String filepath = "filepath_example"; // String | path of the file to get, it should be \"{ref}/{filepath}\". If there is no ref could be inferred, it will be treated as the default branch
-String ref = "ref_example"; // String | The name of the commit/branch/tag. Default the repository’s default branch
+String ref = "ref_example"; // String | The name of the commit/branch/tag. Default to the repository’s default branch
try {
File result = apiInstance.repoGetRawFile(owner, repo, filepath, ref);
System.out.println(result);
@@ -11584,7 +11686,7 @@ Name | Type | Description | Notes
**owner** | **String**| owner of the repo |
**repo** | **String**| name of the repo |
**filepath** | **String**| path of the file to get, it should be \"{ref}/{filepath}\". If there is no ref could be inferred, it will be treated as the default branch |
- **ref** | **String**| The name of the commit/branch/tag. Default the repository’s default branch | [optional]
+ **ref** | **String**| The name of the commit/branch/tag. Default to the repository’s default branch | [optional]
### Return type
@@ -11660,7 +11762,7 @@ RepositoryApi apiInstance = new RepositoryApi();
String owner = "owner_example"; // String | owner of the repo
String repo = "repo_example"; // String | name of the repo
String filepath = "filepath_example"; // String | path of the file to get, it should be \"{ref}/{filepath}\". If there is no ref could be inferred, it will be treated as the default branch
-String ref = "ref_example"; // String | The name of the commit/branch/tag. Default the repository’s default branch
+String ref = "ref_example"; // String | The name of the commit/branch/tag. Default to the repository’s default branch
try {
File result = apiInstance.repoGetRawFileOrLFS(owner, repo, filepath, ref);
System.out.println(result);
@@ -11677,7 +11779,7 @@ Name | Type | Description | Notes
**owner** | **String**| owner of the repo |
**repo** | **String**| name of the repo |
**filepath** | **String**| path of the file to get, it should be \"{ref}/{filepath}\". If there is no ref could be inferred, it will be treated as the default branch |
- **ref** | **String**| The name of the commit/branch/tag. Default the repository’s default branch | [optional]
+ **ref** | **String**| The name of the commit/branch/tag. Default to the repository’s default branch | [optional]
### Return type
diff --git a/docs/UpdateFileOptions.md b/docs/UpdateFileOptions.md
index dfd4e30..226c864 100644
--- a/docs/UpdateFileOptions.md
+++ b/docs/UpdateFileOptions.md
@@ -11,5 +11,5 @@ Name | Type | Description | Notes
**fromPath** | **String** | from_path (optional) is the path of the original file which will be moved/renamed to the path in the URL | [optional]
**message** | **String** | message (optional) for the commit of this file. if not supplied, a default message will be used | [optional]
**newBranch** | **String** | new_branch (optional) will make a new branch from `branch` before creating the file | [optional]
-**sha** | **String** | sha is the SHA for the file that already exists |
+**sha** | **String** | the blob ID (SHA) for the file that already exists, it is required for changing existing files |
**signoff** | **Boolean** | Add a Signed-off-by trailer by the committer at the end of the commit log message. | [optional]
diff --git a/src/main/java/org/gitnex/tea4j/v2/apis/RepositoryApi.java b/src/main/java/org/gitnex/tea4j/v2/apis/RepositoryApi.java
index ea64ba9..225b3e5 100644
--- a/src/main/java/org/gitnex/tea4j/v2/apis/RepositoryApi.java
+++ b/src/main/java/org/gitnex/tea4j/v2/apis/RepositoryApi.java
@@ -26,6 +26,7 @@ import org.gitnex.tea4j.v2.models.CombinedStatus;
import org.gitnex.tea4j.v2.models.Commit;
import org.gitnex.tea4j.v2.models.CommitStatus;
import org.gitnex.tea4j.v2.models.Compare;
+import org.gitnex.tea4j.v2.models.ContentsExtResponse;
import org.gitnex.tea4j.v2.models.ContentsResponse;
import org.gitnex.tea4j.v2.models.CreateActionWorkflowDispatch;
import org.gitnex.tea4j.v2.models.CreateBranchProtectionOption;
@@ -1666,7 +1667,8 @@ public interface RepositoryApi {
/**
* Gets the metadata and contents (if a file) of an entry in a repository, or a list of entries if
- * a dir
+ * a dir. This API follows GitHub's design, and it is not easy to use. Recommend users to use
+ * the \"contents-ext\" API instead.
*
* @param owner owner of the repo (required)
* @param repo name of the repo (required)
@@ -1683,7 +1685,35 @@ public interface RepositoryApi {
@retrofit2.http.Query("ref") String ref);
/**
- * Gets the metadata of all the entries of the root dir
+ * The extended \"contents\" API, to get file metadata and/or content, or list a
+ * directory. It guarantees that only one of the response fields is set if the request succeeds.
+ * Users can pass \"includes=file_content\" or
+ * \"includes=lfs_metadata\" to retrieve more fields.
+ * \"includes=file_content\" only works for single file, if you need to retrieve
+ * file contents in batch, use \"file-contents\" API after listing the directory.
+ *
+ * @param owner owner of the repo (required)
+ * @param repo name of the repo (required)
+ * @param filepath path of the dir, file, symlink or submodule in the repo (required)
+ * @param ref the name of the commit/branch/tag, default to the repository’s default branch.
+ * (optional)
+ * @param includes By default this API's response only contains file's metadata. Use
+ * comma-separated \"includes\" options to retrieve more fields. Option
+ * \"file_content\" will try to retrieve the file content, option
+ * \"lfs_metadata\" will try to retrieve LFS metadata. (optional)
+ * @return Call<ContentsExtResponse>
+ */
+ @GET("repos/{owner}/{repo}/contents-ext/{filepath}")
+ Call repoGetContentsExt(
+ @retrofit2.http.Path("owner") String owner,
+ @retrofit2.http.Path("repo") String repo,
+ @retrofit2.http.Path("filepath") String filepath,
+ @retrofit2.http.Query("ref") String ref,
+ @retrofit2.http.Query("includes") String includes);
+
+ /**
+ * Gets the metadata of all the entries of the root dir. This API follows GitHub's design,
+ * and it is not easy to use. Recommend users to use our \"contents-ext\" API instead.
*
* @param owner owner of the repo (required)
* @param repo name of the repo (required)
@@ -1716,7 +1746,7 @@ public interface RepositoryApi {
/**
* Get the metadata and contents of requested files See the POST method. This GET method supports
- * to use JSON encoded request body in query parameter.
+ * using JSON encoded request body in query parameter.
*
* @param owner owner of the repo (required)
* @param repo name of the repo (required)
@@ -2001,7 +2031,7 @@ public interface RepositoryApi {
* @param repo name of the repo (required)
* @param filepath path of the file to get, it should be \"{ref}/{filepath}\". If there
* is no ref could be inferred, it will be treated as the default branch (required)
- * @param ref The name of the commit/branch/tag. Default the repository’s default branch
+ * @param ref The name of the commit/branch/tag. Default to the repository’s default branch
* (optional)
* @return Call<File>
*/
@@ -2019,7 +2049,7 @@ public interface RepositoryApi {
* @param repo name of the repo (required)
* @param filepath path of the file to get, it should be \"{ref}/{filepath}\". If there
* is no ref could be inferred, it will be treated as the default branch (required)
- * @param ref The name of the commit/branch/tag. Default the repository’s default branch
+ * @param ref The name of the commit/branch/tag. Default to the repository’s default branch
* (optional)
* @return Call<File>
*/
diff --git a/src/main/java/org/gitnex/tea4j/v2/models/ChangeFileOperation.java b/src/main/java/org/gitnex/tea4j/v2/models/ChangeFileOperation.java
index ea25492..28e37ff 100644
--- a/src/main/java/org/gitnex/tea4j/v2/models/ChangeFileOperation.java
+++ b/src/main/java/org/gitnex/tea4j/v2/models/ChangeFileOperation.java
@@ -33,11 +33,18 @@ public class ChangeFileOperation implements Serializable {
@SerializedName("from_path")
private String fromPath = null;
- /** indicates what to do with the file */
+ /**
+ * indicates what to do with the file: \"create\" for creating a new file,
+ * \"update\" for updating an existing file, \"upload\" for creating or
+ * updating a file, \"rename\" for renaming a file, and \"delete\" for
+ * deleting an existing file.
+ */
@JsonAdapter(OperationEnum.Adapter.class)
public enum OperationEnum {
CREATE("create"),
UPDATE("update"),
+ UPLOAD("upload"),
+ RENAME("rename"),
DELETE("delete");
private String value;
@@ -94,11 +101,11 @@ public class ChangeFileOperation implements Serializable {
}
/**
- * new or updated file content, must be base64 encoded
+ * new or updated file content, it must be base64 encoded
*
* @return content
*/
- @Schema(description = "new or updated file content, must be base64 encoded")
+ @Schema(description = "new or updated file content, it must be base64 encoded")
public String getContent() {
return content;
}
@@ -132,11 +139,19 @@ public class ChangeFileOperation implements Serializable {
}
/**
- * indicates what to do with the file
+ * indicates what to do with the file: \"create\" for creating a new file,
+ * \"update\" for updating an existing file, \"upload\" for creating or
+ * updating a file, \"rename\" for renaming a file, and \"delete\" for
+ * deleting an existing file.
*
* @return operation
*/
- @Schema(required = true, description = "indicates what to do with the file")
+ @Schema(
+ required = true,
+ description =
+ "indicates what to do with the file: \"create\" for creating a new file, \"update\" for"
+ + " updating an existing file, \"upload\" for creating or updating a file, \"rename\""
+ + " for renaming a file, and \"delete\" for deleting an existing file.")
public OperationEnum getOperation() {
return operation;
}
@@ -170,13 +185,14 @@ public class ChangeFileOperation implements Serializable {
}
/**
- * sha is the SHA for the file that already exists, required for update or delete
+ * the blob ID (SHA) for the file that already exists, required for changing existing files
*
* @return sha
*/
@Schema(
description =
- "sha is the SHA for the file that already exists, required for update or delete")
+ "the blob ID (SHA) for the file that already exists, required for changing existing"
+ + " files")
public String getSha() {
return sha;
}
diff --git a/src/main/java/org/gitnex/tea4j/v2/models/ContentsExtResponse.java b/src/main/java/org/gitnex/tea4j/v2/models/ContentsExtResponse.java
new file mode 100644
index 0000000..de9f646
--- /dev/null
+++ b/src/main/java/org/gitnex/tea4j/v2/models/ContentsExtResponse.java
@@ -0,0 +1,116 @@
+/*
+ * 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;
+
+/** ContentsExtResponse */
+public class ContentsExtResponse implements Serializable {
+ private static final long serialVersionUID = 1L;
+
+ @SerializedName("dir_contents")
+ private List dirContents = null;
+
+ @SerializedName("file_contents")
+ private ContentsResponse fileContents = null;
+
+ public ContentsExtResponse dirContents(List dirContents) {
+ this.dirContents = dirContents;
+ return this;
+ }
+
+ public ContentsExtResponse addDirContentsItem(ContentsResponse dirContentsItem) {
+ if (this.dirContents == null) {
+ this.dirContents = new ArrayList<>();
+ }
+ this.dirContents.add(dirContentsItem);
+ return this;
+ }
+
+ /**
+ * Get dirContents
+ *
+ * @return dirContents
+ */
+ @Schema(description = "")
+ public List getDirContents() {
+ return dirContents;
+ }
+
+ public void setDirContents(List dirContents) {
+ this.dirContents = dirContents;
+ }
+
+ public ContentsExtResponse fileContents(ContentsResponse fileContents) {
+ this.fileContents = fileContents;
+ return this;
+ }
+
+ /**
+ * Get fileContents
+ *
+ * @return fileContents
+ */
+ @Schema(description = "")
+ public ContentsResponse getFileContents() {
+ return fileContents;
+ }
+
+ public void setFileContents(ContentsResponse fileContents) {
+ this.fileContents = fileContents;
+ }
+
+ @Override
+ public boolean equals(java.lang.Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ ContentsExtResponse contentsExtResponse = (ContentsExtResponse) o;
+ return Objects.equals(this.dirContents, contentsExtResponse.dirContents)
+ && Objects.equals(this.fileContents, contentsExtResponse.fileContents);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(dirContents, fileContents);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class ContentsExtResponse {\n");
+
+ sb.append(" dirContents: ").append(toIndentedString(dirContents)).append("\n");
+ sb.append(" fileContents: ").append(toIndentedString(fileContents)).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 ");
+ }
+}
diff --git a/src/main/java/org/gitnex/tea4j/v2/models/ContentsResponse.java b/src/main/java/org/gitnex/tea4j/v2/models/ContentsResponse.java
index 7655ee7..5f39777 100644
--- a/src/main/java/org/gitnex/tea4j/v2/models/ContentsResponse.java
+++ b/src/main/java/org/gitnex/tea4j/v2/models/ContentsResponse.java
@@ -56,6 +56,12 @@ public class ContentsResponse implements Serializable {
@SerializedName("last_committer_date")
private Date lastCommitterDate = null;
+ @SerializedName("lfs_oid")
+ private String lfsOid = null;
+
+ @SerializedName("lfs_size")
+ private Long lfsSize = null;
+
@SerializedName("name")
private String name = null;
@@ -251,6 +257,44 @@ public class ContentsResponse implements Serializable {
this.lastCommitterDate = lastCommitterDate;
}
+ public ContentsResponse lfsOid(String lfsOid) {
+ this.lfsOid = lfsOid;
+ return this;
+ }
+
+ /**
+ * Get lfsOid
+ *
+ * @return lfsOid
+ */
+ @Schema(description = "")
+ public String getLfsOid() {
+ return lfsOid;
+ }
+
+ public void setLfsOid(String lfsOid) {
+ this.lfsOid = lfsOid;
+ }
+
+ public ContentsResponse lfsSize(Long lfsSize) {
+ this.lfsSize = lfsSize;
+ return this;
+ }
+
+ /**
+ * Get lfsSize
+ *
+ * @return lfsSize
+ */
+ @Schema(description = "")
+ public Long getLfsSize() {
+ return lfsSize;
+ }
+
+ public void setLfsSize(Long lfsSize) {
+ this.lfsSize = lfsSize;
+ }
+
public ContentsResponse name(String name) {
this.name = name;
return this;
@@ -424,6 +468,8 @@ public class ContentsResponse implements Serializable {
&& Objects.equals(this.lastAuthorDate, contentsResponse.lastAuthorDate)
&& Objects.equals(this.lastCommitSha, contentsResponse.lastCommitSha)
&& Objects.equals(this.lastCommitterDate, contentsResponse.lastCommitterDate)
+ && Objects.equals(this.lfsOid, contentsResponse.lfsOid)
+ && Objects.equals(this.lfsSize, contentsResponse.lfsSize)
&& Objects.equals(this.name, contentsResponse.name)
&& Objects.equals(this.path, contentsResponse.path)
&& Objects.equals(this.sha, contentsResponse.sha)
@@ -446,6 +492,8 @@ public class ContentsResponse implements Serializable {
lastAuthorDate,
lastCommitSha,
lastCommitterDate,
+ lfsOid,
+ lfsSize,
name,
path,
sha,
@@ -470,6 +518,8 @@ public class ContentsResponse implements Serializable {
sb.append(" lastAuthorDate: ").append(toIndentedString(lastAuthorDate)).append("\n");
sb.append(" lastCommitSha: ").append(toIndentedString(lastCommitSha)).append("\n");
sb.append(" lastCommitterDate: ").append(toIndentedString(lastCommitterDate)).append("\n");
+ sb.append(" lfsOid: ").append(toIndentedString(lfsOid)).append("\n");
+ sb.append(" lfsSize: ").append(toIndentedString(lfsSize)).append("\n");
sb.append(" name: ").append(toIndentedString(name)).append("\n");
sb.append(" path: ").append(toIndentedString(path)).append("\n");
sb.append(" sha: ").append(toIndentedString(sha)).append("\n");
diff --git a/src/main/java/org/gitnex/tea4j/v2/models/DeleteFileOptions.java b/src/main/java/org/gitnex/tea4j/v2/models/DeleteFileOptions.java
index 6685d50..5496532 100644
--- a/src/main/java/org/gitnex/tea4j/v2/models/DeleteFileOptions.java
+++ b/src/main/java/org/gitnex/tea4j/v2/models/DeleteFileOptions.java
@@ -181,11 +181,15 @@ public class DeleteFileOptions implements Serializable {
}
/**
- * sha is the SHA for the file that already exists
+ * the blob ID (SHA) for the file that already exists, it is required for changing existing files
*
* @return sha
*/
- @Schema(required = true, description = "sha is the SHA for the file that already exists")
+ @Schema(
+ required = true,
+ description =
+ "the blob ID (SHA) for the file that already exists, it is required for changing existing"
+ + " files")
public String getSha() {
return sha;
}
diff --git a/src/main/java/org/gitnex/tea4j/v2/models/GitBlobResponse.java b/src/main/java/org/gitnex/tea4j/v2/models/GitBlobResponse.java
index 837d68e..7175108 100644
--- a/src/main/java/org/gitnex/tea4j/v2/models/GitBlobResponse.java
+++ b/src/main/java/org/gitnex/tea4j/v2/models/GitBlobResponse.java
@@ -28,6 +28,12 @@ public class GitBlobResponse implements Serializable {
@SerializedName("encoding")
private String encoding = null;
+ @SerializedName("lfs_oid")
+ private String lfsOid = null;
+
+ @SerializedName("lfs_size")
+ private Long lfsSize = null;
+
@SerializedName("sha")
private String sha = null;
@@ -75,6 +81,44 @@ public class GitBlobResponse implements Serializable {
this.encoding = encoding;
}
+ public GitBlobResponse lfsOid(String lfsOid) {
+ this.lfsOid = lfsOid;
+ return this;
+ }
+
+ /**
+ * Get lfsOid
+ *
+ * @return lfsOid
+ */
+ @Schema(description = "")
+ public String getLfsOid() {
+ return lfsOid;
+ }
+
+ public void setLfsOid(String lfsOid) {
+ this.lfsOid = lfsOid;
+ }
+
+ public GitBlobResponse lfsSize(Long lfsSize) {
+ this.lfsSize = lfsSize;
+ return this;
+ }
+
+ /**
+ * Get lfsSize
+ *
+ * @return lfsSize
+ */
+ @Schema(description = "")
+ public Long getLfsSize() {
+ return lfsSize;
+ }
+
+ public void setLfsSize(Long lfsSize) {
+ this.lfsSize = lfsSize;
+ }
+
public GitBlobResponse sha(String sha) {
this.sha = sha;
return this;
@@ -143,6 +187,8 @@ public class GitBlobResponse implements Serializable {
GitBlobResponse gitBlobResponse = (GitBlobResponse) o;
return Objects.equals(this.content, gitBlobResponse.content)
&& Objects.equals(this.encoding, gitBlobResponse.encoding)
+ && Objects.equals(this.lfsOid, gitBlobResponse.lfsOid)
+ && Objects.equals(this.lfsSize, gitBlobResponse.lfsSize)
&& Objects.equals(this.sha, gitBlobResponse.sha)
&& Objects.equals(this.size, gitBlobResponse.size)
&& Objects.equals(this.url, gitBlobResponse.url);
@@ -150,7 +196,7 @@ public class GitBlobResponse implements Serializable {
@Override
public int hashCode() {
- return Objects.hash(content, encoding, sha, size, url);
+ return Objects.hash(content, encoding, lfsOid, lfsSize, sha, size, url);
}
@Override
@@ -160,6 +206,8 @@ public class GitBlobResponse implements Serializable {
sb.append(" content: ").append(toIndentedString(content)).append("\n");
sb.append(" encoding: ").append(toIndentedString(encoding)).append("\n");
+ sb.append(" lfsOid: ").append(toIndentedString(lfsOid)).append("\n");
+ sb.append(" lfsSize: ").append(toIndentedString(lfsSize)).append("\n");
sb.append(" sha: ").append(toIndentedString(sha)).append("\n");
sb.append(" size: ").append(toIndentedString(size)).append("\n");
sb.append(" url: ").append(toIndentedString(url)).append("\n");
diff --git a/src/main/java/org/gitnex/tea4j/v2/models/UpdateFileOptions.java b/src/main/java/org/gitnex/tea4j/v2/models/UpdateFileOptions.java
index a017ddb..dfbdde3 100644
--- a/src/main/java/org/gitnex/tea4j/v2/models/UpdateFileOptions.java
+++ b/src/main/java/org/gitnex/tea4j/v2/models/UpdateFileOptions.java
@@ -229,11 +229,15 @@ public class UpdateFileOptions implements Serializable {
}
/**
- * sha is the SHA for the file that already exists
+ * the blob ID (SHA) for the file that already exists, it is required for changing existing files
*
* @return sha
*/
- @Schema(required = true, description = "sha is the SHA for the file that already exists")
+ @Schema(
+ required = true,
+ description =
+ "the blob ID (SHA) for the file that already exists, it is required for changing existing"
+ + " files")
public String getSha() {
return sha;
}