OneofDescriptorProto.php 1.9 KB

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