<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/cloud/dialogflow/cx/v3/data_store_connection.proto

namespace Google\Cloud\Dialogflow\Cx\V3;

use UnexpectedValueException;

/**
 * Type of a data store.
 * Determines how search is performed in the data store.
 *
 * Protobuf type <code>google.cloud.dialogflow.cx.v3.DataStoreType</code>
 */
class DataStoreType
{
    /**
     * Not specified. This value indicates that the data store type is not
     * specified, so it will not be used during search.
     *
     * Generated from protobuf enum <code>DATA_STORE_TYPE_UNSPECIFIED = 0;</code>
     */
    const DATA_STORE_TYPE_UNSPECIFIED = 0;
    /**
     * A data store that contains public web content.
     *
     * Generated from protobuf enum <code>PUBLIC_WEB = 1;</code>
     */
    const PUBLIC_WEB = 1;
    /**
     * A data store that contains unstructured private data.
     *
     * Generated from protobuf enum <code>UNSTRUCTURED = 2;</code>
     */
    const UNSTRUCTURED = 2;
    /**
     * A data store that contains structured data (for example FAQ).
     *
     * Generated from protobuf enum <code>STRUCTURED = 3;</code>
     */
    const STRUCTURED = 3;

    private static $valueToName = [
        self::DATA_STORE_TYPE_UNSPECIFIED => 'DATA_STORE_TYPE_UNSPECIFIED',
        self::PUBLIC_WEB => 'PUBLIC_WEB',
        self::UNSTRUCTURED => 'UNSTRUCTURED',
        self::STRUCTURED => 'STRUCTURED',
    ];

    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);
    }
}

