<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/apps/meet/v2beta/resource.proto

namespace Google\Apps\Meet\V2beta\SpaceConfig;

use UnexpectedValueException;

/**
 * Entry points that can be used to join a meeting.  Example:
 * `meet.google.com`, the Embed SDK Web, or a mobile application.
 *
 * Protobuf type <code>google.apps.meet.v2beta.SpaceConfig.EntryPointAccess</code>
 */
class EntryPointAccess
{
    /**
     * Unused.
     *
     * Generated from protobuf enum <code>ENTRY_POINT_ACCESS_UNSPECIFIED = 0;</code>
     */
    const ENTRY_POINT_ACCESS_UNSPECIFIED = 0;
    /**
     * All entry points are allowed.
     *
     * Generated from protobuf enum <code>ALL = 1;</code>
     */
    const ALL = 1;
    /**
     * Only entry points owned by the Google Cloud project that created the
     * space can be used to join meetings in this space.  Apps can use the Embed
     * SDK Web or mobile Meet SDKs to create owned entry points.
     *
     * Generated from protobuf enum <code>CREATOR_APP_ONLY = 2;</code>
     */
    const CREATOR_APP_ONLY = 2;

    private static $valueToName = [
        self::ENTRY_POINT_ACCESS_UNSPECIFIED => 'ENTRY_POINT_ACCESS_UNSPECIFIED',
        self::ALL => 'ALL',
        self::CREATOR_APP_ONLY => 'CREATOR_APP_ONLY',
    ];

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


