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

namespace Google\Cloud\AIPlatform\V1;

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

/**
 * Represents configuration for private service connect.
 *
 * Generated from protobuf message <code>google.cloud.aiplatform.v1.PrivateServiceConnectConfig</code>
 */
class PrivateServiceConnectConfig extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. If true, expose the IndexEndpoint via private service connect.
     *
     * Generated from protobuf field <code>bool enable_private_service_connect = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    private $enable_private_service_connect = false;
    /**
     * A list of Projects from which the forwarding rule will target the service
     * attachment.
     *
     * Generated from protobuf field <code>repeated string project_allowlist = 2;</code>
     */
    private $project_allowlist;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type bool $enable_private_service_connect
     *           Required. If true, expose the IndexEndpoint via private service connect.
     *     @type array<string>|\Google\Protobuf\Internal\RepeatedField $project_allowlist
     *           A list of Projects from which the forwarding rule will target the service
     *           attachment.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Aiplatform\V1\ServiceNetworking::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. If true, expose the IndexEndpoint via private service connect.
     *
     * Generated from protobuf field <code>bool enable_private_service_connect = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return bool
     */
    public function getEnablePrivateServiceConnect()
    {
        return $this->enable_private_service_connect;
    }

    /**
     * Required. If true, expose the IndexEndpoint via private service connect.
     *
     * Generated from protobuf field <code>bool enable_private_service_connect = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param bool $var
     * @return $this
     */
    public function setEnablePrivateServiceConnect($var)
    {
        GPBUtil::checkBool($var);
        $this->enable_private_service_connect = $var;

        return $this;
    }

    /**
     * A list of Projects from which the forwarding rule will target the service
     * attachment.
     *
     * Generated from protobuf field <code>repeated string project_allowlist = 2;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getProjectAllowlist()
    {
        return $this->project_allowlist;
    }

    /**
     * A list of Projects from which the forwarding rule will target the service
     * attachment.
     *
     * Generated from protobuf field <code>repeated string project_allowlist = 2;</code>
     * @param array<string>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setProjectAllowlist($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
        $this->project_allowlist = $arr;

        return $this;
    }

}

