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 Details

    • approvalThresholdPolicy

      VotingPolicy.Builder approvalThresholdPolicy(ApprovalThresholdPolicy 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 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.
      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 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.

      This is a convenience method that creates an instance of the ApprovalThresholdPolicy.Builder avoiding the need to create one manually via ApprovalThresholdPolicy.builder().

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to approvalThresholdPolicy(ApprovalThresholdPolicy).

      Parameters:
      approvalThresholdPolicy - a consumer that will call methods on ApprovalThresholdPolicy.Builder
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also: