OneofDescriptorProto.php 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  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 a oneof.
  12. *
  13. * Generated from protobuf message <code>google.protobuf.OneofDescriptorProto</code>
  14. */
  15. class OneofDescriptorProto extends \Google\Protobuf\Internal\Message
  16. {
  17. /**
  18. * Generated from protobuf field <code>optional string name = 1;</code>
  19. */
  20. private $name = '';
  21. private $has_name = false;
  22. /**
  23. * Generated from protobuf field <code>optional .google.protobuf.OneofOptions options = 2;</code>
  24. */
  25. private $options = null;
  26. private $has_options = false;
  27. public function __construct() {
  28. \GPBMetadata\Google\Protobuf\Internal\Descriptor::initOnce();
  29. parent::__construct();
  30. }
  31. /**
  32. * Generated from protobuf field <code>optional string name = 1;</code>
  33. * @return string
  34. */
  35. public function getName()
  36. {
  37. return $this->name;
  38. }
  39. /**
  40. * Generated from protobuf field <code>optional string name = 1;</code>
  41. * @param string $var
  42. * @return $this
  43. */
  44. public function setName($var)
  45. {
  46. GPBUtil::checkString($var, True);
  47. $this->name = $var;
  48. $this->has_name = true;
  49. return $this;
  50. }
  51. public function hasName()
  52. {
  53. return $this->has_name;
  54. }
  55. /**
  56. * Generated from protobuf field <code>optional .google.protobuf.OneofOptions options = 2;</code>
  57. * @return \Google\Protobuf\Internal\OneofOptions
  58. */
  59. public function getOptions()
  60. {
  61. return $this->options;
  62. }
  63. /**
  64. * Generated from protobuf field <code>optional .google.protobuf.OneofOptions options = 2;</code>
  65. * @param \Google\Protobuf\Internal\OneofOptions $var
  66. * @return $this
  67. */
  68. public function setOptions($var)
  69. {
  70. GPBUtil::checkMessage($var, \Google\Protobuf\Internal\OneofOptions::class);
  71. $this->options = $var;
  72. $this->has_options = true;
  73. return $this;
  74. }
  75. public function hasOptions()
  76. {
  77. return $this->has_options;
  78. }
  79. }