#[non_exhaustive]pub struct ApprovalThresholdPolicyBuilder { /* private fields */ }
Expand description
A builder for ApprovalThresholdPolicy
.
Implementations§
source§impl ApprovalThresholdPolicyBuilder
impl ApprovalThresholdPolicyBuilder
sourcepub fn threshold_percentage(self, input: i32) -> Self
pub fn threshold_percentage(self, input: i32) -> Self
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.
sourcepub fn set_threshold_percentage(self, input: Option<i32>) -> Self
pub fn set_threshold_percentage(self, input: Option<i32>) -> Self
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.
sourcepub fn get_threshold_percentage(&self) -> &Option<i32>
pub fn get_threshold_percentage(&self) -> &Option<i32>
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.
sourcepub fn proposal_duration_in_hours(self, input: i32) -> Self
pub fn proposal_duration_in_hours(self, input: i32) -> Self
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.
sourcepub fn set_proposal_duration_in_hours(self, input: Option<i32>) -> Self
pub fn set_proposal_duration_in_hours(self, input: Option<i32>) -> Self
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.
sourcepub fn get_proposal_duration_in_hours(&self) -> &Option<i32>
pub fn get_proposal_duration_in_hours(&self) -> &Option<i32>
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.
sourcepub fn threshold_comparator(self, input: ThresholdComparator) -> Self
pub fn threshold_comparator(self, input: ThresholdComparator) -> Self
Determines whether the vote percentage must be greater than the ThresholdPercentage
or must be greater than or equal to the ThreholdPercentage
to be approved.
sourcepub fn set_threshold_comparator(
self,
input: Option<ThresholdComparator>
) -> Self
pub fn set_threshold_comparator( self, input: Option<ThresholdComparator> ) -> Self
Determines whether the vote percentage must be greater than the ThresholdPercentage
or must be greater than or equal to the ThreholdPercentage
to be approved.
sourcepub fn get_threshold_comparator(&self) -> &Option<ThresholdComparator>
pub fn get_threshold_comparator(&self) -> &Option<ThresholdComparator>
Determines whether the vote percentage must be greater than the ThresholdPercentage
or must be greater than or equal to the ThreholdPercentage
to be approved.
sourcepub fn build(self) -> ApprovalThresholdPolicy
pub fn build(self) -> ApprovalThresholdPolicy
Consumes the builder and constructs a ApprovalThresholdPolicy
.
Trait Implementations§
source§impl Clone for ApprovalThresholdPolicyBuilder
impl Clone for ApprovalThresholdPolicyBuilder
source§fn clone(&self) -> ApprovalThresholdPolicyBuilder
fn clone(&self) -> ApprovalThresholdPolicyBuilder
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Default for ApprovalThresholdPolicyBuilder
impl Default for ApprovalThresholdPolicyBuilder
source§fn default() -> ApprovalThresholdPolicyBuilder
fn default() -> ApprovalThresholdPolicyBuilder
source§impl PartialEq for ApprovalThresholdPolicyBuilder
impl PartialEq for ApprovalThresholdPolicyBuilder
source§fn eq(&self, other: &ApprovalThresholdPolicyBuilder) -> bool
fn eq(&self, other: &ApprovalThresholdPolicyBuilder) -> bool
self
and other
values to be equal, and is used
by ==
.