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

namespace Google\Cloud\CloudDms\V1;

use UnexpectedValueException;

/**
 * The format for the import rules file.
 *
 * Protobuf type <code>google.cloud.clouddms.v1.ImportRulesFileFormat</code>
 */
class ImportRulesFileFormat
{
    /**
     * Unspecified rules format.
     *
     * Generated from protobuf enum <code>IMPORT_RULES_FILE_FORMAT_UNSPECIFIED = 0;</code>
     */
    const IMPORT_RULES_FILE_FORMAT_UNSPECIFIED = 0;
    /**
     * HarbourBridge session file.
     *
     * Generated from protobuf enum <code>IMPORT_RULES_FILE_FORMAT_HARBOUR_BRIDGE_SESSION_FILE = 1;</code>
     */
    const IMPORT_RULES_FILE_FORMAT_HARBOUR_BRIDGE_SESSION_FILE = 1;
    /**
     * Ora2Pg configuration file.
     *
     * Generated from protobuf enum <code>IMPORT_RULES_FILE_FORMAT_ORATOPG_CONFIG_FILE = 2;</code>
     */
    const IMPORT_RULES_FILE_FORMAT_ORATOPG_CONFIG_FILE = 2;

    private static $valueToName = [
        self::IMPORT_RULES_FILE_FORMAT_UNSPECIFIED => 'IMPORT_RULES_FILE_FORMAT_UNSPECIFIED',
        self::IMPORT_RULES_FILE_FORMAT_HARBOUR_BRIDGE_SESSION_FILE => 'IMPORT_RULES_FILE_FORMAT_HARBOUR_BRIDGE_SESSION_FILE',
        self::IMPORT_RULES_FILE_FORMAT_ORATOPG_CONFIG_FILE => 'IMPORT_RULES_FILE_FORMAT_ORATOPG_CONFIG_FILE',
    ];

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

