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

namespace Google\Cloud\Dataplex\V1\StorageFormat;

use UnexpectedValueException;

/**
 * The specific file format of the data.
 *
 * Protobuf type <code>google.cloud.dataplex.v1.StorageFormat.Format</code>
 */
class Format
{
    /**
     * Format unspecified.
     *
     * Generated from protobuf enum <code>FORMAT_UNSPECIFIED = 0;</code>
     */
    const FORMAT_UNSPECIFIED = 0;
    /**
     * Parquet-formatted structured data.
     *
     * Generated from protobuf enum <code>PARQUET = 1;</code>
     */
    const PARQUET = 1;
    /**
     * Avro-formatted structured data.
     *
     * Generated from protobuf enum <code>AVRO = 2;</code>
     */
    const AVRO = 2;
    /**
     * Orc-formatted structured data.
     *
     * Generated from protobuf enum <code>ORC = 3;</code>
     */
    const ORC = 3;
    /**
     * Csv-formatted semi-structured data.
     *
     * Generated from protobuf enum <code>CSV = 100;</code>
     */
    const CSV = 100;
    /**
     * Json-formatted semi-structured data.
     *
     * Generated from protobuf enum <code>JSON = 101;</code>
     */
    const JSON = 101;
    /**
     * Image data formats (such as jpg and png).
     *
     * Generated from protobuf enum <code>IMAGE = 200;</code>
     */
    const IMAGE = 200;
    /**
     * Audio data formats (such as mp3, and wav).
     *
     * Generated from protobuf enum <code>AUDIO = 201;</code>
     */
    const AUDIO = 201;
    /**
     * Video data formats (such as mp4 and mpg).
     *
     * Generated from protobuf enum <code>VIDEO = 202;</code>
     */
    const VIDEO = 202;
    /**
     * Textual data formats (such as txt and xml).
     *
     * Generated from protobuf enum <code>TEXT = 203;</code>
     */
    const TEXT = 203;
    /**
     * TensorFlow record format.
     *
     * Generated from protobuf enum <code>TFRECORD = 204;</code>
     */
    const TFRECORD = 204;
    /**
     * Data that doesn't match a specific format.
     *
     * Generated from protobuf enum <code>OTHER = 1000;</code>
     */
    const OTHER = 1000;
    /**
     * Data of an unknown format.
     *
     * Generated from protobuf enum <code>UNKNOWN = 1001;</code>
     */
    const UNKNOWN = 1001;

    private static $valueToName = [
        self::FORMAT_UNSPECIFIED => 'FORMAT_UNSPECIFIED',
        self::PARQUET => 'PARQUET',
        self::AVRO => 'AVRO',
        self::ORC => 'ORC',
        self::CSV => 'CSV',
        self::JSON => 'JSON',
        self::IMAGE => 'IMAGE',
        self::AUDIO => 'AUDIO',
        self::VIDEO => 'VIDEO',
        self::TEXT => 'TEXT',
        self::TFRECORD => 'TFRECORD',
        self::OTHER => 'OTHER',
        self::UNKNOWN => 'UNKNOWN',
    ];

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


