<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/cloud/talent/v4/common.proto

namespace Google\Cloud\Talent\V4;

use UnexpectedValueException;

/**
 * @deprecated
 * Deprecated. All resources are only visible to the owner.
 * An enum that represents who has view access to the resource.
 *
 * Protobuf type <code>google.cloud.talent.v4.Visibility</code>
 */
class Visibility
{
    /**
     * Default value.
     *
     * Generated from protobuf enum <code>VISIBILITY_UNSPECIFIED = 0;</code>
     */
    const VISIBILITY_UNSPECIFIED = 0;
    /**
     * The resource is only visible to the GCP account who owns it.
     *
     * Generated from protobuf enum <code>ACCOUNT_ONLY = 1;</code>
     */
    const ACCOUNT_ONLY = 1;
    /**
     * The resource is visible to the owner and may be visible to other
     * applications and processes at Google.
     *
     * Generated from protobuf enum <code>SHARED_WITH_GOOGLE = 2;</code>
     */
    const SHARED_WITH_GOOGLE = 2;
    /**
     * The resource is visible to the owner and may be visible to all other API
     * clients.
     *
     * Generated from protobuf enum <code>SHARED_WITH_PUBLIC = 3;</code>
     */
    const SHARED_WITH_PUBLIC = 3;

    private static $valueToName = [
        self::VISIBILITY_UNSPECIFIED => 'VISIBILITY_UNSPECIFIED',
        self::ACCOUNT_ONLY => 'ACCOUNT_ONLY',
        self::SHARED_WITH_GOOGLE => 'SHARED_WITH_GOOGLE',
        self::SHARED_WITH_PUBLIC => 'SHARED_WITH_PUBLIC',
    ];

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

