/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include namespace Aws { namespace Utils { namespace Json { class JsonValue; class JsonView; } // namespace Json } // namespace Utils namespace ManagedBlockchain { namespace Model { /** *

The voting rules for the network to decide if a proposal is accepted

*

Applies only to Hyperledger Fabric.

See Also:

AWS * API Reference

*/ class VotingPolicy { public: AWS_MANAGEDBLOCKCHAIN_API VotingPolicy(); AWS_MANAGEDBLOCKCHAIN_API VotingPolicy(Aws::Utils::Json::JsonView jsonValue); AWS_MANAGEDBLOCKCHAIN_API VotingPolicy& operator=(Aws::Utils::Json::JsonView jsonValue); AWS_MANAGEDBLOCKCHAIN_API Aws::Utils::Json::JsonValue Jsonize() const; /** *

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.

*/ inline const ApprovalThresholdPolicy& GetApprovalThresholdPolicy() const{ return m_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.

*/ inline bool ApprovalThresholdPolicyHasBeenSet() const { return m_approvalThresholdPolicyHasBeenSet; } /** *

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.

*/ inline void SetApprovalThresholdPolicy(const ApprovalThresholdPolicy& value) { m_approvalThresholdPolicyHasBeenSet = true; m_approvalThresholdPolicy = value; } /** *

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.

*/ inline void SetApprovalThresholdPolicy(ApprovalThresholdPolicy&& value) { m_approvalThresholdPolicyHasBeenSet = true; m_approvalThresholdPolicy = std::move(value); } /** *

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.

*/ inline VotingPolicy& WithApprovalThresholdPolicy(const ApprovalThresholdPolicy& value) { SetApprovalThresholdPolicy(value); return *this;} /** *

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.

*/ inline VotingPolicy& WithApprovalThresholdPolicy(ApprovalThresholdPolicy&& value) { SetApprovalThresholdPolicy(std::move(value)); return *this;} private: ApprovalThresholdPolicy m_approvalThresholdPolicy; bool m_approvalThresholdPolicyHasBeenSet = false; }; } // namespace Model } // namespace ManagedBlockchain } // namespace Aws