GeneratedCodeInfo.php 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  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. * Describes the relationship between generated code and its original source
  12. * file. A GeneratedCodeInfo message is associated with only one generated
  13. * source file, but may contain references to different source .proto files.
  14. *
  15. * Generated from protobuf message <code>google.protobuf.GeneratedCodeInfo</code>
  16. */
  17. final class GeneratedCodeInfo extends \Google\Protobuf\Internal\Message
  18. {
  19. /**
  20. * An Annotation connects some span of text in generated code to an element
  21. * of its generating .proto file.
  22. *
  23. * Generated from protobuf field <code>repeated .google.protobuf.GeneratedCodeInfo.Annotation annotation = 1;</code>
  24. */
  25. private $annotation;
  26. private $has_annotation = false;
  27. /**
  28. * Constructor.
  29. *
  30. * @param array $data {
  31. * Optional. Data for populating the Message object.
  32. *
  33. * @type \Google\Protobuf\Internal\GeneratedCodeInfo\Annotation[]|\Google\Protobuf\Internal\RepeatedField $annotation
  34. * An Annotation connects some span of text in generated code to an element
  35. * of its generating .proto file.
  36. * }
  37. */
  38. public function __construct($data = NULL) {
  39. \GPBMetadata\Google\Protobuf\Internal\Descriptor::initOnce();
  40. parent::__construct($data);
  41. }
  42. /**
  43. * An Annotation connects some span of text in generated code to an element
  44. * of its generating .proto file.
  45. *
  46. * Generated from protobuf field <code>repeated .google.protobuf.GeneratedCodeInfo.Annotation annotation = 1;</code>
  47. * @return \Google\Protobuf\Internal\RepeatedField
  48. */
  49. public function getAnnotation()
  50. {
  51. return $this->annotation;
  52. }
  53. /**
  54. * An Annotation connects some span of text in generated code to an element
  55. * of its generating .proto file.
  56. *
  57. * Generated from protobuf field <code>repeated .google.protobuf.GeneratedCodeInfo.Annotation annotation = 1;</code>
  58. * @param \Google\Protobuf\Internal\GeneratedCodeInfo\Annotation[]|\Google\Protobuf\Internal\RepeatedField $var
  59. * @return $this
  60. */
  61. public function setAnnotation($var)
  62. {
  63. $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\GeneratedCodeInfo\Annotation::class);
  64. $this->annotation = $arr;
  65. $this->has_annotation = true;
  66. return $this;
  67. }
  68. public function hasAnnotation()
  69. {
  70. return $this->has_annotation;
  71. }
  72. }