@Generated(value="com.amazonaws:aws-java-sdk-code-generator") public class ApprovalThresholdPolicy extends Object implements Serializable, Cloneable, StructuredPojo
A policy type that defines the voting rules for the network. The rules decide if a proposal is approved. Approval may
be based on criteria such as the percentage of YES
votes and the duration of the proposal. The policy
applies to all proposals and is specified when the network is created.
Applies only to Hyperledger Fabric.
Constructor and Description |
---|
ApprovalThresholdPolicy() |
Modifier and Type | Method and Description |
---|---|
ApprovalThresholdPolicy |
clone() |
boolean |
equals(Object obj) |
Integer |
getProposalDurationInHours()
The duration from the time that a proposal is created until it expires.
|
String |
getThresholdComparator()
Determines whether the vote percentage must be greater than the
ThresholdPercentage or must be
greater than or equal to the ThresholdPercentage to be approved. |
Integer |
getThresholdPercentage()
The percentage of votes among all members that must be
YES for a proposal to be approved. |
int |
hashCode() |
void |
marshall(ProtocolMarshaller protocolMarshaller)
Marshalls this structured data using the given
ProtocolMarshaller . |
void |
setProposalDurationInHours(Integer proposalDurationInHours)
The duration from the time that a proposal is created until it expires.
|
void |
setThresholdComparator(String thresholdComparator)
Determines whether the vote percentage must be greater than the
ThresholdPercentage or must be
greater than or equal to the ThresholdPercentage to be approved. |
void |
setThresholdPercentage(Integer thresholdPercentage)
The percentage of votes among all members that must be
YES for a proposal to be approved. |
String |
toString()
Returns a string representation of this object.
|
ApprovalThresholdPolicy |
withProposalDurationInHours(Integer proposalDurationInHours)
The duration from the time that a proposal is created until it expires.
|
ApprovalThresholdPolicy |
withThresholdComparator(String thresholdComparator)
Determines whether the vote percentage must be greater than the
ThresholdPercentage or must be
greater than or equal to the ThresholdPercentage to be approved. |
ApprovalThresholdPolicy |
withThresholdComparator(ThresholdComparator thresholdComparator)
Determines whether the vote percentage must be greater than the
ThresholdPercentage or must be
greater than or equal to the ThresholdPercentage to be approved. |
ApprovalThresholdPolicy |
withThresholdPercentage(Integer thresholdPercentage)
The percentage of votes among all members that must be
YES for a proposal to be approved. |
public void setThresholdPercentage(Integer thresholdPercentage)
The percentage of votes among all members that must be YES
for a proposal to be approved. For
example, a ThresholdPercentage
value of 50
indicates 50%. The
ThresholdComparator
determines the precise comparison. If a ThresholdPercentage
value
of 50
is specified on a network with 10 members, along with a ThresholdComparator
value
of GREATER_THAN
, this indicates that 6 YES
votes are required for the proposal to be
approved.
thresholdPercentage
- The percentage of votes among all members that must be YES
for a proposal to be approved. For
example, a ThresholdPercentage
value of 50
indicates 50%. The
ThresholdComparator
determines the precise comparison. If a ThresholdPercentage
value of 50
is specified on a network with 10 members, along with a
ThresholdComparator
value of GREATER_THAN
, this indicates that 6
YES
votes are required for the proposal to be approved.public Integer getThresholdPercentage()
The percentage of votes among all members that must be YES
for a proposal to be approved. For
example, a ThresholdPercentage
value of 50
indicates 50%. The
ThresholdComparator
determines the precise comparison. If a ThresholdPercentage
value
of 50
is specified on a network with 10 members, along with a ThresholdComparator
value
of GREATER_THAN
, this indicates that 6 YES
votes are required for the proposal to be
approved.
YES
for a proposal to be approved.
For example, a ThresholdPercentage
value of 50
indicates 50%. The
ThresholdComparator
determines the precise comparison. If a ThresholdPercentage
value of 50
is specified on a network with 10 members, along with a
ThresholdComparator
value of GREATER_THAN
, this indicates that 6
YES
votes are required for the proposal to be approved.public ApprovalThresholdPolicy withThresholdPercentage(Integer thresholdPercentage)
The percentage of votes among all members that must be YES
for a proposal to be approved. For
example, a ThresholdPercentage
value of 50
indicates 50%. The
ThresholdComparator
determines the precise comparison. If a ThresholdPercentage
value
of 50
is specified on a network with 10 members, along with a ThresholdComparator
value
of GREATER_THAN
, this indicates that 6 YES
votes are required for the proposal to be
approved.
thresholdPercentage
- The percentage of votes among all members that must be YES
for a proposal to be approved. For
example, a ThresholdPercentage
value of 50
indicates 50%. The
ThresholdComparator
determines the precise comparison. If a ThresholdPercentage
value of 50
is specified on a network with 10 members, along with a
ThresholdComparator
value of GREATER_THAN
, this indicates that 6
YES
votes are required for the proposal to be approved.public void setProposalDurationInHours(Integer proposalDurationInHours)
The duration from the time that a proposal is created until it expires. If members cast neither the required
number of YES
votes to approve the proposal nor the number of NO
votes required to
reject it before the duration expires, the proposal is EXPIRED
and ProposalActions
aren't carried out.
proposalDurationInHours
- The duration from the time that a proposal is created until it expires. If members cast neither the
required number of YES
votes to approve the proposal nor the number of NO
votes
required to reject it before the duration expires, the proposal is EXPIRED
and
ProposalActions
aren't carried out.public Integer getProposalDurationInHours()
The duration from the time that a proposal is created until it expires. If members cast neither the required
number of YES
votes to approve the proposal nor the number of NO
votes required to
reject it before the duration expires, the proposal is EXPIRED
and ProposalActions
aren't carried out.
YES
votes to approve the proposal nor the number of NO
votes
required to reject it before the duration expires, the proposal is EXPIRED
and
ProposalActions
aren't carried out.public ApprovalThresholdPolicy withProposalDurationInHours(Integer proposalDurationInHours)
The duration from the time that a proposal is created until it expires. If members cast neither the required
number of YES
votes to approve the proposal nor the number of NO
votes required to
reject it before the duration expires, the proposal is EXPIRED
and ProposalActions
aren't carried out.
proposalDurationInHours
- The duration from the time that a proposal is created until it expires. If members cast neither the
required number of YES
votes to approve the proposal nor the number of NO
votes
required to reject it before the duration expires, the proposal is EXPIRED
and
ProposalActions
aren't carried out.public void setThresholdComparator(String thresholdComparator)
Determines whether the vote percentage must be greater than the ThresholdPercentage
or must be
greater than or equal to the ThresholdPercentage
to be approved.
thresholdComparator
- Determines whether the vote percentage must be greater than the ThresholdPercentage
or must
be greater than or equal to the ThresholdPercentage
to be approved.ThresholdComparator
public String getThresholdComparator()
Determines whether the vote percentage must be greater than the ThresholdPercentage
or must be
greater than or equal to the ThresholdPercentage
to be approved.
ThresholdPercentage
or must
be greater than or equal to the ThresholdPercentage
to be approved.ThresholdComparator
public ApprovalThresholdPolicy withThresholdComparator(String thresholdComparator)
Determines whether the vote percentage must be greater than the ThresholdPercentage
or must be
greater than or equal to the ThresholdPercentage
to be approved.
thresholdComparator
- Determines whether the vote percentage must be greater than the ThresholdPercentage
or must
be greater than or equal to the ThresholdPercentage
to be approved.ThresholdComparator
public ApprovalThresholdPolicy withThresholdComparator(ThresholdComparator thresholdComparator)
Determines whether the vote percentage must be greater than the ThresholdPercentage
or must be
greater than or equal to the ThresholdPercentage
to be approved.
thresholdComparator
- Determines whether the vote percentage must be greater than the ThresholdPercentage
or must
be greater than or equal to the ThresholdPercentage
to be approved.ThresholdComparator
public String toString()
toString
in class Object
Object.toString()
public ApprovalThresholdPolicy clone()
public void marshall(ProtocolMarshaller protocolMarshaller)
StructuredPojo
ProtocolMarshaller
.marshall
in interface StructuredPojo
protocolMarshaller
- Implementation of ProtocolMarshaller
used to marshall this object's data.