<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/dataflow/v1beta3/jobs.proto

namespace Google\Cloud\Dataflow\V1beta3;

use UnexpectedValueException;

/**
 * Selector for how much information is returned in Job responses.
 *
 * Protobuf type <code>google.dataflow.v1beta3.JobView</code>
 */
class JobView
{
    /**
     * The job view to return isn't specified, or is unknown.
     * Responses will contain at least the `JOB_VIEW_SUMMARY` information,
     * and may contain additional information.
     *
     * Generated from protobuf enum <code>JOB_VIEW_UNKNOWN = 0;</code>
     */
    const JOB_VIEW_UNKNOWN = 0;
    /**
     * Request summary information only:
     * Project ID, Job ID, job name, job type, job status, start/end time,
     * and Cloud SDK version details.
     *
     * Generated from protobuf enum <code>JOB_VIEW_SUMMARY = 1;</code>
     */
    const JOB_VIEW_SUMMARY = 1;
    /**
     * Request all information available for this job.
     *
     * Generated from protobuf enum <code>JOB_VIEW_ALL = 2;</code>
     */
    const JOB_VIEW_ALL = 2;
    /**
     * Request summary info and limited job description data for steps, labels and
     * environment.
     *
     * Generated from protobuf enum <code>JOB_VIEW_DESCRIPTION = 3;</code>
     */
    const JOB_VIEW_DESCRIPTION = 3;

    private static $valueToName = [
        self::JOB_VIEW_UNKNOWN => 'JOB_VIEW_UNKNOWN',
        self::JOB_VIEW_SUMMARY => 'JOB_VIEW_SUMMARY',
        self::JOB_VIEW_ALL => 'JOB_VIEW_ALL',
        self::JOB_VIEW_DESCRIPTION => 'JOB_VIEW_DESCRIPTION',
    ];

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

