Class CreateFileOptions
java.lang.Object
build.cursed.genapi.forgejo.model.CreateFileOptions
@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 CreateFileOptions
extends Object
CreateFileOptions options for creating 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 CreateFileOptionsCreate an instance of CreateFileOptions given an JSON stringGet authorbranch (optional) to base this file from.Get committercontent must be base64 encodedgetDates()Get datesmessage (optional) for the commit of this file.new_branch (optional) will make a new branch from `branch` before creating the fileAdd 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) voidsetMessage(String message) voidsetNewBranch(String newBranch) voidsetSignoff(Boolean signoff) toJson()Convert an instance of CreateFileOptions 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_MESSAGE
- See Also:
-
SERIALIZED_NAME_NEW_BRANCH
- See Also:
-
SERIALIZED_NAME_SIGNOFF
- See Also:
-
openapiFields
-
openapiRequiredFields
-
-
Constructor Details
-
CreateFileOptions
public CreateFileOptions()
-
-
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
-
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
-
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 CreateFileOptions
-
fromJson
Create an instance of CreateFileOptions given an JSON string- Parameters:
jsonString- JSON string- Returns:
- An instance of CreateFileOptions
- Throws:
IOException- if the JSON string is invalid with respect to CreateFileOptions
-
toJson
Convert an instance of CreateFileOptions to an JSON string- Returns:
- JSON string
-