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.BuilderapprovalThresholdPolicy(Consumer<ApprovalThresholdPolicy.Builder> approvalThresholdPolicy) Defines the rules for the network for voting on proposals, such as the percentage ofYESvotes 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 ofYESvotes required for the proposal to be approved and the duration of the proposal.Methods inherited from interface software.amazon.awssdk.utils.builder.CopyableBuilder
copyMethods inherited from interface software.amazon.awssdk.utils.builder.SdkBuilder
applyMutation, buildMethods 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
YESvotes 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 ofYESvotes 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 theYESvotes 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.Builderavoiding the need to create one manually viaApprovalThresholdPolicy.builder().When the
Consumercompletes,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:
-