| 1 |
<?php |
| 2 |
# Generated by the protocol buffer compiler. DO NOT EDIT! |
| 3 |
# source: google/protobuf/descriptor.proto |
| 4 |
|
| 5 |
namespace Google\Protobuf\Internal\SourceCodeInfo; |
| 6 |
|
| 7 |
use Google\Protobuf\Internal\GPBType; |
| 8 |
use Google\Protobuf\Internal\GPBWire; |
| 9 |
use Google\Protobuf\Internal\RepeatedField; |
| 10 |
use Google\Protobuf\Internal\InputStream; |
| 11 |
use Google\Protobuf\Internal\GPBUtil; |
| 12 |
|
| 13 |
/** |
| 14 |
* Generated from protobuf message <code>google.protobuf.SourceCodeInfo.Location</code> |
| 15 |
*/ |
| 16 |
class Location extends \Google\Protobuf\Internal\Message |
| 17 |
{ |
| 18 |
/** |
| 19 |
* Identifies which part of the FileDescriptorProto was defined at this |
| 20 |
* location. |
| 21 |
* Each element is a field number or an index. They form a path from |
| 22 |
* the root FileDescriptorProto to the place where the definition occurs. |
| 23 |
* For example, this path: |
| 24 |
* [ 4, 3, 2, 7, 1 ] |
| 25 |
* refers to: |
| 26 |
* file.message_type(3) // 4, 3 |
| 27 |
* .field(7) // 2, 7 |
| 28 |
* .name() // 1 |
| 29 |
* This is because FileDescriptorProto.message_type has field number 4: |
| 30 |
* repeated DescriptorProto message_type = 4; |
| 31 |
* and DescriptorProto.field has field number 2: |
| 32 |
* repeated FieldDescriptorProto field = 2; |
| 33 |
* and FieldDescriptorProto.name has field number 1: |
| 34 |
* optional string name = 1; |
| 35 |
* Thus, the above path gives the location of a field name. If we removed |
| 36 |
* the last element: |
| 37 |
* [ 4, 3, 2, 7 ] |
| 38 |
* this path refers to the whole field declaration (from the beginning |
| 39 |
* of the label to the terminating semicolon). |
| 40 |
* |
| 41 |
* Generated from protobuf field <code>repeated int32 path = 1 [packed = true];</code> |
| 42 |
*/ |
| 43 |
private $path; |
| 44 |
/** |
| 45 |
* Always has exactly three or four elements: start line, start column, |
| 46 |
* end line (optional, otherwise assumed same as start line), end column. |
| 47 |
* These are packed into a single field for efficiency. Note that line |
| 48 |
* and column numbers are zero-based -- typically you will want to add |
| 49 |
* 1 to each before displaying to a user. |
| 50 |
* |
| 51 |
* Generated from protobuf field <code>repeated int32 span = 2 [packed = true];</code> |
| 52 |
*/ |
| 53 |
private $span; |
| 54 |
/** |
| 55 |
* If this SourceCodeInfo represents a complete declaration, these are any |
| 56 |
* comments appearing before and after the declaration which appear to be |
| 57 |
* attached to the declaration. |
| 58 |
* A series of line comments appearing on consecutive lines, with no other |
| 59 |
* tokens appearing on those lines, will be treated as a single comment. |
| 60 |
* leading_detached_comments will keep paragraphs of comments that appear |
| 61 |
* before (but not connected to) the current element. Each paragraph, |
| 62 |
* separated by empty lines, will be one comment element in the repeated |
| 63 |
* field. |
| 64 |
* Only the comment content is provided; comment markers (e.g. //) are |
| 65 |
* stripped out. For block comments, leading whitespace and an asterisk |
| 66 |
* will be stripped from the beginning of each line other than the first. |
| 67 |
* Newlines are included in the output. |
| 68 |
* Examples: |
| 69 |
* optional int32 foo = 1; // Comment attached to foo. |
| 70 |
* // Comment attached to bar. |
| 71 |
* optional int32 bar = 2; |
| 72 |
* optional string baz = 3; |
| 73 |
* // Comment attached to baz. |
| 74 |
* // Another line attached to baz. |
| 75 |
* // Comment attached to moo. |
| 76 |
* // |
| 77 |
* // Another line attached to moo. |
| 78 |
* optional double moo = 4; |
| 79 |
* // Detached comment for corge. This is not leading or trailing comments |
| 80 |
* // to moo or corge because there are blank lines separating it from |
| 81 |
* // both. |
| 82 |
* // Detached comment for corge paragraph 2. |
| 83 |
* optional string corge = 5; |
| 84 |
* /* Block comment attached |
| 85 |
* * to corge. Leading asterisks |
| 86 |
* * will be removed. */ |
| 87 |
* /* Block comment attached to |
| 88 |
* * grault. */ |
| 89 |
* optional int32 grault = 6; |
| 90 |
* // ignored detached comments. |
| 91 |
* |
| 92 |
* Generated from protobuf field <code>optional string leading_comments = 3;</code> |
| 93 |
*/ |
| 94 |
protected $leading_comments = null; |
| 95 |
/** |
| 96 |
* Generated from protobuf field <code>optional string trailing_comments = 4;</code> |
| 97 |
*/ |
| 98 |
protected $trailing_comments = null; |
| 99 |
/** |
| 100 |
* Generated from protobuf field <code>repeated string leading_detached_comments = 6;</code> |
| 101 |
*/ |
| 102 |
private $leading_detached_comments; |
| 103 |
|
| 104 |
/** |
| 105 |
* Constructor. |
| 106 |
* |
| 107 |
* @param array $data { |
| 108 |
* Optional. Data for populating the Message object. |
| 109 |
* |
| 110 |
* @type array<int>|\Google\Protobuf\Internal\RepeatedField $path |
| 111 |
* Identifies which part of the FileDescriptorProto was defined at this |
| 112 |
* location. |
| 113 |
* Each element is a field number or an index. They form a path from |
| 114 |
* the root FileDescriptorProto to the place where the definition occurs. |
| 115 |
* For example, this path: |
| 116 |
* [ 4, 3, 2, 7, 1 ] |
| 117 |
* refers to: |
| 118 |
* file.message_type(3) // 4, 3 |
| 119 |
* .field(7) // 2, 7 |
| 120 |
* .name() // 1 |
| 121 |
* This is because FileDescriptorProto.message_type has field number 4: |
| 122 |
* repeated DescriptorProto message_type = 4; |
| 123 |
* and DescriptorProto.field has field number 2: |
| 124 |
* repeated FieldDescriptorProto field = 2; |
| 125 |
* and FieldDescriptorProto.name has field number 1: |
| 126 |
* optional string name = 1; |
| 127 |
* Thus, the above path gives the location of a field name. If we removed |
| 128 |
* the last element: |
| 129 |
* [ 4, 3, 2, 7 ] |
| 130 |
* this path refers to the whole field declaration (from the beginning |
| 131 |
* of the label to the terminating semicolon). |
| 132 |
* @type array<int>|\Google\Protobuf\Internal\RepeatedField $span |
| 133 |
* Always has exactly three or four elements: start line, start column, |
| 134 |
* end line (optional, otherwise assumed same as start line), end column. |
| 135 |
* These are packed into a single field for efficiency. Note that line |
| 136 |
* and column numbers are zero-based -- typically you will want to add |
| 137 |
* 1 to each before displaying to a user. |
| 138 |
* @type string $leading_comments |
| 139 |
* If this SourceCodeInfo represents a complete declaration, these are any |
| 140 |
* comments appearing before and after the declaration which appear to be |
| 141 |
* attached to the declaration. |
| 142 |
* A series of line comments appearing on consecutive lines, with no other |
| 143 |
* tokens appearing on those lines, will be treated as a single comment. |
| 144 |
* leading_detached_comments will keep paragraphs of comments that appear |
| 145 |
* before (but not connected to) the current element. Each paragraph, |
| 146 |
* separated by empty lines, will be one comment element in the repeated |
| 147 |
* field. |
| 148 |
* Only the comment content is provided; comment markers (e.g. //) are |
| 149 |
* stripped out. For block comments, leading whitespace and an asterisk |
| 150 |
* will be stripped from the beginning of each line other than the first. |
| 151 |
* Newlines are included in the output. |
| 152 |
* Examples: |
| 153 |
* optional int32 foo = 1; // Comment attached to foo. |
| 154 |
* // Comment attached to bar. |
| 155 |
* optional int32 bar = 2; |
| 156 |
* optional string baz = 3; |
| 157 |
* // Comment attached to baz. |
| 158 |
* // Another line attached to baz. |
| 159 |
* // Comment attached to moo. |
| 160 |
* // |
| 161 |
* // Another line attached to moo. |
| 162 |
* optional double moo = 4; |
| 163 |
* // Detached comment for corge. This is not leading or trailing comments |
| 164 |
* // to moo or corge because there are blank lines separating it from |
| 165 |
* // both. |
| 166 |
* // Detached comment for corge paragraph 2. |
| 167 |
* optional string corge = 5; |
| 168 |
* /* Block comment attached |
| 169 |
* * to corge. Leading asterisks |
| 170 |
* * will be removed. */ |
| 171 |
* /* Block comment attached to |
| 172 |
* * grault. */ |
| 173 |
* optional int32 grault = 6; |
| 174 |
* // ignored detached comments. |
| 175 |
* @type string $trailing_comments |
| 176 |
* @type array<string>|\Google\Protobuf\Internal\RepeatedField $leading_detached_comments |
| 177 |
* } |
| 178 |
*/ |
| 179 |
public function __construct($data = NULL) { |
| 180 |
\GPBMetadata\Google\Protobuf\Internal\Descriptor::initOnce(); |
| 181 |
parent::__construct($data); |
| 182 |
} |
| 183 |
|
| 184 |
/** |
| 185 |
* Identifies which part of the FileDescriptorProto was defined at this |
| 186 |
* location. |
| 187 |
* Each element is a field number or an index. They form a path from |
| 188 |
* the root FileDescriptorProto to the place where the definition occurs. |
| 189 |
* For example, this path: |
| 190 |
* [ 4, 3, 2, 7, 1 ] |
| 191 |
* refers to: |
| 192 |
* file.message_type(3) // 4, 3 |
| 193 |
* .field(7) // 2, 7 |
| 194 |
* .name() // 1 |
| 195 |
* This is because FileDescriptorProto.message_type has field number 4: |
| 196 |
* repeated DescriptorProto message_type = 4; |
| 197 |
* and DescriptorProto.field has field number 2: |
| 198 |
* repeated FieldDescriptorProto field = 2; |
| 199 |
* and FieldDescriptorProto.name has field number 1: |
| 200 |
* optional string name = 1; |
| 201 |
* Thus, the above path gives the location of a field name. If we removed |
| 202 |
* the last element: |
| 203 |
* [ 4, 3, 2, 7 ] |
| 204 |
* this path refers to the whole field declaration (from the beginning |
| 205 |
* of the label to the terminating semicolon). |
| 206 |
* |
| 207 |
* Generated from protobuf field <code>repeated int32 path = 1 [packed = true];</code> |
| 208 |
* @return \Google\Protobuf\Internal\RepeatedField |
| 209 |
*/ |
| 210 |
public function getPath() |
| 211 |
{ |
| 212 |
return $this->path; |
| 213 |
} |
| 214 |
|
| 215 |
/** |
| 216 |
* Identifies which part of the FileDescriptorProto was defined at this |
| 217 |
* location. |
| 218 |
* Each element is a field number or an index. They form a path from |
| 219 |
* the root FileDescriptorProto to the place where the definition occurs. |
| 220 |
* For example, this path: |
| 221 |
* [ 4, 3, 2, 7, 1 ] |
| 222 |
* refers to: |
| 223 |
* file.message_type(3) // 4, 3 |
| 224 |
* .field(7) // 2, 7 |
| 225 |
* .name() // 1 |
| 226 |
* This is because FileDescriptorProto.message_type has field number 4: |
| 227 |
* repeated DescriptorProto message_type = 4; |
| 228 |
* and DescriptorProto.field has field number 2: |
| 229 |
* repeated FieldDescriptorProto field = 2; |
| 230 |
* and FieldDescriptorProto.name has field number 1: |
| 231 |
* optional string name = 1; |
| 232 |
* Thus, the above path gives the location of a field name. If we removed |
| 233 |
* the last element: |
| 234 |
* [ 4, 3, 2, 7 ] |
| 235 |
* this path refers to the whole field declaration (from the beginning |
| 236 |
* of the label to the terminating semicolon). |
| 237 |
* |
| 238 |
* Generated from protobuf field <code>repeated int32 path = 1 [packed = true];</code> |
| 239 |
* @param array<int>|\Google\Protobuf\Internal\RepeatedField $var |
| 240 |
* @return $this |
| 241 |
*/ |
| 242 |
public function setPath($var) |
| 243 |
{ |
| 244 |
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT32); |
| 245 |
$this->path = $arr; |
| 246 |
|
| 247 |
return $this; |
| 248 |
} |
| 249 |
|
| 250 |
/** |
| 251 |
* Always has exactly three or four elements: start line, start column, |
| 252 |
* end line (optional, otherwise assumed same as start line), end column. |
| 253 |
* These are packed into a single field for efficiency. Note that line |
| 254 |
* and column numbers are zero-based -- typically you will want to add |
| 255 |
* 1 to each before displaying to a user. |
| 256 |
* |
| 257 |
* Generated from protobuf field <code>repeated int32 span = 2 [packed = true];</code> |
| 258 |
* @return \Google\Protobuf\Internal\RepeatedField |
| 259 |
*/ |
| 260 |
public function getSpan() |
| 261 |
{ |
| 262 |
return $this->span; |
| 263 |
} |
| 264 |
|
| 265 |
/** |
| 266 |
* Always has exactly three or four elements: start line, start column, |
| 267 |
* end line (optional, otherwise assumed same as start line), end column. |
| 268 |
* These are packed into a single field for efficiency. Note that line |
| 269 |
* and column numbers are zero-based -- typically you will want to add |
| 270 |
* 1 to each before displaying to a user. |
| 271 |
* |
| 272 |
* Generated from protobuf field <code>repeated int32 span = 2 [packed = true];</code> |
| 273 |
* @param array<int>|\Google\Protobuf\Internal\RepeatedField $var |
| 274 |
* @return $this |
| 275 |
*/ |
| 276 |
public function setSpan($var) |
| 277 |
{ |
| 278 |
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT32); |
| 279 |
$this->span = $arr; |
| 280 |
|
| 281 |
return $this; |
| 282 |
} |
| 283 |
|
| 284 |
/** |
| 285 |
* If this SourceCodeInfo represents a complete declaration, these are any |
| 286 |
* comments appearing before and after the declaration which appear to be |
| 287 |
* attached to the declaration. |
| 288 |
* A series of line comments appearing on consecutive lines, with no other |
| 289 |
* tokens appearing on those lines, will be treated as a single comment. |
| 290 |
* leading_detached_comments will keep paragraphs of comments that appear |
| 291 |
* before (but not connected to) the current element. Each paragraph, |
| 292 |
* separated by empty lines, will be one comment element in the repeated |
| 293 |
* field. |
| 294 |
* Only the comment content is provided; comment markers (e.g. //) are |
| 295 |
* stripped out. For block comments, leading whitespace and an asterisk |
| 296 |
* will be stripped from the beginning of each line other than the first. |
| 297 |
* Newlines are included in the output. |
| 298 |
* Examples: |
| 299 |
* optional int32 foo = 1; // Comment attached to foo. |
| 300 |
* // Comment attached to bar. |
| 301 |
* optional int32 bar = 2; |
| 302 |
* optional string baz = 3; |
| 303 |
* // Comment attached to baz. |
| 304 |
* // Another line attached to baz. |
| 305 |
* // Comment attached to moo. |
| 306 |
* // |
| 307 |
* // Another line attached to moo. |
| 308 |
* optional double moo = 4; |
| 309 |
* // Detached comment for corge. This is not leading or trailing comments |
| 310 |
* // to moo or corge because there are blank lines separating it from |
| 311 |
* // both. |
| 312 |
* // Detached comment for corge paragraph 2. |
| 313 |
* optional string corge = 5; |
| 314 |
* /* Block comment attached |
| 315 |
* * to corge. Leading asterisks |
| 316 |
* * will be removed. */ |
| 317 |
* /* Block comment attached to |
| 318 |
* * grault. */ |
| 319 |
* optional int32 grault = 6; |
| 320 |
* // ignored detached comments. |
| 321 |
* |
| 322 |
* Generated from protobuf field <code>optional string leading_comments = 3;</code> |
| 323 |
* @return string |
| 324 |
*/ |
| 325 |
public function getLeadingComments() |
| 326 |
{ |
| 327 |
return isset($this->leading_comments) ? $this->leading_comments : ''; |
| 328 |
} |
| 329 |
|
| 330 |
public function hasLeadingComments() |
| 331 |
{ |
| 332 |
return isset($this->leading_comments); |
| 333 |
} |
| 334 |
|
| 335 |
public function clearLeadingComments() |
| 336 |
{ |
| 337 |
unset($this->leading_comments); |
| 338 |
} |
| 339 |
|
| 340 |
/** |
| 341 |
* If this SourceCodeInfo represents a complete declaration, these are any |
| 342 |
* comments appearing before and after the declaration which appear to be |
| 343 |
* attached to the declaration. |
| 344 |
* A series of line comments appearing on consecutive lines, with no other |
| 345 |
* tokens appearing on those lines, will be treated as a single comment. |
| 346 |
* leading_detached_comments will keep paragraphs of comments that appear |
| 347 |
* before (but not connected to) the current element. Each paragraph, |
| 348 |
* separated by empty lines, will be one comment element in the repeated |
| 349 |
* field. |
| 350 |
* Only the comment content is provided; comment markers (e.g. //) are |
| 351 |
* stripped out. For block comments, leading whitespace and an asterisk |
| 352 |
* will be stripped from the beginning of each line other than the first. |
| 353 |
* Newlines are included in the output. |
| 354 |
* Examples: |
| 355 |
* optional int32 foo = 1; // Comment attached to foo. |
| 356 |
* // Comment attached to bar. |
| 357 |
* optional int32 bar = 2; |
| 358 |
* optional string baz = 3; |
| 359 |
* // Comment attached to baz. |
| 360 |
* // Another line attached to baz. |
| 361 |
* // Comment attached to moo. |
| 362 |
* // |
| 363 |
* // Another line attached to moo. |
| 364 |
* optional double moo = 4; |
| 365 |
* // Detached comment for corge. This is not leading or trailing comments |
| 366 |
* // to moo or corge because there are blank lines separating it from |
| 367 |
* // both. |
| 368 |
* // Detached comment for corge paragraph 2. |
| 369 |
* optional string corge = 5; |
| 370 |
* /* Block comment attached |
| 371 |
* * to corge. Leading asterisks |
| 372 |
* * will be removed. */ |
| 373 |
* /* Block comment attached to |
| 374 |
* * grault. */ |
| 375 |
* optional int32 grault = 6; |
| 376 |
* // ignored detached comments. |
| 377 |
* |
| 378 |
* Generated from protobuf field <code>optional string leading_comments = 3;</code> |
| 379 |
* @param string $var |
| 380 |
* @return $this |
| 381 |
*/ |
| 382 |
public function setLeadingComments($var) |
| 383 |
{ |
| 384 |
GPBUtil::checkString($var, True); |
| 385 |
$this->leading_comments = $var; |
| 386 |
|
| 387 |
return $this; |
| 388 |
} |
| 389 |
|
| 390 |
/** |
| 391 |
* Generated from protobuf field <code>optional string trailing_comments = 4;</code> |
| 392 |
* @return string |
| 393 |
*/ |
| 394 |
public function getTrailingComments() |
| 395 |
{ |
| 396 |
return isset($this->trailing_comments) ? $this->trailing_comments : ''; |
| 397 |
} |
| 398 |
|
| 399 |
public function hasTrailingComments() |
| 400 |
{ |
| 401 |
return isset($this->trailing_comments); |
| 402 |
} |
| 403 |
|
| 404 |
public function clearTrailingComments() |
| 405 |
{ |
| 406 |
unset($this->trailing_comments); |
| 407 |
} |
| 408 |
|
| 409 |
/** |
| 410 |
* Generated from protobuf field <code>optional string trailing_comments = 4;</code> |
| 411 |
* @param string $var |
| 412 |
* @return $this |
| 413 |
*/ |
| 414 |
public function setTrailingComments($var) |
| 415 |
{ |
| 416 |
GPBUtil::checkString($var, True); |
| 417 |
$this->trailing_comments = $var; |
| 418 |
|
| 419 |
return $this; |
| 420 |
} |
| 421 |
|
| 422 |
/** |
| 423 |
* Generated from protobuf field <code>repeated string leading_detached_comments = 6;</code> |
| 424 |
* @return \Google\Protobuf\Internal\RepeatedField |
| 425 |
*/ |
| 426 |
public function getLeadingDetachedComments() |
| 427 |
{ |
| 428 |
return $this->leading_detached_comments; |
| 429 |
} |
| 430 |
|
| 431 |
/** |
| 432 |
* Generated from protobuf field <code>repeated string leading_detached_comments = 6;</code> |
| 433 |
* @param array<string>|\Google\Protobuf\Internal\RepeatedField $var |
| 434 |
* @return $this |
| 435 |
*/ |
| 436 |
public function setLeadingDetachedComments($var) |
| 437 |
{ |
| 438 |
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); |
| 439 |
$this->leading_detached_comments = $arr; |
| 440 |
|
| 441 |
return $this; |
| 442 |
} |
| 443 |
|
| 444 |
} |
| 445 |
|
| 446 |
// Adding a class alias for backwards compatibility with the previous class name. |
| 447 |
class_alias(Location::class, \Google\Protobuf\Internal\SourceCodeInfo_Location::class); |
| 448 |
|