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

namespace Google\Cloud\StorageTransfer\V1\MetadataOptions;

use UnexpectedValueException;

/**
 * Options for handling Google Cloud Storage object storage class.
 *
 * Protobuf type <code>google.storagetransfer.v1.MetadataOptions.StorageClass</code>
 */
class StorageClass
{
    /**
     * Storage class behavior is unspecified.
     *
     * Generated from protobuf enum <code>STORAGE_CLASS_UNSPECIFIED = 0;</code>
     */
    const STORAGE_CLASS_UNSPECIFIED = 0;
    /**
     * Use the destination bucket's default storage class.
     *
     * Generated from protobuf enum <code>STORAGE_CLASS_DESTINATION_BUCKET_DEFAULT = 1;</code>
     */
    const STORAGE_CLASS_DESTINATION_BUCKET_DEFAULT = 1;
    /**
     * Preserve the object's original storage class. This is only supported for
     * transfers from Google Cloud Storage buckets.
     *
     * Generated from protobuf enum <code>STORAGE_CLASS_PRESERVE = 2;</code>
     */
    const STORAGE_CLASS_PRESERVE = 2;
    /**
     * Set the storage class to STANDARD.
     *
     * Generated from protobuf enum <code>STORAGE_CLASS_STANDARD = 3;</code>
     */
    const STORAGE_CLASS_STANDARD = 3;
    /**
     * Set the storage class to NEARLINE.
     *
     * Generated from protobuf enum <code>STORAGE_CLASS_NEARLINE = 4;</code>
     */
    const STORAGE_CLASS_NEARLINE = 4;
    /**
     * Set the storage class to COLDLINE.
     *
     * Generated from protobuf enum <code>STORAGE_CLASS_COLDLINE = 5;</code>
     */
    const STORAGE_CLASS_COLDLINE = 5;
    /**
     * Set the storage class to ARCHIVE.
     *
     * Generated from protobuf enum <code>STORAGE_CLASS_ARCHIVE = 6;</code>
     */
    const STORAGE_CLASS_ARCHIVE = 6;

    private static $valueToName = [
        self::STORAGE_CLASS_UNSPECIFIED => 'STORAGE_CLASS_UNSPECIFIED',
        self::STORAGE_CLASS_DESTINATION_BUCKET_DEFAULT => 'STORAGE_CLASS_DESTINATION_BUCKET_DEFAULT',
        self::STORAGE_CLASS_PRESERVE => 'STORAGE_CLASS_PRESERVE',
        self::STORAGE_CLASS_STANDARD => 'STORAGE_CLASS_STANDARD',
        self::STORAGE_CLASS_NEARLINE => 'STORAGE_CLASS_NEARLINE',
        self::STORAGE_CLASS_COLDLINE => 'STORAGE_CLASS_COLDLINE',
        self::STORAGE_CLASS_ARCHIVE => 'STORAGE_CLASS_ARCHIVE',
    ];

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


