SourceCodeInfo_Location.php 14 KB

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