Class ContentsResponse
java.lang.Object
build.cursed.genapi.forgejo.model.ContentsResponse
@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen",
date="2026-09-28T16:24:31.414706+02:00[Europe/Stockholm]",
comments="Generator version: 7.21.0")
public class ContentsResponse
extends Object
ContentsResponse contains information about a repo's entry's (dir, file, symlink, submodule) metadata and content
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondownloadUrl(String downloadUrl) booleanstatic ContentsResponseCreate an instance of ContentsResponse given an JSON string`content` is populated when `type` is `file`, otherwise nullGet downloadUrl`encoding` is populated when `type` is `file`, otherwise nullGet gitUrlGet htmlUrlGet lastCommitShaGet lastCommitWhengetLinks()Get linksgetName()Get namegetPath()Get pathgetSha()Get shagetSize()Get size`submodule_git_url` is populated when `type` is `submodule`, otherwise null`target` is populated when `type` is `symlink`, otherwise nullgetType()`type` will be `file`, `dir`, `symlink`, or `submodule`getUrl()Get urlinthashCode()lastCommitSha(String lastCommitSha) lastCommitWhen(OffsetDateTime lastCommitWhen) links(FileLinksResponse links) voidsetContent(String content) voidsetDownloadUrl(String downloadUrl) voidsetEncoding(String encoding) voidvoidsetHtmlUrl(String htmlUrl) voidsetLastCommitSha(String lastCommitSha) voidsetLastCommitWhen(OffsetDateTime lastCommitWhen) voidsetLinks(FileLinksResponse links) voidvoidvoidvoidvoidsetSubmoduleGitUrl(String submoduleGitUrl) voidvoidvoidsubmoduleGitUrl(String submoduleGitUrl) toJson()Convert an instance of ContentsResponse to an JSON stringtoString()static voidvalidateJsonElement(com.google.gson.JsonElement jsonElement) Validates the JSON Element and throws an exception if issues found
-
Field Details
-
SERIALIZED_NAME_LINKS
- See Also:
-
SERIALIZED_NAME_CONTENT
- See Also:
-
SERIALIZED_NAME_DOWNLOAD_URL
- See Also:
-
SERIALIZED_NAME_ENCODING
- See Also:
-
SERIALIZED_NAME_GIT_URL
- See Also:
-
SERIALIZED_NAME_HTML_URL
- See Also:
-
SERIALIZED_NAME_LAST_COMMIT_SHA
- See Also:
-
SERIALIZED_NAME_LAST_COMMIT_WHEN
- See Also:
-
SERIALIZED_NAME_NAME
- See Also:
-
SERIALIZED_NAME_PATH
- See Also:
-
SERIALIZED_NAME_SHA
- See Also:
-
SERIALIZED_NAME_SIZE
- See Also:
-
SERIALIZED_NAME_SUBMODULE_GIT_URL
- See Also:
-
SERIALIZED_NAME_TARGET
- See Also:
-
SERIALIZED_NAME_TYPE
- See Also:
-
SERIALIZED_NAME_URL
- See Also:
-
openapiFields
-
openapiRequiredFields
-
-
Constructor Details
-
ContentsResponse
public ContentsResponse()
-
-
Method Details
-
links
-
getLinks
Get links- Returns:
- links
-
setLinks
-
content
-
getContent
`content` is populated when `type` is `file`, otherwise null- Returns:
- content
-
setContent
-
downloadUrl
-
getDownloadUrl
Get downloadUrl- Returns:
- downloadUrl
-
setDownloadUrl
-
encoding
-
getEncoding
`encoding` is populated when `type` is `file`, otherwise null- Returns:
- encoding
-
setEncoding
-
gitUrl
-
getGitUrl
Get gitUrl- Returns:
- gitUrl
-
setGitUrl
-
htmlUrl
-
getHtmlUrl
Get htmlUrl- Returns:
- htmlUrl
-
setHtmlUrl
-
lastCommitSha
-
getLastCommitSha
Get lastCommitSha- Returns:
- lastCommitSha
-
setLastCommitSha
-
lastCommitWhen
-
getLastCommitWhen
Get lastCommitWhen- Returns:
- lastCommitWhen
-
setLastCommitWhen
-
name
-
getName
Get name- Returns:
- name
-
setName
-
path
-
getPath
Get path- Returns:
- path
-
setPath
-
sha
-
getSha
Get sha- Returns:
- sha
-
setSha
-
size
-
getSize
Get size- Returns:
- size
-
setSize
-
submoduleGitUrl
-
getSubmoduleGitUrl
`submodule_git_url` is populated when `type` is `submodule`, otherwise null- Returns:
- submoduleGitUrl
-
setSubmoduleGitUrl
-
target
-
getTarget
`target` is populated when `type` is `symlink`, otherwise null- Returns:
- target
-
setTarget
-
type
-
getType
`type` will be `file`, `dir`, `symlink`, or `submodule`- Returns:
- type
-
setType
-
url
-
getUrl
Get url- Returns:
- url
-
setUrl
-
equals
-
hashCode
public int hashCode() -
toString
-
validateJsonElement
Validates the JSON Element and throws an exception if issues found- Parameters:
jsonElement- JSON Element- Throws:
IOException- if the JSON Element is invalid with respect to ContentsResponse
-
fromJson
Create an instance of ContentsResponse given an JSON string- Parameters:
jsonString- JSON string- Returns:
- An instance of ContentsResponse
- Throws:
IOException- if the JSON string is invalid with respect to ContentsResponse
-
toJson
Convert an instance of ContentsResponse to an JSON string- Returns:
- JSON string
-