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

namespace Google\Cloud\Dataplex\V1\Job;

use UnexpectedValueException;

/**
 * Protobuf type <code>google.cloud.dataplex.v1.Job.Service</code>
 */
class Service
{
    /**
     * Service used to run the job is unspecified.
     *
     * Generated from protobuf enum <code>SERVICE_UNSPECIFIED = 0;</code>
     */
    const SERVICE_UNSPECIFIED = 0;
    /**
     * Dataproc service is used to run this job.
     *
     * Generated from protobuf enum <code>DATAPROC = 1;</code>
     */
    const DATAPROC = 1;

    private static $valueToName = [
        self::SERVICE_UNSPECIFIED => 'SERVICE_UNSPECIFIED',
        self::DATAPROC => 'DATAPROC',
    ];

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


