Class ChangeFileOperation
java.lang.Object
build.cursed.genapi.forgejo.model.ChangeFileOperation
@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 ChangeFileOperation
extends Object
ChangeFileOperation for creating, updating or deleting a file
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic enumindicates what to do with the file -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanstatic ChangeFileOperationCreate an instance of ChangeFileOperation given an JSON stringnew or updated file content, must be base64 encodedold path of the file to moveindicates what to do with the filegetPath()path to the existing or new filegetSha()sha is the SHA for the file that already exists, required for update or deleteinthashCode()operation(ChangeFileOperation.OperationEnum operation) voidsetContent(String content) voidsetFromPath(String fromPath) voidsetOperation(ChangeFileOperation.OperationEnum operation) voidvoidtoJson()Convert an instance of ChangeFileOperation 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_CONTENT
- See Also:
-
SERIALIZED_NAME_FROM_PATH
- See Also:
-
SERIALIZED_NAME_OPERATION
- See Also:
-
SERIALIZED_NAME_PATH
- See Also:
-
SERIALIZED_NAME_SHA
- See Also:
-
openapiFields
-
openapiRequiredFields
-
-
Constructor Details
-
ChangeFileOperation
public ChangeFileOperation()
-
-
Method Details
-
content
-
getContent
new or updated file content, must be base64 encoded- Returns:
- content
-
setContent
-
fromPath
-
getFromPath
old path of the file to move- Returns:
- fromPath
-
setFromPath
-
operation
-
getOperation
indicates what to do with the file- Returns:
- operation
-
setOperation
-
path
-
getPath
path to the existing or new file- Returns:
- path
-
setPath
-
sha
-
getSha
sha is the SHA for the file that already exists, required for update or delete- Returns:
- sha
-
setSha
-
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 ChangeFileOperation
-
fromJson
Create an instance of ChangeFileOperation given an JSON string- Parameters:
jsonString- JSON string- Returns:
- An instance of ChangeFileOperation
- Throws:
IOException- if the JSON string is invalid with respect to ChangeFileOperation
-
toJson
Convert an instance of ChangeFileOperation to an JSON string- Returns:
- JSON string
-