<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# NO CHECKED-IN PROTOBUF GENCODE
# source: rpc.proto

namespace OS\PB;

use UnexpectedValueException;

/**
 * enums in this list must be kept the same for http_client.h 
 *
 * Protobuf type <code>OS.PB.HTTPMethodType</code>
 */
class HTTPMethodType
{
    /**
     * Generated from protobuf enum <code>HTTPMethod_NotSet = 0;</code>
     */
    const HTTPMethod_NotSet = 0;
    /**
     * Generated from protobuf enum <code>HTTPMethod_Delete = 1;</code>
     */
    const HTTPMethod_Delete = 1;
    /**
     * Generated from protobuf enum <code>HTTPMethod_Get = 2;</code>
     */
    const HTTPMethod_Get = 2;
    /**
     * Generated from protobuf enum <code>HTTPMethod_Head = 3;</code>
     */
    const HTTPMethod_Head = 3;
    /**
     * Generated from protobuf enum <code>HTTPMethod_Post = 4;</code>
     */
    const HTTPMethod_Post = 4;
    /**
     * Generated from protobuf enum <code>HTTPMethod_Put = 5;</code>
     */
    const HTTPMethod_Put = 5;
    /**
     * Generated from protobuf enum <code>HTTPMethod_Connect = 6;</code>
     */
    const HTTPMethod_Connect = 6;
    /**
     * Generated from protobuf enum <code>HTTPMethod_Options = 7;</code>
     */
    const HTTPMethod_Options = 7;
    /**
     * Generated from protobuf enum <code>HTTPMethod_Trace = 8;</code>
     */
    const HTTPMethod_Trace = 8;
    /**
     * Generated from protobuf enum <code>HTTPMethod_Copy = 9;</code>
     */
    const HTTPMethod_Copy = 9;
    /**
     * Generated from protobuf enum <code>HTTPMethod_Lock = 10;</code>
     */
    const HTTPMethod_Lock = 10;
    /**
     * Generated from protobuf enum <code>HTTPMethod_MkCol = 11;</code>
     */
    const HTTPMethod_MkCol = 11;
    /**
     * Generated from protobuf enum <code>HTTPMethod_Move = 12;</code>
     */
    const HTTPMethod_Move = 12;
    /**
     * Generated from protobuf enum <code>HTTPMethod_PropFind = 13;</code>
     */
    const HTTPMethod_PropFind = 13;
    /**
     * Generated from protobuf enum <code>HTTPMethod_PropPatch = 14;</code>
     */
    const HTTPMethod_PropPatch = 14;
    /**
     * Generated from protobuf enum <code>HTTPMethod_Search = 15;</code>
     */
    const HTTPMethod_Search = 15;
    /**
     * Generated from protobuf enum <code>HTTPMethod_Unlock = 16;</code>
     */
    const HTTPMethod_Unlock = 16;
    /**
     * Generated from protobuf enum <code>HTTPMethod_Bind = 17;</code>
     */
    const HTTPMethod_Bind = 17;
    /**
     * Generated from protobuf enum <code>HTTPMethod_Rebind = 18;</code>
     */
    const HTTPMethod_Rebind = 18;
    /**
     * Generated from protobuf enum <code>HTTPMethod_Unbind = 19;</code>
     */
    const HTTPMethod_Unbind = 19;
    /**
     * Generated from protobuf enum <code>HTTPMethod_Acl = 20;</code>
     */
    const HTTPMethod_Acl = 20;
    /**
     * Generated from protobuf enum <code>HTTPMethod_Report = 21;</code>
     */
    const HTTPMethod_Report = 21;
    /**
     * Generated from protobuf enum <code>HTTPMethod_MkActivity = 22;</code>
     */
    const HTTPMethod_MkActivity = 22;
    /**
     * Generated from protobuf enum <code>HTTPMethod_Checkout = 23;</code>
     */
    const HTTPMethod_Checkout = 23;
    /**
     * Generated from protobuf enum <code>HTTPMethod_Merge = 24;</code>
     */
    const HTTPMethod_Merge = 24;
    /**
     * Generated from protobuf enum <code>HTTPMethod_MSearch = 25;</code>
     */
    const HTTPMethod_MSearch = 25;
    /**
     * Generated from protobuf enum <code>HTTPMethod_Notify = 26;</code>
     */
    const HTTPMethod_Notify = 26;
    /**
     * Generated from protobuf enum <code>HTTPMethod_Subscribe = 27;</code>
     */
    const HTTPMethod_Subscribe = 27;
    /**
     * Generated from protobuf enum <code>HTTPMethod_Unsubscribe = 28;</code>
     */
    const HTTPMethod_Unsubscribe = 28;
    /**
     * Generated from protobuf enum <code>HTTPMethod_Patch = 29;</code>
     */
    const HTTPMethod_Patch = 29;
    /**
     * Generated from protobuf enum <code>HTTPMethod_Purge = 30;</code>
     */
    const HTTPMethod_Purge = 30;
    /**
     * Generated from protobuf enum <code>HTTPMethod_MkCalendar = 31;</code>
     */
    const HTTPMethod_MkCalendar = 31;
    /**
     * Generated from protobuf enum <code>HTTPMethod_Link = 32;</code>
     */
    const HTTPMethod_Link = 32;
    /**
     * Generated from protobuf enum <code>HTTPMethod_Unlink = 33;</code>
     */
    const HTTPMethod_Unlink = 33;

    private static $valueToName = [
        self::HTTPMethod_NotSet => 'HTTPMethod_NotSet',
        self::HTTPMethod_Delete => 'HTTPMethod_Delete',
        self::HTTPMethod_Get => 'HTTPMethod_Get',
        self::HTTPMethod_Head => 'HTTPMethod_Head',
        self::HTTPMethod_Post => 'HTTPMethod_Post',
        self::HTTPMethod_Put => 'HTTPMethod_Put',
        self::HTTPMethod_Connect => 'HTTPMethod_Connect',
        self::HTTPMethod_Options => 'HTTPMethod_Options',
        self::HTTPMethod_Trace => 'HTTPMethod_Trace',
        self::HTTPMethod_Copy => 'HTTPMethod_Copy',
        self::HTTPMethod_Lock => 'HTTPMethod_Lock',
        self::HTTPMethod_MkCol => 'HTTPMethod_MkCol',
        self::HTTPMethod_Move => 'HTTPMethod_Move',
        self::HTTPMethod_PropFind => 'HTTPMethod_PropFind',
        self::HTTPMethod_PropPatch => 'HTTPMethod_PropPatch',
        self::HTTPMethod_Search => 'HTTPMethod_Search',
        self::HTTPMethod_Unlock => 'HTTPMethod_Unlock',
        self::HTTPMethod_Bind => 'HTTPMethod_Bind',
        self::HTTPMethod_Rebind => 'HTTPMethod_Rebind',
        self::HTTPMethod_Unbind => 'HTTPMethod_Unbind',
        self::HTTPMethod_Acl => 'HTTPMethod_Acl',
        self::HTTPMethod_Report => 'HTTPMethod_Report',
        self::HTTPMethod_MkActivity => 'HTTPMethod_MkActivity',
        self::HTTPMethod_Checkout => 'HTTPMethod_Checkout',
        self::HTTPMethod_Merge => 'HTTPMethod_Merge',
        self::HTTPMethod_MSearch => 'HTTPMethod_MSearch',
        self::HTTPMethod_Notify => 'HTTPMethod_Notify',
        self::HTTPMethod_Subscribe => 'HTTPMethod_Subscribe',
        self::HTTPMethod_Unsubscribe => 'HTTPMethod_Unsubscribe',
        self::HTTPMethod_Patch => 'HTTPMethod_Patch',
        self::HTTPMethod_Purge => 'HTTPMethod_Purge',
        self::HTTPMethod_MkCalendar => 'HTTPMethod_MkCalendar',
        self::HTTPMethod_Link => 'HTTPMethod_Link',
        self::HTTPMethod_Unlink => 'HTTPMethod_Unlink',
    ];

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

