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

namespace Google\Cloud\StorageTransfer\V1\S3CompatibleMetadata;

use UnexpectedValueException;

/**
 * The request model of the API.
 *
 * Protobuf type <code>google.storagetransfer.v1.S3CompatibleMetadata.RequestModel</code>
 */
class RequestModel
{
    /**
     * RequestModel is not specified.
     *
     * Generated from protobuf enum <code>REQUEST_MODEL_UNSPECIFIED = 0;</code>
     */
    const REQUEST_MODEL_UNSPECIFIED = 0;
    /**
     * Perform requests using Virtual Hosted Style.
     * Example: https://bucket-name.s3.region.amazonaws.com/key-name
     *
     * Generated from protobuf enum <code>REQUEST_MODEL_VIRTUAL_HOSTED_STYLE = 1;</code>
     */
    const REQUEST_MODEL_VIRTUAL_HOSTED_STYLE = 1;
    /**
     * Perform requests using Path Style.
     * Example: https://s3.region.amazonaws.com/bucket-name/key-name
     *
     * Generated from protobuf enum <code>REQUEST_MODEL_PATH_STYLE = 2;</code>
     */
    const REQUEST_MODEL_PATH_STYLE = 2;

    private static $valueToName = [
        self::REQUEST_MODEL_UNSPECIFIED => 'REQUEST_MODEL_UNSPECIFIED',
        self::REQUEST_MODEL_VIRTUAL_HOSTED_STYLE => 'REQUEST_MODEL_VIRTUAL_HOSTED_STYLE',
        self::REQUEST_MODEL_PATH_STYLE => 'REQUEST_MODEL_PATH_STYLE',
    ];

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


