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

namespace Google\Cloud\CloudDms\V1\EntityIssue;

use UnexpectedValueException;

/**
 * Type of issue.
 *
 * Protobuf type <code>google.cloud.clouddms.v1.EntityIssue.IssueType</code>
 */
class IssueType
{
    /**
     * Unspecified issue type.
     *
     * Generated from protobuf enum <code>ISSUE_TYPE_UNSPECIFIED = 0;</code>
     */
    const ISSUE_TYPE_UNSPECIFIED = 0;
    /**
     * Issue originated from the DDL
     *
     * Generated from protobuf enum <code>ISSUE_TYPE_DDL = 1;</code>
     */
    const ISSUE_TYPE_DDL = 1;
    /**
     * Issue originated during the apply process
     *
     * Generated from protobuf enum <code>ISSUE_TYPE_APPLY = 2;</code>
     */
    const ISSUE_TYPE_APPLY = 2;
    /**
     * Issue originated during the convert process
     *
     * Generated from protobuf enum <code>ISSUE_TYPE_CONVERT = 3;</code>
     */
    const ISSUE_TYPE_CONVERT = 3;

    private static $valueToName = [
        self::ISSUE_TYPE_UNSPECIFIED => 'ISSUE_TYPE_UNSPECIFIED',
        self::ISSUE_TYPE_DDL => 'ISSUE_TYPE_DDL',
        self::ISSUE_TYPE_APPLY => 'ISSUE_TYPE_APPLY',
        self::ISSUE_TYPE_CONVERT => 'ISSUE_TYPE_CONVERT',
    ];

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


