Class ApprovalInfo
- java.lang.Object
-
- com.google.gerrit.extensions.common.AccountInfo
-
- com.google.gerrit.extensions.common.ApprovalInfo
-
public class ApprovalInfo extends AccountInfo
Representation of an approval in the REST API.This class determines the JSON format of approvals in the REST API.
An approval is a vote of a user for a label on a change.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.google.gerrit.extensions.common.AccountInfo
AccountInfo.Tags
-
-
Field Summary
Fields Modifier and Type Field Description Timestamp
date
The time and date describing when the approval was made.VotingRangeInfo
permittedVotingRange
The range the user is authorized to vote on that label.Boolean
postSubmit
Whether this vote was made after the change was submitted.String
tag
Tag that was set when posting the review that created this approval.Integer
value
The vote that the user has given for the label.-
Fields inherited from class com.google.gerrit.extensions.common.AccountInfo
_accountId, _moreAccounts, avatars, displayName, email, inactive, name, secondaryEmails, status, tags, username
-
-
Constructor Summary
Constructors Constructor Description ApprovalInfo(Integer id)
ApprovalInfo(Integer id, Integer value, VotingRangeInfo permittedVotingRange, String tag, Timestamp date)
ApprovalInfo(Integer id, Integer value, VotingRangeInfo permittedVotingRange, String tag, Instant date)
-
-
-
Field Detail
-
tag
public String tag
Tag that was set when posting the review that created this approval.Web UIs may use the tag to filter out approvals, e.g. initially hide approvals that have a tag that starts with the
autogenerated:
prefix.
-
value
public Integer value
The vote that the user has given for the label.If present and zero, the user is permitted to vote on the label. If absent, the user is not permitted to vote on that label.
-
date
public Timestamp date
The time and date describing when the approval was made.
-
postSubmit
public Boolean postSubmit
Whether this vote was made after the change was submitted.
-
permittedVotingRange
public VotingRangeInfo permittedVotingRange
The range the user is authorized to vote on that label.If present, the user is permitted to vote on the label regarding the range values. If absent, the user is not permitted to vote on that label.
-
-
Constructor Detail
-
ApprovalInfo
public ApprovalInfo(Integer id)
-
ApprovalInfo
public ApprovalInfo(Integer id, Integer value, VotingRangeInfo permittedVotingRange, String tag, Timestamp date)
-
ApprovalInfo
public ApprovalInfo(Integer id, Integer value, VotingRangeInfo permittedVotingRange, String tag, Instant date)
-
-
Method Detail
-
setDate
public void setDate(Instant date)
-
equals
public boolean equals(Object o)
- Overrides:
equals
in classAccountInfo
-
toString
public String toString()
- Overrides:
toString
in classAccountInfo
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classAccountInfo
-
-