Package io.gitea.model
Class UpdateFileOptions
- java.lang.Object
-
- io.gitea.model.UpdateFileOptions
-
public class UpdateFileOptions extends java.lang.ObjectUpdateFileOptions 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)
-
-
Constructor Summary
Constructors Constructor Description UpdateFileOptions()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description UpdateFileOptionsauthor(Identity author)UpdateFileOptionsbranch(java.lang.String branch)UpdateFileOptionscommitter(Identity committer)UpdateFileOptionscontent(java.lang.String content)UpdateFileOptionsdates(CommitDateOptions dates)booleanequals(java.lang.Object o)UpdateFileOptionsfromPath(java.lang.String fromPath)IdentitygetAuthor()Get authorjava.lang.StringgetBranch()branch (optional) to base this file from.IdentitygetCommitter()Get committerjava.lang.StringgetContent()content must be base64 encodedCommitDateOptionsgetDates()Get datesjava.lang.StringgetFromPath()from_path (optional) is the path of the original file which will be moved/renamed to the path in the URLjava.lang.StringgetMessage()message (optional) for the commit of this file.java.lang.StringgetNewBranch()new_branch (optional) will make a new branch from `branch` before creating the filejava.lang.StringgetSha()sha is the SHA for the file that already existsinthashCode()java.lang.BooleanisSignoff()Add a Signed-off-by trailer by the committer at the end of the commit log message.UpdateFileOptionsmessage(java.lang.String message)UpdateFileOptionsnewBranch(java.lang.String newBranch)voidsetAuthor(Identity author)voidsetBranch(java.lang.String branch)voidsetCommitter(Identity committer)voidsetContent(java.lang.String content)voidsetDates(CommitDateOptions dates)voidsetFromPath(java.lang.String fromPath)voidsetMessage(java.lang.String message)voidsetNewBranch(java.lang.String newBranch)voidsetSha(java.lang.String sha)voidsetSignoff(java.lang.Boolean signoff)UpdateFileOptionssha(java.lang.String sha)UpdateFileOptionssignoff(java.lang.Boolean signoff)java.lang.StringtoString()
-
-
-
Method Detail
-
author
public UpdateFileOptions author(Identity author)
-
getAuthor
public Identity getAuthor()
Get author- Returns:
- author
-
setAuthor
public void setAuthor(Identity author)
-
branch
public UpdateFileOptions branch(java.lang.String branch)
-
getBranch
public java.lang.String getBranch()
branch (optional) to base this file from. if not given, the default branch is used- Returns:
- branch
-
setBranch
public void setBranch(java.lang.String branch)
-
committer
public UpdateFileOptions committer(Identity committer)
-
getCommitter
public Identity getCommitter()
Get committer- Returns:
- committer
-
setCommitter
public void setCommitter(Identity committer)
-
content
public UpdateFileOptions content(java.lang.String content)
-
getContent
public java.lang.String getContent()
content must be base64 encoded- Returns:
- content
-
setContent
public void setContent(java.lang.String content)
-
dates
public UpdateFileOptions dates(CommitDateOptions dates)
-
getDates
public CommitDateOptions getDates()
Get dates- Returns:
- dates
-
setDates
public void setDates(CommitDateOptions dates)
-
fromPath
public UpdateFileOptions fromPath(java.lang.String fromPath)
-
getFromPath
public java.lang.String 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
public void setFromPath(java.lang.String fromPath)
-
message
public UpdateFileOptions message(java.lang.String message)
-
getMessage
public java.lang.String getMessage()
message (optional) for the commit of this file. if not supplied, a default message will be used- Returns:
- message
-
setMessage
public void setMessage(java.lang.String message)
-
newBranch
public UpdateFileOptions newBranch(java.lang.String newBranch)
-
getNewBranch
public java.lang.String getNewBranch()
new_branch (optional) will make a new branch from `branch` before creating the file- Returns:
- newBranch
-
setNewBranch
public void setNewBranch(java.lang.String newBranch)
-
sha
public UpdateFileOptions sha(java.lang.String sha)
-
getSha
public java.lang.String getSha()
sha is the SHA for the file that already exists- Returns:
- sha
-
setSha
public void setSha(java.lang.String sha)
-
signoff
public UpdateFileOptions signoff(java.lang.Boolean signoff)
-
isSignoff
public java.lang.Boolean isSignoff()
Add a Signed-off-by trailer by the committer at the end of the commit log message.- Returns:
- signoff
-
setSignoff
public void setSignoff(java.lang.Boolean signoff)
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-