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

namespace Google\Cloud\AIPlatform\V1;

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

/**
 * Used to set up the auth on the DeployedIndex's private endpoint.
 *
 * Generated from protobuf message <code>google.cloud.aiplatform.v1.DeployedIndexAuthConfig</code>
 */
class DeployedIndexAuthConfig extends \Google\Protobuf\Internal\Message
{
    /**
     * Defines the authentication provider that the DeployedIndex uses.
     *
     * Generated from protobuf field <code>.google.cloud.aiplatform.v1.DeployedIndexAuthConfig.AuthProvider auth_provider = 1;</code>
     */
    protected $auth_provider = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Cloud\AIPlatform\V1\DeployedIndexAuthConfig\AuthProvider $auth_provider
     *           Defines the authentication provider that the DeployedIndex uses.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Aiplatform\V1\IndexEndpoint::initOnce();
        parent::__construct($data);
    }

    /**
     * Defines the authentication provider that the DeployedIndex uses.
     *
     * Generated from protobuf field <code>.google.cloud.aiplatform.v1.DeployedIndexAuthConfig.AuthProvider auth_provider = 1;</code>
     * @return \Google\Cloud\AIPlatform\V1\DeployedIndexAuthConfig\AuthProvider|null
     */
    public function getAuthProvider()
    {
        return $this->auth_provider;
    }

    public function hasAuthProvider()
    {
        return isset($this->auth_provider);
    }

    public function clearAuthProvider()
    {
        unset($this->auth_provider);
    }

    /**
     * Defines the authentication provider that the DeployedIndex uses.
     *
     * Generated from protobuf field <code>.google.cloud.aiplatform.v1.DeployedIndexAuthConfig.AuthProvider auth_provider = 1;</code>
     * @param \Google\Cloud\AIPlatform\V1\DeployedIndexAuthConfig\AuthProvider $var
     * @return $this
     */
    public function setAuthProvider($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\DeployedIndexAuthConfig\AuthProvider::class);
        $this->auth_provider = $var;

        return $this;
    }

}

