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

namespace Google\Cloud\AppEngine\V1;

use UnexpectedValueException;

/**
 * Fields that should be returned when an AuthorizedCertificate resource is
 * retrieved.
 *
 * Protobuf type <code>google.appengine.v1.AuthorizedCertificateView</code>
 */
class AuthorizedCertificateView
{
    /**
     * Basic certificate information, including applicable domains and expiration
     * date.
     *
     * Generated from protobuf enum <code>BASIC_CERTIFICATE = 0;</code>
     */
    const BASIC_CERTIFICATE = 0;
    /**
     * The information from `BASIC_CERTIFICATE`, plus detailed information on the
     * domain mappings that have this certificate mapped.
     *
     * Generated from protobuf enum <code>FULL_CERTIFICATE = 1;</code>
     */
    const FULL_CERTIFICATE = 1;

    private static $valueToName = [
        self::BASIC_CERTIFICATE => 'BASIC_CERTIFICATE',
        self::FULL_CERTIFICATE => 'FULL_CERTIFICATE',
    ];

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

