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

namespace Google\Cloud\Dataplex\V1\Schema;

use UnexpectedValueException;

/**
 * The structure of paths within the entity, which represent partitions.
 *
 * Protobuf type <code>google.cloud.dataplex.v1.Schema.PartitionStyle</code>
 */
class PartitionStyle
{
    /**
     * PartitionStyle unspecified
     *
     * Generated from protobuf enum <code>PARTITION_STYLE_UNSPECIFIED = 0;</code>
     */
    const PARTITION_STYLE_UNSPECIFIED = 0;
    /**
     * Partitions are hive-compatible.
     * Examples: `gs://bucket/path/to/table/dt=2019-10-31/lang=en`,
     * `gs://bucket/path/to/table/dt=2019-10-31/lang=en/late`.
     *
     * Generated from protobuf enum <code>HIVE_COMPATIBLE = 1;</code>
     */
    const HIVE_COMPATIBLE = 1;

    private static $valueToName = [
        self::PARTITION_STYLE_UNSPECIFIED => 'PARTITION_STYLE_UNSPECIFIED',
        self::HIVE_COMPATIBLE => 'HIVE_COMPATIBLE',
    ];

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


