1ffe3c632Sopenharmony_ci<?php
2ffe3c632Sopenharmony_ci# Generated by the protocol buffer compiler.  DO NOT EDIT!
3ffe3c632Sopenharmony_ci# source: google/protobuf/descriptor.proto
4ffe3c632Sopenharmony_ci
5ffe3c632Sopenharmony_cinamespace Google\Protobuf\Internal\FileOptions;
6ffe3c632Sopenharmony_ci
7ffe3c632Sopenharmony_ciuse UnexpectedValueException;
8ffe3c632Sopenharmony_ci
9ffe3c632Sopenharmony_ci/**
10ffe3c632Sopenharmony_ci * Generated classes can be optimized for speed or code size.
11ffe3c632Sopenharmony_ci *
12ffe3c632Sopenharmony_ci * Protobuf type <code>google.protobuf.FileOptions.OptimizeMode</code>
13ffe3c632Sopenharmony_ci */
14ffe3c632Sopenharmony_ciclass OptimizeMode
15ffe3c632Sopenharmony_ci{
16ffe3c632Sopenharmony_ci    /**
17ffe3c632Sopenharmony_ci     * Generate complete code for parsing, serialization,
18ffe3c632Sopenharmony_ci     *
19ffe3c632Sopenharmony_ci     * Generated from protobuf enum <code>SPEED = 1;</code>
20ffe3c632Sopenharmony_ci     */
21ffe3c632Sopenharmony_ci    const SPEED = 1;
22ffe3c632Sopenharmony_ci    /**
23ffe3c632Sopenharmony_ci     * etc.
24ffe3c632Sopenharmony_ci     *
25ffe3c632Sopenharmony_ci     * Generated from protobuf enum <code>CODE_SIZE = 2;</code>
26ffe3c632Sopenharmony_ci     */
27ffe3c632Sopenharmony_ci    const CODE_SIZE = 2;
28ffe3c632Sopenharmony_ci    /**
29ffe3c632Sopenharmony_ci     * Generate code using MessageLite and the lite runtime.
30ffe3c632Sopenharmony_ci     *
31ffe3c632Sopenharmony_ci     * Generated from protobuf enum <code>LITE_RUNTIME = 3;</code>
32ffe3c632Sopenharmony_ci     */
33ffe3c632Sopenharmony_ci    const LITE_RUNTIME = 3;
34ffe3c632Sopenharmony_ci
35ffe3c632Sopenharmony_ci    private static $valueToName = [
36ffe3c632Sopenharmony_ci        self::SPEED => 'SPEED',
37ffe3c632Sopenharmony_ci        self::CODE_SIZE => 'CODE_SIZE',
38ffe3c632Sopenharmony_ci        self::LITE_RUNTIME => 'LITE_RUNTIME',
39ffe3c632Sopenharmony_ci    ];
40ffe3c632Sopenharmony_ci
41ffe3c632Sopenharmony_ci    public static function name($value)
42ffe3c632Sopenharmony_ci    {
43ffe3c632Sopenharmony_ci        if (!isset(self::$valueToName[$value])) {
44ffe3c632Sopenharmony_ci            throw new UnexpectedValueException(sprintf(
45ffe3c632Sopenharmony_ci                    'Enum %s has no name defined for value %s', __CLASS__, $value));
46ffe3c632Sopenharmony_ci        }
47ffe3c632Sopenharmony_ci        return self::$valueToName[$value];
48ffe3c632Sopenharmony_ci    }
49ffe3c632Sopenharmony_ci
50ffe3c632Sopenharmony_ci
51ffe3c632Sopenharmony_ci    public static function value($name)
52ffe3c632Sopenharmony_ci    {
53ffe3c632Sopenharmony_ci        $const = __CLASS__ . '::' . strtoupper($name);
54ffe3c632Sopenharmony_ci        if (!defined($const)) {
55ffe3c632Sopenharmony_ci            throw new UnexpectedValueException(sprintf(
56ffe3c632Sopenharmony_ci                    'Enum %s has no value defined for name %s', __CLASS__, $name));
57ffe3c632Sopenharmony_ci        }
58ffe3c632Sopenharmony_ci        return constant($const);
59ffe3c632Sopenharmony_ci    }
60ffe3c632Sopenharmony_ci}
61ffe3c632Sopenharmony_ci
62ffe3c632Sopenharmony_ci// Adding a class alias for backwards compatibility with the previous class name.
63ffe3c632Sopenharmony_ciclass_alias(OptimizeMode::class, \Google\Protobuf\Internal\FileOptions_OptimizeMode::class);
64ffe3c632Sopenharmony_ci
65