1ffe3c632Sopenharmony_ci<?php
2ffe3c632Sopenharmony_ci# Generated by the protocol buffer compiler.  DO NOT EDIT!
3ffe3c632Sopenharmony_ci# source: google/protobuf/type.proto
4ffe3c632Sopenharmony_ci
5ffe3c632Sopenharmony_cinamespace Google\Protobuf\Field;
6ffe3c632Sopenharmony_ci
7ffe3c632Sopenharmony_ciuse UnexpectedValueException;
8ffe3c632Sopenharmony_ci
9ffe3c632Sopenharmony_ci/**
10ffe3c632Sopenharmony_ci * Basic field types.
11ffe3c632Sopenharmony_ci *
12ffe3c632Sopenharmony_ci * Protobuf type <code>google.protobuf.Field.Kind</code>
13ffe3c632Sopenharmony_ci */
14ffe3c632Sopenharmony_ciclass Kind
15ffe3c632Sopenharmony_ci{
16ffe3c632Sopenharmony_ci    /**
17ffe3c632Sopenharmony_ci     * Field type unknown.
18ffe3c632Sopenharmony_ci     *
19ffe3c632Sopenharmony_ci     * Generated from protobuf enum <code>TYPE_UNKNOWN = 0;</code>
20ffe3c632Sopenharmony_ci     */
21ffe3c632Sopenharmony_ci    const TYPE_UNKNOWN = 0;
22ffe3c632Sopenharmony_ci    /**
23ffe3c632Sopenharmony_ci     * Field type double.
24ffe3c632Sopenharmony_ci     *
25ffe3c632Sopenharmony_ci     * Generated from protobuf enum <code>TYPE_DOUBLE = 1;</code>
26ffe3c632Sopenharmony_ci     */
27ffe3c632Sopenharmony_ci    const TYPE_DOUBLE = 1;
28ffe3c632Sopenharmony_ci    /**
29ffe3c632Sopenharmony_ci     * Field type float.
30ffe3c632Sopenharmony_ci     *
31ffe3c632Sopenharmony_ci     * Generated from protobuf enum <code>TYPE_FLOAT = 2;</code>
32ffe3c632Sopenharmony_ci     */
33ffe3c632Sopenharmony_ci    const TYPE_FLOAT = 2;
34ffe3c632Sopenharmony_ci    /**
35ffe3c632Sopenharmony_ci     * Field type int64.
36ffe3c632Sopenharmony_ci     *
37ffe3c632Sopenharmony_ci     * Generated from protobuf enum <code>TYPE_INT64 = 3;</code>
38ffe3c632Sopenharmony_ci     */
39ffe3c632Sopenharmony_ci    const TYPE_INT64 = 3;
40ffe3c632Sopenharmony_ci    /**
41ffe3c632Sopenharmony_ci     * Field type uint64.
42ffe3c632Sopenharmony_ci     *
43ffe3c632Sopenharmony_ci     * Generated from protobuf enum <code>TYPE_UINT64 = 4;</code>
44ffe3c632Sopenharmony_ci     */
45ffe3c632Sopenharmony_ci    const TYPE_UINT64 = 4;
46ffe3c632Sopenharmony_ci    /**
47ffe3c632Sopenharmony_ci     * Field type int32.
48ffe3c632Sopenharmony_ci     *
49ffe3c632Sopenharmony_ci     * Generated from protobuf enum <code>TYPE_INT32 = 5;</code>
50ffe3c632Sopenharmony_ci     */
51ffe3c632Sopenharmony_ci    const TYPE_INT32 = 5;
52ffe3c632Sopenharmony_ci    /**
53ffe3c632Sopenharmony_ci     * Field type fixed64.
54ffe3c632Sopenharmony_ci     *
55ffe3c632Sopenharmony_ci     * Generated from protobuf enum <code>TYPE_FIXED64 = 6;</code>
56ffe3c632Sopenharmony_ci     */
57ffe3c632Sopenharmony_ci    const TYPE_FIXED64 = 6;
58ffe3c632Sopenharmony_ci    /**
59ffe3c632Sopenharmony_ci     * Field type fixed32.
60ffe3c632Sopenharmony_ci     *
61ffe3c632Sopenharmony_ci     * Generated from protobuf enum <code>TYPE_FIXED32 = 7;</code>
62ffe3c632Sopenharmony_ci     */
63ffe3c632Sopenharmony_ci    const TYPE_FIXED32 = 7;
64ffe3c632Sopenharmony_ci    /**
65ffe3c632Sopenharmony_ci     * Field type bool.
66ffe3c632Sopenharmony_ci     *
67ffe3c632Sopenharmony_ci     * Generated from protobuf enum <code>TYPE_BOOL = 8;</code>
68ffe3c632Sopenharmony_ci     */
69ffe3c632Sopenharmony_ci    const TYPE_BOOL = 8;
70ffe3c632Sopenharmony_ci    /**
71ffe3c632Sopenharmony_ci     * Field type string.
72ffe3c632Sopenharmony_ci     *
73ffe3c632Sopenharmony_ci     * Generated from protobuf enum <code>TYPE_STRING = 9;</code>
74ffe3c632Sopenharmony_ci     */
75ffe3c632Sopenharmony_ci    const TYPE_STRING = 9;
76ffe3c632Sopenharmony_ci    /**
77ffe3c632Sopenharmony_ci     * Field type group. Proto2 syntax only, and deprecated.
78ffe3c632Sopenharmony_ci     *
79ffe3c632Sopenharmony_ci     * Generated from protobuf enum <code>TYPE_GROUP = 10;</code>
80ffe3c632Sopenharmony_ci     */
81ffe3c632Sopenharmony_ci    const TYPE_GROUP = 10;
82ffe3c632Sopenharmony_ci    /**
83ffe3c632Sopenharmony_ci     * Field type message.
84ffe3c632Sopenharmony_ci     *
85ffe3c632Sopenharmony_ci     * Generated from protobuf enum <code>TYPE_MESSAGE = 11;</code>
86ffe3c632Sopenharmony_ci     */
87ffe3c632Sopenharmony_ci    const TYPE_MESSAGE = 11;
88ffe3c632Sopenharmony_ci    /**
89ffe3c632Sopenharmony_ci     * Field type bytes.
90ffe3c632Sopenharmony_ci     *
91ffe3c632Sopenharmony_ci     * Generated from protobuf enum <code>TYPE_BYTES = 12;</code>
92ffe3c632Sopenharmony_ci     */
93ffe3c632Sopenharmony_ci    const TYPE_BYTES = 12;
94ffe3c632Sopenharmony_ci    /**
95ffe3c632Sopenharmony_ci     * Field type uint32.
96ffe3c632Sopenharmony_ci     *
97ffe3c632Sopenharmony_ci     * Generated from protobuf enum <code>TYPE_UINT32 = 13;</code>
98ffe3c632Sopenharmony_ci     */
99ffe3c632Sopenharmony_ci    const TYPE_UINT32 = 13;
100ffe3c632Sopenharmony_ci    /**
101ffe3c632Sopenharmony_ci     * Field type enum.
102ffe3c632Sopenharmony_ci     *
103ffe3c632Sopenharmony_ci     * Generated from protobuf enum <code>TYPE_ENUM = 14;</code>
104ffe3c632Sopenharmony_ci     */
105ffe3c632Sopenharmony_ci    const TYPE_ENUM = 14;
106ffe3c632Sopenharmony_ci    /**
107ffe3c632Sopenharmony_ci     * Field type sfixed32.
108ffe3c632Sopenharmony_ci     *
109ffe3c632Sopenharmony_ci     * Generated from protobuf enum <code>TYPE_SFIXED32 = 15;</code>
110ffe3c632Sopenharmony_ci     */
111ffe3c632Sopenharmony_ci    const TYPE_SFIXED32 = 15;
112ffe3c632Sopenharmony_ci    /**
113ffe3c632Sopenharmony_ci     * Field type sfixed64.
114ffe3c632Sopenharmony_ci     *
115ffe3c632Sopenharmony_ci     * Generated from protobuf enum <code>TYPE_SFIXED64 = 16;</code>
116ffe3c632Sopenharmony_ci     */
117ffe3c632Sopenharmony_ci    const TYPE_SFIXED64 = 16;
118ffe3c632Sopenharmony_ci    /**
119ffe3c632Sopenharmony_ci     * Field type sint32.
120ffe3c632Sopenharmony_ci     *
121ffe3c632Sopenharmony_ci     * Generated from protobuf enum <code>TYPE_SINT32 = 17;</code>
122ffe3c632Sopenharmony_ci     */
123ffe3c632Sopenharmony_ci    const TYPE_SINT32 = 17;
124ffe3c632Sopenharmony_ci    /**
125ffe3c632Sopenharmony_ci     * Field type sint64.
126ffe3c632Sopenharmony_ci     *
127ffe3c632Sopenharmony_ci     * Generated from protobuf enum <code>TYPE_SINT64 = 18;</code>
128ffe3c632Sopenharmony_ci     */
129ffe3c632Sopenharmony_ci    const TYPE_SINT64 = 18;
130ffe3c632Sopenharmony_ci
131ffe3c632Sopenharmony_ci    private static $valueToName = [
132ffe3c632Sopenharmony_ci        self::TYPE_UNKNOWN => 'TYPE_UNKNOWN',
133ffe3c632Sopenharmony_ci        self::TYPE_DOUBLE => 'TYPE_DOUBLE',
134ffe3c632Sopenharmony_ci        self::TYPE_FLOAT => 'TYPE_FLOAT',
135ffe3c632Sopenharmony_ci        self::TYPE_INT64 => 'TYPE_INT64',
136ffe3c632Sopenharmony_ci        self::TYPE_UINT64 => 'TYPE_UINT64',
137ffe3c632Sopenharmony_ci        self::TYPE_INT32 => 'TYPE_INT32',
138ffe3c632Sopenharmony_ci        self::TYPE_FIXED64 => 'TYPE_FIXED64',
139ffe3c632Sopenharmony_ci        self::TYPE_FIXED32 => 'TYPE_FIXED32',
140ffe3c632Sopenharmony_ci        self::TYPE_BOOL => 'TYPE_BOOL',
141ffe3c632Sopenharmony_ci        self::TYPE_STRING => 'TYPE_STRING',
142ffe3c632Sopenharmony_ci        self::TYPE_GROUP => 'TYPE_GROUP',
143ffe3c632Sopenharmony_ci        self::TYPE_MESSAGE => 'TYPE_MESSAGE',
144ffe3c632Sopenharmony_ci        self::TYPE_BYTES => 'TYPE_BYTES',
145ffe3c632Sopenharmony_ci        self::TYPE_UINT32 => 'TYPE_UINT32',
146ffe3c632Sopenharmony_ci        self::TYPE_ENUM => 'TYPE_ENUM',
147ffe3c632Sopenharmony_ci        self::TYPE_SFIXED32 => 'TYPE_SFIXED32',
148ffe3c632Sopenharmony_ci        self::TYPE_SFIXED64 => 'TYPE_SFIXED64',
149ffe3c632Sopenharmony_ci        self::TYPE_SINT32 => 'TYPE_SINT32',
150ffe3c632Sopenharmony_ci        self::TYPE_SINT64 => 'TYPE_SINT64',
151ffe3c632Sopenharmony_ci    ];
152ffe3c632Sopenharmony_ci
153ffe3c632Sopenharmony_ci    public static function name($value)
154ffe3c632Sopenharmony_ci    {
155ffe3c632Sopenharmony_ci        if (!isset(self::$valueToName[$value])) {
156ffe3c632Sopenharmony_ci            throw new UnexpectedValueException(sprintf(
157ffe3c632Sopenharmony_ci                    'Enum %s has no name defined for value %s', __CLASS__, $value));
158ffe3c632Sopenharmony_ci        }
159ffe3c632Sopenharmony_ci        return self::$valueToName[$value];
160ffe3c632Sopenharmony_ci    }
161ffe3c632Sopenharmony_ci
162ffe3c632Sopenharmony_ci    public static function value($name)
163ffe3c632Sopenharmony_ci    {
164ffe3c632Sopenharmony_ci        $const = __CLASS__ . '::' . strtoupper($name);
165ffe3c632Sopenharmony_ci        if (!defined($const)) {
166ffe3c632Sopenharmony_ci            throw new UnexpectedValueException(sprintf(
167ffe3c632Sopenharmony_ci                    'Enum %s has no value defined for name %s', __CLASS__, $name));
168ffe3c632Sopenharmony_ci        }
169ffe3c632Sopenharmony_ci        return constant($const);
170ffe3c632Sopenharmony_ci    }
171ffe3c632Sopenharmony_ci}
172ffe3c632Sopenharmony_ci
173ffe3c632Sopenharmony_ci// Adding a class alias for backwards compatibility with the previous class name.
174ffe3c632Sopenharmony_ciclass_alias(Kind::class, \Google\Protobuf\Field_Kind::class);
175ffe3c632Sopenharmony_ci
176