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

namespace Google\Cloud\DiscoveryEngine\V1\DataStore;

use UnexpectedValueException;

/**
 * Content config of the data store.
 *
 * Protobuf type <code>google.cloud.discoveryengine.v1.DataStore.ContentConfig</code>
 */
class ContentConfig
{
    /**
     * Default value.
     *
     * Generated from protobuf enum <code>CONTENT_CONFIG_UNSPECIFIED = 0;</code>
     */
    const CONTENT_CONFIG_UNSPECIFIED = 0;
    /**
     * Only contains documents without any
     * [Document.content][google.cloud.discoveryengine.v1.Document.content].
     *
     * Generated from protobuf enum <code>NO_CONTENT = 1;</code>
     */
    const NO_CONTENT = 1;
    /**
     * Only contains documents with
     * [Document.content][google.cloud.discoveryengine.v1.Document.content].
     *
     * Generated from protobuf enum <code>CONTENT_REQUIRED = 2;</code>
     */
    const CONTENT_REQUIRED = 2;
    /**
     * The data store is used for public website search.
     *
     * Generated from protobuf enum <code>PUBLIC_WEBSITE = 3;</code>
     */
    const PUBLIC_WEBSITE = 3;
    /**
     * The data store is used for workspace search. Details of workspace
     * data store are specified in the
     * [WorkspaceConfig][google.cloud.discoveryengine.v1.WorkspaceConfig].
     *
     * Generated from protobuf enum <code>GOOGLE_WORKSPACE = 4;</code>
     */
    const GOOGLE_WORKSPACE = 4;

    private static $valueToName = [
        self::CONTENT_CONFIG_UNSPECIFIED => 'CONTENT_CONFIG_UNSPECIFIED',
        self::NO_CONTENT => 'NO_CONTENT',
        self::CONTENT_REQUIRED => 'CONTENT_REQUIRED',
        self::PUBLIC_WEBSITE => 'PUBLIC_WEBSITE',
        self::GOOGLE_WORKSPACE => 'GOOGLE_WORKSPACE',
    ];

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


