Class UpdateFileOptions
java.lang.Object
build.cursed.genapi.forgejo.model.UpdateFileOptions
@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen",
date="2026-09-28T10:48:29.723777+02:00[Europe/Stockholm]",
comments="Generator version: 7.21.0")
public class UpdateFileOptions
extends Object
UpdateFileOptions options for updating files Note: `author` and `committer` are optional (if only one is given, it will be used for the other, otherwise the authenticated user will be used)
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondates(CommitDateOptions dates) booleanstatic UpdateFileOptionsCreate an instance of UpdateFileOptions given an JSON stringGet authorbranch (optional) to base this file from.Get committercontent must be base64 encodedgetDates()Get datesfrom_path (optional) is the path of the original file which will be moved/renamed to the path in the URLmessage (optional) for the commit of this file.new_branch (optional) will make a new branch from `branch` before creating the filegetSha()sha is the SHA for the file that already existsAdd a Signed-off-by trailer by the committer at the end of the commit log message.inthashCode()voidvoidvoidsetCommitter(Identity committer) voidsetContent(String content) voidsetDates(CommitDateOptions dates) voidsetFromPath(String fromPath) voidsetMessage(String message) voidsetNewBranch(String newBranch) voidvoidsetSignoff(Boolean signoff) toJson()Convert an instance of UpdateFileOptions 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_AUTHOR
- See Also:
-
SERIALIZED_NAME_BRANCH
- See Also:
-
SERIALIZED_NAME_COMMITTER
- See Also:
-
SERIALIZED_NAME_CONTENT
- See Also:
-
SERIALIZED_NAME_DATES
- See Also:
-
SERIALIZED_NAME_FROM_PATH
- See Also:
-
SERIALIZED_NAME_MESSAGE
- See Also:
-
SERIALIZED_NAME_NEW_BRANCH
- See Also:
-
SERIALIZED_NAME_SHA
- See Also:
-
SERIALIZED_NAME_SIGNOFF
- See Also:
-
openapiFields
-
openapiRequiredFields
-
-
Constructor Details
-
UpdateFileOptions
public UpdateFileOptions()
-
-
Method Details
-
author
-
getAuthor
Get author- Returns:
- author
-
setAuthor
-
branch
-
getBranch
branch (optional) to base this file from. if not given, the default branch is used- Returns:
- branch
-
setBranch
-
committer
-
getCommitter
Get committer- Returns:
- committer
-
setCommitter
-
content
-
getContent
content must be base64 encoded- Returns:
- content
-
setContent
-
dates
-
getDates
Get dates- Returns:
- dates
-
setDates
-
fromPath
-
getFromPath
from_path (optional) is the path of the original file which will be moved/renamed to the path in the URL- Returns:
- fromPath
-
setFromPath
-
message
-
getMessage
message (optional) for the commit of this file. if not supplied, a default message will be used- Returns:
- message
-
setMessage
-
newBranch
-
getNewBranch
new_branch (optional) will make a new branch from `branch` before creating the file- Returns:
- newBranch
-
setNewBranch
-
sha
-
getSha
sha is the SHA for the file that already exists- Returns:
- sha
-
setSha
-
signoff
-
getSignoff
Add a Signed-off-by trailer by the committer at the end of the commit log message.- Returns:
- signoff
-
setSignoff
-
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 UpdateFileOptions
-
fromJson
Create an instance of UpdateFileOptions given an JSON string- Parameters:
jsonString- JSON string- Returns:
- An instance of UpdateFileOptions
- Throws:
IOException- if the JSON string is invalid with respect to UpdateFileOptions
-
toJson
Convert an instance of UpdateFileOptions to an JSON string- Returns:
- JSON string
-