GeneratedCodeInfo.php 2.8 KB

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