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

namespace Google\Cloud\NetworkConnectivity\V1;

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

/**
 * The auto-accept setting for a group controls whether
 * proposed spokes are automatically attached to the hub. If auto-accept is
 * enabled, the spoke immediately is attached to the hub and becomes part of the
 * group. In this case, the new spoke is in the ACTIVE state.
 * If auto-accept is disabled, the spoke goes to the INACTIVE
 * state, and it must be reviewed and accepted by a hub
 * administrator.
 *
 * Generated from protobuf message <code>google.cloud.networkconnectivity.v1.AutoAccept</code>
 */
class AutoAccept extends \Google\Protobuf\Internal\Message
{
    /**
     * A list of project ids or project numbers for which you want
     * to enable auto-accept. The auto-accept setting is applied to
     * spokes being created or updated in these projects.
     *
     * Generated from protobuf field <code>repeated string auto_accept_projects = 1;</code>
     */
    private $auto_accept_projects;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type array<string>|\Google\Protobuf\Internal\RepeatedField $auto_accept_projects
     *           A list of project ids or project numbers for which you want
     *           to enable auto-accept. The auto-accept setting is applied to
     *           spokes being created or updated in these projects.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Networkconnectivity\V1\Hub::initOnce();
        parent::__construct($data);
    }

    /**
     * A list of project ids or project numbers for which you want
     * to enable auto-accept. The auto-accept setting is applied to
     * spokes being created or updated in these projects.
     *
     * Generated from protobuf field <code>repeated string auto_accept_projects = 1;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getAutoAcceptProjects()
    {
        return $this->auto_accept_projects;
    }

    /**
     * A list of project ids or project numbers for which you want
     * to enable auto-accept. The auto-accept setting is applied to
     * spokes being created or updated in these projects.
     *
     * Generated from protobuf field <code>repeated string auto_accept_projects = 1;</code>
     * @param array<string>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setAutoAcceptProjects($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
        $this->auto_accept_projects = $arr;

        return $this;
    }

}

