<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/cloud/kms/v1/hsm_management.proto

namespace Google\Cloud\Kms\V1\SingleTenantHsmInstance;

use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;

/**
 * Configuration for M of N quorum auth.
 *
 * Generated from protobuf message <code>google.cloud.kms.v1.SingleTenantHsmInstance.QuorumAuth</code>
 */
class QuorumAuth extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. The total number of approvers. This is the N value used
     * for M of N quorum auth. Must be greater than or equal to 3 and less than
     * or equal to 16.
     *
     * Generated from protobuf field <code>int32 total_approver_count = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $total_approver_count = 0;
    /**
     * Output only. The required numbers of approvers. The M value used for M of
     * N quorum auth. Must be greater than or equal to 2 and less than or equal
     * to
     * [total_approver_count][google.cloud.kms.v1.SingleTenantHsmInstance.QuorumAuth.total_approver_count]
     * - 1.
     *
     * Generated from protobuf field <code>int32 required_approver_count = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $required_approver_count = 0;
    /**
     * Output only. The public keys associated with the 2FA keys for M of N
     * quorum auth.
     *
     * Generated from protobuf field <code>repeated string two_factor_public_key_pems = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    private $two_factor_public_key_pems;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $total_approver_count
     *           Required. The total number of approvers. This is the N value used
     *           for M of N quorum auth. Must be greater than or equal to 3 and less than
     *           or equal to 16.
     *     @type int $required_approver_count
     *           Output only. The required numbers of approvers. The M value used for M of
     *           N quorum auth. Must be greater than or equal to 2 and less than or equal
     *           to
     *           [total_approver_count][google.cloud.kms.v1.SingleTenantHsmInstance.QuorumAuth.total_approver_count]
     *           - 1.
     *     @type array<string>|\Google\Protobuf\Internal\RepeatedField $two_factor_public_key_pems
     *           Output only. The public keys associated with the 2FA keys for M of N
     *           quorum auth.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Kms\V1\HsmManagement::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. The total number of approvers. This is the N value used
     * for M of N quorum auth. Must be greater than or equal to 3 and less than
     * or equal to 16.
     *
     * Generated from protobuf field <code>int32 total_approver_count = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return int
     */
    public function getTotalApproverCount()
    {
        return $this->total_approver_count;
    }

    /**
     * Required. The total number of approvers. This is the N value used
     * for M of N quorum auth. Must be greater than or equal to 3 and less than
     * or equal to 16.
     *
     * Generated from protobuf field <code>int32 total_approver_count = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param int $var
     * @return $this
     */
    public function setTotalApproverCount($var)
    {
        GPBUtil::checkInt32($var);
        $this->total_approver_count = $var;

        return $this;
    }

    /**
     * Output only. The required numbers of approvers. The M value used for M of
     * N quorum auth. Must be greater than or equal to 2 and less than or equal
     * to
     * [total_approver_count][google.cloud.kms.v1.SingleTenantHsmInstance.QuorumAuth.total_approver_count]
     * - 1.
     *
     * Generated from protobuf field <code>int32 required_approver_count = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return int
     */
    public function getRequiredApproverCount()
    {
        return $this->required_approver_count;
    }

    /**
     * Output only. The required numbers of approvers. The M value used for M of
     * N quorum auth. Must be greater than or equal to 2 and less than or equal
     * to
     * [total_approver_count][google.cloud.kms.v1.SingleTenantHsmInstance.QuorumAuth.total_approver_count]
     * - 1.
     *
     * Generated from protobuf field <code>int32 required_approver_count = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param int $var
     * @return $this
     */
    public function setRequiredApproverCount($var)
    {
        GPBUtil::checkInt32($var);
        $this->required_approver_count = $var;

        return $this;
    }

    /**
     * Output only. The public keys associated with the 2FA keys for M of N
     * quorum auth.
     *
     * Generated from protobuf field <code>repeated string two_factor_public_key_pems = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getTwoFactorPublicKeyPems()
    {
        return $this->two_factor_public_key_pems;
    }

    /**
     * Output only. The public keys associated with the 2FA keys for M of N
     * quorum auth.
     *
     * Generated from protobuf field <code>repeated string two_factor_public_key_pems = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param array<string>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setTwoFactorPublicKeyPems($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
        $this->two_factor_public_key_pems = $arr;

        return $this;
    }

}


