SourceCodeInfo.php 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230
  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. * Encapsulates information about the original source file from which a
  12. * FileDescriptorProto was generated.
  13. *
  14. * Generated from protobuf message <code>google.protobuf.SourceCodeInfo</code>
  15. */
  16. class SourceCodeInfo extends \Google\Protobuf\Internal\Message
  17. {
  18. /**
  19. * A Location identifies a piece of source code in a .proto file which
  20. * corresponds to a particular definition. This information is intended
  21. * to be useful to IDEs, code indexers, documentation generators, and similar
  22. * tools.
  23. * For example, say we have a file like:
  24. * message Foo {
  25. * optional string foo = 1;
  26. * }
  27. * Let's look at just the field definition:
  28. * optional string foo = 1;
  29. * ^ ^^ ^^ ^ ^^^
  30. * a bc de f ghi
  31. * We have the following locations:
  32. * span path represents
  33. * [a,i) [ 4, 0, 2, 0 ] The whole field definition.
  34. * [a,b) [ 4, 0, 2, 0, 4 ] The label (optional).
  35. * [c,d) [ 4, 0, 2, 0, 5 ] The type (string).
  36. * [e,f) [ 4, 0, 2, 0, 1 ] The name (foo).
  37. * [g,h) [ 4, 0, 2, 0, 3 ] The number (1).
  38. * Notes:
  39. * - A location may refer to a repeated field itself (i.e. not to any
  40. * particular index within it). This is used whenever a set of elements are
  41. * logically enclosed in a single code segment. For example, an entire
  42. * extend block (possibly containing multiple extension definitions) will
  43. * have an outer location whose path refers to the "extensions" repeated
  44. * field without an index.
  45. * - Multiple locations may have the same path. This happens when a single
  46. * logical declaration is spread out across multiple places. The most
  47. * obvious example is the "extend" block again -- there may be multiple
  48. * extend blocks in the same scope, each of which will have the same path.
  49. * - A location's span is not always a subset of its parent's span. For
  50. * example, the "extendee" of an extension declaration appears at the
  51. * beginning of the "extend" block and is shared by all extensions within
  52. * the block.
  53. * - Just because a location's span is a subset of some other location's span
  54. * does not mean that it is a descendant. For example, a "group" defines
  55. * both a type and a field in a single declaration. Thus, the locations
  56. * corresponding to the type and field and their components will overlap.
  57. * - Code which tries to interpret locations should probably be designed to
  58. * ignore those that it doesn't understand, as more types of locations could
  59. * be recorded in the future.
  60. *
  61. * Generated from protobuf field <code>repeated .google.protobuf.SourceCodeInfo.Location location = 1;</code>
  62. */
  63. private $location;
  64. /**
  65. * Constructor.
  66. *
  67. * @param array $data {
  68. * Optional. Data for populating the Message object.
  69. *
  70. * @type \Google\Protobuf\Internal\SourceCodeInfo\Location[]|\Google\Protobuf\Internal\RepeatedField $location
  71. * A Location identifies a piece of source code in a .proto file which
  72. * corresponds to a particular definition. This information is intended
  73. * to be useful to IDEs, code indexers, documentation generators, and similar
  74. * tools.
  75. * For example, say we have a file like:
  76. * message Foo {
  77. * optional string foo = 1;
  78. * }
  79. * Let's look at just the field definition:
  80. * optional string foo = 1;
  81. * ^ ^^ ^^ ^ ^^^
  82. * a bc de f ghi
  83. * We have the following locations:
  84. * span path represents
  85. * [a,i) [ 4, 0, 2, 0 ] The whole field definition.
  86. * [a,b) [ 4, 0, 2, 0, 4 ] The label (optional).
  87. * [c,d) [ 4, 0, 2, 0, 5 ] The type (string).
  88. * [e,f) [ 4, 0, 2, 0, 1 ] The name (foo).
  89. * [g,h) [ 4, 0, 2, 0, 3 ] The number (1).
  90. * Notes:
  91. * - A location may refer to a repeated field itself (i.e. not to any
  92. * particular index within it). This is used whenever a set of elements are
  93. * logically enclosed in a single code segment. For example, an entire
  94. * extend block (possibly containing multiple extension definitions) will
  95. * have an outer location whose path refers to the "extensions" repeated
  96. * field without an index.
  97. * - Multiple locations may have the same path. This happens when a single
  98. * logical declaration is spread out across multiple places. The most
  99. * obvious example is the "extend" block again -- there may be multiple
  100. * extend blocks in the same scope, each of which will have the same path.
  101. * - A location's span is not always a subset of its parent's span. For
  102. * example, the "extendee" of an extension declaration appears at the
  103. * beginning of the "extend" block and is shared by all extensions within
  104. * the block.
  105. * - Just because a location's span is a subset of some other location's span
  106. * does not mean that it is a descendant. For example, a "group" defines
  107. * both a type and a field in a single declaration. Thus, the locations
  108. * corresponding to the type and field and their components will overlap.
  109. * - Code which tries to interpret locations should probably be designed to
  110. * ignore those that it doesn't understand, as more types of locations could
  111. * be recorded in the future.
  112. * }
  113. */
  114. public function __construct($data = NULL) {
  115. \GPBMetadata\Google\Protobuf\Internal\Descriptor::initOnce();
  116. parent::__construct($data);
  117. }
  118. /**
  119. * A Location identifies a piece of source code in a .proto file which
  120. * corresponds to a particular definition. This information is intended
  121. * to be useful to IDEs, code indexers, documentation generators, and similar
  122. * tools.
  123. * For example, say we have a file like:
  124. * message Foo {
  125. * optional string foo = 1;
  126. * }
  127. * Let's look at just the field definition:
  128. * optional string foo = 1;
  129. * ^ ^^ ^^ ^ ^^^
  130. * a bc de f ghi
  131. * We have the following locations:
  132. * span path represents
  133. * [a,i) [ 4, 0, 2, 0 ] The whole field definition.
  134. * [a,b) [ 4, 0, 2, 0, 4 ] The label (optional).
  135. * [c,d) [ 4, 0, 2, 0, 5 ] The type (string).
  136. * [e,f) [ 4, 0, 2, 0, 1 ] The name (foo).
  137. * [g,h) [ 4, 0, 2, 0, 3 ] The number (1).
  138. * Notes:
  139. * - A location may refer to a repeated field itself (i.e. not to any
  140. * particular index within it). This is used whenever a set of elements are
  141. * logically enclosed in a single code segment. For example, an entire
  142. * extend block (possibly containing multiple extension definitions) will
  143. * have an outer location whose path refers to the "extensions" repeated
  144. * field without an index.
  145. * - Multiple locations may have the same path. This happens when a single
  146. * logical declaration is spread out across multiple places. The most
  147. * obvious example is the "extend" block again -- there may be multiple
  148. * extend blocks in the same scope, each of which will have the same path.
  149. * - A location's span is not always a subset of its parent's span. For
  150. * example, the "extendee" of an extension declaration appears at the
  151. * beginning of the "extend" block and is shared by all extensions within
  152. * the block.
  153. * - Just because a location's span is a subset of some other location's span
  154. * does not mean that it is a descendant. For example, a "group" defines
  155. * both a type and a field in a single declaration. Thus, the locations
  156. * corresponding to the type and field and their components will overlap.
  157. * - Code which tries to interpret locations should probably be designed to
  158. * ignore those that it doesn't understand, as more types of locations could
  159. * be recorded in the future.
  160. *
  161. * Generated from protobuf field <code>repeated .google.protobuf.SourceCodeInfo.Location location = 1;</code>
  162. * @return \Google\Protobuf\Internal\RepeatedField
  163. */
  164. public function getLocation()
  165. {
  166. return $this->location;
  167. }
  168. /**
  169. * A Location identifies a piece of source code in a .proto file which
  170. * corresponds to a particular definition. This information is intended
  171. * to be useful to IDEs, code indexers, documentation generators, and similar
  172. * tools.
  173. * For example, say we have a file like:
  174. * message Foo {
  175. * optional string foo = 1;
  176. * }
  177. * Let's look at just the field definition:
  178. * optional string foo = 1;
  179. * ^ ^^ ^^ ^ ^^^
  180. * a bc de f ghi
  181. * We have the following locations:
  182. * span path represents
  183. * [a,i) [ 4, 0, 2, 0 ] The whole field definition.
  184. * [a,b) [ 4, 0, 2, 0, 4 ] The label (optional).
  185. * [c,d) [ 4, 0, 2, 0, 5 ] The type (string).
  186. * [e,f) [ 4, 0, 2, 0, 1 ] The name (foo).
  187. * [g,h) [ 4, 0, 2, 0, 3 ] The number (1).
  188. * Notes:
  189. * - A location may refer to a repeated field itself (i.e. not to any
  190. * particular index within it). This is used whenever a set of elements are
  191. * logically enclosed in a single code segment. For example, an entire
  192. * extend block (possibly containing multiple extension definitions) will
  193. * have an outer location whose path refers to the "extensions" repeated
  194. * field without an index.
  195. * - Multiple locations may have the same path. This happens when a single
  196. * logical declaration is spread out across multiple places. The most
  197. * obvious example is the "extend" block again -- there may be multiple
  198. * extend blocks in the same scope, each of which will have the same path.
  199. * - A location's span is not always a subset of its parent's span. For
  200. * example, the "extendee" of an extension declaration appears at the
  201. * beginning of the "extend" block and is shared by all extensions within
  202. * the block.
  203. * - Just because a location's span is a subset of some other location's span
  204. * does not mean that it is a descendant. For example, a "group" defines
  205. * both a type and a field in a single declaration. Thus, the locations
  206. * corresponding to the type and field and their components will overlap.
  207. * - Code which tries to interpret locations should probably be designed to
  208. * ignore those that it doesn't understand, as more types of locations could
  209. * be recorded in the future.
  210. *
  211. * Generated from protobuf field <code>repeated .google.protobuf.SourceCodeInfo.Location location = 1;</code>
  212. * @param \Google\Protobuf\Internal\SourceCodeInfo\Location[]|\Google\Protobuf\Internal\RepeatedField $var
  213. * @return $this
  214. */
  215. public function setLocation($var)
  216. {
  217. $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\SourceCodeInfo\Location::class);
  218. $this->location = $arr;
  219. return $this;
  220. }
  221. }