SourceCodeInfo_Location.php 13 KB

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