avm99963 | 99bb77c | 2020-01-27 03:15:08 +0100 | [diff] [blame] | 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 type definition. |
| 13 | * |
| 14 | * Generated from protobuf message <code>google.protobuf.Enum</code> |
| 15 | */ |
| 16 | class Enum extends \Google\Protobuf\Internal\Message |
| 17 | { |
| 18 | /** |
| 19 | * Enum type name. |
| 20 | * |
| 21 | * Generated from protobuf field <code>string name = 1;</code> |
| 22 | */ |
| 23 | private $name = ''; |
| 24 | /** |
| 25 | * Enum value definitions. |
| 26 | * |
| 27 | * Generated from protobuf field <code>repeated .google.protobuf.EnumValue enumvalue = 2;</code> |
| 28 | */ |
| 29 | private $enumvalue; |
| 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 | * The source context. |
| 38 | * |
| 39 | * Generated from protobuf field <code>.google.protobuf.SourceContext source_context = 4;</code> |
| 40 | */ |
| 41 | private $source_context = null; |
| 42 | /** |
| 43 | * The source syntax. |
| 44 | * |
| 45 | * Generated from protobuf field <code>.google.protobuf.Syntax syntax = 5;</code> |
| 46 | */ |
| 47 | private $syntax = 0; |
| 48 | |
| 49 | /** |
| 50 | * Constructor. |
| 51 | * |
| 52 | * @param array $data { |
| 53 | * Optional. Data for populating the Message object. |
| 54 | * |
| 55 | * @type string $name |
| 56 | * Enum type name. |
| 57 | * @type \Google\Protobuf\EnumValue[]|\Google\Protobuf\Internal\RepeatedField $enumvalue |
| 58 | * Enum value definitions. |
| 59 | * @type \Google\Protobuf\Option[]|\Google\Protobuf\Internal\RepeatedField $options |
| 60 | * Protocol buffer options. |
| 61 | * @type \Google\Protobuf\SourceContext $source_context |
| 62 | * The source context. |
| 63 | * @type int $syntax |
| 64 | * The source syntax. |
| 65 | * } |
| 66 | */ |
| 67 | public function __construct($data = NULL) { |
| 68 | \GPBMetadata\Google\Protobuf\Type::initOnce(); |
| 69 | parent::__construct($data); |
| 70 | } |
| 71 | |
| 72 | /** |
| 73 | * Enum type name. |
| 74 | * |
| 75 | * Generated from protobuf field <code>string name = 1;</code> |
| 76 | * @return string |
| 77 | */ |
| 78 | public function getName() |
| 79 | { |
| 80 | return $this->name; |
| 81 | } |
| 82 | |
| 83 | /** |
| 84 | * Enum type name. |
| 85 | * |
| 86 | * Generated from protobuf field <code>string name = 1;</code> |
| 87 | * @param string $var |
| 88 | * @return $this |
| 89 | */ |
| 90 | public function setName($var) |
| 91 | { |
| 92 | GPBUtil::checkString($var, True); |
| 93 | $this->name = $var; |
| 94 | |
| 95 | return $this; |
| 96 | } |
| 97 | |
| 98 | /** |
| 99 | * Enum value definitions. |
| 100 | * |
| 101 | * Generated from protobuf field <code>repeated .google.protobuf.EnumValue enumvalue = 2;</code> |
| 102 | * @return \Google\Protobuf\Internal\RepeatedField |
| 103 | */ |
| 104 | public function getEnumvalue() |
| 105 | { |
| 106 | return $this->enumvalue; |
| 107 | } |
| 108 | |
| 109 | /** |
| 110 | * Enum value definitions. |
| 111 | * |
| 112 | * Generated from protobuf field <code>repeated .google.protobuf.EnumValue enumvalue = 2;</code> |
| 113 | * @param \Google\Protobuf\EnumValue[]|\Google\Protobuf\Internal\RepeatedField $var |
| 114 | * @return $this |
| 115 | */ |
| 116 | public function setEnumvalue($var) |
| 117 | { |
| 118 | $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\EnumValue::class); |
| 119 | $this->enumvalue = $arr; |
| 120 | |
| 121 | return $this; |
| 122 | } |
| 123 | |
| 124 | /** |
| 125 | * Protocol buffer options. |
| 126 | * |
| 127 | * Generated from protobuf field <code>repeated .google.protobuf.Option options = 3;</code> |
| 128 | * @return \Google\Protobuf\Internal\RepeatedField |
| 129 | */ |
| 130 | public function getOptions() |
| 131 | { |
| 132 | return $this->options; |
| 133 | } |
| 134 | |
| 135 | /** |
| 136 | * Protocol buffer options. |
| 137 | * |
| 138 | * Generated from protobuf field <code>repeated .google.protobuf.Option options = 3;</code> |
| 139 | * @param \Google\Protobuf\Option[]|\Google\Protobuf\Internal\RepeatedField $var |
| 140 | * @return $this |
| 141 | */ |
| 142 | public function setOptions($var) |
| 143 | { |
| 144 | $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Option::class); |
| 145 | $this->options = $arr; |
| 146 | |
| 147 | return $this; |
| 148 | } |
| 149 | |
| 150 | /** |
| 151 | * The source context. |
| 152 | * |
| 153 | * Generated from protobuf field <code>.google.protobuf.SourceContext source_context = 4;</code> |
| 154 | * @return \Google\Protobuf\SourceContext |
| 155 | */ |
| 156 | public function getSourceContext() |
| 157 | { |
| 158 | return $this->source_context; |
| 159 | } |
| 160 | |
| 161 | /** |
| 162 | * The source context. |
| 163 | * |
| 164 | * Generated from protobuf field <code>.google.protobuf.SourceContext source_context = 4;</code> |
| 165 | * @param \Google\Protobuf\SourceContext $var |
| 166 | * @return $this |
| 167 | */ |
| 168 | public function setSourceContext($var) |
| 169 | { |
| 170 | GPBUtil::checkMessage($var, \Google\Protobuf\SourceContext::class); |
| 171 | $this->source_context = $var; |
| 172 | |
| 173 | return $this; |
| 174 | } |
| 175 | |
| 176 | /** |
| 177 | * The source syntax. |
| 178 | * |
| 179 | * Generated from protobuf field <code>.google.protobuf.Syntax syntax = 5;</code> |
| 180 | * @return int |
| 181 | */ |
| 182 | public function getSyntax() |
| 183 | { |
| 184 | return $this->syntax; |
| 185 | } |
| 186 | |
| 187 | /** |
| 188 | * The source syntax. |
| 189 | * |
| 190 | * Generated from protobuf field <code>.google.protobuf.Syntax syntax = 5;</code> |
| 191 | * @param int $var |
| 192 | * @return $this |
| 193 | */ |
| 194 | public function setSyntax($var) |
| 195 | { |
| 196 | GPBUtil::checkEnum($var, \Google\Protobuf\Syntax::class); |
| 197 | $this->syntax = $var; |
| 198 | |
| 199 | return $this; |
| 200 | } |
| 201 | |
| 202 | } |
| 203 | |