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

namespace Google\Cloud\AIPlatform\V1\FeatureView;

use UnexpectedValueException;

/**
 * Service agent type used during data sync.
 *
 * Protobuf type <code>google.cloud.aiplatform.v1.FeatureView.ServiceAgentType</code>
 */
class ServiceAgentType
{
    /**
     * By default, the project-level Vertex AI Service Agent is enabled.
     *
     * Generated from protobuf enum <code>SERVICE_AGENT_TYPE_UNSPECIFIED = 0;</code>
     */
    const SERVICE_AGENT_TYPE_UNSPECIFIED = 0;
    /**
     * Indicates the project-level Vertex AI Service Agent
     * (https://cloud.google.com/vertex-ai/docs/general/access-control#service-agents)
     * will be used during sync jobs.
     *
     * Generated from protobuf enum <code>SERVICE_AGENT_TYPE_PROJECT = 1;</code>
     */
    const SERVICE_AGENT_TYPE_PROJECT = 1;
    /**
     * Enable a FeatureView service account to be created by Vertex AI and
     * output in the field `service_account_email`. This service account will
     * be used to read from the source BigQuery table during sync.
     *
     * Generated from protobuf enum <code>SERVICE_AGENT_TYPE_FEATURE_VIEW = 2;</code>
     */
    const SERVICE_AGENT_TYPE_FEATURE_VIEW = 2;

    private static $valueToName = [
        self::SERVICE_AGENT_TYPE_UNSPECIFIED => 'SERVICE_AGENT_TYPE_UNSPECIFIED',
        self::SERVICE_AGENT_TYPE_PROJECT => 'SERVICE_AGENT_TYPE_PROJECT',
        self::SERVICE_AGENT_TYPE_FEATURE_VIEW => 'SERVICE_AGENT_TYPE_FEATURE_VIEW',
    ];

    public static function name($value)
    {
        if (!isset(self::$valueToName[$value])) {
            throw new UnexpectedValueException(sprintf(
                    'Enum %s has no name defined for value %s', __CLASS__, $value));
        }
        return self::$valueToName[$value];
    }


    public static function value($name)
    {
        $const = __CLASS__ . '::' . strtoupper($name);
        if (!defined($const)) {
            throw new UnexpectedValueException(sprintf(
                    'Enum %s has no value defined for name %s', __CLASS__, $name));
        }
        return constant($const);
    }
}


