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

namespace Google\Cloud\Domains\V1alpha2;

use UnexpectedValueException;

/**
 * Notices related to contact information.
 *
 * Protobuf type <code>google.cloud.domains.v1alpha2.ContactNotice</code>
 */
class ContactNotice
{
    /**
     * The notice is undefined.
     *
     * Generated from protobuf enum <code>CONTACT_NOTICE_UNSPECIFIED = 0;</code>
     */
    const CONTACT_NOTICE_UNSPECIFIED = 0;
    /**
     * Required when setting the `privacy` field of `ContactSettings` to
     * `PUBLIC_CONTACT_DATA`, which exposes contact data publicly.
     *
     * Generated from protobuf enum <code>PUBLIC_CONTACT_DATA_ACKNOWLEDGEMENT = 1;</code>
     */
    const PUBLIC_CONTACT_DATA_ACKNOWLEDGEMENT = 1;

    private static $valueToName = [
        self::CONTACT_NOTICE_UNSPECIFIED => 'CONTACT_NOTICE_UNSPECIFIED',
        self::PUBLIC_CONTACT_DATA_ACKNOWLEDGEMENT => 'PUBLIC_CONTACT_DATA_ACKNOWLEDGEMENT',
    ];

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

