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

namespace Google\Cloud\Dataflow\V1beta3;

use UnexpectedValueException;

/**
 * Type of transform or stage operation.
 *
 * Protobuf type <code>google.dataflow.v1beta3.KindType</code>
 */
class KindType
{
    /**
     * Unrecognized transform type.
     *
     * Generated from protobuf enum <code>UNKNOWN_KIND = 0;</code>
     */
    const UNKNOWN_KIND = 0;
    /**
     * ParDo transform.
     *
     * Generated from protobuf enum <code>PAR_DO_KIND = 1;</code>
     */
    const PAR_DO_KIND = 1;
    /**
     * Group By Key transform.
     *
     * Generated from protobuf enum <code>GROUP_BY_KEY_KIND = 2;</code>
     */
    const GROUP_BY_KEY_KIND = 2;
    /**
     * Flatten transform.
     *
     * Generated from protobuf enum <code>FLATTEN_KIND = 3;</code>
     */
    const FLATTEN_KIND = 3;
    /**
     * Read transform.
     *
     * Generated from protobuf enum <code>READ_KIND = 4;</code>
     */
    const READ_KIND = 4;
    /**
     * Write transform.
     *
     * Generated from protobuf enum <code>WRITE_KIND = 5;</code>
     */
    const WRITE_KIND = 5;
    /**
     * Constructs from a constant value, such as with Create.of.
     *
     * Generated from protobuf enum <code>CONSTANT_KIND = 6;</code>
     */
    const CONSTANT_KIND = 6;
    /**
     * Creates a Singleton view of a collection.
     *
     * Generated from protobuf enum <code>SINGLETON_KIND = 7;</code>
     */
    const SINGLETON_KIND = 7;
    /**
     * Opening or closing a shuffle session, often as part of a GroupByKey.
     *
     * Generated from protobuf enum <code>SHUFFLE_KIND = 8;</code>
     */
    const SHUFFLE_KIND = 8;

    private static $valueToName = [
        self::UNKNOWN_KIND => 'UNKNOWN_KIND',
        self::PAR_DO_KIND => 'PAR_DO_KIND',
        self::GROUP_BY_KEY_KIND => 'GROUP_BY_KEY_KIND',
        self::FLATTEN_KIND => 'FLATTEN_KIND',
        self::READ_KIND => 'READ_KIND',
        self::WRITE_KIND => 'WRITE_KIND',
        self::CONSTANT_KIND => 'CONSTANT_KIND',
        self::SINGLETON_KIND => 'SINGLETON_KIND',
        self::SHUFFLE_KIND => 'SHUFFLE_KIND',
    ];

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

