| 1 |
<?php |
| 2 |
# Generated by the protocol buffer compiler. DO NOT EDIT! |
| 3 |
# source: google/protobuf/type.proto |
| 4 |
|
| 5 |
namespace Google\Protobuf; |
| 6 |
|
| 7 |
use Google\Protobuf\Internal\GPBType; |
| 8 |
use Google\Protobuf\Internal\RepeatedField; |
| 9 |
use Google\Protobuf\Internal\GPBUtil; |
| 10 |
|
| 11 |
/** |
| 12 |
* Enum value definition. |
| 13 |
* |
| 14 |
* Generated from protobuf message <code>google.protobuf.EnumValue</code> |
| 15 |
*/ |
| 16 |
class EnumValue extends \Google\Protobuf\Internal\Message |
| 17 |
{ |
| 18 |
/** |
| 19 |
* Enum value name. |
| 20 |
* |
| 21 |
* Generated from protobuf field <code>string name = 1;</code> |
| 22 |
*/ |
| 23 |
protected $name = ''; |
| 24 |
/** |
| 25 |
* Enum value number. |
| 26 |
* |
| 27 |
* Generated from protobuf field <code>int32 number = 2;</code> |
| 28 |
*/ |
| 29 |
protected $number = 0; |
| 30 |
/** |
| 31 |
* Protocol buffer options. |
| 32 |
* |
| 33 |
* Generated from protobuf field <code>repeated .google.protobuf.Option options = 3;</code> |
| 34 |
*/ |
| 35 |
private $options; |
| 36 |
|
| 37 |
/** |
| 38 |
* Constructor. |
| 39 |
* |
| 40 |
* @param array $data { |
| 41 |
* Optional. Data for populating the Message object. |
| 42 |
* |
| 43 |
* @type string $name |
| 44 |
* Enum value name. |
| 45 |
* @type int $number |
| 46 |
* Enum value number. |
| 47 |
* @type array<\Google\Protobuf\Option>|\Google\Protobuf\Internal\RepeatedField $options |
| 48 |
* Protocol buffer options. |
| 49 |
* } |
| 50 |
*/ |
| 51 |
public function __construct($data = NULL) { |
| 52 |
\GPBMetadata\Google\Protobuf\Type::initOnce(); |
| 53 |
parent::__construct($data); |
| 54 |
} |
| 55 |
|
| 56 |
/** |
| 57 |
* Enum value name. |
| 58 |
* |
| 59 |
* Generated from protobuf field <code>string name = 1;</code> |
| 60 |
* @return string |
| 61 |
*/ |
| 62 |
public function getName() |
| 63 |
{ |
| 64 |
return $this->name; |
| 65 |
} |
| 66 |
|
| 67 |
/** |
| 68 |
* Enum value name. |
| 69 |
* |
| 70 |
* Generated from protobuf field <code>string name = 1;</code> |
| 71 |
* @param string $var |
| 72 |
* @return $this |
| 73 |
*/ |
| 74 |
public function setName($var) |
| 75 |
{ |
| 76 |
GPBUtil::checkString($var, True); |
| 77 |
$this->name = $var; |
| 78 |
|
| 79 |
return $this; |
| 80 |
} |
| 81 |
|
| 82 |
/** |
| 83 |
* Enum value number. |
| 84 |
* |
| 85 |
* Generated from protobuf field <code>int32 number = 2;</code> |
| 86 |
* @return int |
| 87 |
*/ |
| 88 |
public function getNumber() |
| 89 |
{ |
| 90 |
return $this->number; |
| 91 |
} |
| 92 |
|
| 93 |
/** |
| 94 |
* Enum value number. |
| 95 |
* |
| 96 |
* Generated from protobuf field <code>int32 number = 2;</code> |
| 97 |
* @param int $var |
| 98 |
* @return $this |
| 99 |
*/ |
| 100 |
public function setNumber($var) |
| 101 |
{ |
| 102 |
GPBUtil::checkInt32($var); |
| 103 |
$this->number = $var; |
| 104 |
|
| 105 |
return $this; |
| 106 |
} |
| 107 |
|
| 108 |
/** |
| 109 |
* Protocol buffer options. |
| 110 |
* |
| 111 |
* Generated from protobuf field <code>repeated .google.protobuf.Option options = 3;</code> |
| 112 |
* @return \Google\Protobuf\Internal\RepeatedField |
| 113 |
*/ |
| 114 |
public function getOptions() |
| 115 |
{ |
| 116 |
return $this->options; |
| 117 |
} |
| 118 |
|
| 119 |
/** |
| 120 |
* Protocol buffer options. |
| 121 |
* |
| 122 |
* Generated from protobuf field <code>repeated .google.protobuf.Option options = 3;</code> |
| 123 |
* @param array<\Google\Protobuf\Option>|\Google\Protobuf\Internal\RepeatedField $var |
| 124 |
* @return $this |
| 125 |
*/ |
| 126 |
public function setOptions($var) |
| 127 |
{ |
| 128 |
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Option::class); |
| 129 |
$this->options = $arr; |
| 130 |
|
| 131 |
return $this; |
| 132 |
} |
| 133 |
|
| 134 |
} |
| 135 |
|