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

namespace Google\Cloud\Domains\V1;

use UnexpectedValueException;

/**
 * Notices about special properties of certain domains.
 *
 * Protobuf type <code>google.cloud.domains.v1.DomainNotice</code>
 */
class DomainNotice
{
    /**
     * The notice is undefined.
     *
     * Generated from protobuf enum <code>DOMAIN_NOTICE_UNSPECIFIED = 0;</code>
     */
    const DOMAIN_NOTICE_UNSPECIFIED = 0;
    /**
     * Indicates that the domain is preloaded on the HTTP Strict Transport
     * Security list in browsers. Serving a website on such domain requires
     * an SSL certificate. For details, see
     * [how to get an SSL
     * certificate](https://support.google.com/domains/answer/7638036).
     *
     * Generated from protobuf enum <code>HSTS_PRELOADED = 1;</code>
     */
    const HSTS_PRELOADED = 1;

    private static $valueToName = [
        self::DOMAIN_NOTICE_UNSPECIFIED => 'DOMAIN_NOTICE_UNSPECIFIED',
        self::HSTS_PRELOADED => 'HSTS_PRELOADED',
    ];

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

