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

namespace Google\Cloud\Datastream\V1\BigQueryDestinationConfig\BlmtConfig;

use UnexpectedValueException;

/**
 * Supported file formats for BigLake managed tables.
 *
 * Protobuf type <code>google.cloud.datastream.v1.BigQueryDestinationConfig.BlmtConfig.FileFormat</code>
 */
class FileFormat
{
    /**
     * Default value.
     *
     * Generated from protobuf enum <code>FILE_FORMAT_UNSPECIFIED = 0;</code>
     */
    const FILE_FORMAT_UNSPECIFIED = 0;
    /**
     * Parquet file format.
     *
     * Generated from protobuf enum <code>PARQUET = 1;</code>
     */
    const PARQUET = 1;

    private static $valueToName = [
        self::FILE_FORMAT_UNSPECIFIED => 'FILE_FORMAT_UNSPECIFIED',
        self::PARQUET => 'PARQUET',
    ];

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


