<?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;

    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',
    ];

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


