Class Commit
- java.lang.Object
-
- com.amazonaws.services.codecommit.model.Commit
-
- All Implemented Interfaces:
Serializable,Cloneable
public class Commit extends Object implements Serializable, Cloneable
Returns information about a specific commit.
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description Commit()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Commitclone()booleanequals(Object obj)StringgetAdditionalData()Any additional data associated with the specified commit.UserInfogetAuthor()Information about the author of the specified commit.UserInfogetCommitter()Information about the person who committed the specified commit, also known as the committer.StringgetMessage()The message associated with the specified commit.List<String>getParents()The parent list for the specified commit.StringgetTreeId()Tree information for the specified commit.inthashCode()voidsetAdditionalData(String additionalData)Any additional data associated with the specified commit.voidsetAuthor(UserInfo author)Information about the author of the specified commit.voidsetCommitter(UserInfo committer)Information about the person who committed the specified commit, also known as the committer.voidsetMessage(String message)The message associated with the specified commit.voidsetParents(Collection<String> parents)The parent list for the specified commit.voidsetTreeId(String treeId)Tree information for the specified commit.StringtoString()Returns a string representation of this object; useful for testing and debugging.CommitwithAdditionalData(String additionalData)Any additional data associated with the specified commit.CommitwithAuthor(UserInfo author)Information about the author of the specified commit.CommitwithCommitter(UserInfo committer)Information about the person who committed the specified commit, also known as the committer.CommitwithMessage(String message)The message associated with the specified commit.CommitwithParents(String... parents)The parent list for the specified commit.CommitwithParents(Collection<String> parents)The parent list for the specified commit.CommitwithTreeId(String treeId)Tree information for the specified commit.
-
-
-
Method Detail
-
setTreeId
public void setTreeId(String treeId)
Tree information for the specified commit.
- Parameters:
treeId- Tree information for the specified commit.
-
getTreeId
public String getTreeId()
Tree information for the specified commit.
- Returns:
- Tree information for the specified commit.
-
withTreeId
public Commit withTreeId(String treeId)
Tree information for the specified commit.
- Parameters:
treeId- Tree information for the specified commit.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
getParents
public List<String> getParents()
The parent list for the specified commit.
- Returns:
- The parent list for the specified commit.
-
setParents
public void setParents(Collection<String> parents)
The parent list for the specified commit.
- Parameters:
parents- The parent list for the specified commit.
-
withParents
public Commit withParents(String... parents)
The parent list for the specified commit.
NOTE: This method appends the values to the existing list (if any). Use
setParents(java.util.Collection)orwithParents(java.util.Collection)if you want to override the existing values.- Parameters:
parents- The parent list for the specified commit.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
withParents
public Commit withParents(Collection<String> parents)
The parent list for the specified commit.
- Parameters:
parents- The parent list for the specified commit.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setMessage
public void setMessage(String message)
The message associated with the specified commit.
- Parameters:
message- The message associated with the specified commit.
-
getMessage
public String getMessage()
The message associated with the specified commit.
- Returns:
- The message associated with the specified commit.
-
withMessage
public Commit withMessage(String message)
The message associated with the specified commit.
- Parameters:
message- The message associated with the specified commit.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setAuthor
public void setAuthor(UserInfo author)
Information about the author of the specified commit.
- Parameters:
author- Information about the author of the specified commit.
-
getAuthor
public UserInfo getAuthor()
Information about the author of the specified commit.
- Returns:
- Information about the author of the specified commit.
-
withAuthor
public Commit withAuthor(UserInfo author)
Information about the author of the specified commit.
- Parameters:
author- Information about the author of the specified commit.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setCommitter
public void setCommitter(UserInfo committer)
Information about the person who committed the specified commit, also known as the committer. For more information about the difference between an author and a committer in Git, see Viewing the Commit History in Pro Git by Scott Chacon and Ben Straub.
- Parameters:
committer- Information about the person who committed the specified commit, also known as the committer. For more information about the difference between an author and a committer in Git, see Viewing the Commit History in Pro Git by Scott Chacon and Ben Straub.
-
getCommitter
public UserInfo getCommitter()
Information about the person who committed the specified commit, also known as the committer. For more information about the difference between an author and a committer in Git, see Viewing the Commit History in Pro Git by Scott Chacon and Ben Straub.
- Returns:
- Information about the person who committed the specified commit, also known as the committer. For more information about the difference between an author and a committer in Git, see Viewing the Commit History in Pro Git by Scott Chacon and Ben Straub.
-
withCommitter
public Commit withCommitter(UserInfo committer)
Information about the person who committed the specified commit, also known as the committer. For more information about the difference between an author and a committer in Git, see Viewing the Commit History in Pro Git by Scott Chacon and Ben Straub.
- Parameters:
committer- Information about the person who committed the specified commit, also known as the committer. For more information about the difference between an author and a committer in Git, see Viewing the Commit History in Pro Git by Scott Chacon and Ben Straub.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setAdditionalData
public void setAdditionalData(String additionalData)
Any additional data associated with the specified commit.
- Parameters:
additionalData- Any additional data associated with the specified commit.
-
getAdditionalData
public String getAdditionalData()
Any additional data associated with the specified commit.
- Returns:
- Any additional data associated with the specified commit.
-
withAdditionalData
public Commit withAdditionalData(String additionalData)
Any additional data associated with the specified commit.
- Parameters:
additionalData- Any additional data associated with the specified commit.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
toString
public String toString()
Returns a string representation of this object; useful for testing and debugging.- Overrides:
toStringin classObject- Returns:
- A string representation of this object.
- See Also:
Object.toString()
-
-