Interface VotingPolicy.Builder
- All Superinterfaces:
Buildable
,CopyableBuilder<VotingPolicy.Builder,
,VotingPolicy> SdkBuilder<VotingPolicy.Builder,
,VotingPolicy> SdkPojo
- Enclosing class:
VotingPolicy
public static interface VotingPolicy.Builder
extends SdkPojo, CopyableBuilder<VotingPolicy.Builder,VotingPolicy>
-
Method Summary
Modifier and TypeMethodDescriptiondefault VotingPolicy.Builder
approvalThresholdPolicy
(Consumer<ApprovalThresholdPolicy.Builder> approvalThresholdPolicy) Defines the rules for the network for voting on proposals, such as the percentage ofYES
votes required for the proposal to be approved and the duration of the proposal.approvalThresholdPolicy
(ApprovalThresholdPolicy approvalThresholdPolicy) Defines the rules for the network for voting on proposals, such as the percentage ofYES
votes required for the proposal to be approved and the duration of the proposal.Methods inherited from interface software.amazon.awssdk.utils.builder.CopyableBuilder
copy
Methods inherited from interface software.amazon.awssdk.utils.builder.SdkBuilder
applyMutation, build
Methods inherited from interface software.amazon.awssdk.core.SdkPojo
equalsBySdkFields, sdkFields
-
Method Details
-
approvalThresholdPolicy
Defines the rules for the network for voting on proposals, such as the percentage of
YES
votes required for the proposal to be approved and the duration of the proposal. The policy applies to all proposals and is specified when the network is created.- Parameters:
approvalThresholdPolicy
- Defines the rules for the network for voting on proposals, such as the percentage ofYES
votes required for the proposal to be approved and the duration of the proposal. The policy applies to all proposals and is specified when the network is created.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
approvalThresholdPolicy
default VotingPolicy.Builder approvalThresholdPolicy(Consumer<ApprovalThresholdPolicy.Builder> approvalThresholdPolicy) Defines the rules for the network for voting on proposals, such as the percentage of
This is a convenience method that creates an instance of theYES
votes required for the proposal to be approved and the duration of the proposal. The policy applies to all proposals and is specified when the network is created.ApprovalThresholdPolicy.Builder
avoiding the need to create one manually viaApprovalThresholdPolicy.builder()
.When the
Consumer
completes,SdkBuilder.build()
is called immediately and its result is passed toapprovalThresholdPolicy(ApprovalThresholdPolicy)
.- Parameters:
approvalThresholdPolicy
- a consumer that will call methods onApprovalThresholdPolicy.Builder
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-